From f06f32849f1e2c72dc73287c73361174c07ed29e Mon Sep 17 00:00:00 2001 From: Yehonal Date: Thu, 12 Oct 2017 20:00:52 +0200 Subject: Directory Structure [step 1]: moving files working on #672 NOTE: This commit can't be compiled!! --- modules/acore/extractors/CMakeLists.txt | 17 - .../acore/extractors/map_extractor/CMakeLists.txt | 44 - modules/acore/extractors/map_extractor/System.cpp | 1157 - modules/acore/extractors/map_extractor/adt.cpp | 144 - modules/acore/extractors/map_extractor/adt.h | 296 - modules/acore/extractors/map_extractor/dbcfile.cpp | 89 - modules/acore/extractors/map_extractor/dbcfile.h | 125 - modules/acore/extractors/map_extractor/loadlib.cpp | 71 - .../extractors/map_extractor/loadlib/loadlib.h | 71 - .../acore/extractors/map_extractor/mpq_libmpq.cpp | 117 - .../acore/extractors/map_extractor/mpq_libmpq04.h | 96 - modules/acore/extractors/map_extractor/wdt.cpp | 72 - modules/acore/extractors/map_extractor/wdt.h | 74 - modules/acore/extractors/mesh_extractor/ADT.cpp | 60 - modules/acore/extractors/mesh_extractor/ADT.h | 39 - .../acore/extractors/mesh_extractor/CMakeLists.txt | 50 - modules/acore/extractors/mesh_extractor/Cache.h | 70 - modules/acore/extractors/mesh_extractor/Chunk.cpp | 38 - modules/acore/extractors/mesh_extractor/Chunk.h | 27 - .../extractors/mesh_extractor/ChunkedData.cpp | 81 - .../acore/extractors/mesh_extractor/ChunkedData.h | 28 - .../acore/extractors/mesh_extractor/Constants.h | 65 - .../extractors/mesh_extractor/ContinentBuilder.cpp | 203 - .../extractors/mesh_extractor/ContinentBuilder.h | 37 - modules/acore/extractors/mesh_extractor/DBC.cpp | 77 - modules/acore/extractors/mesh_extractor/DBC.h | 60 - .../extractors/mesh_extractor/DoodadHandler.cpp | 116 - .../extractors/mesh_extractor/DoodadHandler.h | 69 - .../acore/extractors/mesh_extractor/Geometry.cpp | 136 - modules/acore/extractors/mesh_extractor/Geometry.h | 30 - .../extractors/mesh_extractor/LiquidHandler.cpp | 109 - .../extractors/mesh_extractor/LiquidHandler.h | 28 - modules/acore/extractors/mesh_extractor/MPQ.cpp | 129 - modules/acore/extractors/mesh_extractor/MPQ.h | 96 - .../acore/extractors/mesh_extractor/MPQManager.cpp | 122 - .../acore/extractors/mesh_extractor/MPQManager.h | 43 - .../acore/extractors/mesh_extractor/MapChunk.cpp | 83 - modules/acore/extractors/mesh_extractor/MapChunk.h | 31 - .../extractors/mesh_extractor/MeshExtractor.cpp | 476 - modules/acore/extractors/mesh_extractor/Model.cpp | 74 - modules/acore/extractors/mesh_extractor/Model.h | 30 - .../mesh_extractor/ObjectDataHandler.cpp | 16 - .../extractors/mesh_extractor/ObjectDataHandler.h | 22 - .../extractors/mesh_extractor/TileBuilder.cpp | 404 - .../acore/extractors/mesh_extractor/TileBuilder.h | 41 - modules/acore/extractors/mesh_extractor/Utils.cpp | 554 - modules/acore/extractors/mesh_extractor/Utils.h | 397 - modules/acore/extractors/mesh_extractor/WDT.cpp | 68 - modules/acore/extractors/mesh_extractor/WDT.h | 36 - .../extractors/mesh_extractor/WorldModelGroup.cpp | 150 - .../extractors/mesh_extractor/WorldModelGroup.h | 45 - .../mesh_extractor/WorldModelHandler.cpp | 227 - .../extractors/mesh_extractor/WorldModelHandler.h | 54 - .../extractors/mesh_extractor/WorldModelRoot.cpp | 86 - .../extractors/mesh_extractor/WorldModelRoot.h | 34 - modules/acore/extractors/mesh_extractor/readme | 6 - .../extractors/mmaps_generator/CMakeLists.txt | 140 - .../extractors/mmaps_generator/Info/readme.txt | 69 - .../mmaps_generator/IntermediateValues.cpp | 265 - .../mmaps_generator/IntermediateValues.h | 41 - .../extractors/mmaps_generator/MapBuilder.cpp | 974 - .../acore/extractors/mmaps_generator/MapBuilder.h | 175 - .../acore/extractors/mmaps_generator/PathCommon.h | 150 - .../extractors/mmaps_generator/PathGenerator.cpp | 284 - .../extractors/mmaps_generator/TerrainBuilder.cpp | 923 - .../extractors/mmaps_generator/TerrainBuilder.h | 120 - .../extractors/mmaps_generator/VMapExtensions.cpp | 62 - .../extractors/vmap4_assembler/CMakeLists.txt | 39 - .../extractors/vmap4_assembler/VMapAssembler.cpp | 37 - .../extractors/vmap4_extractor/CMakeLists.txt | 39 - .../acore/extractors/vmap4_extractor/adtfile.cpp | 202 - modules/acore/extractors/vmap4_extractor/adtfile.h | 131 - .../acore/extractors/vmap4_extractor/dbcfile.cpp | 84 - modules/acore/extractors/vmap4_extractor/dbcfile.h | 143 - .../vmap4_extractor/gameobject_extract.cpp | 111 - .../extractors/vmap4_extractor/loadlib/loadlib.h | 65 - modules/acore/extractors/vmap4_extractor/model.cpp | 183 - modules/acore/extractors/vmap4_extractor/model.h | 55 - .../extractors/vmap4_extractor/modelheaders.h | 87 - .../extractors/vmap4_extractor/mpq_libmpq.cpp | 117 - .../extractors/vmap4_extractor/mpq_libmpq04.h | 95 - modules/acore/extractors/vmap4_extractor/vec3d.h | 236 - .../extractors/vmap4_extractor/vmapexport.cpp | 526 - .../acore/extractors/vmap4_extractor/vmapexport.h | 30 - .../acore/extractors/vmap4_extractor/wdtfile.cpp | 118 - modules/acore/extractors/vmap4_extractor/wdtfile.h | 33 - modules/acore/extractors/vmap4_extractor/wmo.cpp | 556 - modules/acore/extractors/vmap4_extractor/wmo.h | 122 - modules/acore/game-framework/CMakeLists.txt | 2 - modules/acore/game-framework/LICENSE-AGPL3 | 661 - .../acore/game-framework/src/Addons/AddonMgr.cpp | 120 - modules/acore/game-framework/src/Addons/AddonMgr.h | 58 - modules/acore/game-framework/src/CMakeLists.txt | 65 - .../src/PrecompiledHeaders/gamefwPCH.cpp | 1 - .../src/PrecompiledHeaders/gamefwPCH.h | 3 - modules/acore/startup-scripts/conf.sh.dist | 50 - .../startup-scripts/examples/restarter-auth.sh | 14 - .../startup-scripts/examples/restarter-world.sh | 14 - .../acore/startup-scripts/examples/starter-auth.sh | 14 - .../startup-scripts/examples/starter-world.sh | 14 - modules/acore/startup-scripts/run-engine | 113 - modules/acore/startup-scripts/starter | 27 - modules/hw-core/bash-lib-event/src/hooks.sh | 16 - modules/hw-core/bash-lib-git/bin/git-subtree-list | 7 - modules/hw-core/bash-lib-git/src/subtree.sh | 3 - modules/worldengine/deps/.gitignore | 49 - modules/worldengine/deps/CMakeLists.txt | 45 - modules/worldengine/deps/PackageList.txt | 45 - modules/worldengine/deps/SFMT/SFMT.h | 357 - modules/worldengine/deps/SFMT/randomc.h | 65 - modules/worldengine/deps/acelite/AUTHORS | 13 - modules/worldengine/deps/acelite/CMakeLists.txt | 11 - modules/worldengine/deps/acelite/COPYING | 111 - modules/worldengine/deps/acelite/NEWS | 2090 -- modules/worldengine/deps/acelite/README | 222 - modules/worldengine/deps/acelite/THANKS | 2424 -- modules/worldengine/deps/acelite/VERSION | 8 - modules/worldengine/deps/acelite/ace/ACE.cpp | 3437 -- modules/worldengine/deps/acelite/ace/ACE.h | 884 - modules/worldengine/deps/acelite/ace/ACE.inl | 333 - modules/worldengine/deps/acelite/ace/ACE.pc.in | 10 - modules/worldengine/deps/acelite/ace/ACE_crc32.cpp | 156 - .../worldengine/deps/acelite/ace/ACE_crc_ccitt.cpp | 124 - modules/worldengine/deps/acelite/ace/ACE_export.h | 74 - modules/worldengine/deps/acelite/ace/ARGV.cpp | 379 - modules/worldengine/deps/acelite/ace/ARGV.h | 333 - modules/worldengine/deps/acelite/ace/ARGV.inl | 104 - .../worldengine/deps/acelite/ace/ATM_Acceptor.cpp | 307 - .../worldengine/deps/acelite/ace/ATM_Acceptor.h | 121 - .../worldengine/deps/acelite/ace/ATM_Acceptor.inl | 40 - modules/worldengine/deps/acelite/ace/ATM_Addr.cpp | 519 - modules/worldengine/deps/acelite/ace/ATM_Addr.h | 195 - modules/worldengine/deps/acelite/ace/ATM_Addr.inl | 34 - .../worldengine/deps/acelite/ace/ATM_Connector.cpp | 136 - .../worldengine/deps/acelite/ace/ATM_Connector.h | 162 - .../worldengine/deps/acelite/ace/ATM_Connector.inl | 129 - .../worldengine/deps/acelite/ace/ATM_Params.cpp | 18 - modules/worldengine/deps/acelite/ace/ATM_Params.h | 212 - .../worldengine/deps/acelite/ace/ATM_Params.inl | 232 - modules/worldengine/deps/acelite/ace/ATM_QoS.cpp | 629 - modules/worldengine/deps/acelite/ace/ATM_QoS.h | 113 - modules/worldengine/deps/acelite/ace/ATM_QoS.inl | 26 - .../worldengine/deps/acelite/ace/ATM_Stream.cpp | 288 - modules/worldengine/deps/acelite/ace/ATM_Stream.h | 105 - .../worldengine/deps/acelite/ace/ATM_Stream.inl | 130 - .../deps/acelite/ace/Abstract_Timer_Queue.cpp | 26 - .../deps/acelite/ace/Abstract_Timer_Queue.h | 230 - modules/worldengine/deps/acelite/ace/Acceptor.cpp | 1254 - modules/worldengine/deps/acelite/ace/Acceptor.h | 701 - .../deps/acelite/ace/Activation_Queue.cpp | 134 - .../deps/acelite/ace/Activation_Queue.h | 168 - .../deps/acelite/ace/Activation_Queue.inl | 31 - .../deps/acelite/ace/Active_Map_Manager.cpp | 7 - .../deps/acelite/ace/Active_Map_Manager.h | 116 - .../deps/acelite/ace/Active_Map_Manager.inl | 95 - .../deps/acelite/ace/Active_Map_Manager_T.cpp | 22 - .../deps/acelite/ace/Active_Map_Manager_T.h | 211 - .../deps/acelite/ace/Active_Map_Manager_T.inl | 311 - modules/worldengine/deps/acelite/ace/Addr.cpp | 65 - modules/worldengine/deps/acelite/ace/Addr.h | 101 - modules/worldengine/deps/acelite/ace/Addr.inl | 57 - .../worldengine/deps/acelite/ace/Arg_Shifter.cpp | 226 - modules/worldengine/deps/acelite/ace/Arg_Shifter.h | 234 - .../deps/acelite/ace/Argv_Type_Converter.cpp | 190 - .../deps/acelite/ace/Argv_Type_Converter.h | 117 - .../deps/acelite/ace/Argv_Type_Converter.inl | 41 - .../worldengine/deps/acelite/ace/Array_Base.cpp | 233 - modules/worldengine/deps/acelite/ace/Array_Base.h | 254 - .../worldengine/deps/acelite/ace/Array_Base.inl | 143 - modules/worldengine/deps/acelite/ace/Array_Map.cpp | 260 - modules/worldengine/deps/acelite/ace/Array_Map.h | 289 - modules/worldengine/deps/acelite/ace/Array_Map.inl | 130 - modules/worldengine/deps/acelite/ace/Assert.cpp | 20 - modules/worldengine/deps/acelite/ace/Assert.h | 38 - .../deps/acelite/ace/Asynch_Acceptor.cpp | 506 - .../worldengine/deps/acelite/ace/Asynch_Acceptor.h | 274 - .../deps/acelite/ace/Asynch_Connector.cpp | 268 - .../deps/acelite/ace/Asynch_Connector.h | 169 - modules/worldengine/deps/acelite/ace/Asynch_IO.cpp | 1410 - modules/worldengine/deps/acelite/ace/Asynch_IO.h | 1760 - .../deps/acelite/ace/Asynch_IO_Impl.cpp | 115 - .../worldengine/deps/acelite/ace/Asynch_IO_Impl.h | 793 - .../deps/acelite/ace/Asynch_IO_Impl.inl | 103 - .../deps/acelite/ace/Asynch_Pseudo_Task.cpp | 126 - .../deps/acelite/ace/Asynch_Pseudo_Task.h | 70 - modules/worldengine/deps/acelite/ace/Atomic_Op.cpp | 304 - modules/worldengine/deps/acelite/ace/Atomic_Op.h | 384 - modules/worldengine/deps/acelite/ace/Atomic_Op.inl | 666 - .../deps/acelite/ace/Atomic_Op_GCC_T.cpp | 23 - .../worldengine/deps/acelite/ace/Atomic_Op_GCC_T.h | 137 - .../deps/acelite/ace/Atomic_Op_GCC_T.inl | 152 - .../worldengine/deps/acelite/ace/Atomic_Op_Sparc.c | 187 - .../worldengine/deps/acelite/ace/Atomic_Op_Sparc.h | 12 - .../worldengine/deps/acelite/ace/Atomic_Op_T.cpp | 80 - modules/worldengine/deps/acelite/ace/Atomic_Op_T.h | 357 - .../worldengine/deps/acelite/ace/Atomic_Op_T.inl | 346 - .../worldengine/deps/acelite/ace/Auto_Event.cpp | 11 - modules/worldengine/deps/acelite/ace/Auto_Event.h | 129 - .../worldengine/deps/acelite/ace/Auto_Event.inl | 4 - .../worldengine/deps/acelite/ace/Auto_Functor.cpp | 37 - .../worldengine/deps/acelite/ace/Auto_Functor.h | 118 - .../worldengine/deps/acelite/ace/Auto_Functor.inl | 117 - .../worldengine/deps/acelite/ace/Auto_IncDec_T.cpp | 32 - .../worldengine/deps/acelite/ace/Auto_IncDec_T.h | 76 - .../worldengine/deps/acelite/ace/Auto_IncDec_T.inl | 22 - modules/worldengine/deps/acelite/ace/Auto_Ptr.cpp | 19 - modules/worldengine/deps/acelite/ace/Auto_Ptr.h | 226 - modules/worldengine/deps/acelite/ace/Auto_Ptr.inl | 168 - modules/worldengine/deps/acelite/ace/Barrier.cpp | 170 - modules/worldengine/deps/acelite/ace/Barrier.h | 190 - modules/worldengine/deps/acelite/ace/Barrier.inl | 19 - .../deps/acelite/ace/Base_Thread_Adapter.cpp | 128 - .../deps/acelite/ace/Base_Thread_Adapter.h | 197 - .../deps/acelite/ace/Base_Thread_Adapter.inl | 45 - .../deps/acelite/ace/Based_Pointer_Repository.cpp | 115 - .../deps/acelite/ace/Based_Pointer_Repository.h | 92 - .../deps/acelite/ace/Based_Pointer_T.cpp | 119 - .../worldengine/deps/acelite/ace/Based_Pointer_T.h | 203 - .../deps/acelite/ace/Based_Pointer_T.inl | 136 - .../worldengine/deps/acelite/ace/Basic_Stats.cpp | 74 - modules/worldengine/deps/acelite/ace/Basic_Stats.h | 90 - .../worldengine/deps/acelite/ace/Basic_Stats.inl | 50 - .../worldengine/deps/acelite/ace/Basic_Types.cpp | 1 - modules/worldengine/deps/acelite/ace/Basic_Types.h | 676 - modules/worldengine/deps/acelite/ace/Bound_Ptr.h | 386 - modules/worldengine/deps/acelite/ace/Bound_Ptr.inl | 492 - modules/worldengine/deps/acelite/ace/CDR_Base.cpp | 1659 - modules/worldengine/deps/acelite/ace/CDR_Base.h | 580 - modules/worldengine/deps/acelite/ace/CDR_Base.inl | 625 - modules/worldengine/deps/acelite/ace/CDR_Size.cpp | 258 - modules/worldengine/deps/acelite/ace/CDR_Size.h | 234 - modules/worldengine/deps/acelite/ace/CDR_Size.inl | 435 - .../worldengine/deps/acelite/ace/CDR_Stream.cpp | 2256 -- modules/worldengine/deps/acelite/ace/CDR_Stream.h | 1423 - .../worldengine/deps/acelite/ace/CDR_Stream.inl | 1787 - .../deps/acelite/ace/CE_Screen_Output.cpp | 156 - .../deps/acelite/ace/CE_Screen_Output.h | 107 - .../worldengine/deps/acelite/ace/CMakeLists.txt | 355 - .../worldengine/deps/acelite/ace/CORBA_macros.h | 88 - .../deps/acelite/ace/Cache_Map_Manager_T.cpp | 412 - .../deps/acelite/ace/Cache_Map_Manager_T.h | 403 - .../deps/acelite/ace/Cache_Map_Manager_T.inl | 243 - .../deps/acelite/ace/Cached_Connect_Strategy_T.cpp | 728 - .../deps/acelite/ace/Cached_Connect_Strategy_T.h | 261 - .../deps/acelite/ace/Caching_Strategies_T.cpp | 57 - .../deps/acelite/ace/Caching_Strategies_T.h | 550 - .../deps/acelite/ace/Caching_Strategies_T.inl | 454 - .../deps/acelite/ace/Caching_Utility_T.cpp | 498 - .../deps/acelite/ace/Caching_Utility_T.h | 311 - .../worldengine/deps/acelite/ace/Capabilities.cpp | 350 - .../worldengine/deps/acelite/ace/Capabilities.h | 219 - .../worldengine/deps/acelite/ace/Capabilities.inl | 49 - modules/worldengine/deps/acelite/ace/Cleanup.cpp | 175 - modules/worldengine/deps/acelite/ace/Cleanup.h | 158 - modules/worldengine/deps/acelite/ace/Cleanup.inl | 27 - .../deps/acelite/ace/Cleanup_Strategies_T.cpp | 93 - .../deps/acelite/ace/Cleanup_Strategies_T.h | 147 - modules/worldengine/deps/acelite/ace/Codecs.cpp | 230 - modules/worldengine/deps/acelite/ace/Codecs.h | 117 - .../deps/acelite/ace/Codeset_IBM1047.cpp | 302 - .../worldengine/deps/acelite/ace/Codeset_IBM1047.h | 125 - .../deps/acelite/ace/Codeset_Registry.cpp | 102 - .../deps/acelite/ace/Codeset_Registry.h | 98 - .../deps/acelite/ace/Codeset_Registry.inl | 63 - .../deps/acelite/ace/Codeset_Registry_db.cpp | 33 - .../worldengine/deps/acelite/ace/Codeset_Symbols.h | 218 - .../acelite/ace/Compression/ACE_Compression.mpc | 24 - .../ace/Compression/ACE_Compression_export.h | 57 - .../deps/acelite/ace/Compression/Compressor.cpp | 61 - .../deps/acelite/ace/Compression/Compressor.h | 138 - .../deps/acelite/ace/Compression/Compressor.inl | 16 - .../ace/Compression/rle/ACE_RLECompression.mpc | 18 - .../Compression/rle/ACE_RLECompression_export.h | 56 - .../acelite/ace/Compression/rle/RLECompressor.cpp | 145 - .../acelite/ace/Compression/rle/RLECompressor.h | 106 - .../deps/acelite/ace/Condition_Attributes.cpp | 15 - .../deps/acelite/ace/Condition_Attributes.h | 93 - .../deps/acelite/ace/Condition_Attributes.inl | 37 - .../ace/Condition_Recursive_Thread_Mutex.cpp | 131 - .../acelite/ace/Condition_Recursive_Thread_Mutex.h | 112 - .../worldengine/deps/acelite/ace/Condition_T.cpp | 142 - modules/worldengine/deps/acelite/ace/Condition_T.h | 170 - .../worldengine/deps/acelite/ace/Condition_T.inl | 48 - .../deps/acelite/ace/Condition_Thread_Mutex.cpp | 122 - .../deps/acelite/ace/Condition_Thread_Mutex.h | 144 - .../deps/acelite/ace/Condition_Thread_Mutex.inl | 38 - .../worldengine/deps/acelite/ace/Configuration.cpp | 2131 -- .../worldengine/deps/acelite/ace/Configuration.h | 898 - .../worldengine/deps/acelite/ace/Configuration.inl | 10 - .../acelite/ace/Configuration_Import_Export.cpp | 669 - .../deps/acelite/ace/Configuration_Import_Export.h | 211 - .../acelite/ace/Connection_Recycling_Strategy.cpp | 13 - .../acelite/ace/Connection_Recycling_Strategy.h | 63 - modules/worldengine/deps/acelite/ace/Connector.cpp | 999 - modules/worldengine/deps/acelite/ace/Connector.h | 580 - .../worldengine/deps/acelite/ace/Containers.cpp | 6 - modules/worldengine/deps/acelite/ace/Containers.h | 69 - .../worldengine/deps/acelite/ace/Containers.inl | 22 - .../worldengine/deps/acelite/ace/Containers_T.cpp | 1901 - .../worldengine/deps/acelite/ace/Containers_T.h | 2057 -- .../worldengine/deps/acelite/ace/Containers_T.inl | 476 - .../worldengine/deps/acelite/ace/Copy_Disabled.cpp | 15 - .../worldengine/deps/acelite/ace/Copy_Disabled.h | 62 - .../worldengine/deps/acelite/ace/Countdown_Time.h | 34 - .../deps/acelite/ace/Countdown_Time_T.cpp | 65 - .../deps/acelite/ace/Countdown_Time_T.h | 101 - .../deps/acelite/ace/Countdown_Time_T.inl | 23 - modules/worldengine/deps/acelite/ace/DEV.cpp | 41 - modules/worldengine/deps/acelite/ace/DEV.h | 63 - modules/worldengine/deps/acelite/ace/DEV.inl | 15 - modules/worldengine/deps/acelite/ace/DEV_Addr.cpp | 102 - modules/worldengine/deps/acelite/ace/DEV_Addr.h | 88 - modules/worldengine/deps/acelite/ace/DEV_Addr.inl | 48 - .../worldengine/deps/acelite/ace/DEV_Connector.cpp | 45 - .../worldengine/deps/acelite/ace/DEV_Connector.h | 108 - .../worldengine/deps/acelite/ace/DEV_Connector.inl | 30 - modules/worldengine/deps/acelite/ace/DEV_IO.cpp | 129 - modules/worldengine/deps/acelite/ace/DEV_IO.h | 183 - modules/worldengine/deps/acelite/ace/DEV_IO.inl | 123 - modules/worldengine/deps/acelite/ace/DLL.cpp | 279 - modules/worldengine/deps/acelite/ace/DLL.h | 210 - .../worldengine/deps/acelite/ace/DLL_Manager.cpp | 833 - modules/worldengine/deps/acelite/ace/DLL_Manager.h | 306 - modules/worldengine/deps/acelite/ace/Date_Time.cpp | 8 - modules/worldengine/deps/acelite/ace/Date_Time.h | 122 - modules/worldengine/deps/acelite/ace/Date_Time.inl | 216 - .../deps/acelite/ace/Default_Constants.h | 588 - .../deps/acelite/ace/Dev_Poll_Reactor.cpp | 2578 -- .../deps/acelite/ace/Dev_Poll_Reactor.h | 1207 - .../deps/acelite/ace/Dev_Poll_Reactor.inl | 132 - modules/worldengine/deps/acelite/ace/Dirent.cpp | 5 - modules/worldengine/deps/acelite/ace/Dirent.h | 120 - modules/worldengine/deps/acelite/ace/Dirent.inl | 96 - .../deps/acelite/ace/Dirent_Selector.cpp | 53 - .../worldengine/deps/acelite/ace/Dirent_Selector.h | 73 - .../deps/acelite/ace/Dirent_Selector.inl | 16 - modules/worldengine/deps/acelite/ace/Dump.cpp | 139 - modules/worldengine/deps/acelite/ace/Dump.h | 168 - modules/worldengine/deps/acelite/ace/Dump_T.cpp | 45 - modules/worldengine/deps/acelite/ace/Dump_T.h | 81 - modules/worldengine/deps/acelite/ace/Dynamic.cpp | 30 - modules/worldengine/deps/acelite/ace/Dynamic.h | 73 - modules/worldengine/deps/acelite/ace/Dynamic.inl | 31 - .../deps/acelite/ace/Dynamic_Message_Strategy.cpp | 201 - .../deps/acelite/ace/Dynamic_Message_Strategy.h | 213 - .../deps/acelite/ace/Dynamic_Message_Strategy.inl | 72 - .../deps/acelite/ace/Dynamic_Service.cpp | 61 - .../worldengine/deps/acelite/ace/Dynamic_Service.h | 87 - .../deps/acelite/ace/Dynamic_Service.inl | 36 - .../deps/acelite/ace/Dynamic_Service_Base.cpp | 102 - .../deps/acelite/ace/Dynamic_Service_Base.h | 71 - .../acelite/ace/Dynamic_Service_Dependency.cpp | 45 - .../deps/acelite/ace/Dynamic_Service_Dependency.h | 68 - .../deps/acelite/ace/ETCL/ACE_ETCL.pc.in | 11 - .../deps/acelite/ace/ETCL/ACE_ETCL_Parser.pc.in | 11 - modules/worldengine/deps/acelite/ace/ETCL/ETCL.ll | 159 - modules/worldengine/deps/acelite/ace/ETCL/ETCL.mpc | 62 - modules/worldengine/deps/acelite/ace/ETCL/ETCL.yy | 269 - .../deps/acelite/ace/ETCL/ETCL_Constraint.cpp | 653 - .../deps/acelite/ace/ETCL/ETCL_Constraint.h | 414 - .../deps/acelite/ace/ETCL/ETCL_Constraint.inl | 349 - .../acelite/ace/ETCL/ETCL_Constraint_Visitor.cpp | 119 - .../acelite/ace/ETCL/ETCL_Constraint_Visitor.h | 69 - .../deps/acelite/ace/ETCL/ETCL_Interpreter.cpp | 111 - .../deps/acelite/ace/ETCL/ETCL_Interpreter.h | 115 - .../worldengine/deps/acelite/ace/ETCL/ETCL_l.cpp | 1875 - .../worldengine/deps/acelite/ace/ETCL/ETCL_y.cpp | 1286 - modules/worldengine/deps/acelite/ace/ETCL/ETCL_y.h | 44 - .../deps/acelite/ace/ETCL/ace_etcl_export.h | 39 - .../deps/acelite/ace/ETCL/etcl_parser_export.h | 39 - .../deps/acelite/ace/Encoding_Converter.cpp | 11 - .../deps/acelite/ace/Encoding_Converter.h | 68 - .../acelite/ace/Encoding_Converter_Factory.cpp | 73 - .../deps/acelite/ace/Encoding_Converter_Factory.h | 52 - .../worldengine/deps/acelite/ace/Env_Value_T.cpp | 10 - modules/worldengine/deps/acelite/ace/Env_Value_T.h | 159 - .../worldengine/deps/acelite/ace/Env_Value_T.inl | 58 - modules/worldengine/deps/acelite/ace/Event.cpp | 14 - modules/worldengine/deps/acelite/ace/Event.h | 115 - modules/worldengine/deps/acelite/ace/Event.inl | 4 - .../worldengine/deps/acelite/ace/Event_Base.cpp | 74 - modules/worldengine/deps/acelite/ace/Event_Base.h | 139 - .../worldengine/deps/acelite/ace/Event_Base.inl | 16 - .../worldengine/deps/acelite/ace/Event_Handler.cpp | 410 - .../worldengine/deps/acelite/ace/Event_Handler.h | 425 - .../worldengine/deps/acelite/ace/Event_Handler.inl | 9 - .../ace/Event_Handler_Handle_Timeout_Upcall.cpp | 97 - .../ace/Event_Handler_Handle_Timeout_Upcall.h | 101 - .../ace/Event_Handler_Handle_Timeout_Upcall.inl | 69 - .../deps/acelite/ace/Event_Handler_T.cpp | 118 - .../worldengine/deps/acelite/ace/Event_Handler_T.h | 186 - .../deps/acelite/ace/Event_Handler_T.inl | 132 - modules/worldengine/deps/acelite/ace/FIFO.cpp | 74 - modules/worldengine/deps/acelite/ace/FIFO.h | 97 - modules/worldengine/deps/acelite/ace/FIFO.inl | 22 - modules/worldengine/deps/acelite/ace/FIFO_Recv.cpp | 86 - modules/worldengine/deps/acelite/ace/FIFO_Recv.h | 94 - modules/worldengine/deps/acelite/ace/FIFO_Recv.inl | 21 - .../worldengine/deps/acelite/ace/FIFO_Recv_Msg.cpp | 63 - .../worldengine/deps/acelite/ace/FIFO_Recv_Msg.h | 136 - .../worldengine/deps/acelite/ace/FIFO_Recv_Msg.inl | 134 - modules/worldengine/deps/acelite/ace/FIFO_Send.cpp | 56 - modules/worldengine/deps/acelite/ace/FIFO_Send.h | 79 - modules/worldengine/deps/acelite/ace/FIFO_Send.inl | 21 - .../worldengine/deps/acelite/ace/FIFO_Send_Msg.cpp | 78 - .../worldengine/deps/acelite/ace/FIFO_Send_Msg.h | 89 - .../worldengine/deps/acelite/ace/FIFO_Send_Msg.inl | 50 - modules/worldengine/deps/acelite/ace/FILE.cpp | 145 - modules/worldengine/deps/acelite/ace/FILE.h | 124 - modules/worldengine/deps/acelite/ace/FILE.inl | 15 - modules/worldengine/deps/acelite/ace/FILE_Addr.cpp | 129 - modules/worldengine/deps/acelite/ace/FILE_Addr.h | 87 - modules/worldengine/deps/acelite/ace/FILE_Addr.inl | 31 - .../deps/acelite/ace/FILE_Connector.cpp | 82 - .../worldengine/deps/acelite/ace/FILE_Connector.h | 111 - .../deps/acelite/ace/FILE_Connector.inl | 32 - modules/worldengine/deps/acelite/ace/FILE_IO.cpp | 144 - modules/worldengine/deps/acelite/ace/FILE_IO.h | 168 - modules/worldengine/deps/acelite/ace/FILE_IO.inl | 149 - modules/worldengine/deps/acelite/ace/File_Lock.cpp | 70 - modules/worldengine/deps/acelite/ace/File_Lock.h | 168 - modules/worldengine/deps/acelite/ace/File_Lock.inl | 93 - modules/worldengine/deps/acelite/ace/Filecache.cpp | 741 - modules/worldengine/deps/acelite/ace/Filecache.h | 352 - .../deps/acelite/ace/FlReactor/ACE_FlReactor.pc.in | 11 - .../acelite/ace/FlReactor/ACE_FlReactor_export.h | 57 - .../deps/acelite/ace/FlReactor/FlReactor.cpp | 326 - .../deps/acelite/ace/FlReactor/FlReactor.h | 108 - .../deps/acelite/ace/FlReactor/ace_flreactor.mpc | 9 - .../worldengine/deps/acelite/ace/Flag_Manip.cpp | 89 - modules/worldengine/deps/acelite/ace/Flag_Manip.h | 56 - .../worldengine/deps/acelite/ace/Flag_Manip.inl | 23 - .../acelite/ace/FoxReactor/ACE_FoxReactor.pc.in | 11 - .../acelite/ace/FoxReactor/ACE_FoxReactor_export.h | 57 - .../deps/acelite/ace/FoxReactor/FoxReactor.cpp | 325 - .../deps/acelite/ace/FoxReactor/FoxReactor.h | 109 - .../deps/acelite/ace/FoxReactor/ace_foxreactor.mpc | 9 - .../deps/acelite/ace/Framework_Component.cpp | 274 - .../deps/acelite/ace/Framework_Component.h | 198 - .../deps/acelite/ace/Framework_Component.inl | 36 - .../deps/acelite/ace/Framework_Component_T.cpp | 31 - .../deps/acelite/ace/Framework_Component_T.h | 69 - modules/worldengine/deps/acelite/ace/Free_List.cpp | 161 - modules/worldengine/deps/acelite/ace/Free_List.h | 148 - modules/worldengine/deps/acelite/ace/Functor.cpp | 50 - modules/worldengine/deps/acelite/ace/Functor.h | 473 - modules/worldengine/deps/acelite/ace/Functor.inl | 245 - .../deps/acelite/ace/Functor_String.cpp | 7 - .../worldengine/deps/acelite/ace/Functor_String.h | 166 - .../deps/acelite/ace/Functor_String.inl | 73 - modules/worldengine/deps/acelite/ace/Functor_T.cpp | 47 - modules/worldengine/deps/acelite/ace/Functor_T.h | 191 - modules/worldengine/deps/acelite/ace/Functor_T.inl | 60 - modules/worldengine/deps/acelite/ace/Future.cpp | 430 - modules/worldengine/deps/acelite/ace/Future.h | 385 - .../worldengine/deps/acelite/ace/Future_Set.cpp | 134 - modules/worldengine/deps/acelite/ace/Future_Set.h | 141 - modules/worldengine/deps/acelite/ace/Get_Opt.cpp | 728 - modules/worldengine/deps/acelite/ace/Get_Opt.h | 492 - modules/worldengine/deps/acelite/ace/Get_Opt.inl | 94 - .../worldengine/deps/acelite/ace/Global_Macros.h | 1049 - modules/worldengine/deps/acelite/ace/Guard_T.cpp | 60 - modules/worldengine/deps/acelite/ace/Guard_T.h | 405 - modules/worldengine/deps/acelite/ace/Guard_T.inl | 169 - .../worldengine/deps/acelite/ace/Handle_Gobbler.h | 66 - .../deps/acelite/ace/Handle_Gobbler.inl | 76 - .../worldengine/deps/acelite/ace/Handle_Ops.cpp | 42 - modules/worldengine/deps/acelite/ace/Handle_Ops.h | 48 - .../worldengine/deps/acelite/ace/Handle_Set.cpp | 518 - modules/worldengine/deps/acelite/ace/Handle_Set.h | 237 - .../worldengine/deps/acelite/ace/Handle_Set.inl | 180 - .../deps/acelite/ace/Hash_Cache_Map_Manager_T.cpp | 224 - .../deps/acelite/ace/Hash_Cache_Map_Manager_T.h | 208 - .../deps/acelite/ace/Hash_Cache_Map_Manager_T.inl | 70 - .../deps/acelite/ace/Hash_Map_Manager.h | 29 - .../deps/acelite/ace/Hash_Map_Manager_T.cpp | 540 - .../deps/acelite/ace/Hash_Map_Manager_T.h | 1304 - .../deps/acelite/ace/Hash_Map_Manager_T.inl | 1243 - .../deps/acelite/ace/Hash_Map_With_Allocator_T.cpp | 33 - .../deps/acelite/ace/Hash_Map_With_Allocator_T.h | 110 - .../deps/acelite/ace/Hash_Map_With_Allocator_T.inl | 80 - .../deps/acelite/ace/Hash_Multi_Map_Manager_T.cpp | 599 - .../deps/acelite/ace/Hash_Multi_Map_Manager_T.h | 964 - .../deps/acelite/ace/Hash_Multi_Map_Manager_T.inl | 991 - modules/worldengine/deps/acelite/ace/Hashable.cpp | 28 - modules/worldengine/deps/acelite/ace/Hashable.h | 63 - modules/worldengine/deps/acelite/ace/Hashable.inl | 10 - .../deps/acelite/ace/High_Res_Timer.cpp | 527 - .../worldengine/deps/acelite/ace/High_Res_Timer.h | 307 - .../deps/acelite/ace/High_Res_Timer.inl | 165 - .../worldengine/deps/acelite/ace/ICMP_Socket.cpp | 179 - modules/worldengine/deps/acelite/ace/ICMP_Socket.h | 108 - modules/worldengine/deps/acelite/ace/INET_Addr.cpp | 1212 - modules/worldengine/deps/acelite/ace/INET_Addr.h | 418 - modules/worldengine/deps/acelite/ace/INET_Addr.inl | 252 - modules/worldengine/deps/acelite/ace/IOStream.cpp | 661 - modules/worldengine/deps/acelite/ace/IOStream.h | 502 - .../worldengine/deps/acelite/ace/IOStream_T.cpp | 245 - modules/worldengine/deps/acelite/ace/IOStream_T.h | 295 - .../worldengine/deps/acelite/ace/IOStream_T.inl | 120 - .../worldengine/deps/acelite/ace/IO_Cntl_Msg.cpp | 5 - modules/worldengine/deps/acelite/ace/IO_Cntl_Msg.h | 110 - .../worldengine/deps/acelite/ace/IO_Cntl_Msg.inl | 61 - modules/worldengine/deps/acelite/ace/IO_SAP.cpp | 131 - modules/worldengine/deps/acelite/ace/IO_SAP.h | 91 - modules/worldengine/deps/acelite/ace/IO_SAP.inl | 39 - modules/worldengine/deps/acelite/ace/IPC_SAP.cpp | 183 - modules/worldengine/deps/acelite/ace/IPC_SAP.h | 91 - modules/worldengine/deps/acelite/ace/IPC_SAP.inl | 37 - .../worldengine/deps/acelite/ace/If_Then_Else.h | 87 - modules/worldengine/deps/acelite/ace/Init_ACE.cpp | 40 - modules/worldengine/deps/acelite/ace/Init_ACE.h | 68 - .../deps/acelite/ace/Intrusive_Auto_Ptr.cpp | 20 - .../deps/acelite/ace/Intrusive_Auto_Ptr.h | 163 - .../deps/acelite/ace/Intrusive_Auto_Ptr.inl | 144 - .../deps/acelite/ace/Intrusive_List.cpp | 120 - .../worldengine/deps/acelite/ace/Intrusive_List.h | 137 - .../deps/acelite/ace/Intrusive_List.inl | 31 - .../deps/acelite/ace/Intrusive_List_Node.cpp | 25 - .../deps/acelite/ace/Intrusive_List_Node.h | 82 - .../deps/acelite/ace/Intrusive_List_Node.inl | 28 - .../deps/acelite/ace/LOCK_SOCK_Acceptor.cpp | 33 - .../deps/acelite/ace/LOCK_SOCK_Acceptor.h | 65 - modules/worldengine/deps/acelite/ace/LSOCK.cpp | 183 - modules/worldengine/deps/acelite/ace/LSOCK.h | 82 - modules/worldengine/deps/acelite/ace/LSOCK.inl | 40 - .../deps/acelite/ace/LSOCK_Acceptor.cpp | 141 - .../worldengine/deps/acelite/ace/LSOCK_Acceptor.h | 93 - .../worldengine/deps/acelite/ace/LSOCK_CODgram.cpp | 60 - .../worldengine/deps/acelite/ace/LSOCK_CODgram.h | 107 - .../worldengine/deps/acelite/ace/LSOCK_CODgram.inl | 27 - .../deps/acelite/ace/LSOCK_Connector.cpp | 57 - .../worldengine/deps/acelite/ace/LSOCK_Connector.h | 89 - .../deps/acelite/ace/LSOCK_Connector.inl | 24 - .../worldengine/deps/acelite/ace/LSOCK_Dgram.cpp | 69 - modules/worldengine/deps/acelite/ace/LSOCK_Dgram.h | 72 - .../worldengine/deps/acelite/ace/LSOCK_Dgram.inl | 19 - .../worldengine/deps/acelite/ace/LSOCK_Stream.cpp | 135 - .../worldengine/deps/acelite/ace/LSOCK_Stream.h | 80 - .../worldengine/deps/acelite/ace/LSOCK_Stream.inl | 22 - modules/worldengine/deps/acelite/ace/Lib_Find.cpp | 774 - modules/worldengine/deps/acelite/ace/Lib_Find.h | 129 - .../deps/acelite/ace/Local_Memory_Pool.cpp | 142 - .../deps/acelite/ace/Local_Memory_Pool.h | 131 - .../deps/acelite/ace/Local_Name_Space.cpp | 165 - .../deps/acelite/ace/Local_Name_Space.h | 130 - .../deps/acelite/ace/Local_Name_Space_T.cpp | 967 - .../deps/acelite/ace/Local_Name_Space_T.h | 265 - .../worldengine/deps/acelite/ace/Local_Tokens.cpp | 1617 - .../worldengine/deps/acelite/ace/Local_Tokens.h | 1119 - .../worldengine/deps/acelite/ace/Local_Tokens.inl | 272 - modules/worldengine/deps/acelite/ace/Lock.cpp | 86 - modules/worldengine/deps/acelite/ace/Lock.h | 159 - modules/worldengine/deps/acelite/ace/Lock.inl | 9 - .../deps/acelite/ace/Lock_Adapter_T.cpp | 104 - .../worldengine/deps/acelite/ace/Lock_Adapter_T.h | 121 - .../deps/acelite/ace/Lock_Adapter_T.inl | 25 - .../worldengine/deps/acelite/ace/Log_Category.cpp | 135 - .../worldengine/deps/acelite/ace/Log_Category.h | 275 - .../worldengine/deps/acelite/ace/Log_Category.inl | 156 - modules/worldengine/deps/acelite/ace/Log_Msg.cpp | 2623 -- modules/worldengine/deps/acelite/ace/Log_Msg.h | 750 - modules/worldengine/deps/acelite/ace/Log_Msg.inl | 226 - .../deps/acelite/ace/Log_Msg_Backend.cpp | 12 - .../worldengine/deps/acelite/ace/Log_Msg_Backend.h | 86 - .../deps/acelite/ace/Log_Msg_Callback.cpp | 13 - .../deps/acelite/ace/Log_Msg_Callback.h | 70 - .../worldengine/deps/acelite/ace/Log_Msg_IPC.cpp | 112 - modules/worldengine/deps/acelite/ace/Log_Msg_IPC.h | 79 - .../deps/acelite/ace/Log_Msg_NT_Event_Log.cpp | 168 - .../deps/acelite/ace/Log_Msg_NT_Event_Log.h | 70 - .../deps/acelite/ace/Log_Msg_UNIX_Syslog.cpp | 205 - .../deps/acelite/ace/Log_Msg_UNIX_Syslog.h | 75 - .../worldengine/deps/acelite/ace/Log_Priority.h | 83 - .../worldengine/deps/acelite/ace/Log_Record.cpp | 410 - modules/worldengine/deps/acelite/ace/Log_Record.h | 216 - .../worldengine/deps/acelite/ace/Log_Record.inl | 102 - .../deps/acelite/ace/Logging_Strategy.cpp | 608 - .../deps/acelite/ace/Logging_Strategy.h | 212 - .../worldengine/deps/acelite/ace/MEM_Acceptor.cpp | 265 - .../worldengine/deps/acelite/ace/MEM_Acceptor.h | 186 - .../worldengine/deps/acelite/ace/MEM_Acceptor.inl | 91 - modules/worldengine/deps/acelite/ace/MEM_Addr.cpp | 164 - modules/worldengine/deps/acelite/ace/MEM_Addr.h | 153 - modules/worldengine/deps/acelite/ace/MEM_Addr.inl | 108 - .../worldengine/deps/acelite/ace/MEM_Connector.cpp | 144 - .../worldengine/deps/acelite/ace/MEM_Connector.h | 173 - .../worldengine/deps/acelite/ace/MEM_Connector.inl | 18 - modules/worldengine/deps/acelite/ace/MEM_IO.cpp | 436 - modules/worldengine/deps/acelite/ace/MEM_IO.h | 308 - modules/worldengine/deps/acelite/ace/MEM_IO.inl | 244 - modules/worldengine/deps/acelite/ace/MEM_SAP.cpp | 95 - modules/worldengine/deps/acelite/ace/MEM_SAP.h | 162 - modules/worldengine/deps/acelite/ace/MEM_SAP.inl | 61 - .../worldengine/deps/acelite/ace/MEM_Stream.cpp | 45 - modules/worldengine/deps/acelite/ace/MEM_Stream.h | 117 - .../worldengine/deps/acelite/ace/MEM_Stream.inl | 73 - .../deps/acelite/ace/MMAP_Memory_Pool.cpp | 597 - .../deps/acelite/ace/MMAP_Memory_Pool.h | 345 - .../deps/acelite/ace/MMAP_Memory_Pool.inl | 18 - modules/worldengine/deps/acelite/ace/Malloc.cpp | 183 - modules/worldengine/deps/acelite/ace/Malloc.h | 394 - modules/worldengine/deps/acelite/ace/Malloc.inl | 23 - .../deps/acelite/ace/Malloc_Allocator.cpp | 357 - .../deps/acelite/ace/Malloc_Allocator.h | 144 - .../deps/acelite/ace/Malloc_Allocator.inl | 13 - modules/worldengine/deps/acelite/ace/Malloc_Base.h | 166 - modules/worldengine/deps/acelite/ace/Malloc_T.cpp | 1257 - modules/worldengine/deps/acelite/ace/Malloc_T.h | 890 - modules/worldengine/deps/acelite/ace/Malloc_T.inl | 154 - .../deps/acelite/ace/Managed_Object.cpp | 23 - .../worldengine/deps/acelite/ace/Managed_Object.h | 166 - .../deps/acelite/ace/Managed_Object.inl | 20 - .../worldengine/deps/acelite/ace/Manual_Event.cpp | 11 - .../worldengine/deps/acelite/ace/Manual_Event.h | 125 - .../worldengine/deps/acelite/ace/Manual_Event.inl | 4 - .../worldengine/deps/acelite/ace/Map_Manager.cpp | 667 - modules/worldengine/deps/acelite/ace/Map_Manager.h | 716 - .../worldengine/deps/acelite/ace/Map_Manager.inl | 753 - modules/worldengine/deps/acelite/ace/Map_T.cpp | 1341 - modules/worldengine/deps/acelite/ace/Map_T.h | 1608 - modules/worldengine/deps/acelite/ace/Map_T.inl | 412 - modules/worldengine/deps/acelite/ace/Mem_Map.cpp | 333 - modules/worldengine/deps/acelite/ace/Mem_Map.h | 230 - modules/worldengine/deps/acelite/ace/Mem_Map.inl | 235 - modules/worldengine/deps/acelite/ace/Memory_Pool.h | 29 - .../worldengine/deps/acelite/ace/Message_Block.cpp | 1300 - .../worldengine/deps/acelite/ace/Message_Block.h | 869 - .../worldengine/deps/acelite/ace/Message_Block.inl | 505 - .../deps/acelite/ace/Message_Block_T.cpp | 52 - .../worldengine/deps/acelite/ace/Message_Block_T.h | 86 - .../deps/acelite/ace/Message_Block_T.inl | 28 - .../worldengine/deps/acelite/ace/Message_Queue.cpp | 22 - .../worldengine/deps/acelite/ace/Message_Queue.h | 226 - .../worldengine/deps/acelite/ace/Message_Queue.inl | 9 - .../deps/acelite/ace/Message_Queue_NT.cpp | 234 - .../deps/acelite/ace/Message_Queue_NT.h | 229 - .../deps/acelite/ace/Message_Queue_NT.inl | 128 - .../deps/acelite/ace/Message_Queue_T.cpp | 3024 -- .../worldengine/deps/acelite/ace/Message_Queue_T.h | 1591 - .../deps/acelite/ace/Message_Queue_Vx.cpp | 354 - .../deps/acelite/ace/Message_Queue_Vx.h | 224 - .../deps/acelite/ace/Message_Queue_Vx.inl | 26 - .../deps/acelite/ace/Method_Request.cpp | 26 - .../worldengine/deps/acelite/ace/Method_Request.h | 98 - .../worldengine/deps/acelite/ace/Metrics_Cache.h | 138 - .../deps/acelite/ace/Metrics_Cache_T.cpp | 232 - .../worldengine/deps/acelite/ace/Metrics_Cache_T.h | 241 - .../deps/acelite/ace/Metrics_Cache_T.inl | 241 - modules/worldengine/deps/acelite/ace/Min_Max.h | 67 - modules/worldengine/deps/acelite/ace/Module.cpp | 274 - modules/worldengine/deps/acelite/ace/Module.h | 213 - modules/worldengine/deps/acelite/ace/Module.inl | 62 - .../worldengine/deps/acelite/ace/Monitor_Admin.cpp | 111 - .../worldengine/deps/acelite/ace/Monitor_Admin.h | 107 - .../deps/acelite/ace/Monitor_Admin_Manager.cpp | 40 - .../deps/acelite/ace/Monitor_Admin_Manager.h | 68 - .../worldengine/deps/acelite/ace/Monitor_Base.cpp | 400 - .../worldengine/deps/acelite/ace/Monitor_Base.h | 150 - .../worldengine/deps/acelite/ace/Monitor_Base.inl | 57 - .../ace/Monitor_Control/Auto_Update_Starter.cpp | 37 - .../ace/Monitor_Control/Auto_Update_Starter.h | 61 - .../BSD_Network_Interface_Monitor.cpp | 134 - .../BSD_Network_Interface_Monitor.h | 68 - .../ace/Monitor_Control/Bytes_Received_Monitor.cpp | 58 - .../ace/Monitor_Control/Bytes_Received_Monitor.h | 92 - .../ace/Monitor_Control/Bytes_Sent_Monitor.cpp | 58 - .../ace/Monitor_Control/Bytes_Sent_Monitor.h | 92 - .../ace/Monitor_Control/CPU_Load_Monitor.cpp | 252 - .../acelite/ace/Monitor_Control/CPU_Load_Monitor.h | 104 - .../ace/Monitor_Control/Constraint_Interpreter.cpp | 60 - .../ace/Monitor_Control/Constraint_Interpreter.h | 72 - .../ace/Monitor_Control/Constraint_Visitor.cpp | 302 - .../ace/Monitor_Control/Constraint_Visitor.h | 84 - .../FreeBSD_Network_Interface_Monitor.cpp | 122 - .../FreeBSD_Network_Interface_Monitor.h | 68 - .../Linux_Network_Interface_Monitor.cpp | 122 - .../Linux_Network_Interface_Monitor.h | 74 - .../ace/Monitor_Control/Memory_Usage_Monitor.cpp | 76 - .../ace/Monitor_Control/Memory_Usage_Monitor.h | 78 - .../acelite/ace/Monitor_Control/Monitor_Control.h | 44 - .../ace/Monitor_Control/Monitor_Control.mpc | 47 - .../ace/Monitor_Control/Monitor_Control.vsd | Bin 393216 -> 0 bytes .../ace/Monitor_Control/Monitor_Control_export.h | 47 - .../ace/Monitor_Control/Monitor_Control_utils.h | 90 - .../acelite/ace/Monitor_Control/Monitor_Group.cpp | 65 - .../acelite/ace/Monitor_Control/Monitor_Group.h | 70 - .../acelite/ace/Monitor_Control/Monitor_Query.cpp | 84 - .../acelite/ace/Monitor_Control/Monitor_Query.h | 76 - .../Null_Network_Interface_Monitor.cpp | 28 - .../Null_Network_Interface_Monitor.h | 59 - .../ace/Monitor_Control/Num_Threads_Monitor.cpp | 94 - .../ace/Monitor_Control/Num_Threads_Monitor.h | 86 - .../Monitor_Control/Packets_Received_Monitor.cpp | 58 - .../ace/Monitor_Control/Packets_Received_Monitor.h | 92 - .../ace/Monitor_Control/Packets_Sent_Monitor.cpp | 58 - .../ace/Monitor_Control/Packets_Sent_Monitor.h | 92 - .../Solaris_Network_Interface_Monitor.cpp | 221 - .../Solaris_Network_Interface_Monitor.h | 89 - .../ace/Monitor_Control/Windows_Monitor.cpp | 74 - .../acelite/ace/Monitor_Control/Windows_Monitor.h | 76 - .../Windows_Multi_Instance_Monitor.cpp | 108 - .../Windows_Multi_Instance_Monitor.h | 73 - .../deps/acelite/ace/Monitor_Control_Action.cpp | 43 - .../deps/acelite/ace/Monitor_Control_Action.h | 63 - .../deps/acelite/ace/Monitor_Control_Types.cpp | 79 - .../deps/acelite/ace/Monitor_Control_Types.h | 114 - .../deps/acelite/ace/Monitor_Point_Registry.cpp | 170 - .../deps/acelite/ace/Monitor_Point_Registry.h | 98 - .../worldengine/deps/acelite/ace/Monitor_Size.cpp | 45 - .../worldengine/deps/acelite/ace/Monitor_Size.h | 62 - .../deps/acelite/ace/Monotonic_Time_Policy.cpp | 5 - .../deps/acelite/ace/Monotonic_Time_Policy.h | 48 - .../deps/acelite/ace/Monotonic_Time_Policy.inl | 29 - .../deps/acelite/ace/Msg_WFMO_Reactor.cpp | 83 - .../deps/acelite/ace/Msg_WFMO_Reactor.h | 118 - .../deps/acelite/ace/Msg_WFMO_Reactor.inl | 32 - .../deps/acelite/ace/Multihomed_INET_Addr.cpp | 331 - .../deps/acelite/ace/Multihomed_INET_Addr.h | 195 - .../deps/acelite/ace/Multihomed_INET_Addr.inl | 12 - modules/worldengine/deps/acelite/ace/Mutex.cpp | 120 - modules/worldengine/deps/acelite/ace/Mutex.h | 191 - modules/worldengine/deps/acelite/ace/Mutex.inl | 183 - .../worldengine/deps/acelite/ace/NT_Service.cpp | 616 - modules/worldengine/deps/acelite/ace/NT_Service.h | 438 - .../worldengine/deps/acelite/ace/NT_Service.inl | 82 - .../worldengine/deps/acelite/ace/Name_Proxy.cpp | 207 - modules/worldengine/deps/acelite/ace/Name_Proxy.h | 98 - .../deps/acelite/ace/Name_Request_Reply.cpp | 574 - .../deps/acelite/ace/Name_Request_Reply.h | 263 - .../worldengine/deps/acelite/ace/Name_Space.cpp | 73 - modules/worldengine/deps/acelite/ace/Name_Space.h | 163 - .../deps/acelite/ace/Naming_Context.cpp | 649 - .../worldengine/deps/acelite/ace/Naming_Context.h | 384 - .../deps/acelite/ace/Naming_Context.inl | 42 - .../worldengine/deps/acelite/ace/Netlink_Addr.cpp | 64 - .../worldengine/deps/acelite/ace/Netlink_Addr.h | 116 - .../worldengine/deps/acelite/ace/Netlink_Addr.inl | 49 - modules/worldengine/deps/acelite/ace/Node.cpp | 44 - modules/worldengine/deps/acelite/ace/Node.h | 83 - .../deps/acelite/ace/Notification_Queue.cpp | 223 - .../deps/acelite/ace/Notification_Queue.h | 155 - .../deps/acelite/ace/Notification_Queue.inl | 44 - .../deps/acelite/ace/Notification_Strategy.cpp | 20 - .../deps/acelite/ace/Notification_Strategy.h | 73 - .../deps/acelite/ace/Notification_Strategy.inl | 29 - .../worldengine/deps/acelite/ace/Null_Barrier.h | 54 - .../worldengine/deps/acelite/ace/Null_Condition.h | 91 - modules/worldengine/deps/acelite/ace/Null_Mutex.h | 196 - .../worldengine/deps/acelite/ace/Null_Semaphore.h | 101 - .../worldengine/deps/acelite/ace/Numeric_Limits.h | 250 - modules/worldengine/deps/acelite/ace/OS.h | 104 - modules/worldengine/deps/acelite/ace/OS_Errno.cpp | 43 - modules/worldengine/deps/acelite/ace/OS_Errno.h | 98 - modules/worldengine/deps/acelite/ace/OS_Errno.inl | 64 - .../deps/acelite/ace/OS_Log_Msg_Attributes.cpp | 7 - .../deps/acelite/ace/OS_Log_Msg_Attributes.h | 89 - .../deps/acelite/ace/OS_Log_Msg_Attributes.inl | 19 - modules/worldengine/deps/acelite/ace/OS_Memory.h | 338 - .../worldengine/deps/acelite/ace/OS_NS_Thread.cpp | 5433 --- .../worldengine/deps/acelite/ace/OS_NS_Thread.h | 2067 -- .../worldengine/deps/acelite/ace/OS_NS_Thread.inl | 3908 --- .../deps/acelite/ace/OS_NS_arpa_inet.cpp | 49 - .../worldengine/deps/acelite/ace/OS_NS_arpa_inet.h | 72 - .../deps/acelite/ace/OS_NS_arpa_inet.inl | 94 - .../worldengine/deps/acelite/ace/OS_NS_ctype.cpp | 7 - modules/worldengine/deps/acelite/ace/OS_NS_ctype.h | 144 - .../worldengine/deps/acelite/ace/OS_NS_ctype.inl | 228 - .../worldengine/deps/acelite/ace/OS_NS_dirent.cpp | 272 - .../worldengine/deps/acelite/ace/OS_NS_dirent.h | 150 - .../worldengine/deps/acelite/ace/OS_NS_dirent.inl | 181 - .../worldengine/deps/acelite/ace/OS_NS_dlfcn.cpp | 8 - modules/worldengine/deps/acelite/ace/OS_NS_dlfcn.h | 67 - .../worldengine/deps/acelite/ace/OS_NS_dlfcn.inl | 285 - .../worldengine/deps/acelite/ace/OS_NS_errno.cpp | 7 - modules/worldengine/deps/acelite/ace/OS_NS_errno.h | 102 - .../worldengine/deps/acelite/ace/OS_NS_errno.inl | 80 - .../worldengine/deps/acelite/ace/OS_NS_fcntl.cpp | 241 - modules/worldengine/deps/acelite/ace/OS_NS_fcntl.h | 77 - .../worldengine/deps/acelite/ace/OS_NS_fcntl.inl | 20 - .../worldengine/deps/acelite/ace/OS_NS_macros.h | 112 - .../worldengine/deps/acelite/ace/OS_NS_math.cpp | 6 - modules/worldengine/deps/acelite/ace/OS_NS_math.h | 140 - .../worldengine/deps/acelite/ace/OS_NS_math.inl | 14 - .../worldengine/deps/acelite/ace/OS_NS_netdb.cpp | 381 - modules/worldengine/deps/acelite/ace/OS_NS_netdb.h | 128 - .../worldengine/deps/acelite/ace/OS_NS_netdb.inl | 736 - .../worldengine/deps/acelite/ace/OS_NS_poll.cpp | 6 - modules/worldengine/deps/acelite/ace/OS_NS_poll.h | 64 - .../worldengine/deps/acelite/ace/OS_NS_poll.inl | 42 - modules/worldengine/deps/acelite/ace/OS_NS_pwd.cpp | 6 - modules/worldengine/deps/acelite/ace/OS_NS_pwd.h | 74 - modules/worldengine/deps/acelite/ace/OS_NS_pwd.inl | 80 - .../worldengine/deps/acelite/ace/OS_NS_regex.cpp | 6 - modules/worldengine/deps/acelite/ace/OS_NS_regex.h | 63 - .../worldengine/deps/acelite/ace/OS_NS_regex.inl | 36 - .../worldengine/deps/acelite/ace/OS_NS_signal.cpp | 12 - .../worldengine/deps/acelite/ace/OS_NS_signal.h | 226 - .../worldengine/deps/acelite/ace/OS_NS_signal.inl | 248 - .../worldengine/deps/acelite/ace/OS_NS_stdio.cpp | 424 - modules/worldengine/deps/acelite/ace/OS_NS_stdio.h | 563 - .../worldengine/deps/acelite/ace/OS_NS_stdio.inl | 1200 - .../worldengine/deps/acelite/ace/OS_NS_stdlib.cpp | 1198 - .../worldengine/deps/acelite/ace/OS_NS_stdlib.h | 448 - .../worldengine/deps/acelite/ace/OS_NS_stdlib.inl | 624 - .../worldengine/deps/acelite/ace/OS_NS_string.cpp | 415 - .../worldengine/deps/acelite/ace/OS_NS_string.h | 475 - .../worldengine/deps/acelite/ace/OS_NS_string.inl | 552 - .../worldengine/deps/acelite/ace/OS_NS_strings.cpp | 82 - .../worldengine/deps/acelite/ace/OS_NS_strings.h | 84 - .../worldengine/deps/acelite/ace/OS_NS_strings.inl | 56 - .../worldengine/deps/acelite/ace/OS_NS_stropts.cpp | 191 - .../worldengine/deps/acelite/ace/OS_NS_stropts.h | 168 - .../worldengine/deps/acelite/ace/OS_NS_stropts.inl | 198 - .../deps/acelite/ace/OS_NS_sys_mman.cpp | 6 - .../worldengine/deps/acelite/ace/OS_NS_sys_mman.h | 95 - .../deps/acelite/ace/OS_NS_sys_mman.inl | 305 - .../worldengine/deps/acelite/ace/OS_NS_sys_msg.cpp | 6 - .../worldengine/deps/acelite/ace/OS_NS_sys_msg.h | 75 - .../worldengine/deps/acelite/ace/OS_NS_sys_msg.inl | 75 - .../deps/acelite/ace/OS_NS_sys_resource.cpp | 6 - .../deps/acelite/ace/OS_NS_sys_resource.h | 65 - .../deps/acelite/ace/OS_NS_sys_resource.inl | 95 - .../deps/acelite/ace/OS_NS_sys_select.cpp | 6 - .../deps/acelite/ace/OS_NS_sys_select.h | 75 - .../deps/acelite/ace/OS_NS_sys_select.inl | 71 - .../deps/acelite/ace/OS_NS_sys_sendfile.cpp | 51 - .../deps/acelite/ace/OS_NS_sys_sendfile.h | 64 - .../deps/acelite/ace/OS_NS_sys_sendfile.inl | 21 - .../worldengine/deps/acelite/ace/OS_NS_sys_shm.cpp | 6 - .../worldengine/deps/acelite/ace/OS_NS_sys_shm.h | 70 - .../worldengine/deps/acelite/ace/OS_NS_sys_shm.inl | 73 - .../deps/acelite/ace/OS_NS_sys_socket.cpp | 276 - .../deps/acelite/ace/OS_NS_sys_socket.h | 308 - .../deps/acelite/ace/OS_NS_sys_socket.inl | 1001 - .../deps/acelite/ace/OS_NS_sys_stat.cpp | 6 - .../worldengine/deps/acelite/ace/OS_NS_sys_stat.h | 147 - .../deps/acelite/ace/OS_NS_sys_stat.inl | 298 - .../deps/acelite/ace/OS_NS_sys_time.cpp | 6 - .../worldengine/deps/acelite/ace/OS_NS_sys_time.h | 53 - .../deps/acelite/ace/OS_NS_sys_time.inl | 72 - .../worldengine/deps/acelite/ace/OS_NS_sys_uio.cpp | 126 - .../worldengine/deps/acelite/ace/OS_NS_sys_uio.h | 78 - .../worldengine/deps/acelite/ace/OS_NS_sys_uio.inl | 52 - .../deps/acelite/ace/OS_NS_sys_utsname.cpp | 235 - .../deps/acelite/ace/OS_NS_sys_utsname.h | 69 - .../deps/acelite/ace/OS_NS_sys_wait.cpp | 5 - .../worldengine/deps/acelite/ace/OS_NS_sys_wait.h | 85 - .../deps/acelite/ace/OS_NS_sys_wait.inl | 96 - .../worldengine/deps/acelite/ace/OS_NS_time.cpp | 600 - modules/worldengine/deps/acelite/ace/OS_NS_time.h | 300 - .../worldengine/deps/acelite/ace/OS_NS_time.inl | 493 - .../worldengine/deps/acelite/ace/OS_NS_unistd.cpp | 920 - .../worldengine/deps/acelite/ace/OS_NS_unistd.h | 373 - .../worldengine/deps/acelite/ace/OS_NS_unistd.inl | 1232 - .../worldengine/deps/acelite/ace/OS_NS_wchar.cpp | 373 - modules/worldengine/deps/acelite/ace/OS_NS_wchar.h | 197 - .../worldengine/deps/acelite/ace/OS_NS_wchar.inl | 84 - .../worldengine/deps/acelite/ace/OS_NS_wctype.cpp | 7 - .../worldengine/deps/acelite/ace/OS_NS_wctype.h | 69 - .../worldengine/deps/acelite/ace/OS_NS_wctype.inl | 22 - modules/worldengine/deps/acelite/ace/OS_QoS.cpp | 476 - modules/worldengine/deps/acelite/ace/OS_QoS.h | 447 - modules/worldengine/deps/acelite/ace/OS_TLI.cpp | 7 - modules/worldengine/deps/acelite/ace/OS_TLI.h | 276 - modules/worldengine/deps/acelite/ace/OS_TLI.inl | 387 - .../deps/acelite/ace/OS_Thread_Adapter.cpp | 164 - .../deps/acelite/ace/OS_Thread_Adapter.h | 70 - modules/worldengine/deps/acelite/ace/OS_main.cpp | 153 - modules/worldengine/deps/acelite/ace/OS_main.h | 308 - modules/worldengine/deps/acelite/ace/Obchunk.cpp | 32 - modules/worldengine/deps/acelite/ace/Obchunk.h | 74 - modules/worldengine/deps/acelite/ace/Obchunk.inl | 9 - .../deps/acelite/ace/Object_Manager.cpp | 966 - .../worldengine/deps/acelite/ace/Object_Manager.h | 473 - .../deps/acelite/ace/Object_Manager.inl | 48 - .../deps/acelite/ace/Object_Manager_Base.cpp | 498 - .../deps/acelite/ace/Object_Manager_Base.h | 246 - modules/worldengine/deps/acelite/ace/Obstack.cpp | 8 - modules/worldengine/deps/acelite/ace/Obstack.h | 29 - modules/worldengine/deps/acelite/ace/Obstack_T.cpp | 224 - modules/worldengine/deps/acelite/ace/Obstack_T.h | 127 - modules/worldengine/deps/acelite/ace/Obstack_T.inl | 10 - modules/worldengine/deps/acelite/ace/PI_Malloc.cpp | 161 - modules/worldengine/deps/acelite/ace/PI_Malloc.h | 211 - modules/worldengine/deps/acelite/ace/PI_Malloc.inl | 30 - .../deps/acelite/ace/POSIX_Asynch_IO.cpp | 2414 -- .../worldengine/deps/acelite/ace/POSIX_Asynch_IO.h | 1290 - .../deps/acelite/ace/POSIX_CB_Proactor.cpp | 174 - .../deps/acelite/ace/POSIX_CB_Proactor.h | 95 - .../deps/acelite/ace/POSIX_Proactor.cpp | 2034 -- .../worldengine/deps/acelite/ace/POSIX_Proactor.h | 657 - .../deps/acelite/ace/POSIX_Proactor.inl | 10 - .../deps/acelite/ace/Pagefile_Memory_Pool.cpp | 387 - .../deps/acelite/ace/Pagefile_Memory_Pool.h | 202 - .../deps/acelite/ace/Pagefile_Memory_Pool.inl | 51 - modules/worldengine/deps/acelite/ace/Pair_T.cpp | 14 - modules/worldengine/deps/acelite/ace/Pair_T.h | 78 - modules/worldengine/deps/acelite/ace/Pair_T.inl | 31 - .../worldengine/deps/acelite/ace/Parse_Node.cpp | 925 - modules/worldengine/deps/acelite/ace/Parse_Node.h | 521 - .../worldengine/deps/acelite/ace/Ping_Socket.cpp | 368 - modules/worldengine/deps/acelite/ace/Ping_Socket.h | 116 - .../worldengine/deps/acelite/ace/Ping_Socket.inl | 10 - modules/worldengine/deps/acelite/ace/Pipe.cpp | 362 - modules/worldengine/deps/acelite/ace/Pipe.h | 166 - modules/worldengine/deps/acelite/ace/Pipe.inl | 200 - .../acelite/ace/PrecompiledHeaders/WinAcePCH.cpp | 3 - .../acelite/ace/PrecompiledHeaders/WinAcePCH.h | 17 - .../deps/acelite/ace/Priority_Reactor.cpp | 186 - .../deps/acelite/ace/Priority_Reactor.h | 98 - modules/worldengine/deps/acelite/ace/Proactor.cpp | 1173 - modules/worldengine/deps/acelite/ace/Proactor.h | 677 - modules/worldengine/deps/acelite/ace/Proactor.inl | 77 - .../worldengine/deps/acelite/ace/Proactor_Impl.cpp | 15 - .../worldengine/deps/acelite/ace/Proactor_Impl.h | 263 - modules/worldengine/deps/acelite/ace/Process.cpp | 1425 - modules/worldengine/deps/acelite/ace/Process.h | 678 - modules/worldengine/deps/acelite/ace/Process.inl | 417 - .../deps/acelite/ace/Process_Manager.cpp | 1019 - .../worldengine/deps/acelite/ace/Process_Manager.h | 474 - .../deps/acelite/ace/Process_Manager.inl | 10 - .../worldengine/deps/acelite/ace/Process_Mutex.cpp | 88 - .../worldengine/deps/acelite/ace/Process_Mutex.h | 231 - .../worldengine/deps/acelite/ace/Process_Mutex.inl | 115 - .../deps/acelite/ace/Process_Semaphore.cpp | 109 - .../deps/acelite/ace/Process_Semaphore.h | 157 - .../deps/acelite/ace/Process_Semaphore.inl | 63 - .../worldengine/deps/acelite/ace/Profile_Timer.cpp | 437 - .../worldengine/deps/acelite/ace/Profile_Timer.h | 137 - .../worldengine/deps/acelite/ace/Profile_Timer.inl | 126 - .../worldengine/deps/acelite/ace/QoS/ACE_QoS.pc.in | 11 - .../deps/acelite/ace/QoS/ACE_QoS_Export.h | 45 - .../deps/acelite/ace/QoS/QoS_Decorator.cpp | 161 - .../deps/acelite/ace/QoS/QoS_Decorator.h | 177 - .../deps/acelite/ace/QoS/QoS_Manager.cpp | 37 - .../worldengine/deps/acelite/ace/QoS/QoS_Manager.h | 72 - .../worldengine/deps/acelite/ace/QoS/QoS_Session.h | 181 - .../deps/acelite/ace/QoS/QoS_Session_Factory.cpp | 101 - .../deps/acelite/ace/QoS/QoS_Session_Factory.h | 94 - .../deps/acelite/ace/QoS/QoS_Session_Impl.cpp | 714 - .../deps/acelite/ace/QoS/QoS_Session_Impl.h | 263 - .../deps/acelite/ace/QoS/QoS_Session_Impl.inl | 226 - modules/worldengine/deps/acelite/ace/QoS/README | 55 - .../deps/acelite/ace/QoS/SOCK_Dgram_Mcast_QoS.cpp | 252 - .../deps/acelite/ace/QoS/SOCK_Dgram_Mcast_QoS.h | 140 - .../deps/acelite/ace/QoS/SOCK_Dgram_Mcast_QoS.inl | 54 - modules/worldengine/deps/acelite/ace/QoS/qos.mpc | 19 - .../deps/acelite/ace/QtReactor/.gitignore | 1 - .../deps/acelite/ace/QtReactor/ACE_QtReactor.pc.in | 11 - .../acelite/ace/QtReactor/ACE_QtReactor_export.h | 57 - .../deps/acelite/ace/QtReactor/QtReactor.cpp | 642 - .../deps/acelite/ace/QtReactor/QtReactor.h | 224 - .../deps/acelite/ace/QtReactor/ace_qt4reactor.mpc | 29 - modules/worldengine/deps/acelite/ace/RB_Tree.cpp | 1247 - modules/worldengine/deps/acelite/ace/RB_Tree.h | 902 - modules/worldengine/deps/acelite/ace/RB_Tree.inl | 1158 - modules/worldengine/deps/acelite/ace/README | 1760 - modules/worldengine/deps/acelite/ace/RW_Mutex.cpp | 53 - modules/worldengine/deps/acelite/ace/RW_Mutex.h | 139 - modules/worldengine/deps/acelite/ace/RW_Mutex.inl | 80 - .../deps/acelite/ace/RW_Process_Mutex.cpp | 52 - .../deps/acelite/ace/RW_Process_Mutex.h | 135 - .../deps/acelite/ace/RW_Process_Mutex.inl | 74 - .../deps/acelite/ace/RW_Thread_Mutex.cpp | 43 - .../worldengine/deps/acelite/ace/RW_Thread_Mutex.h | 72 - .../deps/acelite/ace/RW_Thread_Mutex.inl | 16 - modules/worldengine/deps/acelite/ace/Reactor.cpp | 508 - modules/worldengine/deps/acelite/ace/Reactor.h | 889 - modules/worldengine/deps/acelite/ace/Reactor.inl | 495 - .../worldengine/deps/acelite/ace/Reactor_Impl.cpp | 9 - .../worldengine/deps/acelite/ace/Reactor_Impl.h | 567 - .../acelite/ace/Reactor_Notification_Strategy.cpp | 36 - .../acelite/ace/Reactor_Notification_Strategy.h | 64 - .../acelite/ace/Reactor_Notification_Strategy.inl | 16 - .../deps/acelite/ace/Reactor_Timer_Interface.cpp | 9 - .../deps/acelite/ace/Reactor_Timer_Interface.h | 58 - .../deps/acelite/ace/Reactor_Token_T.cpp | 78 - .../worldengine/deps/acelite/ace/Reactor_Token_T.h | 91 - .../worldengine/deps/acelite/ace/Read_Buffer.cpp | 175 - modules/worldengine/deps/acelite/ace/Read_Buffer.h | 127 - .../worldengine/deps/acelite/ace/Read_Buffer.inl | 29 - .../deps/acelite/ace/Recursive_Thread_Mutex.cpp | 117 - .../deps/acelite/ace/Recursive_Thread_Mutex.h | 192 - .../deps/acelite/ace/Recursive_Thread_Mutex.inl | 92 - .../worldengine/deps/acelite/ace/Recyclable.cpp | 21 - modules/worldengine/deps/acelite/ace/Recyclable.h | 75 - .../worldengine/deps/acelite/ace/Recyclable.inl | 18 - .../deps/acelite/ace/Refcountable_T.cpp | 19 - .../worldengine/deps/acelite/ace/Refcountable_T.h | 66 - .../deps/acelite/ace/Refcountable_T.inl | 33 - .../deps/acelite/ace/Refcounted_Auto_Ptr.cpp | 16 - .../deps/acelite/ace/Refcounted_Auto_Ptr.h | 197 - .../deps/acelite/ace/Refcounted_Auto_Ptr.inl | 187 - modules/worldengine/deps/acelite/ace/Registry.cpp | 1123 - modules/worldengine/deps/acelite/ace/Registry.h | 560 - .../deps/acelite/ace/Registry_Name_Space.cpp | 294 - .../deps/acelite/ace/Registry_Name_Space.h | 138 - .../deps/acelite/ace/Remote_Name_Space.cpp | 376 - .../deps/acelite/ace/Remote_Name_Space.h | 145 - .../worldengine/deps/acelite/ace/Remote_Tokens.cpp | 523 - .../worldengine/deps/acelite/ace/Remote_Tokens.h | 319 - .../worldengine/deps/acelite/ace/Remote_Tokens.inl | 45 - .../deps/acelite/ace/Reverse_Lock_T.cpp | 91 - .../worldengine/deps/acelite/ace/Reverse_Lock_T.h | 137 - .../deps/acelite/ace/Reverse_Lock_T.inl | 16 - modules/worldengine/deps/acelite/ace/Rtems_init.c | 216 - modules/worldengine/deps/acelite/ace/SOCK.cpp | 183 - modules/worldengine/deps/acelite/ace/SOCK.h | 135 - modules/worldengine/deps/acelite/ace/SOCK.inl | 36 - .../worldengine/deps/acelite/ace/SOCK_Acceptor.cpp | 417 - .../worldengine/deps/acelite/ace/SOCK_Acceptor.h | 176 - .../worldengine/deps/acelite/ace/SOCK_Acceptor.inl | 10 - .../worldengine/deps/acelite/ace/SOCK_CODgram.cpp | 147 - .../worldengine/deps/acelite/ace/SOCK_CODgram.h | 141 - .../worldengine/deps/acelite/ace/SOCK_CODgram.inl | 16 - .../deps/acelite/ace/SOCK_Connector.cpp | 350 - .../worldengine/deps/acelite/ace/SOCK_Connector.h | 318 - .../deps/acelite/ace/SOCK_Connector.inl | 35 - .../worldengine/deps/acelite/ace/SOCK_Dgram.cpp | 689 - modules/worldengine/deps/acelite/ace/SOCK_Dgram.h | 236 - .../worldengine/deps/acelite/ace/SOCK_Dgram.inl | 164 - .../deps/acelite/ace/SOCK_Dgram_Bcast.cpp | 369 - .../deps/acelite/ace/SOCK_Dgram_Bcast.h | 138 - .../deps/acelite/ace/SOCK_Dgram_Bcast.inl | 34 - .../deps/acelite/ace/SOCK_Dgram_Mcast.cpp | 927 - .../deps/acelite/ace/SOCK_Dgram_Mcast.h | 410 - .../deps/acelite/ace/SOCK_Dgram_Mcast.inl | 61 - modules/worldengine/deps/acelite/ace/SOCK_IO.cpp | 151 - modules/worldengine/deps/acelite/ace/SOCK_IO.h | 134 - modules/worldengine/deps/acelite/ace/SOCK_IO.inl | 120 - .../worldengine/deps/acelite/ace/SOCK_Netlink.cpp | 111 - .../worldengine/deps/acelite/ace/SOCK_Netlink.h | 102 - .../worldengine/deps/acelite/ace/SOCK_Netlink.inl | 35 - .../deps/acelite/ace/SOCK_SEQPACK_Acceptor.cpp | 594 - .../deps/acelite/ace/SOCK_SEQPACK_Acceptor.h | 187 - .../deps/acelite/ace/SOCK_SEQPACK_Acceptor.inl | 10 - .../deps/acelite/ace/SOCK_SEQPACK_Association.cpp | 346 - .../deps/acelite/ace/SOCK_SEQPACK_Association.h | 199 - .../deps/acelite/ace/SOCK_SEQPACK_Association.inl | 174 - .../deps/acelite/ace/SOCK_SEQPACK_Connector.cpp | 440 - .../deps/acelite/ace/SOCK_SEQPACK_Connector.h | 328 - .../deps/acelite/ace/SOCK_SEQPACK_Connector.inl | 35 - .../worldengine/deps/acelite/ace/SOCK_Stream.cpp | 38 - modules/worldengine/deps/acelite/ace/SOCK_Stream.h | 185 - .../worldengine/deps/acelite/ace/SOCK_Stream.inl | 174 - modules/worldengine/deps/acelite/ace/SPIPE.cpp | 80 - modules/worldengine/deps/acelite/ace/SPIPE.h | 114 - modules/worldengine/deps/acelite/ace/SPIPE.inl | 15 - .../deps/acelite/ace/SPIPE_Acceptor.cpp | 335 - .../worldengine/deps/acelite/ace/SPIPE_Acceptor.h | 165 - .../worldengine/deps/acelite/ace/SPIPE_Addr.cpp | 163 - modules/worldengine/deps/acelite/ace/SPIPE_Addr.h | 120 - .../worldengine/deps/acelite/ace/SPIPE_Addr.inl | 56 - .../deps/acelite/ace/SPIPE_Connector.cpp | 159 - .../worldengine/deps/acelite/ace/SPIPE_Connector.h | 116 - .../deps/acelite/ace/SPIPE_Connector.inl | 11 - .../worldengine/deps/acelite/ace/SPIPE_Stream.cpp | 102 - .../worldengine/deps/acelite/ace/SPIPE_Stream.h | 169 - .../worldengine/deps/acelite/ace/SPIPE_Stream.inl | 272 - .../worldengine/deps/acelite/ace/SSL/ACE_SSL.pc.in | 11 - .../deps/acelite/ace/SSL/SSL_Asynch_BIO.cpp | 248 - .../deps/acelite/ace/SSL/SSL_Asynch_BIO.h | 39 - .../deps/acelite/ace/SSL/SSL_Asynch_Stream.cpp | 1081 - .../deps/acelite/ace/SSL/SSL_Asynch_Stream.h | 464 - .../deps/acelite/ace/SSL/SSL_Asynch_Stream.inl | 10 - .../deps/acelite/ace/SSL/SSL_Context.cpp | 795 - .../worldengine/deps/acelite/ace/SSL/SSL_Context.h | 425 - .../deps/acelite/ace/SSL/SSL_Context.inl | 122 - .../worldengine/deps/acelite/ace/SSL/SSL_Export.h | 43 - .../deps/acelite/ace/SSL/SSL_Initializer.cpp | 42 - .../deps/acelite/ace/SSL/SSL_Initializer.h | 50 - .../worldengine/deps/acelite/ace/SSL/SSL_SOCK.cpp | 65 - .../worldengine/deps/acelite/ace/SSL/SSL_SOCK.h | 91 - .../worldengine/deps/acelite/ace/SSL/SSL_SOCK.inl | 68 - .../deps/acelite/ace/SSL/SSL_SOCK_Acceptor.cpp | 243 - .../deps/acelite/ace/SSL/SSL_SOCK_Acceptor.h | 195 - .../deps/acelite/ace/SSL/SSL_SOCK_Acceptor.inl | 82 - .../deps/acelite/ace/SSL/SSL_SOCK_Connector.cpp | 418 - .../deps/acelite/ace/SSL/SSL_SOCK_Connector.h | 316 - .../deps/acelite/ace/SSL/SSL_SOCK_Connector.inl | 25 - .../deps/acelite/ace/SSL/SSL_SOCK_Stream.cpp | 584 - .../deps/acelite/ace/SSL/SSL_SOCK_Stream.h | 346 - .../deps/acelite/ace/SSL/SSL_SOCK_Stream.inl | 364 - modules/worldengine/deps/acelite/ace/SSL/ssl.mpc | 21 - .../deps/acelite/ace/SSL/ssl_for_tao.mpc | 43 - modules/worldengine/deps/acelite/ace/SSL/sslconf.h | 55 - modules/worldengine/deps/acelite/ace/SString.cpp | 334 - modules/worldengine/deps/acelite/ace/SString.h | 301 - modules/worldengine/deps/acelite/ace/SString.inl | 296 - modules/worldengine/deps/acelite/ace/SStringfwd.h | 53 - .../worldengine/deps/acelite/ace/SUN_Proactor.cpp | 316 - .../worldengine/deps/acelite/ace/SUN_Proactor.h | 124 - .../worldengine/deps/acelite/ace/SV_Message.cpp | 22 - modules/worldengine/deps/acelite/ace/SV_Message.h | 65 - .../worldengine/deps/acelite/ace/SV_Message.inl | 34 - .../deps/acelite/ace/SV_Message_Queue.cpp | 43 - .../deps/acelite/ace/SV_Message_Queue.h | 103 - .../deps/acelite/ace/SV_Message_Queue.inl | 78 - .../deps/acelite/ace/SV_Semaphore_Complex.cpp | 254 - .../deps/acelite/ace/SV_Semaphore_Complex.h | 157 - .../deps/acelite/ace/SV_Semaphore_Complex.inl | 81 - .../deps/acelite/ace/SV_Semaphore_Simple.cpp | 234 - .../deps/acelite/ace/SV_Semaphore_Simple.h | 195 - .../deps/acelite/ace/SV_Semaphore_Simple.inl | 125 - .../deps/acelite/ace/SV_Shared_Memory.cpp | 86 - .../deps/acelite/ace/SV_Shared_Memory.h | 119 - .../deps/acelite/ace/SV_Shared_Memory.inl | 115 - .../deps/acelite/ace/Sample_History.cpp | 57 - .../worldengine/deps/acelite/ace/Sample_History.h | 95 - .../deps/acelite/ace/Sample_History.inl | 35 - .../deps/acelite/ace/Sbrk_Memory_Pool.cpp | 122 - .../deps/acelite/ace/Sbrk_Memory_Pool.h | 116 - .../worldengine/deps/acelite/ace/Sched_Params.cpp | 333 - .../worldengine/deps/acelite/ace/Sched_Params.h | 230 - .../worldengine/deps/acelite/ace/Sched_Params.inl | 132 - .../worldengine/deps/acelite/ace/Select_Reactor.h | 73 - .../deps/acelite/ace/Select_Reactor_Base.cpp | 1130 - .../deps/acelite/ace/Select_Reactor_Base.h | 612 - .../deps/acelite/ace/Select_Reactor_Base.inl | 149 - .../deps/acelite/ace/Select_Reactor_T.cpp | 1620 - .../deps/acelite/ace/Select_Reactor_T.h | 720 - .../deps/acelite/ace/Select_Reactor_T.inl | 233 - modules/worldengine/deps/acelite/ace/Semaphore.cpp | 58 - modules/worldengine/deps/acelite/ace/Semaphore.h | 181 - modules/worldengine/deps/acelite/ace/Semaphore.inl | 116 - .../deps/acelite/ace/Service_Config.cpp | 611 - .../worldengine/deps/acelite/ace/Service_Config.h | 748 - .../deps/acelite/ace/Service_Config.inl | 205 - .../deps/acelite/ace/Service_Gestalt.cpp | 1329 - .../worldengine/deps/acelite/ace/Service_Gestalt.h | 522 - .../deps/acelite/ace/Service_Gestalt.inl | 75 - .../deps/acelite/ace/Service_Manager.cpp | 431 - .../worldengine/deps/acelite/ace/Service_Manager.h | 118 - .../deps/acelite/ace/Service_Object.cpp | 177 - .../worldengine/deps/acelite/ace/Service_Object.h | 204 - .../deps/acelite/ace/Service_Object.inl | 77 - .../deps/acelite/ace/Service_Repository.cpp | 624 - .../deps/acelite/ace/Service_Repository.h | 269 - .../deps/acelite/ace/Service_Repository.inl | 35 - .../worldengine/deps/acelite/ace/Service_Types.cpp | 455 - .../worldengine/deps/acelite/ace/Service_Types.h | 219 - .../worldengine/deps/acelite/ace/Service_Types.inl | 40 - .../worldengine/deps/acelite/ace/Shared_Memory.cpp | 11 - .../worldengine/deps/acelite/ace/Shared_Memory.h | 56 - .../deps/acelite/ace/Shared_Memory_MM.cpp | 104 - .../deps/acelite/ace/Shared_Memory_MM.h | 118 - .../deps/acelite/ace/Shared_Memory_MM.inl | 39 - .../deps/acelite/ace/Shared_Memory_Pool.cpp | 446 - .../deps/acelite/ace/Shared_Memory_Pool.h | 208 - .../deps/acelite/ace/Shared_Memory_SV.cpp | 81 - .../deps/acelite/ace/Shared_Memory_SV.h | 99 - .../deps/acelite/ace/Shared_Memory_SV.inl | 27 - .../worldengine/deps/acelite/ace/Shared_Object.cpp | 48 - .../worldengine/deps/acelite/ace/Shared_Object.h | 60 - .../worldengine/deps/acelite/ace/Shared_Object.inl | 9 - .../worldengine/deps/acelite/ace/Sig_Adapter.cpp | 79 - modules/worldengine/deps/acelite/ace/Sig_Adapter.h | 79 - .../worldengine/deps/acelite/ace/Sig_Handler.cpp | 624 - modules/worldengine/deps/acelite/ace/Sig_Handler.h | 243 - .../worldengine/deps/acelite/ace/Sig_Handler.inl | 12 - modules/worldengine/deps/acelite/ace/Signal.cpp | 219 - modules/worldengine/deps/acelite/ace/Signal.h | 252 - modules/worldengine/deps/acelite/ace/Signal.inl | 246 - modules/worldengine/deps/acelite/ace/Singleton.cpp | 542 - modules/worldengine/deps/acelite/ace/Singleton.h | 328 - modules/worldengine/deps/acelite/ace/Singleton.inl | 39 - .../worldengine/deps/acelite/ace/Sock_Connect.cpp | 1494 - .../worldengine/deps/acelite/ace/Sock_Connect.h | 105 - .../worldengine/deps/acelite/ace/Stack_Trace.cpp | 726 - modules/worldengine/deps/acelite/ace/Stack_Trace.h | 105 - .../deps/acelite/ace/Static_Object_Lock.h | 76 - modules/worldengine/deps/acelite/ace/Stats.cpp | 412 - modules/worldengine/deps/acelite/ace/Stats.h | 220 - modules/worldengine/deps/acelite/ace/Stats.inl | 101 - .../worldengine/deps/acelite/ace/Strategies_T.cpp | 1505 - .../worldengine/deps/acelite/ace/Strategies_T.h | 1074 - .../worldengine/deps/acelite/ace/Strategies_T.inl | 227 - modules/worldengine/deps/acelite/ace/Stream.cpp | 636 - modules/worldengine/deps/acelite/ace/Stream.h | 250 - modules/worldengine/deps/acelite/ace/Stream.inl | 48 - .../deps/acelite/ace/Stream_Modules.cpp | 379 - .../worldengine/deps/acelite/ace/Stream_Modules.h | 164 - .../worldengine/deps/acelite/ace/String_Base.cpp | 663 - modules/worldengine/deps/acelite/ace/String_Base.h | 889 - .../worldengine/deps/acelite/ace/String_Base.inl | 458 - .../deps/acelite/ace/String_Base_Const.cpp | 18 - .../deps/acelite/ace/String_Base_Const.h | 50 - modules/worldengine/deps/acelite/ace/Svc_Conf.h | 108 - modules/worldengine/deps/acelite/ace/Svc_Conf.y | 369 - .../deps/acelite/ace/Svc_Conf_Lexer.cpp | 673 - .../worldengine/deps/acelite/ace/Svc_Conf_Lexer.h | 68 - .../worldengine/deps/acelite/ace/Svc_Conf_Param.h | 140 - .../deps/acelite/ace/Svc_Conf_Token_Table.h | 82 - .../worldengine/deps/acelite/ace/Svc_Conf_Tokens.h | 27 - .../worldengine/deps/acelite/ace/Svc_Conf_y.cpp | 1992 -- .../worldengine/deps/acelite/ace/Svc_Handler.cpp | 521 - modules/worldengine/deps/acelite/ace/Svc_Handler.h | 359 - modules/worldengine/deps/acelite/ace/Synch.h | 51 - .../worldengine/deps/acelite/ace/Synch_Options.cpp | 106 - .../worldengine/deps/acelite/ace/Synch_Options.h | 161 - .../worldengine/deps/acelite/ace/Synch_Traits.h | 114 - .../worldengine/deps/acelite/ace/System_Time.cpp | 140 - modules/worldengine/deps/acelite/ace/System_Time.h | 97 - modules/worldengine/deps/acelite/ace/TLI.cpp | 271 - modules/worldengine/deps/acelite/ace/TLI.h | 114 - modules/worldengine/deps/acelite/ace/TLI.inl | 46 - .../worldengine/deps/acelite/ace/TLI_Acceptor.cpp | 551 - .../worldengine/deps/acelite/ace/TLI_Acceptor.h | 121 - .../worldengine/deps/acelite/ace/TLI_Connector.cpp | 254 - .../worldengine/deps/acelite/ace/TLI_Connector.h | 128 - .../worldengine/deps/acelite/ace/TLI_Connector.inl | 45 - .../worldengine/deps/acelite/ace/TLI_Stream.cpp | 227 - modules/worldengine/deps/acelite/ace/TLI_Stream.h | 139 - .../worldengine/deps/acelite/ace/TLI_Stream.inl | 22 - .../worldengine/deps/acelite/ace/TP_Reactor.cpp | 654 - modules/worldengine/deps/acelite/ace/TP_Reactor.h | 318 - .../worldengine/deps/acelite/ace/TP_Reactor.inl | 116 - .../worldengine/deps/acelite/ace/TSS_Adapter.cpp | 38 - modules/worldengine/deps/acelite/ace/TSS_Adapter.h | 58 - modules/worldengine/deps/acelite/ace/TSS_T.cpp | 660 - modules/worldengine/deps/acelite/ace/TSS_T.h | 266 - modules/worldengine/deps/acelite/ace/TSS_T.inl | 100 - modules/worldengine/deps/acelite/ace/TTY_IO.cpp | 703 - modules/worldengine/deps/acelite/ace/TTY_IO.h | 113 - modules/worldengine/deps/acelite/ace/Task.cpp | 282 - modules/worldengine/deps/acelite/ace/Task.h | 304 - modules/worldengine/deps/acelite/ace/Task.inl | 73 - modules/worldengine/deps/acelite/ace/Task_Ex_T.cpp | 112 - modules/worldengine/deps/acelite/ace/Task_Ex_T.h | 192 - modules/worldengine/deps/acelite/ace/Task_Ex_T.inl | 99 - modules/worldengine/deps/acelite/ace/Task_T.cpp | 107 - modules/worldengine/deps/acelite/ace/Task_T.h | 197 - modules/worldengine/deps/acelite/ace/Task_T.inl | 113 - .../worldengine/deps/acelite/ace/Test_and_Set.cpp | 49 - .../worldengine/deps/acelite/ace/Test_and_Set.h | 71 - modules/worldengine/deps/acelite/ace/Thread.cpp | 95 - modules/worldengine/deps/acelite/ace/Thread.h | 280 - modules/worldengine/deps/acelite/ace/Thread.inl | 283 - .../deps/acelite/ace/Thread_Adapter.cpp | 238 - .../worldengine/deps/acelite/ace/Thread_Adapter.h | 95 - .../deps/acelite/ace/Thread_Adapter.inl | 10 - .../deps/acelite/ace/Thread_Control.cpp | 80 - .../worldengine/deps/acelite/ace/Thread_Control.h | 99 - .../deps/acelite/ace/Thread_Control.inl | 45 - .../worldengine/deps/acelite/ace/Thread_Exit.cpp | 119 - modules/worldengine/deps/acelite/ace/Thread_Exit.h | 109 - .../worldengine/deps/acelite/ace/Thread_Hook.cpp | 32 - modules/worldengine/deps/acelite/ace/Thread_Hook.h | 63 - .../deps/acelite/ace/Thread_Manager.cpp | 2247 -- .../worldengine/deps/acelite/ace/Thread_Manager.h | 1270 - .../deps/acelite/ace/Thread_Manager.inl | 302 - .../worldengine/deps/acelite/ace/Thread_Mutex.cpp | 60 - .../worldengine/deps/acelite/ace/Thread_Mutex.h | 173 - .../worldengine/deps/acelite/ace/Thread_Mutex.inl | 101 - .../deps/acelite/ace/Thread_Semaphore.cpp | 60 - .../deps/acelite/ace/Thread_Semaphore.h | 85 - .../deps/acelite/ace/Thread_Semaphore.inl | 9 - .../deps/acelite/ace/Throughput_Stats.cpp | 94 - .../deps/acelite/ace/Throughput_Stats.h | 72 - .../worldengine/deps/acelite/ace/Time_Policy.cpp | 32 - modules/worldengine/deps/acelite/ace/Time_Policy.h | 168 - .../worldengine/deps/acelite/ace/Time_Policy.inl | 92 - .../worldengine/deps/acelite/ace/Time_Policy_T.cpp | 25 - .../worldengine/deps/acelite/ace/Time_Policy_T.h | 74 - .../worldengine/deps/acelite/ace/Time_Policy_T.inl | 29 - .../worldengine/deps/acelite/ace/Time_Value.cpp | 363 - modules/worldengine/deps/acelite/ace/Time_Value.h | 551 - .../worldengine/deps/acelite/ace/Time_Value.inl | 553 - .../worldengine/deps/acelite/ace/Time_Value_T.cpp | 50 - .../worldengine/deps/acelite/ace/Time_Value_T.h | 192 - .../worldengine/deps/acelite/ace/Time_Value_T.inl | 91 - modules/worldengine/deps/acelite/ace/Timeprobe.cpp | 13 - modules/worldengine/deps/acelite/ace/Timeprobe.h | 199 - modules/worldengine/deps/acelite/ace/Timeprobe.inl | 11 - .../worldengine/deps/acelite/ace/Timeprobe_T.cpp | 426 - modules/worldengine/deps/acelite/ace/Timeprobe_T.h | 218 - modules/worldengine/deps/acelite/ace/Timer_Hash.h | 75 - .../worldengine/deps/acelite/ace/Timer_Hash_T.cpp | 869 - .../worldengine/deps/acelite/ace/Timer_Hash_T.h | 351 - modules/worldengine/deps/acelite/ace/Timer_Heap.h | 46 - .../worldengine/deps/acelite/ace/Timer_Heap_T.cpp | 894 - .../worldengine/deps/acelite/ace/Timer_Heap_T.h | 340 - modules/worldengine/deps/acelite/ace/Timer_List.h | 41 - .../worldengine/deps/acelite/ace/Timer_List_T.cpp | 431 - .../worldengine/deps/acelite/ace/Timer_List_T.h | 230 - modules/worldengine/deps/acelite/ace/Timer_Queue.h | 48 - .../deps/acelite/ace/Timer_Queue_Adapters.cpp | 373 - .../deps/acelite/ace/Timer_Queue_Adapters.h | 258 - .../deps/acelite/ace/Timer_Queue_Adapters.inl | 28 - .../deps/acelite/ace/Timer_Queue_Iterator.cpp | 60 - .../deps/acelite/ace/Timer_Queue_Iterator.h | 197 - .../deps/acelite/ace/Timer_Queue_Iterator.inl | 132 - .../worldengine/deps/acelite/ace/Timer_Queue_T.cpp | 455 - .../worldengine/deps/acelite/ace/Timer_Queue_T.h | 249 - .../worldengine/deps/acelite/ace/Timer_Queue_T.inl | 82 - .../worldengine/deps/acelite/ace/Timer_Queuefwd.h | 30 - modules/worldengine/deps/acelite/ace/Timer_Wheel.h | 42 - .../worldengine/deps/acelite/ace/Timer_Wheel_T.cpp | 975 - .../worldengine/deps/acelite/ace/Timer_Wheel_T.h | 228 - .../deps/acelite/ace/TkReactor/ACE_TkReactor.pc.in | 11 - .../acelite/ace/TkReactor/ACE_TkReactor_export.h | 57 - .../deps/acelite/ace/TkReactor/TkReactor.cpp | 437 - .../deps/acelite/ace/TkReactor/TkReactor.h | 134 - .../deps/acelite/ace/TkReactor/ace_tkreactor.mpc | 9 - modules/worldengine/deps/acelite/ace/Token.cpp | 540 - modules/worldengine/deps/acelite/ace/Token.h | 374 - modules/worldengine/deps/acelite/ace/Token.inl | 173 - .../deps/acelite/ace/Token_Collection.cpp | 290 - .../deps/acelite/ace/Token_Collection.h | 227 - .../deps/acelite/ace/Token_Collection.inl | 14 - .../deps/acelite/ace/Token_Invariants.cpp | 352 - .../deps/acelite/ace/Token_Invariants.h | 213 - .../worldengine/deps/acelite/ace/Token_Manager.cpp | 270 - .../worldengine/deps/acelite/ace/Token_Manager.h | 134 - .../worldengine/deps/acelite/ace/Token_Manager.inl | 22 - .../deps/acelite/ace/Token_Request_Reply.cpp | 184 - .../deps/acelite/ace/Token_Request_Reply.h | 267 - .../deps/acelite/ace/Token_Request_Reply.inl | 202 - .../worldengine/deps/acelite/ace/Tokenizer_T.cpp | 240 - modules/worldengine/deps/acelite/ace/Tokenizer_T.h | 239 - modules/worldengine/deps/acelite/ace/Trace.cpp | 130 - modules/worldengine/deps/acelite/ace/Trace.h | 94 - modules/worldengine/deps/acelite/ace/Truncate.h | 471 - .../deps/acelite/ace/Typed_SV_Message.cpp | 28 - .../deps/acelite/ace/Typed_SV_Message.h | 105 - .../deps/acelite/ace/Typed_SV_Message.inl | 93 - .../deps/acelite/ace/Typed_SV_Message_Queue.cpp | 54 - .../deps/acelite/ace/Typed_SV_Message_Queue.h | 90 - .../deps/acelite/ace/Typed_SV_Message_Queue.inl | 77 - modules/worldengine/deps/acelite/ace/UNIX_Addr.cpp | 147 - modules/worldengine/deps/acelite/ace/UNIX_Addr.h | 115 - modules/worldengine/deps/acelite/ace/UNIX_Addr.inl | 54 - .../deps/acelite/ace/UPIPE_Acceptor.cpp | 127 - .../worldengine/deps/acelite/ace/UPIPE_Acceptor.h | 97 - .../deps/acelite/ace/UPIPE_Acceptor.inl | 11 - modules/worldengine/deps/acelite/ace/UPIPE_Addr.h | 31 - .../deps/acelite/ace/UPIPE_Connector.cpp | 99 - .../worldengine/deps/acelite/ace/UPIPE_Connector.h | 113 - .../deps/acelite/ace/UPIPE_Connector.inl | 31 - .../worldengine/deps/acelite/ace/UPIPE_Stream.cpp | 232 - .../worldengine/deps/acelite/ace/UPIPE_Stream.h | 138 - .../worldengine/deps/acelite/ace/UPIPE_Stream.inl | 11 - .../deps/acelite/ace/UTF16_Encoding_Converter.cpp | 362 - .../deps/acelite/ace/UTF16_Encoding_Converter.h | 84 - .../deps/acelite/ace/UTF16_Encoding_Converter.inl | 74 - .../deps/acelite/ace/UTF32_Encoding_Converter.cpp | 252 - .../deps/acelite/ace/UTF32_Encoding_Converter.h | 65 - .../deps/acelite/ace/UTF8_Encoding_Converter.cpp | 90 - .../deps/acelite/ace/UTF8_Encoding_Converter.h | 70 - modules/worldengine/deps/acelite/ace/UUID.cpp | 490 - modules/worldengine/deps/acelite/ace/UUID.h | 280 - modules/worldengine/deps/acelite/ace/UUID.inl | 202 - .../deps/acelite/ace/Unbounded_Queue.cpp | 431 - .../worldengine/deps/acelite/ace/Unbounded_Queue.h | 294 - .../deps/acelite/ace/Unbounded_Queue.inl | 24 - .../worldengine/deps/acelite/ace/Unbounded_Set.cpp | 16 - .../worldengine/deps/acelite/ace/Unbounded_Set.h | 101 - .../worldengine/deps/acelite/ace/Unbounded_Set.inl | 46 - .../deps/acelite/ace/Unbounded_Set_Ex.cpp | 497 - .../deps/acelite/ace/Unbounded_Set_Ex.h | 373 - .../deps/acelite/ace/Unbounded_Set_Ex.inl | 20 - modules/worldengine/deps/acelite/ace/Value_Ptr.h | 140 - modules/worldengine/deps/acelite/ace/Vector_T.cpp | 89 - modules/worldengine/deps/acelite/ace/Vector_T.h | 262 - modules/worldengine/deps/acelite/ace/Vector_T.inl | 104 - modules/worldengine/deps/acelite/ace/Version.h | 8 - .../deps/acelite/ace/Versioned_Namespace.h | 49 - .../worldengine/deps/acelite/ace/WFMO_Reactor.cpp | 2760 -- .../worldengine/deps/acelite/ace/WFMO_Reactor.h | 1366 - .../worldengine/deps/acelite/ace/WFMO_Reactor.inl | 1199 - .../deps/acelite/ace/WIN32_Asynch_IO.cpp | 3809 -- .../worldengine/deps/acelite/ace/WIN32_Asynch_IO.h | 1923 - .../deps/acelite/ace/WIN32_Proactor.cpp | 802 - .../worldengine/deps/acelite/ace/WIN32_Proactor.h | 323 - .../worldengine/deps/acelite/ace/XML_Svc_Conf.cpp | 13 - .../worldengine/deps/acelite/ace/XML_Svc_Conf.h | 61 - .../deps/acelite/ace/XML_Utils/ACE_XML_Utils.pc.in | 11 - .../worldengine/deps/acelite/ace/XML_Utils/XML.mpc | 42 - .../acelite/ace/XML_Utils/XMLSchema/Traversal.hpp | 74 - .../acelite/ace/XML_Utils/XMLSchema/Traversal.ipp | 9 - .../acelite/ace/XML_Utils/XMLSchema/TypeInfo.hpp | 20 - .../acelite/ace/XML_Utils/XMLSchema/TypeInfo.ipp | 6 - .../acelite/ace/XML_Utils/XMLSchema/TypeInfo.tpp | 97 - .../deps/acelite/ace/XML_Utils/XMLSchema/Types.hpp | 667 - .../deps/acelite/ace/XML_Utils/XMLSchema/Types.ipp | 7 - .../acelite/ace/XML_Utils/XMLSchema/Writer.hpp | 156 - .../acelite/ace/XML_Utils/XMLSchema/Writer.ipp | 9 - .../acelite/ace/XML_Utils/XMLSchema/id_map.hpp | 142 - .../acelite/ace/XML_Utils/XML_Error_Handler.cpp | 75 - .../deps/acelite/ace/XML_Utils/XML_Error_Handler.h | 58 - .../deps/acelite/ace/XML_Utils/XML_Helper.h | 98 - .../deps/acelite/ace/XML_Utils/XML_Helper.tpp | 345 - .../acelite/ace/XML_Utils/XML_Schema_Resolver.cpp | 76 - .../acelite/ace/XML_Utils/XML_Schema_Resolver.h | 108 - .../acelite/ace/XML_Utils/XML_Schema_Resolver.tpp | 51 - .../deps/acelite/ace/XML_Utils/XML_Typedefs.cpp | 6 - .../deps/acelite/ace/XML_Utils/XML_Typedefs.h | 32 - .../deps/acelite/ace/XML_Utils/XML_Utils_Export.h | 57 - .../deps/acelite/ace/XML_Utils/XSCRT/Elements.hpp | 567 - .../ace/XML_Utils/XSCRT/ExtendedTypeInfo.hpp | 180 - .../ace/XML_Utils/XSCRT/ExtendedTypeInfo.ipp | 140 - .../deps/acelite/ace/XML_Utils/XSCRT/Parser.hpp | 62 - .../deps/acelite/ace/XML_Utils/XSCRT/Traversal.hpp | 263 - .../deps/acelite/ace/XML_Utils/XSCRT/Traversal.tpp | 194 - .../deps/acelite/ace/XML_Utils/XSCRT/Writer.hpp | 76 - .../deps/acelite/ace/XML_Utils/XSCRT/XML.hpp | 488 - .../deps/acelite/ace/XML_Utils/XSCRT/XMLSchema.hpp | 584 - .../deps/acelite/ace/XML_Utils/XercesString.cpp | 165 - .../deps/acelite/ace/XML_Utils/XercesString.h | 80 - .../worldengine/deps/acelite/ace/XTI_ATM_Mcast.cpp | 68 - .../worldengine/deps/acelite/ace/XTI_ATM_Mcast.h | 135 - .../worldengine/deps/acelite/ace/XTI_ATM_Mcast.inl | 62 - .../deps/acelite/ace/XtReactor/ACE_XtReactor.pc.in | 11 - .../acelite/ace/XtReactor/ACE_XtReactor_export.h | 57 - .../deps/acelite/ace/XtReactor/XtReactor.cpp | 466 - .../deps/acelite/ace/XtReactor/XtReactor.h | 145 - .../deps/acelite/ace/XtReactor/ace_xtreactor.mpc | 9 - modules/worldengine/deps/acelite/ace/ace.mpc | 520 - modules/worldengine/deps/acelite/ace/ace.mwc | 4 - modules/worldengine/deps/acelite/ace/ace.rc | 38 - .../worldengine/deps/acelite/ace/ace_for_tao.mpc | 393 - .../deps/acelite/ace/ace_message_table.bin | Bin 28 -> 0 bytes modules/worldengine/deps/acelite/ace/ace_wchar.cpp | 17 - modules/worldengine/deps/acelite/ace/ace_wchar.h | 342 - modules/worldengine/deps/acelite/ace/ace_wchar.inl | 183 - .../deps/acelite/ace/checked_iterator.h | 56 - modules/worldengine/deps/acelite/ace/codecs.mpb | 6 - .../worldengine/deps/acelite/ace/config-WinCE.h | 227 - .../worldengine/deps/acelite/ace/config-aix-5.x.h | 325 - .../worldengine/deps/acelite/ace/config-aix-7.h | 27 - modules/worldengine/deps/acelite/ace/config-all.h | 91 - .../worldengine/deps/acelite/ace/config-android.h | 403 - .../worldengine/deps/acelite/ace/config-cygwin32.h | 211 - .../worldengine/deps/acelite/ace/config-freebsd.h | 190 - .../deps/acelite/ace/config-g++-common.h | 181 - .../deps/acelite/ace/config-hpux-11.00.h | 431 - .../deps/acelite/ace/config-icc-common.h | 109 - .../deps/acelite/ace/config-integritySCA.h | 221 - .../worldengine/deps/acelite/ace/config-kfreebsd.h | 616 - .../worldengine/deps/acelite/ace/config-linux.h | 456 - modules/worldengine/deps/acelite/ace/config-lite.h | 156 - .../worldengine/deps/acelite/ace/config-lynxos.h | 185 - .../deps/acelite/ace/config-macosx-iOS-hardware.h | 14 - .../deps/acelite/ace/config-macosx-iOS-simulator.h | 8 - .../deps/acelite/ace/config-macosx-leopard.h | 233 - .../deps/acelite/ace/config-macosx-lion.h | 28 - .../deps/acelite/ace/config-macosx-mavericks.h | 16 - .../deps/acelite/ace/config-macosx-mountainlion.h | 16 - .../deps/acelite/ace/config-macosx-panther.h | 180 - .../deps/acelite/ace/config-macosx-snowleopard.h | 17 - .../deps/acelite/ace/config-macosx-tiger.h | 210 - .../deps/acelite/ace/config-macosx-yosemite.h | 6 - .../worldengine/deps/acelite/ace/config-macosx.h | 178 - .../worldengine/deps/acelite/ace/config-macros.h | 529 - .../worldengine/deps/acelite/ace/config-netbsd.h | 159 - .../worldengine/deps/acelite/ace/config-openbsd.h | 131 - .../worldengine/deps/acelite/ace/config-openvms.h | 190 - .../worldengine/deps/acelite/ace/config-pharlap.h | 89 - .../deps/acelite/ace/config-posix-nonetworking.h | 84 - .../worldengine/deps/acelite/ace/config-posix.h | 71 - modules/worldengine/deps/acelite/ace/config-qnx.h | 196 - .../worldengine/deps/acelite/ace/config-rtems.h | 160 - .../deps/acelite/ace/config-suncc-common.h | 52 - .../deps/acelite/ace/config-sunos5.10.h | 59 - .../deps/acelite/ace/config-sunos5.11.h | 13 - .../deps/acelite/ace/config-sunos5.4-g++.h | 171 - .../deps/acelite/ace/config-sunos5.4-sunc++-4.x.h | 179 - .../worldengine/deps/acelite/ace/config-sunos5.5.h | 362 - .../worldengine/deps/acelite/ace/config-sunos5.6.h | 114 - .../worldengine/deps/acelite/ace/config-sunos5.7.h | 67 - .../worldengine/deps/acelite/ace/config-sunos5.8.h | 37 - .../worldengine/deps/acelite/ace/config-sunos5.9.h | 16 - .../worldengine/deps/acelite/ace/config-vxworks.h | 78 - .../deps/acelite/ace/config-vxworks6.4.h | 352 - .../deps/acelite/ace/config-vxworks6.5.h | 23 - .../deps/acelite/ace/config-vxworks6.6.h | 32 - .../deps/acelite/ace/config-vxworks6.7.h | 21 - .../deps/acelite/ace/config-vxworks6.8.h | 20 - .../deps/acelite/ace/config-vxworks6.9.h | 42 - .../deps/acelite/ace/config-win32-borland.h | 179 - .../deps/acelite/ace/config-win32-cegcc.h | 105 - .../deps/acelite/ace/config-win32-common.h | 693 - .../deps/acelite/ace/config-win32-dmc.h | 98 - .../deps/acelite/ace/config-win32-interix.h | 122 - .../deps/acelite/ace/config-win32-mingw.h | 108 - .../deps/acelite/ace/config-win32-mingw64.h | 136 - .../deps/acelite/ace/config-win32-msvc-10.h | 146 - .../deps/acelite/ace/config-win32-msvc-11.h | 30 - .../deps/acelite/ace/config-win32-msvc-12.h | 30 - .../deps/acelite/ace/config-win32-msvc-14.h | 42 - .../deps/acelite/ace/config-win32-msvc-7.h | 120 - .../deps/acelite/ace/config-win32-msvc-8.h | 155 - .../deps/acelite/ace/config-win32-msvc-9.h | 145 - .../deps/acelite/ace/config-win32-msvc.h | 176 - .../worldengine/deps/acelite/ace/config-win32.h | 52 - .../worldengine/deps/acelite/ace/config-windows.h | 3 - modules/worldengine/deps/acelite/ace/filecache.mpb | 6 - modules/worldengine/deps/acelite/ace/iosfwd.h | 98 - .../deps/acelite/ace/os_include/arpa/os_inet.h | 72 - .../deps/acelite/ace/os_include/net/os_if.h | 106 - .../deps/acelite/ace/os_include/netinet/os_in.h | 177 - .../deps/acelite/ace/os_include/netinet/os_tcp.h | 44 - .../deps/acelite/ace/os_include/os_aio.h | 45 - .../deps/acelite/ace/os_include/os_assert.h | 30 - .../deps/acelite/ace/os_include/os_byteswap.h | 29 - .../deps/acelite/ace/os_include/os_complex.h | 30 - .../deps/acelite/ace/os_include/os_cpio.h | 30 - .../deps/acelite/ace/os_include/os_ctype.h | 46 - .../deps/acelite/ace/os_include/os_dirent.h | 104 - .../deps/acelite/ace/os_include/os_dlfcn.h | 108 - .../deps/acelite/ace/os_include/os_errno.h | 456 - .../deps/acelite/ace/os_include/os_fcntl.h | 99 - .../deps/acelite/ace/os_include/os_fenv.h | 30 - .../deps/acelite/ace/os_include/os_float.h | 30 - .../deps/acelite/ace/os_include/os_fmtmsg.h | 30 - .../deps/acelite/ace/os_include/os_fnmatch.h | 30 - .../deps/acelite/ace/os_include/os_ftw.h | 32 - .../deps/acelite/ace/os_include/os_glob.h | 30 - .../deps/acelite/ace/os_include/os_grp.h | 32 - .../deps/acelite/ace/os_include/os_iconv.h | 32 - .../deps/acelite/ace/os_include/os_ifaddrs.h | 31 - .../deps/acelite/ace/os_include/os_intrin.h | 55 - .../deps/acelite/ace/os_include/os_inttypes.h | 32 - .../deps/acelite/ace/os_include/os_iso646.h | 30 - .../deps/acelite/ace/os_include/os_kstat.h | 31 - .../deps/acelite/ace/os_include/os_langinfo.h | 32 - .../deps/acelite/ace/os_include/os_libgen.h | 30 - .../deps/acelite/ace/os_include/os_limits.h | 136 - .../deps/acelite/ace/os_include/os_local.h | 32 - .../deps/acelite/ace/os_include/os_math.h | 32 - .../deps/acelite/ace/os_include/os_monetary.h | 32 - .../deps/acelite/ace/os_include/os_mqueue.h | 32 - .../deps/acelite/ace/os_include/os_ndbm.h | 32 - .../deps/acelite/ace/os_include/os_netdb.h | 94 - .../deps/acelite/ace/os_include/os_nl_types.h | 30 - .../deps/acelite/ace/os_include/os_pdh.h | 33 - .../deps/acelite/ace/os_include/os_pdhmsg.h | 29 - .../deps/acelite/ace/os_include/os_poll.h | 30 - .../deps/acelite/ace/os_include/os_pthread.h | 390 - .../deps/acelite/ace/os_include/os_pwd.h | 32 - .../deps/acelite/ace/os_include/os_regex.h | 36 - .../deps/acelite/ace/os_include/os_sched.h | 54 - .../deps/acelite/ace/os_include/os_search.h | 32 - .../deps/acelite/ace/os_include/os_semaphore.h | 75 - .../deps/acelite/ace/os_include/os_setjmp.h | 30 - .../deps/acelite/ace/os_include/os_signal.h | 214 - .../deps/acelite/ace/os_include/os_spawn.h | 34 - .../deps/acelite/ace/os_include/os_stdarg.h | 38 - .../deps/acelite/ace/os_include/os_stdbool.h | 30 - .../deps/acelite/ace/os_include/os_stddef.h | 73 - .../deps/acelite/ace/os_include/os_stdint.h | 139 - .../deps/acelite/ace/os_include/os_stdio.h | 82 - .../deps/acelite/ace/os_include/os_stdlib.h | 71 - .../deps/acelite/ace/os_include/os_string.h | 32 - .../deps/acelite/ace/os_include/os_strings.h | 50 - .../deps/acelite/ace/os_include/os_stropts.h | 112 - .../deps/acelite/ace/os_include/os_syslog.h | 30 - .../deps/acelite/ace/os_include/os_tar.h | 30 - .../deps/acelite/ace/os_include/os_termios.h | 34 - .../deps/acelite/ace/os_include/os_tgmath.h | 33 - .../deps/acelite/ace/os_include/os_time.h | 110 - .../deps/acelite/ace/os_include/os_trace.h | 32 - .../deps/acelite/ace/os_include/os_typeinfo.h | 27 - .../deps/acelite/ace/os_include/os_ucontext.h | 46 - .../deps/acelite/ace/os_include/os_ulimit.h | 30 - .../deps/acelite/ace/os_include/os_unistd.h | 179 - .../deps/acelite/ace/os_include/os_utime.h | 32 - .../deps/acelite/ace/os_include/os_utmpx.h | 32 - .../deps/acelite/ace/os_include/os_wchar.h | 37 - .../deps/acelite/ace/os_include/os_wctype.h | 33 - .../deps/acelite/ace/os_include/os_wordexp.h | 32 - .../deps/acelite/ace/os_include/sys/os_ipc.h | 72 - .../deps/acelite/ace/os_include/sys/os_loadavg.h | 29 - .../deps/acelite/ace/os_include/sys/os_mman.h | 112 - .../deps/acelite/ace/os_include/sys/os_msg.h | 53 - .../deps/acelite/ace/os_include/sys/os_pstat.h | 30 - .../deps/acelite/ace/os_include/sys/os_resource.h | 91 - .../deps/acelite/ace/os_include/sys/os_select.h | 59 - .../deps/acelite/ace/os_include/sys/os_sem.h | 88 - .../deps/acelite/ace/os_include/sys/os_shm.h | 46 - .../deps/acelite/ace/os_include/sys/os_socket.h | 305 - .../deps/acelite/ace/os_include/sys/os_stat.h | 161 - .../deps/acelite/ace/os_include/sys/os_statvfs.h | 30 - .../deps/acelite/ace/os_include/sys/os_sysctl.h | 29 - .../deps/acelite/ace/os_include/sys/os_sysinfo.h | 27 - .../deps/acelite/ace/os_include/sys/os_time.h | 58 - .../deps/acelite/ace/os_include/sys/os_timeb.h | 32 - .../deps/acelite/ace/os_include/sys/os_times.h | 32 - .../deps/acelite/ace/os_include/sys/os_types.h | 151 - .../deps/acelite/ace/os_include/sys/os_uio.h | 75 - .../deps/acelite/ace/os_include/sys/os_un.h | 50 - .../deps/acelite/ace/os_include/sys/os_utsname.h | 30 - .../deps/acelite/ace/os_include/sys/os_wait.h | 95 - modules/worldengine/deps/acelite/ace/other.mpb | 13 - modules/worldengine/deps/acelite/ace/post.h | 23 - modules/worldengine/deps/acelite/ace/pre.h | 27 - modules/worldengine/deps/acelite/ace/streams.h | 134 - modules/worldengine/deps/acelite/ace/svc_export.h | 43 - modules/worldengine/deps/acelite/ace/svcconf.mpb | 27 - .../worldengine/deps/acelite/ace/svcconfgen.mpc | 33 - modules/worldengine/deps/acelite/ace/token.mpb | 13 - modules/worldengine/deps/acelite/ace/uuid.mpb | 6 - modules/worldengine/deps/bzip2/CMakeLists.txt | 22 - modules/worldengine/deps/bzip2/LICENSE | 42 - modules/worldengine/deps/bzip2/README | 215 - modules/worldengine/deps/bzip2/blocksort.c | 1094 - modules/worldengine/deps/bzip2/bzlib.c | 1572 - modules/worldengine/deps/bzip2/bzlib.h | 282 - modules/worldengine/deps/bzip2/bzlib_private.h | 509 - modules/worldengine/deps/bzip2/compress.c | 672 - modules/worldengine/deps/bzip2/crctable.c | 104 - modules/worldengine/deps/bzip2/decompress.c | 646 - modules/worldengine/deps/bzip2/huffman.c | 205 - modules/worldengine/deps/bzip2/randtable.c | 84 - modules/worldengine/deps/g3dlite/CMakeLists.txt | 72 - modules/worldengine/deps/g3dlite/Readme.txt | 11 - .../worldengine/deps/g3dlite/include/G3D/AABox.h | 275 - modules/worldengine/deps/g3dlite/include/G3D/Any.h | 760 - .../worldengine/deps/g3dlite/include/G3D/AnyVal.h | 512 - .../deps/g3dlite/include/G3D/AreaMemoryManager.h | 93 - .../worldengine/deps/g3dlite/include/G3D/Array.h | 1274 - .../deps/g3dlite/include/G3D/AtomicInt32.h | 164 - .../deps/g3dlite/include/G3D/BinaryFormat.h | 140 - .../deps/g3dlite/include/G3D/BinaryInput.h | 444 - .../deps/g3dlite/include/G3D/BinaryOutput.h | 421 - .../deps/g3dlite/include/G3D/BoundsTrait.h | 20 - modules/worldengine/deps/g3dlite/include/G3D/Box.h | 195 - .../worldengine/deps/g3dlite/include/G3D/Box2D.h | 121 - .../deps/g3dlite/include/G3D/BumpMapPreprocess.h | 61 - .../worldengine/deps/g3dlite/include/G3D/Capsule.h | 90 - .../deps/g3dlite/include/G3D/CollisionDetection.h | 1205 - .../worldengine/deps/g3dlite/include/G3D/Color1.h | 144 - .../deps/g3dlite/include/G3D/Color1uint8.h | 91 - .../worldengine/deps/g3dlite/include/G3D/Color3.h | 432 - .../deps/g3dlite/include/G3D/Color3uint8.h | 125 - .../worldengine/deps/g3dlite/include/G3D/Color4.h | 347 - .../deps/g3dlite/include/G3D/Color4uint8.h | 123 - .../worldengine/deps/g3dlite/include/G3D/Cone.h | 68 - .../deps/g3dlite/include/G3D/ConvexPolyhedron.h | 180 - .../deps/g3dlite/include/G3D/CoordinateFrame.h | 335 - .../worldengine/deps/g3dlite/include/G3D/Crypto.h | 96 - .../deps/g3dlite/include/G3D/Cylinder.h | 92 - .../deps/g3dlite/include/G3D/EqualsTrait.h | 26 - .../deps/g3dlite/include/G3D/FileSystem.h | 466 - modules/worldengine/deps/g3dlite/include/G3D/G3D.h | 165 - .../worldengine/deps/g3dlite/include/G3D/G3DAll.h | 26 - .../deps/g3dlite/include/G3D/G3DGameUnits.h | 42 - .../worldengine/deps/g3dlite/include/G3D/GCamera.h | 354 - .../worldengine/deps/g3dlite/include/G3D/GImage.h | 611 - .../worldengine/deps/g3dlite/include/G3D/GLight.h | 113 - .../worldengine/deps/g3dlite/include/G3D/GMutex.h | 124 - .../worldengine/deps/g3dlite/include/G3D/GThread.h | 121 - .../deps/g3dlite/include/G3D/GUniqueID.h | 69 - .../deps/g3dlite/include/G3D/HashTrait.h | 92 - .../worldengine/deps/g3dlite/include/G3D/Image1.h | 81 - .../deps/g3dlite/include/G3D/Image1uint8.h | 80 - .../worldengine/deps/g3dlite/include/G3D/Image3.h | 81 - .../deps/g3dlite/include/G3D/Image3uint8.h | 85 - .../worldengine/deps/g3dlite/include/G3D/Image4.h | 86 - .../deps/g3dlite/include/G3D/Image4uint8.h | 85 - .../deps/g3dlite/include/G3D/ImageFormat.h | 441 - .../deps/g3dlite/include/G3D/Intersect.h | 55 - .../worldengine/deps/g3dlite/include/G3D/KDTree.h | 1667 - .../worldengine/deps/g3dlite/include/G3D/Line.h | 105 - .../deps/g3dlite/include/G3D/LineSegment.h | 115 - modules/worldengine/deps/g3dlite/include/G3D/Log.h | 109 - .../worldengine/deps/g3dlite/include/G3D/Map2D.h | 667 - .../worldengine/deps/g3dlite/include/G3D/Matrix.h | 634 - .../worldengine/deps/g3dlite/include/G3D/Matrix2.h | 74 - .../worldengine/deps/g3dlite/include/G3D/Matrix3.h | 366 - .../worldengine/deps/g3dlite/include/G3D/Matrix4.h | 258 - .../deps/g3dlite/include/G3D/MemoryManager.h | 93 - .../worldengine/deps/g3dlite/include/G3D/MeshAlg.h | 683 - .../deps/g3dlite/include/G3D/MeshBuilder.h | 82 - .../deps/g3dlite/include/G3D/NetAddress.h | 108 - .../deps/g3dlite/include/G3D/NetworkDevice.h | 739 - .../deps/g3dlite/include/G3D/ParseError.h | 59 - .../deps/g3dlite/include/G3D/PhysicsFrame.h | 109 - .../deps/g3dlite/include/G3D/PhysicsFrameSpline.h | 37 - .../worldengine/deps/g3dlite/include/G3D/Plane.h | 161 - .../deps/g3dlite/include/G3D/PointHashGrid.h | 947 - .../deps/g3dlite/include/G3D/PointKDTree.h | 1185 - .../worldengine/deps/g3dlite/include/G3D/Pointer.h | 292 - .../deps/g3dlite/include/G3D/PositionTrait.h | 7 - .../deps/g3dlite/include/G3D/PrecomputedRandom.h | 110 - .../worldengine/deps/g3dlite/include/G3D/Quat.h | 741 - .../worldengine/deps/g3dlite/include/G3D/Queue.h | 364 - .../worldengine/deps/g3dlite/include/G3D/Random.h | 139 - modules/worldengine/deps/g3dlite/include/G3D/Ray.h | 371 - .../worldengine/deps/g3dlite/include/G3D/Rect2D.h | 417 - .../deps/g3dlite/include/G3D/ReferenceCount.h | 570 - .../deps/g3dlite/include/G3D/RegistryUtil.h | 97 - modules/worldengine/deps/g3dlite/include/G3D/Set.h | 189 - .../deps/g3dlite/include/G3D/SmallArray.h | 161 - .../worldengine/deps/g3dlite/include/G3D/Sphere.h | 147 - .../worldengine/deps/g3dlite/include/G3D/Spline.h | 368 - .../deps/g3dlite/include/G3D/Stopwatch.h | 144 - .../worldengine/deps/g3dlite/include/G3D/System.h | 510 - .../worldengine/deps/g3dlite/include/G3D/Table.h | 923 - .../deps/g3dlite/include/G3D/TextInput.h | 828 - .../deps/g3dlite/include/G3D/TextOutput.h | 249 - .../deps/g3dlite/include/G3D/ThreadSet.h | 87 - .../deps/g3dlite/include/G3D/Triangle.h | 160 - .../deps/g3dlite/include/G3D/UprightFrame.h | 83 - .../worldengine/deps/g3dlite/include/G3D/Vector2.h | 454 - .../deps/g3dlite/include/G3D/Vector2int16.h | 127 - .../worldengine/deps/g3dlite/include/G3D/Vector3.h | 798 - .../deps/g3dlite/include/G3D/Vector3int16.h | 127 - .../deps/g3dlite/include/G3D/Vector3int32.h | 128 - .../worldengine/deps/g3dlite/include/G3D/Vector4.h | 716 - .../deps/g3dlite/include/G3D/Vector4int8.h | 113 - .../deps/g3dlite/include/G3D/WeakCache.h | 122 - .../worldengine/deps/g3dlite/include/G3D/Welder.h | 82 - .../deps/g3dlite/include/G3D/WrapMode.h | 91 - modules/worldengine/deps/g3dlite/include/G3D/XML.h | 204 - .../deps/g3dlite/include/G3D/constants.h | 145 - .../worldengine/deps/g3dlite/include/G3D/debug.h | 66 - .../deps/g3dlite/include/G3D/debugAssert.h | 233 - .../deps/g3dlite/include/G3D/debugPrintf.h | 62 - .../deps/g3dlite/include/G3D/enumclass.h | 205 - .../deps/g3dlite/include/G3D/fileutils.h | 165 - .../worldengine/deps/g3dlite/include/G3D/filter.h | 29 - .../worldengine/deps/g3dlite/include/G3D/format.h | 44 - .../deps/g3dlite/include/G3D/g3dfnmatch.h | 83 - .../worldengine/deps/g3dlite/include/G3D/g3dmath.h | 861 - .../deps/g3dlite/include/G3D/netheaders.h | 24 - .../deps/g3dlite/include/G3D/networkHelpers.h | 91 - .../deps/g3dlite/include/G3D/platform.h | 344 - .../worldengine/deps/g3dlite/include/G3D/prompt.h | 67 - .../deps/g3dlite/include/G3D/serialize.h | 30 - .../deps/g3dlite/include/G3D/splinefunc.h | 118 - .../deps/g3dlite/include/G3D/stringutils.h | 167 - .../worldengine/deps/g3dlite/include/G3D/uint128.h | 51 - .../worldengine/deps/g3dlite/include/G3D/units.h | 126 - .../deps/g3dlite/include/G3D/vectorMath.h | 235 - modules/worldengine/deps/g3dlite/source/AABox.cpp | 370 - modules/worldengine/deps/g3dlite/source/Any.cpp | 1350 - modules/worldengine/deps/g3dlite/source/AnyVal.cpp | 1379 - .../deps/g3dlite/source/AreaMemoryManager.cpp | 87 - .../deps/g3dlite/source/BinaryFormat.cpp | 81 - .../deps/g3dlite/source/BinaryInput.cpp | 621 - .../deps/g3dlite/source/BinaryOutput.cpp | 534 - modules/worldengine/deps/g3dlite/source/Box.cpp | 393 - modules/worldengine/deps/g3dlite/source/Box2D.cpp | 113 - .../deps/g3dlite/source/BumpMapPreprocess.cpp | 43 - .../worldengine/deps/g3dlite/source/Capsule.cpp | 179 - .../deps/g3dlite/source/CollisionDetection.cpp | 2455 -- modules/worldengine/deps/g3dlite/source/Color1.cpp | 58 - .../deps/g3dlite/source/Color1uint8.cpp | 38 - modules/worldengine/deps/g3dlite/source/Color3.cpp | 384 - .../deps/g3dlite/source/Color3uint8.cpp | 45 - modules/worldengine/deps/g3dlite/source/Color4.cpp | 192 - .../deps/g3dlite/source/Color4uint8.cpp | 47 - modules/worldengine/deps/g3dlite/source/Cone.cpp | 79 - .../deps/g3dlite/source/ConvexPolyhedron.cpp | 457 - .../deps/g3dlite/source/CoordinateFrame.cpp | 465 - modules/worldengine/deps/g3dlite/source/Crypto.cpp | 70 - .../worldengine/deps/g3dlite/source/Crypto_md5.cpp | 471 - .../worldengine/deps/g3dlite/source/Cylinder.cpp | 176 - .../worldengine/deps/g3dlite/source/FileSystem.cpp | 874 - .../worldengine/deps/g3dlite/source/GCamera.cpp | 511 - modules/worldengine/deps/g3dlite/source/GImage.cpp | 1166 - .../deps/g3dlite/source/GImage_bayer.cpp | 298 - .../worldengine/deps/g3dlite/source/GImage_bmp.cpp | 717 - .../deps/g3dlite/source/GImage_jpeg.cpp | 446 - .../worldengine/deps/g3dlite/source/GImage_png.cpp | 276 - .../worldengine/deps/g3dlite/source/GImage_ppm.cpp | 217 - .../worldengine/deps/g3dlite/source/GImage_tga.cpp | 236 - modules/worldengine/deps/g3dlite/source/GLight.cpp | 275 - .../worldengine/deps/g3dlite/source/GThread.cpp | 229 - .../worldengine/deps/g3dlite/source/GUniqueID.cpp | 78 - modules/worldengine/deps/g3dlite/source/Image1.cpp | 224 - .../deps/g3dlite/source/Image1uint8.cpp | 212 - modules/worldengine/deps/g3dlite/source/Image3.cpp | 225 - .../deps/g3dlite/source/Image3uint8.cpp | 225 - modules/worldengine/deps/g3dlite/source/Image4.cpp | 226 - .../deps/g3dlite/source/Image4uint8.cpp | 222 - .../deps/g3dlite/source/ImageFormat.cpp | 588 - .../deps/g3dlite/source/ImageFormat_convert.cpp | 1307 - .../worldengine/deps/g3dlite/source/Intersect.cpp | 844 - modules/worldengine/deps/g3dlite/source/Line.cpp | 89 - .../deps/g3dlite/source/LineSegment.cpp | 236 - modules/worldengine/deps/g3dlite/source/Log.cpp | 147 - modules/worldengine/deps/g3dlite/source/Matrix.cpp | 1802 - .../worldengine/deps/g3dlite/source/Matrix3.cpp | 1933 - .../worldengine/deps/g3dlite/source/Matrix4.cpp | 528 - .../deps/g3dlite/source/MemoryManager.cpp | 91 - .../worldengine/deps/g3dlite/source/MeshAlg.cpp | 637 - .../deps/g3dlite/source/MeshAlgAdjacency.cpp | 745 - .../deps/g3dlite/source/MeshAlgWeld.cpp | 213 - .../deps/g3dlite/source/MeshBuilder.cpp | 113 - .../worldengine/deps/g3dlite/source/NetAddress.cpp | 164 - .../deps/g3dlite/source/NetworkDevice.cpp | 1274 - .../deps/g3dlite/source/PhysicsFrame.cpp | 110 - .../deps/g3dlite/source/PhysicsFrameSpline.cpp | 80 - modules/worldengine/deps/g3dlite/source/Plane.cpp | 149 - .../deps/g3dlite/source/PrecomputedRandom.cpp | 125 - modules/worldengine/deps/g3dlite/source/Quat.cpp | 599 - modules/worldengine/deps/g3dlite/source/Random.cpp | 212 - modules/worldengine/deps/g3dlite/source/Ray.cpp | 218 - modules/worldengine/deps/g3dlite/source/Rect2D.cpp | 41 - .../deps/g3dlite/source/ReferenceCount.cpp | 61 - .../deps/g3dlite/source/RegistryUtil.cpp | 299 - modules/worldengine/deps/g3dlite/source/Sphere.cpp | 223 - .../worldengine/deps/g3dlite/source/SplineBase.cpp | 162 - .../worldengine/deps/g3dlite/source/Stopwatch.cpp | 119 - modules/worldengine/deps/g3dlite/source/System.cpp | 1765 - .../worldengine/deps/g3dlite/source/TextInput.cpp | 1222 - .../worldengine/deps/g3dlite/source/TextOutput.cpp | 453 - .../worldengine/deps/g3dlite/source/ThreadSet.cpp | 166 - .../worldengine/deps/g3dlite/source/Triangle.cpp | 186 - .../deps/g3dlite/source/UprightFrame.cpp | 132 - .../worldengine/deps/g3dlite/source/Vector2.cpp | 224 - .../deps/g3dlite/source/Vector2int16.cpp | 47 - .../worldengine/deps/g3dlite/source/Vector3.cpp | 504 - .../deps/g3dlite/source/Vector3int16.cpp | 49 - .../deps/g3dlite/source/Vector3int32.cpp | 57 - .../worldengine/deps/g3dlite/source/Vector4.cpp | 515 - .../deps/g3dlite/source/Vector4int8.cpp | 58 - modules/worldengine/deps/g3dlite/source/Welder.cpp | 425 - .../worldengine/deps/g3dlite/source/WinMain.cpp | 159 - modules/worldengine/deps/g3dlite/source/XML.cpp | 216 - .../worldengine/deps/g3dlite/source/constants.cpp | 16 - .../deps/g3dlite/source/debugAssert.cpp | 389 - .../worldengine/deps/g3dlite/source/fileutils.cpp | 942 - modules/worldengine/deps/g3dlite/source/filter.cpp | 32 - modules/worldengine/deps/g3dlite/source/format.cpp | 164 - .../worldengine/deps/g3dlite/source/g3dfnmatch.cpp | 223 - .../worldengine/deps/g3dlite/source/g3dmath.cpp | 109 - .../worldengine/deps/g3dlite/source/license.cpp | 73 - modules/worldengine/deps/g3dlite/source/prompt.cpp | 738 - .../deps/g3dlite/source/stringutils.cpp | 275 - .../worldengine/deps/g3dlite/source/uint128.cpp | 155 - modules/worldengine/deps/gsoap/CMakeLists.txt | 31 - modules/worldengine/deps/gsoap/gsoap.stub | 1 - modules/worldengine/deps/gsoap/soapC.cpp | 1710 - modules/worldengine/deps/gsoap/soapH.h | 674 - modules/worldengine/deps/gsoap/soapServer.cpp | 115 - modules/worldengine/deps/gsoap/soapStub.h | 361 - modules/worldengine/deps/gsoap/stdsoap2.cpp | 18907 ---------- modules/worldengine/deps/gsoap/stdsoap2.h | 3418 -- modules/worldengine/deps/gsoap/tc_upgrades.txt | 11 - modules/worldengine/deps/jemalloc/CMakeLists.txt | 60 - modules/worldengine/deps/jemalloc/COPYING | 27 - modules/worldengine/deps/jemalloc/ChangeLog | 548 - modules/worldengine/deps/jemalloc/README | 20 - modules/worldengine/deps/jemalloc/TC_NOTE.txt | 4 - modules/worldengine/deps/jemalloc/VERSION | 1 - .../jemalloc/include/jemalloc/internal/arena.h | 1063 - .../jemalloc/include/jemalloc/internal/atomic.h | 304 - .../deps/jemalloc/include/jemalloc/internal/base.h | 26 - .../jemalloc/include/jemalloc/internal/bitmap.h | 184 - .../jemalloc/include/jemalloc/internal/chunk.h | 63 - .../jemalloc/include/jemalloc/internal/chunk_dss.h | 38 - .../include/jemalloc/internal/chunk_mmap.h | 22 - .../deps/jemalloc/include/jemalloc/internal/ckh.h | 88 - .../deps/jemalloc/include/jemalloc/internal/ctl.h | 117 - .../jemalloc/include/jemalloc/internal/extent.h | 46 - .../deps/jemalloc/include/jemalloc/internal/hash.h | 335 - .../deps/jemalloc/include/jemalloc/internal/huge.h | 46 - .../include/jemalloc/internal/jemalloc_internal.h | 1059 - .../deps/jemalloc/include/jemalloc/internal/mb.h | 115 - .../jemalloc/include/jemalloc/internal/mutex.h | 99 - .../include/jemalloc/internal/private_namespace.h | 413 - .../deps/jemalloc/include/jemalloc/internal/prng.h | 60 - .../deps/jemalloc/include/jemalloc/internal/prof.h | 613 - .../deps/jemalloc/include/jemalloc/internal/ql.h | 83 - .../deps/jemalloc/include/jemalloc/internal/qr.h | 67 - .../include/jemalloc/internal/quarantine.h | 67 - .../deps/jemalloc/include/jemalloc/internal/rb.h | 969 - .../jemalloc/include/jemalloc/internal/rtree.h | 172 - .../include/jemalloc/internal/size_classes.h | 721 - .../jemalloc/include/jemalloc/internal/stats.h | 173 - .../jemalloc/include/jemalloc/internal/tcache.h | 443 - .../deps/jemalloc/include/jemalloc/internal/tsd.h | 434 - .../deps/jemalloc/include/jemalloc/internal/util.h | 162 - .../deps/jemalloc/include/jemalloc/jemalloc.h | 182 - .../deps/jemalloc/include/msvc_compat/inttypes.h | 313 - .../deps/jemalloc/include/msvc_compat/stdbool.h | 16 - .../deps/jemalloc/include/msvc_compat/stdint.h | 247 - .../deps/jemalloc/include/msvc_compat/strings.h | 23 - .../deps/jemalloc/jemalloc_defs.h.in.cmake | 274 - modules/worldengine/deps/jemalloc/src/arena.c | 2577 -- modules/worldengine/deps/jemalloc/src/atomic.c | 2 - modules/worldengine/deps/jemalloc/src/base.c | 142 - modules/worldengine/deps/jemalloc/src/bitmap.c | 90 - modules/worldengine/deps/jemalloc/src/chunk.c | 395 - modules/worldengine/deps/jemalloc/src/chunk_dss.c | 198 - modules/worldengine/deps/jemalloc/src/chunk_mmap.c | 210 - modules/worldengine/deps/jemalloc/src/ckh.c | 563 - modules/worldengine/deps/jemalloc/src/ctl.c | 1684 - modules/worldengine/deps/jemalloc/src/extent.c | 39 - modules/worldengine/deps/jemalloc/src/hash.c | 2 - modules/worldengine/deps/jemalloc/src/huge.c | 347 - modules/worldengine/deps/jemalloc/src/jemalloc.c | 2111 -- modules/worldengine/deps/jemalloc/src/mb.c | 2 - modules/worldengine/deps/jemalloc/src/mutex.c | 149 - modules/worldengine/deps/jemalloc/src/prof.c | 1420 - modules/worldengine/deps/jemalloc/src/quarantine.c | 199 - modules/worldengine/deps/jemalloc/src/rtree.c | 105 - modules/worldengine/deps/jemalloc/src/stats.c | 549 - modules/worldengine/deps/jemalloc/src/tcache.c | 479 - modules/worldengine/deps/jemalloc/src/tsd.c | 141 - modules/worldengine/deps/jemalloc/src/util.c | 648 - modules/worldengine/deps/jemalloc/src/zone.c | 258 - modules/worldengine/deps/libmpq/AUTHORS | 10 - modules/worldengine/deps/libmpq/CMakeLists.txt | 34 - modules/worldengine/deps/libmpq/COPYING | 339 - modules/worldengine/deps/libmpq/FAQ | 68 - modules/worldengine/deps/libmpq/INSTALL | 182 - modules/worldengine/deps/libmpq/Makefile.am | 26 - modules/worldengine/deps/libmpq/NEWS | 76 - modules/worldengine/deps/libmpq/README | 34 - modules/worldengine/deps/libmpq/THANKS | 21 - modules/worldengine/deps/libmpq/TODO | 10 - modules/worldengine/deps/libmpq/autogen.sh | 19 - .../worldengine/deps/libmpq/bindings/Makefile.am | 6 - .../worldengine/deps/libmpq/bindings/d/Makefile.am | 6 - .../worldengine/deps/libmpq/bindings/d/dsss.conf | 2 - modules/worldengine/deps/libmpq/bindings/d/mpq.d | 318 - .../deps/libmpq/bindings/python/Makefile.am | 5 - .../deps/libmpq/bindings/python/mpq-info | 16 - .../worldengine/deps/libmpq/bindings/python/mpq.py | 322 - modules/worldengine/deps/libmpq/config.h | 74 - modules/worldengine/deps/libmpq/configure.ac | 84 - modules/worldengine/deps/libmpq/debian/changelog | 35 - modules/worldengine/deps/libmpq/debian/compat | 1 - modules/worldengine/deps/libmpq/debian/control | 50 - modules/worldengine/deps/libmpq/debian/copyright | 23 - .../worldengine/deps/libmpq/debian/libmpq-dev.dirs | 6 - .../deps/libmpq/debian/libmpq-dev.install | 6 - .../worldengine/deps/libmpq/debian/libmpq0.dirs | 1 - .../worldengine/deps/libmpq/debian/libmpq0.docs | 6 - .../worldengine/deps/libmpq/debian/libmpq0.install | 1 - .../deps/libmpq/debian/python-mpq.install | 1 - modules/worldengine/deps/libmpq/debian/rules | 112 - modules/worldengine/deps/libmpq/doc/Makefile.am | 5 - .../worldengine/deps/libmpq/doc/man1/Makefile.am | 9 - .../deps/libmpq/doc/man1/libmpq-config.1 | 69 - .../worldengine/deps/libmpq/doc/man3/Makefile.am | 31 - modules/worldengine/deps/libmpq/doc/man3/libmpq.3 | 207 - .../deps/libmpq/doc/man3/libmpq__archive_close.3 | 57 - .../deps/libmpq/doc/man3/libmpq__archive_files.3 | 50 - .../deps/libmpq/doc/man3/libmpq__archive_offset.3 | 51 - .../deps/libmpq/doc/man3/libmpq__archive_open.3 | 71 - .../libmpq/doc/man3/libmpq__archive_packed_size.3 | 51 - .../doc/man3/libmpq__archive_unpacked_size.3 | 51 - .../deps/libmpq/doc/man3/libmpq__archive_version.3 | 48 - .../libmpq/doc/man3/libmpq__block_close_offset.3 | 53 - .../libmpq/doc/man3/libmpq__block_open_offset.3 | 65 - .../deps/libmpq/doc/man3/libmpq__block_read.3 | 78 - .../libmpq/doc/man3/libmpq__block_unpacked_size.3 | 59 - .../deps/libmpq/doc/man3/libmpq__file_blocks.3 | 54 - .../deps/libmpq/doc/man3/libmpq__file_compressed.3 | 54 - .../deps/libmpq/doc/man3/libmpq__file_encrypted.3 | 54 - .../deps/libmpq/doc/man3/libmpq__file_imploded.3 | 54 - .../deps/libmpq/doc/man3/libmpq__file_number.3 | 52 - .../deps/libmpq/doc/man3/libmpq__file_offset.3 | 55 - .../libmpq/doc/man3/libmpq__file_packed_size.3 | 55 - .../deps/libmpq/doc/man3/libmpq__file_read.3 | 77 - .../libmpq/doc/man3/libmpq__file_unpacked_size.3 | 55 - .../deps/libmpq/doc/man3/libmpq__strerror.3 | 45 - .../deps/libmpq/doc/man3/libmpq__version.3 | 45 - modules/worldengine/deps/libmpq/libmpq-config.in | 57 - modules/worldengine/deps/libmpq/libmpq.pc.in | 10 - modules/worldengine/deps/libmpq/libmpq/Makefile.am | 23 - modules/worldengine/deps/libmpq/libmpq/common.c | 220 - modules/worldengine/deps/libmpq/libmpq/common.h | 61 - modules/worldengine/deps/libmpq/libmpq/crypt_buf.h | 217 - modules/worldengine/deps/libmpq/libmpq/explode.c | 602 - modules/worldengine/deps/libmpq/libmpq/explode.h | 87 - modules/worldengine/deps/libmpq/libmpq/extract.c | 361 - modules/worldengine/deps/libmpq/libmpq/extract.h | 106 - modules/worldengine/deps/libmpq/libmpq/huffman.c | 1101 - modules/worldengine/deps/libmpq/libmpq/huffman.h | 151 - .../worldengine/deps/libmpq/libmpq/mpq-internal.h | 145 - modules/worldengine/deps/libmpq/libmpq/mpq.c | 1004 - modules/worldengine/deps/libmpq/libmpq/mpq.h | 101 - .../worldengine/deps/libmpq/libmpq/pack_begin.h | 34 - modules/worldengine/deps/libmpq/libmpq/pack_end.h | 31 - modules/worldengine/deps/libmpq/libmpq/platform.h | 28 - modules/worldengine/deps/libmpq/libmpq/wave.c | 250 - modules/worldengine/deps/libmpq/libmpq/wave.h | 45 - modules/worldengine/deps/libmpq/tools/Makefile.am | 8 - .../worldengine/deps/libmpq/tools/crypt_buf_gen.c | 85 - modules/worldengine/deps/libmpq/win/config.h | 81 - modules/worldengine/deps/libmpq/win/dirent.h | 230 - modules/worldengine/deps/libmpq/win/stdint.h | 247 - modules/worldengine/deps/mysqllite/CMakeLists.txt | 261 - modules/worldengine/deps/mysqllite/COPYING | 339 - modules/worldengine/deps/mysqllite/README | 2254 -- modules/worldengine/deps/mysqllite/VERSION | 4 - .../deps/mysqllite/cmake/character_sets.cmake | 43 - .../deps/mysqllite/cmake/mysql_version.cmake | 107 - .../deps/mysqllite/cmake/os/Windows.cmake | 142 - .../deps/mysqllite/cmake/os/WindowsCache.cmake | 356 - .../deps/mysqllite/cmake/stack_direction.c | 31 - .../deps/mysqllite/cmake/versioninfo.rc.in | 23 - modules/worldengine/deps/mysqllite/config.h.cmake | 618 - modules/worldengine/deps/mysqllite/configure.cmake | 1101 - modules/worldengine/deps/mysqllite/dbug/dbug.c | 2284 -- .../worldengine/deps/mysqllite/dbug/dbug_long.h | 160 - modules/worldengine/deps/mysqllite/dbug/monty.doc | 9 - modules/worldengine/deps/mysqllite/dbug/user.r | 1213 - .../worldengine/deps/mysqllite/include/decimal.h | 107 - .../worldengine/deps/mysqllite/include/errmsg.h | 108 - .../include/internal/atomic/gcc_builtins.h | 42 - .../include/internal/atomic/generic-msvc.h | 134 - .../mysqllite/include/internal/atomic/nolock.h | 69 - .../mysqllite/include/internal/atomic/rwlock.h | 100 - .../mysqllite/include/internal/atomic/solaris.h | 72 - .../mysqllite/include/internal/atomic/x86-gcc.h | 145 - .../deps/mysqllite/include/internal/base64.h | 48 - .../deps/mysqllite/include/internal/hash.h | 108 - .../deps/mysqllite/include/internal/lf.h | 265 - .../deps/mysqllite/include/internal/my_aes.h | 70 - .../deps/mysqllite/include/internal/my_alarm.h | 58 - .../deps/mysqllite/include/internal/my_atomic.h | 287 - .../deps/mysqllite/include/internal/my_base.h | 572 - .../deps/mysqllite/include/internal/my_bit.h | 105 - .../deps/mysqllite/include/internal/my_bitmap.h | 142 - .../deps/mysqllite/include/internal/my_handler.h | 130 - .../deps/mysqllite/include/internal/my_libwrap.h | 31 - .../deps/mysqllite/include/internal/my_md5.h | 59 - .../deps/mysqllite/include/internal/my_nosys.h | 52 - .../deps/mysqllite/include/internal/my_rdtsc.h | 129 - .../mysqllite/include/internal/my_stacktrace.h | 64 - .../deps/mysqllite/include/internal/my_time.h | 170 - .../deps/mysqllite/include/internal/my_tree.h | 96 - .../deps/mysqllite/include/internal/my_uctype.h | 1483 - .../deps/mysqllite/include/internal/myisampack.h | 242 - .../mysqllite/include/internal/mysql_version.h.in | 30 - .../deps/mysqllite/include/internal/mysys_err.h | 93 - .../deps/mysqllite/include/internal/password.h | 32 - .../deps/mysqllite/include/internal/probes_mysql.h | 13 - .../include/internal/probes_mysql_nodtrace.h | 129 - .../deps/mysqllite/include/internal/queues.h | 75 - .../deps/mysqllite/include/internal/rijndael.h | 46 - .../deps/mysqllite/include/internal/sha1.h | 104 - .../deps/mysqllite/include/internal/t_ctype.h | 254 - .../deps/mysqllite/include/internal/thr_alarm.h | 110 - .../deps/mysqllite/include/internal/thr_lock.h | 163 - .../deps/mysqllite/include/internal/violite.h | 241 - .../worldengine/deps/mysqllite/include/keycache.h | 146 - .../worldengine/deps/mysqllite/include/m_ctype.h | 660 - .../worldengine/deps/mysqllite/include/m_string.h | 295 - .../worldengine/deps/mysqllite/include/my_alloc.h | 60 - .../deps/mysqllite/include/my_attribute.h | 69 - .../deps/mysqllite/include/my_compiler.h | 145 - .../worldengine/deps/mysqllite/include/my_dbug.h | 194 - .../worldengine/deps/mysqllite/include/my_dir.h | 109 - .../worldengine/deps/mysqllite/include/my_getopt.h | 123 - .../worldengine/deps/mysqllite/include/my_global.h | 1482 - .../worldengine/deps/mysqllite/include/my_list.h | 45 - .../worldengine/deps/mysqllite/include/my_net.h | 110 - .../deps/mysqllite/include/my_pthread.h | 943 - .../worldengine/deps/mysqllite/include/my_sys.h | 959 - .../worldengine/deps/mysqllite/include/my_xml.h | 89 - modules/worldengine/deps/mysqllite/include/mysql.h | 713 - .../deps/mysqllite/include/mysql/client_plugin.h | 163 - .../deps/mysqllite/include/mysql/innodb_priv.h | 36 - .../deps/mysqllite/include/mysql/plugin.h | 633 - .../deps/mysqllite/include/mysql/plugin_audit.h | 138 - .../deps/mysqllite/include/mysql/plugin_auth.h | 125 - .../mysqllite/include/mysql/plugin_auth_common.h | 105 - .../deps/mysqllite/include/mysql/plugin_ftparser.h | 211 - .../deps/mysqllite/include/mysql/psi/mysql_file.h | 1434 - .../mysqllite/include/mysql/psi/mysql_thread.h | 1071 - .../deps/mysqllite/include/mysql/psi/psi.h | 1312 - .../deps/mysqllite/include/mysql/psi/psi_abi_v1.h | 26 - .../deps/mysqllite/include/mysql/psi/psi_abi_v2.h | 26 - .../mysqllite/include/mysql/service_my_snprintf.h | 101 - .../mysqllite/include/mysql/service_thd_alloc.h | 130 - .../mysqllite/include/mysql/service_thd_wait.h | 83 - .../include/mysql/service_thread_scheduler.h | 65 - .../deps/mysqllite/include/mysql/services.h | 32 - .../worldengine/deps/mysqllite/include/mysql_com.h | 572 - .../deps/mysqllite/include/mysql_embed.h | 31 - .../deps/mysqllite/include/mysql_time.h | 55 - .../deps/mysqllite/include/mysqld_ername.h | 708 - .../deps/mysqllite/include/mysqld_error.h | 710 - .../worldengine/deps/mysqllite/include/plugin.h | 633 - .../deps/mysqllite/include/plugin_audit.h | 138 - .../deps/mysqllite/include/plugin_ftparser.h | 211 - .../deps/mysqllite/include/sql_common.h | 113 - .../worldengine/deps/mysqllite/include/sql_state.h | 220 - .../deps/mysqllite/include/sslopt-case.h | 32 - .../deps/mysqllite/include/sslopt-longopts.h | 49 - .../deps/mysqllite/include/sslopt-vars.h | 35 - .../worldengine/deps/mysqllite/include/typelib.h | 44 - .../deps/mysqllite/libmysql/client_settings.h | 65 - .../worldengine/deps/mysqllite/libmysql/errmsg.c | 125 - .../deps/mysqllite/libmysql/get_password.c | 209 - .../worldengine/deps/mysqllite/libmysql/libmysql.c | 4832 --- .../deps/mysqllite/libmysql/libmysql_exports.def | 107 - modules/worldengine/deps/mysqllite/mysys/ChangeLog | 221 - modules/worldengine/deps/mysqllite/mysys/array.c | 383 - modules/worldengine/deps/mysqllite/mysys/base64.c | 311 - .../worldengine/deps/mysqllite/mysys/charset-def.c | 354 - modules/worldengine/deps/mysqllite/mysys/charset.c | 937 - .../worldengine/deps/mysqllite/mysys/checksum.c | 35 - modules/worldengine/deps/mysqllite/mysys/default.c | 1217 - modules/worldengine/deps/mysqllite/mysys/errors.c | 119 - modules/worldengine/deps/mysqllite/mysys/hash.c | 769 - .../deps/mysqllite/mysys/lf_alloc-pin.c | 527 - .../worldengine/deps/mysqllite/mysys/lf_dynarray.c | 207 - modules/worldengine/deps/mysqllite/mysys/lf_hash.c | 503 - modules/worldengine/deps/mysqllite/mysys/list.c | 114 - modules/worldengine/deps/mysqllite/mysys/md5.c | 325 - .../deps/mysqllite/mysys/mf_arr_appstr.c | 61 - .../worldengine/deps/mysqllite/mysys/mf_cache.c | 121 - .../worldengine/deps/mysqllite/mysys/mf_dirname.c | 154 - .../worldengine/deps/mysqllite/mysys/mf_fn_ext.c | 54 - .../worldengine/deps/mysqllite/mysys/mf_format.c | 142 - .../worldengine/deps/mysqllite/mysys/mf_getdate.c | 81 - .../worldengine/deps/mysqllite/mysys/mf_iocache.c | 1949 -- .../worldengine/deps/mysqllite/mysys/mf_iocache2.c | 472 - .../worldengine/deps/mysqllite/mysys/mf_keycache.c | 4523 --- .../deps/mysqllite/mysys/mf_keycaches.c | 361 - .../worldengine/deps/mysqllite/mysys/mf_loadpath.c | 55 - modules/worldengine/deps/mysqllite/mysys/mf_pack.c | 460 - modules/worldengine/deps/mysqllite/mysys/mf_path.c | 120 - .../worldengine/deps/mysqllite/mysys/mf_qsort.c | 216 - .../worldengine/deps/mysqllite/mysys/mf_qsort2.c | 19 - .../worldengine/deps/mysqllite/mysys/mf_radix.c | 54 - modules/worldengine/deps/mysqllite/mysys/mf_same.c | 40 - modules/worldengine/deps/mysqllite/mysys/mf_sort.c | 41 - .../worldengine/deps/mysqllite/mysys/mf_soundex.c | 105 - .../worldengine/deps/mysqllite/mysys/mf_tempdir.c | 95 - .../worldengine/deps/mysqllite/mysys/mf_tempfile.c | 177 - .../worldengine/deps/mysqllite/mysys/mf_unixpath.c | 36 - .../worldengine/deps/mysqllite/mysys/mf_wcomp.c | 89 - .../worldengine/deps/mysqllite/mysys/mulalloc.c | 63 - .../worldengine/deps/mysqllite/mysys/my_access.c | 201 - modules/worldengine/deps/mysqllite/mysys/my_aes.c | 227 - .../worldengine/deps/mysqllite/mysys/my_alarm.c | 32 - .../worldengine/deps/mysqllite/mysys/my_alloc.c | 436 - .../worldengine/deps/mysqllite/mysys/my_atomic.c | 67 - modules/worldengine/deps/mysqllite/mysys/my_bit.c | 64 - .../worldengine/deps/mysqllite/mysys/my_bitmap.c | 932 - .../worldengine/deps/mysqllite/mysys/my_chsize.c | 107 - .../worldengine/deps/mysqllite/mysys/my_compress.c | 264 - .../worldengine/deps/mysqllite/mysys/my_conio.c | 222 - modules/worldengine/deps/mysqllite/mysys/my_copy.c | 144 - .../worldengine/deps/mysqllite/mysys/my_create.c | 73 - .../worldengine/deps/mysqllite/mysys/my_delete.c | 125 - modules/worldengine/deps/mysqllite/mysys/my_div.c | 37 - .../worldengine/deps/mysqllite/mysys/my_error.c | 290 - modules/worldengine/deps/mysqllite/mysys/my_file.c | 135 - .../worldengine/deps/mysqllite/mysys/my_fopen.c | 358 - .../worldengine/deps/mysqllite/mysys/my_fstream.c | 194 - .../deps/mysqllite/mysys/my_gethostbyname.c | 111 - .../deps/mysqllite/mysys/my_gethwaddr.c | 226 - .../worldengine/deps/mysqllite/mysys/my_getncpus.c | 49 - .../worldengine/deps/mysqllite/mysys/my_getopt.c | 1419 - .../deps/mysqllite/mysys/my_getpagesize.c | 40 - .../deps/mysqllite/mysys/my_getsystime.c | 226 - .../worldengine/deps/mysqllite/mysys/my_getwd.c | 167 - .../worldengine/deps/mysqllite/mysys/my_handler.c | 604 - .../deps/mysqllite/mysys/my_handler_errors.h | 71 - modules/worldengine/deps/mysqllite/mysys/my_init.c | 607 - .../deps/mysqllite/mysys/my_largepage.c | 166 - modules/worldengine/deps/mysqllite/mysys/my_lib.c | 424 - .../worldengine/deps/mysqllite/mysys/my_libwrap.c | 41 - modules/worldengine/deps/mysqllite/mysys/my_lock.c | 223 - .../worldengine/deps/mysqllite/mysys/my_lockmem.c | 98 - .../worldengine/deps/mysqllite/mysys/my_malloc.c | 162 - .../worldengine/deps/mysqllite/mysys/my_memmem.c | 83 - modules/worldengine/deps/mysqllite/mysys/my_mess.c | 34 - .../worldengine/deps/mysqllite/mysys/my_mkdir.c | 42 - modules/worldengine/deps/mysqllite/mysys/my_mmap.c | 88 - modules/worldengine/deps/mysqllite/mysys/my_new.cc | 58 - modules/worldengine/deps/mysqllite/mysys/my_once.c | 119 - modules/worldengine/deps/mysqllite/mysys/my_open.c | 192 - modules/worldengine/deps/mysqllite/mysys/my_port.c | 40 - .../worldengine/deps/mysqllite/mysys/my_pread.c | 206 - .../worldengine/deps/mysqllite/mysys/my_pthread.c | 469 - .../worldengine/deps/mysqllite/mysys/my_quick.c | 81 - .../worldengine/deps/mysqllite/mysys/my_rdtsc.c | 962 - modules/worldengine/deps/mysqllite/mysys/my_read.c | 97 - .../worldengine/deps/mysqllite/mysys/my_redel.c | 124 - .../worldengine/deps/mysqllite/mysys/my_rename.c | 79 - modules/worldengine/deps/mysqllite/mysys/my_seek.c | 102 - .../worldengine/deps/mysqllite/mysys/my_sleep.c | 35 - .../worldengine/deps/mysqllite/mysys/my_static.c | 135 - .../worldengine/deps/mysqllite/mysys/my_static.h | 50 - .../worldengine/deps/mysqllite/mysys/my_symlink.c | 167 - .../worldengine/deps/mysqllite/mysys/my_symlink2.c | 183 - modules/worldengine/deps/mysqllite/mysys/my_sync.c | 175 - .../worldengine/deps/mysqllite/mysys/my_thr_init.c | 533 - .../worldengine/deps/mysqllite/mysys/my_wincond.c | 369 - .../worldengine/deps/mysqllite/mysys/my_windac.c | 223 - .../worldengine/deps/mysqllite/mysys/my_winerr.c | 123 - .../worldengine/deps/mysqllite/mysys/my_winfile.c | 681 - .../deps/mysqllite/mysys/my_winthread.c | 192 - .../worldengine/deps/mysqllite/mysys/my_write.c | 100 - .../worldengine/deps/mysqllite/mysys/mysys_priv.h | 107 - modules/worldengine/deps/mysqllite/mysys/ptr_cmp.c | 223 - modules/worldengine/deps/mysqllite/mysys/queues.c | 687 - .../worldengine/deps/mysqllite/mysys/rijndael.c | 1379 - modules/worldengine/deps/mysqllite/mysys/sha1.c | 422 - .../worldengine/deps/mysqllite/mysys/stacktrace.c | 714 - modules/worldengine/deps/mysqllite/mysys/string.c | 182 - .../worldengine/deps/mysqllite/mysys/thr_alarm.c | 972 - .../worldengine/deps/mysqllite/mysys/thr_lock.c | 1688 - .../worldengine/deps/mysqllite/mysys/thr_mutex.c | 503 - .../worldengine/deps/mysqllite/mysys/thr_rwlock.c | 472 - modules/worldengine/deps/mysqllite/mysys/tree.c | 757 - modules/worldengine/deps/mysqllite/mysys/typelib.c | 388 - .../worldengine/deps/mysqllite/sql-common/client.c | 4273 --- .../deps/mysqllite/sql-common/client_plugin.c | 471 - .../deps/mysqllite/sql-common/my_time.c | 1256 - .../worldengine/deps/mysqllite/sql-common/pack.c | 121 - modules/worldengine/deps/mysqllite/sql/net_serv.cc | 1186 - modules/worldengine/deps/mysqllite/sql/password.c | 562 - .../deps/mysqllite/strings/CHARSET_INFO.txt | 281 - modules/worldengine/deps/mysqllite/strings/README | 82 - .../worldengine/deps/mysqllite/strings/bchange.c | 38 - .../worldengine/deps/mysqllite/strings/bmove_upp.c | 32 - .../deps/mysqllite/strings/ctype-big5.c | 6983 ---- .../worldengine/deps/mysqllite/strings/ctype-bin.c | 579 - .../deps/mysqllite/strings/ctype-cp932.c | 34889 ------------------- .../deps/mysqllite/strings/ctype-czech.c | 639 - .../deps/mysqllite/strings/ctype-euc_kr.c | 10072 ------ .../deps/mysqllite/strings/ctype-extra.c | 8649 ----- .../deps/mysqllite/strings/ctype-gb2312.c | 6474 ---- .../worldengine/deps/mysqllite/strings/ctype-gbk.c | 10869 ------ .../deps/mysqllite/strings/ctype-latin1.c | 782 - .../worldengine/deps/mysqllite/strings/ctype-mb.c | 1369 - .../deps/mysqllite/strings/ctype-simple.c | 1704 - .../deps/mysqllite/strings/ctype-tis620.c | 965 - .../worldengine/deps/mysqllite/strings/ctype-uca.c | 11462 ------ .../deps/mysqllite/strings/ctype-ucs2.c | 3190 -- .../deps/mysqllite/strings/ctype-utf8.c | 5238 --- .../deps/mysqllite/strings/ctype-win1250ch.c | 715 - modules/worldengine/deps/mysqllite/strings/ctype.c | 430 - .../worldengine/deps/mysqllite/strings/decimal.c | 3128 -- modules/worldengine/deps/mysqllite/strings/dtoa.c | 2793 -- .../worldengine/deps/mysqllite/strings/int2str.c | 164 - .../worldengine/deps/mysqllite/strings/is_prefix.c | 32 - .../worldengine/deps/mysqllite/strings/latin2.def | 478 - modules/worldengine/deps/mysqllite/strings/llstr.c | 40 - .../deps/mysqllite/strings/longlong2str.c | 143 - .../worldengine/deps/mysqllite/strings/my_strchr.c | 104 - .../deps/mysqllite/strings/my_strtoll10.c | 236 - .../deps/mysqllite/strings/my_vsnprintf.c | 681 - .../worldengine/deps/mysqllite/strings/str2int.c | 201 - .../worldengine/deps/mysqllite/strings/str_alloc.c | 33 - .../worldengine/deps/mysqllite/strings/strappend.c | 39 - .../worldengine/deps/mysqllite/strings/strcend.c | 36 - .../worldengine/deps/mysqllite/strings/strcont.c | 44 - .../worldengine/deps/mysqllite/strings/strend.c | 37 - .../worldengine/deps/mysqllite/strings/strfill.c | 34 - .../worldengine/deps/mysqllite/strings/strmake.c | 54 - .../worldengine/deps/mysqllite/strings/strmov.c | 37 - .../worldengine/deps/mysqllite/strings/strnlen.c | 34 - .../worldengine/deps/mysqllite/strings/strnmov.c | 34 - .../worldengine/deps/mysqllite/strings/strxmov.c | 50 - .../worldengine/deps/mysqllite/strings/strxnmov.c | 63 - .../worldengine/deps/mysqllite/strings/t_ctype.h | 258 - modules/worldengine/deps/mysqllite/strings/xml.c | 496 - modules/worldengine/deps/mysqllite/vio/vio.c | 291 - modules/worldengine/deps/mysqllite/vio/vio_priv.h | 69 - modules/worldengine/deps/mysqllite/vio/viosocket.c | 1100 - modules/worldengine/deps/mysqllite/vio/viossl.c | 252 - .../deps/mysqllite/vio/viosslfactories.c | 315 - .../deps/recastnavigation/CMakeLists.txt | 20 - .../deps/recastnavigation/Detour/CMakeLists.txt | 28 - .../deps/recastnavigation/Detour/DetourAlloc.cpp | 50 - .../deps/recastnavigation/Detour/DetourAlloc.h | 36 - .../deps/recastnavigation/Detour/DetourAssert.h | 33 - .../deps/recastnavigation/Detour/DetourCommon.cpp | 329 - .../deps/recastnavigation/Detour/DetourCommon.h | 248 - .../deps/recastnavigation/Detour/DetourNavMesh.cpp | 1239 - .../deps/recastnavigation/Detour/DetourNavMesh.h | 428 - .../Detour/DetourNavMeshBuilder.cpp | 770 - .../recastnavigation/Detour/DetourNavMeshBuilder.h | 79 - .../recastnavigation/Detour/DetourNavMeshQuery.cpp | 2578 -- .../recastnavigation/Detour/DetourNavMeshQuery.h | 407 - .../deps/recastnavigation/Detour/DetourNode.cpp | 164 - .../deps/recastnavigation/Detour/DetourNode.h | 159 - .../Detour/DetourObstacleAvoidance.cpp | 532 - .../Detour/DetourObstacleAvoidance.h | 148 - .../worldengine/deps/recastnavigation/License.txt | 18 - .../worldengine/deps/recastnavigation/Readme.txt | 120 - .../deps/recastnavigation/Recast/CMakeLists.txt | 31 - .../deps/recastnavigation/Recast/Recast.cpp | 423 - .../deps/recastnavigation/Recast/Recast.h | 688 - .../deps/recastnavigation/Recast/RecastAlloc.cpp | 67 - .../deps/recastnavigation/Recast/RecastAlloc.h | 69 - .../deps/recastnavigation/Recast/RecastArea.cpp | 416 - .../deps/recastnavigation/Recast/RecastAssert.h | 33 - .../deps/recastnavigation/Recast/RecastContour.cpp | 802 - .../deps/recastnavigation/Recast/RecastFilter.cpp | 181 - .../deps/recastnavigation/Recast/RecastMesh.cpp | 1324 - .../recastnavigation/Recast/RecastMeshDetail.cpp | 1237 - .../Recast/RecastRasterization.cpp | 360 - .../deps/recastnavigation/Recast/RecastRegion.cpp | 1285 - modules/worldengine/deps/recastnavigation/TODO.txt | 20 - modules/worldengine/deps/utf8cpp/utf8.h | 34 - modules/worldengine/deps/utf8cpp/utf8/checked.h | 327 - modules/worldengine/deps/utf8cpp/utf8/core.h | 329 - modules/worldengine/deps/utf8cpp/utf8/unchecked.h | 228 - modules/worldengine/deps/zlib/CMakeLists.txt | 30 - modules/worldengine/deps/zlib/adler32.c | 179 - modules/worldengine/deps/zlib/compress.c | 80 - modules/worldengine/deps/zlib/crc32.c | 425 - modules/worldengine/deps/zlib/crc32.h | 441 - modules/worldengine/deps/zlib/deflate.c | 1965 -- modules/worldengine/deps/zlib/deflate.h | 346 - modules/worldengine/deps/zlib/example.c | 565 - modules/worldengine/deps/zlib/gzclose.c | 25 - modules/worldengine/deps/zlib/gzguts.h | 193 - modules/worldengine/deps/zlib/gzlib.c | 620 - modules/worldengine/deps/zlib/gzread.c | 589 - modules/worldengine/deps/zlib/gzwrite.c | 565 - modules/worldengine/deps/zlib/infback.c | 640 - modules/worldengine/deps/zlib/inffast.c | 340 - modules/worldengine/deps/zlib/inffast.h | 11 - modules/worldengine/deps/zlib/inffixed.h | 94 - modules/worldengine/deps/zlib/inflate.c | 1496 - modules/worldengine/deps/zlib/inflate.h | 122 - modules/worldengine/deps/zlib/inftrees.c | 306 - modules/worldengine/deps/zlib/inftrees.h | 62 - modules/worldengine/deps/zlib/minigzip.c | 440 - modules/worldengine/deps/zlib/trees.c | 1224 - modules/worldengine/deps/zlib/trees.h | 128 - modules/worldengine/deps/zlib/uncompr.c | 59 - modules/worldengine/deps/zlib/zconf.h | 506 - modules/worldengine/deps/zlib/zlib.h | 1744 - modules/worldengine/deps/zlib/zutil.c | 324 - modules/worldengine/deps/zlib/zutil.h | 252 - modules/worldengine/lib-collision/CMakeLists.txt | 2 - modules/worldengine/lib-collision/LICENSE-AGPL3 | 661 - .../src/BoundingIntervalHierarchy.cpp | 298 - .../lib-collision/src/BoundingIntervalHierarchy.h | 388 - .../src/BoundingIntervalHierarchyWrapper.h | 107 - .../worldengine/lib-collision/src/CMakeLists.txt | 93 - .../worldengine/lib-collision/src/DynamicTree.cpp | 228 - .../worldengine/lib-collision/src/DynamicTree.h | 51 - .../lib-collision/src/Management/IMMAPManager.h | 39 - .../lib-collision/src/Management/IVMapManager.h | 88 - .../lib-collision/src/Management/MMapFactory.cpp | 49 - .../lib-collision/src/Management/MMapFactory.h | 41 - .../lib-collision/src/Management/MMapManager.cpp | 372 - .../lib-collision/src/Management/MMapManager.h | 91 - .../lib-collision/src/Management/VMapFactory.cpp | 30 - .../lib-collision/src/Management/VMapFactory.h | 28 - .../lib-collision/src/Management/VMapManager2.cpp | 301 - .../lib-collision/src/Management/VMapManager2.h | 108 - .../worldengine/lib-collision/src/Maps/MapTree.cpp | 465 - .../worldengine/lib-collision/src/Maps/MapTree.h | 87 - .../lib-collision/src/Maps/TileAssembler.cpp | 528 - .../lib-collision/src/Maps/TileAssembler.h | 107 - .../lib-collision/src/Models/GameObjectModel.cpp | 214 - .../lib-collision/src/Models/GameObjectModel.h | 62 - .../lib-collision/src/Models/ModelInstance.cpp | 211 - .../lib-collision/src/Models/ModelInstance.h | 70 - .../lib-collision/src/Models/WorldModel.cpp | 574 - .../lib-collision/src/Models/WorldModel.h | 117 - .../src/PrecompiledHeaders/collisionPCH.cpp | 1 - .../src/PrecompiledHeaders/collisionPCH.h | 9 - .../worldengine/lib-collision/src/RegularGrid.h | 264 - .../lib-collision/src/VMapDefinitions.h | 22 - modules/worldengine/lib-collision/src/VMapTools.h | 138 - modules/worldengine/nucleus/CMakeLists.txt | 1 - modules/worldengine/nucleus/LICENSE-AGPL3 | 661 - modules/worldengine/nucleus/src/AutoPtr.h | 43 - modules/worldengine/nucleus/src/CMakeLists.txt | 93 - modules/worldengine/nucleus/src/Common.cpp | 37 - modules/worldengine/nucleus/src/Common.h | 215 - modules/worldengine/nucleus/src/CompilerDefs.h | 54 - .../nucleus/src/Configuration/Config.cpp | 145 - .../worldengine/nucleus/src/Configuration/Config.h | 66 - modules/worldengine/nucleus/src/Containers.h | 62 - .../worldengine/nucleus/src/Cryptography/ARC4.cpp | 40 - .../worldengine/nucleus/src/Cryptography/ARC4.h | 25 - .../src/Cryptography/Authentication/AuthCrypt.cpp | 61 - .../src/Cryptography/Authentication/AuthCrypt.h | 30 - .../nucleus/src/Cryptography/BigNumber.cpp | 190 - .../nucleus/src/Cryptography/BigNumber.h | 88 - .../nucleus/src/Cryptography/HMACSHA1.cpp | 45 - .../nucleus/src/Cryptography/HMACSHA1.h | 35 - .../nucleus/src/Cryptography/OpenSSLCrypto.cpp | 54 - .../nucleus/src/Cryptography/OpenSSLCrypto.h | 23 - .../worldengine/nucleus/src/Cryptography/SHA1.cpp | 56 - .../worldengine/nucleus/src/Cryptography/SHA1.h | 38 - .../nucleus/src/Cryptography/WardenKeyGeneration.h | 67 - .../nucleus/src/DataStores/DBCFileLoader.cpp | 312 - .../nucleus/src/DataStores/DBCFileLoader.h | 98 - .../worldengine/nucleus/src/DataStores/DBCStore.h | 284 - .../nucleus/src/Database/AdhocStatement.cpp | 47 - .../nucleus/src/Database/AdhocStatement.h | 31 - .../worldengine/nucleus/src/Database/DatabaseEnv.h | 34 - .../nucleus/src/Database/DatabaseWorker.cpp | 41 - .../nucleus/src/Database/DatabaseWorker.h | 31 - .../nucleus/src/Database/DatabaseWorkerPool.h | 521 - modules/worldengine/nucleus/src/Database/Field.cpp | 55 - modules/worldengine/nucleus/src/Database/Field.h | 380 - .../Database/Implementation/CharacterDatabase.cpp | 559 - .../Database/Implementation/CharacterDatabase.h | 499 - .../src/Database/Implementation/LoginDatabase.cpp | 83 - .../src/Database/Implementation/LoginDatabase.h | 107 - .../src/Database/Implementation/WorldDatabase.cpp | 82 - .../src/Database/Implementation/WorldDatabase.h | 107 - .../nucleus/src/Database/MySQLConnection.cpp | 538 - .../nucleus/src/Database/MySQLConnection.h | 127 - .../nucleus/src/Database/MySQLThreading.h | 48 - .../nucleus/src/Database/PreparedStatement.cpp | 477 - .../nucleus/src/Database/PreparedStatement.h | 157 - .../nucleus/src/Database/QueryHolder.cpp | 198 - .../worldengine/nucleus/src/Database/QueryHolder.h | 47 - .../nucleus/src/Database/QueryResult.cpp | 219 - .../worldengine/nucleus/src/Database/QueryResult.h | 97 - .../nucleus/src/Database/SQLOperation.h | 64 - .../nucleus/src/Database/Transaction.cpp | 82 - .../worldengine/nucleus/src/Database/Transaction.h | 61 - .../worldengine/nucleus/src/Debugging/Errors.cpp | 47 - modules/worldengine/nucleus/src/Debugging/Errors.h | 38 - .../src/Debugging/WheatyExceptionReport.cpp | 1203 - .../nucleus/src/Debugging/WheatyExceptionReport.h | 149 - modules/worldengine/nucleus/src/Define.h | 88 - .../nucleus/src/Dynamic/FactoryHolder.h | 49 - .../nucleus/src/Dynamic/HashNamespace.h | 107 - .../worldengine/nucleus/src/Dynamic/LinkedList.h | 233 - .../src/Dynamic/LinkedReference/RefManager.h | 44 - .../src/Dynamic/LinkedReference/Reference.h | 88 - .../nucleus/src/Dynamic/ObjectRegistry.h | 94 - .../nucleus/src/Dynamic/TypeContainer.h | 112 - .../nucleus/src/Dynamic/TypeContainerFunctions.h | 101 - .../src/Dynamic/TypeContainerFunctionsPtr.h | 156 - .../nucleus/src/Dynamic/TypeContainerVisitor.h | 99 - modules/worldengine/nucleus/src/Dynamic/TypeList.h | 32 - .../worldengine/nucleus/src/Dynamic/UnorderedMap.h | 60 - .../worldengine/nucleus/src/Dynamic/UnorderedSet.h | 54 - modules/worldengine/nucleus/src/Logging/Log.cpp | 1010 - modules/worldengine/nucleus/src/Logging/Log.h | 199 - .../worldengine/nucleus/src/Packets/ByteBuffer.cpp | 69 - .../worldengine/nucleus/src/Packets/ByteBuffer.h | 619 - .../worldengine/nucleus/src/Packets/WorldPacket.h | 40 - .../nucleus/src/PrecompiledHeaders/sharedPCH.cpp | 1 - .../nucleus/src/PrecompiledHeaders/sharedPCH.h | 8 - modules/worldengine/nucleus/src/SystemConfig.h | 32 - .../worldengine/nucleus/src/Threading/Callback.h | 300 - .../nucleus/src/Threading/DelayExecutor.cpp | 122 - .../nucleus/src/Threading/DelayExecutor.h | 39 - .../nucleus/src/Threading/LockedQueue.h | 146 - .../nucleus/src/Threading/Threading.cpp | 111 - .../worldengine/nucleus/src/Threading/Threading.h | 71 - .../nucleus/src/Utilities/ByteConverter.h | 56 - .../nucleus/src/Utilities/EventProcessor.cpp | 91 - .../nucleus/src/Utilities/EventProcessor.h | 65 - .../nucleus/src/Utilities/ServiceWin32.cpp | 252 - .../nucleus/src/Utilities/ServiceWin32.h | 17 - .../nucleus/src/Utilities/SignalHandler.h | 29 - modules/worldengine/nucleus/src/Utilities/Timer.h | 189 - modules/worldengine/nucleus/src/Utilities/Util.cpp | 544 - modules/worldengine/nucleus/src/Utilities/Util.h | 893 - .../src/cmake/compiler/clang/settings.cmake | 20 - .../nucleus/src/cmake/compiler/gcc/settings.cmake | 36 - .../nucleus/src/cmake/compiler/icc/settings.cmake | 18 - .../src/cmake/compiler/mingw/settings.cmake | 27 - .../nucleus/src/cmake/compiler/msvc/settings.cmake | 67 - .../nucleus/src/cmake/macros/CheckBuildDir.cmake | 23 - .../nucleus/src/cmake/macros/CheckPlatform.cmake | 18 - .../nucleus/src/cmake/macros/EnsureVersion.cmake | 115 - .../nucleus/src/cmake/macros/FindACE.cmake | 84 - .../nucleus/src/cmake/macros/FindGit.cmake | 46 - .../nucleus/src/cmake/macros/FindGperftools.cmake | 51 - .../nucleus/src/cmake/macros/FindMySQL.cmake | 184 - .../nucleus/src/cmake/macros/FindOpenSSL.cmake | 180 - .../nucleus/src/cmake/macros/FindPCHSupport.cmake | 104 - .../nucleus/src/cmake/macros/FindReadline.cmake | 18 - .../src/cmake/platform/after_platform.cmake | 4 - .../src/cmake/platform/cmake_uninstall.in.cmake | 23 - .../nucleus/src/cmake/platform/settings.cmake | 5 - .../nucleus/src/cmake/platform/unix/settings.cmake | 44 - .../nucleus/src/cmake/platform/win/settings.cmake | 32 - 2479 files changed, 745309 deletions(-) delete mode 100644 modules/acore/extractors/CMakeLists.txt delete mode 100644 modules/acore/extractors/map_extractor/CMakeLists.txt delete mode 100644 modules/acore/extractors/map_extractor/System.cpp delete mode 100644 modules/acore/extractors/map_extractor/adt.cpp delete mode 100644 modules/acore/extractors/map_extractor/adt.h delete mode 100644 modules/acore/extractors/map_extractor/dbcfile.cpp delete mode 100644 modules/acore/extractors/map_extractor/dbcfile.h delete mode 100644 modules/acore/extractors/map_extractor/loadlib.cpp delete mode 100644 modules/acore/extractors/map_extractor/loadlib/loadlib.h delete mode 100644 modules/acore/extractors/map_extractor/mpq_libmpq.cpp delete mode 100644 modules/acore/extractors/map_extractor/mpq_libmpq04.h delete mode 100644 modules/acore/extractors/map_extractor/wdt.cpp delete mode 100644 modules/acore/extractors/map_extractor/wdt.h delete mode 100644 modules/acore/extractors/mesh_extractor/ADT.cpp delete mode 100644 modules/acore/extractors/mesh_extractor/ADT.h delete mode 100644 modules/acore/extractors/mesh_extractor/CMakeLists.txt delete mode 100644 modules/acore/extractors/mesh_extractor/Cache.h delete mode 100644 modules/acore/extractors/mesh_extractor/Chunk.cpp delete mode 100644 modules/acore/extractors/mesh_extractor/Chunk.h delete mode 100644 modules/acore/extractors/mesh_extractor/ChunkedData.cpp delete mode 100644 modules/acore/extractors/mesh_extractor/ChunkedData.h delete mode 100644 modules/acore/extractors/mesh_extractor/Constants.h delete mode 100644 modules/acore/extractors/mesh_extractor/ContinentBuilder.cpp delete mode 100644 modules/acore/extractors/mesh_extractor/ContinentBuilder.h delete mode 100644 modules/acore/extractors/mesh_extractor/DBC.cpp delete mode 100644 modules/acore/extractors/mesh_extractor/DBC.h delete mode 100644 modules/acore/extractors/mesh_extractor/DoodadHandler.cpp delete mode 100644 modules/acore/extractors/mesh_extractor/DoodadHandler.h delete mode 100644 modules/acore/extractors/mesh_extractor/Geometry.cpp delete mode 100644 modules/acore/extractors/mesh_extractor/Geometry.h delete mode 100644 modules/acore/extractors/mesh_extractor/LiquidHandler.cpp delete mode 100644 modules/acore/extractors/mesh_extractor/LiquidHandler.h delete mode 100644 modules/acore/extractors/mesh_extractor/MPQ.cpp delete mode 100644 modules/acore/extractors/mesh_extractor/MPQ.h delete mode 100644 modules/acore/extractors/mesh_extractor/MPQManager.cpp delete mode 100644 modules/acore/extractors/mesh_extractor/MPQManager.h delete mode 100644 modules/acore/extractors/mesh_extractor/MapChunk.cpp delete mode 100644 modules/acore/extractors/mesh_extractor/MapChunk.h delete mode 100644 modules/acore/extractors/mesh_extractor/MeshExtractor.cpp delete mode 100644 modules/acore/extractors/mesh_extractor/Model.cpp delete mode 100644 modules/acore/extractors/mesh_extractor/Model.h delete mode 100644 modules/acore/extractors/mesh_extractor/ObjectDataHandler.cpp delete mode 100644 modules/acore/extractors/mesh_extractor/ObjectDataHandler.h delete mode 100644 modules/acore/extractors/mesh_extractor/TileBuilder.cpp delete mode 100644 modules/acore/extractors/mesh_extractor/TileBuilder.h delete mode 100644 modules/acore/extractors/mesh_extractor/Utils.cpp delete mode 100644 modules/acore/extractors/mesh_extractor/Utils.h delete mode 100644 modules/acore/extractors/mesh_extractor/WDT.cpp delete mode 100644 modules/acore/extractors/mesh_extractor/WDT.h delete mode 100644 modules/acore/extractors/mesh_extractor/WorldModelGroup.cpp delete mode 100644 modules/acore/extractors/mesh_extractor/WorldModelGroup.h delete mode 100644 modules/acore/extractors/mesh_extractor/WorldModelHandler.cpp delete mode 100644 modules/acore/extractors/mesh_extractor/WorldModelHandler.h delete mode 100644 modules/acore/extractors/mesh_extractor/WorldModelRoot.cpp delete mode 100644 modules/acore/extractors/mesh_extractor/WorldModelRoot.h delete mode 100644 modules/acore/extractors/mesh_extractor/readme delete mode 100644 modules/acore/extractors/mmaps_generator/CMakeLists.txt delete mode 100644 modules/acore/extractors/mmaps_generator/Info/readme.txt delete mode 100644 modules/acore/extractors/mmaps_generator/IntermediateValues.cpp delete mode 100644 modules/acore/extractors/mmaps_generator/IntermediateValues.h delete mode 100644 modules/acore/extractors/mmaps_generator/MapBuilder.cpp delete mode 100644 modules/acore/extractors/mmaps_generator/MapBuilder.h delete mode 100644 modules/acore/extractors/mmaps_generator/PathCommon.h delete mode 100644 modules/acore/extractors/mmaps_generator/PathGenerator.cpp delete mode 100644 modules/acore/extractors/mmaps_generator/TerrainBuilder.cpp delete mode 100644 modules/acore/extractors/mmaps_generator/TerrainBuilder.h delete mode 100644 modules/acore/extractors/mmaps_generator/VMapExtensions.cpp delete mode 100644 modules/acore/extractors/vmap4_assembler/CMakeLists.txt delete mode 100644 modules/acore/extractors/vmap4_assembler/VMapAssembler.cpp delete mode 100644 modules/acore/extractors/vmap4_extractor/CMakeLists.txt delete mode 100644 modules/acore/extractors/vmap4_extractor/adtfile.cpp delete mode 100644 modules/acore/extractors/vmap4_extractor/adtfile.h delete mode 100644 modules/acore/extractors/vmap4_extractor/dbcfile.cpp delete mode 100644 modules/acore/extractors/vmap4_extractor/dbcfile.h delete mode 100644 modules/acore/extractors/vmap4_extractor/gameobject_extract.cpp delete mode 100644 modules/acore/extractors/vmap4_extractor/loadlib/loadlib.h delete mode 100644 modules/acore/extractors/vmap4_extractor/model.cpp delete mode 100644 modules/acore/extractors/vmap4_extractor/model.h delete mode 100644 modules/acore/extractors/vmap4_extractor/modelheaders.h delete mode 100644 modules/acore/extractors/vmap4_extractor/mpq_libmpq.cpp delete mode 100644 modules/acore/extractors/vmap4_extractor/mpq_libmpq04.h delete mode 100644 modules/acore/extractors/vmap4_extractor/vec3d.h delete mode 100644 modules/acore/extractors/vmap4_extractor/vmapexport.cpp delete mode 100644 modules/acore/extractors/vmap4_extractor/vmapexport.h delete mode 100644 modules/acore/extractors/vmap4_extractor/wdtfile.cpp delete mode 100644 modules/acore/extractors/vmap4_extractor/wdtfile.h delete mode 100644 modules/acore/extractors/vmap4_extractor/wmo.cpp delete mode 100644 modules/acore/extractors/vmap4_extractor/wmo.h delete mode 100644 modules/acore/game-framework/CMakeLists.txt delete mode 100644 modules/acore/game-framework/LICENSE-AGPL3 delete mode 100644 modules/acore/game-framework/src/Addons/AddonMgr.cpp delete mode 100644 modules/acore/game-framework/src/Addons/AddonMgr.h delete mode 100644 modules/acore/game-framework/src/CMakeLists.txt delete mode 100644 modules/acore/game-framework/src/PrecompiledHeaders/gamefwPCH.cpp delete mode 100644 modules/acore/game-framework/src/PrecompiledHeaders/gamefwPCH.h delete mode 100644 modules/acore/startup-scripts/conf.sh.dist delete mode 100644 modules/acore/startup-scripts/examples/restarter-auth.sh delete mode 100644 modules/acore/startup-scripts/examples/restarter-world.sh delete mode 100644 modules/acore/startup-scripts/examples/starter-auth.sh delete mode 100644 modules/acore/startup-scripts/examples/starter-world.sh delete mode 100644 modules/acore/startup-scripts/run-engine delete mode 100755 modules/acore/startup-scripts/starter delete mode 100644 modules/hw-core/bash-lib-event/src/hooks.sh delete mode 100755 modules/hw-core/bash-lib-git/bin/git-subtree-list delete mode 100644 modules/hw-core/bash-lib-git/src/subtree.sh delete mode 100644 modules/worldengine/deps/.gitignore delete mode 100644 modules/worldengine/deps/CMakeLists.txt delete mode 100644 modules/worldengine/deps/PackageList.txt delete mode 100644 modules/worldengine/deps/SFMT/SFMT.h delete mode 100644 modules/worldengine/deps/SFMT/randomc.h delete mode 100644 modules/worldengine/deps/acelite/AUTHORS delete mode 100644 modules/worldengine/deps/acelite/CMakeLists.txt delete mode 100644 modules/worldengine/deps/acelite/COPYING delete mode 100644 modules/worldengine/deps/acelite/NEWS delete mode 100644 modules/worldengine/deps/acelite/README delete mode 100644 modules/worldengine/deps/acelite/THANKS delete mode 100644 modules/worldengine/deps/acelite/VERSION delete mode 100644 modules/worldengine/deps/acelite/ace/ACE.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/ACE.h delete mode 100644 modules/worldengine/deps/acelite/ace/ACE.inl delete mode 100644 modules/worldengine/deps/acelite/ace/ACE.pc.in delete mode 100644 modules/worldengine/deps/acelite/ace/ACE_crc32.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/ACE_crc_ccitt.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/ACE_export.h delete mode 100644 modules/worldengine/deps/acelite/ace/ARGV.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/ARGV.h delete mode 100644 modules/worldengine/deps/acelite/ace/ARGV.inl delete mode 100644 modules/worldengine/deps/acelite/ace/ATM_Acceptor.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/ATM_Acceptor.h delete mode 100644 modules/worldengine/deps/acelite/ace/ATM_Acceptor.inl delete mode 100644 modules/worldengine/deps/acelite/ace/ATM_Addr.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/ATM_Addr.h delete mode 100644 modules/worldengine/deps/acelite/ace/ATM_Addr.inl delete mode 100644 modules/worldengine/deps/acelite/ace/ATM_Connector.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/ATM_Connector.h delete mode 100644 modules/worldengine/deps/acelite/ace/ATM_Connector.inl delete mode 100644 modules/worldengine/deps/acelite/ace/ATM_Params.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/ATM_Params.h delete mode 100644 modules/worldengine/deps/acelite/ace/ATM_Params.inl delete mode 100644 modules/worldengine/deps/acelite/ace/ATM_QoS.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/ATM_QoS.h delete mode 100644 modules/worldengine/deps/acelite/ace/ATM_QoS.inl delete mode 100644 modules/worldengine/deps/acelite/ace/ATM_Stream.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/ATM_Stream.h delete mode 100644 modules/worldengine/deps/acelite/ace/ATM_Stream.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Abstract_Timer_Queue.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Abstract_Timer_Queue.h delete mode 100644 modules/worldengine/deps/acelite/ace/Acceptor.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Acceptor.h delete mode 100644 modules/worldengine/deps/acelite/ace/Activation_Queue.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Activation_Queue.h delete mode 100644 modules/worldengine/deps/acelite/ace/Activation_Queue.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Active_Map_Manager.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Active_Map_Manager.h delete mode 100644 modules/worldengine/deps/acelite/ace/Active_Map_Manager.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Active_Map_Manager_T.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Active_Map_Manager_T.h delete mode 100644 modules/worldengine/deps/acelite/ace/Active_Map_Manager_T.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Addr.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Addr.h delete mode 100644 modules/worldengine/deps/acelite/ace/Addr.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Arg_Shifter.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Arg_Shifter.h delete mode 100644 modules/worldengine/deps/acelite/ace/Argv_Type_Converter.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Argv_Type_Converter.h delete mode 100644 modules/worldengine/deps/acelite/ace/Argv_Type_Converter.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Array_Base.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Array_Base.h delete mode 100644 modules/worldengine/deps/acelite/ace/Array_Base.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Array_Map.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Array_Map.h delete mode 100644 modules/worldengine/deps/acelite/ace/Array_Map.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Assert.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Assert.h delete mode 100644 modules/worldengine/deps/acelite/ace/Asynch_Acceptor.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Asynch_Acceptor.h delete mode 100644 modules/worldengine/deps/acelite/ace/Asynch_Connector.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Asynch_Connector.h delete mode 100644 modules/worldengine/deps/acelite/ace/Asynch_IO.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Asynch_IO.h delete mode 100644 modules/worldengine/deps/acelite/ace/Asynch_IO_Impl.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Asynch_IO_Impl.h delete mode 100644 modules/worldengine/deps/acelite/ace/Asynch_IO_Impl.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Asynch_Pseudo_Task.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Asynch_Pseudo_Task.h delete mode 100644 modules/worldengine/deps/acelite/ace/Atomic_Op.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Atomic_Op.h delete mode 100644 modules/worldengine/deps/acelite/ace/Atomic_Op.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Atomic_Op_GCC_T.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Atomic_Op_GCC_T.h delete mode 100644 modules/worldengine/deps/acelite/ace/Atomic_Op_GCC_T.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Atomic_Op_Sparc.c delete mode 100644 modules/worldengine/deps/acelite/ace/Atomic_Op_Sparc.h delete mode 100644 modules/worldengine/deps/acelite/ace/Atomic_Op_T.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Atomic_Op_T.h delete mode 100644 modules/worldengine/deps/acelite/ace/Atomic_Op_T.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Auto_Event.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Auto_Event.h delete mode 100644 modules/worldengine/deps/acelite/ace/Auto_Event.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Auto_Functor.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Auto_Functor.h delete mode 100644 modules/worldengine/deps/acelite/ace/Auto_Functor.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Auto_IncDec_T.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Auto_IncDec_T.h delete mode 100644 modules/worldengine/deps/acelite/ace/Auto_IncDec_T.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Auto_Ptr.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Auto_Ptr.h delete mode 100644 modules/worldengine/deps/acelite/ace/Auto_Ptr.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Barrier.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Barrier.h delete mode 100644 modules/worldengine/deps/acelite/ace/Barrier.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Base_Thread_Adapter.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Base_Thread_Adapter.h delete mode 100644 modules/worldengine/deps/acelite/ace/Base_Thread_Adapter.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Based_Pointer_Repository.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Based_Pointer_Repository.h delete mode 100644 modules/worldengine/deps/acelite/ace/Based_Pointer_T.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Based_Pointer_T.h delete mode 100644 modules/worldengine/deps/acelite/ace/Based_Pointer_T.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Basic_Stats.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Basic_Stats.h delete mode 100644 modules/worldengine/deps/acelite/ace/Basic_Stats.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Basic_Types.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Basic_Types.h delete mode 100644 modules/worldengine/deps/acelite/ace/Bound_Ptr.h delete mode 100644 modules/worldengine/deps/acelite/ace/Bound_Ptr.inl delete mode 100644 modules/worldengine/deps/acelite/ace/CDR_Base.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/CDR_Base.h delete mode 100644 modules/worldengine/deps/acelite/ace/CDR_Base.inl delete mode 100644 modules/worldengine/deps/acelite/ace/CDR_Size.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/CDR_Size.h delete mode 100644 modules/worldengine/deps/acelite/ace/CDR_Size.inl delete mode 100644 modules/worldengine/deps/acelite/ace/CDR_Stream.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/CDR_Stream.h delete mode 100644 modules/worldengine/deps/acelite/ace/CDR_Stream.inl delete mode 100644 modules/worldengine/deps/acelite/ace/CE_Screen_Output.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/CE_Screen_Output.h delete mode 100644 modules/worldengine/deps/acelite/ace/CMakeLists.txt delete mode 100644 modules/worldengine/deps/acelite/ace/CORBA_macros.h delete mode 100644 modules/worldengine/deps/acelite/ace/Cache_Map_Manager_T.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Cache_Map_Manager_T.h delete mode 100644 modules/worldengine/deps/acelite/ace/Cache_Map_Manager_T.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Cached_Connect_Strategy_T.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Cached_Connect_Strategy_T.h delete mode 100644 modules/worldengine/deps/acelite/ace/Caching_Strategies_T.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Caching_Strategies_T.h delete mode 100644 modules/worldengine/deps/acelite/ace/Caching_Strategies_T.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Caching_Utility_T.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Caching_Utility_T.h delete mode 100644 modules/worldengine/deps/acelite/ace/Capabilities.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Capabilities.h delete mode 100644 modules/worldengine/deps/acelite/ace/Capabilities.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Cleanup.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Cleanup.h delete mode 100644 modules/worldengine/deps/acelite/ace/Cleanup.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Cleanup_Strategies_T.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Cleanup_Strategies_T.h delete mode 100644 modules/worldengine/deps/acelite/ace/Codecs.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Codecs.h delete mode 100644 modules/worldengine/deps/acelite/ace/Codeset_IBM1047.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Codeset_IBM1047.h delete mode 100644 modules/worldengine/deps/acelite/ace/Codeset_Registry.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Codeset_Registry.h delete mode 100644 modules/worldengine/deps/acelite/ace/Codeset_Registry.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Codeset_Registry_db.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Codeset_Symbols.h delete mode 100644 modules/worldengine/deps/acelite/ace/Compression/ACE_Compression.mpc delete mode 100644 modules/worldengine/deps/acelite/ace/Compression/ACE_Compression_export.h delete mode 100644 modules/worldengine/deps/acelite/ace/Compression/Compressor.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Compression/Compressor.h delete mode 100644 modules/worldengine/deps/acelite/ace/Compression/Compressor.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Compression/rle/ACE_RLECompression.mpc delete mode 100644 modules/worldengine/deps/acelite/ace/Compression/rle/ACE_RLECompression_export.h delete mode 100644 modules/worldengine/deps/acelite/ace/Compression/rle/RLECompressor.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Compression/rle/RLECompressor.h delete mode 100644 modules/worldengine/deps/acelite/ace/Condition_Attributes.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Condition_Attributes.h delete mode 100644 modules/worldengine/deps/acelite/ace/Condition_Attributes.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Condition_Recursive_Thread_Mutex.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Condition_Recursive_Thread_Mutex.h delete mode 100644 modules/worldengine/deps/acelite/ace/Condition_T.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Condition_T.h delete mode 100644 modules/worldengine/deps/acelite/ace/Condition_T.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Condition_Thread_Mutex.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Condition_Thread_Mutex.h delete mode 100644 modules/worldengine/deps/acelite/ace/Condition_Thread_Mutex.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Configuration.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Configuration.h delete mode 100644 modules/worldengine/deps/acelite/ace/Configuration.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Configuration_Import_Export.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Configuration_Import_Export.h delete mode 100644 modules/worldengine/deps/acelite/ace/Connection_Recycling_Strategy.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Connection_Recycling_Strategy.h delete mode 100644 modules/worldengine/deps/acelite/ace/Connector.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Connector.h delete mode 100644 modules/worldengine/deps/acelite/ace/Containers.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Containers.h delete mode 100644 modules/worldengine/deps/acelite/ace/Containers.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Containers_T.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Containers_T.h delete mode 100644 modules/worldengine/deps/acelite/ace/Containers_T.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Copy_Disabled.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Copy_Disabled.h delete mode 100644 modules/worldengine/deps/acelite/ace/Countdown_Time.h delete mode 100644 modules/worldengine/deps/acelite/ace/Countdown_Time_T.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Countdown_Time_T.h delete mode 100644 modules/worldengine/deps/acelite/ace/Countdown_Time_T.inl delete mode 100644 modules/worldengine/deps/acelite/ace/DEV.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/DEV.h delete mode 100644 modules/worldengine/deps/acelite/ace/DEV.inl delete mode 100644 modules/worldengine/deps/acelite/ace/DEV_Addr.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/DEV_Addr.h delete mode 100644 modules/worldengine/deps/acelite/ace/DEV_Addr.inl delete mode 100644 modules/worldengine/deps/acelite/ace/DEV_Connector.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/DEV_Connector.h delete mode 100644 modules/worldengine/deps/acelite/ace/DEV_Connector.inl delete mode 100644 modules/worldengine/deps/acelite/ace/DEV_IO.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/DEV_IO.h delete mode 100644 modules/worldengine/deps/acelite/ace/DEV_IO.inl delete mode 100644 modules/worldengine/deps/acelite/ace/DLL.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/DLL.h delete mode 100644 modules/worldengine/deps/acelite/ace/DLL_Manager.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/DLL_Manager.h delete mode 100644 modules/worldengine/deps/acelite/ace/Date_Time.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Date_Time.h delete mode 100644 modules/worldengine/deps/acelite/ace/Date_Time.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Default_Constants.h delete mode 100644 modules/worldengine/deps/acelite/ace/Dev_Poll_Reactor.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Dev_Poll_Reactor.h delete mode 100644 modules/worldengine/deps/acelite/ace/Dev_Poll_Reactor.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Dirent.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Dirent.h delete mode 100644 modules/worldengine/deps/acelite/ace/Dirent.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Dirent_Selector.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Dirent_Selector.h delete mode 100644 modules/worldengine/deps/acelite/ace/Dirent_Selector.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Dump.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Dump.h delete mode 100644 modules/worldengine/deps/acelite/ace/Dump_T.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Dump_T.h delete mode 100644 modules/worldengine/deps/acelite/ace/Dynamic.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Dynamic.h delete mode 100644 modules/worldengine/deps/acelite/ace/Dynamic.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Dynamic_Message_Strategy.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Dynamic_Message_Strategy.h delete mode 100644 modules/worldengine/deps/acelite/ace/Dynamic_Message_Strategy.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Dynamic_Service.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Dynamic_Service.h delete mode 100644 modules/worldengine/deps/acelite/ace/Dynamic_Service.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Dynamic_Service_Base.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Dynamic_Service_Base.h delete mode 100644 modules/worldengine/deps/acelite/ace/Dynamic_Service_Dependency.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Dynamic_Service_Dependency.h delete mode 100644 modules/worldengine/deps/acelite/ace/ETCL/ACE_ETCL.pc.in delete mode 100644 modules/worldengine/deps/acelite/ace/ETCL/ACE_ETCL_Parser.pc.in delete mode 100644 modules/worldengine/deps/acelite/ace/ETCL/ETCL.ll delete mode 100644 modules/worldengine/deps/acelite/ace/ETCL/ETCL.mpc delete mode 100644 modules/worldengine/deps/acelite/ace/ETCL/ETCL.yy delete mode 100644 modules/worldengine/deps/acelite/ace/ETCL/ETCL_Constraint.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/ETCL/ETCL_Constraint.h delete mode 100644 modules/worldengine/deps/acelite/ace/ETCL/ETCL_Constraint.inl delete mode 100644 modules/worldengine/deps/acelite/ace/ETCL/ETCL_Constraint_Visitor.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/ETCL/ETCL_Constraint_Visitor.h delete mode 100644 modules/worldengine/deps/acelite/ace/ETCL/ETCL_Interpreter.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/ETCL/ETCL_Interpreter.h delete mode 100644 modules/worldengine/deps/acelite/ace/ETCL/ETCL_l.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/ETCL/ETCL_y.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/ETCL/ETCL_y.h delete mode 100644 modules/worldengine/deps/acelite/ace/ETCL/ace_etcl_export.h delete mode 100644 modules/worldengine/deps/acelite/ace/ETCL/etcl_parser_export.h delete mode 100644 modules/worldengine/deps/acelite/ace/Encoding_Converter.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Encoding_Converter.h delete mode 100644 modules/worldengine/deps/acelite/ace/Encoding_Converter_Factory.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Encoding_Converter_Factory.h delete mode 100644 modules/worldengine/deps/acelite/ace/Env_Value_T.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Env_Value_T.h delete mode 100644 modules/worldengine/deps/acelite/ace/Env_Value_T.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Event.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Event.h delete mode 100644 modules/worldengine/deps/acelite/ace/Event.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Event_Base.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Event_Base.h delete mode 100644 modules/worldengine/deps/acelite/ace/Event_Base.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Event_Handler.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Event_Handler.h delete mode 100644 modules/worldengine/deps/acelite/ace/Event_Handler.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Event_Handler_Handle_Timeout_Upcall.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Event_Handler_Handle_Timeout_Upcall.h delete mode 100644 modules/worldengine/deps/acelite/ace/Event_Handler_Handle_Timeout_Upcall.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Event_Handler_T.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Event_Handler_T.h delete mode 100644 modules/worldengine/deps/acelite/ace/Event_Handler_T.inl delete mode 100644 modules/worldengine/deps/acelite/ace/FIFO.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/FIFO.h delete mode 100644 modules/worldengine/deps/acelite/ace/FIFO.inl delete mode 100644 modules/worldengine/deps/acelite/ace/FIFO_Recv.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/FIFO_Recv.h delete mode 100644 modules/worldengine/deps/acelite/ace/FIFO_Recv.inl delete mode 100644 modules/worldengine/deps/acelite/ace/FIFO_Recv_Msg.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/FIFO_Recv_Msg.h delete mode 100644 modules/worldengine/deps/acelite/ace/FIFO_Recv_Msg.inl delete mode 100644 modules/worldengine/deps/acelite/ace/FIFO_Send.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/FIFO_Send.h delete mode 100644 modules/worldengine/deps/acelite/ace/FIFO_Send.inl delete mode 100644 modules/worldengine/deps/acelite/ace/FIFO_Send_Msg.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/FIFO_Send_Msg.h delete mode 100644 modules/worldengine/deps/acelite/ace/FIFO_Send_Msg.inl delete mode 100644 modules/worldengine/deps/acelite/ace/FILE.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/FILE.h delete mode 100644 modules/worldengine/deps/acelite/ace/FILE.inl delete mode 100644 modules/worldengine/deps/acelite/ace/FILE_Addr.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/FILE_Addr.h delete mode 100644 modules/worldengine/deps/acelite/ace/FILE_Addr.inl delete mode 100644 modules/worldengine/deps/acelite/ace/FILE_Connector.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/FILE_Connector.h delete mode 100644 modules/worldengine/deps/acelite/ace/FILE_Connector.inl delete mode 100644 modules/worldengine/deps/acelite/ace/FILE_IO.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/FILE_IO.h delete mode 100644 modules/worldengine/deps/acelite/ace/FILE_IO.inl delete mode 100644 modules/worldengine/deps/acelite/ace/File_Lock.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/File_Lock.h delete mode 100644 modules/worldengine/deps/acelite/ace/File_Lock.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Filecache.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Filecache.h delete mode 100644 modules/worldengine/deps/acelite/ace/FlReactor/ACE_FlReactor.pc.in delete mode 100644 modules/worldengine/deps/acelite/ace/FlReactor/ACE_FlReactor_export.h delete mode 100644 modules/worldengine/deps/acelite/ace/FlReactor/FlReactor.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/FlReactor/FlReactor.h delete mode 100644 modules/worldengine/deps/acelite/ace/FlReactor/ace_flreactor.mpc delete mode 100644 modules/worldengine/deps/acelite/ace/Flag_Manip.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Flag_Manip.h delete mode 100644 modules/worldengine/deps/acelite/ace/Flag_Manip.inl delete mode 100644 modules/worldengine/deps/acelite/ace/FoxReactor/ACE_FoxReactor.pc.in delete mode 100644 modules/worldengine/deps/acelite/ace/FoxReactor/ACE_FoxReactor_export.h delete mode 100644 modules/worldengine/deps/acelite/ace/FoxReactor/FoxReactor.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/FoxReactor/FoxReactor.h delete mode 100644 modules/worldengine/deps/acelite/ace/FoxReactor/ace_foxreactor.mpc delete mode 100644 modules/worldengine/deps/acelite/ace/Framework_Component.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Framework_Component.h delete mode 100644 modules/worldengine/deps/acelite/ace/Framework_Component.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Framework_Component_T.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Framework_Component_T.h delete mode 100644 modules/worldengine/deps/acelite/ace/Free_List.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Free_List.h delete mode 100644 modules/worldengine/deps/acelite/ace/Functor.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Functor.h delete mode 100644 modules/worldengine/deps/acelite/ace/Functor.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Functor_String.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Functor_String.h delete mode 100644 modules/worldengine/deps/acelite/ace/Functor_String.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Functor_T.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Functor_T.h delete mode 100644 modules/worldengine/deps/acelite/ace/Functor_T.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Future.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Future.h delete mode 100644 modules/worldengine/deps/acelite/ace/Future_Set.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Future_Set.h delete mode 100644 modules/worldengine/deps/acelite/ace/Get_Opt.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Get_Opt.h delete mode 100644 modules/worldengine/deps/acelite/ace/Get_Opt.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Global_Macros.h delete mode 100644 modules/worldengine/deps/acelite/ace/Guard_T.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Guard_T.h delete mode 100644 modules/worldengine/deps/acelite/ace/Guard_T.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Handle_Gobbler.h delete mode 100644 modules/worldengine/deps/acelite/ace/Handle_Gobbler.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Handle_Ops.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Handle_Ops.h delete mode 100644 modules/worldengine/deps/acelite/ace/Handle_Set.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Handle_Set.h delete mode 100644 modules/worldengine/deps/acelite/ace/Handle_Set.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Hash_Cache_Map_Manager_T.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Hash_Cache_Map_Manager_T.h delete mode 100644 modules/worldengine/deps/acelite/ace/Hash_Cache_Map_Manager_T.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Hash_Map_Manager.h delete mode 100644 modules/worldengine/deps/acelite/ace/Hash_Map_Manager_T.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Hash_Map_Manager_T.h delete mode 100644 modules/worldengine/deps/acelite/ace/Hash_Map_Manager_T.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Hash_Map_With_Allocator_T.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Hash_Map_With_Allocator_T.h delete mode 100644 modules/worldengine/deps/acelite/ace/Hash_Map_With_Allocator_T.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Hash_Multi_Map_Manager_T.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Hash_Multi_Map_Manager_T.h delete mode 100644 modules/worldengine/deps/acelite/ace/Hash_Multi_Map_Manager_T.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Hashable.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Hashable.h delete mode 100644 modules/worldengine/deps/acelite/ace/Hashable.inl delete mode 100644 modules/worldengine/deps/acelite/ace/High_Res_Timer.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/High_Res_Timer.h delete mode 100644 modules/worldengine/deps/acelite/ace/High_Res_Timer.inl delete mode 100644 modules/worldengine/deps/acelite/ace/ICMP_Socket.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/ICMP_Socket.h delete mode 100644 modules/worldengine/deps/acelite/ace/INET_Addr.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/INET_Addr.h delete mode 100644 modules/worldengine/deps/acelite/ace/INET_Addr.inl delete mode 100644 modules/worldengine/deps/acelite/ace/IOStream.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/IOStream.h delete mode 100644 modules/worldengine/deps/acelite/ace/IOStream_T.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/IOStream_T.h delete mode 100644 modules/worldengine/deps/acelite/ace/IOStream_T.inl delete mode 100644 modules/worldengine/deps/acelite/ace/IO_Cntl_Msg.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/IO_Cntl_Msg.h delete mode 100644 modules/worldengine/deps/acelite/ace/IO_Cntl_Msg.inl delete mode 100644 modules/worldengine/deps/acelite/ace/IO_SAP.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/IO_SAP.h delete mode 100644 modules/worldengine/deps/acelite/ace/IO_SAP.inl delete mode 100644 modules/worldengine/deps/acelite/ace/IPC_SAP.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/IPC_SAP.h delete mode 100644 modules/worldengine/deps/acelite/ace/IPC_SAP.inl delete mode 100644 modules/worldengine/deps/acelite/ace/If_Then_Else.h delete mode 100644 modules/worldengine/deps/acelite/ace/Init_ACE.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Init_ACE.h delete mode 100644 modules/worldengine/deps/acelite/ace/Intrusive_Auto_Ptr.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Intrusive_Auto_Ptr.h delete mode 100644 modules/worldengine/deps/acelite/ace/Intrusive_Auto_Ptr.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Intrusive_List.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Intrusive_List.h delete mode 100644 modules/worldengine/deps/acelite/ace/Intrusive_List.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Intrusive_List_Node.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Intrusive_List_Node.h delete mode 100644 modules/worldengine/deps/acelite/ace/Intrusive_List_Node.inl delete mode 100644 modules/worldengine/deps/acelite/ace/LOCK_SOCK_Acceptor.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/LOCK_SOCK_Acceptor.h delete mode 100644 modules/worldengine/deps/acelite/ace/LSOCK.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/LSOCK.h delete mode 100644 modules/worldengine/deps/acelite/ace/LSOCK.inl delete mode 100644 modules/worldengine/deps/acelite/ace/LSOCK_Acceptor.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/LSOCK_Acceptor.h delete mode 100644 modules/worldengine/deps/acelite/ace/LSOCK_CODgram.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/LSOCK_CODgram.h delete mode 100644 modules/worldengine/deps/acelite/ace/LSOCK_CODgram.inl delete mode 100644 modules/worldengine/deps/acelite/ace/LSOCK_Connector.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/LSOCK_Connector.h delete mode 100644 modules/worldengine/deps/acelite/ace/LSOCK_Connector.inl delete mode 100644 modules/worldengine/deps/acelite/ace/LSOCK_Dgram.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/LSOCK_Dgram.h delete mode 100644 modules/worldengine/deps/acelite/ace/LSOCK_Dgram.inl delete mode 100644 modules/worldengine/deps/acelite/ace/LSOCK_Stream.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/LSOCK_Stream.h delete mode 100644 modules/worldengine/deps/acelite/ace/LSOCK_Stream.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Lib_Find.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Lib_Find.h delete mode 100644 modules/worldengine/deps/acelite/ace/Local_Memory_Pool.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Local_Memory_Pool.h delete mode 100644 modules/worldengine/deps/acelite/ace/Local_Name_Space.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Local_Name_Space.h delete mode 100644 modules/worldengine/deps/acelite/ace/Local_Name_Space_T.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Local_Name_Space_T.h delete mode 100644 modules/worldengine/deps/acelite/ace/Local_Tokens.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Local_Tokens.h delete mode 100644 modules/worldengine/deps/acelite/ace/Local_Tokens.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Lock.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Lock.h delete mode 100644 modules/worldengine/deps/acelite/ace/Lock.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Lock_Adapter_T.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Lock_Adapter_T.h delete mode 100644 modules/worldengine/deps/acelite/ace/Lock_Adapter_T.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Log_Category.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Log_Category.h delete mode 100644 modules/worldengine/deps/acelite/ace/Log_Category.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Log_Msg.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Log_Msg.h delete mode 100644 modules/worldengine/deps/acelite/ace/Log_Msg.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Log_Msg_Backend.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Log_Msg_Backend.h delete mode 100644 modules/worldengine/deps/acelite/ace/Log_Msg_Callback.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Log_Msg_Callback.h delete mode 100644 modules/worldengine/deps/acelite/ace/Log_Msg_IPC.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Log_Msg_IPC.h delete mode 100644 modules/worldengine/deps/acelite/ace/Log_Msg_NT_Event_Log.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Log_Msg_NT_Event_Log.h delete mode 100644 modules/worldengine/deps/acelite/ace/Log_Msg_UNIX_Syslog.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Log_Msg_UNIX_Syslog.h delete mode 100644 modules/worldengine/deps/acelite/ace/Log_Priority.h delete mode 100644 modules/worldengine/deps/acelite/ace/Log_Record.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Log_Record.h delete mode 100644 modules/worldengine/deps/acelite/ace/Log_Record.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Logging_Strategy.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Logging_Strategy.h delete mode 100644 modules/worldengine/deps/acelite/ace/MEM_Acceptor.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/MEM_Acceptor.h delete mode 100644 modules/worldengine/deps/acelite/ace/MEM_Acceptor.inl delete mode 100644 modules/worldengine/deps/acelite/ace/MEM_Addr.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/MEM_Addr.h delete mode 100644 modules/worldengine/deps/acelite/ace/MEM_Addr.inl delete mode 100644 modules/worldengine/deps/acelite/ace/MEM_Connector.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/MEM_Connector.h delete mode 100644 modules/worldengine/deps/acelite/ace/MEM_Connector.inl delete mode 100644 modules/worldengine/deps/acelite/ace/MEM_IO.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/MEM_IO.h delete mode 100644 modules/worldengine/deps/acelite/ace/MEM_IO.inl delete mode 100644 modules/worldengine/deps/acelite/ace/MEM_SAP.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/MEM_SAP.h delete mode 100644 modules/worldengine/deps/acelite/ace/MEM_SAP.inl delete mode 100644 modules/worldengine/deps/acelite/ace/MEM_Stream.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/MEM_Stream.h delete mode 100644 modules/worldengine/deps/acelite/ace/MEM_Stream.inl delete mode 100644 modules/worldengine/deps/acelite/ace/MMAP_Memory_Pool.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/MMAP_Memory_Pool.h delete mode 100644 modules/worldengine/deps/acelite/ace/MMAP_Memory_Pool.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Malloc.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Malloc.h delete mode 100644 modules/worldengine/deps/acelite/ace/Malloc.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Malloc_Allocator.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Malloc_Allocator.h delete mode 100644 modules/worldengine/deps/acelite/ace/Malloc_Allocator.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Malloc_Base.h delete mode 100644 modules/worldengine/deps/acelite/ace/Malloc_T.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Malloc_T.h delete mode 100644 modules/worldengine/deps/acelite/ace/Malloc_T.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Managed_Object.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Managed_Object.h delete mode 100644 modules/worldengine/deps/acelite/ace/Managed_Object.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Manual_Event.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Manual_Event.h delete mode 100644 modules/worldengine/deps/acelite/ace/Manual_Event.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Map_Manager.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Map_Manager.h delete mode 100644 modules/worldengine/deps/acelite/ace/Map_Manager.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Map_T.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Map_T.h delete mode 100644 modules/worldengine/deps/acelite/ace/Map_T.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Mem_Map.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Mem_Map.h delete mode 100644 modules/worldengine/deps/acelite/ace/Mem_Map.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Memory_Pool.h delete mode 100644 modules/worldengine/deps/acelite/ace/Message_Block.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Message_Block.h delete mode 100644 modules/worldengine/deps/acelite/ace/Message_Block.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Message_Block_T.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Message_Block_T.h delete mode 100644 modules/worldengine/deps/acelite/ace/Message_Block_T.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Message_Queue.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Message_Queue.h delete mode 100644 modules/worldengine/deps/acelite/ace/Message_Queue.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Message_Queue_NT.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Message_Queue_NT.h delete mode 100644 modules/worldengine/deps/acelite/ace/Message_Queue_NT.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Message_Queue_T.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Message_Queue_T.h delete mode 100644 modules/worldengine/deps/acelite/ace/Message_Queue_Vx.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Message_Queue_Vx.h delete mode 100644 modules/worldengine/deps/acelite/ace/Message_Queue_Vx.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Method_Request.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Method_Request.h delete mode 100644 modules/worldengine/deps/acelite/ace/Metrics_Cache.h delete mode 100644 modules/worldengine/deps/acelite/ace/Metrics_Cache_T.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Metrics_Cache_T.h delete mode 100644 modules/worldengine/deps/acelite/ace/Metrics_Cache_T.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Min_Max.h delete mode 100644 modules/worldengine/deps/acelite/ace/Module.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Module.h delete mode 100644 modules/worldengine/deps/acelite/ace/Module.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Monitor_Admin.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Monitor_Admin.h delete mode 100644 modules/worldengine/deps/acelite/ace/Monitor_Admin_Manager.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Monitor_Admin_Manager.h delete mode 100644 modules/worldengine/deps/acelite/ace/Monitor_Base.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Monitor_Base.h delete mode 100644 modules/worldengine/deps/acelite/ace/Monitor_Base.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Monitor_Control/Auto_Update_Starter.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Monitor_Control/Auto_Update_Starter.h delete mode 100644 modules/worldengine/deps/acelite/ace/Monitor_Control/BSD_Network_Interface_Monitor.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Monitor_Control/BSD_Network_Interface_Monitor.h delete mode 100644 modules/worldengine/deps/acelite/ace/Monitor_Control/Bytes_Received_Monitor.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Monitor_Control/Bytes_Received_Monitor.h delete mode 100644 modules/worldengine/deps/acelite/ace/Monitor_Control/Bytes_Sent_Monitor.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Monitor_Control/Bytes_Sent_Monitor.h delete mode 100644 modules/worldengine/deps/acelite/ace/Monitor_Control/CPU_Load_Monitor.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Monitor_Control/CPU_Load_Monitor.h delete mode 100644 modules/worldengine/deps/acelite/ace/Monitor_Control/Constraint_Interpreter.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Monitor_Control/Constraint_Interpreter.h delete mode 100644 modules/worldengine/deps/acelite/ace/Monitor_Control/Constraint_Visitor.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Monitor_Control/Constraint_Visitor.h delete mode 100644 modules/worldengine/deps/acelite/ace/Monitor_Control/FreeBSD_Network_Interface_Monitor.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Monitor_Control/FreeBSD_Network_Interface_Monitor.h delete mode 100644 modules/worldengine/deps/acelite/ace/Monitor_Control/Linux_Network_Interface_Monitor.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Monitor_Control/Linux_Network_Interface_Monitor.h delete mode 100644 modules/worldengine/deps/acelite/ace/Monitor_Control/Memory_Usage_Monitor.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Monitor_Control/Memory_Usage_Monitor.h delete mode 100644 modules/worldengine/deps/acelite/ace/Monitor_Control/Monitor_Control.h delete mode 100644 modules/worldengine/deps/acelite/ace/Monitor_Control/Monitor_Control.mpc delete mode 100644 modules/worldengine/deps/acelite/ace/Monitor_Control/Monitor_Control.vsd delete mode 100644 modules/worldengine/deps/acelite/ace/Monitor_Control/Monitor_Control_export.h delete mode 100644 modules/worldengine/deps/acelite/ace/Monitor_Control/Monitor_Control_utils.h delete mode 100644 modules/worldengine/deps/acelite/ace/Monitor_Control/Monitor_Group.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Monitor_Control/Monitor_Group.h delete mode 100644 modules/worldengine/deps/acelite/ace/Monitor_Control/Monitor_Query.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Monitor_Control/Monitor_Query.h delete mode 100644 modules/worldengine/deps/acelite/ace/Monitor_Control/Null_Network_Interface_Monitor.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Monitor_Control/Null_Network_Interface_Monitor.h delete mode 100644 modules/worldengine/deps/acelite/ace/Monitor_Control/Num_Threads_Monitor.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Monitor_Control/Num_Threads_Monitor.h delete mode 100644 modules/worldengine/deps/acelite/ace/Monitor_Control/Packets_Received_Monitor.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Monitor_Control/Packets_Received_Monitor.h delete mode 100644 modules/worldengine/deps/acelite/ace/Monitor_Control/Packets_Sent_Monitor.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Monitor_Control/Packets_Sent_Monitor.h delete mode 100644 modules/worldengine/deps/acelite/ace/Monitor_Control/Solaris_Network_Interface_Monitor.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Monitor_Control/Solaris_Network_Interface_Monitor.h delete mode 100644 modules/worldengine/deps/acelite/ace/Monitor_Control/Windows_Monitor.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Monitor_Control/Windows_Monitor.h delete mode 100644 modules/worldengine/deps/acelite/ace/Monitor_Control/Windows_Multi_Instance_Monitor.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Monitor_Control/Windows_Multi_Instance_Monitor.h delete mode 100644 modules/worldengine/deps/acelite/ace/Monitor_Control_Action.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Monitor_Control_Action.h delete mode 100644 modules/worldengine/deps/acelite/ace/Monitor_Control_Types.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Monitor_Control_Types.h delete mode 100644 modules/worldengine/deps/acelite/ace/Monitor_Point_Registry.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Monitor_Point_Registry.h delete mode 100644 modules/worldengine/deps/acelite/ace/Monitor_Size.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Monitor_Size.h delete mode 100644 modules/worldengine/deps/acelite/ace/Monotonic_Time_Policy.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Monotonic_Time_Policy.h delete mode 100644 modules/worldengine/deps/acelite/ace/Monotonic_Time_Policy.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Msg_WFMO_Reactor.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Msg_WFMO_Reactor.h delete mode 100644 modules/worldengine/deps/acelite/ace/Msg_WFMO_Reactor.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Multihomed_INET_Addr.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Multihomed_INET_Addr.h delete mode 100644 modules/worldengine/deps/acelite/ace/Multihomed_INET_Addr.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Mutex.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Mutex.h delete mode 100644 modules/worldengine/deps/acelite/ace/Mutex.inl delete mode 100644 modules/worldengine/deps/acelite/ace/NT_Service.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/NT_Service.h delete mode 100644 modules/worldengine/deps/acelite/ace/NT_Service.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Name_Proxy.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Name_Proxy.h delete mode 100644 modules/worldengine/deps/acelite/ace/Name_Request_Reply.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Name_Request_Reply.h delete mode 100644 modules/worldengine/deps/acelite/ace/Name_Space.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Name_Space.h delete mode 100644 modules/worldengine/deps/acelite/ace/Naming_Context.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Naming_Context.h delete mode 100644 modules/worldengine/deps/acelite/ace/Naming_Context.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Netlink_Addr.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Netlink_Addr.h delete mode 100644 modules/worldengine/deps/acelite/ace/Netlink_Addr.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Node.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Node.h delete mode 100644 modules/worldengine/deps/acelite/ace/Notification_Queue.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Notification_Queue.h delete mode 100644 modules/worldengine/deps/acelite/ace/Notification_Queue.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Notification_Strategy.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Notification_Strategy.h delete mode 100644 modules/worldengine/deps/acelite/ace/Notification_Strategy.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Null_Barrier.h delete mode 100644 modules/worldengine/deps/acelite/ace/Null_Condition.h delete mode 100644 modules/worldengine/deps/acelite/ace/Null_Mutex.h delete mode 100644 modules/worldengine/deps/acelite/ace/Null_Semaphore.h delete mode 100644 modules/worldengine/deps/acelite/ace/Numeric_Limits.h delete mode 100644 modules/worldengine/deps/acelite/ace/OS.h delete mode 100644 modules/worldengine/deps/acelite/ace/OS_Errno.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/OS_Errno.h delete mode 100644 modules/worldengine/deps/acelite/ace/OS_Errno.inl delete mode 100644 modules/worldengine/deps/acelite/ace/OS_Log_Msg_Attributes.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/OS_Log_Msg_Attributes.h delete mode 100644 modules/worldengine/deps/acelite/ace/OS_Log_Msg_Attributes.inl delete mode 100644 modules/worldengine/deps/acelite/ace/OS_Memory.h delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_Thread.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_Thread.h delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_Thread.inl delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_arpa_inet.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_arpa_inet.h delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_arpa_inet.inl delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_ctype.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_ctype.h delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_ctype.inl delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_dirent.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_dirent.h delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_dirent.inl delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_dlfcn.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_dlfcn.h delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_dlfcn.inl delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_errno.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_errno.h delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_errno.inl delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_fcntl.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_fcntl.h delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_fcntl.inl delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_macros.h delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_math.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_math.h delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_math.inl delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_netdb.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_netdb.h delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_netdb.inl delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_poll.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_poll.h delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_poll.inl delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_pwd.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_pwd.h delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_pwd.inl delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_regex.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_regex.h delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_regex.inl delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_signal.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_signal.h delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_signal.inl delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_stdio.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_stdio.h delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_stdio.inl delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_stdlib.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_stdlib.h delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_stdlib.inl delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_string.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_string.h delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_string.inl delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_strings.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_strings.h delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_strings.inl delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_stropts.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_stropts.h delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_stropts.inl delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_sys_mman.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_sys_mman.h delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_sys_mman.inl delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_sys_msg.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_sys_msg.h delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_sys_msg.inl delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_sys_resource.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_sys_resource.h delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_sys_resource.inl delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_sys_select.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_sys_select.h delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_sys_select.inl delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_sys_sendfile.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_sys_sendfile.h delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_sys_sendfile.inl delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_sys_shm.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_sys_shm.h delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_sys_shm.inl delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_sys_socket.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_sys_socket.h delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_sys_socket.inl delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_sys_stat.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_sys_stat.h delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_sys_stat.inl delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_sys_time.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_sys_time.h delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_sys_time.inl delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_sys_uio.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_sys_uio.h delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_sys_uio.inl delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_sys_utsname.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_sys_utsname.h delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_sys_wait.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_sys_wait.h delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_sys_wait.inl delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_time.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_time.h delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_time.inl delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_unistd.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_unistd.h delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_unistd.inl delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_wchar.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_wchar.h delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_wchar.inl delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_wctype.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_wctype.h delete mode 100644 modules/worldengine/deps/acelite/ace/OS_NS_wctype.inl delete mode 100644 modules/worldengine/deps/acelite/ace/OS_QoS.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/OS_QoS.h delete mode 100644 modules/worldengine/deps/acelite/ace/OS_TLI.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/OS_TLI.h delete mode 100644 modules/worldengine/deps/acelite/ace/OS_TLI.inl delete mode 100644 modules/worldengine/deps/acelite/ace/OS_Thread_Adapter.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/OS_Thread_Adapter.h delete mode 100644 modules/worldengine/deps/acelite/ace/OS_main.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/OS_main.h delete mode 100644 modules/worldengine/deps/acelite/ace/Obchunk.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Obchunk.h delete mode 100644 modules/worldengine/deps/acelite/ace/Obchunk.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Object_Manager.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Object_Manager.h delete mode 100644 modules/worldengine/deps/acelite/ace/Object_Manager.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Object_Manager_Base.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Object_Manager_Base.h delete mode 100644 modules/worldengine/deps/acelite/ace/Obstack.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Obstack.h delete mode 100644 modules/worldengine/deps/acelite/ace/Obstack_T.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Obstack_T.h delete mode 100644 modules/worldengine/deps/acelite/ace/Obstack_T.inl delete mode 100644 modules/worldengine/deps/acelite/ace/PI_Malloc.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/PI_Malloc.h delete mode 100644 modules/worldengine/deps/acelite/ace/PI_Malloc.inl delete mode 100644 modules/worldengine/deps/acelite/ace/POSIX_Asynch_IO.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/POSIX_Asynch_IO.h delete mode 100644 modules/worldengine/deps/acelite/ace/POSIX_CB_Proactor.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/POSIX_CB_Proactor.h delete mode 100644 modules/worldengine/deps/acelite/ace/POSIX_Proactor.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/POSIX_Proactor.h delete mode 100644 modules/worldengine/deps/acelite/ace/POSIX_Proactor.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Pagefile_Memory_Pool.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Pagefile_Memory_Pool.h delete mode 100644 modules/worldengine/deps/acelite/ace/Pagefile_Memory_Pool.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Pair_T.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Pair_T.h delete mode 100644 modules/worldengine/deps/acelite/ace/Pair_T.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Parse_Node.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Parse_Node.h delete mode 100644 modules/worldengine/deps/acelite/ace/Ping_Socket.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Ping_Socket.h delete mode 100644 modules/worldengine/deps/acelite/ace/Ping_Socket.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Pipe.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Pipe.h delete mode 100644 modules/worldengine/deps/acelite/ace/Pipe.inl delete mode 100644 modules/worldengine/deps/acelite/ace/PrecompiledHeaders/WinAcePCH.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/PrecompiledHeaders/WinAcePCH.h delete mode 100644 modules/worldengine/deps/acelite/ace/Priority_Reactor.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Priority_Reactor.h delete mode 100644 modules/worldengine/deps/acelite/ace/Proactor.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Proactor.h delete mode 100644 modules/worldengine/deps/acelite/ace/Proactor.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Proactor_Impl.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Proactor_Impl.h delete mode 100644 modules/worldengine/deps/acelite/ace/Process.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Process.h delete mode 100644 modules/worldengine/deps/acelite/ace/Process.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Process_Manager.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Process_Manager.h delete mode 100644 modules/worldengine/deps/acelite/ace/Process_Manager.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Process_Mutex.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Process_Mutex.h delete mode 100644 modules/worldengine/deps/acelite/ace/Process_Mutex.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Process_Semaphore.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Process_Semaphore.h delete mode 100644 modules/worldengine/deps/acelite/ace/Process_Semaphore.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Profile_Timer.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Profile_Timer.h delete mode 100644 modules/worldengine/deps/acelite/ace/Profile_Timer.inl delete mode 100644 modules/worldengine/deps/acelite/ace/QoS/ACE_QoS.pc.in delete mode 100644 modules/worldengine/deps/acelite/ace/QoS/ACE_QoS_Export.h delete mode 100644 modules/worldengine/deps/acelite/ace/QoS/QoS_Decorator.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/QoS/QoS_Decorator.h delete mode 100644 modules/worldengine/deps/acelite/ace/QoS/QoS_Manager.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/QoS/QoS_Manager.h delete mode 100644 modules/worldengine/deps/acelite/ace/QoS/QoS_Session.h delete mode 100644 modules/worldengine/deps/acelite/ace/QoS/QoS_Session_Factory.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/QoS/QoS_Session_Factory.h delete mode 100644 modules/worldengine/deps/acelite/ace/QoS/QoS_Session_Impl.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/QoS/QoS_Session_Impl.h delete mode 100644 modules/worldengine/deps/acelite/ace/QoS/QoS_Session_Impl.inl delete mode 100644 modules/worldengine/deps/acelite/ace/QoS/README delete mode 100644 modules/worldengine/deps/acelite/ace/QoS/SOCK_Dgram_Mcast_QoS.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/QoS/SOCK_Dgram_Mcast_QoS.h delete mode 100644 modules/worldengine/deps/acelite/ace/QoS/SOCK_Dgram_Mcast_QoS.inl delete mode 100644 modules/worldengine/deps/acelite/ace/QoS/qos.mpc delete mode 100644 modules/worldengine/deps/acelite/ace/QtReactor/.gitignore delete mode 100644 modules/worldengine/deps/acelite/ace/QtReactor/ACE_QtReactor.pc.in delete mode 100644 modules/worldengine/deps/acelite/ace/QtReactor/ACE_QtReactor_export.h delete mode 100644 modules/worldengine/deps/acelite/ace/QtReactor/QtReactor.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/QtReactor/QtReactor.h delete mode 100644 modules/worldengine/deps/acelite/ace/QtReactor/ace_qt4reactor.mpc delete mode 100644 modules/worldengine/deps/acelite/ace/RB_Tree.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/RB_Tree.h delete mode 100644 modules/worldengine/deps/acelite/ace/RB_Tree.inl delete mode 100644 modules/worldengine/deps/acelite/ace/README delete mode 100644 modules/worldengine/deps/acelite/ace/RW_Mutex.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/RW_Mutex.h delete mode 100644 modules/worldengine/deps/acelite/ace/RW_Mutex.inl delete mode 100644 modules/worldengine/deps/acelite/ace/RW_Process_Mutex.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/RW_Process_Mutex.h delete mode 100644 modules/worldengine/deps/acelite/ace/RW_Process_Mutex.inl delete mode 100644 modules/worldengine/deps/acelite/ace/RW_Thread_Mutex.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/RW_Thread_Mutex.h delete mode 100644 modules/worldengine/deps/acelite/ace/RW_Thread_Mutex.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Reactor.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Reactor.h delete mode 100644 modules/worldengine/deps/acelite/ace/Reactor.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Reactor_Impl.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Reactor_Impl.h delete mode 100644 modules/worldengine/deps/acelite/ace/Reactor_Notification_Strategy.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Reactor_Notification_Strategy.h delete mode 100644 modules/worldengine/deps/acelite/ace/Reactor_Notification_Strategy.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Reactor_Timer_Interface.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Reactor_Timer_Interface.h delete mode 100644 modules/worldengine/deps/acelite/ace/Reactor_Token_T.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Reactor_Token_T.h delete mode 100644 modules/worldengine/deps/acelite/ace/Read_Buffer.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Read_Buffer.h delete mode 100644 modules/worldengine/deps/acelite/ace/Read_Buffer.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Recursive_Thread_Mutex.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Recursive_Thread_Mutex.h delete mode 100644 modules/worldengine/deps/acelite/ace/Recursive_Thread_Mutex.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Recyclable.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Recyclable.h delete mode 100644 modules/worldengine/deps/acelite/ace/Recyclable.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Refcountable_T.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Refcountable_T.h delete mode 100644 modules/worldengine/deps/acelite/ace/Refcountable_T.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Refcounted_Auto_Ptr.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Refcounted_Auto_Ptr.h delete mode 100644 modules/worldengine/deps/acelite/ace/Refcounted_Auto_Ptr.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Registry.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Registry.h delete mode 100644 modules/worldengine/deps/acelite/ace/Registry_Name_Space.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Registry_Name_Space.h delete mode 100644 modules/worldengine/deps/acelite/ace/Remote_Name_Space.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Remote_Name_Space.h delete mode 100644 modules/worldengine/deps/acelite/ace/Remote_Tokens.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Remote_Tokens.h delete mode 100644 modules/worldengine/deps/acelite/ace/Remote_Tokens.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Reverse_Lock_T.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Reverse_Lock_T.h delete mode 100644 modules/worldengine/deps/acelite/ace/Reverse_Lock_T.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Rtems_init.c delete mode 100644 modules/worldengine/deps/acelite/ace/SOCK.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/SOCK.h delete mode 100644 modules/worldengine/deps/acelite/ace/SOCK.inl delete mode 100644 modules/worldengine/deps/acelite/ace/SOCK_Acceptor.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/SOCK_Acceptor.h delete mode 100644 modules/worldengine/deps/acelite/ace/SOCK_Acceptor.inl delete mode 100644 modules/worldengine/deps/acelite/ace/SOCK_CODgram.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/SOCK_CODgram.h delete mode 100644 modules/worldengine/deps/acelite/ace/SOCK_CODgram.inl delete mode 100644 modules/worldengine/deps/acelite/ace/SOCK_Connector.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/SOCK_Connector.h delete mode 100644 modules/worldengine/deps/acelite/ace/SOCK_Connector.inl delete mode 100644 modules/worldengine/deps/acelite/ace/SOCK_Dgram.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/SOCK_Dgram.h delete mode 100644 modules/worldengine/deps/acelite/ace/SOCK_Dgram.inl delete mode 100644 modules/worldengine/deps/acelite/ace/SOCK_Dgram_Bcast.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/SOCK_Dgram_Bcast.h delete mode 100644 modules/worldengine/deps/acelite/ace/SOCK_Dgram_Bcast.inl delete mode 100644 modules/worldengine/deps/acelite/ace/SOCK_Dgram_Mcast.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/SOCK_Dgram_Mcast.h delete mode 100644 modules/worldengine/deps/acelite/ace/SOCK_Dgram_Mcast.inl delete mode 100644 modules/worldengine/deps/acelite/ace/SOCK_IO.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/SOCK_IO.h delete mode 100644 modules/worldengine/deps/acelite/ace/SOCK_IO.inl delete mode 100644 modules/worldengine/deps/acelite/ace/SOCK_Netlink.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/SOCK_Netlink.h delete mode 100644 modules/worldengine/deps/acelite/ace/SOCK_Netlink.inl delete mode 100644 modules/worldengine/deps/acelite/ace/SOCK_SEQPACK_Acceptor.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/SOCK_SEQPACK_Acceptor.h delete mode 100644 modules/worldengine/deps/acelite/ace/SOCK_SEQPACK_Acceptor.inl delete mode 100644 modules/worldengine/deps/acelite/ace/SOCK_SEQPACK_Association.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/SOCK_SEQPACK_Association.h delete mode 100644 modules/worldengine/deps/acelite/ace/SOCK_SEQPACK_Association.inl delete mode 100644 modules/worldengine/deps/acelite/ace/SOCK_SEQPACK_Connector.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/SOCK_SEQPACK_Connector.h delete mode 100644 modules/worldengine/deps/acelite/ace/SOCK_SEQPACK_Connector.inl delete mode 100644 modules/worldengine/deps/acelite/ace/SOCK_Stream.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/SOCK_Stream.h delete mode 100644 modules/worldengine/deps/acelite/ace/SOCK_Stream.inl delete mode 100644 modules/worldengine/deps/acelite/ace/SPIPE.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/SPIPE.h delete mode 100644 modules/worldengine/deps/acelite/ace/SPIPE.inl delete mode 100644 modules/worldengine/deps/acelite/ace/SPIPE_Acceptor.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/SPIPE_Acceptor.h delete mode 100644 modules/worldengine/deps/acelite/ace/SPIPE_Addr.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/SPIPE_Addr.h delete mode 100644 modules/worldengine/deps/acelite/ace/SPIPE_Addr.inl delete mode 100644 modules/worldengine/deps/acelite/ace/SPIPE_Connector.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/SPIPE_Connector.h delete mode 100644 modules/worldengine/deps/acelite/ace/SPIPE_Connector.inl delete mode 100644 modules/worldengine/deps/acelite/ace/SPIPE_Stream.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/SPIPE_Stream.h delete mode 100644 modules/worldengine/deps/acelite/ace/SPIPE_Stream.inl delete mode 100644 modules/worldengine/deps/acelite/ace/SSL/ACE_SSL.pc.in delete mode 100644 modules/worldengine/deps/acelite/ace/SSL/SSL_Asynch_BIO.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/SSL/SSL_Asynch_BIO.h delete mode 100644 modules/worldengine/deps/acelite/ace/SSL/SSL_Asynch_Stream.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/SSL/SSL_Asynch_Stream.h delete mode 100644 modules/worldengine/deps/acelite/ace/SSL/SSL_Asynch_Stream.inl delete mode 100644 modules/worldengine/deps/acelite/ace/SSL/SSL_Context.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/SSL/SSL_Context.h delete mode 100644 modules/worldengine/deps/acelite/ace/SSL/SSL_Context.inl delete mode 100644 modules/worldengine/deps/acelite/ace/SSL/SSL_Export.h delete mode 100644 modules/worldengine/deps/acelite/ace/SSL/SSL_Initializer.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/SSL/SSL_Initializer.h delete mode 100644 modules/worldengine/deps/acelite/ace/SSL/SSL_SOCK.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/SSL/SSL_SOCK.h delete mode 100644 modules/worldengine/deps/acelite/ace/SSL/SSL_SOCK.inl delete mode 100644 modules/worldengine/deps/acelite/ace/SSL/SSL_SOCK_Acceptor.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/SSL/SSL_SOCK_Acceptor.h delete mode 100644 modules/worldengine/deps/acelite/ace/SSL/SSL_SOCK_Acceptor.inl delete mode 100644 modules/worldengine/deps/acelite/ace/SSL/SSL_SOCK_Connector.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/SSL/SSL_SOCK_Connector.h delete mode 100644 modules/worldengine/deps/acelite/ace/SSL/SSL_SOCK_Connector.inl delete mode 100644 modules/worldengine/deps/acelite/ace/SSL/SSL_SOCK_Stream.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/SSL/SSL_SOCK_Stream.h delete mode 100644 modules/worldengine/deps/acelite/ace/SSL/SSL_SOCK_Stream.inl delete mode 100644 modules/worldengine/deps/acelite/ace/SSL/ssl.mpc delete mode 100644 modules/worldengine/deps/acelite/ace/SSL/ssl_for_tao.mpc delete mode 100644 modules/worldengine/deps/acelite/ace/SSL/sslconf.h delete mode 100644 modules/worldengine/deps/acelite/ace/SString.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/SString.h delete mode 100644 modules/worldengine/deps/acelite/ace/SString.inl delete mode 100644 modules/worldengine/deps/acelite/ace/SStringfwd.h delete mode 100644 modules/worldengine/deps/acelite/ace/SUN_Proactor.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/SUN_Proactor.h delete mode 100644 modules/worldengine/deps/acelite/ace/SV_Message.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/SV_Message.h delete mode 100644 modules/worldengine/deps/acelite/ace/SV_Message.inl delete mode 100644 modules/worldengine/deps/acelite/ace/SV_Message_Queue.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/SV_Message_Queue.h delete mode 100644 modules/worldengine/deps/acelite/ace/SV_Message_Queue.inl delete mode 100644 modules/worldengine/deps/acelite/ace/SV_Semaphore_Complex.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/SV_Semaphore_Complex.h delete mode 100644 modules/worldengine/deps/acelite/ace/SV_Semaphore_Complex.inl delete mode 100644 modules/worldengine/deps/acelite/ace/SV_Semaphore_Simple.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/SV_Semaphore_Simple.h delete mode 100644 modules/worldengine/deps/acelite/ace/SV_Semaphore_Simple.inl delete mode 100644 modules/worldengine/deps/acelite/ace/SV_Shared_Memory.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/SV_Shared_Memory.h delete mode 100644 modules/worldengine/deps/acelite/ace/SV_Shared_Memory.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Sample_History.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Sample_History.h delete mode 100644 modules/worldengine/deps/acelite/ace/Sample_History.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Sbrk_Memory_Pool.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Sbrk_Memory_Pool.h delete mode 100644 modules/worldengine/deps/acelite/ace/Sched_Params.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Sched_Params.h delete mode 100644 modules/worldengine/deps/acelite/ace/Sched_Params.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Select_Reactor.h delete mode 100644 modules/worldengine/deps/acelite/ace/Select_Reactor_Base.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Select_Reactor_Base.h delete mode 100644 modules/worldengine/deps/acelite/ace/Select_Reactor_Base.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Select_Reactor_T.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Select_Reactor_T.h delete mode 100644 modules/worldengine/deps/acelite/ace/Select_Reactor_T.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Semaphore.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Semaphore.h delete mode 100644 modules/worldengine/deps/acelite/ace/Semaphore.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Service_Config.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Service_Config.h delete mode 100644 modules/worldengine/deps/acelite/ace/Service_Config.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Service_Gestalt.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Service_Gestalt.h delete mode 100644 modules/worldengine/deps/acelite/ace/Service_Gestalt.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Service_Manager.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Service_Manager.h delete mode 100644 modules/worldengine/deps/acelite/ace/Service_Object.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Service_Object.h delete mode 100644 modules/worldengine/deps/acelite/ace/Service_Object.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Service_Repository.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Service_Repository.h delete mode 100644 modules/worldengine/deps/acelite/ace/Service_Repository.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Service_Types.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Service_Types.h delete mode 100644 modules/worldengine/deps/acelite/ace/Service_Types.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Shared_Memory.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Shared_Memory.h delete mode 100644 modules/worldengine/deps/acelite/ace/Shared_Memory_MM.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Shared_Memory_MM.h delete mode 100644 modules/worldengine/deps/acelite/ace/Shared_Memory_MM.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Shared_Memory_Pool.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Shared_Memory_Pool.h delete mode 100644 modules/worldengine/deps/acelite/ace/Shared_Memory_SV.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Shared_Memory_SV.h delete mode 100644 modules/worldengine/deps/acelite/ace/Shared_Memory_SV.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Shared_Object.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Shared_Object.h delete mode 100644 modules/worldengine/deps/acelite/ace/Shared_Object.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Sig_Adapter.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Sig_Adapter.h delete mode 100644 modules/worldengine/deps/acelite/ace/Sig_Handler.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Sig_Handler.h delete mode 100644 modules/worldengine/deps/acelite/ace/Sig_Handler.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Signal.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Signal.h delete mode 100644 modules/worldengine/deps/acelite/ace/Signal.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Singleton.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Singleton.h delete mode 100644 modules/worldengine/deps/acelite/ace/Singleton.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Sock_Connect.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Sock_Connect.h delete mode 100644 modules/worldengine/deps/acelite/ace/Stack_Trace.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Stack_Trace.h delete mode 100644 modules/worldengine/deps/acelite/ace/Static_Object_Lock.h delete mode 100644 modules/worldengine/deps/acelite/ace/Stats.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Stats.h delete mode 100644 modules/worldengine/deps/acelite/ace/Stats.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Strategies_T.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Strategies_T.h delete mode 100644 modules/worldengine/deps/acelite/ace/Strategies_T.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Stream.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Stream.h delete mode 100644 modules/worldengine/deps/acelite/ace/Stream.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Stream_Modules.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Stream_Modules.h delete mode 100644 modules/worldengine/deps/acelite/ace/String_Base.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/String_Base.h delete mode 100644 modules/worldengine/deps/acelite/ace/String_Base.inl delete mode 100644 modules/worldengine/deps/acelite/ace/String_Base_Const.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/String_Base_Const.h delete mode 100644 modules/worldengine/deps/acelite/ace/Svc_Conf.h delete mode 100644 modules/worldengine/deps/acelite/ace/Svc_Conf.y delete mode 100644 modules/worldengine/deps/acelite/ace/Svc_Conf_Lexer.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Svc_Conf_Lexer.h delete mode 100644 modules/worldengine/deps/acelite/ace/Svc_Conf_Param.h delete mode 100644 modules/worldengine/deps/acelite/ace/Svc_Conf_Token_Table.h delete mode 100644 modules/worldengine/deps/acelite/ace/Svc_Conf_Tokens.h delete mode 100644 modules/worldengine/deps/acelite/ace/Svc_Conf_y.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Svc_Handler.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Svc_Handler.h delete mode 100644 modules/worldengine/deps/acelite/ace/Synch.h delete mode 100644 modules/worldengine/deps/acelite/ace/Synch_Options.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Synch_Options.h delete mode 100644 modules/worldengine/deps/acelite/ace/Synch_Traits.h delete mode 100644 modules/worldengine/deps/acelite/ace/System_Time.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/System_Time.h delete mode 100644 modules/worldengine/deps/acelite/ace/TLI.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/TLI.h delete mode 100644 modules/worldengine/deps/acelite/ace/TLI.inl delete mode 100644 modules/worldengine/deps/acelite/ace/TLI_Acceptor.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/TLI_Acceptor.h delete mode 100644 modules/worldengine/deps/acelite/ace/TLI_Connector.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/TLI_Connector.h delete mode 100644 modules/worldengine/deps/acelite/ace/TLI_Connector.inl delete mode 100644 modules/worldengine/deps/acelite/ace/TLI_Stream.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/TLI_Stream.h delete mode 100644 modules/worldengine/deps/acelite/ace/TLI_Stream.inl delete mode 100644 modules/worldengine/deps/acelite/ace/TP_Reactor.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/TP_Reactor.h delete mode 100644 modules/worldengine/deps/acelite/ace/TP_Reactor.inl delete mode 100644 modules/worldengine/deps/acelite/ace/TSS_Adapter.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/TSS_Adapter.h delete mode 100644 modules/worldengine/deps/acelite/ace/TSS_T.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/TSS_T.h delete mode 100644 modules/worldengine/deps/acelite/ace/TSS_T.inl delete mode 100644 modules/worldengine/deps/acelite/ace/TTY_IO.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/TTY_IO.h delete mode 100644 modules/worldengine/deps/acelite/ace/Task.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Task.h delete mode 100644 modules/worldengine/deps/acelite/ace/Task.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Task_Ex_T.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Task_Ex_T.h delete mode 100644 modules/worldengine/deps/acelite/ace/Task_Ex_T.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Task_T.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Task_T.h delete mode 100644 modules/worldengine/deps/acelite/ace/Task_T.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Test_and_Set.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Test_and_Set.h delete mode 100644 modules/worldengine/deps/acelite/ace/Thread.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Thread.h delete mode 100644 modules/worldengine/deps/acelite/ace/Thread.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Thread_Adapter.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Thread_Adapter.h delete mode 100644 modules/worldengine/deps/acelite/ace/Thread_Adapter.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Thread_Control.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Thread_Control.h delete mode 100644 modules/worldengine/deps/acelite/ace/Thread_Control.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Thread_Exit.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Thread_Exit.h delete mode 100644 modules/worldengine/deps/acelite/ace/Thread_Hook.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Thread_Hook.h delete mode 100644 modules/worldengine/deps/acelite/ace/Thread_Manager.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Thread_Manager.h delete mode 100644 modules/worldengine/deps/acelite/ace/Thread_Manager.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Thread_Mutex.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Thread_Mutex.h delete mode 100644 modules/worldengine/deps/acelite/ace/Thread_Mutex.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Thread_Semaphore.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Thread_Semaphore.h delete mode 100644 modules/worldengine/deps/acelite/ace/Thread_Semaphore.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Throughput_Stats.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Throughput_Stats.h delete mode 100644 modules/worldengine/deps/acelite/ace/Time_Policy.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Time_Policy.h delete mode 100644 modules/worldengine/deps/acelite/ace/Time_Policy.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Time_Policy_T.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Time_Policy_T.h delete mode 100644 modules/worldengine/deps/acelite/ace/Time_Policy_T.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Time_Value.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Time_Value.h delete mode 100644 modules/worldengine/deps/acelite/ace/Time_Value.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Time_Value_T.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Time_Value_T.h delete mode 100644 modules/worldengine/deps/acelite/ace/Time_Value_T.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Timeprobe.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Timeprobe.h delete mode 100644 modules/worldengine/deps/acelite/ace/Timeprobe.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Timeprobe_T.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Timeprobe_T.h delete mode 100644 modules/worldengine/deps/acelite/ace/Timer_Hash.h delete mode 100644 modules/worldengine/deps/acelite/ace/Timer_Hash_T.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Timer_Hash_T.h delete mode 100644 modules/worldengine/deps/acelite/ace/Timer_Heap.h delete mode 100644 modules/worldengine/deps/acelite/ace/Timer_Heap_T.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Timer_Heap_T.h delete mode 100644 modules/worldengine/deps/acelite/ace/Timer_List.h delete mode 100644 modules/worldengine/deps/acelite/ace/Timer_List_T.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Timer_List_T.h delete mode 100644 modules/worldengine/deps/acelite/ace/Timer_Queue.h delete mode 100644 modules/worldengine/deps/acelite/ace/Timer_Queue_Adapters.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Timer_Queue_Adapters.h delete mode 100644 modules/worldengine/deps/acelite/ace/Timer_Queue_Adapters.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Timer_Queue_Iterator.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Timer_Queue_Iterator.h delete mode 100644 modules/worldengine/deps/acelite/ace/Timer_Queue_Iterator.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Timer_Queue_T.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Timer_Queue_T.h delete mode 100644 modules/worldengine/deps/acelite/ace/Timer_Queue_T.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Timer_Queuefwd.h delete mode 100644 modules/worldengine/deps/acelite/ace/Timer_Wheel.h delete mode 100644 modules/worldengine/deps/acelite/ace/Timer_Wheel_T.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Timer_Wheel_T.h delete mode 100644 modules/worldengine/deps/acelite/ace/TkReactor/ACE_TkReactor.pc.in delete mode 100644 modules/worldengine/deps/acelite/ace/TkReactor/ACE_TkReactor_export.h delete mode 100644 modules/worldengine/deps/acelite/ace/TkReactor/TkReactor.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/TkReactor/TkReactor.h delete mode 100644 modules/worldengine/deps/acelite/ace/TkReactor/ace_tkreactor.mpc delete mode 100644 modules/worldengine/deps/acelite/ace/Token.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Token.h delete mode 100644 modules/worldengine/deps/acelite/ace/Token.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Token_Collection.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Token_Collection.h delete mode 100644 modules/worldengine/deps/acelite/ace/Token_Collection.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Token_Invariants.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Token_Invariants.h delete mode 100644 modules/worldengine/deps/acelite/ace/Token_Manager.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Token_Manager.h delete mode 100644 modules/worldengine/deps/acelite/ace/Token_Manager.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Token_Request_Reply.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Token_Request_Reply.h delete mode 100644 modules/worldengine/deps/acelite/ace/Token_Request_Reply.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Tokenizer_T.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Tokenizer_T.h delete mode 100644 modules/worldengine/deps/acelite/ace/Trace.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Trace.h delete mode 100644 modules/worldengine/deps/acelite/ace/Truncate.h delete mode 100644 modules/worldengine/deps/acelite/ace/Typed_SV_Message.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Typed_SV_Message.h delete mode 100644 modules/worldengine/deps/acelite/ace/Typed_SV_Message.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Typed_SV_Message_Queue.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Typed_SV_Message_Queue.h delete mode 100644 modules/worldengine/deps/acelite/ace/Typed_SV_Message_Queue.inl delete mode 100644 modules/worldengine/deps/acelite/ace/UNIX_Addr.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/UNIX_Addr.h delete mode 100644 modules/worldengine/deps/acelite/ace/UNIX_Addr.inl delete mode 100644 modules/worldengine/deps/acelite/ace/UPIPE_Acceptor.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/UPIPE_Acceptor.h delete mode 100644 modules/worldengine/deps/acelite/ace/UPIPE_Acceptor.inl delete mode 100644 modules/worldengine/deps/acelite/ace/UPIPE_Addr.h delete mode 100644 modules/worldengine/deps/acelite/ace/UPIPE_Connector.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/UPIPE_Connector.h delete mode 100644 modules/worldengine/deps/acelite/ace/UPIPE_Connector.inl delete mode 100644 modules/worldengine/deps/acelite/ace/UPIPE_Stream.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/UPIPE_Stream.h delete mode 100644 modules/worldengine/deps/acelite/ace/UPIPE_Stream.inl delete mode 100644 modules/worldengine/deps/acelite/ace/UTF16_Encoding_Converter.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/UTF16_Encoding_Converter.h delete mode 100644 modules/worldengine/deps/acelite/ace/UTF16_Encoding_Converter.inl delete mode 100644 modules/worldengine/deps/acelite/ace/UTF32_Encoding_Converter.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/UTF32_Encoding_Converter.h delete mode 100644 modules/worldengine/deps/acelite/ace/UTF8_Encoding_Converter.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/UTF8_Encoding_Converter.h delete mode 100644 modules/worldengine/deps/acelite/ace/UUID.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/UUID.h delete mode 100644 modules/worldengine/deps/acelite/ace/UUID.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Unbounded_Queue.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Unbounded_Queue.h delete mode 100644 modules/worldengine/deps/acelite/ace/Unbounded_Queue.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Unbounded_Set.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Unbounded_Set.h delete mode 100644 modules/worldengine/deps/acelite/ace/Unbounded_Set.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Unbounded_Set_Ex.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Unbounded_Set_Ex.h delete mode 100644 modules/worldengine/deps/acelite/ace/Unbounded_Set_Ex.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Value_Ptr.h delete mode 100644 modules/worldengine/deps/acelite/ace/Vector_T.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/Vector_T.h delete mode 100644 modules/worldengine/deps/acelite/ace/Vector_T.inl delete mode 100644 modules/worldengine/deps/acelite/ace/Version.h delete mode 100644 modules/worldengine/deps/acelite/ace/Versioned_Namespace.h delete mode 100644 modules/worldengine/deps/acelite/ace/WFMO_Reactor.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/WFMO_Reactor.h delete mode 100644 modules/worldengine/deps/acelite/ace/WFMO_Reactor.inl delete mode 100644 modules/worldengine/deps/acelite/ace/WIN32_Asynch_IO.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/WIN32_Asynch_IO.h delete mode 100644 modules/worldengine/deps/acelite/ace/WIN32_Proactor.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/WIN32_Proactor.h delete mode 100644 modules/worldengine/deps/acelite/ace/XML_Svc_Conf.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/XML_Svc_Conf.h delete mode 100644 modules/worldengine/deps/acelite/ace/XML_Utils/ACE_XML_Utils.pc.in delete mode 100644 modules/worldengine/deps/acelite/ace/XML_Utils/XML.mpc delete mode 100644 modules/worldengine/deps/acelite/ace/XML_Utils/XMLSchema/Traversal.hpp delete mode 100644 modules/worldengine/deps/acelite/ace/XML_Utils/XMLSchema/Traversal.ipp delete mode 100644 modules/worldengine/deps/acelite/ace/XML_Utils/XMLSchema/TypeInfo.hpp delete mode 100644 modules/worldengine/deps/acelite/ace/XML_Utils/XMLSchema/TypeInfo.ipp delete mode 100644 modules/worldengine/deps/acelite/ace/XML_Utils/XMLSchema/TypeInfo.tpp delete mode 100644 modules/worldengine/deps/acelite/ace/XML_Utils/XMLSchema/Types.hpp delete mode 100644 modules/worldengine/deps/acelite/ace/XML_Utils/XMLSchema/Types.ipp delete mode 100644 modules/worldengine/deps/acelite/ace/XML_Utils/XMLSchema/Writer.hpp delete mode 100644 modules/worldengine/deps/acelite/ace/XML_Utils/XMLSchema/Writer.ipp delete mode 100644 modules/worldengine/deps/acelite/ace/XML_Utils/XMLSchema/id_map.hpp delete mode 100644 modules/worldengine/deps/acelite/ace/XML_Utils/XML_Error_Handler.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/XML_Utils/XML_Error_Handler.h delete mode 100644 modules/worldengine/deps/acelite/ace/XML_Utils/XML_Helper.h delete mode 100644 modules/worldengine/deps/acelite/ace/XML_Utils/XML_Helper.tpp delete mode 100644 modules/worldengine/deps/acelite/ace/XML_Utils/XML_Schema_Resolver.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/XML_Utils/XML_Schema_Resolver.h delete mode 100644 modules/worldengine/deps/acelite/ace/XML_Utils/XML_Schema_Resolver.tpp delete mode 100644 modules/worldengine/deps/acelite/ace/XML_Utils/XML_Typedefs.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/XML_Utils/XML_Typedefs.h delete mode 100644 modules/worldengine/deps/acelite/ace/XML_Utils/XML_Utils_Export.h delete mode 100644 modules/worldengine/deps/acelite/ace/XML_Utils/XSCRT/Elements.hpp delete mode 100644 modules/worldengine/deps/acelite/ace/XML_Utils/XSCRT/ExtendedTypeInfo.hpp delete mode 100644 modules/worldengine/deps/acelite/ace/XML_Utils/XSCRT/ExtendedTypeInfo.ipp delete mode 100644 modules/worldengine/deps/acelite/ace/XML_Utils/XSCRT/Parser.hpp delete mode 100644 modules/worldengine/deps/acelite/ace/XML_Utils/XSCRT/Traversal.hpp delete mode 100644 modules/worldengine/deps/acelite/ace/XML_Utils/XSCRT/Traversal.tpp delete mode 100644 modules/worldengine/deps/acelite/ace/XML_Utils/XSCRT/Writer.hpp delete mode 100644 modules/worldengine/deps/acelite/ace/XML_Utils/XSCRT/XML.hpp delete mode 100644 modules/worldengine/deps/acelite/ace/XML_Utils/XSCRT/XMLSchema.hpp delete mode 100644 modules/worldengine/deps/acelite/ace/XML_Utils/XercesString.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/XML_Utils/XercesString.h delete mode 100644 modules/worldengine/deps/acelite/ace/XTI_ATM_Mcast.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/XTI_ATM_Mcast.h delete mode 100644 modules/worldengine/deps/acelite/ace/XTI_ATM_Mcast.inl delete mode 100644 modules/worldengine/deps/acelite/ace/XtReactor/ACE_XtReactor.pc.in delete mode 100644 modules/worldengine/deps/acelite/ace/XtReactor/ACE_XtReactor_export.h delete mode 100644 modules/worldengine/deps/acelite/ace/XtReactor/XtReactor.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/XtReactor/XtReactor.h delete mode 100644 modules/worldengine/deps/acelite/ace/XtReactor/ace_xtreactor.mpc delete mode 100644 modules/worldengine/deps/acelite/ace/ace.mpc delete mode 100644 modules/worldengine/deps/acelite/ace/ace.mwc delete mode 100644 modules/worldengine/deps/acelite/ace/ace.rc delete mode 100644 modules/worldengine/deps/acelite/ace/ace_for_tao.mpc delete mode 100644 modules/worldengine/deps/acelite/ace/ace_message_table.bin delete mode 100644 modules/worldengine/deps/acelite/ace/ace_wchar.cpp delete mode 100644 modules/worldengine/deps/acelite/ace/ace_wchar.h delete mode 100644 modules/worldengine/deps/acelite/ace/ace_wchar.inl delete mode 100644 modules/worldengine/deps/acelite/ace/checked_iterator.h delete mode 100644 modules/worldengine/deps/acelite/ace/codecs.mpb delete mode 100644 modules/worldengine/deps/acelite/ace/config-WinCE.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-aix-5.x.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-aix-7.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-all.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-android.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-cygwin32.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-freebsd.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-g++-common.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-hpux-11.00.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-icc-common.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-integritySCA.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-kfreebsd.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-linux.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-lite.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-lynxos.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-macosx-iOS-hardware.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-macosx-iOS-simulator.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-macosx-leopard.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-macosx-lion.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-macosx-mavericks.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-macosx-mountainlion.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-macosx-panther.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-macosx-snowleopard.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-macosx-tiger.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-macosx-yosemite.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-macosx.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-macros.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-netbsd.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-openbsd.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-openvms.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-pharlap.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-posix-nonetworking.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-posix.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-qnx.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-rtems.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-suncc-common.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-sunos5.10.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-sunos5.11.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-sunos5.4-g++.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-sunos5.4-sunc++-4.x.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-sunos5.5.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-sunos5.6.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-sunos5.7.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-sunos5.8.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-sunos5.9.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-vxworks.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-vxworks6.4.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-vxworks6.5.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-vxworks6.6.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-vxworks6.7.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-vxworks6.8.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-vxworks6.9.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-win32-borland.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-win32-cegcc.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-win32-common.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-win32-dmc.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-win32-interix.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-win32-mingw.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-win32-mingw64.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-win32-msvc-10.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-win32-msvc-11.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-win32-msvc-12.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-win32-msvc-14.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-win32-msvc-7.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-win32-msvc-8.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-win32-msvc-9.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-win32-msvc.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-win32.h delete mode 100644 modules/worldengine/deps/acelite/ace/config-windows.h delete mode 100644 modules/worldengine/deps/acelite/ace/filecache.mpb delete mode 100644 modules/worldengine/deps/acelite/ace/iosfwd.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/arpa/os_inet.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/net/os_if.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/netinet/os_in.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/netinet/os_tcp.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_aio.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_assert.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_byteswap.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_complex.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_cpio.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_ctype.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_dirent.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_dlfcn.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_errno.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_fcntl.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_fenv.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_float.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_fmtmsg.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_fnmatch.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_ftw.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_glob.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_grp.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_iconv.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_ifaddrs.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_intrin.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_inttypes.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_iso646.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_kstat.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_langinfo.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_libgen.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_limits.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_local.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_math.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_monetary.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_mqueue.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_ndbm.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_netdb.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_nl_types.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_pdh.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_pdhmsg.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_poll.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_pthread.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_pwd.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_regex.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_sched.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_search.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_semaphore.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_setjmp.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_signal.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_spawn.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_stdarg.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_stdbool.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_stddef.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_stdint.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_stdio.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_stdlib.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_string.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_strings.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_stropts.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_syslog.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_tar.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_termios.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_tgmath.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_time.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_trace.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_typeinfo.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_ucontext.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_ulimit.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_unistd.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_utime.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_utmpx.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_wchar.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_wctype.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/os_wordexp.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/sys/os_ipc.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/sys/os_loadavg.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/sys/os_mman.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/sys/os_msg.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/sys/os_pstat.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/sys/os_resource.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/sys/os_select.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/sys/os_sem.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/sys/os_shm.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/sys/os_socket.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/sys/os_stat.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/sys/os_statvfs.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/sys/os_sysctl.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/sys/os_sysinfo.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/sys/os_time.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/sys/os_timeb.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/sys/os_times.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/sys/os_types.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/sys/os_uio.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/sys/os_un.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/sys/os_utsname.h delete mode 100644 modules/worldengine/deps/acelite/ace/os_include/sys/os_wait.h delete mode 100644 modules/worldengine/deps/acelite/ace/other.mpb delete mode 100644 modules/worldengine/deps/acelite/ace/post.h delete mode 100644 modules/worldengine/deps/acelite/ace/pre.h delete mode 100644 modules/worldengine/deps/acelite/ace/streams.h delete mode 100644 modules/worldengine/deps/acelite/ace/svc_export.h delete mode 100644 modules/worldengine/deps/acelite/ace/svcconf.mpb delete mode 100644 modules/worldengine/deps/acelite/ace/svcconfgen.mpc delete mode 100644 modules/worldengine/deps/acelite/ace/token.mpb delete mode 100644 modules/worldengine/deps/acelite/ace/uuid.mpb delete mode 100644 modules/worldengine/deps/bzip2/CMakeLists.txt delete mode 100644 modules/worldengine/deps/bzip2/LICENSE delete mode 100644 modules/worldengine/deps/bzip2/README delete mode 100644 modules/worldengine/deps/bzip2/blocksort.c delete mode 100644 modules/worldengine/deps/bzip2/bzlib.c delete mode 100644 modules/worldengine/deps/bzip2/bzlib.h delete mode 100644 modules/worldengine/deps/bzip2/bzlib_private.h delete mode 100644 modules/worldengine/deps/bzip2/compress.c delete mode 100644 modules/worldengine/deps/bzip2/crctable.c delete mode 100644 modules/worldengine/deps/bzip2/decompress.c delete mode 100644 modules/worldengine/deps/bzip2/huffman.c delete mode 100644 modules/worldengine/deps/bzip2/randtable.c delete mode 100644 modules/worldengine/deps/g3dlite/CMakeLists.txt delete mode 100644 modules/worldengine/deps/g3dlite/Readme.txt delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/AABox.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/Any.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/AnyVal.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/AreaMemoryManager.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/Array.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/AtomicInt32.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/BinaryFormat.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/BinaryInput.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/BinaryOutput.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/BoundsTrait.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/Box.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/Box2D.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/BumpMapPreprocess.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/Capsule.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/CollisionDetection.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/Color1.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/Color1uint8.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/Color3.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/Color3uint8.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/Color4.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/Color4uint8.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/Cone.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/ConvexPolyhedron.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/CoordinateFrame.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/Crypto.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/Cylinder.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/EqualsTrait.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/FileSystem.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/G3D.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/G3DAll.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/G3DGameUnits.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/GCamera.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/GImage.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/GLight.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/GMutex.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/GThread.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/GUniqueID.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/HashTrait.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/Image1.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/Image1uint8.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/Image3.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/Image3uint8.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/Image4.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/Image4uint8.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/ImageFormat.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/Intersect.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/KDTree.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/Line.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/LineSegment.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/Log.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/Map2D.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/Matrix.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/Matrix2.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/Matrix3.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/Matrix4.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/MemoryManager.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/MeshAlg.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/MeshBuilder.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/NetAddress.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/NetworkDevice.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/ParseError.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/PhysicsFrame.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/PhysicsFrameSpline.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/Plane.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/PointHashGrid.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/PointKDTree.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/Pointer.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/PositionTrait.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/PrecomputedRandom.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/Quat.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/Queue.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/Random.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/Ray.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/Rect2D.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/ReferenceCount.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/RegistryUtil.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/Set.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/SmallArray.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/Sphere.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/Spline.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/Stopwatch.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/System.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/Table.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/TextInput.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/TextOutput.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/ThreadSet.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/Triangle.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/UprightFrame.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/Vector2.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/Vector2int16.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/Vector3.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/Vector3int16.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/Vector3int32.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/Vector4.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/Vector4int8.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/WeakCache.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/Welder.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/WrapMode.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/XML.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/constants.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/debug.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/debugAssert.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/debugPrintf.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/enumclass.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/fileutils.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/filter.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/format.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/g3dfnmatch.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/g3dmath.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/netheaders.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/networkHelpers.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/platform.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/prompt.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/serialize.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/splinefunc.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/stringutils.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/uint128.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/units.h delete mode 100644 modules/worldengine/deps/g3dlite/include/G3D/vectorMath.h delete mode 100644 modules/worldengine/deps/g3dlite/source/AABox.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/Any.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/AnyVal.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/AreaMemoryManager.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/BinaryFormat.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/BinaryInput.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/BinaryOutput.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/Box.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/Box2D.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/BumpMapPreprocess.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/Capsule.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/CollisionDetection.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/Color1.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/Color1uint8.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/Color3.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/Color3uint8.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/Color4.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/Color4uint8.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/Cone.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/ConvexPolyhedron.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/CoordinateFrame.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/Crypto.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/Crypto_md5.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/Cylinder.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/FileSystem.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/GCamera.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/GImage.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/GImage_bayer.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/GImage_bmp.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/GImage_jpeg.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/GImage_png.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/GImage_ppm.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/GImage_tga.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/GLight.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/GThread.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/GUniqueID.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/Image1.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/Image1uint8.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/Image3.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/Image3uint8.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/Image4.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/Image4uint8.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/ImageFormat.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/ImageFormat_convert.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/Intersect.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/Line.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/LineSegment.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/Log.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/Matrix.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/Matrix3.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/Matrix4.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/MemoryManager.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/MeshAlg.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/MeshAlgAdjacency.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/MeshAlgWeld.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/MeshBuilder.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/NetAddress.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/NetworkDevice.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/PhysicsFrame.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/PhysicsFrameSpline.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/Plane.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/PrecomputedRandom.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/Quat.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/Random.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/Ray.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/Rect2D.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/ReferenceCount.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/RegistryUtil.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/Sphere.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/SplineBase.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/Stopwatch.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/System.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/TextInput.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/TextOutput.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/ThreadSet.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/Triangle.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/UprightFrame.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/Vector2.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/Vector2int16.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/Vector3.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/Vector3int16.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/Vector3int32.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/Vector4.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/Vector4int8.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/Welder.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/WinMain.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/XML.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/constants.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/debugAssert.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/fileutils.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/filter.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/format.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/g3dfnmatch.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/g3dmath.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/license.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/prompt.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/stringutils.cpp delete mode 100644 modules/worldengine/deps/g3dlite/source/uint128.cpp delete mode 100644 modules/worldengine/deps/gsoap/CMakeLists.txt delete mode 100644 modules/worldengine/deps/gsoap/gsoap.stub delete mode 100644 modules/worldengine/deps/gsoap/soapC.cpp delete mode 100644 modules/worldengine/deps/gsoap/soapH.h delete mode 100644 modules/worldengine/deps/gsoap/soapServer.cpp delete mode 100644 modules/worldengine/deps/gsoap/soapStub.h delete mode 100644 modules/worldengine/deps/gsoap/stdsoap2.cpp delete mode 100644 modules/worldengine/deps/gsoap/stdsoap2.h delete mode 100644 modules/worldengine/deps/gsoap/tc_upgrades.txt delete mode 100644 modules/worldengine/deps/jemalloc/CMakeLists.txt delete mode 100644 modules/worldengine/deps/jemalloc/COPYING delete mode 100644 modules/worldengine/deps/jemalloc/ChangeLog delete mode 100644 modules/worldengine/deps/jemalloc/README delete mode 100644 modules/worldengine/deps/jemalloc/TC_NOTE.txt delete mode 100644 modules/worldengine/deps/jemalloc/VERSION delete mode 100644 modules/worldengine/deps/jemalloc/include/jemalloc/internal/arena.h delete mode 100644 modules/worldengine/deps/jemalloc/include/jemalloc/internal/atomic.h delete mode 100644 modules/worldengine/deps/jemalloc/include/jemalloc/internal/base.h delete mode 100644 modules/worldengine/deps/jemalloc/include/jemalloc/internal/bitmap.h delete mode 100644 modules/worldengine/deps/jemalloc/include/jemalloc/internal/chunk.h delete mode 100644 modules/worldengine/deps/jemalloc/include/jemalloc/internal/chunk_dss.h delete mode 100644 modules/worldengine/deps/jemalloc/include/jemalloc/internal/chunk_mmap.h delete mode 100644 modules/worldengine/deps/jemalloc/include/jemalloc/internal/ckh.h delete mode 100644 modules/worldengine/deps/jemalloc/include/jemalloc/internal/ctl.h delete mode 100644 modules/worldengine/deps/jemalloc/include/jemalloc/internal/extent.h delete mode 100644 modules/worldengine/deps/jemalloc/include/jemalloc/internal/hash.h delete mode 100644 modules/worldengine/deps/jemalloc/include/jemalloc/internal/huge.h delete mode 100644 modules/worldengine/deps/jemalloc/include/jemalloc/internal/jemalloc_internal.h delete mode 100644 modules/worldengine/deps/jemalloc/include/jemalloc/internal/mb.h delete mode 100644 modules/worldengine/deps/jemalloc/include/jemalloc/internal/mutex.h delete mode 100644 modules/worldengine/deps/jemalloc/include/jemalloc/internal/private_namespace.h delete mode 100644 modules/worldengine/deps/jemalloc/include/jemalloc/internal/prng.h delete mode 100644 modules/worldengine/deps/jemalloc/include/jemalloc/internal/prof.h delete mode 100644 modules/worldengine/deps/jemalloc/include/jemalloc/internal/ql.h delete mode 100644 modules/worldengine/deps/jemalloc/include/jemalloc/internal/qr.h delete mode 100644 modules/worldengine/deps/jemalloc/include/jemalloc/internal/quarantine.h delete mode 100644 modules/worldengine/deps/jemalloc/include/jemalloc/internal/rb.h delete mode 100644 modules/worldengine/deps/jemalloc/include/jemalloc/internal/rtree.h delete mode 100644 modules/worldengine/deps/jemalloc/include/jemalloc/internal/size_classes.h delete mode 100644 modules/worldengine/deps/jemalloc/include/jemalloc/internal/stats.h delete mode 100644 modules/worldengine/deps/jemalloc/include/jemalloc/internal/tcache.h delete mode 100644 modules/worldengine/deps/jemalloc/include/jemalloc/internal/tsd.h delete mode 100644 modules/worldengine/deps/jemalloc/include/jemalloc/internal/util.h delete mode 100644 modules/worldengine/deps/jemalloc/include/jemalloc/jemalloc.h delete mode 100644 modules/worldengine/deps/jemalloc/include/msvc_compat/inttypes.h delete mode 100644 modules/worldengine/deps/jemalloc/include/msvc_compat/stdbool.h delete mode 100644 modules/worldengine/deps/jemalloc/include/msvc_compat/stdint.h delete mode 100644 modules/worldengine/deps/jemalloc/include/msvc_compat/strings.h delete mode 100644 modules/worldengine/deps/jemalloc/jemalloc_defs.h.in.cmake delete mode 100644 modules/worldengine/deps/jemalloc/src/arena.c delete mode 100644 modules/worldengine/deps/jemalloc/src/atomic.c delete mode 100644 modules/worldengine/deps/jemalloc/src/base.c delete mode 100644 modules/worldengine/deps/jemalloc/src/bitmap.c delete mode 100644 modules/worldengine/deps/jemalloc/src/chunk.c delete mode 100644 modules/worldengine/deps/jemalloc/src/chunk_dss.c delete mode 100644 modules/worldengine/deps/jemalloc/src/chunk_mmap.c delete mode 100644 modules/worldengine/deps/jemalloc/src/ckh.c delete mode 100644 modules/worldengine/deps/jemalloc/src/ctl.c delete mode 100644 modules/worldengine/deps/jemalloc/src/extent.c delete mode 100644 modules/worldengine/deps/jemalloc/src/hash.c delete mode 100644 modules/worldengine/deps/jemalloc/src/huge.c delete mode 100644 modules/worldengine/deps/jemalloc/src/jemalloc.c delete mode 100644 modules/worldengine/deps/jemalloc/src/mb.c delete mode 100644 modules/worldengine/deps/jemalloc/src/mutex.c delete mode 100644 modules/worldengine/deps/jemalloc/src/prof.c delete mode 100644 modules/worldengine/deps/jemalloc/src/quarantine.c delete mode 100644 modules/worldengine/deps/jemalloc/src/rtree.c delete mode 100644 modules/worldengine/deps/jemalloc/src/stats.c delete mode 100644 modules/worldengine/deps/jemalloc/src/tcache.c delete mode 100644 modules/worldengine/deps/jemalloc/src/tsd.c delete mode 100644 modules/worldengine/deps/jemalloc/src/util.c delete mode 100644 modules/worldengine/deps/jemalloc/src/zone.c delete mode 100644 modules/worldengine/deps/libmpq/AUTHORS delete mode 100644 modules/worldengine/deps/libmpq/CMakeLists.txt delete mode 100644 modules/worldengine/deps/libmpq/COPYING delete mode 100644 modules/worldengine/deps/libmpq/FAQ delete mode 100644 modules/worldengine/deps/libmpq/INSTALL delete mode 100644 modules/worldengine/deps/libmpq/Makefile.am delete mode 100644 modules/worldengine/deps/libmpq/NEWS delete mode 100644 modules/worldengine/deps/libmpq/README delete mode 100644 modules/worldengine/deps/libmpq/THANKS delete mode 100644 modules/worldengine/deps/libmpq/TODO delete mode 100644 modules/worldengine/deps/libmpq/autogen.sh delete mode 100644 modules/worldengine/deps/libmpq/bindings/Makefile.am delete mode 100644 modules/worldengine/deps/libmpq/bindings/d/Makefile.am delete mode 100644 modules/worldengine/deps/libmpq/bindings/d/dsss.conf delete mode 100644 modules/worldengine/deps/libmpq/bindings/d/mpq.d delete mode 100644 modules/worldengine/deps/libmpq/bindings/python/Makefile.am delete mode 100644 modules/worldengine/deps/libmpq/bindings/python/mpq-info delete mode 100644 modules/worldengine/deps/libmpq/bindings/python/mpq.py delete mode 100644 modules/worldengine/deps/libmpq/config.h delete mode 100644 modules/worldengine/deps/libmpq/configure.ac delete mode 100644 modules/worldengine/deps/libmpq/debian/changelog delete mode 100644 modules/worldengine/deps/libmpq/debian/compat delete mode 100644 modules/worldengine/deps/libmpq/debian/control delete mode 100644 modules/worldengine/deps/libmpq/debian/copyright delete mode 100644 modules/worldengine/deps/libmpq/debian/libmpq-dev.dirs delete mode 100644 modules/worldengine/deps/libmpq/debian/libmpq-dev.install delete mode 100644 modules/worldengine/deps/libmpq/debian/libmpq0.dirs delete mode 100644 modules/worldengine/deps/libmpq/debian/libmpq0.docs delete mode 100644 modules/worldengine/deps/libmpq/debian/libmpq0.install delete mode 100644 modules/worldengine/deps/libmpq/debian/python-mpq.install delete mode 100644 modules/worldengine/deps/libmpq/debian/rules delete mode 100644 modules/worldengine/deps/libmpq/doc/Makefile.am delete mode 100644 modules/worldengine/deps/libmpq/doc/man1/Makefile.am delete mode 100644 modules/worldengine/deps/libmpq/doc/man1/libmpq-config.1 delete mode 100644 modules/worldengine/deps/libmpq/doc/man3/Makefile.am delete mode 100644 modules/worldengine/deps/libmpq/doc/man3/libmpq.3 delete mode 100644 modules/worldengine/deps/libmpq/doc/man3/libmpq__archive_close.3 delete mode 100644 modules/worldengine/deps/libmpq/doc/man3/libmpq__archive_files.3 delete mode 100644 modules/worldengine/deps/libmpq/doc/man3/libmpq__archive_offset.3 delete mode 100644 modules/worldengine/deps/libmpq/doc/man3/libmpq__archive_open.3 delete mode 100644 modules/worldengine/deps/libmpq/doc/man3/libmpq__archive_packed_size.3 delete mode 100644 modules/worldengine/deps/libmpq/doc/man3/libmpq__archive_unpacked_size.3 delete mode 100644 modules/worldengine/deps/libmpq/doc/man3/libmpq__archive_version.3 delete mode 100644 modules/worldengine/deps/libmpq/doc/man3/libmpq__block_close_offset.3 delete mode 100644 modules/worldengine/deps/libmpq/doc/man3/libmpq__block_open_offset.3 delete mode 100644 modules/worldengine/deps/libmpq/doc/man3/libmpq__block_read.3 delete mode 100644 modules/worldengine/deps/libmpq/doc/man3/libmpq__block_unpacked_size.3 delete mode 100644 modules/worldengine/deps/libmpq/doc/man3/libmpq__file_blocks.3 delete mode 100644 modules/worldengine/deps/libmpq/doc/man3/libmpq__file_compressed.3 delete mode 100644 modules/worldengine/deps/libmpq/doc/man3/libmpq__file_encrypted.3 delete mode 100644 modules/worldengine/deps/libmpq/doc/man3/libmpq__file_imploded.3 delete mode 100644 modules/worldengine/deps/libmpq/doc/man3/libmpq__file_number.3 delete mode 100644 modules/worldengine/deps/libmpq/doc/man3/libmpq__file_offset.3 delete mode 100644 modules/worldengine/deps/libmpq/doc/man3/libmpq__file_packed_size.3 delete mode 100644 modules/worldengine/deps/libmpq/doc/man3/libmpq__file_read.3 delete mode 100644 modules/worldengine/deps/libmpq/doc/man3/libmpq__file_unpacked_size.3 delete mode 100644 modules/worldengine/deps/libmpq/doc/man3/libmpq__strerror.3 delete mode 100644 modules/worldengine/deps/libmpq/doc/man3/libmpq__version.3 delete mode 100644 modules/worldengine/deps/libmpq/libmpq-config.in delete mode 100644 modules/worldengine/deps/libmpq/libmpq.pc.in delete mode 100644 modules/worldengine/deps/libmpq/libmpq/Makefile.am delete mode 100644 modules/worldengine/deps/libmpq/libmpq/common.c delete mode 100644 modules/worldengine/deps/libmpq/libmpq/common.h delete mode 100644 modules/worldengine/deps/libmpq/libmpq/crypt_buf.h delete mode 100644 modules/worldengine/deps/libmpq/libmpq/explode.c delete mode 100644 modules/worldengine/deps/libmpq/libmpq/explode.h delete mode 100644 modules/worldengine/deps/libmpq/libmpq/extract.c delete mode 100644 modules/worldengine/deps/libmpq/libmpq/extract.h delete mode 100644 modules/worldengine/deps/libmpq/libmpq/huffman.c delete mode 100644 modules/worldengine/deps/libmpq/libmpq/huffman.h delete mode 100644 modules/worldengine/deps/libmpq/libmpq/mpq-internal.h delete mode 100644 modules/worldengine/deps/libmpq/libmpq/mpq.c delete mode 100644 modules/worldengine/deps/libmpq/libmpq/mpq.h delete mode 100644 modules/worldengine/deps/libmpq/libmpq/pack_begin.h delete mode 100644 modules/worldengine/deps/libmpq/libmpq/pack_end.h delete mode 100644 modules/worldengine/deps/libmpq/libmpq/platform.h delete mode 100644 modules/worldengine/deps/libmpq/libmpq/wave.c delete mode 100644 modules/worldengine/deps/libmpq/libmpq/wave.h delete mode 100644 modules/worldengine/deps/libmpq/tools/Makefile.am delete mode 100644 modules/worldengine/deps/libmpq/tools/crypt_buf_gen.c delete mode 100644 modules/worldengine/deps/libmpq/win/config.h delete mode 100644 modules/worldengine/deps/libmpq/win/dirent.h delete mode 100644 modules/worldengine/deps/libmpq/win/stdint.h delete mode 100644 modules/worldengine/deps/mysqllite/CMakeLists.txt delete mode 100644 modules/worldengine/deps/mysqllite/COPYING delete mode 100644 modules/worldengine/deps/mysqllite/README delete mode 100644 modules/worldengine/deps/mysqllite/VERSION delete mode 100644 modules/worldengine/deps/mysqllite/cmake/character_sets.cmake delete mode 100644 modules/worldengine/deps/mysqllite/cmake/mysql_version.cmake delete mode 100644 modules/worldengine/deps/mysqllite/cmake/os/Windows.cmake delete mode 100644 modules/worldengine/deps/mysqllite/cmake/os/WindowsCache.cmake delete mode 100644 modules/worldengine/deps/mysqllite/cmake/stack_direction.c delete mode 100644 modules/worldengine/deps/mysqllite/cmake/versioninfo.rc.in delete mode 100644 modules/worldengine/deps/mysqllite/config.h.cmake delete mode 100644 modules/worldengine/deps/mysqllite/configure.cmake delete mode 100644 modules/worldengine/deps/mysqllite/dbug/dbug.c delete mode 100644 modules/worldengine/deps/mysqllite/dbug/dbug_long.h delete mode 100644 modules/worldengine/deps/mysqllite/dbug/monty.doc delete mode 100644 modules/worldengine/deps/mysqllite/dbug/user.r delete mode 100644 modules/worldengine/deps/mysqllite/include/decimal.h delete mode 100644 modules/worldengine/deps/mysqllite/include/errmsg.h delete mode 100644 modules/worldengine/deps/mysqllite/include/internal/atomic/gcc_builtins.h delete mode 100644 modules/worldengine/deps/mysqllite/include/internal/atomic/generic-msvc.h delete mode 100644 modules/worldengine/deps/mysqllite/include/internal/atomic/nolock.h delete mode 100644 modules/worldengine/deps/mysqllite/include/internal/atomic/rwlock.h delete mode 100644 modules/worldengine/deps/mysqllite/include/internal/atomic/solaris.h delete mode 100644 modules/worldengine/deps/mysqllite/include/internal/atomic/x86-gcc.h delete mode 100644 modules/worldengine/deps/mysqllite/include/internal/base64.h delete mode 100644 modules/worldengine/deps/mysqllite/include/internal/hash.h delete mode 100644 modules/worldengine/deps/mysqllite/include/internal/lf.h delete mode 100644 modules/worldengine/deps/mysqllite/include/internal/my_aes.h delete mode 100644 modules/worldengine/deps/mysqllite/include/internal/my_alarm.h delete mode 100644 modules/worldengine/deps/mysqllite/include/internal/my_atomic.h delete mode 100644 modules/worldengine/deps/mysqllite/include/internal/my_base.h delete mode 100644 modules/worldengine/deps/mysqllite/include/internal/my_bit.h delete mode 100644 modules/worldengine/deps/mysqllite/include/internal/my_bitmap.h delete mode 100644 modules/worldengine/deps/mysqllite/include/internal/my_handler.h delete mode 100644 modules/worldengine/deps/mysqllite/include/internal/my_libwrap.h delete mode 100644 modules/worldengine/deps/mysqllite/include/internal/my_md5.h delete mode 100644 modules/worldengine/deps/mysqllite/include/internal/my_nosys.h delete mode 100644 modules/worldengine/deps/mysqllite/include/internal/my_rdtsc.h delete mode 100644 modules/worldengine/deps/mysqllite/include/internal/my_stacktrace.h delete mode 100644 modules/worldengine/deps/mysqllite/include/internal/my_time.h delete mode 100644 modules/worldengine/deps/mysqllite/include/internal/my_tree.h delete mode 100644 modules/worldengine/deps/mysqllite/include/internal/my_uctype.h delete mode 100644 modules/worldengine/deps/mysqllite/include/internal/myisampack.h delete mode 100644 modules/worldengine/deps/mysqllite/include/internal/mysql_version.h.in delete mode 100644 modules/worldengine/deps/mysqllite/include/internal/mysys_err.h delete mode 100644 modules/worldengine/deps/mysqllite/include/internal/password.h delete mode 100644 modules/worldengine/deps/mysqllite/include/internal/probes_mysql.h delete mode 100644 modules/worldengine/deps/mysqllite/include/internal/probes_mysql_nodtrace.h delete mode 100644 modules/worldengine/deps/mysqllite/include/internal/queues.h delete mode 100644 modules/worldengine/deps/mysqllite/include/internal/rijndael.h delete mode 100644 modules/worldengine/deps/mysqllite/include/internal/sha1.h delete mode 100644 modules/worldengine/deps/mysqllite/include/internal/t_ctype.h delete mode 100644 modules/worldengine/deps/mysqllite/include/internal/thr_alarm.h delete mode 100644 modules/worldengine/deps/mysqllite/include/internal/thr_lock.h delete mode 100644 modules/worldengine/deps/mysqllite/include/internal/violite.h delete mode 100644 modules/worldengine/deps/mysqllite/include/keycache.h delete mode 100644 modules/worldengine/deps/mysqllite/include/m_ctype.h delete mode 100644 modules/worldengine/deps/mysqllite/include/m_string.h delete mode 100644 modules/worldengine/deps/mysqllite/include/my_alloc.h delete mode 100644 modules/worldengine/deps/mysqllite/include/my_attribute.h delete mode 100644 modules/worldengine/deps/mysqllite/include/my_compiler.h delete mode 100644 modules/worldengine/deps/mysqllite/include/my_dbug.h delete mode 100644 modules/worldengine/deps/mysqllite/include/my_dir.h delete mode 100644 modules/worldengine/deps/mysqllite/include/my_getopt.h delete mode 100644 modules/worldengine/deps/mysqllite/include/my_global.h delete mode 100644 modules/worldengine/deps/mysqllite/include/my_list.h delete mode 100644 modules/worldengine/deps/mysqllite/include/my_net.h delete mode 100644 modules/worldengine/deps/mysqllite/include/my_pthread.h delete mode 100644 modules/worldengine/deps/mysqllite/include/my_sys.h delete mode 100644 modules/worldengine/deps/mysqllite/include/my_xml.h delete mode 100644 modules/worldengine/deps/mysqllite/include/mysql.h delete mode 100644 modules/worldengine/deps/mysqllite/include/mysql/client_plugin.h delete mode 100644 modules/worldengine/deps/mysqllite/include/mysql/innodb_priv.h delete mode 100644 modules/worldengine/deps/mysqllite/include/mysql/plugin.h delete mode 100644 modules/worldengine/deps/mysqllite/include/mysql/plugin_audit.h delete mode 100644 modules/worldengine/deps/mysqllite/include/mysql/plugin_auth.h delete mode 100644 modules/worldengine/deps/mysqllite/include/mysql/plugin_auth_common.h delete mode 100644 modules/worldengine/deps/mysqllite/include/mysql/plugin_ftparser.h delete mode 100644 modules/worldengine/deps/mysqllite/include/mysql/psi/mysql_file.h delete mode 100644 modules/worldengine/deps/mysqllite/include/mysql/psi/mysql_thread.h delete mode 100644 modules/worldengine/deps/mysqllite/include/mysql/psi/psi.h delete mode 100644 modules/worldengine/deps/mysqllite/include/mysql/psi/psi_abi_v1.h delete mode 100644 modules/worldengine/deps/mysqllite/include/mysql/psi/psi_abi_v2.h delete mode 100644 modules/worldengine/deps/mysqllite/include/mysql/service_my_snprintf.h delete mode 100644 modules/worldengine/deps/mysqllite/include/mysql/service_thd_alloc.h delete mode 100644 modules/worldengine/deps/mysqllite/include/mysql/service_thd_wait.h delete mode 100644 modules/worldengine/deps/mysqllite/include/mysql/service_thread_scheduler.h delete mode 100644 modules/worldengine/deps/mysqllite/include/mysql/services.h delete mode 100644 modules/worldengine/deps/mysqllite/include/mysql_com.h delete mode 100644 modules/worldengine/deps/mysqllite/include/mysql_embed.h delete mode 100644 modules/worldengine/deps/mysqllite/include/mysql_time.h delete mode 100644 modules/worldengine/deps/mysqllite/include/mysqld_ername.h delete mode 100644 modules/worldengine/deps/mysqllite/include/mysqld_error.h delete mode 100644 modules/worldengine/deps/mysqllite/include/plugin.h delete mode 100644 modules/worldengine/deps/mysqllite/include/plugin_audit.h delete mode 100644 modules/worldengine/deps/mysqllite/include/plugin_ftparser.h delete mode 100644 modules/worldengine/deps/mysqllite/include/sql_common.h delete mode 100644 modules/worldengine/deps/mysqllite/include/sql_state.h delete mode 100644 modules/worldengine/deps/mysqllite/include/sslopt-case.h delete mode 100644 modules/worldengine/deps/mysqllite/include/sslopt-longopts.h delete mode 100644 modules/worldengine/deps/mysqllite/include/sslopt-vars.h delete mode 100644 modules/worldengine/deps/mysqllite/include/typelib.h delete mode 100644 modules/worldengine/deps/mysqllite/libmysql/client_settings.h delete mode 100644 modules/worldengine/deps/mysqllite/libmysql/errmsg.c delete mode 100644 modules/worldengine/deps/mysqllite/libmysql/get_password.c delete mode 100644 modules/worldengine/deps/mysqllite/libmysql/libmysql.c delete mode 100644 modules/worldengine/deps/mysqllite/libmysql/libmysql_exports.def delete mode 100644 modules/worldengine/deps/mysqllite/mysys/ChangeLog delete mode 100644 modules/worldengine/deps/mysqllite/mysys/array.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/base64.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/charset-def.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/charset.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/checksum.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/default.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/errors.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/hash.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/lf_alloc-pin.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/lf_dynarray.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/lf_hash.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/list.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/md5.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/mf_arr_appstr.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/mf_cache.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/mf_dirname.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/mf_fn_ext.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/mf_format.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/mf_getdate.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/mf_iocache.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/mf_iocache2.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/mf_keycache.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/mf_keycaches.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/mf_loadpath.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/mf_pack.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/mf_path.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/mf_qsort.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/mf_qsort2.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/mf_radix.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/mf_same.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/mf_sort.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/mf_soundex.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/mf_tempdir.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/mf_tempfile.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/mf_unixpath.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/mf_wcomp.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/mulalloc.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/my_access.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/my_aes.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/my_alarm.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/my_alloc.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/my_atomic.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/my_bit.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/my_bitmap.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/my_chsize.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/my_compress.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/my_conio.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/my_copy.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/my_create.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/my_delete.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/my_div.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/my_error.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/my_file.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/my_fopen.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/my_fstream.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/my_gethostbyname.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/my_gethwaddr.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/my_getncpus.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/my_getopt.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/my_getpagesize.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/my_getsystime.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/my_getwd.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/my_handler.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/my_handler_errors.h delete mode 100644 modules/worldengine/deps/mysqllite/mysys/my_init.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/my_largepage.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/my_lib.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/my_libwrap.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/my_lock.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/my_lockmem.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/my_malloc.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/my_memmem.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/my_mess.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/my_mkdir.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/my_mmap.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/my_new.cc delete mode 100644 modules/worldengine/deps/mysqllite/mysys/my_once.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/my_open.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/my_port.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/my_pread.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/my_pthread.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/my_quick.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/my_rdtsc.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/my_read.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/my_redel.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/my_rename.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/my_seek.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/my_sleep.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/my_static.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/my_static.h delete mode 100644 modules/worldengine/deps/mysqllite/mysys/my_symlink.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/my_symlink2.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/my_sync.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/my_thr_init.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/my_wincond.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/my_windac.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/my_winerr.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/my_winfile.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/my_winthread.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/my_write.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/mysys_priv.h delete mode 100644 modules/worldengine/deps/mysqllite/mysys/ptr_cmp.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/queues.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/rijndael.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/sha1.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/stacktrace.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/string.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/thr_alarm.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/thr_lock.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/thr_mutex.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/thr_rwlock.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/tree.c delete mode 100644 modules/worldengine/deps/mysqllite/mysys/typelib.c delete mode 100644 modules/worldengine/deps/mysqllite/sql-common/client.c delete mode 100644 modules/worldengine/deps/mysqllite/sql-common/client_plugin.c delete mode 100644 modules/worldengine/deps/mysqllite/sql-common/my_time.c delete mode 100644 modules/worldengine/deps/mysqllite/sql-common/pack.c delete mode 100644 modules/worldengine/deps/mysqllite/sql/net_serv.cc delete mode 100644 modules/worldengine/deps/mysqllite/sql/password.c delete mode 100644 modules/worldengine/deps/mysqllite/strings/CHARSET_INFO.txt delete mode 100644 modules/worldengine/deps/mysqllite/strings/README delete mode 100644 modules/worldengine/deps/mysqllite/strings/bchange.c delete mode 100644 modules/worldengine/deps/mysqllite/strings/bmove_upp.c delete mode 100644 modules/worldengine/deps/mysqllite/strings/ctype-big5.c delete mode 100644 modules/worldengine/deps/mysqllite/strings/ctype-bin.c delete mode 100644 modules/worldengine/deps/mysqllite/strings/ctype-cp932.c delete mode 100644 modules/worldengine/deps/mysqllite/strings/ctype-czech.c delete mode 100644 modules/worldengine/deps/mysqllite/strings/ctype-euc_kr.c delete mode 100644 modules/worldengine/deps/mysqllite/strings/ctype-extra.c delete mode 100644 modules/worldengine/deps/mysqllite/strings/ctype-gb2312.c delete mode 100644 modules/worldengine/deps/mysqllite/strings/ctype-gbk.c delete mode 100644 modules/worldengine/deps/mysqllite/strings/ctype-latin1.c delete mode 100644 modules/worldengine/deps/mysqllite/strings/ctype-mb.c delete mode 100644 modules/worldengine/deps/mysqllite/strings/ctype-simple.c delete mode 100644 modules/worldengine/deps/mysqllite/strings/ctype-tis620.c delete mode 100644 modules/worldengine/deps/mysqllite/strings/ctype-uca.c delete mode 100644 modules/worldengine/deps/mysqllite/strings/ctype-ucs2.c delete mode 100644 modules/worldengine/deps/mysqllite/strings/ctype-utf8.c delete mode 100644 modules/worldengine/deps/mysqllite/strings/ctype-win1250ch.c delete mode 100644 modules/worldengine/deps/mysqllite/strings/ctype.c delete mode 100644 modules/worldengine/deps/mysqllite/strings/decimal.c delete mode 100644 modules/worldengine/deps/mysqllite/strings/dtoa.c delete mode 100644 modules/worldengine/deps/mysqllite/strings/int2str.c delete mode 100644 modules/worldengine/deps/mysqllite/strings/is_prefix.c delete mode 100644 modules/worldengine/deps/mysqllite/strings/latin2.def delete mode 100644 modules/worldengine/deps/mysqllite/strings/llstr.c delete mode 100644 modules/worldengine/deps/mysqllite/strings/longlong2str.c delete mode 100644 modules/worldengine/deps/mysqllite/strings/my_strchr.c delete mode 100644 modules/worldengine/deps/mysqllite/strings/my_strtoll10.c delete mode 100644 modules/worldengine/deps/mysqllite/strings/my_vsnprintf.c delete mode 100644 modules/worldengine/deps/mysqllite/strings/str2int.c delete mode 100644 modules/worldengine/deps/mysqllite/strings/str_alloc.c delete mode 100644 modules/worldengine/deps/mysqllite/strings/strappend.c delete mode 100644 modules/worldengine/deps/mysqllite/strings/strcend.c delete mode 100644 modules/worldengine/deps/mysqllite/strings/strcont.c delete mode 100644 modules/worldengine/deps/mysqllite/strings/strend.c delete mode 100644 modules/worldengine/deps/mysqllite/strings/strfill.c delete mode 100644 modules/worldengine/deps/mysqllite/strings/strmake.c delete mode 100644 modules/worldengine/deps/mysqllite/strings/strmov.c delete mode 100644 modules/worldengine/deps/mysqllite/strings/strnlen.c delete mode 100644 modules/worldengine/deps/mysqllite/strings/strnmov.c delete mode 100644 modules/worldengine/deps/mysqllite/strings/strxmov.c delete mode 100644 modules/worldengine/deps/mysqllite/strings/strxnmov.c delete mode 100644 modules/worldengine/deps/mysqllite/strings/t_ctype.h delete mode 100644 modules/worldengine/deps/mysqllite/strings/xml.c delete mode 100644 modules/worldengine/deps/mysqllite/vio/vio.c delete mode 100644 modules/worldengine/deps/mysqllite/vio/vio_priv.h delete mode 100644 modules/worldengine/deps/mysqllite/vio/viosocket.c delete mode 100644 modules/worldengine/deps/mysqllite/vio/viossl.c delete mode 100644 modules/worldengine/deps/mysqllite/vio/viosslfactories.c delete mode 100644 modules/worldengine/deps/recastnavigation/CMakeLists.txt delete mode 100644 modules/worldengine/deps/recastnavigation/Detour/CMakeLists.txt delete mode 100644 modules/worldengine/deps/recastnavigation/Detour/DetourAlloc.cpp delete mode 100644 modules/worldengine/deps/recastnavigation/Detour/DetourAlloc.h delete mode 100644 modules/worldengine/deps/recastnavigation/Detour/DetourAssert.h delete mode 100644 modules/worldengine/deps/recastnavigation/Detour/DetourCommon.cpp delete mode 100644 modules/worldengine/deps/recastnavigation/Detour/DetourCommon.h delete mode 100644 modules/worldengine/deps/recastnavigation/Detour/DetourNavMesh.cpp delete mode 100644 modules/worldengine/deps/recastnavigation/Detour/DetourNavMesh.h delete mode 100644 modules/worldengine/deps/recastnavigation/Detour/DetourNavMeshBuilder.cpp delete mode 100644 modules/worldengine/deps/recastnavigation/Detour/DetourNavMeshBuilder.h delete mode 100644 modules/worldengine/deps/recastnavigation/Detour/DetourNavMeshQuery.cpp delete mode 100644 modules/worldengine/deps/recastnavigation/Detour/DetourNavMeshQuery.h delete mode 100644 modules/worldengine/deps/recastnavigation/Detour/DetourNode.cpp delete mode 100644 modules/worldengine/deps/recastnavigation/Detour/DetourNode.h delete mode 100644 modules/worldengine/deps/recastnavigation/Detour/DetourObstacleAvoidance.cpp delete mode 100644 modules/worldengine/deps/recastnavigation/Detour/DetourObstacleAvoidance.h delete mode 100644 modules/worldengine/deps/recastnavigation/License.txt delete mode 100644 modules/worldengine/deps/recastnavigation/Readme.txt delete mode 100644 modules/worldengine/deps/recastnavigation/Recast/CMakeLists.txt delete mode 100644 modules/worldengine/deps/recastnavigation/Recast/Recast.cpp delete mode 100644 modules/worldengine/deps/recastnavigation/Recast/Recast.h delete mode 100644 modules/worldengine/deps/recastnavigation/Recast/RecastAlloc.cpp delete mode 100644 modules/worldengine/deps/recastnavigation/Recast/RecastAlloc.h delete mode 100644 modules/worldengine/deps/recastnavigation/Recast/RecastArea.cpp delete mode 100644 modules/worldengine/deps/recastnavigation/Recast/RecastAssert.h delete mode 100644 modules/worldengine/deps/recastnavigation/Recast/RecastContour.cpp delete mode 100644 modules/worldengine/deps/recastnavigation/Recast/RecastFilter.cpp delete mode 100644 modules/worldengine/deps/recastnavigation/Recast/RecastMesh.cpp delete mode 100644 modules/worldengine/deps/recastnavigation/Recast/RecastMeshDetail.cpp delete mode 100644 modules/worldengine/deps/recastnavigation/Recast/RecastRasterization.cpp delete mode 100644 modules/worldengine/deps/recastnavigation/Recast/RecastRegion.cpp delete mode 100644 modules/worldengine/deps/recastnavigation/TODO.txt delete mode 100644 modules/worldengine/deps/utf8cpp/utf8.h delete mode 100644 modules/worldengine/deps/utf8cpp/utf8/checked.h delete mode 100644 modules/worldengine/deps/utf8cpp/utf8/core.h delete mode 100644 modules/worldengine/deps/utf8cpp/utf8/unchecked.h delete mode 100644 modules/worldengine/deps/zlib/CMakeLists.txt delete mode 100644 modules/worldengine/deps/zlib/adler32.c delete mode 100644 modules/worldengine/deps/zlib/compress.c delete mode 100644 modules/worldengine/deps/zlib/crc32.c delete mode 100644 modules/worldengine/deps/zlib/crc32.h delete mode 100644 modules/worldengine/deps/zlib/deflate.c delete mode 100644 modules/worldengine/deps/zlib/deflate.h delete mode 100644 modules/worldengine/deps/zlib/example.c delete mode 100644 modules/worldengine/deps/zlib/gzclose.c delete mode 100644 modules/worldengine/deps/zlib/gzguts.h delete mode 100644 modules/worldengine/deps/zlib/gzlib.c delete mode 100644 modules/worldengine/deps/zlib/gzread.c delete mode 100644 modules/worldengine/deps/zlib/gzwrite.c delete mode 100644 modules/worldengine/deps/zlib/infback.c delete mode 100644 modules/worldengine/deps/zlib/inffast.c delete mode 100644 modules/worldengine/deps/zlib/inffast.h delete mode 100644 modules/worldengine/deps/zlib/inffixed.h delete mode 100644 modules/worldengine/deps/zlib/inflate.c delete mode 100644 modules/worldengine/deps/zlib/inflate.h delete mode 100644 modules/worldengine/deps/zlib/inftrees.c delete mode 100644 modules/worldengine/deps/zlib/inftrees.h delete mode 100644 modules/worldengine/deps/zlib/minigzip.c delete mode 100644 modules/worldengine/deps/zlib/trees.c delete mode 100644 modules/worldengine/deps/zlib/trees.h delete mode 100644 modules/worldengine/deps/zlib/uncompr.c delete mode 100644 modules/worldengine/deps/zlib/zconf.h delete mode 100644 modules/worldengine/deps/zlib/zlib.h delete mode 100644 modules/worldengine/deps/zlib/zutil.c delete mode 100644 modules/worldengine/deps/zlib/zutil.h delete mode 100644 modules/worldengine/lib-collision/CMakeLists.txt delete mode 100644 modules/worldengine/lib-collision/LICENSE-AGPL3 delete mode 100644 modules/worldengine/lib-collision/src/BoundingIntervalHierarchy.cpp delete mode 100644 modules/worldengine/lib-collision/src/BoundingIntervalHierarchy.h delete mode 100644 modules/worldengine/lib-collision/src/BoundingIntervalHierarchyWrapper.h delete mode 100644 modules/worldengine/lib-collision/src/CMakeLists.txt delete mode 100644 modules/worldengine/lib-collision/src/DynamicTree.cpp delete mode 100644 modules/worldengine/lib-collision/src/DynamicTree.h delete mode 100644 modules/worldengine/lib-collision/src/Management/IMMAPManager.h delete mode 100644 modules/worldengine/lib-collision/src/Management/IVMapManager.h delete mode 100644 modules/worldengine/lib-collision/src/Management/MMapFactory.cpp delete mode 100644 modules/worldengine/lib-collision/src/Management/MMapFactory.h delete mode 100644 modules/worldengine/lib-collision/src/Management/MMapManager.cpp delete mode 100644 modules/worldengine/lib-collision/src/Management/MMapManager.h delete mode 100644 modules/worldengine/lib-collision/src/Management/VMapFactory.cpp delete mode 100644 modules/worldengine/lib-collision/src/Management/VMapFactory.h delete mode 100644 modules/worldengine/lib-collision/src/Management/VMapManager2.cpp delete mode 100644 modules/worldengine/lib-collision/src/Management/VMapManager2.h delete mode 100644 modules/worldengine/lib-collision/src/Maps/MapTree.cpp delete mode 100644 modules/worldengine/lib-collision/src/Maps/MapTree.h delete mode 100644 modules/worldengine/lib-collision/src/Maps/TileAssembler.cpp delete mode 100644 modules/worldengine/lib-collision/src/Maps/TileAssembler.h delete mode 100644 modules/worldengine/lib-collision/src/Models/GameObjectModel.cpp delete mode 100644 modules/worldengine/lib-collision/src/Models/GameObjectModel.h delete mode 100644 modules/worldengine/lib-collision/src/Models/ModelInstance.cpp delete mode 100644 modules/worldengine/lib-collision/src/Models/ModelInstance.h delete mode 100644 modules/worldengine/lib-collision/src/Models/WorldModel.cpp delete mode 100644 modules/worldengine/lib-collision/src/Models/WorldModel.h delete mode 100644 modules/worldengine/lib-collision/src/PrecompiledHeaders/collisionPCH.cpp delete mode 100644 modules/worldengine/lib-collision/src/PrecompiledHeaders/collisionPCH.h delete mode 100644 modules/worldengine/lib-collision/src/RegularGrid.h delete mode 100644 modules/worldengine/lib-collision/src/VMapDefinitions.h delete mode 100644 modules/worldengine/lib-collision/src/VMapTools.h delete mode 100644 modules/worldengine/nucleus/CMakeLists.txt delete mode 100644 modules/worldengine/nucleus/LICENSE-AGPL3 delete mode 100644 modules/worldengine/nucleus/src/AutoPtr.h delete mode 100644 modules/worldengine/nucleus/src/CMakeLists.txt delete mode 100644 modules/worldengine/nucleus/src/Common.cpp delete mode 100644 modules/worldengine/nucleus/src/Common.h delete mode 100644 modules/worldengine/nucleus/src/CompilerDefs.h delete mode 100644 modules/worldengine/nucleus/src/Configuration/Config.cpp delete mode 100644 modules/worldengine/nucleus/src/Configuration/Config.h delete mode 100644 modules/worldengine/nucleus/src/Containers.h delete mode 100644 modules/worldengine/nucleus/src/Cryptography/ARC4.cpp delete mode 100644 modules/worldengine/nucleus/src/Cryptography/ARC4.h delete mode 100644 modules/worldengine/nucleus/src/Cryptography/Authentication/AuthCrypt.cpp delete mode 100644 modules/worldengine/nucleus/src/Cryptography/Authentication/AuthCrypt.h delete mode 100644 modules/worldengine/nucleus/src/Cryptography/BigNumber.cpp delete mode 100644 modules/worldengine/nucleus/src/Cryptography/BigNumber.h delete mode 100644 modules/worldengine/nucleus/src/Cryptography/HMACSHA1.cpp delete mode 100644 modules/worldengine/nucleus/src/Cryptography/HMACSHA1.h delete mode 100644 modules/worldengine/nucleus/src/Cryptography/OpenSSLCrypto.cpp delete mode 100644 modules/worldengine/nucleus/src/Cryptography/OpenSSLCrypto.h delete mode 100644 modules/worldengine/nucleus/src/Cryptography/SHA1.cpp delete mode 100644 modules/worldengine/nucleus/src/Cryptography/SHA1.h delete mode 100644 modules/worldengine/nucleus/src/Cryptography/WardenKeyGeneration.h delete mode 100644 modules/worldengine/nucleus/src/DataStores/DBCFileLoader.cpp delete mode 100644 modules/worldengine/nucleus/src/DataStores/DBCFileLoader.h delete mode 100644 modules/worldengine/nucleus/src/DataStores/DBCStore.h delete mode 100644 modules/worldengine/nucleus/src/Database/AdhocStatement.cpp delete mode 100644 modules/worldengine/nucleus/src/Database/AdhocStatement.h delete mode 100644 modules/worldengine/nucleus/src/Database/DatabaseEnv.h delete mode 100644 modules/worldengine/nucleus/src/Database/DatabaseWorker.cpp delete mode 100644 modules/worldengine/nucleus/src/Database/DatabaseWorker.h delete mode 100644 modules/worldengine/nucleus/src/Database/DatabaseWorkerPool.h delete mode 100644 modules/worldengine/nucleus/src/Database/Field.cpp delete mode 100644 modules/worldengine/nucleus/src/Database/Field.h delete mode 100644 modules/worldengine/nucleus/src/Database/Implementation/CharacterDatabase.cpp delete mode 100644 modules/worldengine/nucleus/src/Database/Implementation/CharacterDatabase.h delete mode 100644 modules/worldengine/nucleus/src/Database/Implementation/LoginDatabase.cpp delete mode 100644 modules/worldengine/nucleus/src/Database/Implementation/LoginDatabase.h delete mode 100644 modules/worldengine/nucleus/src/Database/Implementation/WorldDatabase.cpp delete mode 100644 modules/worldengine/nucleus/src/Database/Implementation/WorldDatabase.h delete mode 100644 modules/worldengine/nucleus/src/Database/MySQLConnection.cpp delete mode 100644 modules/worldengine/nucleus/src/Database/MySQLConnection.h delete mode 100644 modules/worldengine/nucleus/src/Database/MySQLThreading.h delete mode 100644 modules/worldengine/nucleus/src/Database/PreparedStatement.cpp delete mode 100644 modules/worldengine/nucleus/src/Database/PreparedStatement.h delete mode 100644 modules/worldengine/nucleus/src/Database/QueryHolder.cpp delete mode 100644 modules/worldengine/nucleus/src/Database/QueryHolder.h delete mode 100644 modules/worldengine/nucleus/src/Database/QueryResult.cpp delete mode 100644 modules/worldengine/nucleus/src/Database/QueryResult.h delete mode 100644 modules/worldengine/nucleus/src/Database/SQLOperation.h delete mode 100644 modules/worldengine/nucleus/src/Database/Transaction.cpp delete mode 100644 modules/worldengine/nucleus/src/Database/Transaction.h delete mode 100644 modules/worldengine/nucleus/src/Debugging/Errors.cpp delete mode 100644 modules/worldengine/nucleus/src/Debugging/Errors.h delete mode 100644 modules/worldengine/nucleus/src/Debugging/WheatyExceptionReport.cpp delete mode 100644 modules/worldengine/nucleus/src/Debugging/WheatyExceptionReport.h delete mode 100644 modules/worldengine/nucleus/src/Define.h delete mode 100644 modules/worldengine/nucleus/src/Dynamic/FactoryHolder.h delete mode 100644 modules/worldengine/nucleus/src/Dynamic/HashNamespace.h delete mode 100644 modules/worldengine/nucleus/src/Dynamic/LinkedList.h delete mode 100644 modules/worldengine/nucleus/src/Dynamic/LinkedReference/RefManager.h delete mode 100644 modules/worldengine/nucleus/src/Dynamic/LinkedReference/Reference.h delete mode 100644 modules/worldengine/nucleus/src/Dynamic/ObjectRegistry.h delete mode 100644 modules/worldengine/nucleus/src/Dynamic/TypeContainer.h delete mode 100644 modules/worldengine/nucleus/src/Dynamic/TypeContainerFunctions.h delete mode 100644 modules/worldengine/nucleus/src/Dynamic/TypeContainerFunctionsPtr.h delete mode 100644 modules/worldengine/nucleus/src/Dynamic/TypeContainerVisitor.h delete mode 100644 modules/worldengine/nucleus/src/Dynamic/TypeList.h delete mode 100644 modules/worldengine/nucleus/src/Dynamic/UnorderedMap.h delete mode 100644 modules/worldengine/nucleus/src/Dynamic/UnorderedSet.h delete mode 100644 modules/worldengine/nucleus/src/Logging/Log.cpp delete mode 100644 modules/worldengine/nucleus/src/Logging/Log.h delete mode 100644 modules/worldengine/nucleus/src/Packets/ByteBuffer.cpp delete mode 100644 modules/worldengine/nucleus/src/Packets/ByteBuffer.h delete mode 100644 modules/worldengine/nucleus/src/Packets/WorldPacket.h delete mode 100644 modules/worldengine/nucleus/src/PrecompiledHeaders/sharedPCH.cpp delete mode 100644 modules/worldengine/nucleus/src/PrecompiledHeaders/sharedPCH.h delete mode 100644 modules/worldengine/nucleus/src/SystemConfig.h delete mode 100644 modules/worldengine/nucleus/src/Threading/Callback.h delete mode 100644 modules/worldengine/nucleus/src/Threading/DelayExecutor.cpp delete mode 100644 modules/worldengine/nucleus/src/Threading/DelayExecutor.h delete mode 100644 modules/worldengine/nucleus/src/Threading/LockedQueue.h delete mode 100644 modules/worldengine/nucleus/src/Threading/Threading.cpp delete mode 100644 modules/worldengine/nucleus/src/Threading/Threading.h delete mode 100644 modules/worldengine/nucleus/src/Utilities/ByteConverter.h delete mode 100644 modules/worldengine/nucleus/src/Utilities/EventProcessor.cpp delete mode 100644 modules/worldengine/nucleus/src/Utilities/EventProcessor.h delete mode 100644 modules/worldengine/nucleus/src/Utilities/ServiceWin32.cpp delete mode 100644 modules/worldengine/nucleus/src/Utilities/ServiceWin32.h delete mode 100644 modules/worldengine/nucleus/src/Utilities/SignalHandler.h delete mode 100644 modules/worldengine/nucleus/src/Utilities/Timer.h delete mode 100644 modules/worldengine/nucleus/src/Utilities/Util.cpp delete mode 100644 modules/worldengine/nucleus/src/Utilities/Util.h delete mode 100644 modules/worldengine/nucleus/src/cmake/compiler/clang/settings.cmake delete mode 100644 modules/worldengine/nucleus/src/cmake/compiler/gcc/settings.cmake delete mode 100644 modules/worldengine/nucleus/src/cmake/compiler/icc/settings.cmake delete mode 100644 modules/worldengine/nucleus/src/cmake/compiler/mingw/settings.cmake delete mode 100644 modules/worldengine/nucleus/src/cmake/compiler/msvc/settings.cmake delete mode 100644 modules/worldengine/nucleus/src/cmake/macros/CheckBuildDir.cmake delete mode 100644 modules/worldengine/nucleus/src/cmake/macros/CheckPlatform.cmake delete mode 100644 modules/worldengine/nucleus/src/cmake/macros/EnsureVersion.cmake delete mode 100644 modules/worldengine/nucleus/src/cmake/macros/FindACE.cmake delete mode 100644 modules/worldengine/nucleus/src/cmake/macros/FindGit.cmake delete mode 100644 modules/worldengine/nucleus/src/cmake/macros/FindGperftools.cmake delete mode 100644 modules/worldengine/nucleus/src/cmake/macros/FindMySQL.cmake delete mode 100644 modules/worldengine/nucleus/src/cmake/macros/FindOpenSSL.cmake delete mode 100644 modules/worldengine/nucleus/src/cmake/macros/FindPCHSupport.cmake delete mode 100644 modules/worldengine/nucleus/src/cmake/macros/FindReadline.cmake delete mode 100644 modules/worldengine/nucleus/src/cmake/platform/after_platform.cmake delete mode 100644 modules/worldengine/nucleus/src/cmake/platform/cmake_uninstall.in.cmake delete mode 100644 modules/worldengine/nucleus/src/cmake/platform/settings.cmake delete mode 100644 modules/worldengine/nucleus/src/cmake/platform/unix/settings.cmake delete mode 100644 modules/worldengine/nucleus/src/cmake/platform/win/settings.cmake (limited to 'modules') diff --git a/modules/acore/extractors/CMakeLists.txt b/modules/acore/extractors/CMakeLists.txt deleted file mode 100644 index 14845d92fe..0000000000 --- a/modules/acore/extractors/CMakeLists.txt +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (C) -# -# This file is free software; as a special exception the author gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -add_subdirectory(map_extractor) -add_subdirectory(vmap4_assembler) -add_subdirectory(vmap4_extractor) -add_subdirectory(mmaps_generator) -if (WITH_MESHEXTRACTOR) - add_subdirectory(mesh_extractor) -endif() diff --git a/modules/acore/extractors/map_extractor/CMakeLists.txt b/modules/acore/extractors/map_extractor/CMakeLists.txt deleted file mode 100644 index 872c9f5192..0000000000 --- a/modules/acore/extractors/map_extractor/CMakeLists.txt +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright (C) -# Copyright (C) -# -# This file is free software; as a special exception the author gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -file(GLOB_RECURSE sources *.cpp *.h) - -set(include_Dirs - ${CMAKE_SOURCE_DIR}/modules/worldengine/nucleus/src - ${CMAKE_SOURCE_DIR}/modules/worldengine/deps/libmpq - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/loadlib -) - -if( WIN32 ) - set(include_Dirs - ${include_Dirs} - ${CMAKE_SOURCE_DIR}/modules/worldengine/deps/libmpq/win - ) -endif() - -include_directories(${include_Dirs}) - -add_executable(mapextractor - ${sources} -) - -target_link_libraries(mapextractor - mpq - ${BZIP2_LIBRARIES} - ${ZLIB_LIBRARIES} -) - -if( UNIX ) - install(TARGETS mapextractor DESTINATION bin) -elseif( WIN32 ) - install(TARGETS mapextractor DESTINATION "${CMAKE_INSTALL_PREFIX}") -endif() diff --git a/modules/acore/extractors/map_extractor/System.cpp b/modules/acore/extractors/map_extractor/System.cpp deleted file mode 100644 index defab209d7..0000000000 --- a/modules/acore/extractors/map_extractor/System.cpp +++ /dev/null @@ -1,1157 +0,0 @@ -/* - * Copyright (C) 2016+ AzerothCore , released under GNU GPL v2 license: http://github.com/azerothcore/azerothcore-wotlk/LICENSE-GPL2 - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#define _CRT_SECURE_NO_DEPRECATE - -#include -#include -#include -#include - -#ifdef _WIN32 -#include "direct.h" -#else -#include -#include -#endif - -#include "dbcfile.h" -#include "mpq_libmpq04.h" - -#include "adt.h" -#include "wdt.h" -#include - -#if defined( __GNUC__ ) - #define _open open - #define _close close - #ifndef O_BINARY - #define O_BINARY 0 - #endif -#else - #include -#endif - -#ifdef O_LARGEFILE - #define OPEN_FLAGS (O_RDONLY | O_BINARY | O_LARGEFILE) -#else - #define OPEN_FLAGS (O_RDONLY | O_BINARY) -#endif -extern ArchiveSet gOpenArchives; - -typedef struct -{ - char name[64]; - uint32 id; -} map_id; - -map_id *map_ids; -uint16 *areas; -uint16 *LiqType; -char output_path[128] = "."; -char input_path[128] = "."; -uint32 maxAreaId = 0; - -// ************************************************** -// Extractor options -// ************************************************** -enum Extract -{ - EXTRACT_MAP = 1, - EXTRACT_DBC = 2 -}; - -// Select data for extract -int CONF_extract = EXTRACT_MAP | EXTRACT_DBC; -// This option allow limit minimum height to some value (Allow save some memory) -bool CONF_allow_height_limit = true; -float CONF_use_minHeight = -500.0f; - -// This option allow use float to int conversion -bool CONF_allow_float_to_int = true; -float CONF_float_to_int8_limit = 2.0f; // Max accuracy = val/256 -float CONF_float_to_int16_limit = 2048.0f; // Max accuracy = val/65536 -float CONF_flat_height_delta_limit = 0.005f; // If max - min less this value - surface is flat -float CONF_flat_liquid_delta_limit = 0.001f; // If max - min less this value - liquid surface is flat - -// List MPQ for extract from -const char *CONF_mpq_list[]={ - "common.MPQ", - "common-2.MPQ", - "lichking.MPQ", - "expansion.MPQ", - "patch.MPQ", - "patch-2.MPQ", - "patch-3.MPQ", - "patch-4.MPQ", - "patch-5.MPQ", -}; - -static const char* const langs[] = {"enGB", "enUS", "deDE", "esES", "frFR", "koKR", "zhCN", "zhTW", "enCN", "enTW", "esMX", "ruRU" }; -#define LANG_COUNT 12 - -void CreateDir( const std::string& Path ) -{ - if(chdir(Path.c_str()) == 0) - { - chdir("../"); - return; - } - - int ret; - #ifdef _WIN32 - ret = _mkdir( Path.c_str()); - #else - ret = mkdir( Path.c_str(), 0777 ); - #endif - if (ret != 0) - { - printf("Fatal Error: Could not create directory %s check your permissions", Path.c_str()); - exit(1); - } -} - -bool FileExists( const char* FileName ) -{ - int fp = _open(FileName, OPEN_FLAGS); - if(fp != -1) - { - _close(fp); - return true; - } - - return false; -} - -void Usage(char* prg) -{ - printf( - "Usage:\n"\ - "%s -[var] [value]\n"\ - "-i set input path\n"\ - "-o set output path\n"\ - "-e extract only MAP(1)/DBC(2) - standard: both(3)\n"\ - "-f height stored as int (less map size but lost some accuracy) 1 by default\n"\ - "Example: %s -f 0 -i \"c:\\games\\game\"", prg, prg); - exit(1); -} - -void HandleArgs(int argc, char * arg[]) -{ - for(int c = 1; c < argc; ++c) - { - // i - input path - // o - output path - // e - extract only MAP(1)/DBC(2) - standard both(3) - // f - use float to int conversion - // h - limit minimum height - if(arg[c][0] != '-') - Usage(arg[0]); - - switch(arg[c][1]) - { - case 'i': - if(c + 1 < argc) // all ok - strcpy(input_path, arg[(c++) + 1]); - else - Usage(arg[0]); - break; - case 'o': - if(c + 1 < argc) // all ok - strcpy(output_path, arg[(c++) + 1]); - else - Usage(arg[0]); - break; - case 'f': - if(c + 1 < argc) // all ok - CONF_allow_float_to_int=atoi(arg[(c++) + 1])!=0; - else - Usage(arg[0]); - break; - case 'e': - if(c + 1 < argc) // all ok - { - CONF_extract=atoi(arg[(c++) + 1]); - if(!(CONF_extract > 0 && CONF_extract < 4)) - Usage(arg[0]); - } - else - Usage(arg[0]); - break; - } - } -} - -uint32 ReadBuild(int locale) -{ - // include build info file also - std::string filename = std::string("component.wow-")+langs[locale]+".txt"; - //printf("Read %s file... ", filename.c_str()); - - MPQFile m(filename.c_str()); - if(m.isEof()) - { - printf("Fatal error: Not found %s file!\n", filename.c_str()); - exit(1); - } - - std::string text = std::string(m.getPointer(), m.getSize()); - m.close(); - - size_t pos = text.find("version=\""); - size_t pos1 = pos + strlen("version=\""); - size_t pos2 = text.find("\"",pos1); - if (pos == text.npos || pos2 == text.npos || pos1 >= pos2) - { - printf("Fatal error: Invalid %s file format!\n", filename.c_str()); - exit(1); - } - - std::string build_str = text.substr(pos1,pos2-pos1); - - int build = atoi(build_str.c_str()); - if (build <= 0) - { - printf("Fatal error: Invalid %s file format!\n", filename.c_str()); - exit(1); - } - - return build; -} - -uint32 ReadMapDBC() -{ - printf("Read Map.dbc file... "); - DBCFile dbc("DBFilesClient\\Map.dbc"); - - if(!dbc.open()) - { - printf("Fatal error: Invalid Map.dbc file format!\n"); - exit(1); - } - - size_t map_count = dbc.getRecordCount(); - map_ids = new map_id[map_count]; - for(uint32 x = 0; x < map_count; ++x) - { - map_ids[x].id = dbc.getRecord(x).getUInt(0); - strcpy(map_ids[x].name, dbc.getRecord(x).getString(1)); - } - printf("Done! (%u maps loaded)\n", (uint32)map_count); - return map_count; -} - -void ReadAreaTableDBC() -{ - printf("Read AreaTable.dbc file..."); - DBCFile dbc("DBFilesClient\\AreaTable.dbc"); - - if(!dbc.open()) - { - printf("Fatal error: Invalid AreaTable.dbc file format!\n"); - exit(1); - } - - size_t area_count = dbc.getRecordCount(); - size_t maxid = dbc.getMaxId(); - areas = new uint16[maxid + 1]; - memset(areas, 0xff, (maxid + 1) * sizeof(uint16)); - - for(uint32 x = 0; x < area_count; ++x) - areas[dbc.getRecord(x).getUInt(0)] = dbc.getRecord(x).getUInt(3); - - maxAreaId = dbc.getMaxId(); - - printf("Done! (%u areas loaded)\n", (uint32)area_count); -} - -void ReadLiquidTypeTableDBC() -{ - printf("Read LiquidType.dbc file..."); - DBCFile dbc("DBFilesClient\\LiquidType.dbc"); - if(!dbc.open()) - { - printf("Fatal error: Invalid LiquidType.dbc file format!\n"); - exit(1); - } - - size_t liqTypeCount = dbc.getRecordCount(); - size_t liqTypeMaxId = dbc.getMaxId(); - LiqType = new uint16[liqTypeMaxId + 1]; - memset(LiqType, 0xff, (liqTypeMaxId + 1) * sizeof(uint16)); - - for(uint32 x = 0; x < liqTypeCount; ++x) - LiqType[dbc.getRecord(x).getUInt(0)] = dbc.getRecord(x).getUInt(3); - - printf("Done! (%u LiqTypes loaded)\n", (uint32)liqTypeCount); -} - -// -// Adt file convertor function and data -// - -// Map file format data -static char const* MAP_MAGIC = "MAPS"; -static char const* MAP_VERSION_MAGIC = "v1.3"; -static char const* MAP_AREA_MAGIC = "AREA"; -static char const* MAP_HEIGHT_MAGIC = "MHGT"; -static char const* MAP_LIQUID_MAGIC = "MLIQ"; - -struct map_fileheader -{ - uint32 mapMagic; - uint32 versionMagic; - uint32 buildMagic; - uint32 areaMapOffset; - uint32 areaMapSize; - uint32 heightMapOffset; - uint32 heightMapSize; - uint32 liquidMapOffset; - uint32 liquidMapSize; - uint32 holesOffset; - uint32 holesSize; -}; - -#define MAP_AREA_NO_AREA 0x0001 - -struct map_areaHeader -{ - uint32 fourcc; - uint16 flags; - uint16 gridArea; -}; - -#define MAP_HEIGHT_NO_HEIGHT 0x0001 -#define MAP_HEIGHT_AS_INT16 0x0002 -#define MAP_HEIGHT_AS_INT8 0x0004 - -struct map_heightHeader -{ - uint32 fourcc; - uint32 flags; - float gridHeight; - float gridMaxHeight; -}; - -#define MAP_LIQUID_TYPE_NO_WATER 0x00 -#define MAP_LIQUID_TYPE_WATER 0x01 -#define MAP_LIQUID_TYPE_OCEAN 0x02 -#define MAP_LIQUID_TYPE_MAGMA 0x04 -#define MAP_LIQUID_TYPE_SLIME 0x08 - -#define MAP_LIQUID_TYPE_DARK_WATER 0x10 -#define MAP_LIQUID_TYPE_WMO_WATER 0x20 - - -#define MAP_LIQUID_NO_TYPE 0x0001 -#define MAP_LIQUID_NO_HEIGHT 0x0002 - -struct map_liquidHeader -{ - uint32 fourcc; - uint16 flags; - uint16 liquidType; - uint8 offsetX; - uint8 offsetY; - uint8 width; - uint8 height; - float liquidLevel; -}; - -float selectUInt8StepStore(float maxDiff) -{ - return 255 / maxDiff; -} - -float selectUInt16StepStore(float maxDiff) -{ - return 65535 / maxDiff; -} -// Temporary grid data store -uint16 area_flags[ADT_CELLS_PER_GRID][ADT_CELLS_PER_GRID]; - -float V8[ADT_GRID_SIZE][ADT_GRID_SIZE]; -float V9[ADT_GRID_SIZE+1][ADT_GRID_SIZE+1]; -uint16 uint16_V8[ADT_GRID_SIZE][ADT_GRID_SIZE]; -uint16 uint16_V9[ADT_GRID_SIZE+1][ADT_GRID_SIZE+1]; -uint8 uint8_V8[ADT_GRID_SIZE][ADT_GRID_SIZE]; -uint8 uint8_V9[ADT_GRID_SIZE+1][ADT_GRID_SIZE+1]; - -uint16 liquid_entry[ADT_CELLS_PER_GRID][ADT_CELLS_PER_GRID]; -uint8 liquid_flags[ADT_CELLS_PER_GRID][ADT_CELLS_PER_GRID]; -bool liquid_show[ADT_GRID_SIZE][ADT_GRID_SIZE]; -float liquid_height[ADT_GRID_SIZE+1][ADT_GRID_SIZE+1]; - -bool ConvertADT(char *filename, char *filename2, int /*cell_y*/, int /*cell_x*/, uint32 build) -{ - ADT_file adt; - - if (!adt.loadFile(filename)) - return false; - - adt_MCIN *cells = adt.a_grid->getMCIN(); - if (!cells) - { - printf("Can't find cells in '%s'\n", filename); - return false; - } - - memset(liquid_show, 0, sizeof(liquid_show)); - memset(liquid_flags, 0, sizeof(liquid_flags)); - memset(liquid_entry, 0, sizeof(liquid_entry)); - - // Prepare map header - map_fileheader map; - map.mapMagic = *(uint32 const*)MAP_MAGIC; - map.versionMagic = *(uint32 const*)MAP_VERSION_MAGIC; - map.buildMagic = build; - - // Get area flags data - for (int i=0;igetMCNK(i,j); - uint32 areaid = cell->areaid; - if(areaid && areaid <= maxAreaId) - { - if(areas[areaid] != 0xffff) - { - area_flags[i][j] = areas[areaid]; - continue; - } - printf("File: %s\nCan't find area flag for areaid %u [%d, %d].\n", filename, areaid, cell->ix, cell->iy); - } - area_flags[i][j] = 0xffff; - } - } - //============================================ - // Try pack area data - //============================================ - bool fullAreaData = false; - uint32 areaflag = area_flags[0][0]; - for (int y=0;ygetMCNK(i,j); - if (!cell) - continue; - // Height values for triangles stored in order: - // 1 2 3 4 5 6 7 8 9 - // 10 11 12 13 14 15 16 17 - // 18 19 20 21 22 23 24 25 26 - // 27 28 29 30 31 32 33 34 - // . . . . . . . . - // For better get height values merge it to V9 and V8 map - // V9 height map: - // 1 2 3 4 5 6 7 8 9 - // 18 19 20 21 22 23 24 25 26 - // . . . . . . . . - // V8 height map: - // 10 11 12 13 14 15 16 17 - // 27 28 29 30 31 32 33 34 - // . . . . . . . . - - // Set map height as grid height - for (int y=0; y <= ADT_CELL_SIZE; y++) - { - int cy = i*ADT_CELL_SIZE + y; - for (int x=0; x <= ADT_CELL_SIZE; x++) - { - int cx = j*ADT_CELL_SIZE + x; - V9[cy][cx]=cell->ypos; - } - } - for (int y=0; y < ADT_CELL_SIZE; y++) - { - int cy = i*ADT_CELL_SIZE + y; - for (int x=0; x < ADT_CELL_SIZE; x++) - { - int cx = j*ADT_CELL_SIZE + x; - V8[cy][cx]=cell->ypos; - } - } - // Get custom height - adt_MCVT *v = cell->getMCVT(); - if (!v) - continue; - // get V9 height map - for (int y=0; y <= ADT_CELL_SIZE; y++) - { - int cy = i*ADT_CELL_SIZE + y; - for (int x=0; x <= ADT_CELL_SIZE; x++) - { - int cx = j*ADT_CELL_SIZE + x; - V9[cy][cx]+=v->height_map[y*(ADT_CELL_SIZE*2+1)+x]; - } - } - // get V8 height map - for (int y=0; y < ADT_CELL_SIZE; y++) - { - int cy = i*ADT_CELL_SIZE + y; - for (int x=0; x < ADT_CELL_SIZE; x++) - { - int cx = j*ADT_CELL_SIZE + x; - V8[cy][cx]+=v->height_map[y*(ADT_CELL_SIZE*2+1)+ADT_CELL_SIZE+1+x]; - } - } - } - } - //============================================ - // Try pack height data - //============================================ - float maxHeight = -20000; - float minHeight = 20000; - for (int y=0; y h) minHeight = h; - } - } - for (int y=0; y<=ADT_GRID_SIZE; y++) - { - for(int x=0;x<=ADT_GRID_SIZE;x++) - { - float h = V9[y][x]; - if (maxHeight < h) maxHeight = h; - if (minHeight > h) minHeight = h; - } - } - - // Check for allow limit minimum height (not store height in deep ochean - allow save some memory) - if (CONF_allow_height_limit && minHeight < CONF_use_minHeight) - { - for (int y=0; ygetMCNK(i, j); - if (!cell) - continue; - - adt_MCLQ *liquid = cell->getMCLQ(); - int count = 0; - if (!liquid || cell->sizeMCLQ <= 8) - continue; - - for (int y = 0; y < ADT_CELL_SIZE; y++) - { - int cy = i * ADT_CELL_SIZE + y; - for (int x = 0; x < ADT_CELL_SIZE; x++) - { - int cx = j * ADT_CELL_SIZE + x; - if (liquid->flags[y][x] != 0x0F) - { - liquid_show[cy][cx] = true; - if (liquid->flags[y][x] & (1<<7)) - liquid_flags[i][j] |= MAP_LIQUID_TYPE_DARK_WATER; - ++count; - } - } - } - - uint32 c_flag = cell->flags; - if (c_flag & (1<<2)) - { - liquid_entry[i][j] = 1; - liquid_flags[i][j] |= MAP_LIQUID_TYPE_WATER; // water - } - if (c_flag & (1<<3)) - { - liquid_entry[i][j] = 2; - liquid_flags[i][j] |= MAP_LIQUID_TYPE_OCEAN; // ocean - } - if (c_flag & (1<<4)) - { - liquid_entry[i][j] = 3; - liquid_flags[i][j] |= MAP_LIQUID_TYPE_MAGMA; // magma/slime - } - - if (!count && liquid_flags[i][j]) - fprintf(stderr, "Wrong liquid detect in MCLQ chunk"); - - for (int y = 0; y <= ADT_CELL_SIZE; y++) - { - int cy = i * ADT_CELL_SIZE + y; - for (int x = 0; x <= ADT_CELL_SIZE; x++) - { - int cx = j * ADT_CELL_SIZE + x; - liquid_height[cy][cx] = liquid->liquid[y][x].height; - } - } - } - } - - // Get liquid map for grid (in WOTLK used MH2O chunk) - adt_MH2O * h2o = adt.a_grid->getMH2O(); - if (h2o) - { - for (int i = 0; i < ADT_CELLS_PER_GRID; i++) - { - for(int j = 0; j < ADT_CELLS_PER_GRID; j++) - { - adt_liquid_header *h = h2o->getLiquidData(i,j); - if (!h) - continue; - - int count = 0; - uint64 show = h2o->getLiquidShowMap(h); - for (int y = 0; y < h->height; y++) - { - int cy = i * ADT_CELL_SIZE + y + h->yOffset; - for (int x = 0; x < h->width; x++) - { - int cx = j * ADT_CELL_SIZE + x + h->xOffset; - if (show & 1) - { - liquid_show[cy][cx] = true; - ++count; - } - show >>= 1; - } - } - - liquid_entry[i][j] = h->liquidType; - switch (LiqType[h->liquidType]) - { - case LIQUID_TYPE_WATER: liquid_flags[i][j] |= MAP_LIQUID_TYPE_WATER; break; - case LIQUID_TYPE_OCEAN: liquid_flags[i][j] |= MAP_LIQUID_TYPE_OCEAN; break; - case LIQUID_TYPE_MAGMA: liquid_flags[i][j] |= MAP_LIQUID_TYPE_MAGMA; break; - case LIQUID_TYPE_SLIME: liquid_flags[i][j] |= MAP_LIQUID_TYPE_SLIME; break; - default: - printf("\nCan't find Liquid type %u for map %s\nchunk %d,%d\n", h->liquidType, filename, i, j); - break; - } - // Dark water detect - if (LiqType[h->liquidType] == LIQUID_TYPE_OCEAN) - { - uint8 *lm = h2o->getLiquidLightMap(h); - if (!lm) - liquid_flags[i][j] |= MAP_LIQUID_TYPE_DARK_WATER; - } - - if (!count && liquid_flags[i][j]) - printf("Wrong liquid detect in MH2O chunk"); - - float *height = h2o->getLiquidHeightMap(h); - int pos = 0; - for (int y=0; y<=h->height;y++) - { - int cy = i*ADT_CELL_SIZE + y + h->yOffset; - for (int x=0; x<= h->width; x++) - { - int cx = j*ADT_CELL_SIZE + x + h->xOffset; - if (height) - liquid_height[cy][cx] = height[pos]; - else - liquid_height[cy][cx] = h->heightLevel1; - pos++; - } - } - } - } - } - //============================================ - // Pack liquid data - //============================================ - uint8 type = liquid_flags[0][0]; - bool fullType = false; - for (int y=0;y x) minX = x; - if (maxX < x) maxX = x; - if (minY > y) minY = y; - if (maxY < y) maxY = y; - float h = liquid_height[y][x]; - if (maxHeight < h) maxHeight = h; - if (minHeight > h) minHeight = h; - } - else - liquid_height[y][x] = CONF_use_minHeight; - } - } - map.liquidMapOffset = map.heightMapOffset + map.heightMapSize; - map.liquidMapSize = sizeof(map_liquidHeader); - liquidHeader.fourcc = *(uint32 const*)MAP_LIQUID_MAGIC; - liquidHeader.flags = 0; - liquidHeader.liquidType = 0; - liquidHeader.offsetX = minX; - liquidHeader.offsetY = minY; - liquidHeader.width = maxX - minX + 1 + 1; - liquidHeader.height = maxY - minY + 1 + 1; - liquidHeader.liquidLevel = minHeight; - - if (maxHeight == minHeight) - liquidHeader.flags |= MAP_LIQUID_NO_HEIGHT; - - // Not need store if flat surface - if (CONF_allow_float_to_int && (maxHeight - minHeight) < CONF_flat_liquid_delta_limit) - liquidHeader.flags |= MAP_LIQUID_NO_HEIGHT; - - if (!fullType) - liquidHeader.flags |= MAP_LIQUID_NO_TYPE; - - if (liquidHeader.flags & MAP_LIQUID_NO_TYPE) - liquidHeader.liquidType = type; - else - map.liquidMapSize += sizeof(liquid_entry) + sizeof(liquid_flags); - - if (!(liquidHeader.flags & MAP_LIQUID_NO_HEIGHT)) - map.liquidMapSize += sizeof(float)*liquidHeader.width*liquidHeader.height; - } - - // map hole info - uint16 holes[ADT_CELLS_PER_GRID][ADT_CELLS_PER_GRID]; - - if (map.liquidMapOffset) - map.holesOffset = map.liquidMapOffset + map.liquidMapSize; - else - map.holesOffset = map.heightMapOffset + map.heightMapSize; - - memset(holes, 0, sizeof(holes)); - bool hasHoles = false; - - for (int i = 0; i < ADT_CELLS_PER_GRID; ++i) - { - for (int j = 0; j < ADT_CELLS_PER_GRID; ++j) - { - adt_MCNK * cell = cells->getMCNK(i,j); - if (!cell) - continue; - holes[i][j] = cell->holes; - if (!hasHoles && cell->holes != 0) - hasHoles = true; - } - } - - if (hasHoles) - map.holesSize = sizeof(holes); - else - map.holesSize = 0; - - // Ok all data prepared - store it - FILE* output = fopen(filename2, "wb"); - if (!output) - { - printf("Can't create the output file '%s'\n", filename2); - return false; - } - fwrite(&map, sizeof(map), 1, output); - // Store area data - fwrite(&areaHeader, sizeof(areaHeader), 1, output); - if (!(areaHeader.flags&MAP_AREA_NO_AREA)) - fwrite(area_flags, sizeof(area_flags), 1, output); - - // Store height data - fwrite(&heightHeader, sizeof(heightHeader), 1, output); - if (!(heightHeader.flags & MAP_HEIGHT_NO_HEIGHT)) - { - if (heightHeader.flags & MAP_HEIGHT_AS_INT16) - { - fwrite(uint16_V9, sizeof(uint16_V9), 1, output); - fwrite(uint16_V8, sizeof(uint16_V8), 1, output); - } - else if (heightHeader.flags & MAP_HEIGHT_AS_INT8) - { - fwrite(uint8_V9, sizeof(uint8_V9), 1, output); - fwrite(uint8_V8, sizeof(uint8_V8), 1, output); - } - else - { - fwrite(V9, sizeof(V9), 1, output); - fwrite(V8, sizeof(V8), 1, output); - } - } - - // Store liquid data if need - if (map.liquidMapOffset) - { - fwrite(&liquidHeader, sizeof(liquidHeader), 1, output); - if (!(liquidHeader.flags&MAP_LIQUID_NO_TYPE)) - { - fwrite(liquid_entry, sizeof(liquid_entry), 1, output); - fwrite(liquid_flags, sizeof(liquid_flags), 1, output); - } - if (!(liquidHeader.flags&MAP_LIQUID_NO_HEIGHT)) - { - for (int y=0; yadt_list[y][x].exist) - continue; - sprintf(mpq_filename, "World\\Maps\\%s\\%s_%u_%u.adt", map_ids[z].name, map_ids[z].name, x, y); - sprintf(output_filename, "%s/maps/%03u%02u%02u.map", output_path, map_ids[z].id, y, x); - ConvertADT(mpq_filename, output_filename, y, x, build); - } - // draw progress bar - printf("Processing........................%d%%\r", (100 * (y+1)) / WDT_MAP_SIZE); - } - } - printf("\n"); - delete [] areas; - delete [] map_ids; -} - -bool ExtractFile( char const* mpq_name, std::string const& filename ) -{ - FILE *output = fopen(filename.c_str(), "wb"); - if(!output) - { - printf("Can't create the output file '%s'\n", filename.c_str()); - return false; - } - MPQFile m(mpq_name); - if(!m.isEof()) - fwrite(m.getPointer(), 1, m.getSize(), output); - - fclose(output); - return true; -} - -void ExtractDBCFiles(int locale, bool basicLocale) -{ - printf("Extracting dbc files...\n"); - - std::set dbcfiles; - - // get DBC file list - for(ArchiveSet::iterator i = gOpenArchives.begin(); i != gOpenArchives.end();++i) - { - vector files; - (*i)->GetFileListTo(files); - for (vector::iterator iter = files.begin(); iter != files.end(); ++iter) - if (iter->rfind(".dbc") == iter->length() - strlen(".dbc")) - dbcfiles.insert(*iter); - } - - std::string path = output_path; - path += "/dbc/"; - CreateDir(path); - if(!basicLocale) - { - path += langs[locale]; - path += "/"; - CreateDir(path); - } - - // extract Build info file - { - string mpq_name = std::string("component.wow-") + langs[locale] + ".txt"; - string filename = path + mpq_name; - - ExtractFile(mpq_name.c_str(), filename); - } - - // extract DBCs - uint32 count = 0; - for (set::iterator iter = dbcfiles.begin(); iter != dbcfiles.end(); ++iter) - { - string filename = path; - filename += (iter->c_str() + strlen("DBFilesClient\\")); - - if(FileExists(filename.c_str())) - continue; - - if (ExtractFile(iter->c_str(), filename)) - ++count; - } - printf("Extracted %u DBC files\n\n", count); -} - -void LoadLocaleMPQFiles(int const locale) -{ - char filename[512]; - - sprintf(filename,"%s/Data/%s/locale-%s.MPQ", input_path, langs[locale], langs[locale]); - new MPQArchive(filename); - - for(int i = 1; i < 5; ++i) - { - char ext[3] = ""; - if(i > 1) - sprintf(ext, "-%i", i); - - sprintf(filename,"%s/Data/%s/patch-%s%s.MPQ", input_path, langs[locale], langs[locale], ext); - if(FileExists(filename)) - new MPQArchive(filename); - } -} - -void LoadCommonMPQFiles() -{ - char filename[512]; - int count = sizeof(CONF_mpq_list)/sizeof(char*); - for(int i = 0; i < count; ++i) - { - sprintf(filename, "%s/Data/%s", input_path, CONF_mpq_list[i]); - if(FileExists(filename)) - new MPQArchive(filename); - } -} - -inline void CloseMPQFiles() -{ - for(ArchiveSet::iterator j = gOpenArchives.begin(); j != gOpenArchives.end();++j) (*j)->close(); - gOpenArchives.clear(); -} - -int main(int argc, char * arg[]) -{ - printf("Map & DBC Extractor\n"); - printf("===================\n\n"); - - HandleArgs(argc, arg); - - int FirstLocale = -1; - uint32 build = 0; - - for (int i = 0; i < LANG_COUNT; i++) - { - char tmp1[512]; - sprintf(tmp1, "%s/Data/%s/locale-%s.MPQ", input_path, langs[i], langs[i]); - if (FileExists(tmp1)) - { - printf("Detected locale: %s\n", langs[i]); - - //Open MPQs - LoadLocaleMPQFiles(i); - - if((CONF_extract & EXTRACT_DBC) == 0) - { - FirstLocale = i; - build = ReadBuild(FirstLocale); - printf("Detected client build: %u\n", build); - break; - } - - //Extract DBC files - if(FirstLocale < 0) - { - FirstLocale = i; - build = ReadBuild(FirstLocale); - printf("Detected client build: %u\n", build); - ExtractDBCFiles(i, true); - } - else - ExtractDBCFiles(i, false); - - //Close MPQs - CloseMPQFiles(); - } - } - - if(FirstLocale < 0) - { - printf("No locales detected\n"); - return 0; - } - - if (CONF_extract & EXTRACT_MAP) - { - printf("Using locale: %s\n", langs[FirstLocale]); - - // Open MPQs - LoadLocaleMPQFiles(FirstLocale); - LoadCommonMPQFiles(); - - // Extract maps - ExtractMapsFromMpq(build); - - // Close MPQs - CloseMPQFiles(); - } - - return 0; -} diff --git a/modules/acore/extractors/map_extractor/adt.cpp b/modules/acore/extractors/map_extractor/adt.cpp deleted file mode 100644 index 574167c216..0000000000 --- a/modules/acore/extractors/map_extractor/adt.cpp +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Copyright (C) 2016+ AzerothCore , released under GNU GPL v2 license: http://github.com/azerothcore/azerothcore-wotlk/LICENSE-GPL2 - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#define _CRT_SECURE_NO_DEPRECATE - -#include "adt.h" - -// Helper -int holetab_h[4] = {0x1111, 0x2222, 0x4444, 0x8888}; -int holetab_v[4] = {0x000F, 0x00F0, 0x0F00, 0xF000}; - -u_map_fcc MHDRMagic = { {'R','D','H','M'} }; -u_map_fcc MCINMagic = { {'N','I','C','M'} }; -u_map_fcc MH2OMagic = { {'O','2','H','M'} }; -u_map_fcc MCNKMagic = { {'K','N','C','M'} }; -u_map_fcc MCVTMagic = { {'T','V','C','M'} }; -u_map_fcc MCLQMagic = { {'Q','L','C','M'} }; - -bool isHole(int holes, int i, int j) -{ - int testi = i / 2; - int testj = j / 4; - if(testi > 3) testi = 3; - if(testj > 3) testj = 3; - return (holes & holetab_h[testi] & holetab_v[testj]) != 0; -} - -// -// Adt file loader class -// -ADT_file::ADT_file() -{ - a_grid = 0; -} - -ADT_file::~ADT_file() -{ - free(); -} - -void ADT_file::free() -{ - a_grid = 0; - FileLoader::free(); -} - -// -// Adt file check function -// -bool ADT_file::prepareLoadedData() -{ - // Check parent - if (!FileLoader::prepareLoadedData()) - return false; - - // Check and prepare MHDR - a_grid = (adt_MHDR *)(GetData()+8+version->size); - if (!a_grid->prepareLoadedData()) - return false; - - return true; -} - -bool adt_MHDR::prepareLoadedData() -{ - if (fcc != MHDRMagic.fcc) - return false; - - if (size!=sizeof(adt_MHDR)-8) - return false; - - // Check and prepare MCIN - if (offsMCIN && !getMCIN()->prepareLoadedData()) - return false; - - // Check and prepare MH2O - if (offsMH2O && !getMH2O()->prepareLoadedData()) - return false; - - return true; -} - -bool adt_MCIN::prepareLoadedData() -{ - if (fcc != MCINMagic.fcc) - return false; - - // Check cells data - for (int i=0; iprepareLoadedData()) - return false; - - return true; -} - -bool adt_MH2O::prepareLoadedData() -{ - if (fcc != MH2OMagic.fcc) - return false; - - // Check liquid data -// for (int i=0; iprepareLoadedData()) - return false; - // Check liquid data - if (offsMCLQ && !getMCLQ()->prepareLoadedData()) - return false; - - return true; -} - -bool adt_MCVT::prepareLoadedData() -{ - if (fcc != MCVTMagic.fcc) - return false; - - if (size != sizeof(adt_MCVT)-8) - return false; - - return true; -} - -bool adt_MCLQ::prepareLoadedData() -{ - if (fcc != MCLQMagic.fcc) - return false; - - return true; -} diff --git a/modules/acore/extractors/map_extractor/adt.h b/modules/acore/extractors/map_extractor/adt.h deleted file mode 100644 index 71e83cd999..0000000000 --- a/modules/acore/extractors/map_extractor/adt.h +++ /dev/null @@ -1,296 +0,0 @@ -/* - * Copyright (C) 2016+ AzerothCore , released under GNU GPL v2 license: http://github.com/azerothcore/azerothcore-wotlk/LICENSE-GPL2 - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#ifndef ADT_H -#define ADT_H - -#include "loadlib.h" - -#define TILESIZE (533.33333f) -#define CHUNKSIZE ((TILESIZE) / 16.0f) -#define UNITSIZE (CHUNKSIZE / 8.0f) - -enum LiquidType -{ - LIQUID_TYPE_WATER = 0, - LIQUID_TYPE_OCEAN = 1, - LIQUID_TYPE_MAGMA = 2, - LIQUID_TYPE_SLIME = 3 -}; - -//************************************************************************************** -// ADT file class -//************************************************************************************** -#define ADT_CELLS_PER_GRID 16 -#define ADT_CELL_SIZE 8 -#define ADT_GRID_SIZE (ADT_CELLS_PER_GRID*ADT_CELL_SIZE) - -// -// Adt file height map chunk -// -class adt_MCVT -{ - union{ - uint32 fcc; - char fcc_txt[4]; - }; - uint32 size; -public: - float height_map[(ADT_CELL_SIZE+1)*(ADT_CELL_SIZE+1)+ADT_CELL_SIZE*ADT_CELL_SIZE]; - - bool prepareLoadedData(); -}; - -// -// Adt file liquid map chunk (old) -// -class adt_MCLQ -{ - union{ - uint32 fcc; - char fcc_txt[4]; - }; -public: - uint32 size; - float height1; - float height2; - struct liquid_data{ - uint32 light; - float height; - } liquid[ADT_CELL_SIZE+1][ADT_CELL_SIZE+1]; - - // 1<<0 - ochen - // 1<<1 - lava/slime - // 1<<2 - water - // 1<<6 - all water - // 1<<7 - dark water - // == 0x0F - not show liquid - uint8 flags[ADT_CELL_SIZE][ADT_CELL_SIZE]; - uint8 data[84]; - bool prepareLoadedData(); -}; - -// -// Adt file cell chunk -// -class adt_MCNK -{ - union{ - uint32 fcc; - char fcc_txt[4]; - }; -public: - uint32 size; - uint32 flags; - uint32 ix; - uint32 iy; - uint32 nLayers; - uint32 nDoodadRefs; - uint32 offsMCVT; // height map - uint32 offsMCNR; // Normal vectors for each vertex - uint32 offsMCLY; // Texture layer definitions - uint32 offsMCRF; // A list of indices into the parent file's MDDF chunk - uint32 offsMCAL; // Alpha maps for additional texture layers - uint32 sizeMCAL; - uint32 offsMCSH; // Shadow map for static shadows on the terrain - uint32 sizeMCSH; - uint32 areaid; - uint32 nMapObjRefs; - uint32 holes; - uint16 s[2]; - uint32 data1; - uint32 data2; - uint32 data3; - uint32 predTex; - uint32 nEffectDoodad; - uint32 offsMCSE; - uint32 nSndEmitters; - uint32 offsMCLQ; // Liqid level (old) - uint32 sizeMCLQ; // - float zpos; - float xpos; - float ypos; - uint32 offsMCCV; // offsColorValues in WotLK - uint32 props; - uint32 effectId; - - bool prepareLoadedData(); - adt_MCVT *getMCVT() - { - if (offsMCVT) - return (adt_MCVT *)((uint8 *)this + offsMCVT); - return 0; - } - adt_MCLQ *getMCLQ() - { - if (offsMCLQ) - return (adt_MCLQ *)((uint8 *)this + offsMCLQ); - return 0; - } -}; - -// -// Adt file grid chunk -// -class adt_MCIN -{ - union{ - uint32 fcc; - char fcc_txt[4]; - }; -public: - uint32 size; - struct adt_CELLS{ - uint32 offsMCNK; - uint32 size; - uint32 flags; - uint32 asyncId; - } cells[ADT_CELLS_PER_GRID][ADT_CELLS_PER_GRID]; - - bool prepareLoadedData(); - // offset from begin file (used this-84) - adt_MCNK *getMCNK(int x, int y) - { - if (cells[x][y].offsMCNK) - return (adt_MCNK *)((uint8 *)this + cells[x][y].offsMCNK - 84); - return 0; - } -}; - -#define ADT_LIQUID_HEADER_FULL_LIGHT 0x01 -#define ADT_LIQUID_HEADER_NO_HIGHT 0x02 - -struct adt_liquid_header{ - uint16 liquidType; // Index from LiquidType.dbc - uint16 formatFlags; - float heightLevel1; - float heightLevel2; - uint8 xOffset; - uint8 yOffset; - uint8 width; - uint8 height; - uint32 offsData2a; - uint32 offsData2b; -}; - -// -// Adt file liquid data chunk (new) -// -class adt_MH2O -{ -public: - union{ - uint32 fcc; - char fcc_txt[4]; - }; - uint32 size; - - struct adt_LIQUID{ - uint32 offsData1; - uint32 used; - uint32 offsData2; - } liquid[ADT_CELLS_PER_GRID][ADT_CELLS_PER_GRID]; - - bool prepareLoadedData(); - - adt_liquid_header *getLiquidData(int x, int y) - { - if (liquid[x][y].used && liquid[x][y].offsData1) - return (adt_liquid_header *)((uint8*)this + 8 + liquid[x][y].offsData1); - return 0; - } - - float *getLiquidHeightMap(adt_liquid_header *h) - { - if (h->formatFlags & ADT_LIQUID_HEADER_NO_HIGHT) - return 0; - if (h->offsData2b) - return (float *)((uint8*)this + 8 + h->offsData2b); - return 0; - } - - uint8 *getLiquidLightMap(adt_liquid_header *h) - { - if (h->formatFlags&ADT_LIQUID_HEADER_FULL_LIGHT) - return 0; - if (h->offsData2b) - { - if (h->formatFlags & ADT_LIQUID_HEADER_NO_HIGHT) - return (uint8 *)((uint8*)this + 8 + h->offsData2b); - return (uint8 *)((uint8*)this + 8 + h->offsData2b + (h->width+1)*(h->height+1)*4); - } - return 0; - } - - uint32 *getLiquidFullLightMap(adt_liquid_header *h) - { - if (!(h->formatFlags&ADT_LIQUID_HEADER_FULL_LIGHT)) - return 0; - if (h->offsData2b) - { - if (h->formatFlags & ADT_LIQUID_HEADER_NO_HIGHT) - return (uint32 *)((uint8*)this + 8 + h->offsData2b); - return (uint32 *)((uint8*)this + 8 + h->offsData2b + (h->width+1)*(h->height+1)*4); - } - return 0; - } - - uint64 getLiquidShowMap(adt_liquid_header *h) - { - if (h->offsData2a) - return *((uint64 *)((uint8*)this + 8 + h->offsData2a)); - else - return 0xFFFFFFFFFFFFFFFFuLL; - } - -}; - -// -// Adt file header chunk -// -class adt_MHDR -{ - union{ - uint32 fcc; - char fcc_txt[4]; - }; -public: - uint32 size; - - uint32 pad; - uint32 offsMCIN; // MCIN - uint32 offsTex; // MTEX - uint32 offsModels; // MMDX - uint32 offsModelsIds; // MMID - uint32 offsMapObejcts; // MWMO - uint32 offsMapObejctsIds; // MWID - uint32 offsDoodsDef; // MDDF - uint32 offsObjectsDef; // MODF - uint32 offsMFBO; // MFBO - uint32 offsMH2O; // MH2O - uint32 data1; - uint32 data2; - uint32 data3; - uint32 data4; - uint32 data5; -public: - bool prepareLoadedData(); - adt_MCIN *getMCIN(){ return (adt_MCIN *)((uint8 *)&pad+offsMCIN);} - adt_MH2O *getMH2O(){ return offsMH2O ? (adt_MH2O *)((uint8 *)&pad+offsMH2O) : 0;} - -}; - -class ADT_file : public FileLoader{ -public: - bool prepareLoadedData(); - ADT_file(); - ~ADT_file(); - void free(); - - adt_MHDR *a_grid; -}; - -#endif diff --git a/modules/acore/extractors/map_extractor/dbcfile.cpp b/modules/acore/extractors/map_extractor/dbcfile.cpp deleted file mode 100644 index 59217aaed5..0000000000 --- a/modules/acore/extractors/map_extractor/dbcfile.cpp +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (C) 2016+ AzerothCore , released under GNU GPL v2 license: http://github.com/azerothcore/azerothcore-wotlk/LICENSE-GPL2 - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#define _CRT_SECURE_NO_DEPRECATE - -#include "dbcfile.h" -#include "mpq_libmpq04.h" - -DBCFile::DBCFile(const std::string& filename): - filename(filename), recordSize(0), recordCount(0), fieldCount(0), stringSize(0), data(NULL), stringTable(NULL) -{ - -} - -bool DBCFile::open() -{ - MPQFile f(filename.c_str()); - char header[4]; - unsigned int na,nb,es,ss; - - if(f.read(header,4)!=4) // Number of records - return false; - - if(header[0]!='W' || header[1]!='D' || header[2]!='B' || header[3]!='C') - return false; - - if(f.read(&na,4)!=4) // Number of records - return false; - if(f.read(&nb,4)!=4) // Number of fields - return false; - if(f.read(&es,4)!=4) // Size of a record - return false; - if(f.read(&ss,4)!=4) // String size - return false; - - recordSize = es; - recordCount = na; - fieldCount = nb; - stringSize = ss; - if(fieldCount*4 != recordSize) - return false; - - data = new unsigned char[recordSize*recordCount+stringSize]; - stringTable = data + recordSize*recordCount; - - size_t data_size = recordSize*recordCount+stringSize; - if(f.read(data,data_size)!=data_size) - return false; - f.close(); - return true; -} -DBCFile::~DBCFile() -{ - delete [] data; -} - -DBCFile::Record DBCFile::getRecord(size_t id) -{ - assert(data); - return Record(*this, data + id*recordSize); -} - -size_t DBCFile::getMaxId() -{ - assert(data); - - size_t maxId = 0; - for(size_t i = 0; i < getRecordCount(); ++i) - { - if(maxId < getRecord(i).getUInt(0)) - maxId = getRecord(i).getUInt(0); - } - return maxId; -} - -DBCFile::Iterator DBCFile::begin() -{ - assert(data); - return Iterator(*this, data); -} -DBCFile::Iterator DBCFile::end() -{ - assert(data); - return Iterator(*this, stringTable); -} - diff --git a/modules/acore/extractors/map_extractor/dbcfile.h b/modules/acore/extractors/map_extractor/dbcfile.h deleted file mode 100644 index 37993f20a6..0000000000 --- a/modules/acore/extractors/map_extractor/dbcfile.h +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Copyright (C) 2016+ AzerothCore , released under GNU GPL v2 license: http://github.com/azerothcore/azerothcore-wotlk/LICENSE-GPL2 - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#ifndef DBCFILE_H -#define DBCFILE_H -#include -#include - -class DBCFile -{ -public: - DBCFile(const std::string &filename); - ~DBCFile(); - - // Open database. It must be openened before it can be used. - bool open(); - - // Database exceptions - class Exception - { - public: - Exception(const std::string &message): message(message) - { } - virtual ~Exception() - { } - const std::string &getMessage() {return message;} - private: - std::string message; - }; - class NotFound: public Exception - { - public: - NotFound(): Exception("Key was not found") - { } - }; - // Iteration over database - class Iterator; - class Record - { - public: - float getFloat(size_t field) const - { - assert(field < file.fieldCount); - return *reinterpret_cast(offset+field*4); - } - unsigned int getUInt(size_t field) const - { - assert(field < file.fieldCount); - return *reinterpret_cast(offset+field*4); - } - int getInt(size_t field) const - { - assert(field < file.fieldCount); - return *reinterpret_cast(offset+field*4); - } - const char *getString(size_t field) const - { - assert(field < file.fieldCount); - size_t stringOffset = getUInt(field); - assert(stringOffset < file.stringSize); - return reinterpret_cast(file.stringTable + stringOffset); - } - private: - Record(DBCFile &file, unsigned char *offset): file(file), offset(offset) {} - DBCFile &file; - unsigned char *offset; - - friend class DBCFile; - friend class DBCFile::Iterator; - }; - /** Iterator that iterates over records - */ - class Iterator - { - public: - Iterator(DBCFile &file, unsigned char *offset): - record(file, offset) {} - /// Advance (prefix only) - Iterator & operator++() { - record.offset += record.file.recordSize; - return *this; - } - /// Return address of current instance - Record const & operator*() const { return record; } - const Record* operator->() const { - return &record; - } - /// Comparison - bool operator==(const Iterator &b) const - { - return record.offset == b.record.offset; - } - bool operator!=(const Iterator &b) const - { - return record.offset != b.record.offset; - } - private: - Record record; - }; - - // Get record by id - Record getRecord(size_t id); - /// Get begin iterator over records - Iterator begin(); - /// Get begin iterator over records - Iterator end(); - /// Trivial - size_t getRecordCount() const { return recordCount;} - size_t getFieldCount() const { return fieldCount; } - size_t getMaxId(); -private: - std::string filename; - size_t recordSize; - size_t recordCount; - size_t fieldCount; - size_t stringSize; - unsigned char *data; - unsigned char *stringTable; -}; - -#endif - diff --git a/modules/acore/extractors/map_extractor/loadlib.cpp b/modules/acore/extractors/map_extractor/loadlib.cpp deleted file mode 100644 index 2a3b0482f5..0000000000 --- a/modules/acore/extractors/map_extractor/loadlib.cpp +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (C) 2016+ AzerothCore , released under GNU GPL v2 license: http://github.com/azerothcore/azerothcore-wotlk/LICENSE-GPL2 - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#define _CRT_SECURE_NO_DEPRECATE - -#include "loadlib.h" -#include "mpq_libmpq04.h" -#include - -class MPQFile; - -u_map_fcc MverMagic = { {'R','E','V','M'} }; - -FileLoader::FileLoader() -{ - data = 0; - data_size = 0; - version = 0; -} - -FileLoader::~FileLoader() -{ - free(); -} - -bool FileLoader::loadFile(char *filename, bool log) -{ - free(); - MPQFile mf(filename); - if(mf.isEof()) - { - if (log) - printf("No such file %s\n", filename); - return false; - } - - data_size = mf.getSize(); - - data = new uint8 [data_size]; - mf.read(data, data_size); - mf.close(); - if (prepareLoadedData()) - return true; - - printf("Error loading %s", filename); - mf.close(); - free(); - return false; -} - -bool FileLoader::prepareLoadedData() -{ - // Check version - version = (file_MVER *) data; - if (version->fcc != MverMagic.fcc) - return false; - if (version->ver != FILE_FORMAT_VERSION) - return false; - return true; -} - -void FileLoader::free() -{ - if (data) delete[] data; - data = 0; - data_size = 0; - version = 0; -} diff --git a/modules/acore/extractors/map_extractor/loadlib/loadlib.h b/modules/acore/extractors/map_extractor/loadlib/loadlib.h deleted file mode 100644 index a2169b6b4b..0000000000 --- a/modules/acore/extractors/map_extractor/loadlib/loadlib.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (C) 2016+ AzerothCore , released under GNU GPL v2 license: http://github.com/azerothcore/azerothcore-wotlk/LICENSE-GPL2 - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#ifndef LOAD_LIB_H -#define LOAD_LIB_H - -#ifdef _WIN32 -typedef __int64 int64; -typedef __int32 int32; -typedef __int16 int16; -typedef __int8 int8; -typedef unsigned __int64 uint64; -typedef unsigned __int32 uint32; -typedef unsigned __int16 uint16; -typedef unsigned __int8 uint8; -#else -#include -#ifndef uint64_t -#ifdef __linux__ -#include -#endif -#endif -typedef int64_t int64; -typedef int32_t int32; -typedef int16_t int16; -typedef int8_t int8; -typedef uint64_t uint64; -typedef uint32_t uint32; -typedef uint16_t uint16; -typedef uint8_t uint8; -#endif - -#define FILE_FORMAT_VERSION 18 - -union u_map_fcc -{ - char fcc_txt[4]; - uint32 fcc; -}; - -// -// File version chunk -// -struct file_MVER -{ - union{ - uint32 fcc; - char fcc_txt[4]; - }; - uint32 size; - uint32 ver; -}; - -class FileLoader{ - uint8 *data; - uint32 data_size; -public: - virtual bool prepareLoadedData(); - uint8 *GetData() {return data;} - uint32 GetDataSize() {return data_size;} - - file_MVER *version; - FileLoader(); - ~FileLoader(); - bool loadFile(char *filename, bool log = true); - virtual void free(); -}; -#endif diff --git a/modules/acore/extractors/map_extractor/mpq_libmpq.cpp b/modules/acore/extractors/map_extractor/mpq_libmpq.cpp deleted file mode 100644 index be8164f442..0000000000 --- a/modules/acore/extractors/map_extractor/mpq_libmpq.cpp +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright (C) 2016+ AzerothCore , released under GNU GPL v2 license: http://github.com/azerothcore/azerothcore-wotlk/LICENSE-GPL2 - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#include "mpq_libmpq04.h" -#include -#include - -ArchiveSet gOpenArchives; - -MPQArchive::MPQArchive(const char* filename) -{ - int result = libmpq__archive_open(&mpq_a, filename, -1); - printf("Opening %s\n", filename); - if(result) { - switch(result) { - case LIBMPQ_ERROR_OPEN : - printf("Error opening archive '%s': Does file really exist?\n", filename); - break; - case LIBMPQ_ERROR_FORMAT : /* bad file format */ - printf("Error opening archive '%s': Bad file format\n", filename); - break; - case LIBMPQ_ERROR_SEEK : /* seeking in file failed */ - printf("Error opening archive '%s': Seeking in file failed\n", filename); - break; - case LIBMPQ_ERROR_READ : /* Read error in archive */ - printf("Error opening archive '%s': Read error in archive\n", filename); - break; - case LIBMPQ_ERROR_MALLOC : /* maybe not enough memory? :) */ - printf("Error opening archive '%s': Maybe not enough memory\n", filename); - break; - default: - printf("Error opening archive '%s': Unknown error\n", filename); - break; - } - return; - } - gOpenArchives.push_front(this); -} - -void MPQArchive::close() -{ - //gOpenArchives.erase(erase(&mpq_a); - libmpq__archive_close(mpq_a); -} - -MPQFile::MPQFile(const char* filename): - eof(false), - buffer(0), - pointer(0), - size(0) -{ - for(ArchiveSet::iterator i=gOpenArchives.begin(); i!=gOpenArchives.end();++i) - { - mpq_archive *mpq_a = (*i)->mpq_a; - - uint32_t filenum; - if(libmpq__file_number(mpq_a, filename, &filenum)) continue; - libmpq__off_t transferred; - libmpq__file_unpacked_size(mpq_a, filenum, &size); - - // HACK: in patch.mpq some files don't want to open and give 1 for filesize - if (size<=1) { -// printf("warning: file %s has size %d; cannot read.\n", filename, size); - eof = true; - buffer = 0; - return; - } - buffer = new char[size]; - - //libmpq_file_getdata - libmpq__file_read(mpq_a, filenum, (unsigned char*)buffer, size, &transferred); - /*libmpq_file_getdata(&mpq_a, hash, fileno, (unsigned char*)buffer);*/ - return; - - } - eof = true; - buffer = 0; -} - -size_t MPQFile::read(void* dest, size_t bytes) -{ - if (eof) return 0; - - size_t rpos = pointer + bytes; - if (rpos > size_t(size)) { - bytes = size - pointer; - eof = true; - } - - memcpy(dest, &(buffer[pointer]), bytes); - - pointer = rpos; - - return bytes; -} - -void MPQFile::seek(int offset) -{ - pointer = offset; - eof = (pointer >= size); -} - -void MPQFile::seekRelative(int offset) -{ - pointer += offset; - eof = (pointer >= size); -} - -void MPQFile::close() -{ - if (buffer) delete[] buffer; - buffer = 0; - eof = true; -} diff --git a/modules/acore/extractors/map_extractor/mpq_libmpq04.h b/modules/acore/extractors/map_extractor/mpq_libmpq04.h deleted file mode 100644 index cd67710906..0000000000 --- a/modules/acore/extractors/map_extractor/mpq_libmpq04.h +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright (C) 2016+ AzerothCore , released under GNU GPL v2 license: http://github.com/azerothcore/azerothcore-wotlk/LICENSE-GPL2 - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#ifndef MPQ_H -#define MPQ_H - -#include "loadlib/loadlib.h" -#include "libmpq/mpq.h" -#include -#include -#include -#include -#include - -using namespace std; - -class MPQArchive -{ - -public: - mpq_archive_s *mpq_a; - - MPQArchive(const char* filename); - ~MPQArchive() { close(); } - void close(); - - void GetFileListTo(vector& filelist) { - uint32_t filenum; - if(libmpq__file_number(mpq_a, "(listfile)", &filenum)) return; - libmpq__off_t size, transferred; - libmpq__file_unpacked_size(mpq_a, filenum, &size); - - char *buffer = new char[size+1]; - buffer[size] = '\0'; - - libmpq__file_read(mpq_a, filenum, (unsigned char*)buffer, size, &transferred); - - char seps[] = "\n"; - char *token; - - token = strtok( buffer, seps ); - uint32 counter = 0; - while ((token != NULL) && (counter < size)) { - //cout << token << endl; - token[strlen(token) - 1] = 0; - string s = token; - filelist.push_back(s); - counter += strlen(token) + 2; - token = strtok(NULL, seps); - } - - delete[] buffer; - } -}; -typedef std::deque ArchiveSet; - -class MPQFile -{ - //MPQHANDLE handle; - bool eof; - char *buffer; - libmpq__off_t pointer,size; - - // disable copying - MPQFile(const MPQFile& /*f*/) {} - void operator=(const MPQFile& /*f*/) {} - -public: - MPQFile(const char* filename); // filenames are not case sensitive - ~MPQFile() { close(); } - size_t read(void* dest, size_t bytes); - size_t getSize() { return size; } - size_t getPos() { return pointer; } - char* getBuffer() { return buffer; } - char* getPointer() { return buffer + pointer; } - bool isEof() { return eof; } - void seek(int offset); - void seekRelative(int offset); - void close(); -}; - -inline void flipcc(char *fcc) -{ - char t; - t=fcc[0]; - fcc[0]=fcc[3]; - fcc[3]=t; - t=fcc[1]; - fcc[1]=fcc[2]; - fcc[2]=t; -} - -#endif diff --git a/modules/acore/extractors/map_extractor/wdt.cpp b/modules/acore/extractors/map_extractor/wdt.cpp deleted file mode 100644 index 82a5e32f24..0000000000 --- a/modules/acore/extractors/map_extractor/wdt.cpp +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (C) 2016+ AzerothCore , released under GNU GPL v2 license: http://github.com/azerothcore/azerothcore-wotlk/LICENSE-GPL2 - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#define _CRT_SECURE_NO_DEPRECATE - -#include "wdt.h" - -u_map_fcc MWMOMagic = { {'O', 'M', 'W', 'M'} }; -u_map_fcc MPHDMagic = { {'D', 'H', 'P', 'M'} }; -u_map_fcc MAINMagic = { {'N', 'I', 'A', 'M'} }; - -bool wdt_MWMO::prepareLoadedData() -{ - if (fcc != MWMOMagic.fcc) - return false; - return true; -} - -bool wdt_MPHD::prepareLoadedData() -{ - if (fcc != MPHDMagic.fcc) - return false; - return true; -} - -bool wdt_MAIN::prepareLoadedData() -{ - if (fcc != MAINMagic.fcc) - return false; - return true; -} - -WDT_file::WDT_file() -{ - mphd = 0; - main = 0; - wmo = 0; -} - -WDT_file::~WDT_file() -{ - free(); -} - -void WDT_file::free() -{ - mphd = 0; - main = 0; - wmo = 0; - FileLoader::free(); -} - -bool WDT_file::prepareLoadedData() -{ - // Check parent - if (!FileLoader::prepareLoadedData()) - return false; - - mphd = (wdt_MPHD *)((uint8*)version+version->size+8); - if (!mphd->prepareLoadedData()) - return false; - main = (wdt_MAIN *)((uint8*)mphd + mphd->size+8); - if (!main->prepareLoadedData()) - return false; - wmo = (wdt_MWMO *)((uint8*)main+ main->size+8); - if (!wmo->prepareLoadedData()) - return false; - return true; -} diff --git a/modules/acore/extractors/map_extractor/wdt.h b/modules/acore/extractors/map_extractor/wdt.h deleted file mode 100644 index f65d6d9386..0000000000 --- a/modules/acore/extractors/map_extractor/wdt.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (C) 2016+ AzerothCore , released under GNU GPL v2 license: http://github.com/azerothcore/azerothcore-wotlk/LICENSE-GPL2 - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#ifndef WDT_H -#define WDT_H -#include "loadlib.h" - -//************************************************************************************** -// WDT file class and structures -//************************************************************************************** -#define WDT_MAP_SIZE 64 - -class wdt_MWMO{ - union{ - uint32 fcc; - char fcc_txt[4]; - }; -public: - uint32 size; - bool prepareLoadedData(); -}; - -class wdt_MPHD{ - union{ - uint32 fcc; - char fcc_txt[4]; - }; -public: - uint32 size; - - uint32 data1; - uint32 data2; - uint32 data3; - uint32 data4; - uint32 data5; - uint32 data6; - uint32 data7; - uint32 data8; - bool prepareLoadedData(); -}; - -class wdt_MAIN{ - union{ - uint32 fcc; - char fcc_txt[4]; - }; -public: - uint32 size; - - struct adtData{ - uint32 exist; - uint32 data1; - } adt_list[64][64]; - - bool prepareLoadedData(); -}; - -class WDT_file : public FileLoader{ -public: - bool prepareLoadedData(); - - WDT_file(); - ~WDT_file(); - void free(); - - wdt_MPHD *mphd; - wdt_MAIN *main; - wdt_MWMO *wmo; -}; - -#endif \ No newline at end of file diff --git a/modules/acore/extractors/mesh_extractor/ADT.cpp b/modules/acore/extractors/mesh_extractor/ADT.cpp deleted file mode 100644 index 85d81e3db5..0000000000 --- a/modules/acore/extractors/mesh_extractor/ADT.cpp +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (C) - * - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#include "ADT.h" -#include "DoodadHandler.h" -#include "LiquidHandler.h" -#include "WorldModelHandler.h" - -ADT::ADT( std::string file, int x, int y ) : ObjectData(NULL), Data(NULL), HasObjectData(false), - _DoodadHandler(NULL), _WorldModelHandler(NULL), _LiquidHandler(NULL), X(x), Y(y) -{ - Data = new ChunkedData(file); - ObjectData = new ChunkedData(file); - if (ObjectData->Stream) - HasObjectData = true; - else - ObjectData = NULL; -} - -ADT::~ADT() -{ - delete ObjectData; - delete Data; - - for (std::vector::iterator itr = MapChunks.begin(); itr != MapChunks.end(); ++itr) - delete *itr; - - MapChunks.clear(); - delete _DoodadHandler; - delete _WorldModelHandler; - delete _LiquidHandler; -} - -void ADT::Read() -{ - Header.Read(Data->GetChunkByName("MHDR")->GetStream()); - MapChunks.reserve(16 * 16); - - for (std::vector::iterator itr = Data->Chunks.begin(); itr != Data->Chunks.end(); ++itr) - if ((*itr)->Name == "MCNK") - MapChunks.push_back(new MapChunk(this, *itr)); - - _LiquidHandler = new LiquidHandler(this); - - // do this separate from map chunk initialization to access liquid data - for (std::vector::iterator itr = MapChunks.begin(); itr != MapChunks.end(); ++itr) - (*itr)->GenerateTriangles(); - - _DoodadHandler = new DoodadHandler(this); - for (std::vector::iterator itr = MapChunks.begin(); itr != MapChunks.end(); ++itr) - _DoodadHandler->ProcessMapChunk(*itr); - - _WorldModelHandler = new WorldModelHandler(this); - for (std::vector::iterator itr = MapChunks.begin(); itr != MapChunks.end(); ++itr) - _WorldModelHandler->ProcessMapChunk(*itr); -} diff --git a/modules/acore/extractors/mesh_extractor/ADT.h b/modules/acore/extractors/mesh_extractor/ADT.h deleted file mode 100644 index 9a4532303f..0000000000 --- a/modules/acore/extractors/mesh_extractor/ADT.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (C) - * - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#ifndef ADT_H -#define ADT_H -#include "ChunkedData.h" -#include "MapChunk.h" - -class DoodadHandler; -class WorldModelHandler; -class LiquidHandler; - -class ADT -{ -public: - ADT(std::string file, int x, int y); - ~ADT(); - - void Read(); - - ChunkedData* ObjectData; - ChunkedData* Data; - std::vector MapChunks; - MHDR Header; - // Can we dispose of this? - bool HasObjectData; - - DoodadHandler* _DoodadHandler; - WorldModelHandler* _WorldModelHandler; - LiquidHandler* _LiquidHandler; - - int X; - int Y; -}; -#endif \ No newline at end of file diff --git a/modules/acore/extractors/mesh_extractor/CMakeLists.txt b/modules/acore/extractors/mesh_extractor/CMakeLists.txt deleted file mode 100644 index 445532ba98..0000000000 --- a/modules/acore/extractors/mesh_extractor/CMakeLists.txt +++ /dev/null @@ -1,50 +0,0 @@ -# Copyright (C) -# Copyright (C) -# -# This file is free software; as a special exception the author gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -file(GLOB_RECURSE meshExtract_Sources *.cpp *.h) - -set(include_Base - ${CMAKE_BINARY_DIR} - ${CMAKE_SOURCE_DIR}/modules/worldengine/nucleus/src - ${CMAKE_SOURCE_DIR}/modules/worldengine/deps/recastnavigation/Recast - ${CMAKE_SOURCE_DIR}/modules/worldengine/deps/recastnavigation/Detour - ${CMAKE_SOURCE_DIR}/modules/worldengine/deps/libmpq - ${CMAKE_SOURCE_DIR}/modules/worldengine/deps/g3dlite/include - ${ACE_INCLUDE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR} -) - -if( WIN32 ) - set(include_Base - ${include_Base} - ${CMAKE_SOURCE_DIR}/modules/worldengine/deps/libmpq/win - ) -endif() - -include_directories(${include_Base}) - -add_executable(MeshExtractor ${meshExtract_Sources}) - -target_link_libraries(MeshExtractor - g3dlib - mpq - Recast - Detour - ${BZIP2_LIBRARIES} - ${ZLIB_LIBRARIES} - ${ACE_LIBRARY} -) - -if( UNIX ) - install(TARGETS MeshExtractor DESTINATION bin) -elseif( WIN32 ) - install(TARGETS MeshExtractor DESTINATION "${CMAKE_INSTALL_PREFIX}") -endif() diff --git a/modules/acore/extractors/mesh_extractor/Cache.h b/modules/acore/extractors/mesh_extractor/Cache.h deleted file mode 100644 index dafed276ec..0000000000 --- a/modules/acore/extractors/mesh_extractor/Cache.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (C) - * - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#ifndef CACHE_H -#define CACHE_H -#include -#include -#include "Define.h" -#include -#include -#include "WorldModelRoot.h" -#include "Model.h" - -template -class GenericCache -{ -public: - GenericCache() {} - - static const uint32 FlushLimit = 300; // We can't get too close to filling up all the memory, and we have to be wary of the maximum number of open streams. - - void Insert(K key, T* val) - { - ACE_GUARD(ACE_Thread_Mutex, g, mutex); - - if (_items.size() > FlushLimit) - Clear(); - _items[key] = val; - } - - T* Get(K key) - { - ACE_GUARD_RETURN(ACE_Thread_Mutex, g, mutex, NULL); - typename std::map::iterator itr = _items.find(key); - if (itr != _items.end()) - return itr->second; - return NULL; - } - - void Clear() - { - for (typename std::map::iterator itr = _items.begin(); itr != _items.end(); ++itr) - delete itr->second; - _items.clear(); - } -private: - std::map _items; - ACE_Thread_Mutex mutex; -}; - -class CacheClass -{ -public: - CacheClass() {} - GenericCache ModelCache; - GenericCache WorldModelCache; - - void Clear() - { - ModelCache.Clear(); - WorldModelCache.Clear(); - } -}; - -extern CacheClass* Cache; -#endif diff --git a/modules/acore/extractors/mesh_extractor/Chunk.cpp b/modules/acore/extractors/mesh_extractor/Chunk.cpp deleted file mode 100644 index cad81d03ae..0000000000 --- a/modules/acore/extractors/mesh_extractor/Chunk.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (C) - * - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#include "Chunk.h" -#include "Utils.h" - -int32 Chunk::FindSubChunkOffset(std::string name) -{ - // Reverse the name - name = std::string(name.rbegin(), name.rend()); - if (name.size() != 4) - return -1; - - FILE* stream = GetStream(); - uint32 matched = 0; - while (uint32(ftell(stream)) < Utils::Size(stream)) - { - char b = 0; - if (fread(&b, sizeof(char), 1, stream) != 1 || b != name[matched]) - matched = 0; - else - ++matched; - - if (matched == 4) - return ftell(stream) - 4; - } - return -1; -} - -FILE* Chunk::GetStream() -{ - fseek(Stream, Offset, SEEK_SET); - return Stream; -} diff --git a/modules/acore/extractors/mesh_extractor/Chunk.h b/modules/acore/extractors/mesh_extractor/Chunk.h deleted file mode 100644 index 4b2317d656..0000000000 --- a/modules/acore/extractors/mesh_extractor/Chunk.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (C) - * - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#ifndef CHUNK_H -#define CHUNK_H -#include "Define.h" -#include -class ChunkedData; - -class Chunk -{ -public: - Chunk(const char* name, uint32 length, uint32 offset, FILE* stream) : Name(name), Length(length), Offset(offset), Stream(stream) {} - - int32 FindSubChunkOffset(std::string name); - FILE* GetStream(); - std::string Name; - uint32 Length; - uint32 Offset; - FILE* Stream; -}; - -#endif \ No newline at end of file diff --git a/modules/acore/extractors/mesh_extractor/ChunkedData.cpp b/modules/acore/extractors/mesh_extractor/ChunkedData.cpp deleted file mode 100644 index 8b9ddd186c..0000000000 --- a/modules/acore/extractors/mesh_extractor/ChunkedData.cpp +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (C) - * - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#include "ChunkedData.h" -#include "MPQManager.h" -#include "Utils.h" - -#include - -ChunkedData::ChunkedData( FILE* stream, uint32 maxLength, uint32 chunksHint /*= 300*/ ) : -Stream(stream) -{ - if (!Stream) - return; - Load(maxLength, chunksHint); -} - -ChunkedData::ChunkedData( const std::string& file, uint32 chunksHint /*= 300*/ ) -{ - Stream = MPQHandler->GetFile(file); - if (!Stream) - return; - Load(0, chunksHint); -} - -void ChunkedData::Load( uint32 maxLength, uint32 chunksHint ) -{ - if (!maxLength) - maxLength = Utils::Size(Stream); - Chunks.reserve(chunksHint); - uint32 baseOffset = ftell(Stream); - uint32 calcOffset = 0; - while ((calcOffset + baseOffset) < Utils::Size(Stream) && (calcOffset < maxLength)) - { - char nameBytes[5]; - uint32 read = fread(&nameBytes, sizeof(char), 4, Stream); - nameBytes[read] = '\0'; - std::string name = std::string(nameBytes); - // Utils::Reverse(nameBytes); - name = std::string(name.rbegin(), name.rend()); - uint32 length; - if (fread(&length, sizeof(uint32), 1, Stream) != 1) - continue; - calcOffset += 8; - Chunks.push_back(new Chunk(name.c_str(), length, calcOffset + baseOffset, Stream)); - calcOffset += length; - // save an extra seek at the end - if ((calcOffset + baseOffset) < Utils::Size(Stream) && calcOffset < maxLength) - fseek(Stream, length, SEEK_CUR); - } -} - -int ChunkedData::GetFirstIndex( const std::string& name ) -{ - for (uint32 i = 0; i < Chunks.size(); ++i) - if (Chunks[i]->Name == name) - return i; - return -1; -} - -Chunk* ChunkedData::GetChunkByName( const std::string& name ) -{ - for (uint32 i = 0; i < Chunks.size(); ++i) - if (Chunks[i]->Name == name) - return Chunks[i]; - return NULL; -} - -ChunkedData::~ChunkedData() -{ - for (std::vector::iterator itr = Chunks.begin(); itr != Chunks.end(); ++itr) - delete *itr; - - Chunks.clear(); - if (Stream) - fclose(Stream); -} diff --git a/modules/acore/extractors/mesh_extractor/ChunkedData.h b/modules/acore/extractors/mesh_extractor/ChunkedData.h deleted file mode 100644 index 74a8b7a443..0000000000 --- a/modules/acore/extractors/mesh_extractor/ChunkedData.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) - * - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#ifndef CHNK_H -#define CHNK_H - -#include -#include "Chunk.h" - -class ChunkedData -{ -public: - ChunkedData(FILE* stream, uint32 maxLength, uint32 chunksHint = 300); - ChunkedData(const std::string &file, uint32 chunksHint = 300); - ~ChunkedData(); - - int GetFirstIndex(const std::string& name); - Chunk* GetChunkByName(const std::string& name); - - void Load(uint32 maxLength, uint32 chunksHint); - std::vector Chunks; - FILE* Stream; -}; -#endif \ No newline at end of file diff --git a/modules/acore/extractors/mesh_extractor/Constants.h b/modules/acore/extractors/mesh_extractor/Constants.h deleted file mode 100644 index f34cf01fd5..0000000000 --- a/modules/acore/extractors/mesh_extractor/Constants.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (C) - * - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#ifndef CONSTANTS_H -#define CONSTANTS_H - -class Constants -{ -public: - enum TriangleType - { - TRIANGLE_TYPE_UNKNOWN, - TRIANGLE_TYPE_TERRAIN, - TRIANGLE_TYPE_WATER, - TRIANGLE_TYPE_DOODAD, - TRIANGLE_TYPE_WMO - }; - - enum PolyArea - { - POLY_AREA_TERRAIN = 1, - POLY_AREA_WATER = 2, - POLY_AREA_ROAD = 3, - POLY_AREA_DANGER = 4, - }; - - enum PolyFlag - { - POLY_FLAG_WALK = 1, - POLY_FLAG_SWIM = 2, - POLY_FLAG_FLIGHTMASTER = 4 - }; - - enum ExtractFlags - { - EXTRACT_FLAG_DBC = 0x01, - EXTRACT_FLAG_MAPS = 0x02, - EXTRACT_FLAG_VMAPS = 0x04, - EXTRACT_FLAG_GOB_MODELS = 0x08, - EXTRACT_FLAG_MMAPS = 0x10, - EXTRACT_FLAG_TEST = 0x20, - EXTRACT_FLAG_ALLOWED = EXTRACT_FLAG_DBC | EXTRACT_FLAG_MAPS | EXTRACT_FLAG_VMAPS | EXTRACT_FLAG_GOB_MODELS | EXTRACT_FLAG_MMAPS | EXTRACT_FLAG_TEST - }; - - static const float TileSize; - static const float MaxXY; - static const float ChunkSize; - static const float UnitSize; - static const float Origin[]; - static const float PI; - static const float MaxStandableHeight; - static bool ToWoWCoords; - static bool Debug; - static const char* VMAPMagic; - static const float BaseUnitDim; - static const int VertexPerMap; - static const int VertexPerTile; - static const int TilesPerMap; -}; - -#endif \ No newline at end of file diff --git a/modules/acore/extractors/mesh_extractor/ContinentBuilder.cpp b/modules/acore/extractors/mesh_extractor/ContinentBuilder.cpp deleted file mode 100644 index 123d4efe02..0000000000 --- a/modules/acore/extractors/mesh_extractor/ContinentBuilder.cpp +++ /dev/null @@ -1,203 +0,0 @@ -/* - * Copyright (C) - * - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#include "ContinentBuilder.h" -#include "TileBuilder.h" -#include "WDT.h" -#include "Utils.h" -#include "DetourNavMesh.h" -#include "Cache.h" -#include "ace/Task.h" -#include "Recast.h" -#include "DetourCommon.h" - -class BuilderThread : public ACE_Task_Base -{ -private: - int X, Y, MapId; - std::string Continent; - dtNavMeshParams Params; - ContinentBuilder* cBuilder; -public: - BuilderThread(ContinentBuilder* _cBuilder, dtNavMeshParams& params) : Params(params), cBuilder(_cBuilder), Free(true) {} - - void SetData(int x, int y, int map, const std::string& cont) - { - X = x; - Y = y; - MapId = map; - Continent = cont; - } - - int svc() - { - Free = false; - printf("[%02i,%02i] Building tile\n", X, Y); - TileBuilder builder(cBuilder, Continent, X, Y, MapId); - char buff[100]; - sprintf(buff, "mmaps/%03u%02i%02i.mmtile", MapId, Y, X); - FILE* f = fopen(buff, "r"); - if (f) // Check if file already exists. - { - printf("[%02i,%02i] Tile skipped, file already exists\n", X, Y); - fclose(f); - Free = true; - return 0; - } - uint8* nav = builder.BuildTiled(Params); - if (nav) - { - f = fopen(buff, "wb"); - if (!f) - { - printf("Could not create file %s. Check that you have write permissions to the destination folder and try again\n", buff); - return 0; - } - MmapTileHeader header; - header.size = builder.DataSize; - fwrite(&header, sizeof(MmapTileHeader), 1, f); - fwrite(nav, sizeof(unsigned char), builder.DataSize, f); - fclose(f); - } - dtFree(nav); - printf("[%02i,%02i] Tile Built!\n", X, Y); - Free = true; - return 0; - } - - bool Free; -}; - -void ContinentBuilder::getTileBounds(uint32 tileX, uint32 tileY, float* verts, int vertCount, float* bmin, float* bmax) -{ - // this is for elevation - if (verts && vertCount) - rcCalcBounds(verts, vertCount, bmin, bmax); - else - { - bmin[1] = FLT_MIN; - bmax[1] = FLT_MAX; - } - - // this is for width and depth - bmax[0] = (32 - int(tileX)) * Constants::TileSize; - bmax[2] = (32 - int(tileY)) * Constants::TileSize; - bmin[0] = bmax[0] - Constants::TileSize; - bmin[2] = bmax[2] - Constants::TileSize; -} - -void ContinentBuilder::CalculateTileBounds() -{ - for (std::vector::iterator itr = TileMap->TileTable.begin(); itr != TileMap->TileTable.end(); ++itr) - { - tileXMax = std::max(itr->X, tileXMax); - tileXMin = std::min(itr->X, tileXMin); - - tileYMax = std::max(itr->Y, tileYMax); - tileYMin = std::min(itr->Y, tileYMin); - } - getTileBounds(tileXMax, tileYMax, NULL, 0, bmin, bmax); -} - -void ContinentBuilder::Build() -{ - char buff[50]; - sprintf(buff, "mmaps/%03u.mmap", MapId); - FILE* mmap = fopen(buff, "wb"); - if (!mmap) - { - printf("Could not create file %s. Check that you have write permissions to the destination folder and try again\n", buff); - return; - } - - CalculateTileBounds(); - - dtNavMeshParams params; - - std::vector Threads; - - if (TileMap->IsGlobalModel) - { - printf("Map %s ( %u ) is a WMO. Building with 1 thread.\n", Continent.c_str(), MapId); - - TileBuilder* builder = new TileBuilder(this, Continent, 0, 0, MapId); - builder->AddGeometry(TileMap->Model, TileMap->ModelDefinition); - uint8* nav = builder->BuildInstance(params); - if (nav) - { - // Set some params for the navmesh - dtMeshHeader* header = (dtMeshHeader*)nav; - dtVcopy(params.orig, header->bmin); - params.tileWidth = header->bmax[0] - header->bmin[0]; - params.tileHeight = header->bmax[2] - header->bmin[2]; - params.maxTiles = 1; - params.maxPolys = header->polyCount; - fwrite(¶ms, sizeof(dtNavMeshParams), 1, mmap); - fclose(mmap); - - char buff[100]; - sprintf(buff, "mmaps/%03u%02i%02i.mmtile", MapId, 0, 0); - FILE* f = fopen(buff, "wb"); - if (!f) - { - printf("Could not create file %s. Check that you have write permissions to the destination folder and try again\n", buff); - return; - } - - MmapTileHeader mheader; - mheader.size = builder->DataSize; - fwrite(&mheader, sizeof(MmapTileHeader), 1, f); - fwrite(nav, sizeof(unsigned char), builder->DataSize, f); - fclose(f); - } - - dtFree(nav); - delete builder; - } - else - { - params.maxPolys = 32768; - params.maxTiles = 4096; - rcVcopy(params.orig, Constants::Origin); - params.tileHeight = Constants::TileSize; - params.tileWidth = Constants::TileSize; - fwrite(¶ms, sizeof(dtNavMeshParams), 1, mmap); - fclose(mmap); - - for (uint32 i = 0; i < NumberOfThreads; ++i) - Threads.push_back(new BuilderThread(this, params)); - printf("Map %s ( %u ) has %u tiles. Building them with %u threads\n", Continent.c_str(), MapId, uint32(TileMap->TileTable.size()), NumberOfThreads); - for (std::vector::iterator itr = TileMap->TileTable.begin(); itr != TileMap->TileTable.end(); ++itr) - { - bool next = false; - while (!next) - { - for (std::vector::iterator _th = Threads.begin(); _th != Threads.end(); ++_th) - { - if ((*_th)->Free) - { - (*_th)->SetData(itr->X, itr->Y, MapId, Continent); - (*_th)->activate(); - next = true; - break; - } - } - // Wait for 20 seconds - ACE_OS::sleep(ACE_Time_Value (0, 20000)); - } - } - } - - Cache->Clear(); - - // Free memory - for (std::vector::iterator _th = Threads.begin(); _th != Threads.end(); ++_th) - { - (*_th)->wait(); - delete *_th; - } -} diff --git a/modules/acore/extractors/mesh_extractor/ContinentBuilder.h b/modules/acore/extractors/mesh_extractor/ContinentBuilder.h deleted file mode 100644 index b8c07aee09..0000000000 --- a/modules/acore/extractors/mesh_extractor/ContinentBuilder.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) - * - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#ifndef CONT_BUILDER_H -#define CONT_BUILDER_H -#include -#include "WDT.h" -#include "Define.h" - -class ContinentBuilder -{ -public: - ContinentBuilder(std::string continent, uint32 mapId, WDT* wdt, uint32 tn) : - Continent(continent), TileMap(wdt), MapId(mapId), - NumberOfThreads(tn), tileXMin(64), tileYMin(64), tileXMax(0), tileYMax(0) - {} - - void Build(); - void getTileBounds(uint32 tileX, uint32 tileY, float* verts, int vertCount, float* bmin, float* bmax); - void CalculateTileBounds(); - float bmin[3]; - float bmax[3]; -private: - std::string Continent; - WDT* TileMap; - uint32 MapId; - uint32 NumberOfThreads; - int tileXMin; - int tileYMin; - int tileXMax; - int tileYMax; -}; -#endif diff --git a/modules/acore/extractors/mesh_extractor/DBC.cpp b/modules/acore/extractors/mesh_extractor/DBC.cpp deleted file mode 100644 index 2ecf21e813..0000000000 --- a/modules/acore/extractors/mesh_extractor/DBC.cpp +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (C) - * - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#include -#include "DBC.h" -#include "Define.h" - -DBC::DBC( FILE* stream ) : StringBlock(NULL), StringBlockSize(0), IsFaulty(true) -{ - char magic[5]; - uint32 count = 0; - count += fread(&magic, sizeof(char), 4, stream); - magic[4] = '\0'; - count += fread(&RecordCount, sizeof(uint32), 1, stream); - Records.reserve(RecordCount); - count += fread(&Fields, sizeof(uint32), 1, stream); - count += fread(&RecordSize, sizeof(uint32), 1, stream); - count += fread(&StringBlockSize, sizeof(uint32), 1, stream); - if (count != 8) - printf("DBC::DBC: Failed to read some data expected 8, read %u\n", count); - - for (int i = 0; i < RecordCount; i++) - { - Record* rec = new Record(this); - Records.push_back(rec); - int size = 0; - for (int f = 0; f < Fields; f++) - { - if (size + 4 > RecordSize) - { - IsFaulty = true; - break; - } - uint32 tmp; - if (fread(&tmp, sizeof(uint32), 1, stream) != 1) - printf("DBC::DBC: Failed to read some data expected 1, read 0\n"); - rec->Values.push_back(tmp); - size += 4; - } - } - StringBlock = new uint8[StringBlockSize]; - count = fread(StringBlock, sizeof(uint8), StringBlockSize, stream); - if (count != StringBlockSize) - printf("DBC::DBC: Failed to read some data expected %u, read %u\n", StringBlockSize, count); -} - -std::string DBC::GetStringByOffset( int offset ) -{ - int len = 0; - for (uint32 i = offset; i < StringBlockSize; i++) - { - if (!StringBlock[i]) - { - len = (i - offset); - break; - } - } - char* d = new char[len+1]; - strcpy(d, (const char*)(StringBlock + offset)); - d[len] = '\0'; - std::string val = std::string(d); - delete [] d; - return val; -} - -Record* DBC::GetRecordById( int id ) -{ - // we assume Id is index 0 - for (std::vector::iterator itr = Records.begin(); itr != Records.end(); ++itr) - if ((*itr)->Values[0] == id) - return *itr; - return NULL; -} diff --git a/modules/acore/extractors/mesh_extractor/DBC.h b/modules/acore/extractors/mesh_extractor/DBC.h deleted file mode 100644 index 8521f6111b..0000000000 --- a/modules/acore/extractors/mesh_extractor/DBC.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (C) - * - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#ifndef DBC_H -#define DBC_H -#include -#include -#include "Define.h" - -class Record; - -class DBC -{ -public: - DBC(FILE* stream); - - std::string GetStringByOffset(int offset); - - Record* GetRecordById(int id); - - std::string Name; - std::vector Records; - int RecordCount; - int Fields; - int RecordSize; - uint8* StringBlock; - uint32 StringBlockSize; - bool IsFaulty; -}; - -class Record -{ -public: - Record(DBC* dbc) : Source(dbc) {} - - DBC* Source; - std::vector Values; - - int operator[](int index) - { - return Values[index]; - } - - template - T GetValue(int index) - { - return *(T*)(&Values[index]); - } - - std::string GetString(int index) - { - return Source->GetStringByOffset(Values[index]); - } -}; - -#endif \ No newline at end of file diff --git a/modules/acore/extractors/mesh_extractor/DoodadHandler.cpp b/modules/acore/extractors/mesh_extractor/DoodadHandler.cpp deleted file mode 100644 index 67b4ae567a..0000000000 --- a/modules/acore/extractors/mesh_extractor/DoodadHandler.cpp +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright (C) - * - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#include "DoodadHandler.h" -#include "Chunk.h" -#include "Cache.h" -#include "Model.h" -#include "G3D/Matrix4.h" - -DoodadHandler::DoodadHandler( ADT* adt ) : - ObjectDataHandler(adt), _definitions(NULL), _paths(NULL) -{ - Chunk* mddf = adt->ObjectData->GetChunkByName("MDDF"); - if (mddf) - ReadDoodadDefinitions(mddf); - - Chunk* mmid = adt->ObjectData->GetChunkByName("MMID"); - Chunk* mmdx = adt->ObjectData->GetChunkByName("MMDX"); - if (mmid && mmdx) - ReadDoodadPaths(mmid, mmdx); -} - -void DoodadHandler::ProcessInternal( MapChunk* mcnk ) -{ - if (!IsSane()) - return; - - uint32 refCount = mcnk->Header.DoodadRefs; - FILE* stream = mcnk->Source->GetStream(); - fseek(stream, mcnk->Source->Offset + mcnk->Header.OffsetMCRF, SEEK_SET); - for (uint32 i = 0; i < refCount; i++) - { - int32 index; - int32 count; - if ((count = fread(&index, sizeof(int32), 1, stream)) != 1) - printf("DoodadHandler::ProcessInternal: Failed to read some data expected 1, read %d\n", count); - if (index < 0 || uint32(index) >= _definitions->size()) - continue; - DoodadDefinition doodad = (*_definitions)[index]; - if (_drawn.find(doodad.UniqueId) != _drawn.end()) - continue; - _drawn.insert(doodad.UniqueId); - if (doodad.MmidIndex >= _paths->size()) - continue; - - std::string path = (*_paths)[doodad.MmidIndex]; - Model* model = Cache->ModelCache.Get(path); - if (!model) - { - model = new Model(path); - Cache->ModelCache.Insert(path, model); - } - if (!model->IsCollidable) - continue; - - Vertices.reserve(refCount * model->Vertices.size() * 0.2); - Triangles.reserve(refCount * model->Triangles.size() * 0.2); - - InsertModelGeometry(doodad, model); - } - // Restore the stream position - fseek(stream, mcnk->Source->Offset, SEEK_SET); -} - -void DoodadHandler::ReadDoodadDefinitions( Chunk* chunk ) -{ - int32 count = chunk->Length / 36; - _definitions = new std::vector; - _definitions->reserve(count); - FILE* stream = chunk->GetStream(); - for (int i = 0; i < count; i++) - { - DoodadDefinition def; - def.Read(stream); - _definitions->push_back(def); - } -} - -void DoodadHandler::ReadDoodadPaths( Chunk* id, Chunk* data ) -{ - int paths = id->Length / 4; - _paths = new std::vector(); - _paths->reserve(paths); - for (int i = 0; i < paths; i++) - { - FILE* idStream = id->GetStream(); - fseek(idStream, i * 4, SEEK_CUR); - uint32 offset; - if (fread(&offset, sizeof(uint32), 1, idStream) != 1) - printf("DoodadHandler::ReadDoodadPaths: Failed to read some data expected 1, read 0\n"); - FILE* dataStream = data->GetStream(); - fseek(dataStream, offset + data->Offset, SEEK_SET); - _paths->push_back(Utils::ReadString(dataStream)); - } -} - -void DoodadHandler::InsertModelGeometry(const DoodadDefinition& def, Model* model) -{ - uint32 vertOffset = Vertices.size(); - - for (std::vector::iterator itr = model->Vertices.begin(); itr != model->Vertices.end(); ++itr) - Vertices.push_back(Utils::TransformDoodadVertex(def, *itr)); // Vertices have to be converted based on the information from the DoodadDefinition struct - - for (std::vector >::iterator itr = model->Triangles.begin(); itr != model->Triangles.end(); ++itr) - Triangles.push_back(Triangle(Constants::TRIANGLE_TYPE_DOODAD, itr->V0 + vertOffset, itr->V1 + vertOffset, itr->V2 + vertOffset)); -} - -DoodadHandler::~DoodadHandler() -{ - delete _definitions; - delete _paths; -} diff --git a/modules/acore/extractors/mesh_extractor/DoodadHandler.h b/modules/acore/extractors/mesh_extractor/DoodadHandler.h deleted file mode 100644 index 319010f092..0000000000 --- a/modules/acore/extractors/mesh_extractor/DoodadHandler.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (C) - * - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#ifndef DOOADHNDL_H -#define DOOADHNDL_H -#include "ObjectDataHandler.h" -#include "Utils.h" -#include "Chunk.h" -#include "Model.h" -#include -#include - -class DoodadDefinition : public IDefinition -{ -public: - uint32 MmidIndex; - uint32 UniqueId; - uint16 DecimalScale; - uint16 Flags; - - virtual float Scale() const { return DecimalScale / 1024.0f; } - - Vector3 FixCoords(Vector3& vec) - { - return Vector3(vec.z, vec.x, vec.y); - } - - void Read(FILE* stream) - { - int count = 0; - - count += fread(&MmidIndex, sizeof(uint32), 1, stream); - count += fread(&UniqueId, sizeof(uint32), 1, stream); - Position = (Vector3::Read(stream)); - Rotation = Vector3::Read(stream); - count += fread(&DecimalScale, sizeof(uint16), 1, stream); - count += fread(&Flags, sizeof(uint16), 1, stream); - if (count != 4) - printf("DoodadDefinition::Read: Failed to read some data expected 4, read %d\n", count); - } -}; - -class DoodadHandler : public ObjectDataHandler -{ -public: - DoodadHandler(ADT* adt); - ~DoodadHandler(); - - std::vector Vertices; - std::vector > Triangles; - bool IsSane() { return _definitions && _paths; } - - -protected: - void ProcessInternal(MapChunk* chunk); - -private: - void ReadDoodadDefinitions(Chunk* chunk); - void ReadDoodadPaths(Chunk* id, Chunk* data); - void InsertModelGeometry(const DoodadDefinition& def, Model* model); - std::set _drawn; - std::vector* _definitions; - std::vector* _paths; -}; -#endif diff --git a/modules/acore/extractors/mesh_extractor/Geometry.cpp b/modules/acore/extractors/mesh_extractor/Geometry.cpp deleted file mode 100644 index 23105306cf..0000000000 --- a/modules/acore/extractors/mesh_extractor/Geometry.cpp +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Copyright (C) - * - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#include "Geometry.h" -#include "Constants.h" -#include "ADT.h" -#include "WorldModelHandler.h" -#include "DoodadHandler.h" -#include - -Geometry::Geometry() : Transform(false) -{ - Vertices.reserve(10000); - Triangles.reserve(10000); -} - -void Geometry::CalculateBoundingBox( float*& min, float*& max ) -{ - min = new float[3]; - max = new float[3]; - for (int i = 0; i < 3; ++i) - { - max[i] = std::numeric_limits::min(); - min[i] = std::numeric_limits::max(); - } - - for (std::vector::iterator itr = Vertices.begin(); itr != Vertices.end(); ++itr) - { - if (itr->x > max[0]) - max[0] = itr->x; - if (itr->x < min[0]) - min[0] = itr->x; - - if (itr->y > max[1]) - max[1] = itr->y; - if (itr->y < min[1]) - min[1] = itr->y; - - if (itr->z > max[2]) - max[2] = itr->z; - if (itr->z < min[2]) - min[2] = itr->z; - } -} - -void Geometry::CalculateMinMaxHeight( float& min, float& max ) -{ - min = std::numeric_limits::max(); - max = std::numeric_limits::min(); - - for (std::vector::iterator itr = Vertices.begin(); itr != Vertices.end(); ++itr) - { - if (Transform) - { - if (itr->y < min) - min = itr->y; - if (itr->y > max) - max = itr->y; - } - else - { - if (itr->z < min) - min = itr->z; - if (itr->z > max) - max = itr->z; - } - } -} - -void Geometry::AddData( std::vector& verts, std::vector >& tris ) -{ - uint32 vertOffset = Vertices.size(); - for (std::vector::iterator itr = verts.begin(); itr != verts.end(); ++itr) - Vertices.push_back(Transform ? Utils::ToRecast(*itr) : *itr); - - for (std::vector >::iterator itr = tris.begin(); itr != tris.end(); ++itr) - Triangles.push_back(Triangle(itr->Type, itr->V0 + vertOffset, itr->V1 + vertOffset, itr->V2 + vertOffset)); -} - -void Geometry::GetRawData( float*& verts, int*& tris, uint8*& areas ) -{ - verts = new float[Vertices.size() * 3]; - for (uint32 i = 0; i < Vertices.size(); ++i) - { - Vector3& vert = Vertices[i]; - verts[(i * 3) + 0] = vert.x; - verts[(i * 3) + 1] = vert.y; - verts[(i * 3) + 2] = vert.z; - } - - tris = new int[Triangles.size() * 3]; - for (uint32 i = 0; i < Triangles.size(); ++i) - { - Triangle& tri = Triangles[i]; - tris[(i * 3) + 0] = (int)tri.V0; - tris[(i * 3) + 1] = (int)tri.V1; - tris[(i * 3) + 2] = (int)tri.V2; - } - - areas = new uint8[Triangles.size()]; - for (uint32 i = 0; i < Triangles.size(); i++) - { - switch (Triangles[i].Type) - { - case Constants::TRIANGLE_TYPE_WATER: - areas[i] = Constants::POLY_AREA_WATER; - break; - default: - areas[i] = Constants::POLY_AREA_TERRAIN; - break; - } - } -} - -void Geometry::AddAdt( ADT* adt ) -{ - for (std::vector::iterator itr = adt->MapChunks.begin(); itr != adt->MapChunks.end(); ++itr) - { - std::vector > tmp; - tmp.reserve((*itr)->Triangles.size()); - for (std::vector >::iterator itr2 = (*itr)->Triangles.begin(); itr2 != (*itr)->Triangles.end(); ++itr2) - tmp.push_back(Triangle(itr2->Type, itr2->V0, itr2->V1, itr2->V2)); - AddData((*itr)->Vertices, tmp); - } - - if (!adt->_DoodadHandler->Triangles.empty()) - AddData(adt->_DoodadHandler->Vertices, adt->_DoodadHandler->Triangles); - - if (!adt->_WorldModelHandler->Triangles.empty()) - AddData(adt->_WorldModelHandler->Vertices, adt->_WorldModelHandler->Triangles); -} - diff --git a/modules/acore/extractors/mesh_extractor/Geometry.h b/modules/acore/extractors/mesh_extractor/Geometry.h deleted file mode 100644 index 23f6777119..0000000000 --- a/modules/acore/extractors/mesh_extractor/Geometry.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) - * - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#ifndef GEOMETRY_H -#define GEOMETRY_H -#include - -#include "Utils.h" - -class ADT; -class Geometry -{ -public: - Geometry(); - - void CalculateBoundingBox(float*& min, float*& max); - void CalculateMinMaxHeight(float& min, float& max); - void AddData(std::vector& verts, std::vector >& tris); - void AddAdt(ADT* adt); - void GetRawData(float*& verts, int*& tris, uint8*& areas); - - std::vector Vertices; - std::vector > Triangles; - bool Transform; -}; -#endif \ No newline at end of file diff --git a/modules/acore/extractors/mesh_extractor/LiquidHandler.cpp b/modules/acore/extractors/mesh_extractor/LiquidHandler.cpp deleted file mode 100644 index 22069aedf0..0000000000 --- a/modules/acore/extractors/mesh_extractor/LiquidHandler.cpp +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright (C) - * - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#include "LiquidHandler.h" -#include "Utils.h" - -LiquidHandler::LiquidHandler( ADT* adt ) : Source(adt) -{ - HandleNewLiquid(); -} - -void LiquidHandler::HandleNewLiquid() -{ - Chunk* chunk = Source->Data->GetChunkByName("MH2O"); - if (!chunk) - return; - - Vertices.reserve(1000); - Triangles.reserve(1000); - - FILE* stream = chunk->GetStream(); - H2OHeader header[256]; - MCNKData.reserve(256); - for (int i = 0; i < 256; i++) - header[i] = H2OHeader::Read(stream); - - for (int i = 0; i < 256; i++) - { - H2OHeader h = header[i]; - if (h.LayerCount == 0) - { - // Need to fill in missing data with dummies. - MCNKData.push_back(MCNKLiquidData(NULL, H2ORenderMask())); - continue; - } - fseek(stream, chunk->Offset + h.OffsetInformation, SEEK_SET); - H2OInformation information = H2OInformation::Read(stream); - - float** heights = new float*[9]; - for (int j = 0; j < 9; ++j) - { - heights[j] = new float[9]; - memset(heights[j], 0, sizeof(float) * 9); - } - - H2ORenderMask renderMask; - if (information.LiquidType != 2) - { - fseek(stream, chunk->Offset + h.OffsetRender, SEEK_SET); - renderMask = H2ORenderMask::Read(stream); - if ((Utils::IsAllZero(renderMask.Mask, 8) || (information.Width == 8 && information.Height == 8)) && information.OffsetMask2) - { - fseek(stream, chunk->Offset + information.OffsetMask2, SEEK_SET); - uint32 size = ceil(information.Width * information.Height / 8.0f); - uint8* altMask = new uint8[size]; - if (fread(altMask, sizeof(uint8), size, stream) == size) - for (uint32 mi = 0; mi < size; mi++) - renderMask.Mask[mi + information.OffsetY] |= altMask[mi]; - delete[] altMask; - } - fseek(stream, chunk->Offset + information.OffsetHeightmap, SEEK_SET); - - for (int y = information.OffsetY; y < (information.OffsetY + information.Height); y++) - for (int x = information.OffsetX; x < (information.OffsetX + information.Width); x++) - if (fread(&heights[x][y], sizeof(float), 1, stream) != 1) - return; - } - else - { - // Fill with ocean data - for (uint32 i = 0; i < 8; ++i) - renderMask.Mask[i] = 0xFF; - - for (uint32 y = 0; y < 9; ++y) - for (uint32 x = 0; x < 9; ++x) - heights[x][y] = information.HeightLevel1; - } - - MCNKData.push_back(MCNKLiquidData(heights, renderMask)); - - for (int y = information.OffsetY; y < (information.OffsetY + information.Height); y++) - { - for (int x = information.OffsetX; x < (information.OffsetX + information.Width); x++) - { - if (!renderMask.ShouldRender(x, y)) - continue; - - MapChunk* mapChunk = Source->MapChunks[i]; - Vector3 location = mapChunk->Header.Position; - location.y = location.y - (x * Constants::UnitSize); - location.x = location.x - (y * Constants::UnitSize); - location.z = heights[x][y]; - - uint32 vertOffset = Vertices.size(); - Vertices.push_back(location); - Vertices.push_back(Vector3(location.x - Constants::UnitSize, location.y, location.z)); - Vertices.push_back(Vector3(location.x, location.y - Constants::UnitSize, location.z)); - Vertices.push_back(Vector3(location.x - Constants::UnitSize, location.y - Constants::UnitSize, location.z)); - - Triangles.push_back(Triangle(Constants::TRIANGLE_TYPE_WATER, vertOffset, vertOffset+2, vertOffset + 1)); - Triangles.push_back(Triangle(Constants::TRIANGLE_TYPE_WATER, vertOffset + 2, vertOffset + 3, vertOffset + 1)); - } - } - } -} diff --git a/modules/acore/extractors/mesh_extractor/LiquidHandler.h b/modules/acore/extractors/mesh_extractor/LiquidHandler.h deleted file mode 100644 index bf38514be1..0000000000 --- a/modules/acore/extractors/mesh_extractor/LiquidHandler.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) - * - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#ifndef LIQUID_H -#define LIQUID_H -#include "ADT.h" -#include "Utils.h" -#include "Define.h" - -#include - -class LiquidHandler -{ -public: - LiquidHandler(ADT* adt); - - ADT* Source; - std::vector Vertices; - std::vector > Triangles; - std::vector MCNKData; -private: - void HandleNewLiquid(); -}; -#endif \ No newline at end of file diff --git a/modules/acore/extractors/mesh_extractor/MPQ.cpp b/modules/acore/extractors/mesh_extractor/MPQ.cpp deleted file mode 100644 index 93c5eebb5b..0000000000 --- a/modules/acore/extractors/mesh_extractor/MPQ.cpp +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Copyright (C) - * - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#include "MPQ.h" -#include "MPQManager.h" -#include -#include - -MPQArchive::MPQArchive(const char* filename) -{ - int result = libmpq__archive_open(&mpq_a, filename, -1); - printf("Opening %s\n", filename); - if (result) - { - switch (result) - { - case LIBMPQ_ERROR_OPEN : - printf("Error opening archive '%s': Does file really exist?\n", filename); - break; - case LIBMPQ_ERROR_FORMAT : /* bad file format */ - printf("Error opening archive '%s': Bad file format\n", filename); - break; - case LIBMPQ_ERROR_SEEK : /* seeking in file failed */ - printf("Error opening archive '%s': Seeking in file failed\n", filename); - break; - case LIBMPQ_ERROR_READ : /* Read error in archive */ - printf("Error opening archive '%s': Read error in archive\n", filename); - break; - case LIBMPQ_ERROR_MALLOC : /* maybe not enough memory? :) */ - printf("Error opening archive '%s': Maybe not enough memory\n", filename); - break; - default: - printf("Error opening archive '%s': Unknown error\n", filename); - break; - } - } - GetFileListTo(Files); -} - -void MPQArchive::close() -{ - libmpq__archive_close(mpq_a); -} - -MPQFile::MPQFile(const char* filename): -eof(false), buffer(0), pointer(0), size(0) -{ - for (std::deque::iterator i = MPQHandler->Archives.begin(); i != MPQHandler->Archives.end();++i) - { - mpq_archive* mpq_a = (*i)->mpq_a; - - uint32_t filenum; - if(libmpq__file_number(mpq_a, filename, &filenum)) - continue; - libmpq__off_t transferred; - libmpq__file_unpacked_size(mpq_a, filenum, &size); - - // HACK: in patch.mpq some files don't want to open and give 1 for filesize - if (size<=1) { - // printf("warning: file %s has size %d; cannot Read.\n", filename, size); - eof = true; - buffer = 0; - return; - } - buffer = new char[size]; - - //libmpq_file_getdata - libmpq__file_read(mpq_a, filenum, (unsigned char*)buffer, size, &transferred); - /*libmpq_file_getdata(&mpq_a, hash, fileno, (unsigned char*)buffer);*/ - return; - - } - eof = true; - buffer = 0; -} - -size_t MPQFile::Read(void* dest, size_t bytes) -{ - if (eof) - return 0; - - size_t rpos = pointer + bytes; - if (rpos > size_t(size)) { - bytes = size - pointer; - eof = true; - } - - memcpy(dest, &(buffer[pointer]), bytes); - - pointer = rpos; - - return bytes; -} - -void MPQFile::seek(int offset) -{ - pointer = offset; - eof = (pointer >= size); -} - -void MPQFile::seekRelative(int offset) -{ - pointer += offset; - eof = (pointer >= size); -} - -void MPQFile::close() -{ - delete[] buffer; - buffer = 0; - eof = true; -} - -FILE* MPQFile::GetFileStream() -{ - FILE* file = tmpfile(); - if (!file) - { - printf("Could not create temporary file. Please run as Administrator or root\n"); - exit(1); - } - fwrite(buffer, sizeof(char), size, file); - fseek(file, 0, SEEK_SET); - return file; -} diff --git a/modules/acore/extractors/mesh_extractor/MPQ.h b/modules/acore/extractors/mesh_extractor/MPQ.h deleted file mode 100644 index 7cdab23b3c..0000000000 --- a/modules/acore/extractors/mesh_extractor/MPQ.h +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright (C) - * - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#ifndef MPQ_H -#define MPQ_H - -#include "libmpq/mpq.h" -#include "Define.h" -#include -#include -#include -#include -#include - -class MPQArchive -{ - -public: - mpq_archive_s *mpq_a; - - std::vector Files; - - MPQArchive(const char* filename); - void close(); - - void GetFileListTo(std::vector& filelist) { - uint32_t filenum; - if(libmpq__file_number(mpq_a, "(listfile)", &filenum)) return; - libmpq__off_t size, transferred; - libmpq__file_unpacked_size(mpq_a, filenum, &size); - - char* buffer = new char[size + 1]; - buffer[size] = '\0'; - - libmpq__file_read(mpq_a, filenum, (unsigned char*)buffer, size, &transferred); - - char seps[] = "\n"; - char* token; - - token = strtok( buffer, seps ); - uint32 counter = 0; - while ((token != NULL) && (counter < size)) { - //cout << token << endl; - token[strlen(token) - 1] = 0; - std::string s = token; - filelist.push_back(s); - counter += strlen(token) + 2; - token = strtok(NULL, seps); - } - - delete[] buffer; - } -}; - -class MPQFile -{ - //MPQHANDLE handle; - bool eof; - char *buffer; - libmpq__off_t pointer,size; - - // disable copying - MPQFile(const MPQFile& /*f*/) {} - void operator=(const MPQFile& /*f*/) {} - -public: - MPQFile(const char* filename); // filenames are not case sensitive - ~MPQFile() { close(); } - size_t Read(void* dest, size_t bytes); - FILE* GetFileStream(); - size_t getSize() { return size; } - size_t getPos() { return pointer; } - char* getBuffer() { return buffer; } - char* getPointer() { return buffer + pointer; } - bool isEof() { return eof; } - void seek(int offset); - void seekRelative(int offset); - void close(); -}; - -inline void flipcc(char *fcc) -{ - char t; - t=fcc[0]; - fcc[0]=fcc[3]; - fcc[3]=t; - t=fcc[1]; - fcc[1]=fcc[2]; - fcc[2]=t; -} - -#endif diff --git a/modules/acore/extractors/mesh_extractor/MPQManager.cpp b/modules/acore/extractors/mesh_extractor/MPQManager.cpp deleted file mode 100644 index ffb353edc4..0000000000 --- a/modules/acore/extractors/mesh_extractor/MPQManager.cpp +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Copyright (C) - * - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#include "MPQManager.h" -#include "MPQ.h" -#include "DBC.h" -#include "Utils.h" -#include - -char const* MPQManager::Files[] = { - "common.MPQ", - "common-2.MPQ", - "expansion.MPQ", - "lichking.MPQ", - "patch.MPQ", - "patch-2.MPQ", - "patch-3.MPQ" -}; - -char const* MPQManager::Languages[] = { "enGB", "enUS", "deDE", "esES", "frFR", "koKR", "zhCN", "zhTW", "enCN", "enTW", "esMX", "ruRU" }; - -void MPQManager::Initialize() -{ - InitializeDBC(); - uint32 size = sizeof(Files) / sizeof(char*); - for (uint32 i = 0; i < size; ++i) - { - MPQArchive* arc = new MPQArchive(std::string("Data/" + std::string(Files[i])).c_str()); - Archives.push_front(arc); // MPQ files have to be transversed in reverse order to properly account for patched files - printf("Opened %s\n", Files[i]); - } -} - -void MPQManager::InitializeDBC() -{ - BaseLocale = -1; - std::string fileName; - uint32 size = sizeof(Languages) / sizeof(char*); - MPQArchive* _baseLocale = NULL; - for (uint32 i = 0; i < size; ++i) - { - std::string _fileName = "Data/" + std::string(Languages[i]) + "/locale-" + std::string(Languages[i]) + ".MPQ"; - FILE* file = fopen(_fileName.c_str(), "rb"); - if (file) - { - if (BaseLocale == -1) - { - BaseLocale = i; - _baseLocale = new MPQArchive(_fileName.c_str()); - fileName = _fileName; - LocaleFiles[i] = _baseLocale; - } - else - LocaleFiles[i] = new MPQArchive(_fileName.c_str()); - - AvailableLocales.insert(i); - printf("Detected locale: %s\n", Languages[i]); - } - } - Archives.push_front(_baseLocale); - if (BaseLocale == -1) - { - printf("No locale data detected. Please make sure that the executable is in the same folder as your WoW installation.\n"); - ASSERT(false); - } - else - printf("Using default locale: %s\n", Languages[BaseLocale]); -} - -FILE* MPQManager::GetFile(const std::string& path ) -{ - ACE_GUARD_RETURN(ACE_Thread_Mutex, g, mutex, NULL); - MPQFile file(path.c_str()); - if (file.isEof()) - return NULL; - return file.GetFileStream(); -} - -DBC* MPQManager::GetDBC(const std::string& name ) -{ - std::string path = "DBFilesClient\\" + name + ".dbc"; - return new DBC(GetFile(path)); -} - -FILE* MPQManager::GetFileFrom(const std::string& path, MPQArchive* file ) -{ - ACE_GUARD_RETURN(ACE_Thread_Mutex, g, mutex, NULL); - mpq_archive* mpq_a = file->mpq_a; - - uint32_t filenum; - if(libmpq__file_number(mpq_a, path.c_str(), &filenum)) - return NULL; - - libmpq__off_t transferred; - libmpq__off_t size = 0; - libmpq__file_unpacked_size(mpq_a, filenum, &size); - - // HACK: in patch.mpq some files don't want to open and give 1 for filesize - if (size <= 1) - return NULL; - - uint8* buffer = new uint8[size]; - - //libmpq_file_getdata - libmpq__file_read(mpq_a, filenum, (unsigned char*)buffer, size, &transferred); - - // Pack the return into a FILE stream - FILE* ret = tmpfile(); - if (!ret) - { - printf("Could not create temporary file. Please run as Administrator or root\n"); - exit(1); - } - fwrite(buffer, sizeof(uint8), size, ret); - fseek(ret, 0, SEEK_SET); - delete[] buffer; - return ret; -} diff --git a/modules/acore/extractors/mesh_extractor/MPQManager.h b/modules/acore/extractors/mesh_extractor/MPQManager.h deleted file mode 100644 index 72102e892a..0000000000 --- a/modules/acore/extractors/mesh_extractor/MPQManager.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (C) - * - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#ifndef MPQ_MANAGER_H -#define MPQ_MANAGER_H - -#include "MPQ.h" -#include -#include -#include - -class DBC; -class MPQManager -{ -public: - MPQManager() {} - ~MPQManager() {} - - void Initialize(); - FILE* GetFile(const std::string& path); - FILE* GetFileFrom(const std::string& path, MPQArchive* file); - DBC* GetDBC(const std::string& name); - std::vector GetAllFiles(std::string extension); - - std::deque Archives; - int32 BaseLocale; - std::set AvailableLocales; - std::map LocaleFiles; - - static char const* Files[]; - static char const* Languages[]; -protected: - void InitializeDBC(); -private: - ACE_Thread_Mutex mutex; -}; - -extern MPQManager* MPQHandler; -#endif \ No newline at end of file diff --git a/modules/acore/extractors/mesh_extractor/MapChunk.cpp b/modules/acore/extractors/mesh_extractor/MapChunk.cpp deleted file mode 100644 index ced96f985c..0000000000 --- a/modules/acore/extractors/mesh_extractor/MapChunk.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (C) - * - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#include "MapChunk.h" -#include "ADT.h" -#include "LiquidHandler.h" - -MapChunk::MapChunk( ADT* _adt, Chunk* chunk ) : Adt(_adt), Source(chunk) -{ - FILE* stream = chunk->GetStream(); - Header.Read(stream); - fseek(stream, chunk->Offset, SEEK_SET); - Index = Header.IndexX + Header.IndexY * 16; - GenerateVertices(stream); -} - -void MapChunk::GenerateTriangles() -{ - Triangles.reserve(256); - for (int y = 0; y < 8; y++) - { - for (int x = 0; x < 8; x++) - { - if (HasHole(Header.Holes, x / 2, y / 2)) - continue; - - uint32 topLeft = (17 * y) + x; - uint32 topRight = (17 * y) + x + 1; - uint32 bottomLeft = (17 * (y + 1)) + x; - uint32 bottomRight = (17 * (y + 1)) + x + 1; - uint32 center = (17 * y) + 9 + x; - - Constants::TriangleType triangleType = Constants::TRIANGLE_TYPE_TERRAIN; - if (Adt->_LiquidHandler && !Adt->_LiquidHandler->MCNKData.empty()) - { - MCNKLiquidData& data = Adt->_LiquidHandler->MCNKData[Index]; - float maxHeight = std::max( - std::max( - std::max(std::max(Vertices[topLeft].z, Vertices[topRight].z), Vertices[bottomLeft].z), - Vertices[bottomRight].z), Vertices[center].z); - if (data.IsWater(x, y, maxHeight)) - triangleType = Constants::TRIANGLE_TYPE_WATER; - } - - Triangles.push_back(Triangle(triangleType, topRight, topLeft, center)); - Triangles.push_back(Triangle(triangleType, topLeft, bottomLeft, center)); - Triangles.push_back(Triangle(triangleType, bottomLeft, bottomRight, center)); - Triangles.push_back(Triangle(triangleType, bottomRight, topRight, center)); - } - } -} - -void MapChunk::GenerateVertices( FILE* stream ) -{ - fseek(stream, Header.OffsetMCVT, SEEK_CUR); - Vertices.reserve(125); - - for (int j = 0; j < 17; j++) - { - int values = j % 2 ? 8 : 9; - for (int i = 0; i < values; i++) - { - float tmp; - if (fread(&tmp, sizeof(float), 1, stream) != 1) - printf("MapChunk::GenerateVertices: Failed to read some data expected 1, read 0\n"); - Vector3 vert(Header.Position.x - (j * (Constants::UnitSize * 0.5f)), Header.Position.y - (i * Constants::UnitSize), Header.Position.z + tmp); - if (values == 8) - vert.y -= Constants::UnitSize * 0.5f; - Vertices.push_back(vert); - } - } - // Restore stream position. - fseek(stream, Source->Offset, SEEK_SET); -} - -bool MapChunk::HasHole( uint32 map, int x, int y ) -{ - return (map & 0x0000FFFF) & ((1 << x) << (y << 2)); -} diff --git a/modules/acore/extractors/mesh_extractor/MapChunk.h b/modules/acore/extractors/mesh_extractor/MapChunk.h deleted file mode 100644 index 0db4286f2b..0000000000 --- a/modules/acore/extractors/mesh_extractor/MapChunk.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (C) - * - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#ifndef MAPCHUNK_H -#define MAPCHUNK_H -#include "Chunk.h" -#include "Utils.h" -#include "Constants.h" -#include -class ADT; - -class MapChunk -{ -public: - MapChunk(ADT* _adt, Chunk* chunk); - - void GenerateTriangles(); - void GenerateVertices(FILE* stream); - static bool HasHole(uint32 map, int x, int y); - ADT* Adt; - Chunk* Source; - MapChunkHeader Header; - std::vector Vertices; - std::vector > Triangles; - int32 Index; -}; -#endif \ No newline at end of file diff --git a/modules/acore/extractors/mesh_extractor/MeshExtractor.cpp b/modules/acore/extractors/mesh_extractor/MeshExtractor.cpp deleted file mode 100644 index 22c564cadc..0000000000 --- a/modules/acore/extractors/mesh_extractor/MeshExtractor.cpp +++ /dev/null @@ -1,476 +0,0 @@ -/* - * Copyright (C) - * - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#include "MPQManager.h" -#include "WDT.h" -#include "ContinentBuilder.h" -#include "Cache.h" -#include "DBC.h" -#include "Constants.h" -#include "Model.h" - -#include "Recast.h" -#include "DetourNavMesh.h" -#include "DetourNavMeshQuery.h" - -#include - -#include - -MPQManager* MPQHandler; -CacheClass* Cache; - -void ExtractMMaps(std::set& mapIds, uint32 threads) -{ - DBC* dbc = MPQHandler->GetDBC("Map"); - printf("Map.dbc contains %u rows.\n", dbc->Records.size()); - for (std::vector::iterator itr = dbc->Records.begin(); itr != dbc->Records.end(); ++itr) - { - uint32 mapId = (*itr)->Values[0]; - - // Skip this map if a list of specific maps was provided and this one is not contained in it. - if (!mapIds.empty() && mapIds.find(mapId) == mapIds.end()) - { - if (Constants::Debug) - printf("Map %u will not be built.\n", mapId); - continue; - } - - std::string name = (*itr)->GetString(1); - WDT wdt("World\\maps\\" + name + "\\" + name + ".wdt"); - if (!wdt.IsValid) - { - printf("Could not find WDT data for map %u (%s)\n", mapId, name.c_str()); - continue; - } - printf("Building %s MapId %u\n", name.c_str(), mapId); - ContinentBuilder builder(name, mapId, &wdt, threads); - builder.Build(); - } -} - -void ExtractDBCs() -{ - printf("Extracting DBCs\n"); - // Create the file system structure - std::string baseDBCPath = "dbc/"; - Utils::CreateDir(baseDBCPath); - - std::set DBCFiles; - const size_t extLen = strlen(".dbc"); - // Populate list of DBC files - // We get the DBC names by going over the (guaranteed to exist) default locale files - // Then we look in other locale files in case that they are available. - for (std::vector::iterator itr = MPQHandler->LocaleFiles[MPQHandler->BaseLocale]->Files.begin(); itr != MPQHandler->LocaleFiles[MPQHandler->BaseLocale]->Files.end(); ++itr) - if (itr->rfind(".dbc") == itr->length() - extLen) // Check if the extension is ".dbc" - DBCFiles.insert(*itr); - - const size_t folderLen = strlen("DBFilesClient\\"); - // Iterate over all available locales - for (std::set::iterator itr = MPQHandler->AvailableLocales.begin(); itr != MPQHandler->AvailableLocales.end(); ++itr) - { - printf("Extracting DBCs for locale %s\n", MPQManager::Languages[*itr]); - std::string path = baseDBCPath; - if (*itr != uint32(MPQHandler->BaseLocale)) - { - path += std::string(MPQManager::Languages[*itr]) + "/"; - Utils::CreateDir(path); - } - - std::string component = "component.wow-" + std::string(MPQManager::Languages[*itr]) + ".txt"; - // Extract the component file - Utils::SaveToDisk(MPQHandler->GetFileFrom(component, MPQHandler->LocaleFiles[*itr]), path + component); - // Extract the DBC files for the given locale - for (std::set::iterator itr2 = DBCFiles.begin(); itr2 != DBCFiles.end(); ++itr2) - Utils::SaveToDisk(MPQHandler->GetFileFrom(*itr2, MPQHandler->LocaleFiles[*itr]), path + (itr2->c_str() + folderLen)); - } - printf("DBC extraction finished!\n"); -} - -void ExtractGameobjectModels() -{ - Constants::ToWoWCoords = true; - printf("Extracting GameObject models\n"); - - std::string baseBuildingsPath = "Buildings/"; - std::string baseVmapsPath = "vmaps/"; - Utils::CreateDir(baseVmapsPath); - Utils::CreateDir(baseBuildingsPath); - - FILE* modelList = fopen((baseVmapsPath + "GameObjectModels.list").c_str(), "wb"); - if (!modelList) - { - printf("Could not create file vmaps/GameObjectModels.list, please make sure that you have the write permissions in the folder\n"); - return; - } - - DBC* dbc = MPQHandler->GetDBC("GameObjectDisplayInfo"); - for (std::vector::iterator itr = dbc->Records.begin(); itr != dbc->Records.end(); ++itr) - { - std::string path = (*itr)->GetString(1); - std::string fileName = Utils::GetPlainName(path.c_str()); - std::string extension = Utils::GetExtension(fileName); - // Convert the extension to lowercase - std::transform(extension.begin(), extension.end(), extension.begin(), ::tolower); - if (extension == "mdx" || extension == "m2") - { - fileName = Utils::FixModelPath(fileName); - Model model(path); - - if (model.IsBad) - continue; - - FILE* output = fopen((baseBuildingsPath + fileName).c_str(), "wb"); - if (!output) - { - printf("Could not create file %s, please check that you have write permissions\n", (baseBuildingsPath + fileName).c_str()); - continue; - } - // Placeholder for 0 values - int Nop[12] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - - fwrite(Constants::VMAPMagic, 8, 1, output); - uint32 numVerts = model.Header.CountBoundingVertices; - fwrite(&numVerts, sizeof(uint32), 1, output); - uint32 numGroups = 1; - fwrite(&numGroups, sizeof(uint32), 1, output); - fwrite(Nop, 4 * 3 , 1, output); // rootwmoid, flags, groupid - fwrite(Nop, sizeof(float), 3 * 2, output);//bbox, only needed for WMO currently - fwrite(Nop, 4, 1, output);// liquidflags - fwrite("GRP ", 4, 1, output); - - uint32 branches = 1; - uint32 wsize = sizeof(branches) + sizeof(uint32) * branches; - fwrite(&wsize, sizeof(uint32), 1, output); - fwrite(&branches, sizeof(branches), 1, output); - uint32 numTris = model.Header.CountBoundingTriangles; - fwrite(&numTris, sizeof(uint32), 1, output); - fwrite("INDX", 4, 1, output); - wsize = sizeof(uint32) + sizeof(unsigned short) * numTris; - fwrite(&wsize, sizeof(int), 1, output); - fwrite(&numTris, sizeof(uint32), 1, output); - uint16* indices = new uint16[numTris]; - - if (numTris > 0) - { - uint32 i = 0; - for (std::vector >::iterator itr2 = model.Triangles.begin(); itr2 != model.Triangles.end(); ++itr2, ++i) - { - indices[i * 3 + 0] = itr2->V0; - indices[i * 3 + 1] = itr2->V1; - indices[i * 3 + 2] = itr2->V2; - } - fwrite(indices, sizeof(uint16), numTris, output); - } - - - fwrite("VERT", 4, 1, output); - wsize = sizeof(int) + sizeof(float) * 3 * numVerts; - fwrite(&wsize, sizeof(int), 1, output); - fwrite(&numVerts, sizeof(int), 1, output); - float* vertices = new float[numVerts*3]; - - if (numVerts > 0) - { - uint32 i = 0; - for (std::vector::iterator itr2 = model.Vertices.begin(); itr2 != model.Vertices.end(); ++itr2, ++i) - { - vertices[i * 3 + 0] = itr2->x; - vertices[i * 3 + 1] = itr2->y; - vertices[i * 3 + 2] = itr2->z; - } - - fwrite(vertices, sizeof(float), numVerts * 3, output); - } - - fclose(output); - delete[] indices; - delete[] vertices; - - uint32 displayId = (*itr)->Values[0]; - uint32 pathLength = fileName.size(); - fwrite(&displayId, sizeof(uint32), 1, modelList); - fwrite(&pathLength, sizeof(uint32), 1, modelList); - fwrite(fileName.c_str(), sizeof(char), pathLength, modelList); - } - else if (extension == "wmo") - { - WorldModelRoot model(path); - - FILE* output = fopen((baseBuildingsPath + fileName).c_str(), "wb"); - if (!output) - { - printf("Could not create file %s, please check that you have write permissions\n", (baseBuildingsPath + fileName).c_str()); - continue; - } - - fwrite(Constants::VMAPMagic, 1, 8, output); - uint32 numVertices = 0; - fwrite(&numVertices, sizeof(uint32), 1, output); // will be filled later - fwrite(&model.Header.CountGroups, sizeof(uint32), 1, output); - fwrite(&model.Header.WmoId, sizeof(uint32), 1, output); - - const char grp[] = { 'G' , 'R' , 'P', ' ' }; - for (std::vector::iterator itr2 = model.Groups.begin(); itr2 != model.Groups.end(); ++itr2) - { - const WMOGroupHeader& header = itr2->Header; - fwrite(&header.Flags, sizeof(uint32), 1, output); - fwrite(&header.WmoId, sizeof(uint32), 1, output); - fwrite(&header.BoundingBox[0], sizeof(uint32), 1, output); - fwrite(&header.BoundingBox[1], sizeof(uint32), 1, output); - uint32 LiquidFlags = itr2->HasLiquidData ? 1 : 0; - fwrite(&LiquidFlags, sizeof(uint32), 1, output); - - fwrite(grp, sizeof(char), sizeof(grp), output); - uint32 k = 0; - uint32 mobaBatch = itr2->MOBALength / 12; - uint32* MobaEx = new uint32[mobaBatch*4]; - - for(uint32 i = 8; i < itr2->MOBALength; i += 12) - MobaEx[k++] = itr2->MOBA[i]; - - int mobaSizeGrp = mobaBatch * 4 + 4; - fwrite(&mobaSizeGrp, 4, 1, output); - fwrite(&mobaBatch, 4, 1, output); - fwrite(MobaEx, 4, k, output); - delete[] MobaEx; - - //@TODO: Finish this. - } - - fclose(output); - } - } - - fclose(modelList); - printf("GameObject models extraction finished!"); - Constants::ToWoWCoords = false; -} - -bool HandleArgs(int argc, char** argv, uint32& threads, std::set& mapList, bool& debugOutput, uint32& extractFlags) -{ - char* param = NULL; - extractFlags = 0; - - for (int i = 1; i < argc; ++i) - { - if (strcmp(argv[i], "--threads") == 0) - { - param = argv[++i]; - if (!param) - return false; - - threads = atoi(param); - printf("Using %u threads\n", threads); - } - else if (strcmp(argv[i], "--maps") == 0) - { - param = argv[++i]; - if (!param) - return false; - - char* copy = strdup(param); - char* token = strtok(copy, ","); - while (token) - { - mapList.insert(atoi(token)); - token = strtok(NULL, ","); - } - - free(copy); - - printf("Extracting only provided list of maps (%u).\n", uint32(mapList.size())); - } - else if (strcmp(argv[i], "--debug") == 0) - { - param = argv[++i]; - if (!param) - return false; - debugOutput = atoi(param); - if (debugOutput) - printf("Output will contain debug information (.obj files)\n"); - } - else if (strcmp(argv[i], "--extract") == 0) - { - param = argv[++i]; - if (!param) - return false; - - extractFlags = atoi(param); - - if (!(extractFlags & Constants::EXTRACT_FLAG_ALLOWED)) // Tried to use an invalid flag - return false; - - printf("Detected flags: \n"); - printf("* Extract DBCs: %s\n", (extractFlags & Constants::EXTRACT_FLAG_DBC) ? "Yes" : "No"); - printf("* Extract Maps: %s\n", (extractFlags & Constants::EXTRACT_FLAG_MAPS) ? "Yes" : "No"); - printf("* Extract VMaps: %s\n", (extractFlags & Constants::EXTRACT_FLAG_VMAPS) ? "Yes" : "No"); - printf("* Extract GameObject Models: %s\n", (extractFlags & Constants::EXTRACT_FLAG_GOB_MODELS) ? "Yes" : "No"); - printf("* Extract MMaps: %s\n", (extractFlags & Constants::EXTRACT_FLAG_MMAPS) ? "Yes" : "No"); - } - } - return true; -} - -void PrintUsage() -{ - printf("MeshExtractor help.\n"); - printf("* Use \"--threads \" to specify threads, default to 4 (Only available when extracting MMaps)\n"); - printf("* Use \"--maps a,b,c,d,e\" to extract only the maps specified (Do not use spaces)\n"); - printf("* Use \"--debug 1\" to generate debug information of the tiles (Only available when extracting MMaps)\n"); - printf("* Use \"--extract X\" to extract the data specified by the flag X (Note: You can combine the flags with the bitwise OR operator |). Available flags are: \n"); - { - printf("- %u to extract DBCs\n", Constants::EXTRACT_FLAG_DBC); - printf("- %u to extract Maps (Not yet implemented)\n", Constants::EXTRACT_FLAG_MAPS); - printf("- %u to extract VMaps (Not yet implemented)\n", Constants::EXTRACT_FLAG_VMAPS); - printf("- %u to extract GameObject models (Not yet finished, you need to run VMapAssembler on the extracted files)\n", Constants::EXTRACT_FLAG_GOB_MODELS); - printf("- %u to extract MMaps (Not yet finished)\n", Constants::EXTRACT_FLAG_MMAPS); - } -} - -void LoadTile(dtNavMesh*& navMesh, const char* tile) -{ - FILE* f = fopen(tile, "rb"); - if (!f) - return; - MmapTileHeader header; - - if (fread(&header, sizeof(MmapTileHeader), 1, f) != 1) - return; - - uint8* nav = new uint8[header.size]; - if (fread(nav, header.size, 1, f) != 1) - return; - - navMesh->addTile(nav, header.size, DT_TILE_FREE_DATA, 0, NULL); - - fclose(f); -} - -int main(int argc, char* argv[]) -{ - _setmaxstdio(2048); - uint32 threads = 4, extractFlags = 0; - std::set mapIds; - - if (!HandleArgs(argc, argv, threads, mapIds, Constants::Debug, extractFlags)) - { - PrintUsage(); - return -1; - } - - if (extractFlags == 0) - { - printf("You must provide valid extract flags.\n"); - PrintUsage(); - return -1; - } - - Cache = new CacheClass(); - MPQHandler = new MPQManager(); - MPQHandler->Initialize(); - - if (extractFlags & Constants::EXTRACT_FLAG_DBC) - ExtractDBCs(); - - if (extractFlags & Constants::EXTRACT_FLAG_MMAPS) - ExtractMMaps(mapIds, threads); - - if (extractFlags & Constants::EXTRACT_FLAG_GOB_MODELS) - ExtractGameobjectModels(); - - if (extractFlags & Constants::EXTRACT_FLAG_TEST) - { - float start[] = { 16226.200195f, 16257.000000f, 13.202200f }; - float end[] = { 16245.725586f, 16382.465820f, 47.384956f }; - - // - float m_spos[3]; - m_spos[0] = -start[1]; - m_spos[1] = start[2]; - m_spos[2] = -start[0]; - - // - float m_epos[3]; - m_epos[0] = -end[1]; - m_epos[1] = end[2]; - m_epos[2] = -end[0]; - - // - dtQueryFilter m_filter; - m_filter.setIncludeFlags(Constants::POLY_AREA_ROAD | Constants::POLY_AREA_TERRAIN); - m_filter.setExcludeFlags(Constants::POLY_AREA_WATER); - - // - float m_polyPickExt[3]; - m_polyPickExt[0] = 2.5f; - m_polyPickExt[1] = 2.5f; - m_polyPickExt[2] = 2.5f; - - // - dtPolyRef m_startRef; - dtPolyRef m_endRef; - - FILE* mmap = fopen("mmaps/001.mmap", "rb"); - dtNavMeshParams params; - int count = fread(¶ms, sizeof(dtNavMeshParams), 1, mmap); - fclose(mmap); - if (count != 1) - { - printf("main: Error reading from .mmap\n"); - return 0; - } - - dtNavMesh* navMesh = new dtNavMesh(); - dtNavMeshQuery* navMeshQuery = new dtNavMeshQuery(); - - navMesh->init(¶ms); - for (int i = 0; i <= 32; ++i) - { - for (int j = 0; j <= 32; ++j) - { - char buff[100]; - sprintf(buff, "mmaps/001%02i%02i.mmtile", i, j); - LoadTile(navMesh, buff); - } - } - - navMeshQuery->init(navMesh, 2048); - - float nearestPt[3]; - - navMeshQuery->findNearestPoly(m_spos, m_polyPickExt, &m_filter, &m_startRef, nearestPt); - navMeshQuery->findNearestPoly(m_epos, m_polyPickExt, &m_filter, &m_endRef, nearestPt); - - if ( !m_startRef || !m_endRef ) - { - std::cerr << "Could not find any nearby poly's (" << m_startRef << "," << m_endRef << ")" << std::endl; - return 0; - } - - int hops; - dtPolyRef* hopBuffer = new dtPolyRef[8192]; - dtStatus status = navMeshQuery->findPath(m_startRef, m_endRef, m_spos, m_epos, &m_filter, hopBuffer, &hops, 8192); - - int resultHopCount; - float* straightPath = new float[2048*3]; - unsigned char* pathFlags = new unsigned char[2048]; - dtPolyRef* pathRefs = new dtPolyRef[2048]; - - status = navMeshQuery->findStraightPath(m_spos, m_epos, hopBuffer, hops, straightPath, pathFlags, pathRefs, &resultHopCount, 2048); - std::vector FinalPath; - FinalPath.reserve(resultHopCount); - for (int32 i = 0; i < resultHopCount; ++i) - { - Vector3 finalV = Utils::ToWoWCoords(Vector3(straightPath[i * 3 + 0], straightPath[i * 3 + 1], straightPath[i * 3 + 2])); - FinalPath.push_back(finalV); - printf("Point %f %f %f\n", finalV.x, finalV.y, finalV.z); - } - } - - return 0; -} diff --git a/modules/acore/extractors/mesh_extractor/Model.cpp b/modules/acore/extractors/mesh_extractor/Model.cpp deleted file mode 100644 index d696cb7990..0000000000 --- a/modules/acore/extractors/mesh_extractor/Model.cpp +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (C) - * - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#include "Model.h" -#include "MPQManager.h" -#include "Utils.h" - -Model::Model( std::string path ) : IsCollidable(false), IsBad(false) -{ - Stream = MPQHandler->GetFile(Utils::FixModelPath(path)); - if (!Stream) - { - IsBad = true; - return; - } - Header.Read(Stream); - if (Header.OffsetBoundingNormals > 0 && Header.OffsetBoundingVertices > 0 && - Header.OffsetBoundingTriangles > 0 && Header.BoundingRadius > 0.0f) - { - IsCollidable = true; - ReadVertices(); - ReadBoundingNormals(); - ReadBoundingTriangles(); - } -} - -Model::~Model() -{ - if (Stream) - fclose(Stream); -} - -void Model::ReadVertices() -{ - fseek(Stream, Header.OffsetBoundingVertices, SEEK_SET); - Vertices.reserve(Header.CountBoundingVertices); - for (uint32 i = 0; i < Header.CountBoundingVertices; ++i) - { - Vertices.push_back(Vector3::Read(Stream)); - if (Constants::ToWoWCoords) - Vertices[i] = Utils::ToWoWCoords(Vertices[i]); - } -} - -void Model::ReadBoundingTriangles() -{ - fseek(Stream, Header.OffsetBoundingTriangles, SEEK_SET); - Triangles.reserve(Header.CountBoundingTriangles / 3); - for (uint32 i = 0; i < Header.CountBoundingTriangles / 3; i++) - { - Triangle tri; - tri.Type = Constants::TRIANGLE_TYPE_DOODAD; - int count = 0; - count += fread(&tri.V0, sizeof(uint16), 1, Stream); - count += fread(&tri.V1, sizeof(uint16), 1, Stream); - count += fread(&tri.V2, sizeof(uint16), 1, Stream); - if (count != 3) - printf("Model::ReadBoundingTriangles: Error reading data, expected 3, read %d\n", count); - Triangles.push_back(tri); - } -} - -void Model::ReadBoundingNormals() -{ - fseek(Stream, Header.OffsetBoundingNormals, SEEK_SET); - Normals.reserve(Header.CountBoundingNormals); - for (uint32 i = 0; i < Header.CountBoundingNormals; i++) - Normals.push_back(Vector3::Read(Stream)); -} - diff --git a/modules/acore/extractors/mesh_extractor/Model.h b/modules/acore/extractors/mesh_extractor/Model.h deleted file mode 100644 index 235f518814..0000000000 --- a/modules/acore/extractors/mesh_extractor/Model.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) - * - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#ifndef MODEL_H -#define MODEL_H -#include -#include "Utils.h" - -class Model -{ -public: - Model(std::string path); - ~Model(); - - void ReadVertices(); - void ReadBoundingTriangles(); - void ReadBoundingNormals(); - ModelHeader Header; - std::vector Vertices; - std::vector Normals; - std::vector > Triangles; - bool IsCollidable; - FILE* Stream; - bool IsBad; -}; -#endif \ No newline at end of file diff --git a/modules/acore/extractors/mesh_extractor/ObjectDataHandler.cpp b/modules/acore/extractors/mesh_extractor/ObjectDataHandler.cpp deleted file mode 100644 index a61b3c8564..0000000000 --- a/modules/acore/extractors/mesh_extractor/ObjectDataHandler.cpp +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (C) - * - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#include "ObjectDataHandler.h" -#include "Chunk.h" -#include "ADT.h" -#include "ChunkedData.h" - -void ObjectDataHandler::ProcessMapChunk( MapChunk* chunk ) -{ - ProcessInternal(chunk); -} diff --git a/modules/acore/extractors/mesh_extractor/ObjectDataHandler.h b/modules/acore/extractors/mesh_extractor/ObjectDataHandler.h deleted file mode 100644 index c159c6477e..0000000000 --- a/modules/acore/extractors/mesh_extractor/ObjectDataHandler.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (C) - * - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#ifndef ODATA_HNDL_H -#define ODATA_HNDL_H -#include "ADT.h" -#include "MapChunk.h" - -class ObjectDataHandler -{ -public: - ObjectDataHandler(ADT* _adt) : Source(_adt) {} - - void ProcessMapChunk(MapChunk* chunk); - virtual void ProcessInternal(MapChunk* data) = 0; - ADT* Source; -}; -#endif \ No newline at end of file diff --git a/modules/acore/extractors/mesh_extractor/TileBuilder.cpp b/modules/acore/extractors/mesh_extractor/TileBuilder.cpp deleted file mode 100644 index 156c073cf5..0000000000 --- a/modules/acore/extractors/mesh_extractor/TileBuilder.cpp +++ /dev/null @@ -1,404 +0,0 @@ -/* - * Copyright (C) - * - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#include "ContinentBuilder.h" -#include "TileBuilder.h" -#include "Geometry.h" -#include "WorldModelRoot.h" -#include "Constants.h" -#include "Utils.h" -#include "Cache.h" -#include "ADT.h" -#include "WDT.h" -#include "Recast.h" -#include "RecastAlloc.h" -#include "DetourNavMeshBuilder.h" - -#include - -TileBuilder::TileBuilder(ContinentBuilder* _cBuilder, std::string world, int x, int y, uint32 mapId) : - World(world), X(x), Y(y), MapId(mapId), _Geometry(NULL), DataSize(0), cBuilder(_cBuilder) -{ - // Config for normal maps - memset(&Config, 0, sizeof(rcConfig)); - Config.cs = Constants::TileSize / 1800.0f; // TileSize / voxelSize - Config.ch = 0.3f; - Config.minRegionArea = 36; - Config.mergeRegionArea = 144; - Config.walkableSlopeAngle = 50.0f; - Config.detailSampleDist = 3.0f; - Config.detailSampleMaxError = 1.25f; - Config.walkableClimb = 1.0f / Config.ch; - Config.walkableHeight = 2.1 / Config.ch; - Config.walkableRadius = 0.6f / Config.cs; - Config.maxEdgeLen = Config.walkableRadius * 8; - Config.borderSize = Config.walkableRadius + 8; - Config.tileSize = 1800; - Config.maxSimplificationError = 1.3f; - Config.maxVertsPerPoly = 6; - - // Config for instances - memset(&InstanceConfig, 0, sizeof(rcConfig)); - InstanceConfig.cs = 0.2f; - InstanceConfig.ch = 0.3f; - InstanceConfig.minRegionArea = 25; - InstanceConfig.mergeRegionArea = 100; - InstanceConfig.walkableSlopeAngle = 50.0f; - InstanceConfig.detailSampleDist = 3.0f; - InstanceConfig.detailSampleMaxError = 1.5f; - InstanceConfig.walkableClimb = 1.0f / InstanceConfig.ch; - InstanceConfig.walkableHeight = 2.1f / InstanceConfig.ch; - InstanceConfig.walkableRadius = 0.6f / InstanceConfig.cs; - InstanceConfig.maxEdgeLen = 8 * InstanceConfig.walkableRadius; - InstanceConfig.maxVertsPerPoly = 6; - InstanceConfig.maxSimplificationError = 1.25f; - InstanceConfig.borderSize = 0; - - Context = new rcContext; -} - -void TileBuilder::CalculateTileBounds( float*& bmin, float*& bmax, dtNavMeshParams& /*navMeshParams*/ ) -{ - bmin = new float[3]; - bmax = new float[3]; - bmin[0] = Constants::Origin[0] /*navMeshParams.orig[0]*/ + (Constants::TileSize * X); - bmin[2] = Constants::Origin[2] /*navMeshParams.orig[2]*/ + (Constants::TileSize * Y); - bmax[0] = Constants::Origin[0] /*navMeshParams.orig[0]*/ + (Constants::TileSize * (X + 1)); - bmax[2] = Constants::Origin[2] /*navMeshParams.orig[2]*/ + (Constants::TileSize * (Y + 1)); -} - -void TileBuilder::AddGeometry(WorldModelRoot* root, const WorldModelDefinition& def) -{ - _Geometry = new Geometry(); - _Geometry->Transform = true; - - WorldModelHandler::InsertModelGeometry(_Geometry->Vertices, _Geometry->Triangles, def, root, false); - - OutputDebugVertices(); -} - -uint8* TileBuilder::BuildInstance( dtNavMeshParams& navMeshParams ) -{ - float* bmin = NULL, *bmax = NULL; - - _Geometry->CalculateBoundingBox(bmin, bmax); - - rcVcopy(InstanceConfig.bmax, bmax); - rcVcopy(InstanceConfig.bmin, bmin); - - uint32 numVerts = _Geometry->Vertices.size(); - uint32 numTris = _Geometry->Triangles.size(); - float* vertices; - int* triangles; - uint8* areas; - _Geometry->GetRawData(vertices, triangles, areas); - - // this sets the dimensions of the heightfield - rcCalcGridSize(InstanceConfig.bmin, InstanceConfig.bmax, InstanceConfig.cs, &InstanceConfig.width, &InstanceConfig.height); - - rcHeightfield* hf = rcAllocHeightfield(); - rcCreateHeightfield(Context, *hf, InstanceConfig.width, InstanceConfig.height, InstanceConfig.bmin, InstanceConfig.bmax, InstanceConfig.cs, InstanceConfig.ch); - - rcClearUnwalkableTriangles(Context, InstanceConfig.walkableSlopeAngle, vertices, numVerts, triangles, numTris, areas); - rcRasterizeTriangles(Context, vertices, numVerts, triangles, areas, numTris, *hf, InstanceConfig.walkableClimb); - - rcFilterLowHangingWalkableObstacles(Context, InstanceConfig.walkableClimb, *hf); - rcFilterLedgeSpans(Context, InstanceConfig.walkableHeight, InstanceConfig.walkableClimb, *hf); - rcFilterWalkableLowHeightSpans(Context, InstanceConfig.walkableHeight, *hf); - - rcCompactHeightfield* chf = rcAllocCompactHeightfield(); - rcBuildCompactHeightfield(Context, InstanceConfig.walkableHeight, InstanceConfig.walkableClimb, *hf, *chf); - - rcErodeWalkableArea(Context, InstanceConfig.walkableRadius, *chf); - rcBuildDistanceField(Context, *chf); - rcBuildRegions(Context, *chf, InstanceConfig.borderSize, InstanceConfig.minRegionArea, InstanceConfig.minRegionArea); - - rcContourSet* contours = rcAllocContourSet(); - rcBuildContours(Context, *chf, InstanceConfig.maxSimplificationError, InstanceConfig.maxEdgeLen, *contours); - - rcPolyMesh* pmesh = rcAllocPolyMesh(); - rcBuildPolyMesh(Context, *contours, InstanceConfig.maxVertsPerPoly, *pmesh); - - rcPolyMeshDetail* dmesh = rcAllocPolyMeshDetail(); - rcBuildPolyMeshDetail(Context, *pmesh, *chf, InstanceConfig.detailSampleDist, InstanceConfig.detailSampleMaxError, *dmesh); - - // Set flags according to area types (e.g. Swim for Water) - for (int i = 0; i < pmesh->npolys; i++) - { - if (pmesh->areas[i] == Constants::POLY_AREA_ROAD || pmesh->areas[i] == Constants::POLY_AREA_TERRAIN) - pmesh->flags[i] = Constants::POLY_FLAG_WALK; - else if (pmesh->areas[i] == Constants::POLY_AREA_WATER) - pmesh->flags[i] = Constants::POLY_FLAG_SWIM; - } - - dtNavMeshCreateParams params; - memset(¶ms, 0, sizeof(params)); - // PolyMesh data - params.verts = pmesh->verts; - params.vertCount = pmesh->nverts; - params.polys = pmesh->polys; - params.polyAreas = pmesh->areas; - params.polyFlags = pmesh->flags; - params.polyCount = pmesh->npolys; - params.nvp = pmesh->nvp; - // PolyMeshDetail data - params.detailMeshes = dmesh->meshes; - params.detailVerts = dmesh->verts; - params.detailVertsCount = dmesh->nverts; - params.detailTris = dmesh->tris; - params.detailTriCount = dmesh->ntris; - rcVcopy(params.bmin, pmesh->bmin); - rcVcopy(params.bmax, pmesh->bmax); - // General settings - params.ch = InstanceConfig.ch; - params.cs = InstanceConfig.cs; - params.walkableClimb = InstanceConfig.walkableClimb * InstanceConfig.ch; - params.walkableHeight = InstanceConfig.walkableHeight * InstanceConfig.ch; - params.walkableRadius = InstanceConfig.walkableRadius * InstanceConfig.cs; - params.tileX = X; - params.tileY = Y; - params.tileLayer = 0; - params.buildBvTree = true; - - rcVcopy(params.bmax, bmax); - rcVcopy(params.bmin, bmin); - - // Offmesh-connection settings - params.offMeshConCount = 0; // none for now - - rcFreeHeightField(hf); - rcFreeCompactHeightfield(chf); - rcFreeContourSet(contours); - delete vertices; - delete triangles; - delete areas; - delete bmin; - delete bmax; - - if (!params.polyCount || !params.polys || Constants::TilesPerMap * Constants::TilesPerMap == params.polyCount) - { - // we have flat tiles with no actual geometry - don't build those, its useless - // keep in mind that we do output those into debug info - // drop tiles with only exact count - some tiles may have geometry while having less tiles - printf("No polygons to build on tile, skipping.\n"); - rcFreePolyMesh(pmesh); - rcFreePolyMeshDetail(dmesh); - return NULL; - } - - int navDataSize; - uint8* navData; - printf("Creating the navmesh with %i vertices, %i polys, %i triangles!\n", params.vertCount, params.polyCount, params.detailTriCount); - bool result = dtCreateNavMeshData(¶ms, &navData, &navDataSize); - - rcFreePolyMesh(pmesh); - rcFreePolyMeshDetail(dmesh); - - if (result) - { - printf("NavMesh created, size %i!\n", navDataSize); - DataSize = navDataSize; - return navData; - } - - return NULL; -} - -uint8* TileBuilder::BuildTiled(dtNavMeshParams& navMeshParams) -{ - _Geometry = new Geometry(); - _Geometry->Transform = true; - ADT* adt = new ADT(Utils::GetAdtPath(World, X, Y), X, Y); - adt->Read(); - _Geometry->AddAdt(adt); - delete adt; - - if (_Geometry->Vertices.empty() && _Geometry->Triangles.empty()) - return NULL; - - float* bmin = NULL, *bmax = NULL; - CalculateTileBounds(bmin, bmax, navMeshParams); - _Geometry->CalculateMinMaxHeight(bmin[1], bmax[1]); - - // again, we load everything - wasteful but who cares - for (int ty = Y - 1; ty <= Y + 1; ty++) - { - for (int tx = X - 1; tx <= X + 1; tx++) - { - // don't load main tile again - if (tx == X && ty == Y) - continue; - - ADT* _adt = new ADT(Utils::GetAdtPath(World, tx, ty), tx, ty); - // If this condition is met, it means that this WDT does not contain the ADT - if (!_adt->Data->Stream) - { - delete _adt; - continue; - } - _adt->Read(); - _Geometry->AddAdt(_adt); - delete _adt; - } - } - - OutputDebugVertices(); - - uint32 numVerts = _Geometry->Vertices.size(); - uint32 numTris = _Geometry->Triangles.size(); - float* vertices; - int* triangles; - uint8* areas; - _Geometry->GetRawData(vertices, triangles, areas); - _Geometry->Vertices.clear(); - _Geometry->Triangles.clear(); - - // add border - bmin[0] -= Config.borderSize * Config.cs; - bmin[2] -= Config.borderSize * Config.cs; - bmax[0] += Config.borderSize * Config.cs; - bmax[2] += Config.borderSize * Config.cs; - - rcHeightfield* hf = rcAllocHeightfield(); - int width = Config.tileSize + (Config.borderSize * 2); - rcCreateHeightfield(Context, *hf, width, width, bmin, bmax, Config.cs, Config.ch); - - rcClearUnwalkableTriangles(Context, Config.walkableSlopeAngle, vertices, numVerts, triangles, numTris, areas); - rcRasterizeTriangles(Context, vertices, numVerts, triangles, areas, numTris, *hf, Config.walkableClimb); - - rcFilterLowHangingWalkableObstacles(Context, Config.walkableClimb, *hf); - rcFilterLedgeSpans(Context, Config.walkableHeight, Config.walkableClimb, *hf); - rcFilterWalkableLowHeightSpans(Context, Config.walkableHeight, *hf); - - rcCompactHeightfield* chf = rcAllocCompactHeightfield(); - rcBuildCompactHeightfield(Context, Config.walkableHeight, Config.walkableClimb, *hf, *chf); - - rcErodeWalkableArea(Context, Config.walkableRadius, *chf); - rcBuildDistanceField(Context, *chf); - rcBuildRegions(Context, *chf, Config.borderSize, Config.minRegionArea, Config.mergeRegionArea); - - rcContourSet* contours = rcAllocContourSet(); - rcBuildContours(Context, *chf, Config.maxSimplificationError, Config.maxEdgeLen, *contours); - - rcPolyMesh* pmesh = rcAllocPolyMesh(); - rcBuildPolyMesh(Context, *contours, Config.maxVertsPerPoly, *pmesh); - - rcPolyMeshDetail* dmesh = rcAllocPolyMeshDetail(); - rcBuildPolyMeshDetail(Context, *pmesh, *chf, Config.detailSampleDist, Config.detailSampleMaxError, *dmesh); - - // Set flags according to area types (e.g. Swim for Water) - for (int i = 0; i < pmesh->npolys; i++) - { - if (pmesh->areas[i] == Constants::POLY_AREA_ROAD || pmesh->areas[i] == Constants::POLY_AREA_TERRAIN) - pmesh->flags[i] = Constants::POLY_FLAG_WALK; - else if (pmesh->areas[i] == Constants::POLY_AREA_WATER) - pmesh->flags[i] = Constants::POLY_FLAG_SWIM; - } - - dtNavMeshCreateParams params; - memset(¶ms, 0, sizeof(params)); - // PolyMesh data - params.verts = pmesh->verts; - params.vertCount = pmesh->nverts; - params.polys = pmesh->polys; - params.polyAreas = pmesh->areas; - params.polyFlags = pmesh->flags; - params.polyCount = pmesh->npolys; - params.nvp = pmesh->nvp; - // PolyMeshDetail data - params.detailMeshes = dmesh->meshes; - params.detailVerts = dmesh->verts; - params.detailVertsCount = dmesh->nverts; - params.detailTris = dmesh->tris; - params.detailTriCount = dmesh->ntris; - // General settings - params.ch = Config.ch; - params.cs = Config.cs; - params.walkableClimb = Config.walkableClimb * Config.ch; - params.walkableHeight = Config.walkableHeight * Config.ch; - params.walkableRadius = Config.walkableRadius * Config.cs; - params.tileX = X; - params.tileY = Y; - params.tileLayer = 0; - params.buildBvTree = true; - - // Recalculate the bounds with the added geometry - float* bmin2 = NULL, *bmax2 = NULL; - CalculateTileBounds(bmin2, bmax2, navMeshParams); - bmin2[1] = bmin[1]; - bmax2[1] = bmax[1]; - - rcVcopy(params.bmax, bmax2); - rcVcopy(params.bmin, bmin2); - - // Offmesh-connection settings - params.offMeshConCount = 0; // none for now - - rcFreeHeightField(hf); - rcFreeCompactHeightfield(chf); - rcFreeContourSet(contours); - delete vertices; - delete triangles; - delete areas; - delete bmin; - delete bmax; - - if (!params.polyCount || !params.polys || Constants::TilesPerMap * Constants::TilesPerMap == params.polyCount) - { - // we have flat tiles with no actual geometry - don't build those, its useless - // keep in mind that we do output those into debug info - // drop tiles with only exact count - some tiles may have geometry while having less tiles - printf("[%02i, %02i] No polygons to build on tile, skipping.\n", X, Y); - rcFreePolyMesh(pmesh); - rcFreePolyMeshDetail(dmesh); - return NULL; - } - - int navDataSize; - uint8* navData; - printf("[%02i, %02i] Creating the navmesh with %i vertices, %i polys, %i triangles!\n", X, Y, params.vertCount, params.polyCount, params.detailTriCount); - bool result = dtCreateNavMeshData(¶ms, &navData, &navDataSize); - - rcFreePolyMesh(pmesh); - rcFreePolyMeshDetail(dmesh); - - if (result) - { - printf("[%02i, %02i] NavMesh created, size %i!\n", X, Y, navDataSize); - DataSize = navDataSize; - return navData; - } - - return NULL; -} - -void TileBuilder::OutputDebugVertices() -{ - if (Constants::Debug) - { - char buff[100]; - sprintf(buff, "mmaps/%s_%02u%02u.obj", World.c_str(), Y, X); - FILE* debug = fopen(buff, "wb"); - for (uint32 i = 0; i < _Geometry->Vertices.size(); ++i) - { - const Vector3& vector = _Geometry->Vertices[i]; - fprintf(debug, "v %f %f %f\n", vector.x, vector.y, vector.z); - } - for (uint32 i = 0; i < _Geometry->Triangles.size(); ++i) - { - const Triangle& triangle = _Geometry->Triangles[i]; - fprintf(debug, "f %u %u %u\n", triangle.V0 + 1, triangle.V1 + 1, triangle.V2 + 1); - } - fclose(debug); - } -} - -TileBuilder::~TileBuilder() -{ - delete Context; - delete _Geometry; -} diff --git a/modules/acore/extractors/mesh_extractor/TileBuilder.h b/modules/acore/extractors/mesh_extractor/TileBuilder.h deleted file mode 100644 index 37bb4792c1..0000000000 --- a/modules/acore/extractors/mesh_extractor/TileBuilder.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (C) - * - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#ifndef TILE_BUILD_H -#define TILE_BUILD_H -#include -#include "Recast.h" - -#include "Geometry.h" -#include "WorldModelRoot.h" - -class ContinentBuilder; -class WDT; - -class TileBuilder -{ -public: - TileBuilder(ContinentBuilder* _cBuilder, std::string world, int x, int y, uint32 mapId); - ~TileBuilder(); - - void CalculateTileBounds(float*& bmin, float*& bmax, dtNavMeshParams& navMeshParams); - uint8* BuildTiled(dtNavMeshParams& navMeshParams); - uint8* BuildInstance(dtNavMeshParams& navMeshParams); - void AddGeometry(WorldModelRoot* root, const WorldModelDefinition& def); - void OutputDebugVertices(); - std::string World; - int X; - int Y; - int MapId; - rcConfig Config; - rcConfig InstanceConfig; - rcContext* Context; - Geometry* _Geometry; - uint32 DataSize; - ContinentBuilder* cBuilder; -}; -#endif \ No newline at end of file diff --git a/modules/acore/extractors/mesh_extractor/Utils.cpp b/modules/acore/extractors/mesh_extractor/Utils.cpp deleted file mode 100644 index f568e26cc0..0000000000 --- a/modules/acore/extractors/mesh_extractor/Utils.cpp +++ /dev/null @@ -1,554 +0,0 @@ -/* - * Copyright (C) - * - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#include "Utils.h" -#include "WorldModelHandler.h" -#include "Constants.h" -#include -#include "G3D/Matrix4.h" -#include "G3D/Quat.h" - -#ifdef _WIN32 - #include "direct.h" -#else - #include - #include -#endif - -const float Constants::TileSize = 533.0f + (1/3.0f); -const float Constants::MaxXY = 32.0f * Constants::TileSize; -const float Constants::ChunkSize = Constants::TileSize / 16.0f; -const float Constants::UnitSize = Constants::ChunkSize / 8.0f; -const float Constants::Origin[] = { -Constants::MaxXY, 0.0f, -Constants::MaxXY }; -const float Constants::PI = 3.1415926f; -const float Constants::MaxStandableHeight = 1.5f; -const char* Constants::VMAPMagic = "VMAP041"; -bool Constants::ToWoWCoords = false; -bool Constants::Debug = false; -const float Constants::BaseUnitDim = 0.533333f; -const int Constants::VertexPerMap = (Constants::TileSize / Constants::BaseUnitDim) + 0.5f; -const int Constants::VertexPerTile = 40; -const int Constants::TilesPerMap = Constants::VertexPerMap / Constants::VertexPerTile; - -void Utils::CreateDir( const std::string& Path ) -{ -#ifdef _WIN32 - _mkdir( Path.c_str()); -#else - mkdir( Path.c_str(), 0777 ); -#endif -} - -void Utils::Reverse(char word[]) -{ - int len = strlen(word); - for (int i = 0;i < len / 2; i++) - { - word[i] ^= word[len-i-1]; - word[len-i-1] ^= word[i]; - word[i] ^= word[len-i-1]; - } -} - -std::string Utils::ReadString( FILE* file ) -{ - std::string ret; - while (true) - { - char b; - if (fread(&b, sizeof(char), 1, file) != 1 || b == 0) - break; - ret.push_back(b); - } - return ret; -} - -uint32 Utils::Size( FILE* file ) -{ - // store the old position - uint32 offset = ftell(file); - // Get file size - fseek(file, 0, SEEK_END); - uint32 size = ftell(file); - // reset back to the old position - fseek(file, offset, SEEK_SET); - return size; -} - -Vector3 Utils::ToRecast(const Vector3& val ) -{ - return Vector3(-val.y, val.z, -val.x); -} - -std::string Utils::GetAdtPath(const std::string& world, int x, int y ) -{ - return "World\\Maps\\" + world + "\\" + world + "_" + Utils::ToString(x) + "_" + Utils::ToString(y) + ".adt"; -} - -std::string Utils::FixModelPath(const std::string& path ) -{ - return Utils::GetPathBase(path) + ".M2"; -} - -Vector3 Utils::TransformDoodadVertex(const IDefinition& def, Vector3& vec, bool translate) -{ - // Sources of information: - /// http://www.pxr.dk/wowdev/wiki/index.php?title=ADT/v18&oldid=3715 - - // This function applies to both external doodads and WMOs - - // Rotate our Doodad vertex - G3D::Matrix4 rot = G3D::Matrix3::fromEulerAnglesXYZ(Utils::ToRadians(def.Rotation.z), Utils::ToRadians(-def.Rotation.x), Utils::ToRadians(def.Rotation.y + 180)); - Vector3 ret = Utils::VectorTransform(vec, rot); - - // And finally scale and translate it to our origin - ret = ret * def.Scale(); - if (translate) - ret = ret + Vector3(Constants::MaxXY - def.Position.z, Constants::MaxXY - def.Position.x, def.Position.y); - return ret; -} - -Vector3 Utils::TransformWmoDoodad(const DoodadInstance& inst, const WorldModelDefinition& root, Vector3& vec, bool translate ) -{ - G3D::Quat quat = G3D::Quat(-inst.QuatY, inst.QuatZ, -inst.QuatX, inst.QuatW); - - Vector3 ret = Utils::VectorTransform(vec, G3D::Matrix4(quat.toRotationMatrix())); - ret = ret * (inst.Scale / 1024.0f); - if (translate) - ret = ret + Vector3(Constants::MaxXY - inst.Position.z, Constants::MaxXY - inst.Position.x, inst.Position.y); - return ret; -} - -float Utils::ToRadians( float degrees ) -{ - return Constants::PI * degrees / 180.0f; -} - -Vector3 Utils::VectorTransform(const Vector3& vec, const G3D::Matrix4& matrix, bool normal ) -{ - G3D::Vector3 ret(vec.x, vec.y, vec.z); - ret = matrix.homoMul(ret, normal ? 0 : 1); - return Vector3(ret.x, ret.y, ret.z); -} - -std::string Utils::GetPathBase(const std::string& path ) -{ - size_t lastIndex = path.find_last_of("."); - if (lastIndex != std::string::npos) - return path.substr(0, lastIndex); - return path; -} - -Vector3 Vector3::Read( FILE* file ) -{ - Vector3 ret; - if (fread(&ret, sizeof(Vector3), 1, file) != 1) - printf("Vector3::Read: Failed to read some data expected 1, read 0\n"); - return ret; -} - -Vector3 Utils::GetLiquidVert(const IDefinition& def, Vector3 basePosition, float height, int x, int y, bool translate) -{ - if (Utils::Distance(height, 0.0f) > 0.5f) - basePosition.z = 0.0f; - return Utils::TransformDoodadVertex(def, basePosition + Vector3(x * Constants::UnitSize, y * Constants::UnitSize, height), translate); -} - -float Utils::Distance( float x, float y ) -{ - return sqrt(x*x + y*y); -} - -std::string Utils::Replace( std::string str, const std::string& oldStr, const std::string& newStr ) -{ - size_t pos = 0; - while((pos = str.find(oldStr, pos)) != std::string::npos) - { - str.replace(pos, oldStr.length(), newStr); - pos += newStr.length(); - } - return str; -} - -void Utils::SaveToDisk( FILE* stream, const std::string& path ) -{ - FILE* disk = fopen(path.c_str(), "wb"); - if (!disk) - { - printf("SaveToDisk: Could not save file %s to disk, please verify that you have write permissions on that directory\n", path.c_str()); - fclose(stream); - return; - } - - uint32 size = Utils::Size(stream); - uint8* data = new uint8[size]; - // Read the data to an array - size_t read = fread(data, size, 1, stream); - if (read != 1) - { - printf("SaveToDisk: Error reading from Stream while trying to save file %s to disk.\n", path.c_str()); - fclose(disk); - fclose(stream); - return; - } - - // And write it in the file - size_t wrote = fwrite(data, size, 1, disk); - if (wrote != 1) - { - printf("SaveToDisk: Error writing to the file while trying to save %s to disk.\n", path.c_str()); - fclose(stream); - fclose(disk); - return; - } - - // Close the filestream - fclose(disk); - fclose(stream); - - // Free the used memory - delete[] data; -} - -Vector3 Utils::ToWoWCoords(const Vector3& vec ) -{ - return Vector3(-vec.z, -vec.x, vec.y); -} - -std::string Utils::GetExtension( std::string path ) -{ - std::string::size_type idx = path.rfind('.'); - std::string extension = ""; - - if(idx != std::string::npos) - extension = path.substr(idx+1); - return extension; -} - -void MapChunkHeader::Read(FILE* stream) -{ - int count = 0; - - count += fread(&Flags, sizeof(uint32), 1, stream); - count += fread(&IndexX, sizeof(uint32), 1, stream); - count += fread(&IndexY, sizeof(uint32), 1, stream); - count += fread(&Layers, sizeof(uint32), 1, stream); - count += fread(&DoodadRefs, sizeof(uint32), 1, stream); - count += fread(&OffsetMCVT, sizeof(uint32), 1, stream); - count += fread(&OffsetMCNR, sizeof(uint32), 1, stream); - count += fread(&OffsetMCLY, sizeof(uint32), 1, stream); - count += fread(&OffsetMCRF, sizeof(uint32), 1, stream); - count += fread(&OffsetMCAL, sizeof(uint32), 1, stream); - count += fread(&SizeMCAL, sizeof(uint32), 1, stream); - count += fread(&OffsetMCSH, sizeof(uint32), 1, stream); - count += fread(&SizeMCSH, sizeof(uint32), 1, stream); - count += fread(&AreaId, sizeof(uint32), 1, stream); - count += fread(&MapObjectRefs, sizeof(uint32), 1, stream); - count += fread(&Holes, sizeof(uint32), 1, stream); - LowQualityTextureMap = new uint32[4]; - count += fread(LowQualityTextureMap, sizeof(uint32), 4, stream); - count += fread(&PredTex, sizeof(uint32), 1, stream); - count += fread(&NumberEffectDoodad, sizeof(uint32), 1, stream); - count += fread(&OffsetMCSE, sizeof(uint32), 1, stream); - count += fread(&SoundEmitters, sizeof(uint32), 1, stream); - count += fread(&OffsetMCLQ, sizeof(uint32), 1, stream); - count += fread(&SizeMCLQ, sizeof(uint32), 1, stream); - Position = Vector3::Read(stream); - count += fread(&OffsetMCCV, sizeof(uint32), 1, stream); - - if (count != 27) - printf("MapChunkHeader::Read: Failed to read some data expected 27, read %d\n", count); -} - -void MHDR::Read(FILE* stream) -{ - int count = 0; - - count += fread(&Flags, sizeof(uint32), 1, stream); - count += fread(&OffsetMCIN, sizeof(uint32), 1, stream); - count += fread(&OffsetMTEX, sizeof(uint32), 1, stream); - count += fread(&OffsetMMDX, sizeof(uint32), 1, stream); - count += fread(&OffsetMMID, sizeof(uint32), 1, stream); - count += fread(&OffsetMWMO, sizeof(uint32), 1, stream); - count += fread(&OffsetMWID, sizeof(uint32), 1, stream); - count += fread(&OffsetMDDF, sizeof(uint32), 1, stream); - count += fread(&OffsetMODF, sizeof(uint32), 1, stream); - count += fread(&OffsetMFBO, sizeof(uint32), 1, stream); - count += fread(&OffsetMH2O, sizeof(uint32), 1, stream); - count += fread(&OffsetMTFX, sizeof(uint32), 1, stream); - - if (count != 12) - printf("MHDR::Read: Failed to read some data expected 12, read %d\n", count); -} - -void ModelHeader::Read(FILE* stream) -{ - int count = 0; - - count += fread(&Magic, sizeof(char), 4, stream); - Magic[4] = '\0'; // null-terminate it. - count += fread(&Version, sizeof(uint32), 1, stream); - count += fread(&LengthModelName, sizeof(uint32), 1, stream); - count += fread(&OffsetName, sizeof(uint32), 1, stream); - count += fread(&ModelFlags, sizeof(uint32), 1, stream); - count += fread(&CountGlobalSequences, sizeof(uint32), 1, stream); - count += fread(&OffsetGlobalSequences, sizeof(uint32), 1, stream); - count += fread(&CountAnimations, sizeof(uint32), 1, stream); - count += fread(&OffsetAnimations, sizeof(uint32), 1, stream); - count += fread(&CountAnimationLookup, sizeof(uint32), 1, stream); - count += fread(&OffsetAnimationLookup, sizeof(uint32), 1, stream); - count += fread(&CountBones, sizeof(uint32), 1, stream); - count += fread(&OffsetBones, sizeof(uint32), 1, stream); - count += fread(&CountKeyBoneLookup, sizeof(uint32), 1, stream); - count += fread(&OffsetKeyBoneLookup, sizeof(uint32), 1, stream); - count += fread(&CountVertices, sizeof(uint32), 1, stream); - count += fread(&OffsetVertices, sizeof(uint32), 1, stream); - count += fread(&CountViews, sizeof(uint32), 1, stream); - count += fread(&CountColors, sizeof(uint32), 1, stream); - count += fread(&OffsetColors, sizeof(uint32), 1, stream); - count += fread(&CountTextures, sizeof(uint32), 1, stream); - count += fread(&OffsetTextures, sizeof(uint32), 1, stream); - count += fread(&CountTransparency, sizeof(uint32), 1, stream); - count += fread(&OffsetTransparency, sizeof(uint32), 1, stream); - count += fread(&CountUvAnimation, sizeof(uint32), 1, stream); - count += fread(&OffsetUvAnimation, sizeof(uint32), 1, stream); - count += fread(&CountTexReplace, sizeof(uint32), 1, stream); - count += fread(&OffsetTexReplace, sizeof(uint32), 1, stream); - count += fread(&CountRenderFlags, sizeof(uint32), 1, stream); - count += fread(&OffsetRenderFlags, sizeof(uint32), 1, stream); - count += fread(&CountBoneLookup, sizeof(uint32), 1, stream); - count += fread(&OffsetBoneLookup, sizeof(uint32), 1, stream); - count += fread(&CountTexLookup, sizeof(uint32), 1, stream); - count += fread(&OffsetTexLookup, sizeof(uint32), 1, stream); - count += fread(&CountTexUnits, sizeof(uint32), 1, stream); - count += fread(&OffsetTexUnits, sizeof(uint32), 1, stream); - count += fread(&CountTransLookup, sizeof(uint32), 1, stream); - count += fread(&OffsetTransLookup, sizeof(uint32), 1, stream); - count += fread(&CountUvAnimLookup, sizeof(uint32), 1, stream); - count += fread(&OffsetUvAnimLookup, sizeof(uint32), 1, stream); - VertexBox[0] = Vector3::Read(stream); - VertexBox[1] = Vector3::Read(stream); - count += fread(&VertexRadius, sizeof(float), 1, stream); - BoundingBox[0] = Vector3::Read(stream); - BoundingBox[1] = Vector3::Read(stream); - count += fread(&BoundingRadius, sizeof(float), 1, stream); - count += fread(&CountBoundingTriangles, sizeof(uint32), 1, stream); - count += fread(&OffsetBoundingTriangles, sizeof(uint32), 1, stream); - count += fread(&CountBoundingVertices, sizeof(uint32), 1, stream); - count += fread(&OffsetBoundingVertices, sizeof(uint32), 1, stream); - count += fread(&CountBoundingNormals, sizeof(uint32), 1, stream); - count += fread(&OffsetBoundingNormals, sizeof(uint32), 1, stream); - - if (count != 51) - printf("ModelHeader::Read: Failed to read some data expected 51, read %d\n", count); - -} - -WorldModelHeader WorldModelHeader::Read(FILE* stream) -{ - WorldModelHeader ret; - int count = 0; - - count += fread(&ret.CountMaterials, sizeof(uint32), 1, stream); - count += fread(&ret.CountGroups, sizeof(uint32), 1, stream); - count += fread(&ret.CountPortals, sizeof(uint32), 1, stream); - count += fread(&ret.CountLights, sizeof(uint32), 1, stream); - count += fread(&ret.CountModels, sizeof(uint32), 1, stream); - count += fread(&ret.CountDoodads, sizeof(uint32), 1, stream); - count += fread(&ret.CountSets, sizeof(uint32), 1, stream); - count += fread(&ret.AmbientColorUnk, sizeof(uint32), 1, stream); - count += fread(&ret.WmoId, sizeof(uint32), 1, stream); - ret.BoundingBox[0] = Vector3::Read(stream); - ret.BoundingBox[1] = Vector3::Read(stream); - count += fread(&ret.LiquidTypeRelated, sizeof(uint32), 1, stream); - - if (count != 10) - printf("WorldModelHeader::Read: Failed to read some data expected 10, read %d\n", count); - - return ret; -} - -DoodadInstance DoodadInstance::Read(FILE* stream) -{ - DoodadInstance ret; - int count = 0; - - count += fread(&ret.FileOffset, sizeof(uint32), 1, stream); - ret.Position = Vector3::Read(stream); - count += fread(&ret.QuatW, sizeof(float), 1, stream); - count += fread(&ret.QuatX, sizeof(float), 1, stream); - count += fread(&ret.QuatY, sizeof(float), 1, stream); - count += fread(&ret.QuatZ, sizeof(float), 1, stream); - count += fread(&ret.Scale, sizeof(float), 1, stream); - count += fread(&ret.LightColor, sizeof(uint32), 1, stream); - - if (count != 7) - printf("DoodadInstance::Read: Failed to read some data expected 7, read %d\n", count); - - return ret; -} - -DoodadSet DoodadSet::Read(FILE* stream) -{ - DoodadSet ret; - char name[21]; - int count = 0; - - count += fread(&name, sizeof(char), 20, stream); - name[20] = '\0'; - ret.Name = name; - count += fread(&ret.FirstInstanceIndex, sizeof(uint32), 1, stream); - count += fread(&ret.CountInstances, sizeof(uint32), 1, stream); - count += fread(&ret.UnknownZero, sizeof(uint32), 1, stream); - - if (count != 23) - printf("DoodadSet::Read: Failed to read some data expected 23, read %d\n", count); - - return ret; -} - -LiquidHeader LiquidHeader::Read(FILE* stream) -{ - LiquidHeader ret; - int count = 0; - count += fread(&ret.CountXVertices, sizeof(uint32), 1, stream); - count += fread(&ret.CountYVertices, sizeof(uint32), 1, stream); - count += fread(&ret.Width, sizeof(uint32), 1, stream); - count += fread(&ret.Height, sizeof(uint32), 1, stream); - ret.BaseLocation = Vector3::Read(stream); - count += fread(&ret.MaterialId, sizeof(uint16), 1, stream); - - if (count != 5) - printf("LiquidHeader::Read: Failed to read some data expected 5, read %d\n", count); - - return ret; -} - -LiquidData LiquidData::Read(FILE* stream, LiquidHeader& header) -{ - LiquidData ret; - ret.HeightMap = new float*[header.CountXVertices]; - for (uint32 i = 0; i < header.CountXVertices; ++i) - ret.HeightMap[i] = new float[header.CountYVertices]; - - ret.RenderFlags = new uint8*[header.Width]; - for (uint32 i = 0; i < header.Width; ++i) - ret.RenderFlags[i] = new uint8[header.Height]; - - for (uint32 y = 0; y < header.CountYVertices; y++) - { - for (uint32 x = 0; x < header.CountXVertices; x++) - { - uint32 discard; - float tmp; - if (fread(&discard, sizeof(uint32), 1, stream) == 1 && - fread(&tmp, sizeof(float), 1, stream) == 1) - { - ret.HeightMap[x][y] = tmp; - } - } - } - - for (uint32 y = 0; y < header.Height; y++) - { - for (uint32 x = 0; x < header.Width; x++) - { - uint8 tmp = 0; - if (fread(&tmp, sizeof(uint8), 1, stream) == 1) - ret.RenderFlags[x][y] = tmp; - } - } - - return ret; -} - -H2ORenderMask H2ORenderMask::Read(FILE* stream) -{ - H2ORenderMask ret; - int32 count; - if ((count = fread(&ret.Mask, sizeof(uint8), 8, stream)) != 8) - printf("H2OHeader::Read: Failed to read some data expected 8, read %d\n", count); - return ret; -} - -bool MCNKLiquidData::IsWater(int x, int y, float height) -{ - if (!Heights) - return false; - if (!Mask.ShouldRender(x, y)) - return false; - float diff = Heights[x][y] - height; - if (diff > Constants::MaxStandableHeight) - return true; - return false; -} - -H2OHeader H2OHeader::Read(FILE* stream) -{ - H2OHeader ret; - int count = 0; - count += fread(&ret.OffsetInformation, sizeof(uint32), 1, stream); - count += fread(&ret.LayerCount, sizeof(uint32), 1, stream); - count += fread(&ret.OffsetRender, sizeof(uint32), 1, stream); - - if (count != 3) - printf("H2OHeader::Read: Failed to read some data expected 3, read %d\n", count); - - return ret; -} - -H2OInformation H2OInformation::Read(FILE* stream) -{ - H2OInformation ret; - int count = 0; - count += fread(&ret.LiquidType, sizeof(uint16), 1, stream); - count += fread(&ret.Flags, sizeof(uint16), 1, stream); - count += fread(&ret.HeightLevel1, sizeof(float), 1, stream); - count += fread(&ret.HeightLevel2, sizeof(float), 1, stream); - count += fread(&ret.OffsetX, sizeof(uint8), 1, stream); - count += fread(&ret.OffsetY, sizeof(uint8), 1, stream); - count += fread(&ret.Width, sizeof(uint8), 1, stream); - count += fread(&ret.Height, sizeof(uint8), 1, stream); - count += fread(&ret.OffsetMask2, sizeof(uint32), 1, stream); - count += fread(&ret.OffsetHeightmap, sizeof(uint32), 1, stream); - - if (count != 10) - printf("H2OInformation::Read: Failed to read some data expected 10, read %d\n", count); - - return ret; -} - -char* Utils::GetPlainName(const char* FileName) -{ - char* temp; - - if((temp = (char*)strrchr(FileName, '\\')) != NULL) - FileName = temp + 1; - return (char*)FileName; -} - -WMOGroupHeader WMOGroupHeader::Read( FILE* stream ) -{ - WMOGroupHeader ret; - int count = 0; - count += fread(&ret.OffsetGroupName, sizeof(uint32), 1, stream); - count += fread(&ret.OffsetDescriptiveName, sizeof(uint32), 1, stream); - count += fread(&ret.Flags, sizeof(uint32), 1, stream); - ret.BoundingBox[0] = Vector3::Read(stream); - ret.BoundingBox[1] = Vector3::Read(stream); - count += fread(&ret.OffsetPortals, sizeof(uint32), 1, stream); - count += fread(&ret.CountPortals, sizeof(uint32), 1, stream); - count += fread(&ret.CountBatches, sizeof(uint16), 4, stream); - count += fread(&ret.Fogs, sizeof(uint8), 4, stream); - count += fread(&ret.LiquidTypeRelated, sizeof(uint32), 1, stream); - count += fread(&ret.WmoId, sizeof(uint32), 1, stream); - - if (count != 15) - printf("WMOGroupHeader::Read: Failed to read some data expected 15, read %d\n", count); - - return ret; -} diff --git a/modules/acore/extractors/mesh_extractor/Utils.h b/modules/acore/extractors/mesh_extractor/Utils.h deleted file mode 100644 index bf98e65f01..0000000000 --- a/modules/acore/extractors/mesh_extractor/Utils.h +++ /dev/null @@ -1,397 +0,0 @@ -/* - * Copyright (C) - * - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#ifndef UTILS_H -#define UTILS_H -#include -#include -#include - -#include "G3D/Matrix4.h" -#include "DetourNavMesh.h" - -#include "Define.h" -#include "Constants.h" - -#include - -struct WorldModelDefinition; -class DoodadDefinition; -class DoodadInstance; - -#define ASSERT(assertion) { if (!(assertion)) { ACE_Stack_Trace st; fprintf(stderr, "\n%s:%i in %s ASSERTION FAILED:\n %s\n%s\n", __FILE__, __LINE__, __FUNCTION__, #assertion, st.c_str()); *((volatile int*)NULL) = 0; } } - -struct Vector3 -{ - Vector3() {} - Vector3(float X, float Y, float Z) : x(X), y(Y), z(Z) {} - float x; - float y; - float z; - - Vector3 operator +(Vector3 const& other) const - { - return Vector3(x + other.x, y + other.y, z + other.z); - } - - Vector3 operator -(Vector3 const& other) const - { - return Vector3(x - other.x, y - other.y, z - other.z); - } - - template - Vector3 operator *(T s) const - { - return Vector3(x * s, y * s, z * s); - } - - static Vector3 Read(FILE* file); -}; - -struct TilePos -{ - TilePos(int x, int y) : X(x), Y(y) {} - int X; - int Y; -}; - -template -struct Triangle -{ - Triangle() {} - Triangle(Constants::TriangleType type, T v0, T v1, T v2) : V0(v0), V1(v1), V2(v2), Type(type) {} - T V0; - T V1; - T V2; - Constants::TriangleType Type; -}; - -class MapChunkHeader -{ -public: - MapChunkHeader() {} - uint32 Flags; - uint32 IndexX; - uint32 IndexY; - uint32 Layers; - uint32 DoodadRefs; - uint32 OffsetMCVT; - uint32 OffsetMCNR; - uint32 OffsetMCLY; - uint32 OffsetMCRF; - uint32 OffsetMCAL; - uint32 SizeMCAL; - uint32 OffsetMCSH; - uint32 SizeMCSH; - uint32 AreaId; - uint32 MapObjectRefs; - uint32 Holes; - uint32* LowQualityTextureMap; - uint32 PredTex; - uint32 NumberEffectDoodad; - uint32 OffsetMCSE; - uint32 SoundEmitters; - uint32 OffsetMCLQ; - uint32 SizeMCLQ; - Vector3 Position; - uint32 OffsetMCCV; - - void Read(FILE* stream); -}; - -class MHDR -{ -public: - MHDR() {} - uint32 Flags; - uint32 OffsetMCIN; - uint32 OffsetMTEX; - uint32 OffsetMMDX; - uint32 OffsetMMID; - uint32 OffsetMWMO; - uint32 OffsetMWID; - uint32 OffsetMDDF; - uint32 OffsetMODF; - uint32 OffsetMFBO; - uint32 OffsetMH2O; - uint32 OffsetMTFX; - - void Read(FILE* stream); -}; - -class ModelHeader -{ -public: - char Magic[5]; - uint32 Version; - uint32 LengthModelName; - uint32 OffsetName; - uint32 ModelFlags; - uint32 CountGlobalSequences; - uint32 OffsetGlobalSequences; - uint32 CountAnimations; - uint32 OffsetAnimations; - uint32 CountAnimationLookup; - uint32 OffsetAnimationLookup; - uint32 CountBones; - uint32 OffsetBones; - uint32 CountKeyBoneLookup; - uint32 OffsetKeyBoneLookup; - uint32 CountVertices; - uint32 OffsetVertices; - uint32 CountViews; - uint32 CountColors; - uint32 OffsetColors; - uint32 CountTextures; - uint32 OffsetTextures; - uint32 CountTransparency; - uint32 OffsetTransparency; - uint32 CountUvAnimation; - uint32 OffsetUvAnimation; - uint32 CountTexReplace; - uint32 OffsetTexReplace; - uint32 CountRenderFlags; - uint32 OffsetRenderFlags; - uint32 CountBoneLookup; - uint32 OffsetBoneLookup; - uint32 CountTexLookup; - uint32 OffsetTexLookup; - uint32 CountTexUnits; - uint32 OffsetTexUnits; - uint32 CountTransLookup; - uint32 OffsetTransLookup; - uint32 CountUvAnimLookup; - uint32 OffsetUvAnimLookup; - Vector3 VertexBox[2]; - float VertexRadius; - Vector3 BoundingBox[2]; - float BoundingRadius; - uint32 CountBoundingTriangles; - uint32 OffsetBoundingTriangles; - uint32 CountBoundingVertices; - uint32 OffsetBoundingVertices; - uint32 CountBoundingNormals; - uint32 OffsetBoundingNormals; - - void Read(FILE* stream); -}; - -class WorldModelHeader -{ -public: - WorldModelHeader() {} - uint32 CountMaterials; - uint32 CountGroups; - uint32 CountPortals; - uint32 CountLights; - uint32 CountModels; - uint32 CountDoodads; - uint32 CountSets; - uint32 AmbientColorUnk; - uint32 WmoId; - Vector3 BoundingBox[2]; - uint32 LiquidTypeRelated; - - static WorldModelHeader Read(FILE* stream); -}; - -class DoodadInstance -{ -public: - DoodadInstance() {} - uint32 FileOffset; - std::string File; - Vector3 Position; - float QuatW; - float QuatX; - float QuatY; - float QuatZ; - float Scale; - uint32 LightColor; - - static DoodadInstance Read(FILE* stream); -}; - -class DoodadSet -{ -public: - DoodadSet() {} - std::string Name; - uint32 FirstInstanceIndex; - uint32 CountInstances; - uint32 UnknownZero; - - static DoodadSet Read(FILE* stream); -}; - -class LiquidHeader -{ -public: - LiquidHeader() {} - uint32 CountXVertices; - uint32 CountYVertices; - uint32 Width; - uint32 Height; - Vector3 BaseLocation; - uint16 MaterialId; - - static LiquidHeader Read(FILE* stream); -}; - -class LiquidData -{ -public: - LiquidData() {} - float** HeightMap; - uint8** RenderFlags; - - bool ShouldRender(int x, int y) - { - return RenderFlags[x][y] != 0x0F; - } - - static LiquidData Read(FILE* stream, LiquidHeader& header); -}; - -class H2ORenderMask -{ -public: - H2ORenderMask() {} - uint8 Mask[8]; - - bool ShouldRender(int x, int y) - { - return (Mask[y] >> x & 1) != 0; - } - - static H2ORenderMask Read(FILE* stream); -}; - -class MCNKLiquidData -{ -public: - MCNKLiquidData() {} - MCNKLiquidData(float** heights, H2ORenderMask mask) : Heights(heights), Mask(mask) {} - - float** Heights; - H2ORenderMask Mask; - - bool IsWater(int x, int y, float height); -}; - -class H2OHeader -{ -public: - H2OHeader() {} - uint32 OffsetInformation; - uint32 LayerCount; - uint32 OffsetRender; - - static H2OHeader Read(FILE* stream); -}; - -class H2OInformation -{ -public: - H2OInformation() {} - uint16 LiquidType; - uint16 Flags; - float HeightLevel1; - float HeightLevel2; - uint8 OffsetX; - uint8 OffsetY; - uint8 Width; - uint8 Height; - uint32 OffsetMask2; - uint32 OffsetHeightmap; - - static H2OInformation Read(FILE* stream); -}; - -class WMOGroupHeader -{ -public: - WMOGroupHeader() {} - - uint32 OffsetGroupName; - uint32 OffsetDescriptiveName; - uint32 Flags; - Vector3 BoundingBox[2]; - uint32 OffsetPortals; - uint32 CountPortals; - uint16 CountBatches[4]; - uint8 Fogs[4]; - uint32 LiquidTypeRelated; - uint32 WmoId; - - static WMOGroupHeader Read(FILE* stream); -}; - -// Dummy class to act as an interface. -class IDefinition -{ -public: - Vector3 Position; - Vector3 Rotation; - virtual float Scale() const { return 1.0f; }; -}; - -#define MMAP_MAGIC 0x4d4d4150 // 'MMAP' -#define MMAP_VERSION 3 - -struct MmapTileHeader -{ - uint32 mmapMagic; - uint32 dtVersion; - uint32 mmapVersion; - uint32 size; - bool usesLiquids; - - MmapTileHeader() : mmapMagic(MMAP_MAGIC), dtVersion(DT_NAVMESH_VERSION), - mmapVersion(MMAP_VERSION), size(0), usesLiquids(true) {} -}; - -class Utils -{ -public: - static void Reverse(char word[]); - static std::string ReadString(FILE* file); - static uint32 Size(FILE* file); - static Vector3 ToRecast(const Vector3& val ); - static std::string GetAdtPath(const std::string& world, int x, int y); - static std::string FixModelPath(const std::string& path); - /// They say its better to declare template functions in the header files. - template - static std::string ToString(T val) - { - std::stringstream ss; - ss << val; - return ss.str(); - } - static float ToRadians(float degrees); - static std::string GetPathBase(const std::string& path); - static Vector3 GetLiquidVert(const IDefinition& def, Vector3 basePosition, float height, int /*x*/, int /*y*/, bool translate = true); - static float Distance(float x, float y); - template - static bool IsAllZero(T* arr, uint32 size) - { - for (uint32 i = 0; i < size; ++i) - if (arr[i]) - return false; - return true; - } - static std::string Replace( std::string str, const std::string& oldStr, const std::string& newStr ); - static void CreateDir( const std::string& Path ); - static void SaveToDisk(FILE* stream, const std::string& path); - static Vector3 ToWoWCoords(const Vector3& vec ); - static std::string GetExtension( std::string path ); - static char* GetPlainName(const char* FileName); - static Vector3 TransformDoodadVertex(const IDefinition& def, Vector3& vec, bool translate = true); - static Vector3 VectorTransform(const Vector3& vec, const G3D::Matrix4& matrix, bool normal = false ); - static Vector3 TransformWmoDoodad(const DoodadInstance& inst, const WorldModelDefinition& root, Vector3& vec, bool translate = true ); -}; -#endif diff --git a/modules/acore/extractors/mesh_extractor/WDT.cpp b/modules/acore/extractors/mesh_extractor/WDT.cpp deleted file mode 100644 index fea92a9821..0000000000 --- a/modules/acore/extractors/mesh_extractor/WDT.cpp +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (C) - * - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#include "WDT.h" -#include "Chunk.h" -#include "ChunkedData.h" -#include "Utils.h" -#include "WorldModelHandler.h" - -WDT::WDT(std::string file) : IsGlobalModel(false), IsValid(false), Model(NULL) -{ - Data = new ChunkedData(file, 2); - ReadTileTable(); - ReadGlobalModel(); -} - -void WDT::ReadGlobalModel() -{ - Chunk* fileChunk = Data->GetChunkByName("MWMO"); - Chunk* defChunk = Data->GetChunkByName("MODF"); - if (!fileChunk || !defChunk) - return; - - IsGlobalModel = true; - ModelDefinition = WorldModelDefinition::Read(defChunk->GetStream()); - ModelFile = Utils::ReadString(fileChunk->GetStream()); - Model = new WorldModelRoot(ModelFile); -} - -void WDT::ReadTileTable() -{ - Chunk* chunk = Data->GetChunkByName("MAIN"); - if (!chunk) - return; - IsValid = true; - FILE* stream = chunk->GetStream(); - for (int y = 0; y < 64; ++y) - { - for (int x = 0; x < 64; ++x) - { - const uint32 hasTileFlag = 0x1; - uint32 flags; - uint32 discard; - int count = 0; - count += fread(&flags, sizeof(uint32), 1, stream); - count += fread(&discard, sizeof(uint32), 1, stream); - - if (count != 2) - printf("WDT::ReadTileTable: Failed to read some data expected 2, read %d\n", count); - - if (flags & hasTileFlag) - TileTable.push_back(TilePos(x, y)); - - } - } -} - -bool WDT::HasTile( int x, int y ) -{ - for (std::vector::iterator itr = TileTable.begin(); itr != TileTable.end(); ++itr) - if (itr->X == x && itr->Y == y) - return true; - return false; -} diff --git a/modules/acore/extractors/mesh_extractor/WDT.h b/modules/acore/extractors/mesh_extractor/WDT.h deleted file mode 100644 index 98033a4e4d..0000000000 --- a/modules/acore/extractors/mesh_extractor/WDT.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (C) - * - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#ifndef WDT_H -#define WDT_H -#include -#include - -#include "ChunkedData.h" -#include "WorldModelHandler.h" -#include "WorldModelRoot.h" -#include "Utils.h" - -class WDT -{ -public: - WDT(std::string file); - - ChunkedData* Data; - std::vector TileTable; - bool IsGlobalModel; - bool IsValid; - std::string ModelFile; - WorldModelDefinition ModelDefinition; - WorldModelRoot* Model; - bool HasTile(int x, int y); -private: - void ReadGlobalModel(); - void ReadTileTable(); -}; - -#endif \ No newline at end of file diff --git a/modules/acore/extractors/mesh_extractor/WorldModelGroup.cpp b/modules/acore/extractors/mesh_extractor/WorldModelGroup.cpp deleted file mode 100644 index a9412c5221..0000000000 --- a/modules/acore/extractors/mesh_extractor/WorldModelGroup.cpp +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Copyright (C) - * - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#include "WorldModelGroup.h" -#include "ChunkedData.h" -#include "Chunk.h" -#include "Utils.h" - -WorldModelGroup::WorldModelGroup( std::string path, int groupIndex ) : GroupIndex(groupIndex), MOBA(NULL), IsBad(false), HasLiquidData(false) -{ - Data = new ChunkedData(path); - if (!Data->Stream) - { - IsBad = true; - return; - } - Chunk* mainChunk = Data->GetChunkByName("MOGP"); - int32 firstSub = mainChunk->FindSubChunkOffset("MOPY"); - if (firstSub == -1) - return; - - Name = Utils::GetPlainName(path.c_str()); - - FILE* stream = mainChunk->GetStream(); - fseek(stream, firstSub, SEEK_SET); - SubData = new ChunkedData(stream, mainChunk->Length - firstSub); - - ReadHeader(); - ReadMaterials(); - ReadTriangles(); - ReadVertices(); - ReadNormals(); - ReadLiquid(); - ReadBatches(); -} - -void WorldModelGroup::ReadNormals() -{ - Chunk* chunk = SubData->GetChunkByName("MONR"); - if (!chunk) - return; - - uint32 normalCount = chunk->Length / 12; - ASSERT(normalCount == Vertices.size() && "normalCount is different than the Vertices count"); - Normals.reserve(normalCount); - FILE* stream = chunk->GetStream(); - for (uint32 i = 0; i < normalCount; i++) - Normals.push_back(Vector3::Read(stream)); -} - -void WorldModelGroup::ReadLiquid() -{ - Chunk* chunk = SubData->GetChunkByName("MLIQ"); - if (!chunk) - return; - - HasLiquidData = true; - FILE* stream = chunk->GetStream(); - LiquidDataHeader = LiquidHeader::Read(stream); - LiquidDataGeometry = LiquidData::Read(stream, LiquidDataHeader); -} - -void WorldModelGroup::ReadVertices() -{ - Chunk* chunk = SubData->GetChunkByName("MOVT"); - if (!chunk) - return; - - uint32 verticeCount = chunk->Length / 12; - Vertices.reserve(verticeCount); - FILE* stream = chunk->GetStream(); - for (uint32 i = 0; i < verticeCount; i++) - Vertices.push_back(Vector3::Read(stream)); -} - -void WorldModelGroup::ReadTriangles() -{ - Chunk* chunk = SubData->GetChunkByName("MOVI"); - if (!chunk) - return; - - uint32 triangleCount = chunk->Length / 6; - ASSERT(triangleCount == TriangleFlags.size() && "triangleCount != TriangleFlags.size()"); - FILE* stream = chunk->GetStream(); - Triangles.reserve(triangleCount); - for (uint32 i = 0; i < triangleCount; i++) - { - uint16 v0; - uint16 v1; - uint16 v2; - int count = 0; - count += fread(&v0, sizeof(uint16), 1, stream); - count += fread(&v1, sizeof(uint16), 1, stream); - count += fread(&v2, sizeof(uint16), 1, stream); - if (count != 3) - printf("WorldModelGroup::ReadMaterials: Error reading data, expected 3, read %d\n", count); - - Triangles.push_back(Triangle(Constants::TRIANGLE_TYPE_WMO, v0, v1, v2)); - } -} - -void WorldModelGroup::ReadMaterials() -{ - Chunk* chunk = SubData->GetChunkByName("MOPY"); - if (!chunk) - return; - - FILE* stream = chunk->GetStream(); - uint32 triangleCount = chunk->Length / 2; - TriangleFlags.reserve(triangleCount); - TriangleMaterials.reserve(triangleCount); - for (uint32 i = 0; i < triangleCount; i++) - { - uint8 tmp; - if (fread(&tmp, sizeof(uint8), 1, stream) != 1) - printf("WorldModelGroup::ReadMaterials: Error reading data, expected 1, read 0\n"); - TriangleFlags.push_back(tmp); - // Read again for material. - if (fread(&tmp, sizeof(uint8), 1, stream) != 1) - printf("WorldModelGroup::ReadMaterials: Error reading data, expected 1, read 0\n"); - TriangleMaterials.push_back(tmp); - } -} - -void WorldModelGroup::ReadHeader() -{ - Chunk* chunk = Data->GetChunkByName("MOGP"); - if (!chunk) - return; - - FILE* stream = chunk->GetStream(); - Header = WMOGroupHeader::Read(stream); -} - -void WorldModelGroup::ReadBatches() -{ - Chunk* chunk = Data->GetChunkByName("MOBA"); - if (!chunk) - return; - - MOBALength = chunk->Length / 2; - MOBA = new uint16[MOBALength]; - uint32 count = (uint32)fread(MOBA, sizeof(uint16), MOBALength, chunk->GetStream()); - if (count != MOBALength) - printf("WorldModelGroup::ReadBatches: Error reading data, expected %u, read %u\n", MOBALength, count); -} diff --git a/modules/acore/extractors/mesh_extractor/WorldModelGroup.h b/modules/acore/extractors/mesh_extractor/WorldModelGroup.h deleted file mode 100644 index d4b6f82c59..0000000000 --- a/modules/acore/extractors/mesh_extractor/WorldModelGroup.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (C) - * - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#ifndef WMOGROUP_H -#define WMOGROUP_H -#include "ChunkedData.h" -#include "Utils.h" - -class WorldModelGroup -{ -public: - WorldModelGroup(std::string path, int groupIndex); - ChunkedData* Data; - ChunkedData* SubData; - int GroupIndex; - std::string Name; - WMOGroupHeader Header; - - std::vector TriangleFlags; - std::vector TriangleMaterials; - std::vector > Triangles; - std::vector Vertices; - std::vector Normals; - // @ToDo: Research. - uint16* MOBA; - uint32 MOBALength; - - bool HasLiquidData; - bool IsBad; - LiquidHeader LiquidDataHeader; - LiquidData LiquidDataGeometry; -private: - void ReadNormals(); - void ReadLiquid(); - void ReadVertices(); - void ReadTriangles(); - void ReadMaterials(); - void ReadHeader(); - void ReadBatches(); -}; -#endif \ No newline at end of file diff --git a/modules/acore/extractors/mesh_extractor/WorldModelHandler.cpp b/modules/acore/extractors/mesh_extractor/WorldModelHandler.cpp deleted file mode 100644 index 7028450ec5..0000000000 --- a/modules/acore/extractors/mesh_extractor/WorldModelHandler.cpp +++ /dev/null @@ -1,227 +0,0 @@ -/* - * Copyright (C) - * - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#include "WorldModelHandler.h" -#include "WorldModelRoot.h" -#include "Chunk.h" -#include "Cache.h" -#include "Model.h" -#include "Define.h" -#include "G3D/Matrix4.h" -#include "G3D/Quat.h" -#include - -WorldModelDefinition WorldModelDefinition::Read( FILE* file ) -{ - WorldModelDefinition ret; - int count = 0; - count += fread(&ret.MwidIndex, sizeof(uint32), 1, file); - count += fread(&ret.UniqueId, sizeof(uint32), 1, file); - ret.Position = Vector3::Read(file); - ret.Rotation = Vector3::Read(file); - ret.UpperExtents = Vector3::Read(file); - ret.LowerExtents = Vector3::Read(file); - count += fread(&ret.Flags, sizeof(uint16), 1, file); - count += fread(&ret.DoodadSet, sizeof(uint16), 1, file); - uint32 discard; - count += fread(&discard, sizeof(uint32), 1, file); - - if (count != 5) - printf("WorldModelDefinition::Read: Error reading data, expected 5, read %d\n", count); - return ret; -} - - -WorldModelHandler::WorldModelHandler( ADT* adt ) : ObjectDataHandler(adt), _definitions(NULL), _paths(NULL) -{ - ReadModelPaths(); - ReadDefinitions(); -} - -void WorldModelHandler::ProcessInternal( MapChunk* mcnk ) -{ - if (!IsSane()) - return; - - uint32 refCount = mcnk->Header.MapObjectRefs; - FILE* stream = mcnk->Source->GetStream(); - fseek(stream, mcnk->Source->Offset + mcnk->Header.OffsetMCRF, SEEK_SET); - // Start looping at the last Doodad Ref index - for (uint32 i = mcnk->Header.DoodadRefs; i < refCount; i++) - { - int32 index; - if (fread(&index, sizeof(int32), 1, stream) != 1) - printf("WorldModelDefinition::Read: Error reading data, expected 1, read 0\n"); - - if (index < 0 || uint32(index) >= _definitions->size()) - continue; - - WorldModelDefinition wmo = (*_definitions)[index]; - - if (_drawn.find(wmo.UniqueId) != _drawn.end()) - continue; - _drawn.insert(wmo.UniqueId); - - if (wmo.MwidIndex >= _paths->size()) - continue; - - std::string path = (*_paths)[wmo.MwidIndex]; - WorldModelRoot* model = Cache->WorldModelCache.Get(path); - if (!model) - { - model = new WorldModelRoot(path); - Cache->WorldModelCache.Insert(path, model); - } - - Vertices.reserve(1000); - Triangles.reserve(1000); - - InsertModelGeometry(Vertices, Triangles, wmo, model); - } - // Restore the stream position - fseek(stream, mcnk->Source->Offset, SEEK_SET); -} - -void WorldModelHandler::InsertModelGeometry( std::vector& verts, std::vector >& tris, const WorldModelDefinition& def, WorldModelRoot* root, bool translate ) -{ - for (std::vector::iterator group = root->Groups.begin(); group != root->Groups.end(); ++group) - { - uint32 vertOffset = verts.size(); - for (std::vector::iterator itr2 = group->Vertices.begin(); itr2 != group->Vertices.end(); ++itr2) - { - Vector3 v = Utils::TransformDoodadVertex(def, *itr2, translate); - // If translate is false, then we were called directly from the TileBuilder to add data to it's _Geometry member, hence, we have to manually convert the vertices to Recast format. - verts.push_back(translate ? v : Utils::ToRecast(v)); // Transform the vertex to world space - } - - for (uint32 i = 0; i < group->Triangles.size(); ++i) - { - // only include colliding tris - if ((group->TriangleFlags[i] & 0x04) != 0 && group->TriangleMaterials[i] != 0xFF) - continue; - Triangle tri = group->Triangles[i]; - tris.push_back(Triangle(Constants::TRIANGLE_TYPE_WMO, tri.V0 + vertOffset, tri.V1 + vertOffset, tri.V2 + vertOffset)); - } - } - - if (def.DoodadSet < root->DoodadSets.size()) - { - DoodadSet set = root->DoodadSets[def.DoodadSet]; - std::vector instances; - instances.reserve(set.CountInstances); - for (uint32 i = set.FirstInstanceIndex; i < (set.CountInstances + set.FirstInstanceIndex); i++) - { - if (i >= root->DoodadInstances.size()) - break; - instances.push_back(root->DoodadInstances[i]); - } - - for (std::vector::iterator instance = instances.begin(); instance != instances.end(); ++instance) - { - Model* model = Cache->ModelCache.Get(instance->File); - if (!model) - { - model = new Model(instance->File); - Cache->ModelCache.Insert(instance->File, model); - } - - if (!model->IsCollidable) - continue; - int vertOffset = verts.size(); - for (std::vector::iterator itr2 = model->Vertices.begin(); itr2 != model->Vertices.end(); ++itr2) - { - Vector3 v = Utils::TransformDoodadVertex(def, Utils::TransformWmoDoodad(*instance, def, *itr2, false), translate); - verts.push_back(translate ? v : Utils::ToRecast(v)); - } - for (std::vector >::iterator itr2 = model->Triangles.begin(); itr2 != model->Triangles.end(); ++itr2) - tris.push_back(Triangle(Constants::TRIANGLE_TYPE_WMO, itr2->V0 + vertOffset, itr2->V1 + vertOffset, itr2->V2 + vertOffset)); - } - - for (std::vector::iterator group = root->Groups.begin(); group != root->Groups.end(); ++group) - { - if (!group->HasLiquidData) - continue; - - const LiquidHeader& liquidHeader = group->LiquidDataHeader; - LiquidData& liquidDataGeometry = group->LiquidDataGeometry; - - for (uint32 y = 0; y < liquidHeader.Height; y++) - { - for (uint32 x = 0; x < liquidHeader.Width; x++) - { - - if (!liquidDataGeometry.ShouldRender(x, y)) - continue; - - uint32 vertOffset = verts.size(); - - Vector3 v1 = Utils::GetLiquidVert(def, liquidHeader.BaseLocation, - liquidDataGeometry.HeightMap[x][y], x, y, translate); - Vector3 v2 = Utils::GetLiquidVert(def, liquidHeader.BaseLocation, - liquidDataGeometry.HeightMap[x + 1][y], x + 1, y, translate); - Vector3 v3 = Utils::GetLiquidVert(def, liquidHeader.BaseLocation, - liquidDataGeometry.HeightMap[x][y + 1], x, y + 1, translate); - Vector3 v4 = Utils::GetLiquidVert(def, liquidHeader.BaseLocation, - liquidDataGeometry.HeightMap[x + 1][y + 1], x + 1, y + 1, translate); - - verts.push_back(translate ? v1 : Utils::ToRecast(v1)); - verts.push_back(translate ? v2 : Utils::ToRecast(v2)); - verts.push_back(translate ? v3 : Utils::ToRecast(v3)); - verts.push_back(translate ? v4 : Utils::ToRecast(v4)); - - tris.push_back(Triangle(Constants::TRIANGLE_TYPE_WATER, vertOffset, vertOffset + 2, vertOffset + 1)); - tris.push_back(Triangle(Constants::TRIANGLE_TYPE_WATER, vertOffset + 2, vertOffset + 3, vertOffset + 1)); - - } - } - } - } -} - -void WorldModelHandler::ReadDefinitions() -{ - Chunk* chunk = Source->ObjectData->GetChunkByName("MODF"); - if (!chunk) - return; - - const int32 definitionSize = 64; - uint32 definitionCount = chunk->Length / definitionSize; - _definitions = new std::vector; - _definitions->reserve(definitionCount); - FILE* stream = chunk->GetStream(); - for (uint32 i = 0; i < definitionCount; i++) - _definitions->push_back(WorldModelDefinition::Read(stream)); -} - -void WorldModelHandler::ReadModelPaths() -{ - Chunk* mwid = Source->ObjectData->GetChunkByName("MWID"); - Chunk* mwmo = Source->ObjectData->GetChunkByName("MWMO"); - if (!mwid || !mwmo) - return; - - uint32 paths = mwid->Length / 4; - _paths = new std::vector; - _paths->reserve(paths); - for (uint32 i = 0; i < paths; i++) - { - FILE* stream = mwid->GetStream(); - fseek(stream, i * 4, SEEK_CUR); - uint32 offset; - if (fread(&offset, sizeof(uint32), 1, stream) != 1) - printf("WorldModelDefinition::Read: Error reading data, expected 1, read 0\n"); - FILE* dataStream = mwmo->GetStream(); - fseek(dataStream, offset + mwmo->Offset, SEEK_SET); - _paths->push_back(Utils::ReadString(dataStream)); - } -} - -WorldModelHandler::~WorldModelHandler() -{ - delete _definitions; - delete _paths; -} diff --git a/modules/acore/extractors/mesh_extractor/WorldModelHandler.h b/modules/acore/extractors/mesh_extractor/WorldModelHandler.h deleted file mode 100644 index b5a9be50d6..0000000000 --- a/modules/acore/extractors/mesh_extractor/WorldModelHandler.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (C) - * - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#ifndef WMODEL_HNDL_H -#define WMODEL_HNDL_H -#include "Define.h" -#include "Utils.h" -#include "WorldModelRoot.h" -#include "ObjectDataHandler.h" - -#include -#include - -class ADT; - -struct WorldModelDefinition : public IDefinition -{ -public: - WorldModelDefinition() {} - - uint32 MwidIndex; - uint32 UniqueId; - Vector3 UpperExtents; - Vector3 LowerExtents; - uint16 Flags; - uint16 DoodadSet; - - static WorldModelDefinition Read(FILE* file); -}; - -class WorldModelHandler : public ObjectDataHandler -{ -public: - WorldModelHandler(ADT* adt); - ~WorldModelHandler(); - - std::vector Vertices; - std::vector > Triangles; - bool IsSane() { return _definitions && _paths; } - static void InsertModelGeometry(std::vector& verts, std::vector >& tris, const WorldModelDefinition& def, WorldModelRoot* root, bool translate = true); -protected: - void ProcessInternal(MapChunk* data); -private: - void ReadDefinitions(); - void ReadModelPaths(); - std::set _drawn; - std::vector* _definitions; - std::vector* _paths; -}; -#endif \ No newline at end of file diff --git a/modules/acore/extractors/mesh_extractor/WorldModelRoot.cpp b/modules/acore/extractors/mesh_extractor/WorldModelRoot.cpp deleted file mode 100644 index 5e25589cf3..0000000000 --- a/modules/acore/extractors/mesh_extractor/WorldModelRoot.cpp +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (C) - * - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#include "WorldModelRoot.h" -#include "ChunkedData.h" -#include "Utils.h" - -WorldModelRoot::WorldModelRoot( std::string path ) -{ - Data = new ChunkedData(path); - Path = path; - ReadHeader(); - ReadGroups(); - ReadDoodadInstances(); - ReadDoodadSets(); -} - -WorldModelRoot::~WorldModelRoot() -{ - delete Data; -} - -void WorldModelRoot::ReadGroups() -{ - std::string pathBase = Utils::GetPathBase(Path); - Groups.reserve(Header.CountGroups); - for (uint32 i = 0; i < Header.CountGroups; i++) - { - char name[200]; - sprintf(name, "%s_%03u.wmo", pathBase.c_str(), i); - WorldModelGroup group(name, i); - if (!group.IsBad) - Groups.push_back(group); - } -} - -void WorldModelRoot::ReadDoodadSets() -{ - Chunk* chunk = Data->GetChunkByName("MODS"); - if (!chunk) - return; - - FILE* stream = chunk->GetStream(); - ASSERT(chunk->Length / 32 == Header.CountSets && "chunk.Length / 32 == Header.CountSets"); - DoodadSets.reserve(Header.CountSets); - for (uint32 i = 0; i < Header.CountSets; i++) - DoodadSets.push_back(DoodadSet::Read(stream)); -} - -void WorldModelRoot::ReadDoodadInstances() -{ - Chunk* chunk = Data->GetChunkByName("MODD"); - Chunk* nameChunk = Data->GetChunkByName("MODN"); - if (!chunk || !nameChunk) - return; - - const uint32 instanceSize = 40; - uint32 countInstances = chunk->Length / instanceSize; - DoodadInstances.reserve(countInstances); - for (uint32 i = 0; i < countInstances; i++) - { - FILE* stream = chunk->GetStream(); - fseek(stream, instanceSize * i, SEEK_CUR); - DoodadInstance instance = DoodadInstance::Read(stream); - FILE* nameStream = nameChunk->GetStream(); - if (instance.FileOffset >= nameChunk->Length) - continue; - fseek(nameStream, instance.FileOffset, SEEK_CUR); - instance.File = Utils::ReadString(nameStream); - DoodadInstances.push_back(instance); - } -} - -void WorldModelRoot::ReadHeader() -{ - Chunk* chunk = Data->GetChunkByName("MOHD"); - if (!chunk) - return; - - FILE* stream = chunk->GetStream(); - Header = WorldModelHeader::Read(stream); -} diff --git a/modules/acore/extractors/mesh_extractor/WorldModelRoot.h b/modules/acore/extractors/mesh_extractor/WorldModelRoot.h deleted file mode 100644 index fff149cfcb..0000000000 --- a/modules/acore/extractors/mesh_extractor/WorldModelRoot.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (C) - * - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#ifndef WMOROOT_H -#define WMOROOT_H -#include -#include - -#include "ChunkedData.h" -#include "Utils.h" -#include "WorldModelGroup.h" - -class WorldModelRoot -{ -public: - WorldModelRoot(std::string path); - ~WorldModelRoot(); - std::string Path; - ChunkedData* Data; - WorldModelHeader Header; - std::vector DoodadInstances; - std::vector DoodadSets; - std::vector Groups; -private: - void ReadGroups(); - void ReadDoodadSets(); - void ReadDoodadInstances(); - void ReadHeader(); -}; -#endif \ No newline at end of file diff --git a/modules/acore/extractors/mesh_extractor/readme b/modules/acore/extractors/mesh_extractor/readme deleted file mode 100644 index 85cd7cfc97..0000000000 --- a/modules/acore/extractors/mesh_extractor/readme +++ /dev/null @@ -1,6 +0,0 @@ -Experimental mesh extractor. -Original work in C# by stschake -Thanks to: -Subv -~ -For helping in the porting to C++ \ No newline at end of file diff --git a/modules/acore/extractors/mmaps_generator/CMakeLists.txt b/modules/acore/extractors/mmaps_generator/CMakeLists.txt deleted file mode 100644 index 9beb46eb2f..0000000000 --- a/modules/acore/extractors/mmaps_generator/CMakeLists.txt +++ /dev/null @@ -1,140 +0,0 @@ -# Copyright (C) -# -# This file is free software; as a special exception the author gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -file(GLOB_RECURSE mmap_gen_sources *.cpp *.h) - -set(mmap_gen_Includes - ${CMAKE_BINARY_DIR} - ${ACE_INCLUDE_DIR} - ${MYSQL_INCLUDE_DIR} - ${OPENSSL_INCLUDE_DIR} - ${CMAKE_SOURCE_DIR}/modules/worldengine/deps/libmpq - ${CMAKE_SOURCE_DIR}/modules/worldengine/deps/zlib - ${CMAKE_SOURCE_DIR}/modules/worldengine/deps/bzip2 - ${CMAKE_SOURCE_DIR}/modules/worldengine/deps/g3dlite/include - ${CMAKE_SOURCE_DIR}/modules/worldengine/deps/recastnavigation/Recast - ${CMAKE_SOURCE_DIR}/modules/worldengine/deps/recastnavigation/Detour - ${CMAKE_SOURCE_DIR}/modules/worldengine/lib-collision/src/ - ${CMAKE_SOURCE_DIR}/modules/worldengine/lib-collision/src/Management - ${CMAKE_SOURCE_DIR}/modules/worldengine/lib-collision/src/Maps - ${CMAKE_SOURCE_DIR}/modules/worldengine/lib-collision/src/Models - ${CMAKE_SOURCE_DIR}/modules/worldengine/nucleus/src - ${CMAKE_SOURCE_DIR}/modules/worldengine/nucleus/src/Configuration - ${CMAKE_SOURCE_DIR}/modules/worldengine/nucleus/src/Cryptography - ${CMAKE_SOURCE_DIR}/modules/worldengine/nucleus/src/Cryptography/Authentication - ${CMAKE_SOURCE_DIR}/modules/worldengine/nucleus/src/Database - ${CMAKE_SOURCE_DIR}/modules/worldengine/nucleus/src/DataStores - ${CMAKE_SOURCE_DIR}/modules/worldengine/nucleus/src/Debugging - ${CMAKE_SOURCE_DIR}/modules/worldengine/nucleus/src/Dynamic/LinkedReference - ${CMAKE_SOURCE_DIR}/modules/worldengine/nucleus/src/Dynamic - ${CMAKE_SOURCE_DIR}/modules/worldengine/nucleus/src/Logging - ${CMAKE_SOURCE_DIR}/modules/worldengine/nucleus/src/Packets - ${CMAKE_SOURCE_DIR}/modules/worldengine/nucleus/src/Threading - ${CMAKE_SOURCE_DIR}/modules/worldengine/nucleus/src/Utilities - ${CMAKE_SOURCE_DIR}/modules/acore/game-framework/src/Addons - ${CMAKE_SOURCE_DIR}/src/game - ${CMAKE_SOURCE_DIR}/src/game/Accounts - ${CMAKE_SOURCE_DIR}/src/game/Achievements - ${CMAKE_SOURCE_DIR}/src/game/AI - ${CMAKE_SOURCE_DIR}/src/game/AI/CoreAI - ${CMAKE_SOURCE_DIR}/src/game/AI/ScriptedAI - ${CMAKE_SOURCE_DIR}/src/game/AI/SmartScripts - ${CMAKE_SOURCE_DIR}/src/game/AuctionHouse - ${CMAKE_SOURCE_DIR}/src/game/AuctionHouse/AuctionHouseBot - ${CMAKE_SOURCE_DIR}/src/game/Battlefield - ${CMAKE_SOURCE_DIR}/src/game/Battlefield/Zones - ${CMAKE_SOURCE_DIR}/src/game/Battlegrounds - ${CMAKE_SOURCE_DIR}/src/game/Battlegrounds/Zones - ${CMAKE_SOURCE_DIR}/src/game/Calendar - ${CMAKE_SOURCE_DIR}/src/game/Chat - ${CMAKE_SOURCE_DIR}/src/game/Chat/Channels - ${CMAKE_SOURCE_DIR}/src/game/Combat - ${CMAKE_SOURCE_DIR}/src/game/Conditions - ${CMAKE_SOURCE_DIR}/src/game/DataStores - ${CMAKE_SOURCE_DIR}/src/game/DungeonFinding - ${CMAKE_SOURCE_DIR}/src/game/Entities - ${CMAKE_SOURCE_DIR}/src/game/Entities/Creature - ${CMAKE_SOURCE_DIR}/src/game/Entities/Corpse - ${CMAKE_SOURCE_DIR}/src/game/Entities/DynamicObject - ${CMAKE_SOURCE_DIR}/src/game/Entities/GameObject - ${CMAKE_SOURCE_DIR}/src/game/Entities/Item - ${CMAKE_SOURCE_DIR}/src/game/Entities/Item/Container - ${CMAKE_SOURCE_DIR}/src/game/Entities/Object - ${CMAKE_SOURCE_DIR}/src/game/Entities/Object/Updates - ${CMAKE_SOURCE_DIR}/src/game/Entities/Pet - ${CMAKE_SOURCE_DIR}/src/game/Entities/Player - ${CMAKE_SOURCE_DIR}/src/game/Entities/Totem - ${CMAKE_SOURCE_DIR}/src/game/Entities/Unit - ${CMAKE_SOURCE_DIR}/src/game/Entities/Vehicle - ${CMAKE_SOURCE_DIR}/src/game/Entities/Transport - ${CMAKE_SOURCE_DIR}/src/game/Events - ${CMAKE_SOURCE_DIR}/src/game/Globals - ${CMAKE_SOURCE_DIR}/src/game/Grids/Cells - ${CMAKE_SOURCE_DIR}/src/game/Grids/Notifiers - ${CMAKE_SOURCE_DIR}/src/game/Grids - ${CMAKE_SOURCE_DIR}/src/game/Groups - ${CMAKE_SOURCE_DIR}/src/game/Guilds - ${CMAKE_SOURCE_DIR}/src/game/Handlers - ${CMAKE_SOURCE_DIR}/src/game/Instances - ${CMAKE_SOURCE_DIR}/src/game/Loot - ${CMAKE_SOURCE_DIR}/src/game/Mails - ${CMAKE_SOURCE_DIR}/src/game/Maps - ${CMAKE_SOURCE_DIR}/src/game/Miscellaneous - ${CMAKE_SOURCE_DIR}/src/game/Movement - ${CMAKE_SOURCE_DIR}/src/game/Movement/MovementGenerators - ${CMAKE_SOURCE_DIR}/src/game/Movement/Waypoints - ${CMAKE_SOURCE_DIR}/src/game/OutdoorPvP - ${CMAKE_SOURCE_DIR}/src/game/Pools - ${CMAKE_SOURCE_DIR}/src/game/PrecompiledHeaders - ${CMAKE_SOURCE_DIR}/src/game/Quests - ${CMAKE_SOURCE_DIR}/src/game/Reputation - ${CMAKE_SOURCE_DIR}/src/game/Scripting - ${CMAKE_SOURCE_DIR}/src/game/Server/Protocol - ${CMAKE_SOURCE_DIR}/src/game/Server - ${CMAKE_SOURCE_DIR}/src/game/Skills - ${CMAKE_SOURCE_DIR}/src/game/Spells - ${CMAKE_SOURCE_DIR}/src/game/Spells/Auras - ${CMAKE_SOURCE_DIR}/src/game/Tools - ${CMAKE_SOURCE_DIR}/src/game/Warden - ${CMAKE_SOURCE_DIR}/src/game/Warden/Modules - ${CMAKE_SOURCE_DIR}/src/game/Weather - ${CMAKE_SOURCE_DIR}/src/game/World -) - -if( WIN32 ) - set(mmap_gen_Includes - ${mmap_gen_Includes} - ${CMAKE_SOURCE_DIR}/modules/worldengine/deps/libmpq/win - ) -endif() - -include_directories(${mmap_gen_Includes}) - -add_executable(mmaps_generator ${mmap_gen_sources}) - -target_link_libraries(mmaps_generator - shared - collision - g3dlib - Recast - Detour - ${ACE_LIBRARY} - ${MYSQL_LIBRARY} - ${OPENSSL_LIBRARIES} - ${BZIP2_LIBRARIES} - ${ZLIB_LIBRARIES} - ${CMAKE_THREAD_LIBS_INIT} -) - -if( UNIX ) - install(TARGETS mmaps_generator DESTINATION bin) -elseif( WIN32 ) - install(TARGETS mmaps_generator DESTINATION "${CMAKE_INSTALL_PREFIX}") -endif() diff --git a/modules/acore/extractors/mmaps_generator/Info/readme.txt b/modules/acore/extractors/mmaps_generator/Info/readme.txt deleted file mode 100644 index 8059add00e..0000000000 --- a/modules/acore/extractors/mmaps_generator/Info/readme.txt +++ /dev/null @@ -1,69 +0,0 @@ -Generator command line args - ---threads [#] Max number of threads used by the generator - Default: 3 - ---offMeshInput [file.*] Path to file containing off mesh connections data. - Format must be: (see offmesh_example.txt) - "map_id tile_x,tile_y (start_x start_y start_z) (end_x end_y end_z) size //optional comments" - Single mesh connection per line. - ---silent [] Make us script friendly. Do not wait for user input - on error or completion. - ---bigBaseUnit [true|false] Generate tile/map using bigger basic unit. - Use this option only if you have unexpected gaps. - - false: use normal metrics (default) - ---maxAngle [#] Max walkable inclination angle - - float between 45 and 90 degrees (default 60) - ---skipLiquid [true|false] extract liquid data for maps - - false: include liquid data (default) - ---skipContinents [true|false] continents are maps 0 (Eastern Kingdoms), - 1 (Kalimdor), 530 (Outlands), 571 (Northrend) - - false: build continents (default) - ---skipJunkMaps [true|false] junk maps include some unused - maps, transport maps, and some other - - true: skip junk maps (default) - ---skipBattlegrounds [true|false] does not include PVP arenas - - false: skip battlegrounds (default) - ---debugOutput [true|false] create debugging files for use with RecastDemo - if you are only creating mmaps for use with Moongose, - you don't want debugging files - - false: don't create debugging files (default) - ---tile [#,#] Build the specified tile - seperate number with a comma ',' - must specify a map number (see below) - if this option is not used, all tiles are built - - [#] Build only the map specified by # - this command will build the map regardless of --skip* option settings - if you do not specify a map number, builds all maps that pass the filters specified by --skip* options - - -examples: - -movement_extractor -builds maps using the default settings (see above for defaults) - -movement_extractor --skipContinents true -builds the default maps, except continents - -movement_extractor 0 -builds all tiles of map 0 - -movement_extractor 0 --tile 34,46 -builds only tile 34,46 of map 0 (this is the southern face of blackrock mountain) diff --git a/modules/acore/extractors/mmaps_generator/IntermediateValues.cpp b/modules/acore/extractors/mmaps_generator/IntermediateValues.cpp deleted file mode 100644 index 6dc63e7faa..0000000000 --- a/modules/acore/extractors/mmaps_generator/IntermediateValues.cpp +++ /dev/null @@ -1,265 +0,0 @@ -/* - * Copyright (C) 2016+ AzerothCore , released under GNU GPL v2 license: http://github.com/azerothcore/azerothcore-wotlk/LICENSE-GPL2 - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#include "IntermediateValues.h" - -namespace MMAP -{ - IntermediateValues::~IntermediateValues() - { - rcFreeCompactHeightfield(compactHeightfield); - rcFreeHeightField(heightfield); - rcFreeContourSet(contours); - rcFreePolyMesh(polyMesh); - rcFreePolyMeshDetail(polyMeshDetail); - } - - void IntermediateValues::writeIV(uint32 mapID, uint32 tileX, uint32 tileY) - { - char fileName[255]; - char tileString[25]; - sprintf(tileString, "[%02u,%02u]: ", tileX, tileY); - - printf("%sWriting debug output... \r", tileString); - - std::string name("meshes/%03u%02i%02i."); - -#define DEBUG_WRITE(fileExtension,data) \ - do { \ - sprintf(fileName, (name + fileExtension).c_str(), mapID, tileY, tileX); \ - FILE* file = fopen(fileName, "wb"); \ - if (!file) \ - { \ - char message[1024]; \ - sprintf(message, "%sFailed to open %s for writing!\n", tileString, fileName); \ - perror(message); \ - } \ - else \ - debugWrite(file, data); \ - if (file) fclose(file); \ - printf("%sWriting debug output... \r", tileString); \ - } while (false) - - if (heightfield) - DEBUG_WRITE("hf", heightfield); - if (compactHeightfield) - DEBUG_WRITE("chf", compactHeightfield); - if (contours) - DEBUG_WRITE("cs", contours); - if (polyMesh) - DEBUG_WRITE("pmesh", polyMesh); - if (polyMeshDetail) - DEBUG_WRITE("dmesh", polyMeshDetail); - -#undef DEBUG_WRITE - } - - void IntermediateValues::debugWrite(FILE* file, const rcHeightfield* mesh) - { - if (!file || !mesh) - return; - - fwrite(&(mesh->cs), sizeof(float), 1, file); - fwrite(&(mesh->ch), sizeof(float), 1, file); - fwrite(&(mesh->width), sizeof(int), 1, file); - fwrite(&(mesh->height), sizeof(int), 1, file); - fwrite(mesh->bmin, sizeof(float), 3, file); - fwrite(mesh->bmax, sizeof(float), 3, file); - - for (int y = 0; y < mesh->height; ++y) - for (int x = 0; x < mesh->width; ++x) - { - rcSpan* span = mesh->spans[x+y*mesh->width]; - - // first, count the number of spans - int spanCount = 0; - while (span) - { - spanCount++; - span = span->next; - } - - // write the span count - fwrite(&spanCount, sizeof(int), 1, file); - - // write the spans - span = mesh->spans[x+y*mesh->width]; - while (span) - { - fwrite(span, sizeof(rcSpan), 1, file); - span = span->next; - } - } - } - - void IntermediateValues::debugWrite(FILE* file, const rcCompactHeightfield* chf) - { - if (!file | !chf) - return; - - fwrite(&(chf->width), sizeof(chf->width), 1, file); - fwrite(&(chf->height), sizeof(chf->height), 1, file); - fwrite(&(chf->spanCount), sizeof(chf->spanCount), 1, file); - - fwrite(&(chf->walkableHeight), sizeof(chf->walkableHeight), 1, file); - fwrite(&(chf->walkableClimb), sizeof(chf->walkableClimb), 1, file); - - fwrite(&(chf->maxDistance), sizeof(chf->maxDistance), 1, file); - fwrite(&(chf->maxRegions), sizeof(chf->maxRegions), 1, file); - - fwrite(chf->bmin, sizeof(chf->bmin), 1, file); - fwrite(chf->bmax, sizeof(chf->bmax), 1, file); - - fwrite(&(chf->cs), sizeof(chf->cs), 1, file); - fwrite(&(chf->ch), sizeof(chf->ch), 1, file); - - int tmp = 0; - if (chf->cells) tmp |= 1; - if (chf->spans) tmp |= 2; - if (chf->dist) tmp |= 4; - if (chf->areas) tmp |= 8; - - fwrite(&tmp, sizeof(tmp), 1, file); - - if (chf->cells) - fwrite(chf->cells, sizeof(rcCompactCell), chf->width*chf->height, file); - if (chf->spans) - fwrite(chf->spans, sizeof(rcCompactSpan), chf->spanCount, file); - if (chf->dist) - fwrite(chf->dist, sizeof(unsigned short), chf->spanCount, file); - if (chf->areas) - fwrite(chf->areas, sizeof(unsigned char), chf->spanCount, file); - } - - void IntermediateValues::debugWrite(FILE* file, const rcContourSet* cs) - { - if (!file || !cs) - return; - - fwrite(&(cs->cs), sizeof(float), 1, file); - fwrite(&(cs->ch), sizeof(float), 1, file); - fwrite(cs->bmin, sizeof(float), 3, file); - fwrite(cs->bmax, sizeof(float), 3, file); - fwrite(&(cs->nconts), sizeof(int), 1, file); - for (int i = 0; i < cs->nconts; ++i) - { - fwrite(&cs->conts[i].area, sizeof(unsigned char), 1, file); - fwrite(&cs->conts[i].reg, sizeof(unsigned short), 1, file); - fwrite(&cs->conts[i].nverts, sizeof(int), 1, file); - fwrite(cs->conts[i].verts, sizeof(int), cs->conts[i].nverts*4, file); - fwrite(&cs->conts[i].nrverts, sizeof(int), 1, file); - fwrite(cs->conts[i].rverts, sizeof(int), cs->conts[i].nrverts*4, file); - } - } - - void IntermediateValues::debugWrite(FILE* file, const rcPolyMesh* mesh) - { - if (!file || !mesh) - return; - - fwrite(&(mesh->cs), sizeof(float), 1, file); - fwrite(&(mesh->ch), sizeof(float), 1, file); - fwrite(&(mesh->nvp), sizeof(int), 1, file); - fwrite(mesh->bmin, sizeof(float), 3, file); - fwrite(mesh->bmax, sizeof(float), 3, file); - fwrite(&(mesh->nverts), sizeof(int), 1, file); - fwrite(mesh->verts, sizeof(unsigned short), mesh->nverts*3, file); - fwrite(&(mesh->npolys), sizeof(int), 1, file); - fwrite(mesh->polys, sizeof(unsigned short), mesh->npolys*mesh->nvp*2, file); - fwrite(mesh->flags, sizeof(unsigned short), mesh->npolys, file); - fwrite(mesh->areas, sizeof(unsigned char), mesh->npolys, file); - fwrite(mesh->regs, sizeof(unsigned short), mesh->npolys, file); - } - - void IntermediateValues::debugWrite(FILE* file, const rcPolyMeshDetail* mesh) - { - if (!file || !mesh) - return; - - fwrite(&(mesh->nverts), sizeof(int), 1, file); - fwrite(mesh->verts, sizeof(float), mesh->nverts*3, file); - fwrite(&(mesh->ntris), sizeof(int), 1, file); - fwrite(mesh->tris, sizeof(char), mesh->ntris*4, file); - fwrite(&(mesh->nmeshes), sizeof(int), 1, file); - fwrite(mesh->meshes, sizeof(int), mesh->nmeshes*4, file); - } - - void IntermediateValues::generateObjFile(uint32 mapID, uint32 tileX, uint32 tileY, MeshData &meshData) - { - char objFileName[255]; - sprintf(objFileName, "meshes/map%03u%02u%02u.obj", mapID, tileY, tileX); - - FILE* objFile = fopen(objFileName, "wb"); - if (!objFile) - { - char message[1024]; - sprintf(message, "Failed to open %s for writing!\n", objFileName); - perror(message); - return; - } - - G3D::Array allVerts; - G3D::Array allTris; - - allTris.append(meshData.liquidTris); - allVerts.append(meshData.liquidVerts); - TerrainBuilder::copyIndices(meshData.solidTris, allTris, allVerts.size() / 3); - allVerts.append(meshData.solidVerts); - - float* verts = allVerts.getCArray(); - int vertCount = allVerts.size() / 3; - int* tris = allTris.getCArray(); - int triCount = allTris.size() / 3; - - for (int i = 0; i < allVerts.size() / 3; i++) - fprintf(objFile, "v %f %f %f\n", verts[i*3], verts[i*3 + 1], verts[i*3 + 2]); - - for (int i = 0; i < allTris.size() / 3; i++) - fprintf(objFile, "f %i %i %i\n", tris[i*3] + 1, tris[i*3 + 1] + 1, tris[i*3 + 2] + 1); - - fclose(objFile); - - - char tileString[25]; - sprintf(tileString, "[%02u,%02u]: ", tileY, tileX); - printf("%sWriting debug output... \r", tileString); - - sprintf(objFileName, "meshes/%03u.map", mapID); - - objFile = fopen(objFileName, "wb"); - if (!objFile) - { - char message[1024]; - sprintf(message, "Failed to open %s for writing!\n", objFileName); - perror(message); - return; - } - - char b = '\0'; - fwrite(&b, sizeof(char), 1, objFile); - fclose(objFile); - - sprintf(objFileName, "meshes/%03u%02u%02u.mesh", mapID, tileY, tileX); - objFile = fopen(objFileName, "wb"); - if (!objFile) - { - char message[1024]; - sprintf(message, "Failed to open %s for writing!\n", objFileName); - perror(message); - return; - } - - fwrite(&vertCount, sizeof(int), 1, objFile); - fwrite(verts, sizeof(float), vertCount*3, objFile); - fflush(objFile); - - fwrite(&triCount, sizeof(int), 1, objFile); - fwrite(tris, sizeof(int), triCount*3, objFile); - fflush(objFile); - - fclose(objFile); - } -} diff --git a/modules/acore/extractors/mmaps_generator/IntermediateValues.h b/modules/acore/extractors/mmaps_generator/IntermediateValues.h deleted file mode 100644 index 37832f853c..0000000000 --- a/modules/acore/extractors/mmaps_generator/IntermediateValues.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (C) 2016+ AzerothCore , released under GNU GPL v2 license: http://github.com/azerothcore/azerothcore-wotlk/LICENSE-GPL2 - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#ifndef _INTERMEDIATE_VALUES_H -#define _INTERMEDIATE_VALUES_H - -#include "PathCommon.h" -#include "TerrainBuilder.h" -#include "Recast.h" -#include "DetourNavMesh.h" - -namespace MMAP -{ - // this class gathers all debug info holding and output - struct IntermediateValues - { - rcHeightfield* heightfield; - rcCompactHeightfield* compactHeightfield; - rcContourSet* contours; - rcPolyMesh* polyMesh; - rcPolyMeshDetail* polyMeshDetail; - - IntermediateValues() : heightfield(NULL), compactHeightfield(NULL), - contours(NULL), polyMesh(NULL), polyMeshDetail(NULL) {} - ~IntermediateValues(); - - void writeIV(uint32 mapID, uint32 tileX, uint32 tileY); - - void debugWrite(FILE* file, const rcHeightfield* mesh); - void debugWrite(FILE* file, const rcCompactHeightfield* chf); - void debugWrite(FILE* file, const rcContourSet* cs); - void debugWrite(FILE* file, const rcPolyMesh* mesh); - void debugWrite(FILE* file, const rcPolyMeshDetail* mesh); - - void generateObjFile(uint32 mapID, uint32 tileX, uint32 tileY, MeshData &meshData); - }; -} -#endif diff --git a/modules/acore/extractors/mmaps_generator/MapBuilder.cpp b/modules/acore/extractors/mmaps_generator/MapBuilder.cpp deleted file mode 100644 index e5edd4a611..0000000000 --- a/modules/acore/extractors/mmaps_generator/MapBuilder.cpp +++ /dev/null @@ -1,974 +0,0 @@ -/* - * Copyright (C) 2016+ AzerothCore , released under GNU GPL v2 license: http://github.com/azerothcore/azerothcore-wotlk/LICENSE-GPL2 - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#include "PathCommon.h" -#include "MapBuilder.h" - -#include "MapTree.h" -#include "ModelInstance.h" - -#include "DetourNavMeshBuilder.h" -#include "DetourNavMesh.h" -#include "DetourCommon.h" - -#include "DisableMgr.h" -#include - -uint32 GetLiquidFlags(uint32 /*liquidType*/) { return 0; } -namespace DisableMgr -{ - bool IsDisabledFor(DisableType /*type*/, uint32 /*entry*/, Unit const* /*unit*/, uint8 /*flags*/ /*= 0*/) { return false; } -} - -#define MMAP_MAGIC 0x4d4d4150 // 'MMAP' -#define MMAP_VERSION 3 - -struct MmapTileHeader -{ - uint32 mmapMagic; - uint32 dtVersion; - uint32 mmapVersion; - uint32 size; - bool usesLiquids : 1; - - MmapTileHeader() : mmapMagic(MMAP_MAGIC), dtVersion(DT_NAVMESH_VERSION), - mmapVersion(MMAP_VERSION), size(0), usesLiquids(true) {} -}; - -namespace MMAP -{ - MapBuilder::MapBuilder(float maxWalkableAngle, bool skipLiquid, - bool skipContinents, bool skipJunkMaps, bool skipBattlegrounds, - bool debugOutput, bool bigBaseUnit, const char* offMeshFilePath) : - m_terrainBuilder (NULL), - m_debugOutput (debugOutput), - m_offMeshFilePath (offMeshFilePath), - m_skipContinents (skipContinents), - m_skipJunkMaps (skipJunkMaps), - m_skipBattlegrounds (skipBattlegrounds), - m_maxWalkableAngle (maxWalkableAngle), - m_bigBaseUnit (bigBaseUnit), - m_rcContext (NULL) - { - m_terrainBuilder = new TerrainBuilder(skipLiquid); - - m_rcContext = new rcContext(false); - - discoverTiles(); - } - - /**************************************************************************/ - MapBuilder::~MapBuilder() - { - for (TileList::iterator it = m_tiles.begin(); it != m_tiles.end(); ++it) - { - (*it).second->clear(); - delete (*it).second; - } - - delete m_terrainBuilder; - delete m_rcContext; - } - - /**************************************************************************/ - void MapBuilder::discoverTiles() - { - std::vector files; - uint32 mapID, tileX, tileY, tileID, count = 0; - char filter[12]; - - printf("Discovering maps... "); - getDirContents(files, "maps"); - for (uint32 i = 0; i < files.size(); ++i) - { - mapID = uint32(atoi(files[i].substr(0,3).c_str())); - if (m_tiles.find(mapID) == m_tiles.end()) - { - m_tiles.insert(std::pair*>(mapID, new std::set)); - count++; - } - } - - files.clear(); - getDirContents(files, "vmaps", "*.vmtree"); - for (uint32 i = 0; i < files.size(); ++i) - { - mapID = uint32(atoi(files[i].substr(0,3).c_str())); - m_tiles.insert(std::pair*>(mapID, new std::set)); - count++; - } - printf("found %u.\n", count); - - count = 0; - printf("Discovering tiles... "); - for (TileList::iterator itr = m_tiles.begin(); itr != m_tiles.end(); ++itr) - { - std::set* tiles = (*itr).second; - mapID = (*itr).first; - - sprintf(filter, "%03u*.vmtile", mapID); - files.clear(); - getDirContents(files, "vmaps", filter); - for (uint32 i = 0; i < files.size(); ++i) - { - tileX = uint32(atoi(files[i].substr(7,2).c_str())); - tileY = uint32(atoi(files[i].substr(4,2).c_str())); - tileID = StaticMapTree::packTileID(tileY, tileX); - - tiles->insert(tileID); - count++; - } - - sprintf(filter, "%03u*", mapID); - files.clear(); - getDirContents(files, "maps", filter); - for (uint32 i = 0; i < files.size(); ++i) - { - tileY = uint32(atoi(files[i].substr(3,2).c_str())); - tileX = uint32(atoi(files[i].substr(5,2).c_str())); - tileID = StaticMapTree::packTileID(tileX, tileY); - - if (tiles->insert(tileID).second) - count++; - } - } - printf("found %u.\n\n", count); - } - - /**************************************************************************/ - std::set* MapBuilder::getTileList(uint32 mapID) - { - TileList::iterator itr = m_tiles.find(mapID); - if (itr != m_tiles.end()) - return (*itr).second; - - std::set* tiles = new std::set(); - m_tiles.insert(std::pair*>(mapID, tiles)); - return tiles; - } - - /**************************************************************************/ - void MapBuilder::buildAllMaps(int threads) - { - std::vector _threads; - - BuilderThreadPool* pool = threads > 0 ? new BuilderThreadPool() : NULL; - - for (TileList::iterator it = m_tiles.begin(); it != m_tiles.end(); ++it) - { - uint32 mapID = it->first; - if (!shouldSkipMap(mapID)) - { - if (threads > 0) - pool->Enqueue(new MapBuildRequest(mapID)); - else - buildMap(mapID); - } - } - - for (int i = 0; i < threads; ++i) - _threads.push_back(new BuilderThread(this, pool->Queue())); - - // Free memory - for (std::vector::iterator _th = _threads.begin(); _th != _threads.end(); ++_th) - { - (*_th)->wait(); - delete *_th; - } - - delete pool; - } - - /**************************************************************************/ - void MapBuilder::getGridBounds(uint32 mapID, uint32 &minX, uint32 &minY, uint32 &maxX, uint32 &maxY) - { - maxX = INT_MAX; - maxY = INT_MAX; - minX = INT_MIN; - minY = INT_MIN; - - float bmin[3] = { 0, 0, 0 }; - float bmax[3] = { 0, 0, 0 }; - float lmin[3] = { 0, 0, 0 }; - float lmax[3] = { 0, 0, 0 }; - MeshData meshData; - - // make sure we process maps which don't have tiles - // initialize the static tree, which loads WDT models - if (!m_terrainBuilder->loadVMap(mapID, 64, 64, meshData)) - return; - - // get the coord bounds of the model data - if (meshData.solidVerts.size() + meshData.liquidVerts.size() == 0) - return; - - // get the coord bounds of the model data - if (meshData.solidVerts.size() && meshData.liquidVerts.size()) - { - rcCalcBounds(meshData.solidVerts.getCArray(), meshData.solidVerts.size() / 3, bmin, bmax); - rcCalcBounds(meshData.liquidVerts.getCArray(), meshData.liquidVerts.size() / 3, lmin, lmax); - rcVmin(bmin, lmin); - rcVmax(bmax, lmax); - } - else if (meshData.solidVerts.size()) - rcCalcBounds(meshData.solidVerts.getCArray(), meshData.solidVerts.size() / 3, bmin, bmax); - else - rcCalcBounds(meshData.liquidVerts.getCArray(), meshData.liquidVerts.size() / 3, lmin, lmax); - - // convert coord bounds to grid bounds - maxX = 32 - bmin[0] / GRID_SIZE; - maxY = 32 - bmin[2] / GRID_SIZE; - minX = 32 - bmax[0] / GRID_SIZE; - minY = 32 - bmax[2] / GRID_SIZE; - } - - void MapBuilder::buildMeshFromFile(char* name) - { - FILE* file = fopen(name, "rb"); - if (!file) - return; - - printf("Building mesh from file\n"); - int tileX, tileY, mapId; - if (fread(&mapId, sizeof(int), 1, file) != 1) - { - fclose(file); - return; - } - if (fread(&tileX, sizeof(int), 1, file) != 1) - { - fclose(file); - return; - } - if (fread(&tileY, sizeof(int), 1, file) != 1) - { - fclose(file); - return; - } - - dtNavMesh* navMesh = NULL; - buildNavMesh(mapId, navMesh); - if (!navMesh) - { - printf("Failed creating navmesh! \n"); - fclose(file); - return; - } - - uint32 verticesCount, indicesCount; - if (fread(&verticesCount, sizeof(uint32), 1, file) != 1) - { - fclose(file); - return; - } - - if (fread(&indicesCount, sizeof(uint32), 1, file) != 1) - { - fclose(file); - return; - } - - float* verts = new float[verticesCount]; - int* inds = new int[indicesCount]; - - if (fread(verts, sizeof(float), verticesCount, file) != verticesCount) - { - fclose(file); - delete[] verts; - delete[] inds; - return; - } - - if (fread(inds, sizeof(int), indicesCount, file) != indicesCount) - { - fclose(file); - delete[] verts; - delete[] inds; - return; - } - - MeshData data; - - for (uint32 i = 0; i < verticesCount; ++i) - data.solidVerts.append(verts[i]); - delete[] verts; - - for (uint32 i = 0; i < indicesCount; ++i) - data.solidTris.append(inds[i]); - delete[] inds; - - TerrainBuilder::cleanVertices(data.solidVerts, data.solidTris); - // get bounds of current tile - float bmin[3], bmax[3]; - getTileBounds(tileX, tileY, data.solidVerts.getCArray(), data.solidVerts.size() / 3, bmin, bmax); - - // build navmesh tile - buildMoveMapTile(mapId, tileX, tileY, data, bmin, bmax, navMesh); - fclose(file); - } - - /**************************************************************************/ - void MapBuilder::buildSingleTile(uint32 mapID, uint32 tileX, uint32 tileY) - { - dtNavMesh* navMesh = NULL; - buildNavMesh(mapID, navMesh); - if (!navMesh) - { - printf("Failed creating navmesh! \n"); - return; - } - - buildTile(mapID, tileX, tileY, navMesh); - dtFreeNavMesh(navMesh); - } - - /**************************************************************************/ - void MapBuilder::buildMap(uint32 mapID) - { -#ifndef __APPLE__ - printf("[Thread %u] Building map %03u:\n", uint32(ACE_Thread::self()), mapID); -#endif - - std::set* tiles = getTileList(mapID); - - // make sure we process maps which don't have tiles - if (!tiles->size()) - { - // convert coord bounds to grid bounds - uint32 minX, minY, maxX, maxY; - getGridBounds(mapID, minX, minY, maxX, maxY); - - // add all tiles within bounds to tile list. - for (uint32 i = minX; i <= maxX; ++i) - for (uint32 j = minY; j <= maxY; ++j) - tiles->insert(StaticMapTree::packTileID(i, j)); - } - - if (!tiles->empty()) - { - // build navMesh - dtNavMesh* navMesh = NULL; - buildNavMesh(mapID, navMesh); - if (!navMesh) - { - printf("[Map %03i] Failed creating navmesh!\n", mapID); - return; - } - - // now start building mmtiles for each tile - printf("[Map %03i] We have %u tiles. \n", mapID, (unsigned int)tiles->size()); - for (std::set::iterator it = tiles->begin(); it != tiles->end(); ++it) - { - uint32 tileX, tileY; - - // unpack tile coords - StaticMapTree::unpackTileID((*it), tileX, tileY); - - if (shouldSkipTile(mapID, tileX, tileY)) - continue; - - buildTile(mapID, tileX, tileY, navMesh); - } - - dtFreeNavMesh(navMesh); - } - - printf("[Map %03i] Complete!\n", mapID); - } - - /**************************************************************************/ - void MapBuilder::buildTile(uint32 mapID, uint32 tileX, uint32 tileY, dtNavMesh* navMesh) - { - printf("[Map %03i] Building tile [%02u,%02u]\n", mapID, tileX, tileY); - - MeshData meshData; - - // get heightmap data - m_terrainBuilder->loadMap(mapID, tileX, tileY, meshData); - - // get model data - m_terrainBuilder->loadVMap(mapID, tileY, tileX, meshData); - - // if there is no data, give up now - if (!meshData.solidVerts.size() && !meshData.liquidVerts.size()) - return; - - // remove unused vertices - TerrainBuilder::cleanVertices(meshData.solidVerts, meshData.solidTris); - TerrainBuilder::cleanVertices(meshData.liquidVerts, meshData.liquidTris); - - // gather all mesh data for final data check, and bounds calculation - G3D::Array allVerts; - allVerts.append(meshData.liquidVerts); - allVerts.append(meshData.solidVerts); - - if (!allVerts.size()) - return; - - // get bounds of current tile - float bmin[3], bmax[3]; - getTileBounds(tileX, tileY, allVerts.getCArray(), allVerts.size() / 3, bmin, bmax); - - m_terrainBuilder->loadOffMeshConnections(mapID, tileX, tileY, meshData, m_offMeshFilePath); - - // build navmesh tile - buildMoveMapTile(mapID, tileX, tileY, meshData, bmin, bmax, navMesh); - } - - /**************************************************************************/ - void MapBuilder::buildNavMesh(uint32 mapID, dtNavMesh* &navMesh) - { - std::set* tiles = getTileList(mapID); - - // old code for non-statically assigned bitmask sizes: - ///*** calculate number of bits needed to store tiles & polys ***/ - //int tileBits = dtIlog2(dtNextPow2(tiles->size())); - //if (tileBits < 1) tileBits = 1; // need at least one bit! - //int polyBits = sizeof(dtPolyRef)*8 - SALT_MIN_BITS - tileBits; - - int polyBits = STATIC_POLY_BITS; - - int maxTiles = tiles->size(); - int maxPolysPerTile = 1 << polyBits; - - /*** calculate bounds of map ***/ - - uint32 tileXMin = 64, tileYMin = 64, tileXMax = 0, tileYMax = 0, tileX, tileY; - for (std::set::iterator it = tiles->begin(); it != tiles->end(); ++it) - { - StaticMapTree::unpackTileID(*it, tileX, tileY); - - if (tileX > tileXMax) - tileXMax = tileX; - else if (tileX < tileXMin) - tileXMin = tileX; - - if (tileY > tileYMax) - tileYMax = tileY; - else if (tileY < tileYMin) - tileYMin = tileY; - } - - // use Max because '32 - tileX' is negative for values over 32 - float bmin[3], bmax[3]; - getTileBounds(tileXMax, tileYMax, NULL, 0, bmin, bmax); - - /*** now create the navmesh ***/ - - // navmesh creation params - dtNavMeshParams navMeshParams; - memset(&navMeshParams, 0, sizeof(dtNavMeshParams)); - navMeshParams.tileWidth = GRID_SIZE; - navMeshParams.tileHeight = GRID_SIZE; - rcVcopy(navMeshParams.orig, bmin); - navMeshParams.maxTiles = maxTiles; - navMeshParams.maxPolys = maxPolysPerTile; - - navMesh = dtAllocNavMesh(); - printf("[Map %03i] Creating navMesh...\n", mapID); - if (!navMesh->init(&navMeshParams)) - { - printf("[Map %03i] Failed creating navmesh! \n", mapID); - return; - } - - char fileName[25]; - sprintf(fileName, "mmaps/%03u.mmap", mapID); - - FILE* file = fopen(fileName, "wb"); - if (!file) - { - dtFreeNavMesh(navMesh); - char message[1024]; - sprintf(message, "[Map %03i] Failed to open %s for writing!\n", mapID, fileName); - perror(message); - return; - } - - // now that we know navMesh params are valid, we can write them to file - fwrite(&navMeshParams, sizeof(dtNavMeshParams), 1, file); - fclose(file); - } - - /**************************************************************************/ - void MapBuilder::buildMoveMapTile(uint32 mapID, uint32 tileX, uint32 tileY, - MeshData &meshData, float bmin[3], float bmax[3], - dtNavMesh* navMesh) - { - // console output - char tileString[20]; - sprintf(tileString, "[Map %03i] [%02i,%02i]: ", mapID, tileX, tileY); - printf("%s Building movemap tiles...\n", tileString); - - IntermediateValues iv; - - float* tVerts = meshData.solidVerts.getCArray(); - int tVertCount = meshData.solidVerts.size() / 3; - int* tTris = meshData.solidTris.getCArray(); - int tTriCount = meshData.solidTris.size() / 3; - - float* lVerts = meshData.liquidVerts.getCArray(); - int lVertCount = meshData.liquidVerts.size() / 3; - int* lTris = meshData.liquidTris.getCArray(); - int lTriCount = meshData.liquidTris.size() / 3; - uint8* lTriFlags = meshData.liquidType.getCArray(); - - // these are WORLD UNIT based metrics - // this are basic unit dimentions - // value have to divide GRID_SIZE(533.3333f) ( aka: 0.5333, 0.2666, 0.3333, 0.1333, etc ) - const static float BASE_UNIT_DIM = m_bigBaseUnit ? 0.5333333f : 0.2666666f; - - // All are in UNIT metrics! - const static int VERTEX_PER_MAP = int(GRID_SIZE/BASE_UNIT_DIM + 0.5f); - const static int VERTEX_PER_TILE = m_bigBaseUnit ? 40 : 80; // must divide VERTEX_PER_MAP - const static int TILES_PER_MAP = VERTEX_PER_MAP/VERTEX_PER_TILE; - - rcConfig config; - memset(&config, 0, sizeof(rcConfig)); - - rcVcopy(config.bmin, bmin); - rcVcopy(config.bmax, bmax); - - config.maxVertsPerPoly = DT_VERTS_PER_POLYGON; - config.cs = BASE_UNIT_DIM; - config.ch = BASE_UNIT_DIM; - config.walkableSlopeAngle = m_maxWalkableAngle; - config.tileSize = VERTEX_PER_TILE; - config.walkableRadius = m_bigBaseUnit ? 1 : 2; - config.borderSize = config.walkableRadius + 3; - config.maxEdgeLen = VERTEX_PER_TILE + 1; // anything bigger than tileSize - config.walkableHeight = m_bigBaseUnit ? 3 : 6; - config.walkableClimb = m_bigBaseUnit ? 2 : 4; // keep less than walkableHeight - config.minRegionArea = rcSqr(60); - config.mergeRegionArea = rcSqr(50); - config.maxSimplificationError = 1.8f; // eliminates most jagged edges (tiny polygons) - config.detailSampleDist = config.cs * 64; - config.detailSampleMaxError = config.ch * 2; - - // this sets the dimensions of the heightfield - should maybe happen before border padding - rcCalcGridSize(config.bmin, config.bmax, config.cs, &config.width, &config.height); - - // allocate subregions : tiles - Tile* tiles = new Tile[TILES_PER_MAP * TILES_PER_MAP]; - - // Initialize per tile config. - rcConfig tileCfg = config; - tileCfg.width = config.tileSize + config.borderSize*2; - tileCfg.height = config.tileSize + config.borderSize*2; - - // merge per tile poly and detail meshes - rcPolyMesh** pmmerge = new rcPolyMesh*[TILES_PER_MAP * TILES_PER_MAP]; - rcPolyMeshDetail** dmmerge = new rcPolyMeshDetail*[TILES_PER_MAP * TILES_PER_MAP]; - int nmerge = 0; - // build all tiles - for (int y = 0; y < TILES_PER_MAP; ++y) - { - for (int x = 0; x < TILES_PER_MAP; ++x) - { - Tile& tile = tiles[x + y * TILES_PER_MAP]; - - // Calculate the per tile bounding box. - tileCfg.bmin[0] = config.bmin[0] + float(x*config.tileSize - config.borderSize)*config.cs; - tileCfg.bmin[2] = config.bmin[2] + float(y*config.tileSize - config.borderSize)*config.cs; - tileCfg.bmax[0] = config.bmin[0] + float((x+1)*config.tileSize + config.borderSize)*config.cs; - tileCfg.bmax[2] = config.bmin[2] + float((y+1)*config.tileSize + config.borderSize)*config.cs; - - // build heightfield - tile.solid = rcAllocHeightfield(); - if (!tile.solid || !rcCreateHeightfield(m_rcContext, *tile.solid, tileCfg.width, tileCfg.height, tileCfg.bmin, tileCfg.bmax, tileCfg.cs, tileCfg.ch)) - { - printf("%s Failed building heightfield! \n", tileString); - continue; - } - - // mark all walkable tiles, both liquids and solids - unsigned char* triFlags = new unsigned char[tTriCount]; - memset(triFlags, NAV_GROUND, tTriCount*sizeof(unsigned char)); - rcClearUnwalkableTriangles(m_rcContext, tileCfg.walkableSlopeAngle, tVerts, tVertCount, tTris, tTriCount, triFlags); - rcRasterizeTriangles(m_rcContext, tVerts, tVertCount, tTris, triFlags, tTriCount, *tile.solid, config.walkableClimb); - delete[] triFlags; - - rcFilterLowHangingWalkableObstacles(m_rcContext, config.walkableClimb, *tile.solid); - rcFilterLedgeSpans(m_rcContext, tileCfg.walkableHeight, tileCfg.walkableClimb, *tile.solid); - rcFilterWalkableLowHeightSpans(m_rcContext, tileCfg.walkableHeight, *tile.solid); - - rcRasterizeTriangles(m_rcContext, lVerts, lVertCount, lTris, lTriFlags, lTriCount, *tile.solid, config.walkableClimb); - - // compact heightfield spans - tile.chf = rcAllocCompactHeightfield(); - if (!tile.chf || !rcBuildCompactHeightfield(m_rcContext, tileCfg.walkableHeight, tileCfg.walkableClimb, *tile.solid, *tile.chf)) - { - printf("%s Failed compacting heightfield! \n", tileString); - continue; - } - - // build polymesh intermediates - if (!rcErodeWalkableArea(m_rcContext, config.walkableRadius, *tile.chf)) - { - printf("%s Failed eroding area! \n", tileString); - continue; - } - - if (!rcBuildDistanceField(m_rcContext, *tile.chf)) - { - printf("%s Failed building distance field! \n", tileString); - continue; - } - - if (!rcBuildRegions(m_rcContext, *tile.chf, tileCfg.borderSize, tileCfg.minRegionArea, tileCfg.mergeRegionArea)) - { - printf("%s Failed building regions! \n", tileString); - continue; - } - - tile.cset = rcAllocContourSet(); - if (!tile.cset || !rcBuildContours(m_rcContext, *tile.chf, tileCfg.maxSimplificationError, tileCfg.maxEdgeLen, *tile.cset)) - { - printf("%s Failed building contours! \n", tileString); - continue; - } - - // build polymesh - tile.pmesh = rcAllocPolyMesh(); - if (!tile.pmesh || !rcBuildPolyMesh(m_rcContext, *tile.cset, tileCfg.maxVertsPerPoly, *tile.pmesh)) - { - printf("%s Failed building polymesh! \n", tileString); - continue; - } - - tile.dmesh = rcAllocPolyMeshDetail(); - if (!tile.dmesh || !rcBuildPolyMeshDetail(m_rcContext, *tile.pmesh, *tile.chf, tileCfg.detailSampleDist, tileCfg.detailSampleMaxError, *tile.dmesh)) - { - printf("%s Failed building polymesh detail! \n", tileString); - continue; - } - - // free those up - // we may want to keep them in the future for debug - // but right now, we don't have the code to merge them - rcFreeHeightField(tile.solid); - tile.solid = NULL; - rcFreeCompactHeightfield(tile.chf); - tile.chf = NULL; - rcFreeContourSet(tile.cset); - tile.cset = NULL; - - pmmerge[nmerge] = tile.pmesh; - dmmerge[nmerge] = tile.dmesh; - nmerge++; - } - } - - iv.polyMesh = rcAllocPolyMesh(); - if (!iv.polyMesh) - { - printf("%s alloc iv.polyMesh FIALED!\n", tileString); - delete[] pmmerge; - delete[] dmmerge; - delete[] tiles; - return; - } - rcMergePolyMeshes(m_rcContext, pmmerge, nmerge, *iv.polyMesh); - - iv.polyMeshDetail = rcAllocPolyMeshDetail(); - if (!iv.polyMeshDetail) - { - printf("%s alloc m_dmesh FIALED!\n", tileString); - delete[] pmmerge; - delete[] dmmerge; - delete[] tiles; - return; - } - rcMergePolyMeshDetails(m_rcContext, dmmerge, nmerge, *iv.polyMeshDetail); - - // free things up - delete[] pmmerge; - delete[] dmmerge; - delete[] tiles; - - // set polygons as walkable - // TODO: special flags for DYNAMIC polygons, ie surfaces that can be turned on and off - for (int i = 0; i < iv.polyMesh->npolys; ++i) - if (iv.polyMesh->areas[i] & RC_WALKABLE_AREA) - iv.polyMesh->flags[i] = iv.polyMesh->areas[i]; - - // setup mesh parameters - dtNavMeshCreateParams params; - memset(¶ms, 0, sizeof(params)); - params.verts = iv.polyMesh->verts; - params.vertCount = iv.polyMesh->nverts; - params.polys = iv.polyMesh->polys; - params.polyAreas = iv.polyMesh->areas; - params.polyFlags = iv.polyMesh->flags; - params.polyCount = iv.polyMesh->npolys; - params.nvp = iv.polyMesh->nvp; - params.detailMeshes = iv.polyMeshDetail->meshes; - params.detailVerts = iv.polyMeshDetail->verts; - params.detailVertsCount = iv.polyMeshDetail->nverts; - params.detailTris = iv.polyMeshDetail->tris; - params.detailTriCount = iv.polyMeshDetail->ntris; - - params.offMeshConVerts = meshData.offMeshConnections.getCArray(); - params.offMeshConCount = meshData.offMeshConnections.size()/6; - params.offMeshConRad = meshData.offMeshConnectionRads.getCArray(); - params.offMeshConDir = meshData.offMeshConnectionDirs.getCArray(); - params.offMeshConAreas = meshData.offMeshConnectionsAreas.getCArray(); - params.offMeshConFlags = meshData.offMeshConnectionsFlags.getCArray(); - - params.walkableHeight = BASE_UNIT_DIM*config.walkableHeight; // agent height - params.walkableRadius = BASE_UNIT_DIM*config.walkableRadius; // agent radius - params.walkableClimb = BASE_UNIT_DIM*config.walkableClimb; // keep less that walkableHeight (aka agent height)! - params.tileX = (((bmin[0] + bmax[0]) / 2) - navMesh->getParams()->orig[0]) / GRID_SIZE; - params.tileY = (((bmin[2] + bmax[2]) / 2) - navMesh->getParams()->orig[2]) / GRID_SIZE; - rcVcopy(params.bmin, bmin); - rcVcopy(params.bmax, bmax); - params.cs = config.cs; - params.ch = config.ch; - params.tileLayer = 0; - params.buildBvTree = true; - - // will hold final navmesh - unsigned char* navData = NULL; - int navDataSize = 0; - - do - { - // these values are checked within dtCreateNavMeshData - handle them here - // so we have a clear error message - if (params.nvp > DT_VERTS_PER_POLYGON) - { - printf("%s Invalid verts-per-polygon value! \n", tileString); - continue; - } - if (params.vertCount >= 0xffff) - { - printf("%s Too many vertices! \n", tileString); - continue; - } - if (!params.vertCount || !params.verts) - { - // occurs mostly when adjacent tiles have models - // loaded but those models don't span into this tile - - // message is an annoyance - //printf("%sNo vertices to build tile! \n", tileString); - continue; - } - if (!params.polyCount || !params.polys || - TILES_PER_MAP*TILES_PER_MAP == params.polyCount) - { - // we have flat tiles with no actual geometry - don't build those, its useless - // keep in mind that we do output those into debug info - // drop tiles with only exact count - some tiles may have geometry while having less tiles - printf("%s No polygons to build on tile! \n", tileString); - continue; - } - if (!params.detailMeshes || !params.detailVerts || !params.detailTris) - { - printf("%s No detail mesh to build tile! \n", tileString); - continue; - } - - printf("%s Building navmesh tile...\n", tileString); - if (!dtCreateNavMeshData(¶ms, &navData, &navDataSize)) - { - printf("%s Failed building navmesh tile! \n", tileString); - continue; - } - - dtTileRef tileRef = 0; - printf("%s Adding tile to navmesh...\n", tileString); - // DT_TILE_FREE_DATA tells detour to unallocate memory when the tile - // is removed via removeTile() - dtStatus dtResult = navMesh->addTile(navData, navDataSize, DT_TILE_FREE_DATA, 0, &tileRef); - if (!tileRef || dtResult != DT_SUCCESS) - { - printf("%s Failed adding tile to navmesh! \n", tileString); - continue; - } - - // file output - char fileName[255]; - sprintf(fileName, "mmaps/%03u%02i%02i.mmtile", mapID, tileY, tileX); - FILE* file = fopen(fileName, "wb"); - if (!file) - { - char message[1024]; - sprintf(message, "[Map %03i] Failed to open %s for writing!\n", mapID, fileName); - perror(message); - navMesh->removeTile(tileRef, NULL, NULL); - continue; - } - - printf("%s Writing to file...\n", tileString); - - // write header - MmapTileHeader header; - header.usesLiquids = m_terrainBuilder->usesLiquids(); - header.size = uint32(navDataSize); - fwrite(&header, sizeof(MmapTileHeader), 1, file); - - // write data - fwrite(navData, sizeof(unsigned char), navDataSize, file); - fclose(file); - - // now that tile is written to disk, we can unload it - navMesh->removeTile(tileRef, NULL, NULL); - } - while (0); - - if (m_debugOutput) - { - // restore padding so that the debug visualization is correct - for (int i = 0; i < iv.polyMesh->nverts; ++i) - { - unsigned short* v = &iv.polyMesh->verts[i*3]; - v[0] += (unsigned short)config.borderSize; - v[2] += (unsigned short)config.borderSize; - } - - iv.generateObjFile(mapID, tileX, tileY, meshData); - iv.writeIV(mapID, tileX, tileY); - } - } - - /**************************************************************************/ - void MapBuilder::getTileBounds(uint32 tileX, uint32 tileY, float* verts, int vertCount, float* bmin, float* bmax) - { - // this is for elevation - if (verts && vertCount) - rcCalcBounds(verts, vertCount, bmin, bmax); - else - { - bmin[1] = FLT_MIN; - bmax[1] = FLT_MAX; - } - - // this is for width and depth - bmax[0] = (32 - int(tileX)) * GRID_SIZE; - bmax[2] = (32 - int(tileY)) * GRID_SIZE; - bmin[0] = bmax[0] - GRID_SIZE; - bmin[2] = bmax[2] - GRID_SIZE; - } - - /**************************************************************************/ - bool MapBuilder::shouldSkipMap(uint32 mapID) - { - if (m_skipContinents) - switch (mapID) - { - case 0: - case 1: - case 530: - case 571: - return true; - default: - break; - } - - if (m_skipJunkMaps) - switch (mapID) - { - case 13: // test.wdt - case 25: // ScottTest.wdt - case 29: // Test.wdt - case 42: // Colin.wdt - case 169: // EmeraldDream.wdt (unused, and very large) - case 451: // development.wdt - case 573: // ExteriorTest.wdt - case 597: // CraigTest.wdt - case 605: // development_nonweighted.wdt - case 606: // QA_DVD.wdt - return true; - default: - if (isTransportMap(mapID)) - return true; - break; - } - - if (m_skipBattlegrounds) - switch (mapID) - { - case 30: // AV - case 37: // ? - case 489: // WSG - case 529: // AB - case 566: // EotS - case 607: // SotA - case 628: // IoC - return true; - default: - break; - } - - return false; - } - - /**************************************************************************/ - bool MapBuilder::isTransportMap(uint32 mapID) - { - switch (mapID) - { - // transport maps - case 582: - case 584: - case 586: - case 587: - case 588: - case 589: - case 590: - case 591: - case 592: - case 593: - case 594: - case 596: - case 610: - case 612: - case 613: - case 614: - case 620: - case 621: - case 622: - case 623: - case 641: - case 642: - case 647: - case 672: - case 673: - case 712: - case 713: - case 718: - return true; - default: - return false; - } - } - - /**************************************************************************/ - bool MapBuilder::shouldSkipTile(uint32 mapID, uint32 tileX, uint32 tileY) - { - char fileName[255]; - sprintf(fileName, "mmaps/%03u%02i%02i.mmtile", mapID, tileY, tileX); - FILE* file = fopen(fileName, "rb"); - if (!file) - return false; - - MmapTileHeader header; - int count = fread(&header, sizeof(MmapTileHeader), 1, file); - fclose(file); - if (count != 1) - return false; - - if (header.mmapMagic != MMAP_MAGIC || header.dtVersion != uint32(DT_NAVMESH_VERSION)) - return false; - - if (header.mmapVersion != MMAP_VERSION) - return false; - - return true; - } - -} diff --git a/modules/acore/extractors/mmaps_generator/MapBuilder.h b/modules/acore/extractors/mmaps_generator/MapBuilder.h deleted file mode 100644 index c99b8da0ea..0000000000 --- a/modules/acore/extractors/mmaps_generator/MapBuilder.h +++ /dev/null @@ -1,175 +0,0 @@ -/* - * Copyright (C) 2016+ AzerothCore , released under GNU GPL v2 license: http://github.com/azerothcore/azerothcore-wotlk/LICENSE-GPL2 - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#ifndef _MAP_BUILDER_H -#define _MAP_BUILDER_H - -#include -#include -#include - -#include "TerrainBuilder.h" -#include "IntermediateValues.h" - -#include "Recast.h" -#include "DetourNavMesh.h" - -#include -#include -#include - -using namespace VMAP; - -// G3D namespace typedefs conflicts with ACE typedefs - -namespace MMAP -{ - typedef std::map*> TileList; - struct Tile - { - Tile() : chf(NULL), solid(NULL), cset(NULL), pmesh(NULL), dmesh(NULL) {} - ~Tile() - { - rcFreeCompactHeightfield(chf); - rcFreeContourSet(cset); - rcFreeHeightField(solid); - rcFreePolyMesh(pmesh); - rcFreePolyMeshDetail(dmesh); - } - rcCompactHeightfield* chf; - rcHeightfield* solid; - rcContourSet* cset; - rcPolyMesh* pmesh; - rcPolyMeshDetail* dmesh; - }; - - class MapBuilder - { - public: - MapBuilder(float maxWalkableAngle = 55.f, - bool skipLiquid = false, - bool skipContinents = false, - bool skipJunkMaps = true, - bool skipBattlegrounds = false, - bool debugOutput = false, - bool bigBaseUnit = false, - const char* offMeshFilePath = NULL); - - ~MapBuilder(); - - // builds all mmap tiles for the specified map id (ignores skip settings) - void buildMap(uint32 mapID); - void buildMeshFromFile(char* name); - - // builds an mmap tile for the specified map and its mesh - void buildSingleTile(uint32 mapID, uint32 tileX, uint32 tileY); - - // builds list of maps, then builds all of mmap tiles (based on the skip settings) - void buildAllMaps(int threads); - - private: - // detect maps and tiles - void discoverTiles(); - std::set* getTileList(uint32 mapID); - - void buildNavMesh(uint32 mapID, dtNavMesh* &navMesh); - - void buildTile(uint32 mapID, uint32 tileX, uint32 tileY, dtNavMesh* navMesh); - - // move map building - void buildMoveMapTile(uint32 mapID, - uint32 tileX, - uint32 tileY, - MeshData &meshData, - float bmin[3], - float bmax[3], - dtNavMesh* navMesh); - - void getTileBounds(uint32 tileX, uint32 tileY, - float* verts, int vertCount, - float* bmin, float* bmax); - void getGridBounds(uint32 mapID, uint32 &minX, uint32 &minY, uint32 &maxX, uint32 &maxY); - - bool shouldSkipMap(uint32 mapID); - bool isTransportMap(uint32 mapID); - bool shouldSkipTile(uint32 mapID, uint32 tileX, uint32 tileY); - - TerrainBuilder* m_terrainBuilder; - TileList m_tiles; - - bool m_debugOutput; - - const char* m_offMeshFilePath; - bool m_skipContinents; - bool m_skipJunkMaps; - bool m_skipBattlegrounds; - - float m_maxWalkableAngle; - bool m_bigBaseUnit; - - // build performance - not really used for now - rcContext* m_rcContext; - }; - - class MapBuildRequest : public ACE_Method_Request - { - public: - MapBuildRequest(uint32 mapId) : _mapId(mapId) {} - - virtual int call() - { - /// @ Actually a creative way of unabstracting the class and returning a member variable - return (int)_mapId; - } - - private: - uint32 _mapId; - }; - - class BuilderThread : public ACE_Task_Base - { - private: - MapBuilder* _builder; - ACE_Activation_Queue* _queue; - - public: - BuilderThread(MapBuilder* builder, ACE_Activation_Queue* queue) : _builder(builder), _queue(queue) { activate(); } - - int svc() - { - /// @ Set a timeout for dequeue attempts (only used when the queue is empty) as it will never get populated after thread starts - ACE_Time_Value timeout(5); - ACE_Method_Request* request = NULL; - while ((request = _queue->dequeue(&timeout)) != NULL) - { - _builder->buildMap(request->call()); - delete request; - request = NULL; - } - - return 0; - } - }; - - class BuilderThreadPool - { - public: - BuilderThreadPool() : _queue(new ACE_Activation_Queue()) {} - ~BuilderThreadPool() { _queue->queue()->close(); delete _queue; } - - void Enqueue(MapBuildRequest* request) - { - _queue->enqueue(request); - } - - ACE_Activation_Queue* Queue() { return _queue; } - - private: - ACE_Activation_Queue* _queue; - }; -} - -#endif diff --git a/modules/acore/extractors/mmaps_generator/PathCommon.h b/modules/acore/extractors/mmaps_generator/PathCommon.h deleted file mode 100644 index 477f974021..0000000000 --- a/modules/acore/extractors/mmaps_generator/PathCommon.h +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Copyright (C) 2016+ AzerothCore , released under GNU GPL v2 license: http://github.com/azerothcore/azerothcore-wotlk/LICENSE-GPL2 - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#ifndef _MMAP_COMMON_H -#define _MMAP_COMMON_H - -#include -#include -#include - -#include "Define.h" - -#ifndef _WIN32 - #include - #include -#endif - -#ifdef __linux__ - #include -#endif - -#include "Database/DatabaseEnv.h" - -enum NavTerrain -{ - NAV_EMPTY = 0x00, - NAV_GROUND = 0x01, - NAV_MAGMA = 0x02, - NAV_SLIME = 0x04, - NAV_WATER = 0x08, - NAV_UNUSED1 = 0x10, - NAV_UNUSED2 = 0x20, - NAV_UNUSED3 = 0x40, - NAV_UNUSED4 = 0x80 - // we only have 8 bits -}; - -namespace MMAP -{ - inline bool matchWildcardFilter(const char* filter, const char* str) - { - if (!filter || !str) - return false; - - // end on null character - while (*filter && *str) - { - if (*filter == '*') - { - if (*++filter == '\0') // wildcard at end of filter means all remaing chars match - return true; - - while (true) - { - if (*filter == *str) - break; - if (*str == '\0') - return false; // reached end of string without matching next filter character - str++; - } - } - else if (*filter != *str) - return false; // mismatch - - filter++; - str++; - } - - return ((*filter == '\0' || (*filter == '*' && *++filter == '\0')) && *str == '\0'); - } - - enum ListFilesResult - { - LISTFILE_DIRECTORY_NOT_FOUND = 0, - LISTFILE_OK = 1 - }; - - inline ListFilesResult getDirContents(std::vector &fileList, std::string dirpath = ".", std::string filter = "*") - { - #ifdef WIN32 - HANDLE hFind; - WIN32_FIND_DATA findFileInfo; - std::string directory; - - directory = dirpath + "/" + filter; - - hFind = FindFirstFile(directory.c_str(), &findFileInfo); - - if (hFind == INVALID_HANDLE_VALUE) - return LISTFILE_DIRECTORY_NOT_FOUND; - do - { - if ((findFileInfo.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0) - fileList.push_back(std::string(findFileInfo.cFileName)); - } - while (FindNextFile(hFind, &findFileInfo)); - - FindClose(hFind); - - #else - const char *p = dirpath.c_str(); - DIR * dirp = opendir(p); - struct dirent * dp; - - while (dirp) - { - errno = 0; - if ((dp = readdir(dirp)) != NULL) - { - if (matchWildcardFilter(filter.c_str(), dp->d_name)) - fileList.push_back(std::string(dp->d_name)); - } - else - break; - } - - if (dirp) - closedir(dirp); - else - return LISTFILE_DIRECTORY_NOT_FOUND; - #endif - - return LISTFILE_OK; - } - - inline uint32 getMSTime() - { - static const ACE_Time_Value ApplicationStartTime = ACE_OS::gettimeofday(); - return (ACE_OS::gettimeofday() - ApplicationStartTime).msec(); - } - - inline uint32 getMSTimeDiff(uint32 oldMSTime, uint32 newMSTime) - { - // getMSTime() have limited data range and this is case when it overflow in this tick - if (oldMSTime > newMSTime) - return (0xFFFFFFFF - oldMSTime) + newMSTime; - else - return newMSTime - oldMSTime; - } - - inline uint32 GetMSTimeDiffToNow(uint32 oldMSTime) - { - return getMSTimeDiff(oldMSTime, getMSTime()); - } -} - -#endif diff --git a/modules/acore/extractors/mmaps_generator/PathGenerator.cpp b/modules/acore/extractors/mmaps_generator/PathGenerator.cpp deleted file mode 100644 index 16201eba1a..0000000000 --- a/modules/acore/extractors/mmaps_generator/PathGenerator.cpp +++ /dev/null @@ -1,284 +0,0 @@ -/* - * Copyright (C) 2016+ AzerothCore , released under GNU GPL v2 license: http://github.com/azerothcore/azerothcore-wotlk/LICENSE-GPL2 - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#include "PathCommon.h" -#include "MapBuilder.h" - -using namespace MMAP; - -bool checkDirectories(bool debugOutput) -{ - std::vector dirFiles; - - if (getDirContents(dirFiles, "maps") == LISTFILE_DIRECTORY_NOT_FOUND || dirFiles.empty()) - { - printf("'maps' directory is empty or does not exist\n"); - return false; - } - - dirFiles.clear(); - if (getDirContents(dirFiles, "vmaps", "*.vmtree") == LISTFILE_DIRECTORY_NOT_FOUND || dirFiles.empty()) - { - printf("'vmaps' directory is empty or does not exist\n"); - return false; - } - - dirFiles.clear(); - if (getDirContents(dirFiles, "mmaps") == LISTFILE_DIRECTORY_NOT_FOUND) - { - printf("'mmaps' directory does not exist\n"); - return false; - } - - dirFiles.clear(); - if (debugOutput) - { - if (getDirContents(dirFiles, "meshes") == LISTFILE_DIRECTORY_NOT_FOUND) - { - printf("'meshes' directory does not exist (no place to put debugOutput files)\n"); - return false; - } - } - - return true; -} - -bool handleArgs(int argc, char** argv, - int &mapnum, - int &tileX, - int &tileY, - float &maxAngle, - bool &skipLiquid, - bool &skipContinents, - bool &skipJunkMaps, - bool &skipBattlegrounds, - bool &debugOutput, - bool &silent, - bool &bigBaseUnit, - char* &offMeshInputPath, - char* &file, - int& threads) -{ - char* param = NULL; - for (int i = 1; i < argc; ++i) - { - if (strcmp(argv[i], "--maxAngle") == 0) - { - param = argv[++i]; - if (!param) - return false; - - float maxangle = atof(param); - if (maxangle <= 90.f && maxangle >= 45.f) - maxAngle = maxangle; - else - printf("invalid option for '--maxAngle', using default\n"); - } - else if (strcmp(argv[i], "--threads") == 0) - { - param = argv[++i]; - if (!param) - return false; - threads = atoi(param); - printf("Using %i threads to extract mmaps\n", threads); - } - else if (strcmp(argv[i], "--file") == 0) - { - param = argv[++i]; - if (!param) - return false; - file = param; - } - else if (strcmp(argv[i], "--tile") == 0) - { - param = argv[++i]; - if (!param) - return false; - - char* stileX = strtok(param, ","); - char* stileY = strtok(NULL, ","); - int tilex = atoi(stileX); - int tiley = atoi(stileY); - - if ((tilex > 0 && tilex < 64) || (tilex == 0 && strcmp(stileX, "0") == 0)) - tileX = tilex; - if ((tiley > 0 && tiley < 64) || (tiley == 0 && strcmp(stileY, "0") == 0)) - tileY = tiley; - - if (tileX < 0 || tileY < 0) - { - printf("invalid tile coords.\n"); - return false; - } - } - else if (strcmp(argv[i], "--skipLiquid") == 0) - { - param = argv[++i]; - if (!param) - return false; - - if (strcmp(param, "true") == 0) - skipLiquid = true; - else if (strcmp(param, "false") == 0) - skipLiquid = false; - else - printf("invalid option for '--skipLiquid', using default\n"); - } - else if (strcmp(argv[i], "--skipContinents") == 0) - { - param = argv[++i]; - if (!param) - return false; - - if (strcmp(param, "true") == 0) - skipContinents = true; - else if (strcmp(param, "false") == 0) - skipContinents = false; - else - printf("invalid option for '--skipContinents', using default\n"); - } - else if (strcmp(argv[i], "--skipJunkMaps") == 0) - { - param = argv[++i]; - if (!param) - return false; - - if (strcmp(param, "true") == 0) - skipJunkMaps = true; - else if (strcmp(param, "false") == 0) - skipJunkMaps = false; - else - printf("invalid option for '--skipJunkMaps', using default\n"); - } - else if (strcmp(argv[i], "--skipBattlegrounds") == 0) - { - param = argv[++i]; - if (!param) - return false; - - if (strcmp(param, "true") == 0) - skipBattlegrounds = true; - else if (strcmp(param, "false") == 0) - skipBattlegrounds = false; - else - printf("invalid option for '--skipBattlegrounds', using default\n"); - } - else if (strcmp(argv[i], "--debugOutput") == 0) - { - param = argv[++i]; - if (!param) - return false; - - if (strcmp(param, "true") == 0) - debugOutput = true; - else if (strcmp(param, "false") == 0) - debugOutput = false; - else - printf("invalid option for '--debugOutput', using default true\n"); - } - else if (strcmp(argv[i], "--silent") == 0) - { - silent = true; - } - else if (strcmp(argv[i], "--bigBaseUnit") == 0) - { - param = argv[++i]; - if (!param) - return false; - - if (strcmp(param, "true") == 0) - bigBaseUnit = true; - else if (strcmp(param, "false") == 0) - bigBaseUnit = false; - else - printf("invalid option for '--bigBaseUnit', using default false\n"); - } - else if (strcmp(argv[i], "--offMeshInput") == 0) - { - param = argv[++i]; - if (!param) - return false; - - offMeshInputPath = param; - } - else - { - int map = atoi(argv[i]); - if (map > 0 || (map == 0 && (strcmp(argv[i], "0") == 0))) - mapnum = map; - else - { - printf("invalid map id\n"); - return false; - } - } - } - - return true; -} - -int finish(const char* message, int returnValue) -{ - printf("%s", message); - getchar(); // Wait for user input - return returnValue; -} - -int main(int argc, char** argv) -{ - int threads = 3, mapnum = -1; - float maxAngle = 55.0f; - int tileX = -1, tileY = -1; - bool skipLiquid = false, - skipContinents = false, - skipJunkMaps = true, - skipBattlegrounds = false, - debugOutput = false, - silent = false, - bigBaseUnit = false; - char* offMeshInputPath = NULL; - char* file = NULL; - - bool validParam = handleArgs(argc, argv, mapnum, - tileX, tileY, maxAngle, - skipLiquid, skipContinents, skipJunkMaps, skipBattlegrounds, - debugOutput, silent, bigBaseUnit, offMeshInputPath, file, threads); - - if (!validParam) - return silent ? -1 : finish("You have specified invalid parameters", -1); - - if (mapnum == -1 && debugOutput) - { - if (silent) - return -2; - - printf("You have specifed debug output, but didn't specify a map to generate.\n"); - printf("This will generate debug output for ALL maps.\n"); - printf("Are you sure you want to continue? (y/n) "); - if (getchar() != 'y') - return 0; - } - - if (!checkDirectories(debugOutput)) - return silent ? -3 : finish("Press any key to close...", -3); - - MapBuilder builder(maxAngle, skipLiquid, skipContinents, skipJunkMaps, - skipBattlegrounds, debugOutput, bigBaseUnit, offMeshInputPath); - - uint32 start = getMSTime(); - if (file) - builder.buildMeshFromFile(file); - else if (tileX > -1 && tileY > -1 && mapnum >= 0) - builder.buildSingleTile(mapnum, tileX, tileY); - else if (mapnum >= 0) - builder.buildMap(uint32(mapnum)); - else - builder.buildAllMaps(threads); - - if (!silent) - printf("Finished. MMAPS were built in %u ms!\n", GetMSTimeDiffToNow(start)); - return 0; -} diff --git a/modules/acore/extractors/mmaps_generator/TerrainBuilder.cpp b/modules/acore/extractors/mmaps_generator/TerrainBuilder.cpp deleted file mode 100644 index 260bb6da7e..0000000000 --- a/modules/acore/extractors/mmaps_generator/TerrainBuilder.cpp +++ /dev/null @@ -1,923 +0,0 @@ -/* - * Copyright (C) 2016+ AzerothCore , released under GNU GPL v2 license: http://github.com/azerothcore/azerothcore-wotlk/LICENSE-GPL2 - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#include "TerrainBuilder.h" - -#include "PathCommon.h" -#include "MapBuilder.h" - -#include "VMapManager2.h" -#include "MapTree.h" -#include "ModelInstance.h" -#include - -// ****************************************** -// Map file format defines -// ****************************************** -struct map_fileheader -{ - uint32 mapMagic; - uint32 versionMagic; - uint32 buildMagic; - uint32 areaMapOffset; - uint32 areaMapSize; - uint32 heightMapOffset; - uint32 heightMapSize; - uint32 liquidMapOffset; - uint32 liquidMapSize; - uint32 holesOffset; - uint32 holesSize; -}; - -#define MAP_HEIGHT_NO_HEIGHT 0x0001 -#define MAP_HEIGHT_AS_INT16 0x0002 -#define MAP_HEIGHT_AS_INT8 0x0004 - -struct map_heightHeader -{ - uint32 fourcc; - uint32 flags; - float gridHeight; - float gridMaxHeight; -}; - -#define MAP_LIQUID_NO_TYPE 0x0001 -#define MAP_LIQUID_NO_HEIGHT 0x0002 - -struct map_liquidHeader -{ - uint32 fourcc; - uint16 flags; - uint16 liquidType; - uint8 offsetX; - uint8 offsetY; - uint8 width; - uint8 height; - float liquidLevel; -}; - -#define MAP_LIQUID_TYPE_NO_WATER 0x00 -#define MAP_LIQUID_TYPE_WATER 0x01 -#define MAP_LIQUID_TYPE_OCEAN 0x02 -#define MAP_LIQUID_TYPE_MAGMA 0x04 -#define MAP_LIQUID_TYPE_SLIME 0x08 -#define MAP_LIQUID_TYPE_DARK_WATER 0x10 -#define MAP_LIQUID_TYPE_WMO_WATER 0x20 - -namespace MMAP -{ - - char const* MAP_VERSION_MAGIC = "v1.3"; - - TerrainBuilder::TerrainBuilder(bool skipLiquid) : m_skipLiquid (skipLiquid){ } - TerrainBuilder::~TerrainBuilder() { } - - /**************************************************************************/ - void TerrainBuilder::getLoopVars(Spot portion, int &loopStart, int &loopEnd, int &loopInc) - { - switch (portion) - { - case ENTIRE: - loopStart = 0; - loopEnd = V8_SIZE_SQ; - loopInc = 1; - break; - case TOP: - loopStart = 0; - loopEnd = V8_SIZE; - loopInc = 1; - break; - case LEFT: - loopStart = 0; - loopEnd = V8_SIZE_SQ - V8_SIZE + 1; - loopInc = V8_SIZE; - break; - case RIGHT: - loopStart = V8_SIZE - 1; - loopEnd = V8_SIZE_SQ; - loopInc = V8_SIZE; - break; - case BOTTOM: - loopStart = V8_SIZE_SQ - V8_SIZE; - loopEnd = V8_SIZE_SQ; - loopInc = 1; - break; - } - } - - /**************************************************************************/ - void TerrainBuilder::loadMap(uint32 mapID, uint32 tileX, uint32 tileY, MeshData &meshData) - { - if (loadMap(mapID, tileX, tileY, meshData, ENTIRE)) - { - loadMap(mapID, tileX+1, tileY, meshData, LEFT); - loadMap(mapID, tileX-1, tileY, meshData, RIGHT); - loadMap(mapID, tileX, tileY+1, meshData, TOP); - loadMap(mapID, tileX, tileY-1, meshData, BOTTOM); - } - } - - /**************************************************************************/ - bool TerrainBuilder::loadMap(uint32 mapID, uint32 tileX, uint32 tileY, MeshData &meshData, Spot portion) - { - char mapFileName[255]; - sprintf(mapFileName, "maps/%03u%02u%02u.map", mapID, tileY, tileX); - - FILE* mapFile = fopen(mapFileName, "rb"); - if (!mapFile) - return false; - - map_fileheader fheader; - if (fread(&fheader, sizeof(map_fileheader), 1, mapFile) != 1 || - fheader.versionMagic != *((uint32 const*)(MAP_VERSION_MAGIC))) - { - fclose(mapFile); - printf("%s is the wrong version, please extract new .map files\n", mapFileName); - return false; - } - - map_heightHeader hheader; - fseek(mapFile, fheader.heightMapOffset, SEEK_SET); - - bool haveTerrain = false; - bool haveLiquid = false; - if (fread(&hheader, sizeof(map_heightHeader), 1, mapFile) == 1) - { - haveTerrain = !(hheader.flags & MAP_HEIGHT_NO_HEIGHT); - haveLiquid = fheader.liquidMapOffset && !m_skipLiquid; - } - - // no data in this map file - if (!haveTerrain && !haveLiquid) - { - fclose(mapFile); - return false; - } - - // data used later - uint16 holes[16][16]; - memset(holes, 0, sizeof(holes)); - uint8 liquid_type[16][16]; - memset(liquid_type, 0, sizeof(liquid_type)); - G3D::Array ltriangles; - G3D::Array ttriangles; - - // terrain data - if (haveTerrain) - { - float heightMultiplier; - float V9[V9_SIZE_SQ], V8[V8_SIZE_SQ]; - int expected = V9_SIZE_SQ + V8_SIZE_SQ; - - if (hheader.flags & MAP_HEIGHT_AS_INT8) - { - uint8 v9[V9_SIZE_SQ]; - uint8 v8[V8_SIZE_SQ]; - int count = 0; - count += fread(v9, sizeof(uint8), V9_SIZE_SQ, mapFile); - count += fread(v8, sizeof(uint8), V8_SIZE_SQ, mapFile); - if (count != expected) - printf("TerrainBuilder::loadMap: Failed to read some data expected %d, read %d\n", expected, count); - - heightMultiplier = (hheader.gridMaxHeight - hheader.gridHeight) / 255; - - for (int i = 0; i < V9_SIZE_SQ; ++i) - V9[i] = (float)v9[i]*heightMultiplier + hheader.gridHeight; - - for (int i = 0; i < V8_SIZE_SQ; ++i) - V8[i] = (float)v8[i]*heightMultiplier + hheader.gridHeight; - } - else if (hheader.flags & MAP_HEIGHT_AS_INT16) - { - uint16 v9[V9_SIZE_SQ]; - uint16 v8[V8_SIZE_SQ]; - int count = 0; - count += fread(v9, sizeof(uint16), V9_SIZE_SQ, mapFile); - count += fread(v8, sizeof(uint16), V8_SIZE_SQ, mapFile); - if (count != expected) - printf("TerrainBuilder::loadMap: Failed to read some data expected %d, read %d\n", expected, count); - - heightMultiplier = (hheader.gridMaxHeight - hheader.gridHeight) / 65535; - - for (int i = 0; i < V9_SIZE_SQ; ++i) - V9[i] = (float)v9[i]*heightMultiplier + hheader.gridHeight; - - for (int i = 0; i < V8_SIZE_SQ; ++i) - V8[i] = (float)v8[i]*heightMultiplier + hheader.gridHeight; - } - else - { - int count = 0; - count += fread(V9, sizeof(float), V9_SIZE_SQ, mapFile); - count += fread(V8, sizeof(float), V8_SIZE_SQ, mapFile); - if (count != expected) - printf("TerrainBuilder::loadMap: Failed to read some data expected %d, read %d\n", expected, count); - } - - // hole data - if (fheader.holesSize != 0) - { - memset(holes, 0, fheader.holesSize); - fseek(mapFile, fheader.holesOffset, SEEK_SET); - if (fread(holes, fheader.holesSize, 1, mapFile) != 1) - printf("TerrainBuilder::loadMap: Failed to read some data expected 1, read 0\n"); - } - - int count = meshData.solidVerts.size() / 3; - float xoffset = (float(tileX)-32)*GRID_SIZE; - float yoffset = (float(tileY)-32)*GRID_SIZE; - - float coord[3]; - - for (int i = 0; i < V9_SIZE_SQ; ++i) - { - getHeightCoord(i, GRID_V9, xoffset, yoffset, coord, V9); - meshData.solidVerts.append(coord[0]); - meshData.solidVerts.append(coord[2]); - meshData.solidVerts.append(coord[1]); - } - - for (int i = 0; i < V8_SIZE_SQ; ++i) - { - getHeightCoord(i, GRID_V8, xoffset, yoffset, coord, V8); - meshData.solidVerts.append(coord[0]); - meshData.solidVerts.append(coord[2]); - meshData.solidVerts.append(coord[1]); - } - - int indices[] = { 0, 0, 0 }; - int loopStart = 0, loopEnd = 0, loopInc = 0; - getLoopVars(portion, loopStart, loopEnd, loopInc); - for (int i = loopStart; i < loopEnd; i+=loopInc) - for (int j = TOP; j <= BOTTOM; j+=1) - { - getHeightTriangle(i, Spot(j), indices); - ttriangles.append(indices[2] + count); - ttriangles.append(indices[1] + count); - ttriangles.append(indices[0] + count); - } - } - - // liquid data - if (haveLiquid) - { - map_liquidHeader lheader; - fseek(mapFile, fheader.liquidMapOffset, SEEK_SET); - if (fread(&lheader, sizeof(map_liquidHeader), 1, mapFile) != 1) - printf("TerrainBuilder::loadMap: Failed to read some data expected 1, read 0\n"); - - - float* liquid_map = NULL; - - if (!(lheader.flags & MAP_LIQUID_NO_TYPE)) - if (fread(liquid_type, sizeof(liquid_type), 1, mapFile) != 1) - printf("TerrainBuilder::loadMap: Failed to read some data expected 1, read 0\n"); - - if (!(lheader.flags & MAP_LIQUID_NO_HEIGHT)) - { - uint32 toRead = lheader.width * lheader.height; - liquid_map = new float [toRead]; - if (fread(liquid_map, sizeof(float), toRead, mapFile) != toRead) - printf("TerrainBuilder::loadMap: Failed to read some data expected 1, read 0\n"); - } - - if (liquid_map) - { - int count = meshData.liquidVerts.size() / 3; - float xoffset = (float(tileX)-32)*GRID_SIZE; - float yoffset = (float(tileY)-32)*GRID_SIZE; - - float coord[3]; - int row, col; - - // generate coordinates - if (!(lheader.flags & MAP_LIQUID_NO_HEIGHT)) - { - int j = 0; - for (int i = 0; i < V9_SIZE_SQ; ++i) - { - row = i / V9_SIZE; - col = i % V9_SIZE; - - if (row < lheader.offsetY || row >= lheader.offsetY + lheader.height || - col < lheader.offsetX || col >= lheader.offsetX + lheader.width) - { - // dummy vert using invalid height - meshData.liquidVerts.append((xoffset+col*GRID_PART_SIZE)*-1, INVALID_MAP_LIQ_HEIGHT, (yoffset+row*GRID_PART_SIZE)*-1); - continue; - } - - getLiquidCoord(i, j, xoffset, yoffset, coord, liquid_map); - meshData.liquidVerts.append(coord[0]); - meshData.liquidVerts.append(coord[2]); - meshData.liquidVerts.append(coord[1]); - j++; - } - } - else - { - for (int i = 0; i < V9_SIZE_SQ; ++i) - { - row = i / V9_SIZE; - col = i % V9_SIZE; - meshData.liquidVerts.append((xoffset+col*GRID_PART_SIZE)*-1, lheader.liquidLevel, (yoffset+row*GRID_PART_SIZE)*-1); - } - } - - delete [] liquid_map; - - int indices[] = { 0, 0, 0 }; - int loopStart = 0, loopEnd = 0, loopInc = 0, triInc = BOTTOM-TOP; - getLoopVars(portion, loopStart, loopEnd, loopInc); - - // generate triangles - for (int i = loopStart; i < loopEnd; i+=loopInc) - for (int j = TOP; j <= BOTTOM; j+= triInc) - { - getHeightTriangle(i, Spot(j), indices, true); - ltriangles.append(indices[2] + count); - ltriangles.append(indices[1] + count); - ltriangles.append(indices[0] + count); - } - } - } - - fclose(mapFile); - - // now that we have gathered the data, we can figure out which parts to keep: - // liquid above ground, ground above liquid - int loopStart = 0, loopEnd = 0, loopInc = 0, tTriCount = 4; - bool useTerrain, useLiquid; - - float* lverts = meshData.liquidVerts.getCArray(); - int* ltris = ltriangles.getCArray(); - - float* tverts = meshData.solidVerts.getCArray(); - int* ttris = ttriangles.getCArray(); - - if ((ltriangles.size() + ttriangles.size()) == 0) - return false; - - // make a copy of liquid vertices - // used to pad right-bottom frame due to lost vertex data at extraction - float* lverts_copy = NULL; - if (meshData.liquidVerts.size()) - { - lverts_copy = new float[meshData.liquidVerts.size()]; - memcpy(lverts_copy, lverts, sizeof(float)*meshData.liquidVerts.size()); - } - - getLoopVars(portion, loopStart, loopEnd, loopInc); - for (int i = loopStart; i < loopEnd; i+=loopInc) - { - for (int j = 0; j < 2; ++j) - { - // default is true, will change to false if needed - useTerrain = true; - useLiquid = true; - uint8 liquidType = MAP_LIQUID_TYPE_NO_WATER; - // FIXME: "warning: the address of ‘liquid_type’ will always evaluate as ‘true’" - - // if there is no liquid, don't use liquid - if (!meshData.liquidVerts.size() || !ltriangles.size()) - useLiquid = false; - else - { - liquidType = getLiquidType(i, liquid_type); - switch (liquidType) - { - default: - useLiquid = false; - break; - case MAP_LIQUID_TYPE_WATER: - case MAP_LIQUID_TYPE_OCEAN: - // merge different types of water - liquidType = NAV_WATER; - break; - case MAP_LIQUID_TYPE_MAGMA: - liquidType = NAV_MAGMA; - break; - case MAP_LIQUID_TYPE_SLIME: - liquidType = NAV_SLIME; - break; - case MAP_LIQUID_TYPE_DARK_WATER: - // players should not be here, so logically neither should creatures - useTerrain = false; - useLiquid = false; - break; - } - } - - // if there is no terrain, don't use terrain - if (!ttriangles.size()) - useTerrain = false; - - // while extracting ADT data we are losing right-bottom vertices - // this code adds fair approximation of lost data - if (useLiquid) - { - float quadHeight = 0; - uint32 validCount = 0; - for(uint32 idx = 0; idx < 3; idx++) - { - float h = lverts_copy[ltris[idx]*3 + 1]; - if (h != INVALID_MAP_LIQ_HEIGHT && h < INVALID_MAP_LIQ_HEIGHT_MAX) - { - quadHeight += h; - validCount++; - } - } - - // update vertex height data - if (validCount > 0 && validCount < 3) - { - quadHeight /= validCount; - for(uint32 idx = 0; idx < 3; idx++) - { - float h = lverts[ltris[idx]*3 + 1]; - if (h == INVALID_MAP_LIQ_HEIGHT || h > INVALID_MAP_LIQ_HEIGHT_MAX) - lverts[ltris[idx]*3 + 1] = quadHeight; - } - } - - // no valid vertexes - don't use this poly at all - if (validCount == 0) - useLiquid = false; - } - - // if there is a hole here, don't use the terrain - if (useTerrain && fheader.holesSize != 0) - useTerrain = !isHole(i, holes); - - // we use only one terrain kind per quad - pick higher one - if (useTerrain && useLiquid) - { - float minLLevel = INVALID_MAP_LIQ_HEIGHT_MAX; - float maxLLevel = INVALID_MAP_LIQ_HEIGHT; - for(uint32 x = 0; x < 3; x++) - { - float h = lverts[ltris[x]*3 + 1]; - if (minLLevel > h) - minLLevel = h; - - if (maxLLevel < h) - maxLLevel = h; - } - - float maxTLevel = INVALID_MAP_LIQ_HEIGHT; - float minTLevel = INVALID_MAP_LIQ_HEIGHT_MAX; - for(uint32 x = 0; x < 6; x++) - { - float h = tverts[ttris[x]*3 + 1]; - if (maxTLevel < h) - maxTLevel = h; - - if (minTLevel > h) - minTLevel = h; - } - - // terrain under the liquid? - if (minLLevel > maxTLevel) - useTerrain = false; - - //liquid under the terrain? - if (minTLevel > maxLLevel) - useLiquid = false; - } - - // store the result - if (useLiquid) - { - meshData.liquidType.append(liquidType); - for (int k = 0; k < 3; ++k) - meshData.liquidTris.append(ltris[k]); - } - - if (useTerrain) - for (int k = 0; k < 3*tTriCount/2; ++k) - meshData.solidTris.append(ttris[k]); - - // advance to next set of triangles - ltris += 3; - ttris += 3*tTriCount/2; - } - } - - if (lverts_copy) - delete [] lverts_copy; - - return meshData.solidTris.size() || meshData.liquidTris.size(); - } - - /**************************************************************************/ - void TerrainBuilder::getHeightCoord(int index, Grid grid, float xOffset, float yOffset, float* coord, float* v) - { - // wow coords: x, y, height - // coord is mirroed about the horizontal axes - switch (grid) - { - case GRID_V9: - coord[0] = (xOffset + index%(V9_SIZE)*GRID_PART_SIZE) * -1.f; - coord[1] = (yOffset + (int)(index/(V9_SIZE))*GRID_PART_SIZE) * -1.f; - coord[2] = v[index]; - break; - case GRID_V8: - coord[0] = (xOffset + index%(V8_SIZE)*GRID_PART_SIZE + GRID_PART_SIZE/2.f) * -1.f; - coord[1] = (yOffset + (int)(index/(V8_SIZE))*GRID_PART_SIZE + GRID_PART_SIZE/2.f) * -1.f; - coord[2] = v[index]; - break; - } - } - - /**************************************************************************/ - void TerrainBuilder::getHeightTriangle(int square, Spot triangle, int* indices, bool liquid/* = false*/) - { - int rowOffset = square/V8_SIZE; - if (!liquid) - switch (triangle) - { - case TOP: - indices[0] = square+rowOffset; // 0-----1 .... 128 - indices[1] = square+1+rowOffset; // |\ T /| - indices[2] = (V9_SIZE_SQ)+square; // | \ / | - break; // |L 0 R| .. 127 - case LEFT: // | / \ | - indices[0] = square+rowOffset; // |/ B \| - indices[1] = (V9_SIZE_SQ)+square; // 129---130 ... 386 - indices[2] = square+V9_SIZE+rowOffset; // |\ /| - break; // | \ / | - case RIGHT: // | 128 | .. 255 - indices[0] = square+1+rowOffset; // | / \ | - indices[1] = square+V9_SIZE+1+rowOffset; // |/ \| - indices[2] = (V9_SIZE_SQ)+square; // 258---259 ... 515 - break; - case BOTTOM: - indices[0] = (V9_SIZE_SQ)+square; - indices[1] = square+V9_SIZE+1+rowOffset; - indices[2] = square+V9_SIZE+rowOffset; - break; - default: break; - } - else - switch (triangle) - { // 0-----1 .... 128 - case TOP: // |\ | - indices[0] = square+rowOffset; // | \ T | - indices[1] = square+1+rowOffset; // | \ | - indices[2] = square+V9_SIZE+1+rowOffset; // | B \ | - break; // | \| - case BOTTOM: // 129---130 ... 386 - indices[0] = square+rowOffset; // |\ | - indices[1] = square+V9_SIZE+1+rowOffset; // | \ | - indices[2] = square+V9_SIZE+rowOffset; // | \ | - break; // | \ | - default: break; // | \| - } // 258---259 ... 515 - - } - - /**************************************************************************/ - void TerrainBuilder::getLiquidCoord(int index, int index2, float xOffset, float yOffset, float* coord, float* v) - { - // wow coords: x, y, height - // coord is mirroed about the horizontal axes - coord[0] = (xOffset + index%(V9_SIZE)*GRID_PART_SIZE) * -1.f; - coord[1] = (yOffset + (int)(index/(V9_SIZE))*GRID_PART_SIZE) * -1.f; - coord[2] = v[index2]; - } - - static uint16 holetab_h[4] = {0x1111, 0x2222, 0x4444, 0x8888}; - static uint16 holetab_v[4] = {0x000F, 0x00F0, 0x0F00, 0xF000}; - - /**************************************************************************/ - bool TerrainBuilder::isHole(int square, const uint16 holes[16][16]) - { - int row = square / 128; - int col = square % 128; - int cellRow = row / 8; // 8 squares per cell - int cellCol = col / 8; - int holeRow = row % 8 / 2; - int holeCol = (square - (row * 128 + cellCol * 8)) / 2; - - uint16 hole = holes[cellRow][cellCol]; - - return (hole & holetab_h[holeCol] & holetab_v[holeRow]) != 0; - } - - /**************************************************************************/ - uint8 TerrainBuilder::getLiquidType(int square, const uint8 liquid_type[16][16]) - { - int row = square / 128; - int col = square % 128; - int cellRow = row / 8; // 8 squares per cell - int cellCol = col / 8; - - return liquid_type[cellRow][cellCol]; - } - - /**************************************************************************/ - bool TerrainBuilder::loadVMap(uint32 mapID, uint32 tileX, uint32 tileY, MeshData &meshData) - { - IVMapManager* vmapManager = new VMapManager2(); - int result = vmapManager->loadMap("vmaps", mapID, tileX, tileY); - bool retval = false; - - do - { - if (result == VMAP_LOAD_RESULT_ERROR) - break; - - InstanceTreeMap instanceTrees; - ((VMapManager2*)vmapManager)->getInstanceMapTree(instanceTrees); - - if (!instanceTrees[mapID]) - break; - - ModelInstance* models = NULL; - uint32 count = 0; - instanceTrees[mapID]->getModelInstances(models, count); - - if (!models) - break; - - for (uint32 i = 0; i < count; ++i) - { - ModelInstance instance = models[i]; - - // model instances exist in tree even though there are instances of that model in this tile - WorldModel* worldModel = instance.getWorldModel(); - if (!worldModel) - continue; - - // now we have a model to add to the meshdata - retval = true; - - std::vector groupModels; - worldModel->getGroupModels(groupModels); - - // all M2s need to have triangle indices reversed - bool isM2 = instance.name.find(".m2") != std::string::npos || instance.name.find(".M2") != std::string::npos; - - // transform data - float scale = instance.iScale; - G3D::Matrix3 rotation = G3D::Matrix3::fromEulerAnglesXYZ(G3D::pi()*instance.iRot.z/-180.f, G3D::pi()*instance.iRot.x/-180.f, G3D::pi()*instance.iRot.y/-180.f); - G3D::Vector3 position = instance.iPos; - position.x -= 32*GRID_SIZE; - position.y -= 32*GRID_SIZE; - - for (std::vector::iterator it = groupModels.begin(); it != groupModels.end(); ++it) - { - std::vector tempVertices; - std::vector transformedVertices; - std::vector tempTriangles; - WmoLiquid* liquid = NULL; - - it->getMeshData(tempVertices, tempTriangles, liquid); - - // first handle collision mesh - transform(tempVertices, transformedVertices, scale, rotation, position); - - int offset = meshData.solidVerts.size() / 3; - - copyVertices(transformedVertices, meshData.solidVerts); - copyIndices(tempTriangles, meshData.solidTris, offset, isM2); - - // now handle liquid data - if (liquid) - { - std::vector liqVerts; - std::vector liqTris; - uint32 tilesX, tilesY, vertsX, vertsY; - G3D::Vector3 corner; - liquid->getPosInfo(tilesX, tilesY, corner); - vertsX = tilesX + 1; - vertsY = tilesY + 1; - uint8* flags = liquid->GetFlagsStorage(); - float* data = liquid->GetHeightStorage(); - uint8 type = NAV_EMPTY; - - // convert liquid type to NavTerrain - switch (liquid->GetType()) - { - case 0: - case 1: - type = NAV_WATER; - break; - case 2: - type = NAV_MAGMA; - break; - case 3: - type = NAV_SLIME; - break; - } - - // indexing is weird... - // after a lot of trial and error, this is what works: - // vertex = y*vertsX+x - // tile = x*tilesY+y - // flag = y*tilesY+x - - G3D::Vector3 vert; - for (uint32 x = 0; x < vertsX; ++x) - for (uint32 y = 0; y < vertsY; ++y) - { - vert = G3D::Vector3(corner.x + x * GRID_PART_SIZE, corner.y + y * GRID_PART_SIZE, data[y*vertsX + x]); - vert = vert * rotation * scale + position; - vert.x *= -1.f; - vert.y *= -1.f; - liqVerts.push_back(vert); - } - - int idx1, idx2, idx3, idx4; - uint32 square; - for (uint32 x = 0; x < tilesX; ++x) - for (uint32 y = 0; y < tilesY; ++y) - if ((flags[x+y*tilesX] & 0x0f) != 0x0f) - { - square = x * tilesY + y; - idx1 = square+x; - idx2 = square+1+x; - idx3 = square+tilesY+1+1+x; - idx4 = square+tilesY+1+x; - - // top triangle - liqTris.push_back(idx3); - liqTris.push_back(idx2); - liqTris.push_back(idx1); - // bottom triangle - liqTris.push_back(idx4); - liqTris.push_back(idx3); - liqTris.push_back(idx1); - } - - uint32 liqOffset = meshData.liquidVerts.size() / 3; - for (uint32 i = 0; i < liqVerts.size(); ++i) - meshData.liquidVerts.append(liqVerts[i].y, liqVerts[i].z, liqVerts[i].x); - - for (uint32 i = 0; i < liqTris.size() / 3; ++i) - { - meshData.liquidTris.append(liqTris[i*3+1] + liqOffset, liqTris[i*3+2] + liqOffset, liqTris[i*3] + liqOffset); - meshData.liquidType.append(type); - } - } - } - } - } - while (false); - - vmapManager->unloadMap(mapID, tileX, tileY); - delete vmapManager; - - return retval; - } - - /**************************************************************************/ - void TerrainBuilder::transform(std::vector &source, std::vector &transformedVertices, float scale, G3D::Matrix3 &rotation, G3D::Vector3 &position) - { - for (std::vector::iterator it = source.begin(); it != source.end(); ++it) - { - // apply tranform, then mirror along the horizontal axes - G3D::Vector3 v((*it) * rotation * scale + position); - v.x *= -1.f; - v.y *= -1.f; - transformedVertices.push_back(v); - } - } - - /**************************************************************************/ - void TerrainBuilder::copyVertices(std::vector &source, G3D::Array &dest) - { - for (std::vector::iterator it = source.begin(); it != source.end(); ++it) - { - dest.push_back((*it).y); - dest.push_back((*it).z); - dest.push_back((*it).x); - } - } - - /**************************************************************************/ - void TerrainBuilder::copyIndices(std::vector &source, G3D::Array &dest, int offset, bool flip) - { - if (flip) - { - for (std::vector::iterator it = source.begin(); it != source.end(); ++it) - { - dest.push_back((*it).idx2+offset); - dest.push_back((*it).idx1+offset); - dest.push_back((*it).idx0+offset); - } - } - else - { - for (std::vector::iterator it = source.begin(); it != source.end(); ++it) - { - dest.push_back((*it).idx0+offset); - dest.push_back((*it).idx1+offset); - dest.push_back((*it).idx2+offset); - } - } - } - - /**************************************************************************/ - void TerrainBuilder::copyIndices(G3D::Array &source, G3D::Array &dest, int offset) - { - int* src = source.getCArray(); - for (int32 i = 0; i < source.size(); ++i) - dest.append(src[i] + offset); - } - - /**************************************************************************/ - void TerrainBuilder::cleanVertices(G3D::Array &verts, G3D::Array &tris) - { - std::map vertMap; - - int* t = tris.getCArray(); - float* v = verts.getCArray(); - - G3D::Array cleanVerts; - int index, count = 0; - // collect all the vertex indices from triangle - for (int i = 0; i < tris.size(); ++i) - { - if (vertMap.find(t[i]) != vertMap.end()) - continue; - std::pair val; - val.first = t[i]; - - index = val.first; - val.second = count; - - vertMap.insert(val); - cleanVerts.append(v[index * 3], v[index * 3 + 1], v[index * 3 + 2]); - count++; - } - - verts.fastClear(); - verts.append(cleanVerts); - cleanVerts.clear(); - - // update triangles to use new indices - for (int i = 0; i < tris.size(); ++i) - { - std::map::iterator it; - if ((it = vertMap.find(t[i])) == vertMap.end()) - continue; - - t[i] = (*it).second; - } - - vertMap.clear(); - } - - /**************************************************************************/ - void TerrainBuilder::loadOffMeshConnections(uint32 mapID, uint32 tileX, uint32 tileY, MeshData &meshData, const char* offMeshFilePath) - { - // no meshfile input given? - if (offMeshFilePath == NULL) - return; - - FILE* fp = fopen(offMeshFilePath, "rb"); - if (!fp) - { - printf(" loadOffMeshConnections:: input file %s not found!\n", offMeshFilePath); - return; - } - - // pretty silly thing, as we parse entire file and load only the tile we need - // but we don't expect this file to be too large - char* buf = new char[512]; - while(fgets(buf, 512, fp)) - { - float p0[3], p1[3]; - uint32 mid, tx, ty; - float size; - if (sscanf(buf, "%d %d,%d (%f %f %f) (%f %f %f) %f", &mid, &tx, &ty, - &p0[0], &p0[1], &p0[2], &p1[0], &p1[1], &p1[2], &size) != 10) - continue; - - if (mapID == mid && tileX == tx && tileY == ty) - { - meshData.offMeshConnections.append(p0[1]); - meshData.offMeshConnections.append(p0[2]); - meshData.offMeshConnections.append(p0[0]); - - meshData.offMeshConnections.append(p1[1]); - meshData.offMeshConnections.append(p1[2]); - meshData.offMeshConnections.append(p1[0]); - - meshData.offMeshConnectionDirs.append(1); // 1 - both direction, 0 - one sided - meshData.offMeshConnectionRads.append(size); // agent size equivalent - // can be used same way as polygon flags - meshData.offMeshConnectionsAreas.append((unsigned char)0xFF); - meshData.offMeshConnectionsFlags.append((unsigned short)0xFF); // all movement masks can make this path - } - - } - - delete [] buf; - fclose(fp); - } -} diff --git a/modules/acore/extractors/mmaps_generator/TerrainBuilder.h b/modules/acore/extractors/mmaps_generator/TerrainBuilder.h deleted file mode 100644 index d7f9a5a817..0000000000 --- a/modules/acore/extractors/mmaps_generator/TerrainBuilder.h +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright (C) 2016+ AzerothCore , released under GNU GPL v2 license: http://github.com/azerothcore/azerothcore-wotlk/LICENSE-GPL2 - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#ifndef _MMAP_TERRAIN_BUILDER_H -#define _MMAP_TERRAIN_BUILDER_H - -#include "PathCommon.h" -#include "WorldModel.h" - -#include "G3D/Array.h" -#include "G3D/Vector3.h" -#include "G3D/Matrix3.h" - -namespace MMAP -{ - enum Spot - { - TOP = 1, - RIGHT = 2, - LEFT = 3, - BOTTOM = 4, - ENTIRE = 5 - }; - - enum Grid - { - GRID_V8, - GRID_V9 - }; - - static const int V9_SIZE = 129; - static const int V9_SIZE_SQ = V9_SIZE*V9_SIZE; - static const int V8_SIZE = 128; - static const int V8_SIZE_SQ = V8_SIZE*V8_SIZE; - static const float GRID_SIZE = 533.3333f; - static const float GRID_PART_SIZE = GRID_SIZE/V8_SIZE; - - // see contrib/extractor/system.cpp, CONF_use_minHeight - static const float INVALID_MAP_LIQ_HEIGHT = -500.f; - static const float INVALID_MAP_LIQ_HEIGHT_MAX = 5000.0f; - - // see following files: - // contrib/extractor/system.cpp - // src/game/Map.cpp - - struct MeshData - { - G3D::Array solidVerts; - G3D::Array solidTris; - - G3D::Array liquidVerts; - G3D::Array liquidTris; - G3D::Array liquidType; - - // offmesh connection data - G3D::Array offMeshConnections; // [p0y,p0z,p0x,p1y,p1z,p1x] - per connection - G3D::Array offMeshConnectionRads; - G3D::Array offMeshConnectionDirs; - G3D::Array offMeshConnectionsAreas; - G3D::Array offMeshConnectionsFlags; - }; - - class TerrainBuilder - { - public: - TerrainBuilder(bool skipLiquid); - ~TerrainBuilder(); - - void loadMap(uint32 mapID, uint32 tileX, uint32 tileY, MeshData &meshData); - bool loadVMap(uint32 mapID, uint32 tileX, uint32 tileY, MeshData &meshData); - void loadOffMeshConnections(uint32 mapID, uint32 tileX, uint32 tileY, MeshData &meshData, const char* offMeshFilePath); - - bool usesLiquids() { return !m_skipLiquid; } - - // vert and triangle methods - static void transform(std::vector &original, std::vector &transformed, - float scale, G3D::Matrix3 &rotation, G3D::Vector3 &position); - static void copyVertices(std::vector &source, G3D::Array &dest); - static void copyIndices(std::vector &source, G3D::Array &dest, int offest, bool flip); - static void copyIndices(G3D::Array &src, G3D::Array &dest, int offset); - static void cleanVertices(G3D::Array &verts, G3D::Array &tris); - private: - /// Loads a portion of a map's terrain - bool loadMap(uint32 mapID, uint32 tileX, uint32 tileY, MeshData &meshData, Spot portion); - - /// Sets loop variables for selecting only certain parts of a map's terrain - void getLoopVars(Spot portion, int &loopStart, int &loopEnd, int &loopInc); - - /// Controls whether liquids are loaded - bool m_skipLiquid; - - /// Load the map terrain from file - bool loadHeightMap(uint32 mapID, uint32 tileX, uint32 tileY, G3D::Array &vertices, G3D::Array &triangles, Spot portion); - - /// Get the vector coordinate for a specific position - void getHeightCoord(int index, Grid grid, float xOffset, float yOffset, float* coord, float* v); - - /// Get the triangle's vector indices for a specific position - void getHeightTriangle(int square, Spot triangle, int* indices, bool liquid = false); - - /// Determines if the specific position's triangles should be rendered - bool isHole(int square, const uint16 holes[16][16]); - - /// Get the liquid vector coordinate for a specific position - void getLiquidCoord(int index, int index2, float xOffset, float yOffset, float* coord, float* v); - - /// Get the liquid type for a specific position - uint8 getLiquidType(int square, const uint8 liquid_type[16][16]); - - // hide parameterless and copy constructor - TerrainBuilder(); - TerrainBuilder(const TerrainBuilder &tb); - }; -} - -#endif - diff --git a/modules/acore/extractors/mmaps_generator/VMapExtensions.cpp b/modules/acore/extractors/mmaps_generator/VMapExtensions.cpp deleted file mode 100644 index ee3b028d63..0000000000 --- a/modules/acore/extractors/mmaps_generator/VMapExtensions.cpp +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (C) 2016+ AzerothCore , released under GNU GPL v2 license: http://github.com/azerothcore/azerothcore-wotlk/LICENSE-GPL2 - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#include -#include "MapTree.h" -#include "VMapManager2.h" -#include "WorldModel.h" -#include "ModelInstance.h" - -#include "Database/DatabaseEnv.h" -LoginDatabaseWorkerPool LoginDatabase; -WorldDatabaseWorkerPool WorldDatabase; - -namespace VMAP -{ - // Need direct access to encapsulated VMAP data, so we add functions for MMAP generator - // maybe add MapBuilder as friend to all of the below classes would be better? - - // declared in src/shared/vmap/MapTree.h - void StaticMapTree::getModelInstances(ModelInstance* &models, uint32 &count) - { - models = iTreeValues; - count = iNTreeValues; - } - - // declared in src/shared/vmap/VMapManager2.h - void VMapManager2::getInstanceMapTree(InstanceTreeMap &instanceMapTree) - { - instanceMapTree = iInstanceMapTrees; - } - - // declared in src/shared/vmap/WorldModel.h - void WorldModel::getGroupModels(std::vector &groupModels) - { - groupModels = this->groupModels; - } - - // declared in src/shared/vmap/WorldModel.h - void GroupModel::getMeshData(std::vector &vertices, std::vector &triangles, WmoLiquid* &liquid) - { - vertices = this->vertices; - triangles = this->triangles; - liquid = iLiquid; - } - - // declared in src/shared/vmap/ModelInstance.h - WorldModel* ModelInstance::getWorldModel() - { - return iModel; - } - - // declared in src/shared/vmap/WorldModel.h - void WmoLiquid::getPosInfo(uint32 &tilesX, uint32 &tilesY, G3D::Vector3 &corner) const - { - tilesX = iTilesX; - tilesY = iTilesY; - corner = iCorner; - } -} diff --git a/modules/acore/extractors/vmap4_assembler/CMakeLists.txt b/modules/acore/extractors/vmap4_assembler/CMakeLists.txt deleted file mode 100644 index 177550f9a7..0000000000 --- a/modules/acore/extractors/vmap4_assembler/CMakeLists.txt +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (C) -# Copyright (C) -# -# This file is free software; as a special exception the author gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -include_directories( - ${CMAKE_SOURCE_DIR}/modules/worldengine/deps/g3dlite/include - ${CMAKE_SOURCE_DIR}/modules/worldengine/nucleus/src - ${CMAKE_SOURCE_DIR}/modules/worldengine/nucleus/src/Debugging - ${CMAKE_SOURCE_DIR}/modules/worldengine/lib-collision/src/ - ${CMAKE_SOURCE_DIR}/modules/worldengine/lib-collision/src/Maps - ${CMAKE_SOURCE_DIR}/modules/worldengine/lib-collision/src/Models - ${ACE_INCLUDE_DIR} - ${ZLIB_INCLUDE_DIR} -) - -add_executable(vmap4assembler VMapAssembler.cpp) - -if(CMAKE_SYSTEM_NAME MATCHES "Darwin") - set_target_properties(vmap4assembler PROPERTIES LINK_FLAGS "-framework Carbon") -endif() - -target_link_libraries(vmap4assembler - collision - g3dlib - ${ZLIB_LIBRARIES} -) - -if( UNIX ) - install(TARGETS vmap4assembler DESTINATION bin) -elseif( WIN32 ) - install(TARGETS vmap4assembler DESTINATION "${CMAKE_INSTALL_PREFIX}") -endif() diff --git a/modules/acore/extractors/vmap4_assembler/VMapAssembler.cpp b/modules/acore/extractors/vmap4_assembler/VMapAssembler.cpp deleted file mode 100644 index 3b0e4e0a7c..0000000000 --- a/modules/acore/extractors/vmap4_assembler/VMapAssembler.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) 2016+ AzerothCore , released under GNU GPL v2 license: http://github.com/azerothcore/azerothcore-wotlk/LICENSE-GPL2 - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#include -#include - -#include "TileAssembler.h" - -int main(int argc, char* argv[]) -{ - if (argc != 3) - { - std::cout << "usage: " << argv[0] << " " << std::endl; - return 1; - } - - std::string src = argv[1]; - std::string dest = argv[2]; - - std::cout << "using " << src << " as source directory and writing output to " << dest << std::endl; - - VMAP::TileAssembler* ta = new VMAP::TileAssembler(src, dest); - - if (!ta->convertWorld2()) - { - std::cout << "exit with errors" << std::endl; - delete ta; - return 1; - } - - delete ta; - std::cout << "Ok, all done" << std::endl; - return 0; -} diff --git a/modules/acore/extractors/vmap4_extractor/CMakeLists.txt b/modules/acore/extractors/vmap4_extractor/CMakeLists.txt deleted file mode 100644 index 4cc103ecf7..0000000000 --- a/modules/acore/extractors/vmap4_extractor/CMakeLists.txt +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (C) -# Copyright (C) -# -# This file is free software; as a special exception the author gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -file(GLOB_RECURSE sources *.cpp *.h) - -set(include_Dirs - ${CMAKE_SOURCE_DIR}/modules/worldengine/deps/libmpq -) - -if( WIN32 ) - set(include_Dirs - ${include_Dirs} - ${CMAKE_SOURCE_DIR}/modules/worldengine/deps/libmpq/win - ) -endif() - -include_directories(${include_Dirs}) - -add_executable(vmap4extractor ${sources}) - -target_link_libraries(vmap4extractor - mpq - ${BZIP2_LIBRARIES} - ${ZLIB_LIBRARIES} -) - -if( UNIX ) - install(TARGETS vmap4extractor DESTINATION bin) -elseif( WIN32 ) - install(TARGETS vmap4extractor DESTINATION "${CMAKE_INSTALL_PREFIX}") -endif() diff --git a/modules/acore/extractors/vmap4_extractor/adtfile.cpp b/modules/acore/extractors/vmap4_extractor/adtfile.cpp deleted file mode 100644 index 748b1c3744..0000000000 --- a/modules/acore/extractors/vmap4_extractor/adtfile.cpp +++ /dev/null @@ -1,202 +0,0 @@ -/* - * Copyright (C) 2016+ AzerothCore , released under GNU GPL v2 license: http://github.com/azerothcore/azerothcore-wotlk/LICENSE-GPL2 - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#include "vmapexport.h" -#include "adtfile.h" - -#include -#include - -#ifdef WIN32 -#define snprintf _snprintf -#endif - -char const* GetPlainName(char const* FileName) -{ - const char * szTemp; - - if((szTemp = strrchr(FileName, '\\')) != NULL) - FileName = szTemp + 1; - return FileName; -} - -char* GetPlainName(char* FileName) -{ - char * szTemp; - - if((szTemp = strrchr(FileName, '\\')) != NULL) - FileName = szTemp + 1; - return FileName; -} - -void fixnamen(char* name, size_t len) -{ - for (size_t i = 0; i < len-3; i++) - { - if (i > 0 && name[i] >= 'A' && name[i] <= 'Z' && isalpha(name[i-1])) - name[i] |= 0x20; - else if ((i == 0 || !isalpha(name[i-1])) && name[i]>='a' && name[i]<='z') - name[i] &= ~0x20; - } - //extension in lowercase - for (size_t i = len - 3; i < len; i++) - name[i] |= 0x20; -} - -void fixname2(char* name, size_t len) -{ - for (size_t i=0; i, released under GNU GPL v2 license: http://github.com/azerothcore/azerothcore-wotlk/LICENSE-GPL2 - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#ifndef ADT_H -#define ADT_H - -#include "mpq_libmpq04.h" -#include "wmo.h" -#include "model.h" - -#define TILESIZE (533.33333f) -#define CHUNKSIZE ((TILESIZE) / 16.0f) -#define UNITSIZE (CHUNKSIZE / 8.0f) - -class Liquid; - -typedef struct -{ - float x; - float y; - float z; -}svec; - -struct vec -{ - double x; - double y; - double z; -}; - -struct triangle -{ - vec v[3]; -}; - -typedef struct -{ - float v9[16*8+1][16*8+1]; - float v8[16*8][16*8]; -}Cell; - -typedef struct -{ - double v9[9][9]; - double v8[8][8]; - uint16 area_id; - //Liquid *lq; - float waterlevel[9][9]; - uint8 flag; -}chunk; - -typedef struct -{ - chunk ch[16][16]; -}mcell; - -struct MapChunkHeader -{ - uint32 flags; - uint32 ix; - uint32 iy; - uint32 nLayers; - uint32 nDoodadRefs; - uint32 ofsHeight; - uint32 ofsNormal; - uint32 ofsLayer; - uint32 ofsRefs; - uint32 ofsAlpha; - uint32 sizeAlpha; - uint32 ofsShadow; - uint32 sizeShadow; - uint32 areaid; - uint32 nMapObjRefs; - uint32 holes; - uint16 s1; - uint16 s2; - uint32 d1; - uint32 d2; - uint32 d3; - uint32 predTex; - uint32 nEffectDoodad; - uint32 ofsSndEmitters; - uint32 nSndEmitters; - uint32 ofsLiquid; - uint32 sizeLiquid; - float zpos; - float xpos; - float ypos; - uint32 textureId; - uint32 props; - uint32 effectId; -}; - - -class ADTFile -{ -private: - //size_t mcnk_offsets[256], mcnk_sizes[256]; - MPQFile ADT; - //mcell Mcell; - string Adtfilename; -public: - ADTFile(char* filename); - ~ADTFile(); - int nWMO; - int nMDX; - string* WmoInstansName; - string* ModelInstansName; - bool init(uint32 map_num, uint32 tileX, uint32 tileY); - //void LoadMapChunks(); - - //uint32 wmo_count; -/* - const mcell& Getmcell() const - { - return Mcell; - } -*/ -}; - -const char * GetPlainName(const char * FileName); -char * GetPlainName(char * FileName); -char * GetExtension(char * FileName); -void fixnamen(char *name, size_t len); -void fixname2(char *name, size_t len); -//void fixMapNamen(char *name, size_t len); - -#endif diff --git a/modules/acore/extractors/vmap4_extractor/dbcfile.cpp b/modules/acore/extractors/vmap4_extractor/dbcfile.cpp deleted file mode 100644 index 2ee2b3de5a..0000000000 --- a/modules/acore/extractors/vmap4_extractor/dbcfile.cpp +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright (C) 2016+ AzerothCore , released under GNU GPL v2 license: http://github.com/azerothcore/azerothcore-wotlk/LICENSE-GPL2 - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#include "dbcfile.h" -#include "mpq_libmpq04.h" -#undef min -#undef max - -#include - -DBCFile::DBCFile(const std::string& filename): - filename(filename), recordSize(0), recordCount(0), fieldCount(0), stringSize(0), data(NULL), stringTable(NULL) -{ - -} - -bool DBCFile::open() -{ - MPQFile f(filename.c_str()); - - // Need some error checking, otherwise an unhandled exception error occurs - // if people screw with the data path. - if (f.isEof() == true) - return false; - - unsigned char header[4]; - unsigned int na,nb,es,ss; - - f.read(header,4); // File Header - - if (header[0]!='W' || header[1]!='D' || header[2]!='B' || header[3] != 'C') - { - f.close(); - data = NULL; - printf("Critical Error: An error occured while trying to read the DBCFile %s.", filename.c_str()); - return false; - } - - //assert(header[0]=='W' && header[1]=='D' && header[2]=='B' && header[3] == 'C'); - - f.read(&na,4); // Number of records - f.read(&nb,4); // Number of fields - f.read(&es,4); // Size of a record - f.read(&ss,4); // String size - - recordSize = es; - recordCount = na; - fieldCount = nb; - stringSize = ss; - //assert(fieldCount*4 == recordSize); - assert(fieldCount*4 >= recordSize); - - data = new unsigned char[recordSize*recordCount+stringSize]; - stringTable = data + recordSize*recordCount; - f.read(data,recordSize*recordCount+stringSize); - f.close(); - return true; -} - -DBCFile::~DBCFile() -{ - delete [] data; -} - -DBCFile::Record DBCFile::getRecord(size_t id) -{ - assert(data); - return Record(*this, data + id*recordSize); -} - -DBCFile::Iterator DBCFile::begin() -{ - assert(data); - return Iterator(*this, data); -} - -DBCFile::Iterator DBCFile::end() -{ - assert(data); - return Iterator(*this, stringTable); -} diff --git a/modules/acore/extractors/vmap4_extractor/dbcfile.h b/modules/acore/extractors/vmap4_extractor/dbcfile.h deleted file mode 100644 index 711d8257b3..0000000000 --- a/modules/acore/extractors/vmap4_extractor/dbcfile.h +++ /dev/null @@ -1,143 +0,0 @@ -/* - * Copyright (C) 2016+ AzerothCore , released under GNU GPL v2 license: http://github.com/azerothcore/azerothcore-wotlk/LICENSE-GPL2 - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#ifndef DBCFILE_H -#define DBCFILE_H - -#include -#include - -class DBCFile -{ -public: - DBCFile(const std::string &filename); - ~DBCFile(); - - // Open database. It must be openened before it can be used. - bool open(); - - // TODO: Add a close function? - - // Database exceptions - class Exception - { - public: - Exception(const std::string &message): message(message) - { } - virtual ~Exception() - { } - const std::string &getMessage() {return message;} - private: - std::string message; - }; - - // - class NotFound: public Exception - { - public: - NotFound(): Exception("Key was not found") - { } - }; - - // Iteration over database - class Iterator; - class Record - { - public: - Record& operator= (const Record& r) - { - file = r.file; - offset = r.offset; - return *this; - } - float getFloat(size_t field) const - { - assert(field < file.fieldCount); - return *reinterpret_cast(offset+field*4); - } - unsigned int getUInt(size_t field) const - { - assert(field < file.fieldCount); - return *reinterpret_cast(offset+(field*4)); - } - int getInt(size_t field) const - { - assert(field < file.fieldCount); - return *reinterpret_cast(offset+field*4); - } - unsigned char getByte(size_t ofs) const - { - assert(ofs < file.recordSize); - return *reinterpret_cast(offset+ofs); - } - const char *getString(size_t field) const - { - assert(field < file.fieldCount); - size_t stringOffset = getUInt(field); - assert(stringOffset < file.stringSize); - //char * tmp = (char*)file.stringTable + stringOffset; - //unsigned char * tmp2 = file.stringTable + stringOffset; - return reinterpret_cast(file.stringTable + stringOffset); - } - private: - Record(DBCFile &file, unsigned char *offset): file(file), offset(offset) {} - DBCFile &file; - unsigned char *offset; - - friend class DBCFile; - friend class Iterator; - }; - - /* Iterator that iterates over records */ - class Iterator - { - public: - Iterator(DBCFile &file, unsigned char *offset): - record(file, offset) {} - /// Advance (prefix only) - Iterator & operator++() { - record.offset += record.file.recordSize; - return *this; - } - /// Return address of current instance - Record const & operator*() const { return record; } - const Record* operator->() const { - return &record; - } - /// Comparison - bool operator==(const Iterator &b) const - { - return record.offset == b.record.offset; - } - bool operator!=(const Iterator &b) const - { - return record.offset != b.record.offset; - } - private: - Record record; - }; - - // Get record by id - Record getRecord(size_t id); - /// Get begin iterator over records - Iterator begin(); - /// Get begin iterator over records - Iterator end(); - /// Trivial - size_t getRecordCount() const { return recordCount;} - size_t getFieldCount() const { return fieldCount; } - -private: - std::string filename; - size_t recordSize; - size_t recordCount; - size_t fieldCount; - size_t stringSize; - unsigned char *data; - unsigned char *stringTable; -}; - -#endif diff --git a/modules/acore/extractors/vmap4_extractor/gameobject_extract.cpp b/modules/acore/extractors/vmap4_extractor/gameobject_extract.cpp deleted file mode 100644 index e307aea6f5..0000000000 --- a/modules/acore/extractors/vmap4_extractor/gameobject_extract.cpp +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (C) 2016+ AzerothCore , released under GNU GPL v2 license: http://github.com/azerothcore/azerothcore-wotlk/LICENSE-GPL2 - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#include "model.h" -#include "dbcfile.h" -#include "adtfile.h" -#include "vmapexport.h" - -#include -#include - -bool ExtractSingleModel(std::string& fname) -{ - char * name = GetPlainName((char*)fname.c_str()); - char * ext = GetExtension(name); - - // < 3.1.0 ADT MMDX section store filename.mdx filenames for corresponded .m2 file - if (!strcmp(ext, ".mdx")) - { - // replace .mdx -> .m2 - fname.erase(fname.length()-2,2); - fname.append("2"); - } - // >= 3.1.0 ADT MMDX section store filename.m2 filenames for corresponded .m2 file - // nothing do - - std::string output(szWorkDirWmo); - output += "/"; - output += name; - - if (FileExists(output.c_str())) - return true; - - Model mdl(fname); - if (!mdl.open()) - return false; - - return mdl.ConvertToVMAPModel(output.c_str()); -} - -void ExtractGameobjectModels() -{ - printf("Extracting GameObject models..."); - DBCFile dbc("DBFilesClient\\GameObjectDisplayInfo.dbc"); - if(!dbc.open()) - { - printf("Fatal error: Invalid GameObjectDisplayInfo.dbc file format!\n"); - exit(1); - } - - std::string basepath = szWorkDirWmo; - basepath += "/"; - std::string path; - - std::string modelListPath = basepath + "temp_gameobject_models"; - FILE* model_list = fopen(modelListPath.c_str(), "wb"); - if (!model_list) - { - printf("Fatal error: Could not open file %s\n", modelListPath.c_str()); - return; - } - - for (DBCFile::Iterator it = dbc.begin(); it != dbc.end(); ++it) - { - path = it->getString(1); - - if (path.length() < 4) - continue; - - fixnamen((char*)path.c_str(), path.size()); - char * name = GetPlainName((char*)path.c_str()); - fixname2(name, strlen(name)); - - char * ch_ext = GetExtension(name); - if (!ch_ext) - continue; - - strToLower(ch_ext); - - bool result = false; - if (!strcmp(ch_ext, ".wmo")) - { - result = ExtractSingleWmo(path); - } - else if (!strcmp(ch_ext, ".mdl")) - { - // TODO: extract .mdl files, if needed - continue; - } - else //if (!strcmp(ch_ext, ".mdx") || !strcmp(ch_ext, ".m2")) - { - result = ExtractSingleModel(path); - } - - if (result) - { - uint32 displayId = it->getUInt(0); - uint32 path_length = strlen(name); - fwrite(&displayId, sizeof(uint32), 1, model_list); - fwrite(&path_length, sizeof(uint32), 1, model_list); - fwrite(name, sizeof(char), path_length, model_list); - } - } - - fclose(model_list); - - printf("Done!\n"); -} diff --git a/modules/acore/extractors/vmap4_extractor/loadlib/loadlib.h b/modules/acore/extractors/vmap4_extractor/loadlib/loadlib.h deleted file mode 100644 index e55b4a7c56..0000000000 --- a/modules/acore/extractors/vmap4_extractor/loadlib/loadlib.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (C) 2016+ AzerothCore , released under GNU GPL v2 license: http://github.com/azerothcore/azerothcore-wotlk/LICENSE-GPL2 - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#ifndef LOAD_LIB_H -#define LOAD_LIB_H - -#ifdef WIN32 -typedef __int64 int64; -typedef __int32 int32; -typedef __int16 int16; -typedef __int8 int8; -typedef unsigned __int64 uint64; -typedef unsigned __int32 uint32; -typedef unsigned __int16 uint16; -typedef unsigned __int8 uint8; -#else -#include -#ifndef uint64_t -#ifdef __linux__ -#include -#endif -#endif -typedef int64_t int64; -typedef int32_t int32; -typedef int16_t int16; -typedef int8_t int8; -typedef uint64_t uint64; -typedef uint32_t uint32; -typedef uint16_t uint16; -typedef uint8_t uint8; -#endif - -#define FILE_FORMAT_VERSION 18 - -// -// File version chunk -// -struct file_MVER -{ - union{ - uint32 fcc; - char fcc_txt[4]; - }; - uint32 size; - uint32 ver; -}; - -class FileLoader{ - uint8 *data; - uint32 data_size; -public: - virtual bool prepareLoadedData(); - uint8 *GetData() {return data;} - uint32 GetDataSize() {return data_size;} - - file_MVER *version; - FileLoader(); - ~FileLoader(); - bool loadFile(char *filename, bool log = true); - virtual void free(); -}; -#endif diff --git a/modules/acore/extractors/vmap4_extractor/model.cpp b/modules/acore/extractors/vmap4_extractor/model.cpp deleted file mode 100644 index 28c1bad31b..0000000000 --- a/modules/acore/extractors/vmap4_extractor/model.cpp +++ /dev/null @@ -1,183 +0,0 @@ -/* - * Copyright (C) 2016+ AzerothCore , released under GNU GPL v2 license: http://github.com/azerothcore/azerothcore-wotlk/LICENSE-GPL2 - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#include "vmapexport.h" -#include "model.h" -#include "wmo.h" -#include "mpq_libmpq04.h" -#include -#include -#include - -Model::Model(std::string &filename) : filename(filename), vertices(0), indices(0) -{ - memset(&header, 0, sizeof(header)); -} - -bool Model::open() -{ - MPQFile f(filename.c_str()); - - if (f.isEof()) - { - f.close(); - // Do not show this error on console to avoid confusion, the extractor can continue working even if some models fail to load - //printf("Error loading model %s\n", filename.c_str()); - return false; - } - - _unload(); - - memcpy(&header, f.getBuffer(), sizeof(ModelHeader)); - if(header.nBoundingTriangles > 0) - { - f.seek(0); - f.seekRelative(header.ofsBoundingVertices); - vertices = new Vec3D[header.nBoundingVertices]; - f.read(vertices,header.nBoundingVertices*12); - for (uint32 i=0; i0) - fwrite(indices, sizeof(unsigned short), nIndexes, output); - - fwrite("VERT", 4, 1, output); - wsize = sizeof(int) + sizeof(float) * 3 * nVertices; - fwrite(&wsize, sizeof(int), 1, output); - fwrite(&nVertices, sizeof(int), 1, output); - if (nVertices >0) - { - for(uint32 vpos=0; vpos , released under GNU GPL v2 license: http://github.com/azerothcore/azerothcore-wotlk/LICENSE-GPL2 - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#ifndef MODEL_H -#define MODEL_H - -#include "loadlib/loadlib.h" -#include "vec3d.h" -#include "modelheaders.h" -#include - -class MPQFile; - -Vec3D fixCoordSystem(Vec3D v); - -class Model -{ -private: - void _unload() - { - delete[] vertices; - delete[] indices; - vertices = NULL; - indices = NULL; - } - std::string filename; -public: - ModelHeader header; - Vec3D* vertices; - uint16* indices; - - bool open(); - bool ConvertToVMAPModel(char const* outfilename); - - Model(std::string& filename); - ~Model() { _unload(); } -}; - -class ModelInstance -{ -public: - uint32 id; - Vec3D pos, rot; - uint16 scale, flags; - float sc; - - ModelInstance() : id(0), scale(0), flags(0), sc(0.0f) {} - ModelInstance(MPQFile& f, char const* ModelInstName, uint32 mapID, uint32 tileX, uint32 tileY, FILE* pDirfile); - -}; - -#endif diff --git a/modules/acore/extractors/vmap4_extractor/modelheaders.h b/modules/acore/extractors/vmap4_extractor/modelheaders.h deleted file mode 100644 index aa878ba435..0000000000 --- a/modules/acore/extractors/vmap4_extractor/modelheaders.h +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (C) 2016+ AzerothCore , released under GNU GPL v2 license: http://github.com/azerothcore/azerothcore-wotlk/LICENSE-GPL2 - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#ifndef MODELHEADERS_H -#define MODELHEADERS_H - -/* typedef unsigned char uint8; -typedef char int8; -typedef unsigned short uint16; -typedef short int16; -typedef unsigned int uint32; -typedef int int32; */ - -#pragma pack(push,1) - -struct ModelHeader -{ - char id[4]; - uint8 version[4]; - uint32 nameLength; - uint32 nameOfs; - uint32 type; - uint32 nGlobalSequences; - uint32 ofsGlobalSequences; - uint32 nAnimations; - uint32 ofsAnimations; - uint32 nAnimationLookup; - uint32 ofsAnimationLookup; - uint32 nBones; - uint32 ofsBones; - uint32 nKeyBoneLookup; - uint32 ofsKeyBoneLookup; - uint32 nVertices; - uint32 ofsVertices; - uint32 nViews; - uint32 nColors; - uint32 ofsColors; - uint32 nTextures; - uint32 ofsTextures; - uint32 nTransparency; - uint32 ofsTransparency; - uint32 nTextureanimations; - uint32 ofsTextureanimations; - uint32 nTexReplace; - uint32 ofsTexReplace; - uint32 nRenderFlags; - uint32 ofsRenderFlags; - uint32 nBoneLookupTable; - uint32 ofsBoneLookupTable; - uint32 nTexLookup; - uint32 ofsTexLookup; - uint32 nTexUnits; - uint32 ofsTexUnits; - uint32 nTransLookup; - uint32 ofsTransLookup; - uint32 nTexAnimLookup; - uint32 ofsTexAnimLookup; - float floats[14]; - uint32 nBoundingTriangles; - uint32 ofsBoundingTriangles; - uint32 nBoundingVertices; - uint32 ofsBoundingVertices; - uint32 nBoundingNormals; - uint32 ofsBoundingNormals; - uint32 nAttachments; - uint32 ofsAttachments; - uint32 nAttachLookup; - uint32 ofsAttachLookup; - uint32 nAttachments_2; - uint32 ofsAttachments_2; - uint32 nLights; - uint32 ofsLights; - uint32 nCameras; - uint32 ofsCameras; - uint32 nCameraLookup; - uint32 ofsCameraLookup; - uint32 nRibbonEmitters; - uint32 ofsRibbonEmitters; - uint32 nParticleEmitters; - uint32 ofsParticleEmitters; -}; - -#pragma pack(pop) -#endif diff --git a/modules/acore/extractors/vmap4_extractor/mpq_libmpq.cpp b/modules/acore/extractors/vmap4_extractor/mpq_libmpq.cpp deleted file mode 100644 index 70a02e5acc..0000000000 --- a/modules/acore/extractors/vmap4_extractor/mpq_libmpq.cpp +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright (C) 2016+ AzerothCore , released under GNU GPL v2 license: http://github.com/azerothcore/azerothcore-wotlk/LICENSE-GPL2 - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#include "mpq_libmpq04.h" -#include -#include - -ArchiveSet gOpenArchives; - -MPQArchive::MPQArchive(const char* filename) -{ - int result = libmpq__archive_open(&mpq_a, filename, -1); - printf("Opening %s\n", filename); - if(result) { - switch(result) { - case LIBMPQ_ERROR_OPEN : - printf("Error opening archive '%s': Does file really exist?\n", filename); - break; - case LIBMPQ_ERROR_FORMAT : /* bad file format */ - printf("Error opening archive '%s': Bad file format\n", filename); - break; - case LIBMPQ_ERROR_SEEK : /* seeking in file failed */ - printf("Error opening archive '%s': Seeking in file failed\n", filename); - break; - case LIBMPQ_ERROR_READ : /* Read error in archive */ - printf("Error opening archive '%s': Read error in archive\n", filename); - break; - case LIBMPQ_ERROR_MALLOC : /* maybe not enough memory? :) */ - printf("Error opening archive '%s': Maybe not enough memory\n", filename); - break; - default: - printf("Error opening archive '%s': Unknown error\n", filename); - break; - } - return; - } - gOpenArchives.push_front(this); -} - -void MPQArchive::close() -{ - //gOpenArchives.erase(erase(&mpq_a); - libmpq__archive_close(mpq_a); -} - -MPQFile::MPQFile(const char* filename): - eof(false), - buffer(0), - pointer(0), - size(0) -{ - for(ArchiveSet::iterator i=gOpenArchives.begin(); i!=gOpenArchives.end();++i) - { - mpq_archive *mpq_a = (*i)->mpq_a; - - uint32 filenum; - if(libmpq__file_number(mpq_a, filename, &filenum)) continue; - libmpq__off_t transferred; - libmpq__file_unpacked_size(mpq_a, filenum, &size); - - // HACK: in patch.mpq some files don't want to open and give 1 for filesize - if (size<=1) { - // printf("info: file %s has size %d; considered dummy file.\n", filename, size); - eof = true; - buffer = 0; - return; - } - buffer = new char[size]; - - //libmpq_file_getdata - libmpq__file_read(mpq_a, filenum, (unsigned char*)buffer, size, &transferred); - /*libmpq_file_getdata(&mpq_a, hash, fileno, (unsigned char*)buffer);*/ - return; - - } - eof = true; - buffer = 0; -} - -size_t MPQFile::read(void* dest, size_t bytes) -{ - if (eof) return 0; - - size_t rpos = pointer + bytes; - if (rpos > size_t(size)) { - bytes = size - pointer; - eof = true; - } - - memcpy(dest, &(buffer[pointer]), bytes); - - pointer = rpos; - - return bytes; -} - -void MPQFile::seek(int offset) -{ - pointer = offset; - eof = (pointer >= size); -} - -void MPQFile::seekRelative(int offset) -{ - pointer += offset; - eof = (pointer >= size); -} - -void MPQFile::close() -{ - if (buffer) delete[] buffer; - buffer = 0; - eof = true; -} diff --git a/modules/acore/extractors/vmap4_extractor/mpq_libmpq04.h b/modules/acore/extractors/vmap4_extractor/mpq_libmpq04.h deleted file mode 100644 index 80041b16d5..0000000000 --- a/modules/acore/extractors/vmap4_extractor/mpq_libmpq04.h +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (C) 2016+ AzerothCore , released under GNU GPL v2 license: http://github.com/azerothcore/azerothcore-wotlk/LICENSE-GPL2 - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#ifndef MPQ_H -#define MPQ_H - -#include "loadlib/loadlib.h" -#include "libmpq/mpq.h" -#include -#include -#include -#include -#include - -using namespace std; - -class MPQArchive -{ - -public: - mpq_archive_s *mpq_a; - - MPQArchive(const char* filename); - void close(); - - void GetFileListTo(vector& filelist) { - uint32_t filenum; - if(libmpq__file_number(mpq_a, "(listfile)", &filenum)) return; - libmpq__off_t size, transferred; - libmpq__file_unpacked_size(mpq_a, filenum, &size); - - char *buffer = new char[size + 1]; - buffer[size] = '\0'; - - libmpq__file_read(mpq_a, filenum, (unsigned char*)buffer, size, &transferred); - - char seps[] = "\n"; - char *token; - - token = strtok( buffer, seps ); - uint32 counter = 0; - while ((token != NULL) && (counter < size)) { - //cout << token << endl; - token[strlen(token) - 1] = 0; - string s = token; - filelist.push_back(s); - counter += strlen(token) + 2; - token = strtok(NULL, seps); - } - - delete[] buffer; - } -}; -typedef std::deque ArchiveSet; - -class MPQFile -{ - //MPQHANDLE handle; - bool eof; - char *buffer; - libmpq__off_t pointer,size; - - // disable copying - MPQFile(const MPQFile& /*f*/) {} - void operator=(const MPQFile& /*f*/) {} - -public: - MPQFile(const char* filename); // filenames are not case sensitive - ~MPQFile() { close(); } - size_t read(void* dest, size_t bytes); - size_t getSize() { return size; } - size_t getPos() { return pointer; } - char* getBuffer() { return buffer; } - char* getPointer() { return buffer + pointer; } - bool isEof() { return eof; } - void seek(int offset); - void seekRelative(int offset); - void close(); -}; - -inline void flipcc(char *fcc) -{ - char t; - t=fcc[0]; - fcc[0]=fcc[3]; - fcc[3]=t; - t=fcc[1]; - fcc[1]=fcc[2]; - fcc[2]=t; -} - -#endif diff --git a/modules/acore/extractors/vmap4_extractor/vec3d.h b/modules/acore/extractors/vmap4_extractor/vec3d.h deleted file mode 100644 index ead433644a..0000000000 --- a/modules/acore/extractors/vmap4_extractor/vec3d.h +++ /dev/null @@ -1,236 +0,0 @@ -/* - * Copyright (C) 2016+ AzerothCore , released under GNU GPL v2 license: http://github.com/azerothcore/azerothcore-wotlk/LICENSE-GPL2 - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#ifndef VEC3D_H -#define VEC3D_H - -#include -#include - -class Vec3D -{ -public: - float x,y,z; - - Vec3D(float x0 = 0.0f, float y0 = 0.0f, float z0 = 0.0f) : x(x0), y(y0), z(z0) {} - - Vec3D(const Vec3D& v) : x(v.x), y(v.y), z(v.z) {} - - Vec3D& operator= (const Vec3D &v) { - x = v.x; - y = v.y; - z = v.z; - return *this; - } - - Vec3D operator+ (const Vec3D &v) const - { - Vec3D r(x+v.x,y+v.y,z+v.z); - return r; - } - - Vec3D operator- (const Vec3D &v) const - { - Vec3D r(x-v.x,y-v.y,z-v.z); - return r; - } - - float operator* (const Vec3D &v) const - { - return x*v.x + y*v.y + z*v.z; - } - - Vec3D operator* (float d) const - { - Vec3D r(x*d,y*d,z*d); - return r; - } - - friend Vec3D operator* (float d, const Vec3D& v) - { - return v * d; - } - - Vec3D operator% (const Vec3D &v) const - { - Vec3D r(y*v.z-z*v.y, z*v.x-x*v.z, x*v.y-y*v.x); - return r; - } - - Vec3D& operator+= (const Vec3D &v) - { - x += v.x; - y += v.y; - z += v.z; - return *this; - } - - Vec3D& operator-= (const Vec3D &v) - { - x -= v.x; - y -= v.y; - z -= v.z; - return *this; - } - - Vec3D& operator*= (float d) - { - x *= d; - y *= d; - z *= d; - return *this; - } - - float lengthSquared() const - { - return x*x+y*y+z*z; - } - - float length() const - { - return sqrt(x*x+y*y+z*z); - } - - Vec3D& normalize() - { - this->operator*= (1.0f/length()); - return *this; - } - - Vec3D operator~ () const - { - Vec3D r(*this); - r.normalize(); - return r; - } - - friend std::istream& operator>>(std::istream& in, Vec3D& v) - { - in >> v.x >> v.y >> v.z; - return in; - } - - friend std::ostream& operator<<(std::ostream& out, const Vec3D& v) - { - out << v.x << " " << v.y << " " << v.z; - return out; - } - - operator float*() - { - return (float*)this; - } -}; - - -class Vec2D -{ -public: - float x,y; - - Vec2D(float x0 = 0.0f, float y0 = 0.0f) : x(x0), y(y0) {} - - Vec2D(const Vec2D& v) : x(v.x), y(v.y) {} - - Vec2D& operator= (const Vec2D &v) { - x = v.x; - y = v.y; - return *this; - } - - Vec2D operator+ (const Vec2D &v) const - { - Vec2D r(x+v.x,y+v.y); - return r; - } - - Vec2D operator- (const Vec2D &v) const - { - Vec2D r(x-v.x,y-v.y); - return r; - } - - float operator* (const Vec2D &v) const - { - return x*v.x + y*v.y; - } - - Vec2D operator* (float d) const - { - Vec2D r(x*d,y*d); - return r; - } - - friend Vec2D operator* (float d, const Vec2D& v) - { - return v * d; - } - - Vec2D& operator+= (const Vec2D &v) - { - x += v.x; - y += v.y; - return *this; - } - - Vec2D& operator-= (const Vec2D &v) - { - x -= v.x; - y -= v.y; - return *this; - } - - Vec2D& operator*= (float d) - { - x *= d; - y *= d; - return *this; - } - - float lengthSquared() const - { - return x*x+y*y; - } - - float length() const - { - return sqrt(x*x+y*y); - } - - Vec2D& normalize() - { - this->operator*= (1.0f/length()); - return *this; - } - - Vec2D operator~ () const - { - Vec2D r(*this); - r.normalize(); - return r; - } - - - friend std::istream& operator>>(std::istream& in, Vec2D& v) - { - in >> v.x >> v.y; - return in; - } - - operator float*() - { - return (float*)this; - } -}; - -inline void rotate(float x0, float y0, float *x, float *y, float angle) -{ - float xa = *x - x0, ya = *y - y0; - *x = xa*cosf(angle) - ya*sinf(angle) + x0; - *y = xa*sinf(angle) + ya*cosf(angle) + y0; -} - -#endif diff --git a/modules/acore/extractors/vmap4_extractor/vmapexport.cpp b/modules/acore/extractors/vmap4_extractor/vmapexport.cpp deleted file mode 100644 index ff28ae97e2..0000000000 --- a/modules/acore/extractors/vmap4_extractor/vmapexport.cpp +++ /dev/null @@ -1,526 +0,0 @@ -/* - * Copyright (C) 2016+ AzerothCore , released under GNU GPL v2 license: http://github.com/azerothcore/azerothcore-wotlk/LICENSE-GPL2 - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#define _CRT_SECURE_NO_DEPRECATE -#include -#include -#include -#include -#include - -#ifdef WIN32 - #include - #include - #include - #define mkdir _mkdir -#else - #include -#endif - -#undef min -#undef max - -//#pragma warning(disable : 4505) -//#pragma comment(lib, "Winmm.lib") - -#include - -//From Extractor -#include "adtfile.h" -#include "wdtfile.h" -#include "dbcfile.h" -#include "wmo.h" -#include "mpq_libmpq04.h" - -#include "vmapexport.h" - -//------------------------------------------------------------------------------ -// Defines - -#define MPQ_BLOCK_SIZE 0x1000 - -//----------------------------------------------------------------------------- - -extern ArchiveSet gOpenArchives; - -typedef struct -{ - char name[64]; - unsigned int id; -}map_id; - -map_id * map_ids; -uint16 *LiqType = 0; -uint32 map_count; -char output_path[128]="."; -char input_path[1024]="."; -bool hasInputPathParam = false; -bool preciseVectorData = false; - -// Constants - -//static const char * szWorkDirMaps = ".\\Maps"; -const char* szWorkDirWmo = "./Buildings"; -const char* szRawVMAPMagic = "VMAP041"; - -// Local testing functions - -bool FileExists(const char* file) -{ - if (FILE* n = fopen(file, "rb")) - { - fclose(n); - return true; - } - return false; -} - -void strToLower(char* str) -{ - while(*str) - { - *str=tolower(*str); - ++str; - } -} - -// copied from contrib/extractor/System.cpp -void ReadLiquidTypeTableDBC() -{ - printf("Read LiquidType.dbc file..."); - DBCFile dbc("DBFilesClient\\LiquidType.dbc"); - if(!dbc.open()) - { - printf("Fatal error: Invalid LiquidType.dbc file format!\n"); - exit(1); - } - - size_t LiqType_count = dbc.getRecordCount(); - size_t LiqType_maxid = dbc.getRecord(LiqType_count - 1).getUInt(0); - LiqType = new uint16[LiqType_maxid + 1]; - memset(LiqType, 0xff, (LiqType_maxid + 1) * sizeof(uint16)); - - for(uint32 x = 0; x < LiqType_count; ++x) - LiqType[dbc.getRecord(x).getUInt(0)] = dbc.getRecord(x).getUInt(3); - - printf("Done! (%u LiqTypes loaded)\n", (unsigned int)LiqType_count); -} - -bool ExtractWmo() -{ - bool success = true; - - //const char* ParsArchiveNames[] = {"patch-2.MPQ", "patch.MPQ", "common.MPQ", "expansion.MPQ"}; - - for (ArchiveSet::const_iterator ar_itr = gOpenArchives.begin(); ar_itr != gOpenArchives.end() && success; ++ar_itr) - { - vector filelist; - - (*ar_itr)->GetFileListTo(filelist); - for (vector::iterator fname = filelist.begin(); fname != filelist.end() && success; ++fname) - { - if (fname->find(".wmo") != string::npos) - success = ExtractSingleWmo(*fname); - } - } - - if (success) - printf("\nExtract wmo complete (No (fatal) errors)\n"); - - return success; -} - -bool ExtractSingleWmo(std::string& fname) -{ - // Copy files from archive - - char szLocalFile[1024]; - const char * plain_name = GetPlainName(fname.c_str()); - sprintf(szLocalFile, "%s/%s", szWorkDirWmo, plain_name); - fixnamen(szLocalFile,strlen(szLocalFile)); - - if (FileExists(szLocalFile)) - return true; - - int p = 0; - // Select root wmo files - char const* rchr = strrchr(plain_name, '_'); - if (rchr != NULL) - { - char cpy[4]; - memcpy(cpy, rchr, 4); - for (int i = 0; i < 4; ++i) - { - int m = cpy[i]; - if (isdigit(m)) - p++; - } - } - - if (p == 3) - return true; - - bool file_ok = true; - std::cout << "Extracting " << fname << std::endl; - WMORoot froot(fname); - if(!froot.open()) - { - printf("Couldn't open RootWmo!!!\n"); - return true; - } - FILE *output = fopen(szLocalFile,"wb"); - if(!output) - { - printf("couldn't open %s for writing!\n", szLocalFile); - return false; - } - froot.ConvertToVMAPRootWmo(output); - int Wmo_nVertices = 0; - //printf("root has %d groups\n", froot->nGroups); - if (froot.nGroups !=0) - { - for (uint32 i = 0; i < froot.nGroups; ++i) - { - char temp[1024]; - strcpy(temp, fname.c_str()); - temp[fname.length()-4] = 0; - char groupFileName[1024]; - sprintf(groupFileName, "%s_%03u.wmo", temp, i); - //printf("Trying to open groupfile %s\n",groupFileName); - - string s = groupFileName; - WMOGroup fgroup(s); - if(!fgroup.open()) - { - printf("Could not open all Group file for: %s\n", plain_name); - file_ok = false; - break; - } - - Wmo_nVertices += fgroup.ConvertToVMAPGroupWmo(output, &froot, preciseVectorData); - } - } - - fseek(output, 8, SEEK_SET); // store the correct no of vertices - fwrite(&Wmo_nVertices,sizeof(int),1,output); - fclose(output); - - // Delete the extracted file in the case of an error - if (!file_ok) - remove(szLocalFile); - return true; -} - -void ParsMapFiles() -{ - char fn[512]; - //char id_filename[64]; - char id[10]; - for (unsigned int i=0; iinit(map_ids[i].id, x, y); - delete ADT; - } - } - printf("#"); - fflush(stdout); - } - printf("]\n"); - } - } -} - -void getGamePath() -{ -#ifdef _WIN32 - strcpy(input_path,"Data\\"); -#else - strcpy(input_path,"Data/"); -#endif -} - -bool scan_patches(char* scanmatch, std::vector& pArchiveNames) -{ - int i; - char path[512]; - - for (i = 1; i <= 99; i++) - { - if (i != 1) - { - sprintf(path, "%s-%d.MPQ", scanmatch, i); - } - else - { - sprintf(path, "%s.MPQ", scanmatch); - } -#ifdef __linux__ - if(FILE* h = fopen64(path, "rb")) -#else - if(FILE* h = fopen(path, "rb")) -#endif - { - fclose(h); - //matches.push_back(path); - pArchiveNames.push_back(path); - } - } - - return(true); -} - -bool fillArchiveNameVector(std::vector& pArchiveNames) -{ - if(!hasInputPathParam) - getGamePath(); - - printf("\nGame path: %s\n", input_path); - - char path[512]; - string in_path(input_path); - std::vector locales, searchLocales; - - searchLocales.push_back("enGB"); - searchLocales.push_back("enUS"); - searchLocales.push_back("deDE"); - searchLocales.push_back("esES"); - searchLocales.push_back("frFR"); - searchLocales.push_back("koKR"); - searchLocales.push_back("zhCN"); - searchLocales.push_back("zhTW"); - searchLocales.push_back("enCN"); - searchLocales.push_back("enTW"); - searchLocales.push_back("esMX"); - searchLocales.push_back("ruRU"); - - for (std::vector::iterator i = searchLocales.begin(); i != searchLocales.end(); ++i) - { - std::string localePath = in_path + *i; - // check if locale exists: - struct stat status; - if (stat(localePath.c_str(), &status)) - continue; - if ((status.st_mode & S_IFDIR) == 0) - continue; - printf("Found locale '%s'\n", i->c_str()); - locales.push_back(*i); - } - printf("\n"); - - // open locale expansion and common files - printf("Adding data files from locale directories.\n"); - for (std::vector::iterator i = locales.begin(); i != locales.end(); ++i) - { - pArchiveNames.push_back(in_path + *i + "/locale-" + *i + ".MPQ"); - pArchiveNames.push_back(in_path + *i + "/expansion-locale-" + *i + ".MPQ"); - pArchiveNames.push_back(in_path + *i + "/lichking-locale-" + *i + ".MPQ"); - } - - // open expansion and common files - pArchiveNames.push_back(input_path + string("common.MPQ")); - pArchiveNames.push_back(input_path + string("common-2.MPQ")); - pArchiveNames.push_back(input_path + string("expansion.MPQ")); - pArchiveNames.push_back(input_path + string("lichking.MPQ")); - - // now, scan for the patch levels in the core dir - printf("Scanning patch levels from data directory.\n"); - sprintf(path, "%spatch", input_path); - if (!scan_patches(path, pArchiveNames)) - return(false); - - // now, scan for the patch levels in locale dirs - printf("Scanning patch levels from locale directories.\n"); - bool foundOne = false; - for (std::vector::iterator i = locales.begin(); i != locales.end(); ++i) - { - printf("Locale: %s\n", i->c_str()); - sprintf(path, "%s%s/patch-%s", input_path, i->c_str(), i->c_str()); - if(scan_patches(path, pArchiveNames)) - foundOne = true; - } - - printf("\n"); - - if(!foundOne) - { - printf("no locale found\n"); - return false; - } - - return true; -} - -bool processArgv(int argc, char ** argv, const char *versionString) -{ - bool result = true; - hasInputPathParam = false; - preciseVectorData = false; - - for(int i = 1; i < argc; ++i) - { - if(strcmp("-s",argv[i]) == 0) - { - preciseVectorData = false; - } - else if(strcmp("-d",argv[i]) == 0) - { - if((i+1)]\n", argv[0]); - printf(" -s : (default) small size (data size optimization), ~500MB less vmap data.\n"); - printf(" -l : large size, ~500MB more vmap data. (might contain more details)\n"); - printf(" -d : Path to the vector data source folder.\n"); - printf(" -? : This message.\n"); - } - return result; -} - - -//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -// Main -// -// The program must be run with two command line arguments -// -// Arg1 - The source MPQ name (for testing reading and file find) -// Arg2 - Listfile name -// - -int main(int argc, char ** argv) -{ - bool success=true; - const char *versionString = "V4.00 2012_02"; - - // Use command line arguments, when some - if (!processArgv(argc, argv, versionString)) - return 1; - - // some simple check if working dir is dirty - else - { - std::string sdir = std::string(szWorkDirWmo) + "/dir"; - std::string sdir_bin = std::string(szWorkDirWmo) + "/dir_bin"; - struct stat status; - if (!stat(sdir.c_str(), &status) || !stat(sdir_bin.c_str(), &status)) - { - printf("Your output directory seems to be polluted, please use an empty directory!\n"); - printf(""); - char garbage[2]; - return scanf("%c", garbage); - } - } - - printf("Extract %s. Beginning work ....\n",versionString); - //xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx - // Create the working directory - if (mkdir(szWorkDirWmo -#if defined(__linux__) || defined(__APPLE__) - , 0711 -#endif - )) - success = (errno == EEXIST); - - // prepare archive name list - std::vector archiveNames; - fillArchiveNameVector(archiveNames); - for (size_t i=0; i < archiveNames.size(); ++i) - { - MPQArchive *archive = new MPQArchive(archiveNames[i].c_str()); - if (gOpenArchives.empty() || gOpenArchives.front() != archive) - delete archive; - } - - if (gOpenArchives.empty()) - { - printf("FATAL ERROR: None MPQ archive found by path '%s'. Use -d option with proper path.\n",input_path); - return 1; - } - ReadLiquidTypeTableDBC(); - - // extract data - if (success) - success = ExtractWmo(); - - //xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx - //map.dbc - if (success) - { - DBCFile * dbc = new DBCFile("DBFilesClient\\Map.dbc"); - if (!dbc->open()) - { - delete dbc; - printf("FATAL ERROR: Map.dbc not found in data file.\n"); - return 1; - } - map_count=dbc->getRecordCount (); - map_ids=new map_id[map_count]; - for (unsigned int x=0;xgetRecord (x).getUInt(0); - strcpy(map_ids[x].name,dbc->getRecord(x).getString(1)); - printf("Map - %s\n",map_ids[x].name); - } - - - delete dbc; - ParsMapFiles(); - delete [] map_ids; - //nError = ERROR_SUCCESS; - // Extract models, listed in DameObjectDisplayInfo.dbc - ExtractGameobjectModels(); - } - - printf("\n"); - if (!success) - { - printf("ERROR: Extract %s. Work NOT complete.\n Precise vector data=%d.\nPress any key.\n",versionString, preciseVectorData); - getchar(); - } - - printf("Extract %s. Work complete. No errors.\n",versionString); - delete [] LiqType; - return 0; -} diff --git a/modules/acore/extractors/vmap4_extractor/vmapexport.h b/modules/acore/extractors/vmap4_extractor/vmapexport.h deleted file mode 100644 index 47c16d89ce..0000000000 --- a/modules/acore/extractors/vmap4_extractor/vmapexport.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2016+ AzerothCore , released under GNU GPL v2 license: http://github.com/azerothcore/azerothcore-wotlk/LICENSE-GPL2 - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#ifndef VMAPEXPORT_H -#define VMAPEXPORT_H - -#include - -enum ModelFlags -{ - MOD_M2 = 1, - MOD_WORLDSPAWN = 1<<1, - MOD_HAS_BOUND = 1<<2 -}; - -extern const char * szWorkDirWmo; -extern const char * szRawVMAPMagic; // vmap magic string for extracted raw vmap data - -bool FileExists(const char * file); -void strToLower(char* str); - -bool ExtractSingleWmo(std::string& fname); -bool ExtractSingleModel(std::string& fname); - -void ExtractGameobjectModels(); - -#endif diff --git a/modules/acore/extractors/vmap4_extractor/wdtfile.cpp b/modules/acore/extractors/vmap4_extractor/wdtfile.cpp deleted file mode 100644 index a79bec03c5..0000000000 --- a/modules/acore/extractors/vmap4_extractor/wdtfile.cpp +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright (C) 2016+ AzerothCore , released under GNU GPL v2 license: http://github.com/azerothcore/azerothcore-wotlk/LICENSE-GPL2 - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#include "vmapexport.h" -#include "wdtfile.h" -#include "adtfile.h" -#include - -char * wdtGetPlainName(char * FileName) -{ - char * szTemp; - - if((szTemp = strrchr(FileName, '\\')) != NULL) - FileName = szTemp + 1; - return FileName; -} - -WDTFile::WDTFile(char* file_name, char* file_name1) : WDT(file_name), gWmoInstansName(NULL), gnWMO(0) -{ - filename.append(file_name1,strlen(file_name1)); -} - -bool WDTFile::init(char* /*map_id*/, unsigned int mapID) -{ - if (WDT.isEof()) - { - //printf("Can't find WDT file.\n"); - return false; - } - - char fourcc[5]; - uint32 size; - - std::string dirname = std::string(szWorkDirWmo) + "/dir_bin"; - FILE *dirfile; - dirfile = fopen(dirname.c_str(), "ab"); - if(!dirfile) - { - printf("Can't open dirfile!'%s'\n", dirname.c_str()); - return false; - } - - while (!WDT.isEof()) - { - WDT.read(fourcc,4); - WDT.read(&size, 4); - - flipcc(fourcc); - fourcc[4] = 0; - - size_t nextpos = WDT.getPos() + size; - - if (!strcmp(fourcc,"MAIN")) - { - } - if (!strcmp(fourcc,"MWMO")) - { - // global map objects - if (size) - { - char *buf = new char[size]; - WDT.read(buf, size); - char *p=buf; - int q = 0; - gWmoInstansName = new string[size]; - while (p < buf + size) - { - char* s=wdtGetPlainName(p); - fixnamen(s,strlen(s)); - p=p+strlen(p)+1; - gWmoInstansName[q++] = s; - } - delete[] buf; - } - } - else if (!strcmp(fourcc, "MODF")) - { - // global wmo instance data - if (size) - { - gnWMO = (int)size / 64; - - for (int i = 0; i < gnWMO; ++i) - { - int id; - WDT.read(&id, 4); - WMOInstance inst(WDT,gWmoInstansName[id].c_str(), mapID, 65, 65, dirfile); - } - - delete[] gWmoInstansName; - } - } - WDT.seek((int)nextpos); - } - - WDT.close(); - fclose(dirfile); - return true; -} - -WDTFile::~WDTFile(void) -{ - WDT.close(); -} - -ADTFile* WDTFile::GetMap(int x, int z) -{ - if(!(x>=0 && z >= 0 && x<64 && z<64)) - return NULL; - - char name[512]; - - sprintf(name,"World\\Maps\\%s\\%s_%d_%d.adt", filename.c_str(), filename.c_str(), x, z); - return new ADTFile(name); -} diff --git a/modules/acore/extractors/vmap4_extractor/wdtfile.h b/modules/acore/extractors/vmap4_extractor/wdtfile.h deleted file mode 100644 index 21dd5bb2ce..0000000000 --- a/modules/acore/extractors/vmap4_extractor/wdtfile.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (C) 2016+ AzerothCore , released under GNU GPL v2 license: http://github.com/azerothcore/azerothcore-wotlk/LICENSE-GPL2 - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#ifndef WDTFILE_H -#define WDTFILE_H - -#include "mpq_libmpq04.h" -#include "wmo.h" -#include -#include "stdlib.h" - -class ADTFile; - -class WDTFile -{ -private: - MPQFile WDT; - string filename; -public: - WDTFile(char* file_name, char* file_name1); - ~WDTFile(void); - bool init(char* map_id, unsigned int mapID); - - string* gWmoInstansName; - int gnWMO; - - ADTFile* GetMap(int x, int z); -}; - -#endif diff --git a/modules/acore/extractors/vmap4_extractor/wmo.cpp b/modules/acore/extractors/vmap4_extractor/wmo.cpp deleted file mode 100644 index e699b2845d..0000000000 --- a/modules/acore/extractors/vmap4_extractor/wmo.cpp +++ /dev/null @@ -1,556 +0,0 @@ -/* - * Copyright (C) 2016+ AzerothCore , released under GNU GPL v2 license: http://github.com/azerothcore/azerothcore-wotlk/LICENSE-GPL2 - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#include "vmapexport.h" -#include "wmo.h" -#include "vec3d.h" -#include -#include -#include -#include -#include -#undef min -#undef max -#include "mpq_libmpq04.h" - -using namespace std; -extern uint16 *LiqType; - -WMORoot::WMORoot(std::string &filename) - : filename(filename), col(0), nTextures(0), nGroups(0), nP(0), nLights(0), - nModels(0), nDoodads(0), nDoodadSets(0), RootWMOID(0), liquidType(0) -{ - memset(bbcorn1, 0, sizeof(bbcorn1)); - memset(bbcorn2, 0, sizeof(bbcorn2)); -} - -bool WMORoot::open() -{ - MPQFile f(filename.c_str()); - if(f.isEof ()) - { - printf("No such file.\n"); - return false; - } - - uint32 size; - char fourcc[5]; - - while (!f.isEof()) - { - f.read(fourcc,4); - f.read(&size, 4); - - flipcc(fourcc); - fourcc[4] = 0; - - size_t nextpos = f.getPos() + size; - - if (!strcmp(fourcc,"MOHD")) // header - { - f.read(&nTextures, 4); - f.read(&nGroups, 4); - f.read(&nP, 4); - f.read(&nLights, 4); - f.read(&nModels, 4); - f.read(&nDoodads, 4); - f.read(&nDoodadSets, 4); - f.read(&col, 4); - f.read(&RootWMOID, 4); - f.read(bbcorn1, 12); - f.read(bbcorn2, 12); - f.read(&liquidType, 4); - break; - } - /* - else if (!strcmp(fourcc,"MOTX")) - { - } - else if (!strcmp(fourcc,"MOMT")) - { - } - else if (!strcmp(fourcc,"MOGN")) - { - } - else if (!strcmp(fourcc,"MOGI")) - { - } - else if (!strcmp(fourcc,"MOLT")) - { - } - else if (!strcmp(fourcc,"MODN")) - { - } - else if (!strcmp(fourcc,"MODS")) - { - } - else if (!strcmp(fourcc,"MODD")) - { - } - else if (!strcmp(fourcc,"MOSB")) - { - } - else if (!strcmp(fourcc,"MOPV")) - { - } - else if (!strcmp(fourcc,"MOPT")) - { - } - else if (!strcmp(fourcc,"MOPR")) - { - } - else if (!strcmp(fourcc,"MFOG")) - { - } - */ - f.seek((int)nextpos); - } - f.close (); - return true; -} - -bool WMORoot::ConvertToVMAPRootWmo(FILE* pOutfile) -{ - //printf("Convert RootWmo...\n"); - - fwrite(szRawVMAPMagic, 1, 8, pOutfile); - unsigned int nVectors = 0; - fwrite(&nVectors,sizeof(nVectors), 1, pOutfile); // will be filled later - fwrite(&nGroups, 4, 1, pOutfile); - fwrite(&RootWMOID, 4, 1, pOutfile); - return true; -} - -WMOGroup::WMOGroup(const std::string &filename) : - filename(filename), MOPY(0), MOVI(0), MoviEx(0), MOVT(0), MOBA(0), MobaEx(0), - hlq(0), LiquEx(0), LiquBytes(0), groupName(0), descGroupName(0), mogpFlags(0), - moprIdx(0), moprNItems(0), nBatchA(0), nBatchB(0), nBatchC(0), fogIdx(0), - liquidType(0), groupWMOID(0), mopy_size(0), moba_size(0), LiquEx_size(0), - nVertices(0), nTriangles(0), liquflags(0) -{ - memset(bbcorn1, 0, sizeof(bbcorn1)); - memset(bbcorn2, 0, sizeof(bbcorn2)); -} - -bool WMOGroup::open() -{ - MPQFile f(filename.c_str()); - if(f.isEof ()) - { - printf("No such file.\n"); - return false; - } - uint32 size; - char fourcc[5]; - while (!f.isEof()) - { - f.read(fourcc,4); - f.read(&size, 4); - flipcc(fourcc); - if (!strcmp(fourcc,"MOGP"))//Fix sizeoff = Data size. - { - size = 68; - } - fourcc[4] = 0; - size_t nextpos = f.getPos() + size; - LiquEx_size = 0; - liquflags = 0; - - if (!strcmp(fourcc,"MOGP"))//header - { - f.read(&groupName, 4); - f.read(&descGroupName, 4); - f.read(&mogpFlags, 4); - f.read(bbcorn1, 12); - f.read(bbcorn2, 12); - f.read(&moprIdx, 2); - f.read(&moprNItems, 2); - f.read(&nBatchA, 2); - f.read(&nBatchB, 2); - f.read(&nBatchC, 4); - f.read(&fogIdx, 4); - f.read(&liquidType, 4); - f.read(&groupWMOID,4); - - } - else if (!strcmp(fourcc,"MOPY")) - { - MOPY = new char[size]; - mopy_size = size; - nTriangles = (int)size / 2; - f.read(MOPY, size); - } - else if (!strcmp(fourcc,"MOVI")) - { - MOVI = new uint16[size/2]; - f.read(MOVI, size); - } - else if (!strcmp(fourcc,"MOVT")) - { - MOVT = new float[size/4]; - f.read(MOVT, size); - nVertices = (int)size / 12; - } - else if (!strcmp(fourcc,"MONR")) - { - } - else if (!strcmp(fourcc,"MOTV")) - { - } - else if (!strcmp(fourcc,"MOBA")) - { - MOBA = new uint16[size/2]; - moba_size = size/2; - f.read(MOBA, size); - } - else if (!strcmp(fourcc,"MLIQ")) - { - liquflags |= 1; - hlq = new WMOLiquidHeader(); - f.read(hlq, 0x1E); - LiquEx_size = sizeof(WMOLiquidVert) * hlq->xverts * hlq->yverts; - LiquEx = new WMOLiquidVert[hlq->xverts * hlq->yverts]; - f.read(LiquEx, LiquEx_size); - int nLiquBytes = hlq->xtiles * hlq->ytiles; - LiquBytes = new char[nLiquBytes]; - f.read(LiquBytes, nLiquBytes); - - /* std::ofstream llog("Buildings/liquid.log", ios_base::out | ios_base::app); - llog << filename; - llog << "\nbbox: " << bbcorn1[0] << ", " << bbcorn1[1] << ", " << bbcorn1[2] << " | " << bbcorn2[0] << ", " << bbcorn2[1] << ", " << bbcorn2[2]; - llog << "\nlpos: " << hlq->pos_x << ", " << hlq->pos_y << ", " << hlq->pos_z; - llog << "\nx-/yvert: " << hlq->xverts << "/" << hlq->yverts << " size: " << size << " expected size: " << 30 + hlq->xverts*hlq->yverts*8 + hlq->xtiles*hlq->ytiles << std::endl; - llog.close(); */ - } - f.seek((int)nextpos); - } - f.close(); - return true; -} - -int WMOGroup::ConvertToVMAPGroupWmo(FILE *output, WMORoot *rootWMO, bool preciseVectorData) -{ - fwrite(&mogpFlags,sizeof(uint32),1,output); - fwrite(&groupWMOID,sizeof(uint32),1,output); - // group bound - fwrite(bbcorn1, sizeof(float), 3, output); - fwrite(bbcorn2, sizeof(float), 3, output); - fwrite(&liquflags,sizeof(uint32),1,output); - int nColTriangles = 0; - if (preciseVectorData) - { - char GRP[] = "GRP "; - fwrite(GRP,1,4,output); - - int k = 0; - int moba_batch = moba_size/12; - MobaEx = new int[moba_batch*4]; - for(int i=8; i0) - { - if(fwrite(MOVI, sizeof(unsigned short), nIdexes, output) != nIdexes) - { - printf("Error while writing file indexarray"); - exit(0); - } - } - - if(fwrite("VERT",4, 1, output) != 1) - { - printf("Error while writing file nbraches ID"); - exit(0); - } - wsize = sizeof(int) + sizeof(float) * 3 * nVertices; - if(fwrite(&wsize, sizeof(int), 1, output) != 1) - { - printf("Error while writing file wsize"); - // no need to exit? - } - if(fwrite(&nVertices, sizeof(int), 1, output) != 1) - { - printf("Error while writing file nVertices"); - exit(0); - } - if(nVertices >0) - { - if(fwrite(MOVT, sizeof(float)*3, nVertices, output) != nVertices) - { - printf("Error while writing file vectors"); - exit(0); - } - } - - nColTriangles = nTriangles; - } - else - { - char GRP[] = "GRP "; - fwrite(GRP,1,4,output); - int k = 0; - int moba_batch = moba_size/12; - MobaEx = new int[moba_batch*4]; - for(int i=8; i(sizeof(float))+4, nColVertices};// "VERT" - int check = 3*nColVertices; - fwrite(VERT,4,3,output); - for (uint32 i=0; i= 0) - check -= fwrite(MOVT+3*i, sizeof(float), 3, output); - - assert(check==0); - - delete [] MoviEx; - delete [] IndexRenum; - } - - //------LIQU------------------------ - if (LiquEx_size != 0) - { - int LIQU_h[] = {0x5551494C, static_cast(sizeof(WMOLiquidHeader) + LiquEx_size) + hlq->xtiles*hlq->ytiles};// "LIQU" - fwrite(LIQU_h, 4, 2, output); - - // according to WoW.Dev Wiki: - uint32 liquidEntry; - if (rootWMO->liquidType & 4) - liquidEntry = liquidType; - else if (liquidType == 15) - liquidEntry = 0; - else - liquidEntry = liquidType + 1; - - if (!liquidEntry) - { - int v1; // edx@1 - int v2; // eax@1 - - v1 = hlq->xtiles * hlq->ytiles; - v2 = 0; - if (v1 > 0) - { - while ((LiquBytes[v2] & 0xF) == 15) - { - ++v2; - if (v2 >= v1) - break; - } - - if (v2 < v1 && (LiquBytes[v2] & 0xF) != 15) - liquidEntry = (LiquBytes[v2] & 0xF) + 1; - } - } - - if (liquidEntry && liquidEntry < 21) - { - switch ((liquidEntry - 1) & 3) - { - case 0: - liquidEntry = ((mogpFlags & 0x80000) != 0) + 13; - break; - case 1: - liquidEntry = 14; - break; - case 2: - liquidEntry = 19; - break; - case 3: - liquidEntry = 20; - break; - } - } - - hlq->type = liquidEntry; - - /* std::ofstream llog("Buildings/liquid.log", ios_base::out | ios_base::app); - llog << filename; - llog << ":\nliquidEntry: " << liquidEntry << " type: " << hlq->type << " (root:" << rootWMO->liquidType << " group:" << liquidType << ")\n"; - llog.close(); */ - - fwrite(hlq, sizeof(WMOLiquidHeader), 1, output); - // only need height values, the other values are unknown anyway - for (uint32 i = 0; ixtiles*hlq->ytiles, output); - } - - return nColTriangles; -} - -WMOGroup::~WMOGroup() -{ - delete [] MOPY; - delete [] MOVI; - delete [] MOVT; - delete [] MOBA; - delete hlq; - delete [] LiquEx; - delete [] LiquBytes; -} - -WMOInstance::WMOInstance(MPQFile& f, char const* WmoInstName, uint32 mapID, uint32 tileX, uint32 tileY, FILE* pDirfile) - : currx(0), curry(0), wmo(NULL), doodadset(0), pos(), indx(0), id(0), d2(0), d3(0) -{ - float ff[3]; - f.read(&id, 4); - f.read(ff,12); - pos = Vec3D(ff[0],ff[1],ff[2]); - f.read(ff,12); - rot = Vec3D(ff[0],ff[1],ff[2]); - f.read(ff,12); - pos2 = Vec3D(ff[0],ff[1],ff[2]); - f.read(ff,12); - pos3 = Vec3D(ff[0],ff[1],ff[2]); - f.read(&d2,4); - - uint16 trash,adtId; - f.read(&adtId,2); - f.read(&trash,2); - - //-----------add_in _dir_file---------------- - - char tempname[512]; - sprintf(tempname, "%s/%s", szWorkDirWmo, WmoInstName); - FILE *input; - input = fopen(tempname, "r+b"); - - if(!input) - { - printf("WMOInstance::WMOInstance: couldn't open %s\n", tempname); - return; - } - - fseek(input, 8, SEEK_SET); // get the correct no of vertices - int nVertices; - int count = fread(&nVertices, sizeof (int), 1, input); - fclose(input); - - if (count != 1 || nVertices == 0) - return; - - float x,z; - x = pos.x; - z = pos.z; - if(x==0 && z == 0) - { - pos.x = 533.33333f*32; - pos.z = 533.33333f*32; - } - pos = fixCoords(pos); - pos2 = fixCoords(pos2); - pos3 = fixCoords(pos3); - - float scale = 1.0f; - uint32 flags = MOD_HAS_BOUND; - if(tileX == 65 && tileY == 65) flags |= MOD_WORLDSPAWN; - //write mapID, tileX, tileY, Flags, ID, Pos, Rot, Scale, Bound_lo, Bound_hi, name - fwrite(&mapID, sizeof(uint32), 1, pDirfile); - fwrite(&tileX, sizeof(uint32), 1, pDirfile); - fwrite(&tileY, sizeof(uint32), 1, pDirfile); - fwrite(&flags, sizeof(uint32), 1, pDirfile); - fwrite(&adtId, sizeof(uint16), 1, pDirfile); - fwrite(&id, sizeof(uint32), 1, pDirfile); - fwrite(&pos, sizeof(float), 3, pDirfile); - fwrite(&rot, sizeof(float), 3, pDirfile); - fwrite(&scale, sizeof(float), 1, pDirfile); - fwrite(&pos2, sizeof(float), 3, pDirfile); - fwrite(&pos3, sizeof(float), 3, pDirfile); - uint32 nlen=strlen(WmoInstName); - fwrite(&nlen, sizeof(uint32), 1, pDirfile); - fwrite(WmoInstName, sizeof(char), nlen, pDirfile); - - /* fprintf(pDirfile,"%s/%s %f,%f,%f_%f,%f,%f 1.0 %d %d %d,%d %d\n", - MapName, - WmoInstName, - (float) x, (float) pos.y, (float) z, - (float) rot.x, (float) rot.y, (float) rot.z, - nVertices, - realx1, realy1, - realx2, realy2 - ); */ - - // fclose(dirfile); -} diff --git a/modules/acore/extractors/vmap4_extractor/wmo.h b/modules/acore/extractors/vmap4_extractor/wmo.h deleted file mode 100644 index 42d771c77f..0000000000 --- a/modules/acore/extractors/vmap4_extractor/wmo.h +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Copyright (C) 2016+ AzerothCore , released under GNU GPL v2 license: http://github.com/azerothcore/azerothcore-wotlk/LICENSE-GPL2 - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#ifndef WMO_H -#define WMO_H -#define TILESIZE (533.33333f) -#define CHUNKSIZE ((TILESIZE) / 16.0f) - -#include -#include -#include "vec3d.h" -#include "loadlib/loadlib.h" - -// MOPY flags -#define WMO_MATERIAL_NOCAMCOLLIDE 0x01 -#define WMO_MATERIAL_DETAIL 0x02 -#define WMO_MATERIAL_NO_COLLISION 0x04 -#define WMO_MATERIAL_HINT 0x08 -#define WMO_MATERIAL_RENDER 0x10 -#define WMO_MATERIAL_COLLIDE_HIT 0x20 -#define WMO_MATERIAL_WALL_SURFACE 0x40 - -class WMOInstance; -class WMOManager; -class MPQFile; - -/* for whatever reason a certain company just can't stick to one coordinate system... */ -static inline Vec3D fixCoords(const Vec3D &v){ return Vec3D(v.z, v.x, v.y); } - -class WMORoot -{ -private: - std::string filename; -public: - unsigned int col; - uint32 nTextures, nGroups, nP, nLights, nModels, nDoodads, nDoodadSets, RootWMOID, liquidType; - float bbcorn1[3]; - float bbcorn2[3]; - - WMORoot(std::string& filename); - - bool open(); - bool ConvertToVMAPRootWmo(FILE* output); -}; - -struct WMOLiquidHeader -{ - int xverts, yverts, xtiles, ytiles; - float pos_x; - float pos_y; - float pos_z; - short type; -}; - -struct WMOLiquidVert -{ - uint16 unk1; - uint16 unk2; - float height; -}; - -class WMOGroup -{ -private: - std::string filename; -public: - // MOGP - - char* MOPY; - uint16* MOVI; - uint16* MoviEx; - float* MOVT; - uint16* MOBA; - int* MobaEx; - WMOLiquidHeader* hlq; - WMOLiquidVert* LiquEx; - char* LiquBytes; - int groupName, descGroupName; - int mogpFlags; - float bbcorn1[3]; - float bbcorn2[3]; - uint16 moprIdx; - uint16 moprNItems; - uint16 nBatchA; - uint16 nBatchB; - uint32 nBatchC, fogIdx, liquidType, groupWMOID; - - int mopy_size, moba_size; - int LiquEx_size; - unsigned int nVertices; // number when loaded - int nTriangles; // number when loaded - uint32 liquflags; - - WMOGroup(std::string const& filename); - ~WMOGroup(); - - bool open(); - int ConvertToVMAPGroupWmo(FILE* output, WMORoot* rootWMO, bool preciseVectorData); -}; - -class WMOInstance -{ - static std::set ids; -public: - std::string MapName; - int currx; - int curry; - WMOGroup* wmo; - int doodadset; - Vec3D pos; - Vec3D pos2, pos3, rot; - uint32 indx, id, d2, d3; - - WMOInstance(MPQFile&f , char const* WmoInstName, uint32 mapID, uint32 tileX, uint32 tileY, FILE* pDirfile); - - static void reset(); -}; - -#endif diff --git a/modules/acore/game-framework/CMakeLists.txt b/modules/acore/game-framework/CMakeLists.txt deleted file mode 100644 index 4b43d67e3e..0000000000 --- a/modules/acore/game-framework/CMakeLists.txt +++ /dev/null @@ -1,2 +0,0 @@ - -add_subdirectory(src) diff --git a/modules/acore/game-framework/LICENSE-AGPL3 b/modules/acore/game-framework/LICENSE-AGPL3 deleted file mode 100644 index dbbe355815..0000000000 --- a/modules/acore/game-framework/LICENSE-AGPL3 +++ /dev/null @@ -1,661 +0,0 @@ - GNU AFFERO GENERAL PUBLIC LICENSE - Version 3, 19 November 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU Affero General Public License is a free, copyleft license for -software and other kinds of works, specifically designed to ensure -cooperation with the community in the case of network server software. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -our General Public Licenses are intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - Developers that use our General Public Licenses protect your rights -with two steps: (1) assert copyright on the software, and (2) offer -you this License which gives you legal permission to copy, distribute -and/or modify the software. - - A secondary benefit of defending all users' freedom is that -improvements made in alternate versions of the program, if they -receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of -software used on network servers, this result may fail to come about. -The GNU General Public License permits making a modified version and -letting the public access it on a server without ever releasing its -source code to the public. - - The GNU Affero General Public License is designed specifically to -ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to -provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on -a publicly accessible server, gives the public access to the source -code of the modified version. - - An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is -a different license, not a version of the Affero GPL, but Affero has -released a new version of the Affero GPL which permits relicensing under -this license. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU Affero General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Remote Network Interaction; Use with the GNU General Public License. - - Notwithstanding any other provision of this License, if you modify the -Program, your modified version must prominently offer all users -interacting with it remotely through a computer network (if your version -supports such interaction) an opportunity to receive the Corresponding -Source of your version by providing access to the Corresponding Source -from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source -shall include the Corresponding Source for any work covered by version 3 -of the GNU General Public License that is incorporated pursuant to the -following paragraph. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the work with which it is combined will remain governed by version -3 of the GNU General Public License. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU Affero General Public License from time to time. Such new versions -will be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU Affero General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU Affero General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU Affero General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero 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 Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If your software can interact with users remotely through a computer -network, you should also make sure that it provides a way for users to -get its source. For example, if your program is a web application, its -interface could display a "Source" link that leads users to an archive -of the code. There are many ways you could offer source, and different -solutions will be better for different programs; see section 13 for the -specific requirements. - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU AGPL, see -. diff --git a/modules/acore/game-framework/src/Addons/AddonMgr.cpp b/modules/acore/game-framework/src/Addons/AddonMgr.cpp deleted file mode 100644 index a8bcdc875e..0000000000 --- a/modules/acore/game-framework/src/Addons/AddonMgr.cpp +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright (C) 2016+ AzerothCore , released under GNU GPL v2 license: http://github.com/azerothcore/azerothcore-wotlk/LICENSE-GPL2 - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#include "AddonMgr.h" -#include "DatabaseEnv.h" -#include "Log.h" -#include "Timer.h" - -#include -#include - -namespace AddonMgr -{ - -// Anonymous namespace ensures file scope of all the stuff inside it, even -// if you add something more to this namespace somewhere else. -namespace -{ - // List of saved addons (in DB). - typedef std::list SavedAddonsList; - - SavedAddonsList m_knownAddons; - BannedAddonList m_bannedAddons; -} - -void LoadFromDB() -{ - uint32 oldMSTime = getMSTime(); - - QueryResult result = CharacterDatabase.Query("SELECT name, crc FROM addons"); - if (!result) - { - sLog->outString(">> Loaded 0 known addons. DB table `addons` is empty!"); - sLog->outString(); - return; - } - - uint32 count = 0; - - do - { - Field* fields = result->Fetch(); - - std::string name = fields[0].GetString(); - uint32 crc = fields[1].GetUInt32(); - - m_knownAddons.push_back(SavedAddon(name, crc)); - - ++count; - } - while (result->NextRow()); - - sLog->outString(">> Loaded %u known addons in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - - oldMSTime = getMSTime(); - result = CharacterDatabase.Query("SELECT id, name, version, UNIX_TIMESTAMP(timestamp) FROM banned_addons"); - if (result) - { - uint32 count = 0; - uint32 offset = 102; - - do - { - Field* fields = result->Fetch(); - - BannedAddon addon; - addon.Id = fields[0].GetUInt32() + offset; - addon.Timestamp = uint32(fields[3].GetUInt64()); - - std::string name = fields[1].GetString(); - std::string version = fields[2].GetString(); - - MD5(reinterpret_cast(name.c_str()), name.length(), addon.NameMD5); - MD5(reinterpret_cast(version.c_str()), version.length(), addon.VersionMD5); - - m_bannedAddons.push_back(addon); - - ++count; - } while (result->NextRow()); - - sLog->outString(">> Loaded %u banned addons in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog->outString(); - } -} - -void SaveAddon(AddonInfo const& addon) -{ - std::string name = addon.Name; - - PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_ADDON); - - stmt->setString(0, name); - stmt->setUInt32(1, addon.CRC); - - CharacterDatabase.Execute(stmt); - - m_knownAddons.push_back(SavedAddon(addon.Name, addon.CRC)); -} - -SavedAddon const* GetAddonInfo(const std::string& name) -{ - for (SavedAddonsList::const_iterator it = m_knownAddons.begin(); it != m_knownAddons.end(); ++it) - { - SavedAddon const& addon = (*it); - if (addon.Name == name) - return &addon; - } - - return NULL; -} - -BannedAddonList const* GetBannedAddons() -{ - return &m_bannedAddons; -} - -} // Namespace diff --git a/modules/acore/game-framework/src/Addons/AddonMgr.h b/modules/acore/game-framework/src/Addons/AddonMgr.h deleted file mode 100644 index 24113ff8a5..0000000000 --- a/modules/acore/game-framework/src/Addons/AddonMgr.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (C) 2016+ AzerothCore , released under GNU GPL v2 license: http://github.com/azerothcore/azerothcore-wotlk/LICENSE-GPL2 - * Copyright (C) 2008-2016 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - */ - -#ifndef _ADDONMGR_H -#define _ADDONMGR_H - -#include "Define.h" -#include -#include - -struct AddonInfo -{ - AddonInfo(const std::string& name, uint8 enabled, uint32 crc, uint8 state, bool crcOrPubKey) - : Name(name), Enabled(enabled), CRC(crc), State(state), UsePublicKeyOrCRC(crcOrPubKey) {} - - std::string Name; - uint8 Enabled; - uint32 CRC; - uint8 State; - bool UsePublicKeyOrCRC; -}; - -struct SavedAddon -{ - SavedAddon(const std::string& name, uint32 crc) : Name(name) - { - CRC = crc; - } - - std::string Name; - uint32 CRC; -}; - -struct BannedAddon -{ - uint32 Id; - uint8 NameMD5[16]; - uint8 VersionMD5[16]; - uint32 Timestamp; -}; - -#define STANDARD_ADDON_CRC 0x4c1c776d - -namespace AddonMgr -{ - void LoadFromDB(); - void SaveAddon(AddonInfo const& addon); - SavedAddon const* GetAddonInfo(const std::string& name); - - typedef std::list BannedAddonList; - BannedAddonList const* GetBannedAddons(); -} - -#endif - diff --git a/modules/acore/game-framework/src/CMakeLists.txt b/modules/acore/game-framework/src/CMakeLists.txt deleted file mode 100644 index 94b4628ba7..0000000000 --- a/modules/acore/game-framework/src/CMakeLists.txt +++ /dev/null @@ -1,65 +0,0 @@ -if( USE_COREPCH ) - include_directories(${CMAKE_CURRENT_BINARY_DIR}) -endif() - -file(GLOB_RECURSE sources_Addons Addons/*.cpp Addons/*.h) -file(GLOB sources_localdir *.cpp *.h) - -# Build gamefw sourcelist -# - -if (USE_COREPCH) - set(gamefw_STAT_PCH_HDR PrecompiledHeaders/gamefwPCH.h) - set(gamefw_STAT_PCH_SRC PrecompiledHeaders/gamefwPCH.cpp) -endif() - -set(gamefw_STAT_SRCS - ${gamefw_STAT_SRCS} - ${sources_Addons} - ${sources_localdir} -) - -include_directories( - ${CMAKE_BINARY_DIR} - ${CMAKE_SOURCE_DIR}/modules/worldengine/deps/recastnavigation/Detour - ${CMAKE_SOURCE_DIR}/modules/worldengine/deps/recastnavigation/Recast - ${CMAKE_SOURCE_DIR}/modules/worldengine/deps/g3dlite/include - ${CMAKE_SOURCE_DIR}/modules/worldengine/deps/SFMT - ${CMAKE_SOURCE_DIR}/modules/worldengine/deps/zlib - ${CMAKE_SOURCE_DIR}/modules/worldengine/lib-collision/src/ - ${CMAKE_SOURCE_DIR}/modules/worldengine/lib-collision/src/Management - ${CMAKE_SOURCE_DIR}/modules/worldengine/lib-collision/src/Models - ${CMAKE_SOURCE_DIR}/modules/worldengine/lib-collision/src/Maps - ${CMAKE_SOURCE_DIR}/modules/worldengine/nucleus/src - ${CMAKE_SOURCE_DIR}/modules/worldengine/nucleus/src/Configuration - ${CMAKE_SOURCE_DIR}/modules/worldengine/nucleus/src/Cryptography - ${CMAKE_SOURCE_DIR}/modules/worldengine/nucleus/src/Cryptography/Authentication - ${CMAKE_SOURCE_DIR}/modules/worldengine/nucleus/src/Database - ${CMAKE_SOURCE_DIR}/modules/worldengine/nucleus/src/DataStores - ${CMAKE_SOURCE_DIR}/modules/worldengine/nucleus/src/Debugging - ${CMAKE_SOURCE_DIR}/modules/worldengine/nucleus/src/Dynamic/LinkedReference - ${CMAKE_SOURCE_DIR}/modules/worldengine/nucleus/src/Dynamic - ${CMAKE_SOURCE_DIR}/modules/worldengine/nucleus/src/Logging - ${CMAKE_SOURCE_DIR}/modules/worldengine/nucleus/src/Packets - ${CMAKE_SOURCE_DIR}/modules/worldengine/nucleus/src/Threading - ${CMAKE_SOURCE_DIR}/modules/worldengine/nucleus/src/Utilities - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/Addons - ${ACE_INCLUDE_DIR} - ${MYSQL_INCLUDE_DIR} - ${OPENSSL_INCLUDE_DIR} -) - -add_library(gamefw STATIC - ${gamefw_STAT_SRCS} - ${gamefw_STAT_PCH_SRC} -) - -target_link_libraries(gamefw - ${ACE_LIBRARY} -) - -# Generate precompiled header -if (USE_COREPCH) - add_cxx_pch(gamefw ${gamefw_STAT_PCH_HDR} ${gamefw_STAT_PCH_SRC}) -endif () diff --git a/modules/acore/game-framework/src/PrecompiledHeaders/gamefwPCH.cpp b/modules/acore/game-framework/src/PrecompiledHeaders/gamefwPCH.cpp deleted file mode 100644 index 7b1c00bd67..0000000000 --- a/modules/acore/game-framework/src/PrecompiledHeaders/gamefwPCH.cpp +++ /dev/null @@ -1 +0,0 @@ -#include "gamefwPCH.h" diff --git a/modules/acore/game-framework/src/PrecompiledHeaders/gamefwPCH.h b/modules/acore/game-framework/src/PrecompiledHeaders/gamefwPCH.h deleted file mode 100644 index 6c1fefefb6..0000000000 --- a/modules/acore/game-framework/src/PrecompiledHeaders/gamefwPCH.h +++ /dev/null @@ -1,3 +0,0 @@ -//add here most rarely modified headers to speed up debug build compilation - - diff --git a/modules/acore/startup-scripts/conf.sh.dist b/modules/acore/startup-scripts/conf.sh.dist deleted file mode 100644 index 774a7c01ce..0000000000 --- a/modules/acore/startup-scripts/conf.sh.dist +++ /dev/null @@ -1,50 +0,0 @@ -# enable/disable GDB execution -export GDB_ENABLED=0 - -# [optional] gdb file -# default: gdb.txt -export GDB="" - -# directory where binary are stored -export BINPATH="" - -# Put here the pid you configured on your worldserver.conf file -# needed when GDB_ENABLED=1 -export SERVERPID="" - -# path to configuration file (including the file name) -# ex: /home/user/azerothcore/etc/worldserver.conf -export CONFIG="" - -# path of log files -# needed by restarter to store its logs -export LOGS_PATH=""; - -# exec name -# ex: worldserver -export SERVERBIN="" - -# prefix name for log files -# to avoid collision with other restarters -export LOG_PREFIX_NAME="" - -# [optional] name of screen service -# if no specified, screen util won't be used -export SCREEN_NAME="" - -# [optional] overwrite default screen options: -A -m -d -S -# WARNING: if you are running it under a systemd service -# please do not remove -m -d arguments from screen if are you using it, -# or keep WITH_CONSOLE=0 . -# otherwise the journald-logging system will take 100% of CPU slowing -# down the whole machine. It's because a systemd service should have -# low console output. -export SCREEN_OPTIONS="" - -# enable/disable it to show the output -# within console, if disable the output will be redirect to -# logging files -# -export WITH_CONSOLE=0 - - diff --git a/modules/acore/startup-scripts/examples/restarter-auth.sh b/modules/acore/startup-scripts/examples/restarter-auth.sh deleted file mode 100644 index 575981cf2a..0000000000 --- a/modules/acore/startup-scripts/examples/restarter-auth.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash - -PATH_RUNENGINE="./" - -source $PATH_RUNENGINE/run-engine - -# you must create your conf -# copying conf.sh.dist -# and renaming as below -source ./conf-auth.sh - -restarter - - diff --git a/modules/acore/startup-scripts/examples/restarter-world.sh b/modules/acore/startup-scripts/examples/restarter-world.sh deleted file mode 100644 index 5307eb4a76..0000000000 --- a/modules/acore/startup-scripts/examples/restarter-world.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash - -PATH_RUNENGINE="./" - -source $PATH_RUNENGINE/run-engine - -# you must create your conf -# copying conf.sh.dist -# and renaming as below -source ./conf-world.sh - -restarter - - diff --git a/modules/acore/startup-scripts/examples/starter-auth.sh b/modules/acore/startup-scripts/examples/starter-auth.sh deleted file mode 100644 index 0aedb9bca7..0000000000 --- a/modules/acore/startup-scripts/examples/starter-auth.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash - -PATH_RUNENGINE="./" - -source $PATH_RUNENGINE/run-engine - -# you must create your conf -# copying conf.sh.dist -# and renaming as below -source ./conf-auth.sh - -starter - - diff --git a/modules/acore/startup-scripts/examples/starter-world.sh b/modules/acore/startup-scripts/examples/starter-world.sh deleted file mode 100644 index 4b866dee1d..0000000000 --- a/modules/acore/startup-scripts/examples/starter-world.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash - -PATH_RUNENGINE="./" - -source $PATH_RUNENGINE/run-engine - -# you must create your conf -# copying conf.sh.dist -# and renaming as below -source ./conf-world.sh - -starter - - diff --git a/modules/acore/startup-scripts/run-engine b/modules/acore/startup-scripts/run-engine deleted file mode 100644 index 86391f02a7..0000000000 --- a/modules/acore/startup-scripts/run-engine +++ /dev/null @@ -1,113 +0,0 @@ -export RUN_ENGINE_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -# load default conf -if [ -e "$RUN_ENGINE_PATH/conf.dist" ]; then - source "$RUN_ENGINE_PATH/conf.sh.dist" -fi - -function finish { - if [ ! -z "$SCREEN_NAME" ]; then - screen -X -S "$SCREEN_NAME" quit - fi -} - -# disabled for now, but could be useful if we want -# shutdown the process if restarter crashes for some reason -# trap finish EXIT - -function configureFiles() { - TRACE_BEGIN_STRING="SIGSEGV" - TRACE_FILE="$LOGS_PATH/"$LOG_PREFIX_NAME"_trace.log" - ERR_FILE="$LOGS_PATH/"$LOG_PREFIX_NAME"_error.log" - SYSLOG="$LOGS_PATH/"$LOG_PREFIX_NAME"_system.log" - SYSERR="$LOGS_PATH/"$LOG_PREFIX_NAME"_system.err" - LINKS_FILE="$LOGS_PATH/"$LOG_PREFIX_NAME"_crash_links.link" -} - -function checkStatus() { - local ret=1 - # wipe do : destroy old screens + ls - #screen -wipe - #if screen -ls $1 | grep -q "No Sockets found" - #then - # return 0 - #fi - - local gdbres=$(pgrep -f "gdb -x $GDB --batch $SERVERBIN") - if [[ $GDB_ENABLED -eq 1 && ! -z $gdbres ]]; then - return 1 - fi - - # - # This is a specific check for Azeroth Core in case of screen failure - # It is possible since same binary file cannot be launched with same configuration file - # This is an extra check - # - local binres=$(pgrep -f "$SERVERBIN -c $CONFIG") - if [ ! -z $binres ]; then - return 1 - fi - - return 0 -} - -function run() { - echo $1 - if [ ! -z $1 ]; then - local OPTIONS="-A -m -d -S" - if [ ! -z "$SCREEN_OPTIONS" ]; then - OPTIONS=$SCREEN_OPTIONS - fi - - echo "> Starting with screen ( screen $OPTIONS )" - - screen $OPTIONS $1 "$RUN_ENGINE_PATH/starter" $2 $3 "$4" "$5" "$6" $7 - else - $RUN_ENGINE_PATH/starter $2 $3 "$4" "$5" "$6" $7 - fi -} - -function starter() { - cd $BINPATH - - mkdir -p "$LOGS_PATH" - - configureFiles - - run "$SCREEN_NAME" "$SERVERBIN" "$GDB" "$CONFIG" "$SYSLOG" "$SYSERR" "$GDB_ENABLED" -} - - -function restarter() { - cd $BINPATH - - mkdir -p "$LOGS_PATH" - - configureFiles - - if [ ! -f $TRACE_FILE ]; then - touch $TRACE_FILE - fi - - while : - do - if checkStatus $SCREEN_NAME; then - DATE=$(date) - echo "Restarting $SCREEN_NAME Core blizz($DATE)" - if [ $GDB_ENABLED -eq 1 ]; then - echo "GDB enabled" - grep -B 10 -A 1800 "$TRACE_BEGIN_STRING" "$SYSLOG" >> "$TRACE_FILE" - cat "$SYSERR" > "$ERR_FILE" - run "$SCREEN_NAME" "$SERVERBIN" "$GDB" "$CONFIG" "$SYSLOG" "$SYSERR" 1 - fi - - if [ $GDB_ENABLED -eq 0 ]; then - echo "GDB disabled" - run "$SCREEN_NAME" "$SERVERBIN" null "$CONFIG" null null 0 - fi - fi - - sleep 10 - done -} - diff --git a/modules/acore/startup-scripts/starter b/modules/acore/startup-scripts/starter deleted file mode 100755 index dcb5a5c97f..0000000000 --- a/modules/acore/startup-scripts/starter +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env bash - -GDB_FILE="$2" -CONFIG="$3" -SYSLOG="$4" -SYSERR="$5" -GDB_ENABLED="$6" - -if [ $GDB_ENABLED -eq 1 ]; then - echo "set logging on" > "$GDB_FILE" - echo "set debug timestamp" >> "$GDB_FILE" - echo "run -c $3" >> "$GDB_FILE" - echo "bt" >> "$GDB_FILE" - - [ ! -f "$SYSLOG" ] && touch "$SYSLOG" - [ ! -f "$SYSERR" ] && touch "$SYSERR" - - if [ $WITH_CONSOLE -eq 0 ]; then - gdb -x $GDB_FILE --batch $1 >> "$SYSLOG" 2>> "$SYSERR" - else - echo "> Console enabled" - gdb -x $GDB_FILE --batch $1 > >(tee ${SYSLOG}) 2> >(tee ${SYSERR} >&2) - fi - -elif [ $GDB_ENABLED -eq 0 ]; then - "./$1" -c "$CONFIG" -fi diff --git a/modules/hw-core/bash-lib-event/src/hooks.sh b/modules/hw-core/bash-lib-event/src/hooks.sh deleted file mode 100644 index b791a600fb..0000000000 --- a/modules/hw-core/bash-lib-event/src/hooks.sh +++ /dev/null @@ -1,16 +0,0 @@ -# par 1: hook_name -function hwc_event_run_hooks() { - hook_name="HOOKS_MAP_$1" - read -r -a SRCS <<< ${!hook_name} - echo "Running hooks: $hook_name" - for i in "${SRCS[@]}" - do - $i # run registered hook - done -} - -function hwc_event_register_hooks() { - hook_name="HOOKS_MAP_$1" - hooks=${@:2} - declare -g "$hook_name+=$hooks " -} diff --git a/modules/hw-core/bash-lib-git/bin/git-subtree-list b/modules/hw-core/bash-lib-git/bin/git-subtree-list deleted file mode 100755 index d3af413e9c..0000000000 --- a/modules/hw-core/bash-lib-git/bin/git-subtree-list +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -CUR_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -source $CUR_DIR"/../src/subtree.sh" - -hwc_git_subtree_list diff --git a/modules/hw-core/bash-lib-git/src/subtree.sh b/modules/hw-core/bash-lib-git/src/subtree.sh deleted file mode 100644 index 08820e6405..0000000000 --- a/modules/hw-core/bash-lib-git/src/subtree.sh +++ /dev/null @@ -1,3 +0,0 @@ -function hwc_git_subtree_list() { - git log | grep git-subtree-dir | tr -d ' ' | cut -d ":" -f2 | sort | uniq -} diff --git a/modules/worldengine/deps/.gitignore b/modules/worldengine/deps/.gitignore deleted file mode 100644 index c2e6c9cf29..0000000000 --- a/modules/worldengine/deps/.gitignore +++ /dev/null @@ -1,49 +0,0 @@ -!.gitignore - -!* - -# -#Generic -# - -.directory -.mailmap -*.orig -*.rej -*~ -.hg/ -*.kdev* -.DS_Store -CMakeLists.txt.user -*.bak -*.patch -*.diff -*.REMOTE.* -*.BACKUP.* -*.BASE.* -*.LOCAL.* - -# -# IDE & other softwares -# -/.settings/ -/.externalToolBuilders/* -# exclude in all levels -nbproject/ -.sync.ffs_db - -# -# Eclipse -# -*.pydevproject -.metadata -.gradle -tmp/ -*.tmp -*.swp -*~.nib -local.properties -.settings/ -.loadpath -.project -.cproject diff --git a/modules/worldengine/deps/CMakeLists.txt b/modules/worldengine/deps/CMakeLists.txt deleted file mode 100644 index c64a15ca1c..0000000000 --- a/modules/worldengine/deps/CMakeLists.txt +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright (C) -# -# This file is free software; as a special exception the author gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -if( MSVC ) - string(REGEX REPLACE "/W[0-4] " "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") - string(REGEX REPLACE "/W[0-4] " "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") - add_definitions(/W0) -else() - add_definitions(-w) -endif() - -if(CMAKE_SYSTEM_NAME MATCHES "Linux") - if(SERVERS AND NOT NOJEM) - add_subdirectory(jemalloc) - endif() -endif() - -if(CMAKE_SYSTEM_NAME MATCHES "Windows") - add_subdirectory(acelite) - if(USE_MYSQL_SOURCES) - add_subdirectory(mysqllite) - endif() - if(TOOLS) - add_subdirectory(bzip2) - endif() - add_subdirectory(zlib) -endif() - -add_subdirectory(g3dlite) -add_subdirectory(recastnavigation) - -if(SERVERS) - add_subdirectory(gsoap) -endif() - -if(TOOLS) - add_subdirectory(libmpq) -endif() diff --git a/modules/worldengine/deps/PackageList.txt b/modules/worldengine/deps/PackageList.txt deleted file mode 100644 index 41edd5348f..0000000000 --- a/modules/worldengine/deps/PackageList.txt +++ /dev/null @@ -1,45 +0,0 @@ -AzerothCore uses (parts of or in whole) the following opensource software : - -ACE (ADAPTIVE Communication Environment) - http://www.cs.wustl.edu/~schmidt/ACE.html - Version: 6.1.4 - -bzip2 (a freely available, patent free, high-quality data compressor) - http://www.bzip.org/ - Version: 1.0.6 - -G3D (a commercial-grade C++ 3D engine available as Open Source (BSD License) - http://g3d.sourceforge.net/ - Version: 8.01-Release - -jemalloc (a general-purpose scalable concurrent malloc-implementation) - http://www.canonware.com/jemalloc/ - Version: 3.5.1 - -libMPQ (a library for reading MPQ files) - https://libmpq.org/ - Version: 1.0.4 - -MySQL (the world's most popular open source database software) - http://www.mysql.com/ - Version: 5.5.9 (GA) - -SFMT (SIMD-oriented Fast Mersenne Twister) - Based on http://agner.org/random/ - Version: 2010-Aug-03 - -utf8-cpp (UTF-8 with C++ in a Portable Way) - http://utfcpp.sourceforge.net/ - Version: 2.3.4 - -zlib (A Massively Spiffy Yet Delicately Unobtrusive Compression Library) - http://www.zlib.net/ - Version: 1.2.7 - -gSOAP (a portable development toolkit for C and C++ XML Web services and XML data bindings) - http://gsoap2.sourceforge.net/ - Version: 2.8.10 - -recastnavigation (Recast is state of the art navigation mesh construction toolset for games) - http://code.google.com/p/recastnavigation/ - Version: 1.4 diff --git a/modules/worldengine/deps/SFMT/SFMT.h b/modules/worldengine/deps/SFMT/SFMT.h deleted file mode 100644 index 4004ae1db6..0000000000 --- a/modules/worldengine/deps/SFMT/SFMT.h +++ /dev/null @@ -1,357 +0,0 @@ -/* - * Copyright notice - * ================ - * GNU General Public License http://www.gnu.org/licenses/gpl.html - * This C++ implementation of SFMT contains parts of the original C code - * which was published under the following BSD license, which is therefore - * in effect in addition to the GNU General Public License. - * Copyright (c) 2006, 2007 by Mutsuo Saito, Makoto Matsumoto and Hiroshima University. - * Copyright (c) 2008 by Agner Fog. - * Copyright (c) 2008-2013 Trinity Core - * - * BSD License: - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * > Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * > 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. - * > Neither the name of the Hiroshima University 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 - * 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. - */ - -#ifndef SFMT_H -#define SFMT_H - -#include // Define SSE2 intrinsics -#include "randomc.h" // Define integer types etc -#include -#include - -// Choose one of the possible Mersenne exponents. -// Higher values give longer cycle length and use more memory: -//#define MEXP 607 -//#define MEXP 1279 -//#define MEXP 2281 -//#define MEXP 4253 - #define MEXP 11213 -//#define MEXP 19937 -//#define MEXP 44497 - -// Define constants for the selected Mersenne exponent: -#if MEXP == 44497 -#define SFMT_N 348 // Size of state vector -#define SFMT_M 330 // Position of intermediate feedback -#define SFMT_SL1 5 // Left shift of W[N-1], 32-bit words -#define SFMT_SL2 3 // Left shift of W[0], *8, 128-bit words -#define SFMT_SR1 9 // Right shift of W[M], 32-bit words -#define SFMT_SR2 3 // Right shift of W[N-2], *8, 128-bit words -#define SFMT_MASK 0xeffffffb,0xdfbebfff,0xbfbf7bef,0x9ffd7bff // AND mask -#define SFMT_PARITY 1,0,0xa3ac4000,0xecc1327a // Period certification vector - -#elif MEXP == 19937 -#define SFMT_N 156 // Size of state vector -#define SFMT_M 122 // Position of intermediate feedback -#define SFMT_SL1 18 // Left shift of W[N-1], 32-bit words -#define SFMT_SL2 1 // Left shift of W[0], *8, 128-bit words -#define SFMT_SR1 11 // Right shift of W[M], 32-bit words -#define SFMT_SR2 1 // Right shift of W[N-2], *8, 128-bit words -#define SFMT_MASK 0xdfffffef,0xddfecb7f,0xbffaffff,0xbffffff6 // AND mask -#define SFMT_PARITY 1,0,0,0x13c9e684 // Period certification vector - -#elif MEXP == 11213 -#define SFMT_N 88 // Size of state vector -#define SFMT_M 68 // Position of intermediate feedback -#define SFMT_SL1 14 // Left shift of W[N-1], 32-bit words -#define SFMT_SL2 3 // Left shift of W[0], *8, 128-bit words -#define SFMT_SR1 7 // Right shift of W[M], 32-bit words -#define SFMT_SR2 3 // Right shift of W[N-2], *8, 128-bit words -#define SFMT_MASK 0xeffff7fb,0xffffffef,0xdfdfbfff,0x7fffdbfd // AND mask -#define SFMT_PARITY 1,0,0xe8148000,0xd0c7afa3 // Period certification vector - -#elif MEXP == 4253 -#define SFMT_N 34 // Size of state vector -#define SFMT_M 17 // Position of intermediate feedback -#define SFMT_SL1 20 // Left shift of W[N-1], 32-bit words -#define SFMT_SL2 1 // Left shift of W[0], *8, 128-bit words -#define SFMT_SR1 7 // Right shift of W[M], 32-bit words -#define SFMT_SR2 1 // Right shift of W[N-2], *8, 128-bit words -#define SFMT_MASK 0x9f7bffff, 0x9fffff5f, 0x3efffffb, 0xfffff7bb // AND mask -#define SFMT_PARITY 0xa8000001, 0xaf5390a3, 0xb740b3f8, 0x6c11486d // Period certification vector - -#elif MEXP == 2281 -#define SFMT_N 18 // Size of state vector -#define SFMT_M 12 // Position of intermediate feedback -#define SFMT_SL1 19 // Left shift of W[N-1], 32-bit words -#define SFMT_SL2 1 // Left shift of W[0], *8, 128-bit words -#define SFMT_SR1 5 // Right shift of W[M], 32-bit words -#define SFMT_SR2 1 // Right shift of W[N-2], *8, 128-bit words -#define SFMT_MASK 0xbff7ffbf, 0xfdfffffe, 0xf7ffef7f, 0xf2f7cbbf // AND mask -#define SFMT_PARITY 0x00000001, 0x00000000, 0x00000000, 0x41dfa600 // Period certification vector - -#elif MEXP == 1279 -#define SFMT_N 10 // Size of state vector -#define SFMT_M 7 // Position of intermediate feedback -#define SFMT_SL1 14 // Left shift of W[N-1], 32-bit words -#define SFMT_SL2 3 // Left shift of W[0], *8, 128-bit words -#define SFMT_SR1 5 // Right shift of W[M], 32-bit words -#define SFMT_SR2 1 // Right shift of W[N-2], *8, 128-bit words -#define SFMT_MASK 0xf7fefffd, 0x7fefcfff, 0xaff3ef3f, 0xb5ffff7f // AND mask -#define SFMT_PARITY 0x00000001, 0x00000000, 0x00000000, 0x20000000 // Period certification vector - -#elif MEXP == 607 -#define SFMT_N 5 // Size of state vector -#define SFMT_M 2 // Position of intermediate feedback -#define SFMT_SL1 15 // Left shift of W[N-1], 32-bit words -#define SFMT_SL2 3 // Left shift of W[0], *8, 128-bit words -#define SFMT_SR1 13 // Right shift of W[M], 32-bit words -#define SFMT_SR2 3 // Right shift of W[N-2], *8, 128-bit words -#define SFMT_MASK 0xfdff37ff, 0xef7f3f7d, 0xff777b7d, 0x7ff7fb2f // AND mask -#define SFMT_PARITY 0x00000001, 0x00000000, 0x00000000, 0x5986f054 // Period certification vector -#endif - -// Functions used by SFMTRand::RandomInitByArray (UNUSED AND COMMENTED OUT) -/* -static uint32_t func1(uint32_t x) { - return (x ^ (x >> 27)) * 1664525U; -} - -static uint32_t func2(uint32_t x) { - return (x ^ (x >> 27)) * 1566083941U; -} -*/ - -// Subfunction for the sfmt algorithm -static inline __m128i sfmt_recursion(__m128i const &a, __m128i const &b, -__m128i const &c, __m128i const &d, __m128i const &mask) { - __m128i a1, b1, c1, d1, z1, z2; - b1 = _mm_srli_epi32(b, SFMT_SR1); - a1 = _mm_slli_si128(a, SFMT_SL2); - c1 = _mm_srli_si128(c, SFMT_SR2); - d1 = _mm_slli_epi32(d, SFMT_SL1); - b1 = _mm_and_si128(b1, mask); - z1 = _mm_xor_si128(a, a1); - z2 = _mm_xor_si128(b1, d1); - z1 = _mm_xor_si128(z1, c1); - z2 = _mm_xor_si128(z1, z2); - return z2; -} - -// Class for SFMT generator -class SFMTRand { // Encapsulate random number generator - friend class ACE_TSS; - -public: - SFMTRand() - { - LastInterval = 0; - RandomInit((int)(time(0))); - } - - void RandomInit(int seed) // Re-seed - { - // Re-seed - uint32_t i; // Loop counter - uint32_t y = seed; // Temporary - uint32_t statesize = SFMT_N*4; // Size of state vector - - // Fill state vector with random numbers from seed - ((uint32_t*)state)[0] = y; - const uint32_t factor = 1812433253U;// Multiplication factor - - for (i = 1; i < statesize; i++) { - y = factor * (y ^ (y >> 30)) + i; - ((uint32_t*)state)[i] = y; - } - - // Further initialization and period certification - Init2(); - } - - int32_t IRandom(int32_t min, int32_t max) // Output random integer - { - // Output random integer in the interval min <= x <= max - // Slightly inaccurate if (max-min+1) is not a power of 2 - if (max <= min) { - if (max == min) return min; else return 0x80000000; - } - // Assume 64 bit integers supported. Use multiply and shift method - uint32_t interval; // Length of interval - uint64_t longran; // Random bits * interval - uint32_t iran; // Longran / 2^32 - - interval = (uint32_t)(max - min + 1); - longran = (uint64_t)BRandom() * interval; - iran = (uint32_t)(longran >> 32); - // Convert back to signed and return result - return (int32_t)iran + min; - } - - uint32_t URandom(uint32_t min, uint32_t max) - { - // Output random integer in the interval min <= x <= max - // Slightly inaccurate if (max-min+1) is not a power of 2 - if (max <= min) { - if (max == min) return min; else return 0; - } - // Assume 64 bit integers supported. Use multiply and shift method - uint32_t interval; // Length of interval - uint64_t longran; // Random bits * interval - uint32_t iran; // Longran / 2^32 - - interval = (uint32_t)(max - min + 1); - longran = (uint64_t)BRandom() * interval; - iran = (uint32_t)(longran >> 32); - // Convert back to signed and return result - return iran + min; - } - - double Random() // Output random floating point number - { - // Output random floating point number - if (ix >= SFMT_N*4-1) { - // Make sure we have at least two 32-bit numbers - Generate(); - } - uint64_t r = *(uint64_t*)((uint32_t*)state+ix); - ix += 2; - // 52 bits resolution for compatibility with assembly version: - return (int64_t)(r >> 12) * (1./(67108864.0*67108864.0)); - } - - uint32_t BRandom() // Output random bits - { - // Output 32 random bits - uint32_t y; - - if (ix >= SFMT_N*4) { - Generate(); - } - y = ((uint32_t*)state)[ix++]; - return y; - } -private: - void Init2() // Various initializations and period certification - { - // Various initializations and period certification - uint32_t i, j, temp; - - // Initialize mask - static const uint32_t maskinit[4] = {SFMT_MASK}; - mask = _mm_loadu_si128((__m128i*)maskinit); - - // Period certification - // Define period certification vector - static const uint32_t parityvec[4] = {SFMT_PARITY}; - - // Check if parityvec & state[0] has odd parity - temp = 0; - for (i = 0; i < 4; i++) - temp ^= parityvec[i] & ((uint32_t*)state)[i]; - - for (i = 16; i > 0; i >>= 1) temp ^= temp >> i; - if (!(temp & 1)) { - // parity is even. Certification failed - // Find a nonzero bit in period certification vector - for (i = 0; i < 4; i++) { - if (parityvec[i]) { - for (j = 1; j; j <<= 1) { - if (parityvec[i] & j) { - // Flip the corresponding bit in state[0] to change parity - ((uint32_t*)state)[i] ^= j; - // Done. Exit i and j loops - i = 5; break; - } - } - } - } - } - - // Generate first random numbers and set ix = 0 - Generate(); - } - - void Generate() // Fill state array with new random numbers - { - // Fill state array with new random numbers - int i; - __m128i r, r1, r2; - - r1 = state[SFMT_N - 2]; - r2 = state[SFMT_N - 1]; - for (i = 0; i < SFMT_N - SFMT_M; i++) { - r = sfmt_recursion(state[i], state[i + SFMT_M], r1, r2, mask); - state[i] = r; - r1 = r2; - r2 = r; - } - for (; i < SFMT_N; i++) { - r = sfmt_recursion(state[i], state[i + SFMT_M - SFMT_N], r1, r2, mask); - state[i] = r; - r1 = r2; - r2 = r; - } - ix = 0; - } - - void* operator new(size_t size, std::nothrow_t const&) - { - return _mm_malloc(size, 16); - } - - void operator delete(void* ptr, std::nothrow_t const&) - { - _mm_free(ptr); - } - - void* operator new(size_t size) - { - return _mm_malloc(size, 16); - } - - void operator delete(void* ptr) - { - _mm_free(ptr); - } - - void* operator new[](size_t size, std::nothrow_t const&) - { - return _mm_malloc(size, 16); - } - - void operator delete[](void* ptr, std::nothrow_t const&) - { - _mm_free(ptr); - } - - void* operator new[](size_t size) - { - return _mm_malloc(size, 16); - } - - void operator delete[](void* ptr) - { - _mm_free(ptr); - } - - __m128i mask; // AND mask - __m128i state[SFMT_N]; // State vector for SFMT generator - uint32_t ix; // Index into state array - uint32_t LastInterval; // Last interval length for IRandom - uint32_t RLimit; // Rejection limit used by IRandom -}; - -#endif // SFMT_H diff --git a/modules/worldengine/deps/SFMT/randomc.h b/modules/worldengine/deps/SFMT/randomc.h deleted file mode 100644 index eed2c81a20..0000000000 --- a/modules/worldengine/deps/SFMT/randomc.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright notice - * ================ - * GNU General Public License http://www.gnu.org/licenses/gpl.html - * This C++ implementation of SFMT contains parts of the original C code - * which was published under the following BSD license, which is therefore - * in effect in addition to the GNU General Public License. - * Copyright (c) 2006, 2007 by Mutsuo Saito, Makoto Matsumoto and Hiroshima University. - * Copyright (c) 2008 by Agner Fog. - * Copyright (c) 2008-2013 Trinity Core - * - * BSD License: - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * > Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * > 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. - * > Neither the name of the Hiroshima University 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 - * 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. - */ - -#ifndef RANDOMC_H -#define RANDOMC_H - -// Define integer types with known size: int32_t, uint32_t, int64_t, uint64_t. -// If this doesn't work then insert compiler-specific definitions here: -#if defined(__GNUC__) - // Compilers supporting C99 or C++0x have inttypes.h defining these integer types - #include - #define INT64_SUPPORTED // Remove this if the compiler doesn't support 64-bit integers -#elif defined(_WIN16) || defined(__MSDOS__) || defined(_MSDOS) - // 16 bit systems use long int for 32 bit integer - typedef signed long int int32_t; - typedef unsigned long int uint32_t; -#elif defined(_MSC_VER) - // Microsoft have their own definition - typedef signed __int32 int32_t; - typedef unsigned __int32 uint32_t; - typedef signed __int64 int64_t; - typedef unsigned __int64 uint64_t; - #define INT64_SUPPORTED // Remove this if the compiler doesn't support 64-bit integers -#else - // This works with most compilers - typedef signed int int32_t; - typedef unsigned int uint32_t; - typedef long long int64_t; - typedef unsigned long long uint64_t; - #define INT64_SUPPORTED // Remove this if the compiler doesn't support 64-bit integers -#endif - -#endif // RANDOMC_H diff --git a/modules/worldengine/deps/acelite/AUTHORS b/modules/worldengine/deps/acelite/AUTHORS deleted file mode 100644 index 98fed3d664..0000000000 --- a/modules/worldengine/deps/acelite/AUTHORS +++ /dev/null @@ -1,13 +0,0 @@ -Douglas C. Schmidt -d.schmidt@vanderbilt.edu - -Professor of Computer Science -Associate Chair of Computer Science and Engineering -Department of Electrical Engineering and Computer Science -Senior Researcher at the Institute for Software Integrated Systems (ISIS) -Vanderbilt University -Nashville, TN 37203 - -www.dre.vanderbilt.edu/~schmidt -TEL: (615) 343-8197 -FAX: (615) 343-7440 diff --git a/modules/worldengine/deps/acelite/CMakeLists.txt b/modules/worldengine/deps/acelite/CMakeLists.txt deleted file mode 100644 index 096539f189..0000000000 --- a/modules/worldengine/deps/acelite/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -# Copyright (C) -# -# This file is free software; as a special exception the author gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -add_subdirectory(ace) diff --git a/modules/worldengine/deps/acelite/COPYING b/modules/worldengine/deps/acelite/COPYING deleted file mode 100644 index 5f66fb4b61..0000000000 --- a/modules/worldengine/deps/acelite/COPYING +++ /dev/null @@ -1,111 +0,0 @@ - - _________________________________________________________________ - - Copyright and Licensing Information for ACE(TM), TAO(TM), CIAO(TM), - DAnCE(TM), and CoSMIC(TM) - - [1]ACE(TM), [2]TAO(TM), [3]CIAO(TM), DAnCE(TM), and [4]CoSMIC(TM) - (henceforth referred to as "DOC software") are copyrighted by - [5]Douglas C. Schmidt and his [6]research group at [7]Washington - University, [8]University of California, Irvine, and [9]Vanderbilt - University, Copyright (c) 1993-2015, all rights reserved. Since DOC - software is open-source, freely available software, you are free to - use, modify, copy, and distribute--perpetually and irrevocably--the - DOC software source code and object code produced from the source, as - well as copy and distribute modified versions of this software. You - must, however, include this copyright statement along with any code - built using DOC software that you release. No copyright statement - needs to be provided if you just ship binary executables of your - software products. - - You can use DOC software in commercial and/or binary software releases - and are under no obligation to redistribute any of your source code - that is built using DOC software. Note, however, that you may not - misappropriate the DOC software code, such as copyrighting it yourself - or claiming authorship of the DOC software code, in a way that will - prevent DOC software from being distributed freely using an - open-source development model. You needn't inform anyone that you're - using DOC software in your software, though we encourage you to let - [10]us know so we can promote your project in the [11]DOC software - success stories. - - The [12]ACE, [13]TAO, [14]CIAO, [15]DAnCE, and [16]CoSMIC web sites - are maintained by the [17]DOC Group at the [18]Institute for Software - Integrated Systems (ISIS) and the [19]Center for Distributed Object - Computing of Washington University, St. Louis for the development of - open-source software as part of the open-source software community. - Submissions are provided by the submitter ``as is'' with no warranties - whatsoever, including any warranty of merchantability, noninfringement - of third party intellectual property, or fitness for any particular - purpose. In no event shall the submitter be liable for any direct, - indirect, special, exemplary, punitive, or consequential damages, - including without limitation, lost profits, even if advised of the - possibility of such damages. Likewise, DOC software is provided as is - with no warranties of any kind, including the warranties of design, - merchantability, and fitness for a particular purpose, - noninfringement, or arising from a course of dealing, usage or trade - practice. Washington University, UC Irvine, Vanderbilt University, - their employees, and students shall have no liability with respect to - the infringement of copyrights, trade secrets or any patents by DOC - software or any part thereof. Moreover, in no event will Washington - University, UC Irvine, or Vanderbilt University, their employees, or - students be liable for any lost revenue or profits or other special, - indirect and consequential damages. - - DOC software is provided with no support and without any obligation on - the part of Washington University, UC Irvine, Vanderbilt University, - their employees, or students to assist in its use, correction, - modification, or enhancement. A [20]number of companies around the - world provide commercial support for DOC software, however. DOC - software is Y2K-compliant, as long as the underlying OS platform is - Y2K-compliant. Likewise, DOC software is compliant with the new US - daylight savings rule passed by Congress as "The Energy Policy Act of - 2005," which established new daylight savings times (DST) rules for - the United States that expand DST as of March 2007. Since DOC software - obtains time/date and calendaring information from operating systems - users will not be affected by the new DST rules as long as they - upgrade their operating systems accordingly. - - The names ACE(TM), TAO(TM), CIAO(TM), DAnCE(TM), CoSMIC(TM), - Washington University, UC Irvine, and Vanderbilt University, may not - be used to endorse or promote products or services derived from this - source without express written permission from Washington University, - UC Irvine, or Vanderbilt University. This license grants no permission - to call products or services derived from this source ACE(TM), - TAO(TM), CIAO(TM), DAnCE(TM), or CoSMIC(TM), nor does it grant - permission for the name Washington University, UC Irvine, or - Vanderbilt University to appear in their names. - - If you have any suggestions, additions, comments, or questions, please - let [21]me know. - - [22]Douglas C. Schmidt - _________________________________________________________________ - - Back to the [23]ACE home page. - -References - - 1. http://www.cs.wustl.edu/~schmidt/ACE.html - 2. http://www.cs.wustl.edu/~schmidt/TAO.html - 3. http://www.dre.vanderbilt.edu/CIAO/ - 4. http://www.dre.vanderbilt.edu/cosmic/ - 5. http://www.dre.vanderbilt.edu/~schmidt/ - 6. http://www.cs.wustl.edu/~schmidt/ACE-members.html - 7. http://www.wustl.edu/ - 8. http://www.uci.edu/ - 9. http://www.vanderbilt.edu/ - 10. mailto:doc_group@cs.wustl.edu - 11. http://www.cs.wustl.edu/~schmidt/ACE-users.html - 12. http://www.cs.wustl.edu/~schmidt/ACE.html - 13. http://www.cs.wustl.edu/~schmidt/TAO.html - 14. http://www.dre.vanderbilt.edu/CIAO/ - 15. http://www.dre.vanderbilt.edu/~schmidt/DOC_ROOT/DAnCE/ - 16. http://www.dre.vanderbilt.edu/cosmic/ - 17. http://www.dre.vanderbilt.edu/ - 18. http://www.isis.vanderbilt.edu/ - 19. http://www.cs.wustl.edu/~schmidt/doc-center.html - 20. http://www.cs.wustl.edu/~schmidt/commercial-support.html - 21. mailto:d.schmidt@vanderbilt.edu - 22. http://www.dre.vanderbilt.edu/~schmidt/ - 23. http://www.cs.wustl.edu/ACE.html diff --git a/modules/worldengine/deps/acelite/NEWS b/modules/worldengine/deps/acelite/NEWS deleted file mode 100644 index 60f41f0198..0000000000 --- a/modules/worldengine/deps/acelite/NEWS +++ /dev/null @@ -1,2090 +0,0 @@ -USER VISIBLE CHANGES BETWEEN ACE-6.3.1 and ACE-6.3.2 -==================================================== - -. Added support for std::chrono to ACE_Time_Value. It's - now possible to construct an ACE_Time_Value with a - std::duration. Also streaming, adding and substracting - an ACE_Time_Value to and from a std::duration is - supported. Please see tests/Chrono_Test.cpp for more - details. - -. Allow ACE_INET_Addr to hold all addresses associated with a hostname. The - set of addresses always has a "current" address which is accessed by the - usual "get"-type methods on the class. Two new methods are added to deal - with multiple addresses: - - bool next (void): makes the next available address the "current" one. - Returns false if there are no more addresses. - - void reset (void): resets the iteration mechanism to be able to examine - all of the addresses again. - ACE_Multihomed_INET_Addr has also been enhanced so that the get_addresses() - methods copy all available addresses related to each name. - -. The ACE_Addr::set_addr (void*, int) signature was changed to - ACE_Addr::set_addr (const void*, int). All classes that inherit from - ACE_Addr also have the same change. This affects ACE_ATM_Addr, ACE_Addr, - ACE_INET_Addr, ACE_MEM_Addr, ACE_Netlink_Addr, ACE_SPIPE_Addr, ACE_UNIX_Addr. - Any user-written classes derived from ACE_Addr will also need to change to - match the new signature for virtual method dispatch to continue working - properly in all cases. - -. Added the class ACE_CDR::Fixed (CDR_Base.h) for CDR's fixed-point decimal - data type which stores up to 31 decimal digits and a sign bit. - -USER VISIBLE CHANGES BETWEEN ACE-6.3.0 and ACE-6.3.1 -==================================================== - -. ACE is now hosted on github (https://github.com/DOCGroup/ATCD). - As part of the release process we now generate a ChangeLog - for each release which is stored in the ChangeLogs directory - -. ACE has been ported to OpenBSD 5.6. Old versions of - OpenBSD are no longer supported. - -USER VISIBLE CHANGES BETWEEN ACE-6.2.8 and ACE-6.3.0 -==================================================== - -. ACE now supports Oracle Solaris Studio 12.4 on Solaris. - -. New config macros were added: - ACE_DISABLE_MKTEMP: Disables the availability of ACE_OS::mktemp(). - ACE_DISABLE_TEMPNAM: Disables the availability of ACE_OS::tempnam(). - These can be added to your $ACE_ROOT/ace/config.h to disable these - wrappers which are considered to be a potential security risk. Disabling - one or both will also disable the following: - - ACE_FILE_Addr::set () with the 'any' address specified. - - ACE_MMAP_Memory_Pool use of the 'unique' option. - -. Reduced size of all doxygen documentation by changing the - type of diagrams shown - -. Removed Windows specific workarounds from ACE_OS::setsockopt, as a - result SO_REUSEPORT is not defined anymore on Windows and SO_REUSEADDR - is passed directly to the OS - -. By adding a 'specific' section to a MPC (base) project it is now possible - to have object file output directories per project for GNUACE projects. - The following should be added to MPC projects (bugzilla #3868): - specific(gnuace) { - build_dir_per_project=1 - } - -. ACE_Asynch_Write_File will now correctly accept non-socket (file, TTY ..) - handles (bugzilla #3762 and #3992) - -. Fixes for VxWorks 6.9 - -USER VISIBLE CHANGES BETWEEN ACE-6.2.7 and ACE-6.2.8 -==================================================== - -. Add new ACE::make_event_handler() which is similar - to std::make_shared but than for allocation of ACE - event handlers. This template method is only enabled - when ACE_HAS_CPP11 has been defined, which is set - automatically when a C++ compiler with adequate - C++11 support is used. Also ACE_Event_Handler_var is - extended with some C++11 specific operations - -. For all reactor types calling cancel_timer with a - nullptr is now allowed, will result in a return of 0 - -. ACE_DLL and ACE_DLL_Manager have been extended with - the support to retrieve any dynamic loader errors - -USER VISIBLE CHANGES BETWEEN ACE-6.2.6 and ACE-6.2.7 -==================================================== - -. Added configuration files for Microsoft Visual Studio 2014 - -. Added configuration files for MacOSX Yosemite - -. Added configuration files for IBM AIX XL C++ 12.1 - -USER VISIBLE CHANGES BETWEEN ACE-6.2.5 and ACE-6.2.6 -==================================================== - -. Resolved several data races reported by Intel Inspector XE - -. Added optional socket connection optimization for Windows - -. Improve functionality and stability of running tests on - Android Virtual Device (AVD). - -USER VISIBLE CHANGES BETWEEN ACE-6.2.4 and ACE-6.2.5 -==================================================== - -. Added the ability to build RPMs for just ACE, using an ACE-src tarball. - To do this add "--without tao" to the rpmbuild command line. - -. Added support for Embarcadero C++Builder XE5 using - bcc32 in debug and release mode - -. Added support for Embarcadero C++Builder XE6 using - bcc32 in debug and release mode - -. When Intel C++ 2013 SP1 Update 2 is used with C++11 enabled - as compiler feature now also ACE_HAS_CPP11 will be defined, - this compiler is now able to compile all our C++11 feature - tests - -. Fixed several boundary bugs in the ACE RLE Compressor - -USER VISIBLE CHANGES BETWEEN ACE-6.2.3 and ACE-6.2.4 -==================================================== - -. Added support for FC20 and ended support for FC19 - -. Extended C++11 feature test suite - -. Improved support for MingW64 - -. Improvements to IPv6 support on Windows - -USER VISIBLE CHANGES BETWEEN ACE-6.2.2 and ACE-6.2.3 -==================================================== - -. The ACE_OS::thr_join() method will detect if the thread to be waited on is - the calling thread and avert that deadlock. The support needed for this - method is available at Vista/Windows Server 2003 and higher; to enable - the deadlock prevention, compile ACE with _WIN32_WINNT=0x0502 or higher. - -. Ended maintenance and support for FC12 CEEL - -. Further improvements of the Android port: Added new define - ACE_HAS_EXPLICIT_TEMPLATE_CLASS_INSTANTIATION and related macros - ACE_SINGLETON_TEMPLATE_INSTANTIATION and ACE_SINGLETON_TEMPLATE_INSTANTIATE - providing a cleaner way to support explicit template (static member or class) - instantiation. - -' Improvements of the test framework for running tests in a mixed environment - where different targets run on different physiscal devices (possibly having - different OS). - -USER VISIBLE CHANGES BETWEEN ACE-6.2.1 and ACE-6.2.2 -==================================================== - -. The max_len argument to ACE_Process::command_line_buf changed from int* - to size_t*. This corrects a mismatch between the argument type and the - data member in ACE_Process from which the value comes. - -. Removed some include files from ACE.h. These were not required for ACE. - The removed includes are OS_NS_math, Flag_Manip, Handle_Ops, Lib_Find, - Init_ACE, Sock_Connect.h. You may have to explicitly add one of these - in your own code to restore compiling. - -. Further improvements of the Android port, still work in progress. - -USER VISIBLE CHANGES BETWEEN ACE-6.2.0 and ACE-6.2.1 -==================================================== - -. Added support for Fedora 19, ended daily maintenance - for Fedora 17 and 18 - -. Added support for Embarcadero C++BuilderXE4 using - bcc32 in debug and release mode - -. Improved support for Android - -USER VISIBLE CHANGES BETWEEN ACE-6.1.9 and ACE-6.2.0 -==================================================== - -. None - -USER VISIBLE CHANGES BETWEEN ACE-6.1.8 and ACE-6.1.9 -==================================================== - -. Added MinGW64 as supported platform - -. Added support for GCC 4.8.0 - -USER VISIBLE CHANGES BETWEEN ACE-6.1.7 and ACE-6.1.8 -==================================================== - -. Small bug fixes - -USER VISIBLE CHANGES BETWEEN ACE-6.1.6 and ACE-6.1.7 -==================================================== - -. Integrated several patches to simplify Debian/Ubuntu - packaging - -USER VISIBLE CHANGES BETWEEN ACE-6.1.5 and ACE-6.1.6 -==================================================== - -. Added new event and sema initialization methods to OS_NS_Thread - to allow passing pre-initialized condition attributes providing - basic support for using time policies in ACE Event classes. - -. Added TIME_POLICY support to ACE_Event classes to allow for - monotonic timer support for ACE Events. - -. Added new regression test: - Monotonic_Manual_Event_Test - -USER VISIBLE CHANGES BETWEEN ACE-6.1.4 and ACE-6.1.5 -==================================================== - -. When a ACE_Event_Handler registered for signals is unregistered, - whether by unregistering, returning -1 from handle_signal(), or by - the reactor closing, the ACE_Event_Handler::handle_close() hook will - be called. The close_mask passed will be ACE_Event_Handler::SIGNAL_MASK. - In previous versions, handle_close() would only be called when the - handle_signal() callback returned -1. This resolves Bugzilla #2368. - -. Some initial ACE unit tests to validate the C++11 support of various - compilers - -. Added support for OpenSuSE 12.2 - -USER VISIBLE CHANGES BETWEEN ACE-6.1.3 and ACE-6.1.4 -==================================================== - -. Added a new ACE_Time_Value derived template class (Time_Value_T.h): - - template class ACE_Time_Value_T - - This template class overloads 4 new virtual methods from - the ACE_Time_Value base class to provide time policy aware - time values: - to_relative_time () - to_absolute_time () - now () - duplicate () - -. Updated time policy classes to return ACE_Time_Value_T<> instantiations - for the corresponding time policy instead of 'common' time values. - -. Added new ACE_Monotonic_Time_Policy (Monotonic_Time_Policy.h). - This class provides a monotonic time source for supported - platforms (Windows and POSIX platforms providing the required - clock_gettime() time source; currently verified for Windows and - Linux) - -. Updated OS_NS_Thread to use the new time policy support in ACE_Time_Value - for (relative) time calculations and added new ACE_OS::condattr_setclock () - method. - -. Added TIME_POLICY support to ACE_Condition_Attributes to allow for - monotonic timer support for ACE_Condition. - -. Added TIME_POLICY support to ACE_Message_Queue-s, ACE_Task-s and - related classes to enable support for monotonic timers in the timed - wait methods (ACE_Condition based). See docs/ACE-monotonic-timer.html - for how to use this. - -. Added two new regression tests: - Monotonic_Task_Test - Monotonic_Message_Queue_Test - and updated the Bug_4055_Regression_Test to a fixed state. - -USER VISIBLE CHANGES BETWEEN ACE-6.1.2 and ACE-6.1.3 -==================================================== - -. Added support for Oracle Solaris Studio 12 Update 3 (SunCC 5.12) - -. Added new XML_Utils library which comes from DAnCE but is now also used - by OpenDDS - -USER VISIBLE CHANGES BETWEEN ACE-6.1.1 and ACE-6.1.2 -==================================================== - -. Added compile time support for Windows CE 7, no runtime testing has - been performed - -. The High Res Timer global scale factor on Windows is now 64bit, see bugzilla - 3703 for the background of this. If you use the gsf in your code, use the - new ACE_High_Res_Timer::global_scale_factor_type type trait to not get - any conversion warnings - -. Removed Tandem NSK v2/v3 support which resulted in cleanup throughout all - code. The emulations for ACE_INT64/ACE_UINT64 have been removed because no - platform is using them anymore - -USER VISIBLE CHANGES BETWEEN ACE-6.1.0 and ACE-6.1.1 -==================================================== - -. Minor bug fixes - -USER VISIBLE CHANGES BETWEEN ACE-6.0.8 and ACE-6.1.0 -==================================================== - -. Added compilation support for VxWorks 6.9, no runtime - testing has been performed - -. Added ACE Run-length encoding compressor - -. Fixed several Coverity reported issues - -USER VISIBLE CHANGES BETWEEN ACE-6.0.7 and ACE-6.0.8 -==================================================== - -. Added support for MPC's new feature that creates dependency files for IDL - files when generating '-type gnuace' projects. Turned off by default, it - can be enabled in a features file or on the command line with - '-features ace_idl_dependencies=1'. - -USER VISIBLE CHANGES BETWEEN ACE-6.0.6 and ACE-6.0.7 -==================================================== - -. Added a new method to ACE_Atomic_Op, TYPE exchange (TYPE newval) - which does an atomic exchange of the new value with ACE_Atomic_Op's value - and returns the old value. The tests/Atomic_Op_Test.cpp test program has a - test case that exemplifies its usage; see the Exchange_Tester class. - -. Added a new feature to timer queue templates classes: TIME_POLICY. - This feature is specified through a new template argument and provides the - timer queue with a policy for a timer (time of day) value. This feature is - intended to replace (in time) the gettimeofday setter method which has been - marked @deprecated. For now backwards compatibility is guaranteed. - The TIME_POLICY feature provides flexibility with regards to providing a timer - source to the timer queues as well as the possibility for a fully optimized - calling path. - A number of standard time policies are provided in ace/Time_Policy.h. - The tests/Timer_Queue_Test.cpp has been updated to reflect and exemplify these - changes. - -. Added the TIME_POLICY feature also to countdown time class which has now - become a template (ace/Countdown_Time_T.h) - -. Initial support for Microsoft Visual Studio 11 - -. Increased overall code quality by using Coverity and Klocwork - -USER VISIBLE CHANGES BETWEEN ACE-6.0.5 and ACE-6.0.6 -==================================================== - -. Removed autoconf support, only traditional way of - compilation is shipped from now - -. Add support for RHEL 6.1 64bit - -USER VISIBLE CHANGES BETWEEN ACE-6.0.4 and ACE-6.0.5 -==================================================== - -. Improved support for Android and added the ability to run all ACE/TAO tests - automatically using the Android emulator - -USER VISIBLE CHANGES BETWEEN ACE-6.0.3 and ACE-6.0.4 -==================================================== - -. Removed support for C++ Builder - -. Added support for building with the Android NDK, at least r5c. This - is currently available for linux host platforms. - -USER VISIBLE CHANGES BETWEEN ACE-6.0.2 and ACE-6.0.3 -==================================================== - -. Added support for GCC 4.6 - -USER VISIBLE CHANGES BETWEEN ACE-6.0.1 and ACE-6.0.2 -==================================================== - -. The ACE_wrappers/ace/OS.h file has been restored in order to ensure - build-time compatibility with older ACE versions. Its use will still - cause your build to incur more processing time than using the needed - ace/OS_NS_*.h files; however, you should be able to build OS.h-including - code without needing to replace it with OS_NS_* includes. - -. Improved and simplified QNX support - -. Changed rand_r() and getpwnam_r() to conform Single UNIX Specification. - -. Fixed performance of send_v on windows when individual iovec elements - are particularly large. - -USER VISIBLE CHANGES BETWEEN ACE-6.0.0 and ACE-6.0.1 -==================================================== - -. Added support for MinGW with GCC 4.5 - -USER VISIBLE CHANGES BETWEEN ACE-5.8.3 and ACE-6.0.0 -==================================================== - -. Changed the string format produced by ACE::timestamp() from the ctime - format "Day Mon dd hh:mm:ss yyyy" to ISO-8601 yyyy-mm-dd hh:mm:ss.mmmmmm. - This makes the time easier to collate and removes any dependence on locale. - The change affects the output from ACE_Log_Msg's %D format and both VERBOSE - and VERBOSE_LIGHT timestamps in addition to application-made direct calls - to ACE::timestamp(). - -. Removed GCC < 3 support - -. A new build system hook was added for users to include site-private rules - in a build. If a file named "rules.private.GNU" in located in any build - directory it will get included from - $ACE_ROOT/include/makeinclude/rules.local.GNU. The "private_rules_file" - make variable can be set to override the name and/or location of the file. - If no such rules file exists, its absence is silently ignored. This - facility can be used, for example, to integrate a specialized code checker - into the build process. - -USER VISIBLE CHANGES BETWEEN ACE-5.8.2 and ACE-5.8.3 -==================================================== - -. Two new methods were added to ACE_Pipe: close_read() and close_write(). - These methods can be used to close individual pipe handles. - -. The ACE::handle_ready() family of methods was changed to prefer using - poll() over select() on platforms where poll() is available. This - preference was previously only used if ACE_HAS_LIMITED_SELECT was set. - The ACE_HAS_LIMITED_SELECT choice is removed, making ACE_HAS_POLL the - setting that switches this preference. The driving reason for this - is that if select() is called to detect changes on a handle whose - values falls outside that which can safely be stored in an fdset, - the handle-setting macros/functions will set/clear bits outside - of the fdset. This results in very weird memory changes, often in - the stack, which are very hard to diagnose. poll()'s operation - does not suffer from this affect. With the growing use of large - numbers of handles and use of ACE_Dev_Poll_Reactor on Linux, - the rate at which this problem was cropping up was increasing. - -. Added a simple helper ACE::is_equal() which compares equality of two - objects without using operator==. This is useful for comparing floating - point values. - -. Removed all deprecated methods, arguments, files, classes, macros and - anything else we kept for years. - -. Removed Irix/Tru64/SCO/Uniware/Cray support - -. ACE_Pair has been removed. Users should now use std::pair. - -. This is the last micro release that will work with GCC < 3, after x.8.3 - support for GCC < 3 will be removed - -USER VISIBLE CHANGES BETWEEN ACE-5.8.1 and ACE-5.8.2 -==================================================== - -. Added support for the Microsoft Visual Studio 2010 IDE (vc10) - -. Removed complete support for emulated C++ exceptions - -USER VISIBLE CHANGES BETWEEN ACE-5.8.0 and ACE-5.8.1 -==================================================== - -. Added support for Microsoft Visual Studio 2010 using nmake - -. Reduced the amount of doxygen pages generated, the original settings caused - a doxygen generated html package of 1.4GB which was way too large - -. Extended ACE INet addon library with: - * HTTP Basic Authentication - * SSL/HTTPS support. - * Proxy CONNECT tunneling. - -USER VISIBLE CHANGES BETWEEN ACE-5.7.9 and ACE-5.8.0 -==================================================== - -. There are two new ACE_Time_Value methods for getting and setting millisecond - values to/from ACE_UINT64 values: - - ACE_UINT64 ACE_Time_Value::get_msec () const - void ACE_Time_Value::set_msec (const ACE_UINT64 &ms) - - The former is a replacement for the existing msec(ACE_UINT64&) methods that - are "getter" methods whose signatures look confusingly like "setters". See - Bugzilla #3336 for the history behind this change. - - The latter is for consistency and clarity. - -. Added ACE INet addon library for Inet protocol clients (and possibly - servers at some point) like http://, ftp:// etc. - The library implements standard C++ iostream wrapper classes for - ACE Svc_Handler and Reactor based input/output handling, URL classes - and protocol handler classes. - NOTE: This is work in progress! There is no guarentee that the API - won't change in the next few releases. - Protocol handling is currently restricted to client side download - requests for HTTP and FTP. - Handling for upload requests should be added in the near future as well - as HTTP Basic Authentication. - -USER VISIBLE CHANGES BETWEEN ACE-5.7.8 and ACE-5.7.9 -==================================================== - -. ACE's default makefiles (traditional ACE/GNU, not autoconf/automake) - now support installation with "make install". - Please see the ACE-INSTALL.html file for instructions. - -. Support for the ARCH make variable has been enhanced to apply to executables - (in addition to libraries and object files), and the ARCH feature has been - integrated into the MPC-generated makefiles (to work with MPC's requires - and avoids features). - -USER VISIBLE CHANGES BETWEEN ACE-5.7.7 and ACE-5.7.8 -==================================================== - -. ACE now uses GCC builtin Atomic instructions for short, - unsigned short, long, unsigned long, int, unsigned int, - and bool. This makes our Atomic_Op around 7 times faster - -. ACE Service Configuration Framework now process first service - configuration files and then command-line directives. Thus if - application uses both service configuration files and command-line - directives then the command-line directives may override results of - directives in the configuration files. At the same time if the - application uses only the default svc.conf file and command-line - directives then the directives from svc.conf can not override - results of the user provided command-line directives. - -. ACE_Dev_Poll_Reactor now dispatches notifications in only one thread at - a time. This brings notification handling more in line with behavior in - other Reactor implementations. - -USER VISIBLE CHANGES BETWEEN ACE-5.7.6 and ACE-5.7.7 -==================================================== - -. Integrated fix for bug 3104 and regression test for - interval timers. - -. Added support for GCC builtin Atomic instructions which - are enabled with GCC >= 4.1 for PPC32/PPC64/IA64 - -. Improved autoconf support for debian - -. Added support for -mcpu and -mtune. Add TCPU=.. to your - environment/platform_macros.GNU to specify you cpu and - than add cpumodelflag=1 and/or tunemodelflag=1. Using - this with IBM Cell increased the performance significantly - -USER VISIBLE CHANGES BETWEEN ACE-5.7.5 and ACE-5.7.6 -==================================================== - -. Added support for iPhone/iPod Touch/iPad. The following - environment variables are needed: - - IPHONE_TARGET, should be set to either SIMULATOR or - HARDWARE. Set to HARDWARE if you want to deploy - on the iPhone/iPod Touch/iPad device. - - IPHONE_VERSION, should be set to 3.1.2 or 3.2. One can - set the version to any future or past versions, but - only 3.1.2 and 3.2 have been tried. - - Note that one has to compile ACE/TAO statically as - it is believed that the iPhone OS does not support - dynamic loading of external libraries. The usual - procedure of cross compiling ACE/TAO applies - (such as setting HOST_ROOT environment variable). - -. Added support for Embarcadero C++ Builder 2010 - -. Added option to print a given ACE_Time_Value in the log - message instead of system supplied timestamp as in %T - and %D. - The option is implemented as a variant of the %D/%T - options by using the '#' flag character like '%#D' or - '%#T'. When using this flag an ACE_Time_Value pointer is - expected in the argument list supplied with the log message. - This fixed Bugzilla #3221. - -. Fixed problems with ACE_INET_Addr::is_multicast() on - little endian platforms. This fixed bugzilla #3729. - -. Added compilation support for VxWorks 6.8, no runtime - testing has been performed - -USER VISIBLE CHANGES BETWEEN ACE-5.7.4 and ACE-5.7.5 -==================================================== - -. Added MacOSX Snow Leopard support - -. Added strsignal() wrapper - -. Improved LynxOS support - -. Updated Interix port - -. Fixed MinGW compilation problems - -USER VISIBLE CHANGES BETWEEN ACE-5.7.3 and ACE-5.7.4 -==================================================== - -. ACE_CDR::consolidate now returns an int, 0 is ok, -1 is failure - -. Fixed a bug in the realclean feature of the GNU makefiles - -. Improved Sun Studio for Linux support - -. Improved OpenBSD support - -USER VISIBLE CHANGES BETWEEN ACE-5.7.2 and ACE-5.7.3 -==================================================== - -. C++ Builder 2009 Update 3 is the only C++Builder that is supported, older - and newer compilers are not supported anymore - -. Made final changes for the CEGCC port - -. Added a set of tests to validate C++ compiler and the stl implementation - they ship. - -. HP-UX PARISC aCC < 3.80 are deprecated and can't be used anymore. Upgrade - to aCC 3.80 or newer - -USER VISIBLE CHANGES BETWEEN ACE-5.7.1 and ACE-5.7.2 -==================================================== - -. Borland C++ makefiles aren't shipped anymore as part of the release - but have to be generated by the user - -. Refactored gperf to have its own shared library so that we can reuse - that in TAO - -. Added support for SuSE Enterprise 10 - -. ACE_Configuration_Heap::open() now returns -1 with errno EBUSY if it is - called multiple times. Previous versions would allow multiple calls to - open() but leak resources. - -USER VISIBLE CHANGES BETWEEN ACE-5.7.0 and ACE-5.7.1 -==================================================== - -. Added support for Sun Studio 12 Update Pack 1 - -. Fixed compile problems when using Windows CE x86 release mode - -. Fixed compile problems for FreeBSD - -USER VISIBLE CHANGES BETWEEN ACE-5.6.9 and ACE-5.7.0 -==================================================== - -. Added support for the VxWorks vxAtomicLib which is available with VxWorks 6.6 - and newer. If you don't want to use this library undef ACE_HAS_VXATOMICLIB - in your config.h file - -. Added support for C++ Builder 2009 Update 3 - -. Added support for ACE/TAO using the CEGCC project - -. Added support for upcoming Fedora 11 and OpenSuSE Factory - -USER VISIBLE CHANGES BETWEEN ACE-5.6.8 and ACE-5.6.9 -==================================================== - -. Removed Borland/CodeGear C++ Builder 2007 support. If you'd like to - fund this support please let us know. - -. Removed VxWorks 5.5.x, 6.2, and 6.3 support. If you'd like to fund - this support please let us know. - -. Improved Unicode support. - -. Added support for the native Windows Vista and Windows Server 2008 - condition variables. These has to be enabled at compile time, and when - enabled the application can only run on Vista or Server 2008. Add - ACE_HAS_WTHREADS_CONDITION_VARIABLE to your config.h file to enable - these - -. Fixed a bug when trying to read a file of 1 byte when unicode is - enabled - -. Improved the Windows CE port - -. Fixed several Klocwork reported issues - -. Added support for MinGW 3.15 - -. Added support for Incredibuild, which is an MSVC++ feature that - optimizes compiles via distributing builds. - -USER VISIBLE CHANGES BETWEEN ACE-5.6.7 and ACE-5.6.8 -==================================================== - -. Added a new function ACE::isdotdir() which determines if a specified - pathname is "dot dir" (ie. "." or ".."). ACE::isdotdir() is significantly - faster than pair of strcmp() calls. - -. Last micro release that is maintained for Borland/CodeGear C++ - Builder 2007 and Intel C++ on Windows. - -. Fixed crash when ACE thread tries to inherit the logging attributes - from non ACE threads. - -. Fixed many small compile and test errors that occur on some platforms. - -. Fixed log output formatting on some platforms. - -. Bugs fixed: 2748, 3164, 3480, 3494, 3502, 3541, 3542, 3544, 3557. - -USER VISIBLE CHANGES BETWEEN ACE-5.6.6 and ACE-5.6.7 -==================================================== - -. Changed the automake build's feature test for a "usable" config - to warn on failure instead of exiting with an error. This should - make it easier to diagnose configure failures, as the script will - now generate a config.h file even when the test fails. - -. Removed borland MPC template, use the bmake template from now - -. Added Windows Mobile 6 support and improved the WinCE port - -. Removed BCB6 and BCB2006 support - -. Added BCB2009 MPC template - -. Updated stat struct on Windows CE to match the stat struct on other - platforms so that application code can be written portable - -. Added new ACE_OS wrappers: raise, atof, atol, isblank, isascii, - isctype, and iswctype - -. Added ACE_OS wrapper for narrow-char version of strtoll. - -. ACE_OS wrappers for wide-char versions of strtol, strtoul, - strtoll, and strtoll. - -. Added Visual Studio 2010 (vc10) support - -. Added a new feature for the "Traditional Make" build facility to allow - building for multiple architectures out of a single source directory. - To use this facility, set the ARCH make variable. The ARCH value will be - used to add a subdirectory layer below the source directory where the - traditional .shobj, .obj, etc. directories will be placed. - -. Added support for HP-UX 11iv3 on Integrity using aC++ - -. ACE (and TAO) can now be built using GNU make and the Microsoft Visual C++ - compiler and linker. See include/makeinclude/platform_win32_msvc.GNU for - more details. - -. Added support for FC10 - -USER VISIBLE CHANGES BETWEEN ACE-5.6.5 and ACE-5.6.6 -==================================================== - -. Added an option to the ACE_Process_Options class to use a wchar_t - environment buffer on Windows. - -. A new configure option, --enable-rcsid, was added to the autoconf build. - This is used to embed RCS IDs in object files. - -. A new method was added: void ACE_Time_Value::msec (ACE_UINT64&) - This method, like the existing msec(ACE_UINT64&)const method, obtains the - time value in milliseconds and stores it in the passed ACE_UINT64 object. - This method was added so that msec(ACE_UINT64&) can be called on both - const and non-const ACE_Time_Value objects without triggering compile errors. - Fixes Bugzilla #3336. - -. Added ACE_Stack_Trace class to allow users to obtain a stack trace - within their application on supported platforms. A new conversion - character, the question mark, was added to ACE_Log_Msg for stack - trace logging. - -. Added iterator support to ACE_Message_Queue_Ex class. The resulted in - the addition of ACE_Message_Queue_Ex_Iterator class and - ACE_Message_Queue_Ex_Reverse_Iterator class. - -. Renamed gperf to ace_gperf to prevent clashes with the regular gperf - tool that is available in linux distributions - -. Added support for FC9 - -. Added support for OpenSuSE 11.0 - -. Improved support for GCC 4.2 and 4.3 - -. Added support for CodeGear C++ Builder 2009 - -USER VISIBLE CHANGES BETWEEN ACE-5.6.4 and ACE-5.6.5 -==================================================== - -. Added new Monitoring lib that can be used to store and retrieve - counters. This is disabled by default because it is not 100% - finished yet, with the next release it will be enabled by default - -. Fixed bug in ACE_Service_Config when it was used from a thread - not spawned by ACE - -. Add VxWorks 6.x kernel mode with shared library support to ACE - -. Extended the implementation of Unbounded_Set, which has been - renamed Unbounded_Set_Ex, to accept a second parameter which is - a comparator that implements operator() which returns true if - the items are equivalent. Unbounded_Set has been reimplemented - in terms of Unbounded_Set_Ex using a comparator that uses operator==, - which captures the previous behavior. - -. Added support for Intel C++ on MacOSX - -USER VISIBLE CHANGES BETWEEN ACE-5.6.3 and ACE-5.6.4 -==================================================== - -. Reworked the relationship between ACE_Service_Config and - ACE_Service_Gestalt - -. Improved autoconf support - -. Improved AIX with gcc support - -. Improved OpenVMS support - -. Improved VxWorks support - -USER VISIBLE CHANGES BETWEEN ACE-5.6.2 and ACE-5.6.3 -==================================================== - -. Deprecated Visual Age 5 and older - -. Closed a rare race condition hole whereby ACE_Atomic_Op<> function - pointers would not be fully initialized prior to use. See bugzilla - 3185 for details. - -. Tweaks to support MacOS X Leopard (10.5 and 10.5.1) on Intel - -. Fixed compile problems with MinGW with GCC 4.2. Do note that we do see - much more test failures then when using GCC 3.4. - -. Changed to use synchronous exception handling with msvc 8/9 which is the - default. Asynchrous exception handling does catch access violations but - it leads to lower performance and other problems. See also bugzilla 3169 - -. Make ace_main extern C with VxWorks so that it doesn't get mangled - -. Fixed compile errors and warnings for VxWorks 6.6 - -. Added an MPC generator for the WindRiver Workbench 2.6 which is shipped - with VxWorks 6.4 - -. Added support for CodeGear C++ Builder 2007 with December 2007 update - installed - -. Added support for VxWorks 5.5.1 - -. Implemented the const reverse iterator for ACE_Hash_Map_Manager_Ex - -. Increased support for using ACE_Hash_Map_Manager_Ex with STL - functions based on latest standard C++ draft - -USER VISIBLE CHANGES BETWEEN ACE-5.6.1 and ACE-5.6.2 -==================================================== - -. ACE-ified the UUID class, which will change user applications slightly. - -. Added support for Sun Studio 12 - -. Added support for Intel C++ 10.1 - -. Fixed runtime problems with VxWorks 6.x in kernel mode, several improvements - have been made to ACE, but also some problems in the VxWorks kernel have - been found for which WindRiver has made patches. - -. Added support for VxWorks 6.5 kernel mode - -. Added support for MacOS 10.5 - -. Support for MacOS 10.4 is now deprecated. - -. Added support for OpenSuSE 10.3 - -. Added support for RedHat 5.1 - -. Added support for Microsoft Visual Studio 2008 - -. Added support for Fedora Core 8 - -. Added support for Ubuntu 7.10 - -. With Ubuntu 7.04 and 7.10 we can't use visibility, that results in - unresolved externals when building some tests. With lsb_release we - now detect Ubuntu 7.04 and 7.10 automatically and then we disable - visibility - -. Removed deprecated (un)subscribe methods from ACE_SOCK_Dgram_Mcast - -. Added an additional replace() method to ACE_OuptutCDR for replacing a - ACE_CDR::Short value. Also added write_long_placeholder() and - write_short_placeholder() to properly align the stream's write pointer, - write a placeholder value and return the placeholder's pointer. The pointer - can later be used in a call to replace() to replace the placeholder with a - different value. - -. Initial support for VxWorks 6.6 - -. Removed support for pthread draft 4, 6, & 7. This makes the ACE threading - code much cleaner - -. Improved autoconf support - -. Fixed TSS emulation problems - -. Changed ACE_thread_t and ACE_hthread_t to int for VxWorks kernel mode. All - thread creation methods do have an additional const char* argument to - specify the task name, this now also works with pthread support enabled - -. Use bool in much more interfaces where this is possible - -. Added support for Debian Etch - -. Fixed ACE CDR LongDouble support on VxWorks 6.x - -. Added Microsoft Visual Studio 2008 project files to the release packages - -. Fixed a few bugs in the ACE_Vector template - -USER VISIBLE CHANGES BETWEEN ACE-5.6 and ACE-5.6.1 -==================================================== - -. Added support for CodeGear RAD Studio 2007 - -. Added support for CodeGear C++ Builder 2007 Update 3 - -. Modified the definiton of ACE_DEFAULT_THREAD_KEYS on Windows so it - is based on the version of the OS as defined by Microsoft in this web - page: http://tinyurl.com/2jqcmd - This fixes bugzilla #2753 - -USER VISIBLE CHANGES BETWEEN ACE-5.5.10 and ACE-5.6 -==================================================== - -. OpenVMS 8.3 on IA64 port - -. Added autoconf support for Intel C++ 10.0 - -. Improved autoconf support on Linux, Solaris, NetBSD and HPUX - -. CodeGear C++ Builder 2007 Update 2 support - -. The netsvcs's client logging daemon has a new configuration option, - -llocal-ip[:local-port], which can be used to specify the local IP - address and port number for the client logging daemon's connection to - the server logging daemon. If the -l option is specified with an IP - address but not a port number, an unused port number is selected. - -. A new ACE+TAO port to LabVIEW RT 8.2 with Pharlap ETS. The host build - environment is Windows with Microsoft Visual Studio .NET 2003 (VC7.1). - Please see the ACE-INSTALL.html file for build instructions. - -USER VISIBLE CHANGES BETWEEN ACE-5.5.9 and ACE-5.5.10 -==================================================== - -. The ACE_utsname struct, used in the ACE_OS::uname() function when the - platform doesn't provide the standard utsname struct, was changed. It - defines a number of text fields and their types were changed from - ACE_TCHAR[] to char[] in order to be consistent with all other platforms. - This removes the need to write different code for platforms where - ACE_LACKS_UTSNAME_T is set and that have wide characters (most probably - Windows). Fixes Bugzilla #2665. - -. The ACE::daemonize() "close_all_handles" parameter was changed from - an "int" to a "bool" to better reflect how it is used. - -. VxWorks 6.5 support. Compilation of the core libraries has been validated - but no runtime testing has been performed. - -. CodeGear C++ Builder 2007 support. - -. The FaCE utility was moved from the ACE_wrappers/apps directory to - ACE_wrappers/contrib. It is used for testing ACE+TAO apps on WinCE. - See the ACE_wrappers/contrib/FaCE/README file for more information. - -. ACE_INET_Addr::set (u_short port, char *host_name, ...) now favors IPv6 - addresses when compiled with ACE_HAS_IPV6 defined and the supplied address - family is AF_UNSPEC. This means that if host_name has an IPv6 address in - DNS or /etc/hosts, that will be used over an IPv4 address. If no IPv6 - address exists for host_name, then its IPv4 address will be used. - -. Intel C++ 10.0 support - -. Support for the version of vc8 for 64-bit (AMD64) shipped with the Microsoft - Platform SDK. - -. Fixed ACE_Vector::swap() (bugzilla #2951). - -. Make use of the Atomic_Op optimizations on Intel EM64T processors. The - Atomic_Op is now several times faster on EM64T then with previous versions - of ACE - -USER VISIBLE CHANGES BETWEEN ACE-5.5.8 and ACE-5.5.9 -==================================================== - -. Use Intel C++ specific optimizations for Linux on IA64 - -. Improved support for ACE_OS::fgetc. Added support for ACE_OS::fputc, - ACE_OS::getc, ACE_OS::putc and ACE_OS::ungetc. - -. Added support for ACE_OS::log2(double) and improved support for - ACE::log2(u_long). - -. Shared library builds on AIX now produce a libxxx.so file instead of the - previous practice of producing libxxx.a(shr.o). - -. GCC 4.1.2 that comes with Fedora 7 seems to have a fix for the visibility - attribute we use for the singletons. F7 users will therefore need to - define the following in your config.h file. - ACE_GCC_HAS_TEMPLATE_INSTANTIATION_VISIBILITY_ATTRS 1 - -. Fixed (rare) problem in TP_Reactor where incorrect event handler was - resumed. - -. Reduced footprint on some platforms, particularly those that use - g++ >= 3.3. - -USER VISIBLE CHANGES BETWEEN ACE-5.5.7 and ACE-5.5.8 -==================================================== - -. Extended ACE_Event constructor with optional LPSECURITY_ATTRIBUTES - argument - -. Added support for QT4 - -. Added support to integrate with the FOX Toolkit (www.fox-toolkit.org) - -. Added support for Microsoft Visual Studio Code Name "Orcas", which is - the msvc9 beta - -. Added ability to provide an optional priority when calling - ACE_Message_Queue_Ex::enqueue_prio(). There was previously no way - to specify a priority for queueing. - -. Removed support for Visual Age on Windows. - -. ACE will compile once again with ACE_LACKS_CDR_ALIGNMENT #defined. - -. ACE_Process_Manager::terminate() no longer removes the process from the - process descriptor table; the pid remains available in order to call - ACE_Process_Manager::wait(). - -USER VISIBLE CHANGES BETWEEN ACE-5.5.6 and ACE-5.5.7 -==================================================== - -. ACE 5.5 contained a set of pragmas which prevented Visual Studio 2005 (VC8) - from issuing warnings where C run-time functions are used but a more - secure alternative is available. For more information on the C run-time - issues and Microsoft's response, please see the following MSDN page: - http://msdn2.microsoft.com/en-us/library/8ef0s5kh(VS.80).aspx. - In this beta, the pragmas which prevented the warnings have been removed. - The ACE library has been reviewed and most of the use of "unsafe" functions - has been fixed where possible. Since not all of the warnings emanating from - ACE are situations that can or should be fixed, the ACE VC8 projects will - prevent the warnings while building the ACE kit and its contained examples, - tests, etc. The warnings are disabled by adding Microsoft-specified macros - to the compile line via MPC. If desired, the warnings can be re-enabled by - regenerating the project files with different MPC features. Note, however, - that while ACE without warnings caused by the new C run-time functions, your - application builds may trigger these warnings either by use of the "unsafe" - C run-time functions or via use of an inlined ACE_OS method which uses it. - If the warning is caused by an ACE_OS method, there is a more safe alternate - available, probably located by appending _r to the method name (e.g., - instead of using ACE_OS::ctime(), use ACE_OS::ctime_r()). - There are other cases where the compiler may have issued warnings and ACE - prevented this via a #pragma. These #pragmas have been removed as well. - This may cause your application builds to trigger more warnings from VC8 - than past ACE versions. You should review your code and either correct - the code or disable the warnings locally, as appropriate. - -. The "release" argument to a number of ACE_String_Base<> methods was changed - from int to bool to more accurately reflect its purpose. The following - methods were changed: - - ACE_String_Base (const CHAR *s, - ACE_Allocator *the_allocator = 0, - int release = 1); - to - ACE_String_Base (const CHAR *s, - ACE_Allocator *the_allocator = 0, - bool release = true); - - ACE_String_Base (const CHAR *s, - size_type len, - ACE_Allocator *the_allocator = 0, - int release = 1); - to - ACE_String_Base (const CHAR *s, - size_type len, - ACE_Allocator *the_allocator = 0, - bool release = true); - - void set (const CHAR * s, int release = 1); - to - void set (const CHAR * s, bool release = true); - - void set (const CHAR * s, size_type len, int release); - to - void set (const CHAR * s, size_type len, bool release); - - void clear (int release = 0); - to - void clear (bool release = false); - - Since ACE_String_Base forms the basis of the ACE_CString and ACE_TString - classes, this may ripple out to user application code. If you encounter - errors in this area while building your applications, replace the - int argument you are passing to the method now with either true or false. - -. Solutions for the eVC3/4 platform have been removed from this - release. Note that we package WinCE projects/workspaces for use - with VC8. - -. There were 3 new ACE_Log_Msg logging format specifiers added to make logging - easier for types that may change sizes across platforms. These all take one - argument, and the new formats are: - %b - format a ssize_t value - %B - format a size_t value - %: - format a time_t value - -. The ace/Time_Request_Reply.h and ace/Time_Request_Reply.cpp files were - moved from $ACE_ROOT/ace to $ACE_ROOT/netsvcs/lib. The time arguments in - the public API to ACE_Time_Request were changed from ACE_UINT32 to time_t - and the portions of the on-wire protocol that contains time was changed from - ACE_UINT32 to ACE_UINT64. Thus, code that uses the ACE_Time_Request class - to transfer time information will not interoperate properly with prior - ACE versions. This will affect uses of the netsvcs time clerk/server. - -. The portion of the ACE_Name_Request class that carries the on-wire seconds - portion of a timeout value was changed from ACE_UINT32 to ACE_UINT64. This - means that Name server/clients at ACE 5.5.7 and higher will not interoperate - properly with previous ACE versions' name servers/clients. - -. In the ACE_Log_Record (ACE_Log_Priority, long, long) constructor, the - second argument, long time_stamp, was changed to be of type time_t. This - aligns the type with the expected value, a time stamp such as that returned - from ACE_OS::time(). - -. Added support for VxWorks 6.x cross compilation using a Windows host - system - -. Added support for VxWorks 6.x using the diab compiler - -. The destructor of ACE_Event_Handler no longer calls - purge_pending_notifications(). Please see bugzilla #2845 for the full - rationale. - (http://deuce.doc.wustl.edu/bugzilla/show_bug.cgi?id=2845) - -USER VISIBLE CHANGES BETWEEN ACE-5.5.5 and ACE-5.5.6 -==================================================== - -. The ACE_TYPENAME macro has been added to those that are not - available when the ACE_LACKS_DEPRECATED_MACROS config option is set - (it is not set by default). You are encouraged to replace the use of - ACE_TYPENAME with the C++ typename keyword before the ACE_TYPENAME - macros is removed from ACE in the future. - -. A new script, rm_exception_macros.pl, has been added to help users - remove the use of the ACE exception macros from their own code. - -USER VISIBLE CHANGES BETWEEN ACE-5.5.4 and ACE-5.5.5 -==================================================== - -. The prebuild MPC keyword is now supported by the gnuace project type. - This fixes Bugzilla #2713. - -. Support for Windows earlier than NT 4 SP2 was removed. ACE will not build - for Windows 95, 98, Me, etc. out of the box any longer. - -. Reformat stringified IPv6 addresses to use [addr]:port when printing - addresses that contain ':' such as "::1". - -. Added method to ACE_INET_Addr to determine if address is IPv6 or - IPv4 multicast. - -. Fixed a bug in ACE_Async_Timer_Adapter_Timer_Queue_Adapter where the - gettimeofday function of the timer queue was ignored when setting the alarm. - -. Fixed a problem where, on Solaris 9 onwards, calling - ACE_OS::thr_create(THR_NEW_LWP) more than 2^15 (65535) times in a - process will fail. See changelog entry from "Wed Jan 3 22:31:05 UTC - 2007 Chris Cleeland " for more information. - -. Fixed a bug in ACE_QtReactor where the two select() calls in that function - might select on different handler sets. - -. ACE_SOCK_IO::recvv(iovec[], size_t, const ACE_Time_Value* = 0) and - ACE_SOCK_IO::sendv (const iovec[], size_t, const ACE_Time_Value* = 0) methods - were changed to specify the iovec count argument as int instead of size_t - since it gets reduced to int in the underlying OS calls (usually). - -. The following deprecated methods were removed: - - ssize_t ACE_SOCK_IO::recv (iovec iov[], - size_t n, - const ACE_Time_Value *timeout = 0) const; - - ssize_t ACE_SOCK_IO::recv (iovec *io_vec, - const ACE_Time_Value *timeout = 0) const; - - ssize_t ACE_SOCK_IO::send (const iovec iov[], - size_t n, - const ACE_Time_Value *timeout = 0) const; - - These were previously replaced with more specific recvv() and sendv() - methods. - -. The ACE_Service_Repository::find(const ACE_TCHAR name[], - const ACE_Service_Type **srp = 0, - int ignore_suspended = true) const - method's 'ignore_suspended' parameter was changed from int to bool to - reflect it's purpose as a yes/no indicator. - -. Added --enable-ace-reactor-notification-queue configure script - option to the autoconf build for enabling the Reactor's userspace - notification queue (defines ACE_HAS_REACTOR_NOTIFICATION_QUEUE in - config.h). - -. The int ACE_OutputCDR::consolidate(void) method was contributed by - Howard Finer at Sonus Networks. This method consolidates any continuation - blocks used by an ACE_OutputCDR object into a single block. It's useful for - situations which require access to a single memory area containing the - encoded stream, regardless of its length, when the length cannot be known - in advance. - -. There are a number of new methods defined on ACE_String_Base: - - size_t capacity (void) const: This method returns the number - of allocated CHAR units in the string object. - - void fast_resize (size_t): This method manage the sizing/reallocating - of the string, but doesn't do the memory setting of resize(). - - bool operator!= (const CHAR *) const - bool operator== (const CHAR *) const: These methods compare the - string with a nul-terminated CHAR* string. - - nonmember functions operator== and operator!= where also added - that compare const ACE_String_Base and const CHAR*; these make - it possible to switch ACE_String and CHAR* on either side of - the operator. - - Thank you to Kelly Hickel for these additions. - -. There are 2 new build options on the traditional make command: - dmalloc and mtrace. When specified at build time (e.g. make mtrace=1) - the PLATFORM_DMALLOC_CPPFLAGS and/or PLATFORM_MTRACE_CPPFLAGS values - are added to CPPFLAGS. For dmalloc, the PLATFORM_DMALLOC_LDFLAGS and - PLATFORM_DMALLOC_LIBS are added to LDFLAGS and LIBS, respectively. - Thank you to Howard Finer for supplying these additions. - -. Added the ability to specify additional purify and quantify command-line - options by setting PLATFORM_PURIFY_OPTIONS and PLATFORM_QUANTIFY_OPTIONS, - respectively. Thank you to Howard Finer for supplying these additions. - -. Added the ability to use trio (http://sourceforge.net/projects/ctrio/) - if platform lacks decent support for vsnprintf. trio support is - enabled by defining trio=1 in plaform_macros.GNU - -. Removed Irix 5, DGUX, and m88k support - -. Improved LynxOS 4.2 support - -. VxWorks 6.4 support - -. Added support for FC6. Because the GCC 4.1.1 version that gets shipped - has a fix for the visibility attribute we use for the singletons - you will need to define the following in your config.h file. This can't be - done automatically because SuSE 10.2 gets shipped with GCC 4.1.2 but - doesn't have the same fix - ACE_GCC_HAS_TEMPLATE_INSTANTIATION_VISIBILITY_ATTRS 1 - -. RTEMS port - -USER VISIBLE CHANGES BETWEEN ACE-5.5.3 and ACE-5.5.4 -==================================================== - -. Added appropriate intptr_t and uintptr_t typedefs on platforms that - don't provide them (i.e. when ACE_LACKS_INTPTR_T is defined). - -. Added ability to explicitly choose support for 32 bit or 64 bit file - offsets on all platforms. Define the _FILE_OFFSET_BITS preprocessor - symbol to either 32 or 64 to choose the desired number of file - offset bits. This preprocessor symbol is supported natively by most - UNIX and UNIX-like operating systems, and supported by ACE on - Windows. Use the new ACE_OFF_T typedef to refer to file offsets - across UNIX and Windows portably. - -. 64-bit file offsets are now enabled by default in Win64 - configurations. - -. Improved support for 64 bit platforms (64 bit addresses, etc). - -. Added STL-style traits, iterators and a swap() method to the - ACE_Array_Base<> class template. - -. Added STL-style traits and iterator accessors to the - ACE_Hash_Map_Manager_Ex<> class template, as well as new find() and - unbind() methods that return (as an "out" parameter) and accept - iterators, respectively. - -. Greatly improved event handler dispatch performance in - select()-based reactors (e.g. ACE_Select_Reactor and ACE_TP_Reactor) - for large handle sets on Windows. Previous event handler search - were linear, and are now constant on average. - -. Addressed a number of Coverity errors (CHECKED_RETURN, DEADCODE, - LOCK, USE_AFTER_FREE, RESOURCE_LEAK, FORWARD_NULL). - -. Added STL-style "element_type" trait to all ACE auto_ptr class - templates. - -. Removed support for LynxOS 3.x. - -. Resolved Bugzilla #2701 to ensure fini() is called for all - Service Objects upon calling ACE_Service_Config::close() - -. VxWorks 5.5.2 has been tested, for ACE the support is exactly - the same as for VxWorks 5.5.1. No specific defines or flags have - to be used. - -USER VISIBLE CHANGES BETWEEN ACE-5.5.2 and ACE-5.5.3 -==================================================== - -. Added the base projects for executionmanager_stub and plan_generator. - -. Added the ACE_Hash_MultiMap_Manager class and its test file. - -. Changed the ACE_Synch_Options::operator[] method to return bool rather than - int. The value returned is a yes/no indication of whether or not the - specified option(s) are set in the object. - -. Changed the prototype(s) for ACE::debug () to return (and take) a - bool. This is consistent with the original intent for this - feature. If you have been using it like 'ACE::debug () > 0' or - 'ACE::debug (1)', you may have to rebuild ACE. The value of the - ACE_DEBUG environment variable can be used to specify the initial - value for ACE::debug(), at the process start up. - -. An assembler (within a C source file) based implementation for SPARC - of atomic operations suitable for use with the - ACE_Atomic_Op and - ACE_Atomic_Op specializations has - been added. Currently, it can only be enabled by setting the - atomic_ops_sparc make macro to 1 when using the GNUACE build system with - the Solaris SunCC compiler. It should be noted that this requires the - -xarch=v8plus (or higher) be added to the CFLAGS make macro or the - assembler code will not compile. - -. The ACE_Message_Queue_Ex_N class - is new, contributed by Guy Peleg . - ACE_Message_Queue_Ex_N is - similar to ACE_Message_Queue_Ex in that the object queued is a - template parameter. However, ACE_Message_Queue_Ex_N allows the - enqueueing and dequeueing of multiple chained objects at once. This - wasn't added to ACE_Message_Queue_Ex because the chained object - functionality requires the ACE_MESSAGE_TYPE class to have a - ACE_MESSAGE_TYPE *next (void) const method, analogous to - ACE_Message_Block::next(), to follow the chain and this would - probably break existing applications using ACE_Message_Queue_Ex. - The ACE_wrappers/tests/Message_Queue_Test_Ex.cpp test has an example of - how to use the new class. - -. The selector and comparator function pointer arguments to ACE_OS::scandir() - and ACE_Dirent_Selector are now marked as extern "C" to enforce their - use with a C RTL function. User code that defines functions which are - passed as the selector or comparator arguments which are not declared - extern "C" may generate compile warnings. To resolve this, add extern "C" - to the function's signature. See ACE_wrappers/tests/Dirent_Test.cpp for - an example. - -. To address a problem in the ACE string interface that prevented - substring or character searches in very large strings (e.g. greater - than the maximum value of an ssize_t type) from being correctly - reported to the caller, the find(), rfind() and strstr() methods now - return an unsigned integer (size_t) instead of a signed one - (ssize_t). Affected classes include: - - * ACE_CString - * ACE_WString - * ACE_TString - * ACE_NS_WString - - Unless you have been explicitly using -1 instead of npos when - comparing the return value of find(), rfind() and strstr(), and/or - assigning the return value to ssize_t you should not see any - difference. A new size_type typedef has been added to the ACE string - class to aid developers. This typedef is analogous to the standard - C++ string::size_type typedef. - - The ACE_String_Base<>::strstr() documentation and the default - rfind() argument erroneously referred to -1 instead of npos. Those - instances have been corrected. - - To summarize, a "no position" condition is denoted using the npos - constant, not -1. It can be referred directly by scoping it with the - appropriate string class (e.g. ACE_CString::npos, ACE_WString::npos, - etc). - -. Changing the shared library extension for hpux ia64 to ".so". On - HP-UX 11i Version 1.5 the naming scheme is lib*.sl for PA and - lib*.so on IPF. - -. The ACE_Refcounted_Auto_Ptr reset() and release() methods were changed - per Bugzilla #1925. They will both now detach from the underlying - ACE_Refcounted_Auto_Ptr_Rep object; reset() will create a new one for - the new pointer specified as its argument. This change may cause referenced - objects to be deleted in cases where previous ACE versions would not have. - -. The return type of "ACE_Refcounted_Auto_Ptr::null (void) const" changed - from int to bool. It's possible values, true and false, have not changed. - -. TTY_IO now accepts "none" as a valid parity value. Due to this change - 'parityenb' member is now deprecated and will be removed in the future. - The users of TTY_IO class should change their code to use only 'paritymode' - member for parity control and leave 'parityenb' unchanged (it is - enabled by default in class constructor). - -. Support for Intel C++ 9.1 on Windows and Linux - -. VxWorks 6.3 support - -. Fixed Bugzilla #2648 to make sure ACE_Service_Object::fini() - is called iff ACE_Service_Object::init() succeeded, as per - C++NPv2. - -. Added preliminary support for Mac OS X 10.4 on Intel CPU's. - -. Fixed Bugzilla #2602 to re-enable XML Service Configurator - file support. - -USER VISIBLE CHANGES BETWEEN ACE-5.5.1 and ACE-5.5.2 -==================================================== - -. Added support for: - - VxWorks 6.2 for the rtp model using pthread support - - OpenVMS 8.2 for Alpha - -. Removed code and configurations that provided support for: - - Visual C++ 6.0 and 7.0 - - Chorus - - pSOS - - KAI C++ on all platforms - -. Explicit template instantiation support has been removed. This effectively - removes support for Sun Forte 6 and 7 which required explicit template - instantiation to build ACE reliably. - -. Added support for multiple independent Service Repositories through - configuration contexts called "Gestalt". Full backwards compatibility - is maintained through the existing ACE_Service_Config static methods, - while direct individual repository access is enabled through instances - of the new ACE_Service_Gestalt class. ACE_Service_Config has changed to - a specialization of ACE_Service_Gestalt and is only responsible for the - process-wide configuration. - -. To support dynamically-sized ACE_Log_Record messages, the netsvcs - logging components now use ACE CDR encoding and transfer mechanisms - inspired by the examples in Chapter 4 of the C++NPv1 book. - The client and server logging daemons in ACE 5.5.2 and forward will - not interoperate with those in previous ACE versions. - -. Added a wrapper for the sendfile API (ACE_OS::sendfile()). - -. Added support for netlink sockets on Linux. - -. Added a new method, ACE_Task::last_thread(). This method returns the thread - ID (ACE_thread_t) of the last thread to exit from the ACE_Task object. - Users checking to see if a thread is the last one out (for example, to know - when to perform cleanup operations) should compare the current thread ID to - the return value from last_thread(). This is a change from the previously - recommended practice (C++NPv2, page 189) of comparing the return value of - thr_count() with 0. - -. Changed the first argument to ACE_OS::strptime() to be 'const' which - matches its usual usage in POSIX strptime(). This change allows users to - pass const strings in - a common use case. - -. Made part of the file support in ACE 64bit but we have some places where - 32bit types are used, this could lead to some conversion warnings which - will be addressed in the near future, but getting everything 64bit - compliant is a lot of work. - -USER VISIBLE CHANGES BETWEEN ACE-5.5 and ACE-5.5.1 -==================================================== - -. Added support for the --enable-symbol-visibility configure option - to the autoconf build infrastructure instead of solely relying on - feature tests to enable/disable symbol visibility support. This - avoids build problems with icc, etc. - -. Added support for the --enable-fl-reactor configure option to the - autoconf build infrastructure to build the ACE_FlReactor library. - -. Added support for the --enable-qt-reactor configure option to the - autoconf build infrastructure to build the ACE_QtReactor library. - -. Added support for the --enable-xt-reactor configure option to the - autoconf build infrastructure to build the ACE_XtReactor library. - -. Fixed a bug that would cause timer IDs from ACE_Timer_Heap to be - improperly duplicated under certain conditions (Bugzilla #2447). - -. Fixed ACE_SSL_Context::private_key(), context(), and dh_params() methods - to allow retrying a file load after a failed call. - -. Fixed ACE_SSL_Asynch_Stream so it can be instantiated; also moved the - declarations for ACE_SSL_Asynch_Read_Stream_Result, - ACE_SSL_Asynch_Write_Stream_Result, and ACE_SSL_Asynch_Result classes - to the ace/SSL/SSL_Asynch_Stream.h file so applications can see them. - -USER VISIBLE CHANGES BETWEEN ACE-5.4.10 and ACE-5.5 -==================================================== - -. Added a platform macros option "templates=manual", currently only - applies to AIX 5.3 with XL 7 compiler. It allows the user to tell the - compiler to set -qnotempinc and -qnotemplateregistry and works well - in static builds. - -. ACE and its tests compile error free with GCC 4.1 pre release. - -. ACE_Recursive_Thread_Mutex::get_nesting_level() fixed for 64-bit Windows - XP on amd64/EM64T hardware. - -. Many build-time fixes for Windows Mobile 5 and Windows PocketPC 2003 using - Visual Studio .NET 2005 (VC8). - -. Added support for the --enable-tk-reactor configure option to the - autoconf build infrastructure to build the ACE_TkReactor library. - -USER VISIBLE CHANGES BETWEEN ACE-5.4.9 and ACE-5.4.10 -==================================================== - -. Fixed a bug in ACE_Timer_Heap_T::cancel(). - -. Improved ACE_Time_Value support for boundary conditions. - -. Fixed problems with operator placement delete on certain C++ compilers. - -. Fixed a bug with the ACE_SPIPE_Acceptor on Windows. - -. Correctly set sockaddr_in.sin_len and sockaddr_in6.sin6_len on - platforms that have these fields. - -. Avoided problems with namespace pollution for max() macros. - -. Many fixes for ACE_LACKS* and ACE_HAS* macros for autoconfig. - -USER VISIBLE CHANGES BETWEEN ACE-5.4.8 and ACE-5.4.9 -==================================================== - -. Added dozens of new ACE_LACKS and ACE_HAS defines which are used to - simplify the ACE_OS layer - -. Constructors of ACE_Time_Value have been made explicit to prevent - implicit conversions. - -. Added a shutdown() method to ACE_Barrier. The new method aborts the - wait by all threads. - -. Changed the behavior of ACE_Message_Queue::enqueue_head() and - enqueue_tail(). If the enqueued message block has other blocks - chained to it via its next() pointer, the entire chain of blocks - will be enqueued at once. - -. Improved the support for high-resolution timers with - ACE_Timer_Queue_Adapter. - -. Make it possible to disable file caching in JAWS. - -. Improved ACE_Pipe implementation so that it uses localhost to avoid - firewall problems. - -. Added Unicode support to the Service Configurator. - -USER VISIBLE CHANGES BETWEEN ACE-5.4.7 and ACE-5.4.8 -==================================================== - -. Improved IPv6 support - -. Improved 64bit portability - -. TTY_IO overhaul - - Improved documentation. - - It is now possible to request infinite timeout in portable manner. - This can be achieved by setting negative value to readtimeoutmsec. - - Various bugs fixed and portability issues resolved. - -. Subset ACE for TAO and TAO Services - -. Support for Intel C++ 9.0 on Windows and Linux - -. Support for Microsoft Visual Studio 2005 (aka VC8) for Win32 as well - as the Windows CE platforms Pocket PC 2003 and Windows Mobile 5. - Solution/project files are generated with an appended "_vc8" for - Win32 and "_WinCE" for the CE platforms. See - ACE_wrappers/docs/CE-status.txt for more information. - -. Completed implementation of ACE_Dev_Poll_Reactor using the Linux epoll - facility; tested on Red Hat Enterprise Linux 4. - -. The in-memory size of an ACE_RB_Tree will be smaller due to rearranged - placement of pointers. - -. Added an optimization to CDR stream to ignores alignment when marshaling - data. Use this new ACE_LACKS_CDR_ALIGNMENT compile-time option only - when the ACE_DISABLE_SWAP_ON_READ macro is enabled. This new option - requires ACE CDR engine to do both marshaling and demarshaling, and - when this option is enabled the encoded streams are no longer - compliant with the CORBA CDR specification. - -. Developed Feature Oriented Customizer (FOCUS) tool to enable - specialization of middleware frameworks such as Reactor and Protocol - framework. FOCUS provides an XML based transformation engine, where - the transformations to specialize the components are captured in XML - file and a weaver specializes the code. - -. Added support for unrolling ACE_OS::memcpy copy loop where - applicable to improve performance. Autoconf tests empirically - determine whether loop unrolling is at least 10% better than default - version. - -. Added support for an ACE "versioned" namespace. When enabled, ACE - library sources will be placed within a namespace of the user's - choice or a namespace of the form ACE_5_4_7 by default, where - "5_4_7" is the ACE major, minor and beta versions. The default may - be overridden by defining the ACE_VERSIONED_NAMESPACE_NAME - preprocessor symbol. Enable overall versioned namespace support by - adding "versioned_namespace=1" to your MPC default.features file. - -USER VISIBLE CHANGES BETWEEN ACE-5.4.6 and ACE-5.4.7 -==================================================== - -. Support for shared libraries with VxWorks - -. Support for Solaris 10 on x86 with Sun Studio 10 (C++ 5.7). - -. Extended ACE_OS::event_xxx implementation to support platforms - having either PThread support with Process Shared condition - variables or POSIX semaphores with named (process shared) - semaphore support or using the new FIFO based semaphores. - -. ACE_OS::closesocket() no longer calls ACE_OS::shutdown() on any platform - while closing the socket. It previously called ACE_OS::shutdown() on - HP-UX. Removing this call fixes the fork-and-close programming paradigm - that's common to many networked applications. - -. RMCast - - Support for message fragmentation. This will allow - for messages larger than 64K. - - Support for flow control. - - Timed recv() in RMCast::Socket. - - Per-instance configurable protocol parameters (e.g., message - retention time, NAK timeout, etc). - -USER VISIBLE CHANGES BETWEEN ACE-5.4.5 and ACE-5.4.6 -==================================================== - -. Updated RMCast to include - - Reactor-compatible interface. - - Message unavailability reporting. - - Protocol documentation. - -. Added support for 64bit Visual Age on AIX - -. Improved g++ 4.0 support. A number of RTTI related problems have been - fixed. - -. Smaller footprint. - -. Fixed memory leaks ACE_DLL and ACE_Log_Msg classes. - -. The ACE::ICMP_Socket and ACE::Ping_Socket classes were moved out of - the ACE namespace and "flattened" to ACE_ICMP_Socket and - ACE_Ping_Socket to be consistent with the rest of ACE. - -. ACE_INET_Addr::set_address() - fixed a possible struct member - alignment issue when building an IPv4-mapped IPv6 address. - -. Added a new ACE::wild_match() function to match a string based on - wildcards. - -. Added efficient overloads for string concatenation to the - ACE_String_Base class. - -. Added support for the use of pthread_getschedparam on MacOS X. - -. Fixed an issue with static initialization of TSS related classes on - static builds for Windows. - -USER VISIBLE CHANGES BETWEEN ACE-5.4.4 and ACE-5.4.5 -==================================================== - -. Remove special handling in the Thread Specific Storage(TSS) code - that released the TSS key for ACE_TSS. ACE_TSS has - been changed to explicitly free the TSS key when necessary. - -. On Win32 systems: detect thread termination via a hook in DLLMain - for ACE.dll. This allows cleanup of TSS objects for non-ACE threads - that use ACE functions. The most common case was threads that used - ACE logging. Formerly any TSS objects created by these threads would - be leaked. - -. Added support for GNU G++ 4.0. The x.4.5 beta takes advantage of - g++ 4.0's symbol visibility. This feature is conceptually similar - to MS Windows "__declspec(dllexport)" DLL functionality. Using this - new g++ feature results in substantially improved ACE/TAO/CIAO - shared library binaries. A subset of the improvements include the - following: - - * The number of unnecessarily exported DSO/DLL symbols is - greatly reduced, resulting in faster program start times. - * Smaller footprint. - * Improved performance since run-time indirection of internal - symbols is no longer needed. - - No changes to the ACE/TAO sources were necessary to support this - feature since the required visibility attributes were hidden behind - the various "*_Export" macros (formerly only useful for MS Windows - DLLs) used throughout ACE/TAO. - -. The ACE_Reactor destructor will now call close() on the referenced reactor - implementation. This assures that all handlers are notified before the - ACE_Reactor object that's most likely referenced in these handlers is - invalid. Although this should not be a user-visible change, it did catch - some ACE tests off guard destroying reactor implementations and ACE_Reactor - interfaces in the wrong order, so it may come up in the field as well. - When using dynamically allocated reactor implementations, do not destroy - the implementation object before the ACE_Reactor interface object. Use of - the ACE_Reactor constructor's delete_implementation argument (with a value - of 1) is recommended when dynamically allocating reactor implementations. - -. Improved performance of HTBP by not requiring a lookup of peer hostname. - -. Added new ACE_SizeCDR stream which allows one to calculate size of the - representation without writing anything. - -. Number of improvements in RMCast, reliable multicast implementation. - -USER VISIBLE CHANGES BETWEEN ACE-5.4.3 and ACE-5.4.4 -==================================================== - -. The ace-config script has been replaced by pkg-config metadata files - which are installed in ${prefix}/lib/pkgconfig by the automake build. - -. Remove ACE_OS::gets() implementation. While this ACE implementation - of gets() did not contain the security holes that all standard - gets() implementations have, keeping it around only serves to foster - confusion since (1) some may incorrectly assume that this - ACE-specific gets() implementation has the same holes as standard - ones, and (2) invoking it with a default size argument so that it - looks like a standard gets() call results in behavior that is - different from the standard. Use ACE_OS::fgets() instead. - -. Removed ACE_Unbounded_Set_Ex, this gave the false idea that it had - thread safe iterators. Use ACE_Unbounded_Set instead - -. Improved VxWorks support for static libraries. Shared libraries do cause - several known problems which will be fixed in the x.4.5 release. - -. Removed the usage of the ACE_x_cast macros, we are using the C++ casts - from now on. The ACE_x_cast macros are deprecated and will be removed - after the x.5.1 release - -. Some improvements in autoconf support; better detection of available - OS and compiler features. - -. Fixed bugs in ACE TSS emulation - -USER VISIBLE CHANGES BETWEEN ACE-5.4.2 and ACE-5.4.3 -==================================================== - -. Improved Cygwin 1.5.12 support, 90% of the tests now succeed - -. Improved OpenVMS support. - -. Added ability to use fltk with Cygwin/MinGW - -. Added ACE_INT64 that defines a native 64 bit type. - -. Added 'q' as usable specifier for ACE_Log_Msg to print out int64 bit number. - -. Added better support for Intel C++ compilers. - -. Improved HPUX support. - -. Added a new directory ("ACE_wrappers/protocols/ace") for new protocols - that are not directly components of ACE, but are relate to ACE and - defined a new protocol, HTBP (Hypertext Tunneling, Bidirectional - Protocol) providing ACE_Acceptor/Connector/Stream semantics over a - connection owned by an HTTP proxy. Test cases in - ACE_wrappers/tests/HTBP provide examples of use. - -. Performace enhancement in TP_Reactor's handle_timer_events method [Bug - 1971]. - -. Various changes to permit ACE to execute on HP NonStop platform (e.g - support for its pthreads version). - -. Updated HP NonStop configuration files (config-tandem-nsk). - -. The "ACE" pseudo-namespace is now a true C++ namespace. Transitional - pseudo-namespaces that were only meant to be used internally by ACE, - such as "ACE_Sock_Connect", no longer exist. - -. ACE_CDR::Boolean type is now a true C++ "bool" on all platforms except - MSVC++ 6. We plan to deprecate MSVC++ 6 support sometime after the - x.5 release of ACE+TAO+CIAO, so we recommend you start migrating to a - later version of MSVC++. - -. More GNU g++ 3.4.x fixes. - -. Added ICMP and "ping" socket support. - -. Added mkstemp() emulation. - -. Fixed problem on Linux < 2.5.47 platforms where equality comparison of - two logically equal sockaddr_in structure instances would incorrectly - fail. - -. Support for wide characters has been improved on non-Windows - platforms. - -. A number of Windows CE problems have been fixed. - -. ACE's loading of DLLs (for example, as a result of loading synamic - services) has been changed to use the native OS's facilities for - locating the DLL instead of searching LD_LIBRARY_PATH (or its - equivalent) then loading the DLL using a full pathname. This restores - enforcement of a platform's loading and security policy. To use the - old DLL locating method, add ACE_MUST_HELP_DLOPEN_SEARCH_PATH to your - config.h file before building ACE. - -. A number of errors in the APG example programs have been corrected. - -. Select_Reactor and Priority_Reactor performance improved. [Bug 1890] - -. Wide-char functionality on POSIX (Linux, etc.) - -. TSS memory leak fixes [Bug 1542] - -. Ported to HPUX 11i v2 on Itanium - -. Added code to ACE for platform RedHat AS 3.0 on Opteron. - -. Changed ACE::crc32() family of functions to NOT fold in the length of - the string/buffer/iovec into the CRC. - - -USER VISIBLE CHANGES BETWEEN ACE-5.4.1 and ACE-5.4.2 -==================================================== - -. Support for g++ 3.4.1. - -. All ACE Makefiles, project files, etc, are now generated by OCI's - "MakeProjectCreator" (MPC) tool. Makefiles and project files for - commonly used configurations have been pre-generated and distributed - with the beta(s). Please see: - - $ACE_ROOT/ACE-INSTALL.html - - for information on how to use MPC with ACE. - -. Improved Doxygen documentation. - -. Reduced header file dependencies, which should speedup compilation - and help minimize static footprint. - -. ACE now requires support for the following standard C++ features: - - - "bool" keyword - - - "mutable" keyword - - - "explicit" keyword - - - C++ casts (e.g. static_cast<>, reinterpret_cast<>, dynamic_cast<> - and const_cast<>) - - If you're using a compiler that does NOT support these features - please contact Steve Huston for support. - -. Changed the select()-based reactor implementations to scan for - broken handles to remove based on the registered handles, not on - event handlers. This allows for bad handles to be removed from the - reactor even if the event handler doesn't implement get_handle() the - way we expect. - -. Support for Pthreads native recursive mutexes was added. This - capability is specified to ACE_OS::mutex_init() as an optional - argument, lock_type. To fix confusion from an earlier attempt to add - this functionality, the meaning of the old 'type' argument to - ACE_OS::thread_mutex_init() is changed. It previously combined the - scope and type. Now it is just the type (e.g. recursive), as the - scope is inherent in the method used. For clarification on - ACE_HAS_RECURSIVE_MUTEXES, it means that the platform is capable of - them, not that they always are, as one would expect. However, before - Pthreads had recursion added, it was never optional. Now it is. - -. Initial support for new Linux sys_epoll() interface in - Dev_Poll_Reactor. The obsolete Linux /dev/epoll interface is no - longer supported. - -. Improved Cygwin support. - - Threading works without problems. - - Problems with shared memory, process shared mutexes, multicast and - some other small things still exist. - -. New OpenVMS port. - - This is for the latest version of OpenVMS with all available ECOs - applied. Basic stuff works without problems. Advanced features - still need some work. - -. Usage of ASYS_INLINE is deprecated in ACE. Use ACE_INLINE instead. - -. All inline source files now end in ".inl". The previous ".i" - extension is generally used for preprocessed C sources. - -. Autoconf support has been improved and fixed on a number of - platforms, including the BSD variants (e.g. FreeBSD). It is still - not the preferred way to configure most platforms, but it is ready - for wider testing. Please report any problems found to - ace-bugs@cs.wustl.edu. - -. A number of fixes were made to quiet compile errors and warnings on - 64-bit Windows. - -. For builds on AIX using Visual Age C++, the make rtti option default - was changed to 1, enabling RTTI by default. - -. ACE_Service_Repository::remove() has a new, optional argument that - can receive the service record pointer for the removed service. If - the pointer is returned to the caller, it is not deleted. If the - pointer is not returned to the caller (the default) it is deleted - (this is the historic behavior). - -. The tutorials in ACE_wrappers/docs have been removed. They were not - being maintained and caused confusion in a number of cases. Now that - there are complete examples that match the printed books (C++NPv1, - C++NPv2, APG), the older tutorials are no longer useful. Please see - - $ACE_ROOT/examples/C++NPv1/ - $ACE_ROOT/examples/C++NPv2/ - $ACE_ROOT/examples/APG/ - - for the source code of the examples in those books. - -. ACE_String_Base::fast_clear() is a new method which sets the string - length to 0. Doesn't release string-allocated memory, but if the - memory was externally supplied, it is no longer referenced from the - string object. - -. A true C++ "bool" is now used as the CDR stream boolean type, if - supported by the compiler. - -. Renamed AIX 5L configuration header from config-aix5.1.h to - config-aix-5.x.h. - -. All C++ equality, relational and logical operators now return bool - instead of int, as is the norm for modern C++. - -. Added new ACE_OS::realpath() implementation. Contributed by Olli - Savia - - -USER VISIBLE CHANGES BETWEEN ACE-5.4 and ACE-5.4.1 -==================================================== - -ACE ---- - -. Fixed "make install" support in ACE+autoconf configurations. - -. Fixed autoconf support on Solaris. - -. Corrected invalid `aux' directory (on MS Windows) found in ACE - distribution. - -. ACE/TAO build now without problems with MinGW and all ACE tests run - now without problems - -. Added some more support for the new CBuilderX Preview compiler, this - is not 100% ready yet because the compiler is still a preview and - has its own problems. - -. Added Visual SlickEdit 8.1 MPC template - -. Added workaround for compile problems in Borland Release builds - -. Cygwin 1.5.9 is now supported - -. Tests for IPV6 have been added - -. Implement lstat() so that it'll use stat() on platforms that don't - support lstat(). - -. Problems related to ACE_Event_Handler usage in WFMO_Reactor was - fixed. - -. A wrapper for rmdir () has been added. - -. Threads spawned in thread-per-connection mode never inherited the - priority. This problem was fixed and this fix is consistent with the - C++ NPV* books. - -. Fixed memory leaks with ACE_String_Base::resize () - -. Enable the usage of native recursive mutexes for the implementation - of ACE recursive mutexes on Linux. - -. The ACE Proactor framework can now be enabled for AIX 5.2. Since AIO - functionality is not run-time enabled by default on AIX 5.2, the ACE - Proactor code is not built by default on AIX. To enable it, the - config.h file must contain #define ACE_HAS_AIO_CALLS before - including the config-aix-5.1.h file. - -. The ACE_POSIX_CB_Proactor implementation is now built on all - platforms except LynxOS. - - -USER VISIBLE CHANGES BETWEEN ACE-5.3.6 and ACE-5.4 -================================================== - -ACE: ---- -. Added a new makefile commandline flag, static_link, that can be - used to force static linking when static_libs_only is turned on. It - uses the new STATIC_LINK_FLAG variable and is currently only - implemented for for GNU ld, i.e., it adds the "-static" option to - LDFLAGS. It's turned off by default since using it causes the - footprint to go up by almost 1 MB on Linux, since it links all the - system and compiler .a files, but can be turned on if users - want/need to use it, by enabling both static_libs_only and static_link. - - -. Added macros ACE_USES_GPROF which enables users to use gprof in a - multithreaded environment with ACE libs. - -. Added a new functor template class, ACE_Malloc_Lock_Adapter_T, - that's used by ACE_Malloc_T as a factory for the ACE_LOCK template - parameter, and allows the use of locking strategy classes, like - ACE_Process_Semaphore and ACE_Thread_Semaphore that don't have a - satisfactory ctor taking a single required ACE_TCHAR* parameter, to - be adapted to work with ACE_Malloc_T. - -. The source code examples from "The ACE Programmer's Guide" book by - Huston, Syyid, and Johnston, are now located in - $ACE_ROOT/examples/APG. - -. Support for GNU autoconf is now in ACE. Please see ACE-INSTALL.html - for details. - -. Fixed problems that prevented ACE from being compiled on LynxOS - 4.0.0. - -. Fixed compilation error which prevented ACE from being compiled when - ACE_COMPILE_TIMEPROBES was set to 1. - -. Preliminary support for Tandem NSK has been added. - -. Lots of bug fixes with TLI and XPG5. Please see $ACE_ROOT/ChangeLog - for details. - -. Fixed ACE_OS::event_timedwait() and ACE_OS::event_wait() so that - they use a while loop around the ACE_OS::cond_[timed]wait() calls to - avoid problems with spurious wakeups, etc. - -. ACE's wrapper around getipnodebyname() and getipnodebyaddr () has - been made go through the IPv4-only case on ACE_WIN32. Since Windows - IPv6 implementation doesn't offer support (at thistime) for - getipnodebyname() the code has been changed to use the IPV4 part of - the code. - -. Install with Borland C++ of ACE library fixed - -ACEXML: -------- - -. Fixed memory leak in ACEXML parser. - -. Fixed implementations of rewind() in all the CharStreams. They were - broken previously. - -. Fixed bugs in the parser associated with incorrect handling of PE - References for keywords. diff --git a/modules/worldengine/deps/acelite/README b/modules/worldengine/deps/acelite/README deleted file mode 100644 index ba3a21e151..0000000000 --- a/modules/worldengine/deps/acelite/README +++ /dev/null @@ -1,222 +0,0 @@ - - -This document is also available at the following URL: - -http://www.dre.vanderbilt.edu/~schmidt/ACE.html - -All software and documentation is available via both anonymous ftp and -the http.] - -THE ADAPTIVE COMMUNICATION ENVIRONMENT (ACE) - -An Object-Oriented Network Programming Toolkit - ----------------------------------------- - -Overview of ACE - -The ADAPTIVE Communication Environment (ACE) is an object-oriented -(OO) toolkit that implements fundamental design patterns for -communication software. ACE provides a rich set of reusable C++ -wrappers and frameworks that perform common communication software -tasks across a range of OS platforms, including Win32/Win64, most -versions of UNIX (e.g., SunOS, HP-UX , AIX, Linux, NetBSD, and FreeBSD), -real-time operating systems (e.g., VxWorks, Chorus, LynxOS, and QNX), -OpenVMS, and MVS OpenEdition. A single source tree is used for all -these platforms and porting ACE to other platforms is relatively easy. - -The communication software components provided by ACE include event -demultiplexing and event handler dispatching, service initialization, -interprocess communication, shared memory management, message routing, -dynamic (re)configuration of distributed services, multi-threading, -and concurrency control. There are both C++ and Java versions of ACE -available. - -ACE is targeted for developers of high-performance and real-time -communication services and applications on UNIX, POSIX, and Win32 -platforms. ACE simplifies the development of OO network applications -and services that utilize interprocess communication, event -demultiplexing, explicit dynamic linking, and concurrency. ACE -automates system configuration and reconfiguration by dynamically -linking services into applications at run-time and executing these -services in one or more processes or threads. - -ACE is currently used in commercial projects and products by dozens of -companies including Ericsson, Bellcore, Siemens, Motorola, Kodak, -Boeing, Lucent, DEC, Lockheed Martin, and SAIC. Commercial support -for ACE is available from several companies as listed at -http://www.cs.wustl.edu/~schmidt/commercial-support.html - ----------------------------------------- - -C++ Wrappers for OS Interfaces - -The lower-level portions of ACE provide a set of portable and -type-secure C++ wrappers that encapsulate the following C language OS -interfaces: - - . IPC mechanisms - -- e.g., Internet- and UNIX-domain sockets, TLI, Named - Pipes (for UNIX and Win32) and STREAM pipes; - - . Event demultiplexing - -- e.g., select(), poll(), and Win32 - WaitForMultipleObjects and I/O completion ports; - - . Multi-threading and synchronization - -- e.g., Solaris threads, POSIX Pthreads, and Win32 - threads; - - . Explicit dynamic linking - -- e.g., dlopen/dlsym on UNIX and LoadLibrary/GetProc - on Win32; - - . Memory-mapped files and shared memory management - -- e.g., BSD mmap(), SYSV shared memory, and Win32 - shared memory; - - . System V IPC - -- e.g., shared memory, semaphores, message queues. - -The OS Adaptation Layer shields the upper levels of ACE from platform -dependencies associated with the underlying OS interfaces. - ----------------------------------------- - -Frameworks and Class Categories - -ACE also contains a higher-level network programming framework that -integrates and enhances the lower-level C++ wrappers. This framework -supports the dynamic configuration of concurrent distributed services -into applications. The framework portion of ACE contains the -following class categories: - - . The Reactor - -- Supports both Reactive and Proactive I/O; - - . The Service Configurator - -- Support dynamic (re)configuration of objects; - - . The ADAPTIVE Service Executive - -- A user-level implementation of System V STREAMS, - that supports modular integration of - hierarchically-related communicaion services; - - . Concurrency - -- Various types of higher-level concurrency - control and synchronization patterns (such as - Polymorphic Futures and Active Objects); - - . Shared Malloc - -- Components for managing dynamically allocation - of shared and local memory; - ----------------------------------------- - -Distributed Services and Components - -Finally, ACE provides a standard library of distributed services that -are packaged as components. These service components play two roles -in ACE: - - 1. They provide reusable components for common distributed - system tasks such as logging, naming, locking, and time - synchronization. - - 2. They illustrate how to utilize ACE features such as the - Reactor, Service Configurator, Service Initialization, - Concurrency, and IPC components. - ----------------------------------------- - -Middleware Applications - -ACE has been used in research and development projects at many -universities and companies. For instance, it has been used to build -avionics systems at Boeing, telecommunication systems at Bellcore, -Ericsson, Motorola, and Lucent; medical imaging systems at Siemens and -Kodak; and many academic research projects. Two example middleware -applications provided with the ACE release include: - - 1. The ACE ORB (TAO) -- TAO is a real-time implementation of - CORBA built using the framework components and patterns - provided by ACE. - - 2. JAWS -- JAWS is a high-performance, adaptive Web server - built using the components in ACE. - ----------------------------------------- - -OBTAINING ACE - -ACE may be obtained electronically from -http://download.dre.vanderbilt.edu. This release contains the source -code, test drivers, and example applications (including JAWS) for C++ -wrapper libraries and the higher-level ACE network programming -framework developed as part of the ADAPTIVE project at the University -of California, Irvine, Washington University, St. Louis, and -Vanderbilt University. - -You can get The ACE ORB (TAO) in a companion release at the same URL. - ----------------------------------------- - -ACE DOCUMENTATION AND TUTORIALS - -Many of the C++ wrappers and higher-level components have been -described in issues of the C++ Report, as well as in proceedings of -many journals, conferences, and workshops. - -A collection of white papers and tutorial handouts are included at - -http://www.dre.vanderbilt.edu/~schmidt/ACE-papers.html - -This page contains PDF versions of various papers that describe -different aspects of ACE. - -This material is also available available via the WWW at URL: - -http://www.dre.vanderbilt.edu/~schmidt/ACE.html - ----------------------------------------- - -ACE MAILING LIST AND NEWSGROUP - -A mailing list, ace-users@list.isis.vanderbilt.edu, is available for -discussing bug fixes, enhancements, and porting issues regarding ACE. -Please send mail to me at the -ace-users-request@list.isis.vanderbilt.edu if you'd like to join the -mailing list. There is also a USENET newsgroup called -comp.soft-sys.ace. Please see -http://www.dre.vanderbilt.edu/~schmidt/ACE-mail.html for details on -how to subscribe to the mailing list. - ----------------------------------------- - -BUILDING AND INSTALLING ACE - -Please refer to the -http://www.dre.vanderbilt.edu/~schmidt/ACE-install.html file for -information on how to build and test the ACE wrappers. The -BIBLIOGRAPHY file contains information on where to obtain articles -that describe the ACE wrappers and the ADAPTIVE system in more detail. - -The current release has been tested extensively, but if you find any -bugs, please report them to the ACE mailing list -ace-users@list.isis.vanderbilt.edu using the -$ACE_ROOT/PROBLEM-REPORT-FORM. Please use the same form to submit -questions, comments, etc. To ensure that you see responses, please do -one of the following: - - 1) Subscribe to the ace-users mail list, by sending email with - contents "subscribe ace-users" to - ace-users-request@list.isis.vanderbilt.edu. - - 2) Or, monitor the comp.soft-sys.ace newsgroup for responses. - ----------------------------------------- - -ACKNOWLEDGEMENTS - -Please see the file `$ACE_ROOT/THANKS' for a list of the thousands of -people who've contributed to ACE and TAO over the years. diff --git a/modules/worldengine/deps/acelite/THANKS b/modules/worldengine/deps/acelite/THANKS deleted file mode 100644 index bbbb98c234..0000000000 --- a/modules/worldengine/deps/acelite/THANKS +++ /dev/null @@ -1,2424 +0,0 @@ -ACKNOWLEDGEMENTS - -ACE, TAO, CIAO, and DAnCE have been deeply influenced and improved by the -following members of my research group at Washington University in St. Louis, -the University of California at Irvine, and Vanderbilt University in Nashville. - -Everett Anderson -Alexander Babu Arulanthu -Shawn Atkins -Jaiganesh Balasubramanian -Krishnakumar Balasubramanian -Matt Braun -Darrell Brunsch -Dante J. Cannarozzi -Sharath R. Cholleti -Chris Cleeland -Angelo Corsaro -Gan Deng -Mayur Deshpande -Eric Ding -George Edwards -Sergio Flores-Gaitan -Chris Gill -Andrew G. Gilpin -Aniruddha Gokhale -Priyanka Gontla -Pradeep Gore -Matthew P. Hampton -Tim Harrison -John Heitmann -James Hill -Shawn Hannan -Don Hinton -Joe Hoffert -James Hu -Huang-Ming Huang -Frank A. Hunleth -Prashant Jain -Shanshan Jiang -Vishal Kachroo -Michael Kircher -Boris Kolpackov -Arvind S. Krishna -Yamuna Krishnamurthy -Fred Kuhns -David Levine -Tao Lu -Mike Moran -Sumedh Mungee -Balachandran Natarajan -Will Otte -Kirthika Parameswaran -Krishnakumar Pathayapura -Stoyan Paunov -Carlos O'Ryan -Ossama Othman -Jeff Parsons -Irfan Pyarali -Nilabja Roy -Lucas Seibert -Diego Sevilla Ruiz -Nishanth Shankaran -Marina Spivak -Venkita Subramonian -Nagarajan Surendran -Cassia Tatibana -Sumant Tambe -Gabriele Trombetti -Emre Turkay -Nanbor Wang -Seth Widoff -Jules White -Friedhelm Wolf -Torben Worm -Ming Xiong - -I would also like to thank all the following people who have also -contributed to ACE, TAO, CIAO, and DAnCE over the years: - -Paul Stephenson -Olaf Kruger -Ed Brown -Lee Baker -Alex Ranous -Mark Patton -Steffen Winther Sorensen -Troy Warner -Stacy Mahlon -Charles Eads -Mark Frutig -Todd Hoff -George -Brad Needham -Leslee Xu -Detlef Becker -Bruce Worden -Chris Tarr -Bill Sears -Greg Lavender -Steve Warwick -Mats Sundvall -Andreas Ueltschi -Nigel Hooke -Medhi Tabatabai -Stuart Powell -Bin Mu -Andrew McGowan -Ken Konecki -John P. Hearn -Giang Hoang Nguyen -Carlos Garcia Braschi -Jam Hamidi -Eric Vaughan -Karlheinz Dorn -Gerhard Lenzer -Steve Ritter -Chandra Venkatapathy -Matt Stevens -Bob Vistica -David Trumble -George Reynolds -Hans Rohnert -Alex V. Maclinovsky -Todd Blanchard -Rob Clairmont -Christian Millour -Neil B. Cohen -Dieter Quehl -Reginald S. Perry -James Morris -Mark Seaborn -Phil Brooks -E. Jason Scheck -Daniel Proulx -Bill Tang -John Huchinson -Jack Erickson -Byron Walton -Bill Lear -Mark Zusman -Aurelio Nocerino -Walt Akers -Greg Baker -Alexandre Karev -Pramod Kumar Singh -Bryon Rigg -Brad Brown -Patty Genualdi -Eshel Liran -Mick Adams -Chris Eich -Mike Flinn -Audun Tornquist -Sandeep Joshi -Bernd Hofner -Craig Perras -Kirk Sinnard -Matthew Newhook -Gerolf Wendland -Phil Mesnier -Ross Dargahi -Richard Orr -Rich Ryan -Jan Rychter -Tom Marrs <0002104588 at mcimail dot com> -Bob Olson -Jean-Francois Ripouteau -Ajit Sagar -Ashish Singhai -David Sames -Gonzalo Diethelm -Raj -Darrin Edelman -Steve Weismuller -Eric C. Newton -Andres Kruse -Ramesh Nagabushnam -Antonio Tortorici -Nigel Lowe -Tom Leith -Michael Fortinsky -Marco Sommerau -Gary Salsbery -Eric Beser -Alfred Keller -John Lu -James Mansion -Jesper S. M|ller -Chris Lahey -Michael R"uger -Istvan Buki -Greg Wilson -Garrett Conaty -Brad Flood -Marius Kjeldahl -Steve Huston -Eugene K. Plaude -Joseph DeAngelis -Kim Gillies -Luca Priorelli -Alan Stewart -Hani Yakan -William L. Gerecke -Craig Johnston -Pierre-Yves Duval -Rochi Febo Dommarco -Jonathan Biggar -Scott Shupe -Chuck Gehr -Avi Nash -Padhu Ramalingam -Jay Denkberg -Ayman Farahat -Tilo Christ -rev -Hamutal Yanay -Vital Aza -Alex Villazon -David Artus -Todd Barkalow -Alexander Smundak -Thilo Kielmann -Matthias Kerkhoff -Fred LaBar -Hanan Herzog -Eric Parker -James Michael Dwyer -Arun Katkere -Bob Dunmire -Sandro Doro -Robert Lyng -Phil Logan -John Cosby -Wayne Vucenic -Harry Gunnarsson -James CE Johnson -Samuel_Bercovici -Per Andersson -Anthony McConnell -Mark Rabotnikov -John Bossom -Rino Simioni -Slawomir Kuzniar -Rob Jordan -Michael Maxie -John Cosby -Nigel Owen -Jorn Jensen -Paul Roman -Dave Mayerhoefer -Bert Craytor -Joey Zhu -Arthur J. Lewis -Michael R. MacFaden -Paul Han -Jeff Morgan -Arturo Montes -Elliot Lau -Mark Wright -Michael Newton -Kumar Neelakantan -Scott Halstead -Jean-Marc Strauss -Adam Porter -Hakan Kallberg -Eric Dean Russell -Daniel Montalibet -Norbert Rapp -Ganesh Pai -Berni Merkle -Tom Wright -Torbjorn Lindgren -Mike Bernat -Brian Mendel -Jeremy Buch -Kevin Boyle -Kevin Martindale -Luis Lopes -Adrian Salt -Hongbo Xu -Michael Hartman -Tom Dobridge -Rich Christy -Satoshi Ueno -Eugene R. Somdahl -Robert Head -Ivan Murphy -Jan Perman -Shankar Krishnamoorthy -Reza Roodsari -Jim Crossley -Johannes Gutleber -Yigong Liu -Erik Urdang -Mike Schweiger -Anthony Mutiso -Jeff R. Hayes -David Brackman -Dave Moore -Joseph Cross -Cherif Sleiman -Stefan Ericsson -Thanh Ma -Oleg Krivosheev -Stephen Coy -Bob Laferriere -Satheesh Kumar MG -Karen Amestoy -Jeff Richard -Samuel Melamed -Vladimir Schipunov -Felix Popp -Billy Quinn -Michael McKnight -Huiying Shen -Alex Chan -Aaron Valdivia -Edan Ayal -Jeffrey Peterson -Neil Lavelle -Steven Wohlever -Manojkumar Acharya -Evgeny Beskrovny -Kirill Rybaltchenko -Laura Paterno -Ben Eng -Mike Kamrad -Marios Zikos -Mark L Boriack -Mark Hyett -Valik Solrzano Barboza -John Connett -Tom Arbuckle -Stephen Henry -Dani Flexer -Michael Hoffman -John Lindal -Dustin Laurence -Ernie Makris -Timothy A. Brown -Pat McNerthney -Lori Anderson -Erik Margraf -Bryan Doerr -Adam Miller -Thomas Jordan -Keith Nicewarner -Frederic Andres -Achint Sandhu -Mitch Kuninsky -Alex Chan -Jeff Hellzen -Thomas Venturella -Philippe O'Reilly -Stan Leeson -Richard Keizer -Edgar Villanueva -Oliver Kellogg -Dave Meyer -Thomas Hampson -Jay Kistler -Scott Snyder -Mark Evans -Todd Pack -Mark Maris -Jason Katz -Jim Penny -Chris Ryan -J dot Russell Noseworthy -Carol Sanders -Jerry Bickle -Paul von Behren -Sudish Joseph -Loren Rittle -Alexander Ovsiankin -Ravi Nagabhyru -Tom Brusehaver -Dave Tallman -Monish Rajpal -Garry Brother -Andreas Schuelke -Ganapathi -James Garrison -Brad Walton -Paul Motuzenko -Kurt Sussman -Rob Thornton -Chanaka Liyanaarachchi -Saneyasu -Steve Kay -Greg White -Ki-hyun Yoon -Umar Syyid -Bill Fulton -Amancio Hasty -Zoran Ivanovic -Sree Oggu -James Risinger -Leo Modica -Bob Scott -Mark Kettner -Kent Watsen -Chris Healey -Philippe Klein -William S. Lear -John Geiss -Ernesto Guisado -Stuart Myles -Lothar Werzinger -Andrew Harbick -Pavel Motuzenko -Ross J. Lillie -Sam Hauer -Frank J. Hodum -David Miron -Anton van Straaten -Joe Covalesky -Bill Backstrom -Jeff Franks -John Mulhern <9107 at mn3 dot lawson dot lawson dot com> -Johan Lundin -Eric Powers -Gabriel Lima -Doug Anderson -Hongyin Quan -Maximilian Hoferer -Kevin Stanley -Jeff Greif -Jeff McDaniel -Andreas Geisler -Bob McWhirter -Daniel Winder -Zheng Han -Christa Schwanninger -Byron Harris -Barney Dalton -Peter Gorgia -Dirk Broer -Joseph E. LaPrade -Goran Lowkrantz -Susan Liebeskind -Dana Hackman -Margherita Vittone Wiersma -Priya Narasimhan -Jeff Hopper -Mats Nilsson -Dongwook Kim -Don Davis -Alberto Villarica -XuYifeng -Tom Shields -Krishna Padmasola -Andre Folkers -Paul Sexton -Marc Lehmann -Anne Blankert -Raja Ati -Clinton Carr -Peter Liqun Na -Frank Adcock -Xu Yifeng -Valery Arkhangorodsky -Alan Scheinine -Andrew G. Harvey -Dann Corbit -James -Jason Milley -Ulf Jaehrig -Peter Nordlund -Mark Weel -Tres Seaver -Erik Koerber -Eric R. Medley -David O'Farrell -Amir Bahmanyari -Ian Wright -David Janello -Rich Wellner -Fernando D. Mato Mira -Jonathan Reis -Seung-Lee Hoon -Russell L. Carter -Bill Hall -Brian Gilstrap -Balaji Srinivasan -Anders W. Tell -Larry Lachman -Terry Rosenbaum -Rainer Blome -Kirk Ellett -Sunil Kumar -T Stach -Ron Barack -Daniel Nieten -Paul K. Fisher -Jim Buck -Olivier Lau -Achim Stindt -Fredrik Lindahl -Joseph Weihs -Serge Kolgan -James Megquier -Martin Krumpolec -Michael Thomas -Vicentini Emanuele -Bob Price -Ramiro Penataro Blanco -Sigg Pascal -Ivan Leong -Virginie Amar -Tom Ziomek -Hamish Friedlander -Mark De Jong -Knut Johannessen -Leif Jakobsmeier -Jon Lindgren -Steve Vinoski -Christian Mueffling -Victor Yu -Jeff Donner -Joe Loyall -Stanislav Meduna -Christian Korn -Ron Barack -Steve Totten -Faron Dutton -Gary York -Patty Hair -Ivan Pascal -William A. Hoffman -Mark Lucovsky -Greg Holtmeyer -Jody Hagins -Patrice Bensoussan -Keith Brown -Barry Hoggard -Peter J. Mason -Jerry D. De Master -Greg Gallant -wym -Karel Zuiderveld -Mike Goldman -Peter Gross -Greg Ross -Stanford S. Guillory -Peter Weat -Magnus Karlsson -Andreas Tobler -John Aughey -Knut-Havard Aksnes -Eric Mitchell -Tommy Andreasen -Slava Galperin -Jeff Olszewski -Sudhanshu Garg -Mike Preradovic -Greg Harrison -Sangwoo Jin -Jacques Salerian -Steve Coleman -Diethard Ohrt -Jacob Jones -Phil Ruelle -Sush Bankapura -Eric Covington -Darren Whobrey -Mason Taube -Rod Joseph -Hans Horsmann -Kevin Royalty -Souhad Mcheik -Mark Little -Tim Stack -Marc Engel -Uma Markandu -Henrik Nordberg -Tad Jarosinski -Andy Marchewka -Neal Norwitz -Frederic Maria -David Hooker -Christian Destor -Andrew Hobson -Andre Folkers -Torsten Kuepper -Hao Ruan -Alexander Davidovich -Cristian Ferretti -N Becker -Yaolong Lan -Elias Sreih -Liang Chen -Mark Laffoon -Ti Z -Brian Dance -Alexey Gadzhiev -Francois Bernier -Bill Rizzi -Peter Windle -Jaepil Kim -Dmitry Goldshtain -Carl Grinstead -Henric Jungheim -Michael Preobrazhensky -Gregory D. Fee -Roland Gigler -Frank Buschmann -Eric Eide -Don Busch -Thomas Lockhart -David Hauck -Keith Rohrer -Tim Rose -Sam Rhine -Chris Schleicher -Margaret Reitz -Thomas Mehrkam -Erik Ivanenko -Sarmeesha Reddy -Steven Tine -Dave Steele -Simeon Simeonov -David H. Whittington -Ian MacDonald -Hans Ridder -Todd Mullanix -Hai Vu -Paul Francis -Kristopher Johnson -Dave Butenhof -Dominic Williams -Srikumar Kareti -Ian Pepper -Kevin Lyda -James D. Rucker -Brian Wallis -Sandeep Goyal -English Malc -Frank O'Dwyer -Long Hoang -Steven D. Chen -Alain Magloire -Jim Rogers -Nick Sawadsky -David Brownell -Richard Stallman -Casey Lucas -Brian C. Olson -Joseph A. Condlin -Serge Du -Mike Mazurek -Christian Schuderer -John R. Taylor -Bill Tovrea -Wallace Owen -Vyacheslav A. Batenin -Edwin D. Windes -Christopher Kohlhoff -Andreas Terstegge -Stefaan Kiebooms -Keith Nichol -Rebecca Sanford -Ram Vishnuvajjala -Tom Bradley -Shaun Ohagan -Dale Wood -Robert Flanders -Gul Onural -Stephen E Blake -Eric S Rosenthal -Sridevi Subramanian -Bruce Trask -Jake Hamby -Rick Weisner -Dennis C. De Mars -V dot Lakshmanan -Hata Yoshiaki -Vidya Narayanan -Sean Landis -Youzhong Liu -John Weald -Gilbert Roulot -Gildo Medeiros Junior -Brian Peterson -Fabrice Podlyski -Darren DeRidder -John Tucker -Oleg Orlov -Timothy Canham -Randy Heiland -Joyce Fu -Surender Kumar -Pradeep Avasthi -Guicheney Christophe -Madhu Konety -Isaac Stoddard -Alvarez -Peter Brandstrom -Eugene Surovegin -Thaddeus Olczyk -John Chludzinski -Pedro Alves Ferreira -Bruce Edge -Dan Butler -Ron MacKenzie -Craig Rodrigues -Phil Y. Wang -David Brock -John Morey -Dwayne Burns -Denis Ouellet -Stefan Ullrich -Brian Raven -Gheorghe Aprotosoaie -Carsten Zerbst -Paul Calabrese -Stephane Chatre -James Whitledge -Erik Johannes -Alex Hornby -Riaz Syed -Clarence M. Weaver -Roger Egbers -Ralf Kluthe -Ruud Diterwich -Bill Nesbitt -Will Skunk -David Digby -Timothy Schimke -Jim Robinson -Peter Mueller -Raghu Nambiath -Mike Gingell -David McCann -Ruediger Franke -Brian Jones -Michael Garvin -Mike Vitalo -Kirk Davies -Arno Pernozzoli -Trey Grubbs -Matthias Schumann -John Gathright -Alexander Villatora -Hoang Duong -Michael Roth -Craig Anderson -Mitsuhiko Hara -Weihai Yu -Tal Lev-Ami -Chris Zimman -Rick Wesson -Sridhara Rao Dasu -Walter Welzel -Anthony Shipman -Tobin Bergen-Hill -Toshio Hori -John Mink -Duane Binder -Randall Sharo -Dave Madden -Cliff_H_Campbell -Narendra Ravi -Krishnakumar B. -David Sunwall -Brian Wright -Yosi Sarusi -Robert Shewan -Skye Sweeney -Lars Immisch -Stefan Wendt -Herbert -Clarence Bishop -Giga Giguashvili -Philipp Slusallek -Matthew Davis -Janusz Stopa -Rusty Conover -Phillippe Merle -Mark Winrock -Boris Kaminer -Martin Botzler -Lorin Hochstein -Wenli Bai -Harry Forry -Jose Rubio -Joerg Pommnitz -Mogens Hansen -Shafiek Savahl -Pierre Grondin -John Masiyowski -Uwe Landrock -Klaus Banzer -Probal Bhattacharjya -Dmitri Katchalov -Alok Gupta -Chien Yueh -John K. Black -Kamen Penev -Gregory Yarmit -Jarek Tomaszewski -Siegurd Weber -Fabrizio Giannotti -Harald Finster -Fritz Bosch -Charles Frasch -Chris Hafey -Rick Hess -David Dunn -Jaymes Galvin -Marat -Sergey Nemanov -Vladimir Kondratiev -John Glynn -Raymond Wiker -Michael Pitman -Joseph Jefferson -Engelbert Staller -George Ball -Dennis Noll -Ronald Fischer -Marvin Allen Wolfthal -Dan Gilboa -Sean Boudreau -Shalini Yajnik -Matt Thompson -Peter C Chien -Bruce Alderson -Christoph Poggemann -Travis Shirk -Alain Sauron -David Delano -Boris Sukholitko -Brian Mason -Thomas Groth -Damien Dufour -Paulo Breda Vieira -Samuel Stickland -Bryan Van de Ven -Greg Siebers -Rob Gabbot -Paul Carreiro -Jovan Kilibarda -Derek Dominish -Devesh Kothari -Stephen Moon -Hani Mawlawi -Benedikt Eric Heinen -Jason Topaz -Alexander Dergatch -Airat A. Sadreev -Klaus Hofmann -Miroslav Koncar -Extern Chatterji -Zach Frey -Ruibiao Qiu -Marcelo Matus -R Seshardi -Stephan Kulow -Alexander Belopolsky -Ben Bourner -Lalitha Chinthamani -Thomas Huang -Sankaranarayanan K. V -Ephraim Vider -Reid Spencer -Kevin Dalley -Jan Nielsen -Jochen Linkohr -Mirko Brandner -Yuval Yosef -Chad Elliott -David X. Callaway -Soren Ilsoe -Eric Hopper -Martin Johnson -Pierre Oberson -Chris Uzdavinis -Ishay Green -Andrey Nechypurenko -Charlie Duke -Jonathan Luellen -Andrew Psaltis -Erik Jones -Ted Burghart -Mike Winter -Judy Ward -Ken Block -Jamshid Afshar -Jerry Jiang -Rob Ruff -Hugh Arnold -Hessel Idzenga -Mark C. Barnes -Suresh Kannan -Alex Scholte -Greg Jansen -Raj Narayanaswamy -Iain Melville -Daniel Lang
-Chris Leishman -Klemen Zagar -Rick Ohnemus -Adamo, Vince -Defang Zhou -Dave Zumbro -Ted Nolan -Jianfei Xu -Alvin C. Shih -J dot Scott Evans -Alex Luk -Kenneth Osenbroch -Jason Czavislak -Alex Chachanashvili -Gilbert Grosdidier -James Briggs -Herbert Wang -Anders Olsson -Sergey Gnilitsky -David Wicks -Girish Birajdar -Hajdukiewicz Markus -Gerwin Robert -Alia Atlas -David Hall -Todd Gruhn -John Hickin -Alex Brown -Rich Seibel -Jim Scheller -Bob Bouterse -Sandeep Adwankar -W Craig Trader -Bruce McIntosh -Natarajan Kalpathy -David O'Farrell -Bob Bouterse -Malcolm Spence -Dong-Yueh Liu -Craig Ball -Norbert Krain -Adrian Miranda -Cody Dean -Hans Scharkowitz -Charles Meier -Tim Sim -Shalabh Bhatnagar -Charles Scott -Espen Harlinn -mulder -Richard L. Johnson -Tam Nguyen -Jeff Graham -Ralph Loader -Ji Wuliu -Wada Hiroshi -Sal Amander -Torsten Pfuetzenreuter -John M. Mills -David McWeeny -Florian Lackerbauer -Manuel Benche -Steve Luoma -Roger Tragin -Alex Bangs -Yangfen Qiu -Johnny Chen -John Foresteire -Larry Peacock -Francisco Bravo -Antti Valtokari -John Smyder -Mathew Samuel -Conrad Hughes -John Rodgers -Charles Taurines -James Lacey -Nick Pratt -Xiaojun Wu -George Lafortune -Aoxiang Xu -Dima Skvortsov -Moore Y. Cao -Wai Keung Fung -Michael Laing -Benoit Viaud -Ken Weinert -Ferran Boladeres Salvad -Steve Vranyes -Jim Melton -Ron Klein -Anuj Singhal -Henrik Kai -Dominic Hughes -Lior Shalev -Charlie Duke -William Horn -Greg Hall -Aviad Eden -Vianney Lecroart -Russell Mora -Samir Shaikh -Eric Yee -Matt Emerson -Yiu L. Lee -Pedro Brandao -Hakon Innerdal -Sami Aario -Ingo Dahm -Vijay Aswadhati -Xiaowen Wang - -Warren Miller -Youngkwan Cho -Dorr H. Clark -Dave McNeely -Eric Malenfant -Roland Fischer -Alexander Libman -Roger Larsson -Martin Stack -Michael Ravits -Derek Viljoen -Hamed Azizadah -Keo Kelly -Joachim Achtzehnter -Tomer Amiaz -Sergey Osokin -Nick Logvinov -Viatcheslav Batenine -Shashi Bhushan -Javier Corrales -J dot Randy Pitz -Richard Reitmeyer -Xavier Montet -Letha Etzkorn -James Dabbs -Matej Sekoranja -Mattias Eriksson -Nicoletta Viale -George Reid -Kim Lester -Wilson Chan -William Rucklidge -Victor Krebss -Chander P. Thareja -John Mills -Haifeng Lee -Hans Utz -Askok Kumar Kalanithi -Chris Able -John Hiltenbrand -Steve Hespelt -Peter Fischer -Madhu Ramachandran -Caleb Epstein -Bruno Marconi -Ken Childress -Michael Kramer -Johnny Willemsen -Jonathan Astle -Javier Lopez Sanchez -Nir Drang -Albert Wijnja -Marcel Van Der Weert -Mervyn Quah -Giovanni Zito -Matthew Adams -Sameer Schabungbam -Jeff Butler -Roland R�denauer -John Buckman -Guy Rosen - -Bennett R. Stabile -Paul Caffrey -Low Aik long -Michael Rinne -Jaffar Shaikh -Roger Beck -Trueman Bill -Harold Bien -Mateu Batle -Philip Miller -Base V Paul -Evghenii Filippov -Mike Curtis -Jessie Ragsdale -Shourya Sarcar -Eric Crampton -Sandip Patel -ChenXu -Vsevolod Novikov -Brendan Corcoran -Steve Sivier -Rick Schneeman -Klaus H. Wolf -Jean-Christophe Dubois -Michael Hampel -Wei Zheng -Bernd Annamaier -Joachim Tremouroux -Momchil Velikov -Munagala Ramanath -Kevin Marshall -David Channon -Andy Guy -Oscar Rodriquez -Jonathan Cano -Alain Decamps -Paul Rubel -Jon Loeliger -Ricardo Chan -Sarabjeet Duhra -Michael Rushton -Arno Pernozzoli -Calum Mitchell -Jerry Odenwelder -Kent Stewart -Alexander Kogan -Michael Lindner -Arnaud Compan -Michael Searles -Bogdan Jeram -Sebastian Schubert -Li Zhou -Shivakumar Patil -Steve Olson -Allen Broadman -Yuriy Zaporozhets -Joe Guan -Attilio Dona -McGanahan Skjellifetti -Matthias Wittig -David Allen -Edwin McKay -Scott Bolin -Mike Anderson -David Singer -Nick Lin -Ron Hashimshony -Max Khon -Jonas Nordin -Jonathan Stockdale -Jean-Francois Daune -Wei Chiang -Rick Stille -Kirill Kuolechov -Edwin Wrench -Yung Trinh -Richard Eperjesi -Ben Strong -David Karr -Sathish Tiptur -Lu Yunhai -Christian Ewald -Samuel Qi Luo -Sergey Logvin -Orlando Ribeiro -Doug Warner -Kevin Regan -Andy Olson -Max Voronoy -Alexandr Gavrilov -Scott Gunn -Mason Deaver -Richard Huber -Glen Osterhout -YingLi -Haka -Sam Chong -Virgilijus Globis -Stefan Scherer -Pim Philipse -Michael Grove -John Mackenzie -Ricky Marek -Patrick Maassen -Christian Schuhegger -David L Smith -Rainer Doerntge -Tompa -Derek Horton -Shameek Basu -Dipti Jain -Eric Zuur -Jeffrey J. Persch -Rahul Shukla -Pierre Fayolle -Greg McCain -Matt Cheers -Benjamin Fry -Ram Ben-Yakir -Eric Desamore -John Ashmun -Przemyslaw Marciniak -Carsten Madsen -David Sperry -Ted Horst -Diana Arroyo -Benny Prijono -Roland Ziegler -Stelios Sfakianakis -Mike Letchworth -Brian Gilmer -James Dunham -Juergen Pfreundt -Joel Sherrill -Jules Colding -Stephane Pion -Raghu Narayan -Richard Goold -Nathalie D'Amours -Albert Pariante -Stephen Torri -Philippe Perrin -Gunnar Buason -David Hanvey -Jeff McNiel -Georg Lohrer -Rachel G Smith -Tom Lake -Logan Modahala -Jean Malenfant -Victor Poznyak -Juan Jose Comellas -James Dorsey -Benot Desmeules -Tom Moog -Stan Pinte -Dayisi -Peter Georgakakis -Richard Hardgrave -Mark Drijver -Guy Bolton King -Carlton Teel -Alexandre Cervieri -Darren Griffith -Sam Mok -Josh Curry -Norman Wilson -Itzhak Briskman -James Kanyok -Corey Trager -Kirat Singh -Oleg Pavliv -Frederick Niemi -Andrew Munro -Nicolas Huynh -Kevin Burge -Wayne Erchak -Yew Khong See -Greg Thompson -Mike Pyle -Kobi Cohen-Arazi -Israel Illescas Gomez -Brodie Thiesfield -Erik Toubro Nielsen -Masaoud T. Moonim -Steve Witten -Gil Rapaport -Boris Temkin -Steve Perkins -Jerry Thomas -cuma -Ron Heald -Andrew Finnell -Dan Levi -Rob Andzik -James Maynard -Francois Rioux -Ophir Bleiberg -Allen Kelly -Victor Pitchouc -Srikanth Vedire -J Shane Culpepper -Steffen Hieber -Craig L. Ching -Ben Howard -Rich Newman -Kelly F. Hickel -David Trusty -Burkhard Neppert -Crawford Lodge -Scott Gaa -Jenny Kowald -Oren Zeev-Ben-Mordehai -Holger P. Krekel -Glenn Popelka -Tibor Kiss -Robert Davidson -Peter Crowther -Mouna Seri -Vladimir Chovanec -Alexander Rieger -Glen Coakley -Scott Plant -Wilfried Reinoehl -Sangeetha Ramadurai -Victor Chernenko -Frank Wolf -Christophe Galerne -Scott Harris -Stefan Kluehspies -Egon Wuchner -Ugendreshwar Kudupudi -Ekkehard Hoffmann -Ted Krovetz -Grzegorz Sikora -Fabris -Christina Junru -Patrick Rabau -Hyman Rosen -Torbjorn Backstrom -Robert Burke -Olivier Brunet -Bret Clark -Steve Rahn -Bertrand Motuelle -Blair Zajac -Gary Duzan -Garry Shamis -Eamonn Saunders -Yev Omenzel -John E Hein -Tino Schwarze -Gergely Timar -Peter Phillips -Yury Kuznesov -Daniel Manfis -Massimo Pichini -Eyal Neuman -Dave Hale -Giulio Agostini -Werner Buchert -Kevin Cline -Mahesh Varadarajan -Olof Lindfors -Tom Wagner -Kyle Brost -Vincent Nicolas -Jonathan Wackley -Jan Kalin -Andreas Huggel -Alain Totouom -Tushar Nair -Sunny Leung -Bonifides Bautista -Brad Hoskins -Donald Acton -Hagen Ulrich -Adrian Mercieca -Lars Steubesand -Heping He -Leo Kov -Suresh N -David Arndt -Tad Hetke -Graeme Clark -Gu Song -Chris Hughes -Fikri Pribadi -Ioulia Passynkova -Steve Osselton -Doron Rajwan -Stuart Jones -Guillaume Renaud -Tommy Svensson -Jstwo -Hartmut Quast -Ulrich Voigt -Syed Wasim Ali -Bo Balder -Michael Sawczyn -Ildar Gabdulline -David Yongqiang Wang -Shahzad Aslam-Mir -Andrew Foster -C Chan -Alexey Chalimov -Andrea Bernicchia -Praphul Menon -Patrick N -Garth Watney -Jim Connelly -Eyal Lubetzky -Gaoyan Xie -Michael Brinkmann -Chatchai Khumboa -Andrey Shkinev -Michael Graf -Justin Michel -Robert Martin -Charles Meidinger -Petr Tuma -Greg Burley -Marvin Greenberg -Mike Connors -Ben Flight -Bob Jolliffe -Jesse -Robert Handl -Keith Snively -Ahmed Riza -Miljenko Norsic -David Robison -Preston Elder -Eric Peters -Edward A Thompson -Eugene Alterman -Patrick Cosmo -Ran Kohavi -Harvinder Sawhney -Sorin Iordachescu -Mahesh Vedantam -Brian Olson -Roy Sharon -Charlie Grames -Tom Howard -Michael Gillmann -Yaniv Ben Ari -Victor Terber -David Sanders -Yoram Zini -Sean McCauliff -Shmulik Regev -Andrew L. Shwaika -Gerhard Voss -Gregor Bruce -Ian Cahoon -Alexei I. Adamovich -Sohail Husain -Jerome Julius -William R Volz -Koushik Banerjee -Zoran Cetusic -Patrick Bennett -Felix Wyss -Tim Rydell -Petr Shelomovsky -Juliana Diniz -Yuval Cohen -Timothy Kilbourn -Marc Walrave -Petru Marginean -Paresh Raote -Donna Maskell -Steve Ige -Marco Kranawetter -Christian Veleba -Olli Savia -Bhaskara Rao G -M Schulze -John Michael Zorko -Ami Bar -David Smith -Peter van Merkerk -Bill Dyer -Rodney Morris -Mark Hoffmann -Markus Wild -Joe Hayes -Chip Jones -Patrick J Lardieri -Ken O'Brien -Daniel Troesser -Ivan Pazymenko -Dan Green -Cyrille Chepelov -Peter Heitman -Paxton Mason -Yan Dai -Sean I. Luzader -Renjie Tang -Max V. Zinal -Stan Sosnovsky -Ariel Peltz -Carsten Prescher -Raghuram Shetty -Val Dumiterscu -Oleg Kraynov -Stephan Gudmundson -Frank Kuhlman -Denis Otchenashko -Marc M Adkins -Jon Lambert -Rainer Lucas -Allan S Iverson -Jeffrey Shaffer -Oleg Burlachenko -Jian Chen -Jeff Paciga -Laurent Sabourin -Frank Rybak -Tim Iskander -Michele Amoretti -Ido Yellin -Eric Page -Kevin Heifner -James Haiar -Pavel Repin -Whitney Kew -Tom Phan -Andrew Guy -Bharathi Kangatharan -Jean Quinsat -Ma Ting Chong -Andrew Sutton -Ansgar Konermann -Amir Kunst -Daniel Garrido -Andy Alvarez -Soeren Gerlach -Vitaly Prapirny -Sasha Agranov -Ruwanganie Gunatilleke -Peter Kullmann

-Lyn Headley -Jeff Adams -Alexander Maack -Timothy Culp -Oleg Terletsky -Bill Tonseth -Frank Pilhofer -Eric Quere -Keith Thornton -Nathan Krasney -Marek Maleta -David Smith -Dimitrije Jankovic -Frank O. Flemisch -Cary Steinmetz -Ty Tenait -Nitin Mallya -Nick Cross -Christopher W. Midgley -Wanjia -Shanliang Cheng -Andy Ling -Stephen Howard -Carsten T. Nielsen -Adee Ran - -Davide Pasetto -Michael Hornok -Wim van den Boogaard -Carol Hunsicker -Joseph Sarbak -Ruslan Zasukhin -Colin Weaver -Kew Whitney -Sean Ogle -Tim Bradley -Kier Schmitt -George Varsamis -Alan Tanga -Bertin Colpron -Jeff Wilson -Dmitry Khrapov -Francois -Laxmikant Bopalkar -Steven Gardner -Ronald Berger -Jeremy Altavilla -Brian Appel -Lan Zhineng -Leen Van Kampen -James Beale -Mark Xu -Umberto Mascia -Marcel Loose -Christian Klutz -Ville Lehtiniemi -Chumsu Kim -Schone Mullerin -Cemal Yimaz -Newton Aird -Frederic Motte -Roger Weeks -Gautam Thaker -Christophe Juniet -Jeff W -Geir Berset -Ken Sedgwick -Vince Mounts -Vladislav Zverev -Erich Hochmuth -Nick S. Petrov -Dmitry Botcharnikov -Philippe Haussy

-K2 -Eric Frias -Antonio Saraiva -Sean M. Paus -Yuanfang Zhang -Jonathan Franklin -Cristian Ungureanu -Tommy Persson -Christian Barheine -Ole Husgaard -Victor Kirk -Sandeep Neema -Mike Curtis -Artashes Ghazaryan -Ashok Sadasivan -Andreas Koehler -Thomas Devanneaux -Paul Marquis -Ed Skees -Marc Alter -Martin Geliot -Simon McQueen -Jason Pasion -Philipp Leibfried -Erwin Rol -Dirk Moermans -Huseyin Calgin -Jaroslaw Nozderko -Sharon Caspi -Thomas Natterer -Wilbur Lang -Rick Marlborough -David-A O-Brien -Shelton Tang -Frederic Langlet -Antonio Leonforte -Pablo d'Angelo -Christophe Vedel -Uwe Jaeger -Viktor Ransmayr -Daniel Bell -Mathias Waack -Mike Nordell -Tufan Oruk -Tim Smith -Andy King -Eric Strennen -Abhay Kulkarni -Ron Muck -Ma Weida -Terry Lao -Volker Boerchers -Tim Pullen -Marc Tardif -Guan Joe -Petr Ferschmann -Greg Mulyar -Max F. Bilyk -Danile White -Andrew Marlow -Michael F"olsl -Vincent Chau -Theo Landman -Igor Pisarenko -Dima Scub -Volodymyr Orlenko -Grigory -Michael Soden -Dennis Sporcic -Emmanuel Thevenot Beaufort -Denis Parnaland -Matthias Blankenhaus -Wolfgang Schroeder -Mario Hofmann -Bruce MacDonald -Jeffrey Graham -Otis Nyandoro -Ray Limpus -Dmitri Belogaj -Will Christof -Ferran Boladeres Salvad -Juan Carlos Montes Costa -Edward Scott -Steve Spencer -Fukasawa Mitsuo -Martin Brown -Terry Mihm -Jeff Gray -Rob Eger -Leonid Kvetnyi -Rudolf Weber -Sergei Pimenov -David Kinder -Sebastien Lalonde -Jia Wan -Bertin Colpron -Weston Markham -Bryan Thrall -Subhabrata Biswas -Dave Ryan -Zsolt Zsoldos -Tongzhe Cui -Braden McDaniel -Richard Woodring -Andras Lang -Scott Gammil -Nick Lewycky -Ira Burton -Thomas Wiegert -Craig Watcham -Pit Linnartz -Peder Norgaard -David Ohlemacher -Ken Kane -Bill Church -Udo Berninger -Vincent Korkos -Martin Corino -Terry Lacy -Branko Mijic -Jeff Kelley -Daniel Hannum -Jason Cohen -Nick Kukuczka -Andrew Voumard -Anand -D.J. Dwyer -Douglas A Stuart -Victor N. -Francesco Baldi -Michael Rice -Jesse Greenwald -Raymond Hoofman -Jason Smith -Danta Cannarozzi -Valery Salamakha -Karim Fodil-Lemelin -Wenlong Tang -Manish Jain -Robin Farine -Roland Schimmack -Roy Pollock -Eric Held -Kees van Marle -Dieter Knueppel -Amol Tambe -Emiliano Berenbaum -Scott Clarke -Sunil Rottoo -Martin Habets -Todd Cooper -Serkan Unsal -Milan Cvetkovic -Didier Becu -Dan Halbert -Jerome Waibel -Stephan Frenzel -Bruce Jones -Tim Hawes -Philip Leishman -Alexander Jasper -Gerard Grant -Trevor Fields -Jeff Dugan -Jeff Mirwaisi -Alain Dupont -Stephan Bettermann -David McKen -Adam Fanello -Matthieu Vansteene -Sean Rooney -Enrico Detoma -Onopin V. Mikhail -Edward R. Mulholland -Brian Buesker -Vladimir Naylov -Ted Mules -Mike Hepburn -Dale Wilson -Thomas Girard -Malcolm McRoberts -Dror Tirosh -Chris Sontag -Moran Levi -UV Wildner -Alan l Batongbacal -Gary Maxey -Yoav Borer -Andre Kleibeuker -Andy Bellafaire -John Fletcher -Terry Ware -Pierre Pacchioni -Roger Beathard -Konstantinos Margaritis -Stephen Procter -Christoph Liebig -Andre Kostur -Markus Stenberg -Jonathan Pollack -Si Mong Park -Hakim Souami -Paul Morrison -John Poplett -Heiko Bachmann -Andrew Metcalfe -Simon Dutkowski -Mickael P. Golovin -Shannon Barber -Brad Orner -Michelangelo Nottoli -Peter Bekiesch -Martin Kaul -Lukas Gruetzmacher -Robert Schiele -Matthew Grosso -Akim Boyko -Nils Sandoy -Daniel Miranda -Hans-Peter Bock -Dmitri Hrapof -Denny Kolb -Daniel Buchs -Matt Murphy -Brian Nelson -Avi Ouziel -Matthew Gillen -Chris Reed -Andrew Reid -Praveen Sharma -Yi Zuo -Raphael Bossek -Richard G. Hash -Karl Tredwell -Norm Whitehead -Jiang Wei -Kevin Bryan -Zvika Ashani -Thomas Costa -Dom Monteiro -Jean-Marc Prud'homme -Yury Osadchy -Pavan Mandalkar -Scott Willey -David Calkins -Wu Yongwei -Karen L. Regner -Michel Drapeau -Hans Bos -Kevin Stacy -Liat -Andreas Wagner -Steven Xie -Kris Dekeyser -Matthew Harris -Abhijit Sachdev -Mikael Lundqvist -Peter Hercek -Jay Welch -Angel Roman -Jessica Pistole -Paolo Carlini -Eric Whorter -Vincent Seignole -Jingbin An -Roland Meub -Marek Brudka -Levente Torok -Panagiotis Issaris -Mehrdad Nazari -Pierre Bisaillon -Rob Boyer -Scott Gammill -Bayu Hendradjaya -Randy Hammon -Bill Cassanova -Matthew Corey -Vinod Kumar -Mirek Pabich -Christian Egeler -J.T. Conklin -Dale Hawkins -Bill Hopkins -David Fleeman -Merlin Ran -Kevin Christian -Trina Wisler -Bae-Sik Chon -Benjamin Bronk -Dave Craig -Ofira Shaer -Ciaran Moran -Thomas Rohner -Ken Descoteaux -Claas-Hinrich Dommreis -Yateen Joshi -Sergei Kuchin -Theckla Louchios -Randy Secrest -Patrice Marques -Stanislaw Trytek -Mattias Nilsson -Michael Hollins -Dave Knox -Lance Paine -Brian Waltersdorf -Johann Kandlbauer -Adam Rymarczuk -Heiko Nardmann -J. Abelardo Gutierrez -Roger Sala -Razi Ben-Yehuda -Geo Sebastian -Simon Massey -Rich Shapiro -Ramiro Morales -Andrew Athan -Sebastien Roy -Matthew Townsend -Rick Robinson -John D. Robertson -Paul Lew -Eider Oliveira -Jeff Jones -Jean-Christophe Cota -Paul -Vincent Newsum -Vasili Goutas -Iliyan Jeliazkov -Shlomi Yaakobovich -Todd Marshall -Ciju John -Yuk Ming Kwok -Honorato Saavedra -Domingos Monteiro -Bill Somerville -Bjorn Roald -Michi Henning -Xue Yong Zhi -Ertugrul Sorar -Simone Viani -Rohan Mars -Robert S. Iakobashvili -Chris Hammond -Vincent Spano -Nuno Silva -Greg Bostrum -Dipa Suri -Adam Howell -Steven Frare -Dave Dalapati -Arjun Thounaojam -Michael Altmann -Steven Patrick -Pete McCann -William Nagel -M. C. Gahan -Thia Chang Chao -Gao Xianchao -Huang Rui -Sam Abbe -Mike McGahan -David Michael -Steve D. Baker -Martina Yen -Kim ByeongSu -Doug McCorkle -YiQing Xiong -Peter Falsh -Don Sharp -Arto Jalkanen -Scott Zionic -Diana Ukleja -Shaun Cooley -Aapo M�kinen -Matt Emerson -Sean Parker -Mark Wilson -Joerg Rockel -Phil Chen -Stefan Morrow -Bruce Elliot -Mitscher Dubreus -Brian O'Connor -Ron Wilson -Peter Grotrian -Alex Ott -D. J. Stachniak -Slava Gorelik -Wolfgang Fischer -Nicholas Todd -Arno Wilhelm -Andreas Schuler -Altaf Aali -Vemund Handeland -Mario Di Giacomo -Raoul Gough -Aaron -Rohini Madhavan -Alan Balasuar -Will Chai -Paul Koch -Dave Giovannini -Dave Varnell -Howard Finer -Mark Callaghan -Hanson Lu -Gavin Yu -Srikanth Gopal -Like Ma -Alvin Msg -Angela Ziegenhorn -Sam Mesh -Felix Perez Alamillo -Steven T. Hatton -Yevgen Galchenko -Timothy Wayne Gomez -Ventimiglia Chere -Frederick Heckel -Ian Zagorskih -Olivier Gu�rin -Abdel Rigumye -James Damour -Alan Anderson -Vito Bico -Aldo Texier -J H Choi -Mike Chartier -Nikolay Metchev -Anand Rathi -Vitaly Belekhov -Dorian Hileaga -Steve Williams -Paul Friberg

-Zachi Klopman -Jin Zhi Ye -David Carlton -Feng Li -Michael van der Westhuizen -Jan Zima -Francesco Salvestrini -Sandeep Deshpande -Hubert Talbot -Oh Yoon Sik -Anton Bakanovskiy -Toha Bakanovsky -David Faure -Robert Hancock -Peter Oslej -Yongming Wang -Vadim Iosevich -Mike Knight -Nathan Anderson -Eyal Car -Jonathan Sprinkle -Vladimir Panov -Volker Lukas -Bryan Cassell -Guy Peleg -Wallace Zhang -Richard Ward -Alan Stokes -Rick Taylor -Tobias Herzke -Paul Felix -Jan Ohlenburg -Eric Tiangang -David Hawkins -Michael Klein -Sandro Santos Andrade -Richard Spence -Thomas E Lackey -luxi78 at gmail dot com -John Lilley -Abdullah Sowayan -Nathan Bamford -Zoltan Molnar -William Byrne -Karl Schmitt -Ron DeAngelis -Alex Sheh -Daniel Wagner <__daniel___ at icg do tu-graz dot ac dot at> -Nemoy Michael -Marc Brown -Andrew Keane -Martin Kolleck -Tino Riethmueller -Adam Mitz -Frank Rehberger -Aaron Scamehorn -Alan Kierstead -Sven-Uwe Sieler-Hornke -Spencer Vanroekel -Dan Pozdol -Yauheni Akhotnikau -Axter -Roopa Pundaleeka -JR Andreassen -Mockey Chen -Vincent Joseph -Igor Mammedov -Yuan -Adrian Tulloch -Dmitriy Kuznetsov -Steve Orner -Bob Ronak -Aleksandar Vukajlovic -esIgnacio Alvarez -Sergey Zubarev -Qingbo Cai -David White -Jason Zhang -Mark Paulus -Willie Chen -Martin Cornelius -Mohit Kapoor -David Gibbs -Gary Fernandez -Jason Zhao -Keith Muzzioli -John Black -David Chu -Kevin Hu -Yasser Zabuair -Phlip -Michelle Zheng -Gerolf Reinwardt -Paul Robinson -Popeye Cai -David Highley -Sonicfly Zhou -Phil Billingham -Paul Daugherty -Robert Schwebel -William Cote -Ben Creech -Michael Reed -Heesuk Shin -Hong Xing -Winston Zhang -Stefan Naewe -Graeme Bell -Eric Danielou -Wei Jiang -Dale Boan -Christoph Schmalhofer -Amnon Berger -Ephy Levy -Don Meek -Liu Qian -Nzer Zaidenberg -Birgit Platt -Andy Salnikov -Hieu Ngyuen -Andriy Gapon -Andy Wang -Zhamak Dehghani -Charles Calkins -Manuel Traut -Drew Reynaud -Artur DeEsperanto -Scott Mitchell -Thomas Vanier -N Johnson -Adam Nagel -Robert Neumann -Venkat -Juraj Ivancic -Daniel Black -Richard Ridgway -Vadym Ridosh -Viola Wang -Ray Lischner -Sergey Kosenko -Pavel Zaichenko -Paul Riley -Nelson Filipe Ferreira Gon�alves -Harry Goldschmitt -Sail Zeng -Markus Henschel -Asif Lodhi -Andrew Schnable -Grigoriy Zeleniy -Yves Alloyer -Waba -Scott Mark -Bjoern Rasmussen -Ian C White -Dennis Chernoivanov -Werner Burger -Andres Hurtis -Joe French -M. Arshad Khan -Hans van't Hag -Roland Sun -Vance Maverick -John McCabe -Andres Oportus -Olof Granered -Eric Hughes -Zhenghao Shi -Alexander Kornienko -Ben Mohlenhoff -Bill Bruns -Dmitriy Nikitinskiy -Ravi Kanth -Ian Roberts -Patrick Spiering -Duane Beck -Kanghee Yoon -Xu Liang -Leo Lei -Jules d'Entremont -Rajiv K. Shukla -Haibin Zhang -Vikram Karandikar -Kim J. Schmock -Venkat Forums -James Marsh -Shaolong Xiang -Christoph Hofmann -Vladimir Zykov -Daniel de Angelis Cordeiro -Hal Black -Peter Korf -Norbert Thoden -Premkumar P -David Beck -Hayim Shaul -Erman Balcik -Torsten Saliwada -Nathan Glasser -Gr�gor Boirie -Alex Solan -Venkat Sidhabathuni -Nathan Ernst -Kun Niu -Karl-Heinz Wind -Oliver Spang -Hu Yi -Joe Seward -Tom Callaway -Alick Nie -Douglas Atique -Nayeem Khan -Sorin Voicu-Comendant -Andi Heusser -Paul Carter -Michael Carter -Alain Kocelniak -Alvaro Vega Garcia -Fernando C. Jeronymo -Stephen Mouring -Tim -Thomas Brownridge -June Fang -Bill Kendall -Ittehad Shaikh -Michael Doubez -Namrata Gandhi <...> -Michael Guntli -Frank F�rster -Roger Leblanc -Bob Fiske -Julien Vintrou -Jonathan Brannan -antred -Nathalie D'Amours -Mele Giovanni -Philipp Thomas -Mark Hebbel -Tim Pollock -Jack Lavender -Alexandre Skrzyniarz -E Vahala -Christian Fromme -Daniel Lang -Greg Bothe -Anand Kumar -Joe Pallas -Marcel Smit -Florent Vial -Pan Kai Luna -Jesus Martinez -Martin Gaus -Steve Stallion -Ron van Hoof -Joe Lihn -Jani Hakala -Marcus Monaghan -Kashif Khan -JD Robertson -Andreas Drescher -Alon Diamant -Igor Rayak -Shai Kedem -Steve Ramsay - -Skrzyniarz Alexandre -Rob Beekmans -Steven Hartmann -Dicky -Boyan Kasarov -Brendan Murphy -Ryan Carmichael -Koh Onishi -Markus Gaugusch -Annette Wilson -Sharon Mizrahi -William Glenn -Christian Ehrlicher -Hui Zhang -Marijke Hengstmengel -Christian Freund -Chris Shaw -Matthew Carter -Denis Budko -Gaurav Kulshreshtha -Wolfgang Pickartz -Joost Kraaijeveld -Pau Garcia i Quiles -Sail Zeng -Dirk Bonekaemper -Sreejith -Guillaume Lahaye -Andrew Kaplan -Alexander Mintz -Jennifer Kahng -Trent Nadeau -Nick Meyer -Olivier Langlois -Patrick Soboljew -Tim Pinkawa -Ed Blackmond -Dave -Inma Perea -David Ward -Anatoli Sakhnik -Max Zhou -Daynesh Mangal -Robert Shectman -Rafi -Kannan Ramaswamy -Brian Johnson -Catherine L. Paquin -Susan Finster -Frank Preischl -Matthew Waller -Elez -Ranjit Hande -Van Vuong -Mark -Wendsomde Yameogo -Shi John -Helmut Böing -Andrew Hill -Henk Jan Priester -Glenn Zickert -Chris Galli -Laura Autón García -Jonathan Saxton -Remko Duppen -Paul Fitzpatrick -Chad Beaulac -Jochen Meier -Thomas Pauli -Qiao Zhiqiang -JaeSung Lee -Chong Wuk Pak -Michael Frommberger -Andrey Karpov -Dmytro Ovdiienko -Andrea Sormanni -Thomas Stegemann -David Simmonds -Andreas Dröscher -Markus Manck -Deux deVille -Mohsin Zaidi -Milind Pangarkar -Ali Akbar Zarezadeh -Andrés Senac González -Peng Xu -Sergey Onuchin -Michael Ganz -Phillip LaBanca -Journeyer J. Joh -Rudy Pot -Neil Youngman -Andreas Florath -Clyde Gerber -George Chen -Piotr Kow -Yogesh Sharma -Mike McKnerney -Mike Ketchen -Erik Sohns -Winston Jenks -Colin Shen -Alexey Zubko -Michael Dille -Sebastian Perk -David Lifshitz -Milo H. Fields -Thomas Schmidt -Joe Zendle - -I would particularly like to thank Paul Stephenson, who worked with me -at Ericsson in the early 1990's. Paul devised the recursive Makefile -scheme that underlies the ACE distribution and also spent countless -hours with me discussing object-oriented techniques for developing -distributed application frameworks. - -Finally, I'd also like to thank Todd L. Montgomery , -fellow heavy metal head, for fulfilling his quest to get ACE to -compile with GCC! - -In conclusion, our goal is to see ACE+TAO+CIAO continue to evolve and -become a more comprehensive, robust, and well-documented C++ class -library that is freely available to researchers and developers. If -you have any improvements, suggestions, and or comments, we'd like to -hear about it. Please see the instructions in - -$ACE_ROOT/PROBLEM-REPORT-FORM -$TAO_ROOT/PROBLEM-REPORT-FORM -$CIAO_ROOT/PROBLEM-REPORT-FORM -$DANCE_ROOT/PROBLEM-REPORT-FORM - -for instructions on submitting suggestions or fixes. - - Thanks, - - Douglas C. Schmidt - d.schmidt at vanderbilt.edu diff --git a/modules/worldengine/deps/acelite/VERSION b/modules/worldengine/deps/acelite/VERSION deleted file mode 100644 index db1805dc4a..0000000000 --- a/modules/worldengine/deps/acelite/VERSION +++ /dev/null @@ -1,8 +0,0 @@ -This is ACE version 6.3.2, released Thu May 07 10:14:44 CEST 2015 - -If you have any problems with or questions about ACE, please send -e-mail to the ACE mailing list (ace-bugs@list.isis.vanderbilt.edu), -using the form found in the file PROBLEM-REPORT-FORM. In order -to post to the list you must subscribe to it. - -See http://www.dre.vanderbilt.edu/~schmidt/ACE-mail.html diff --git a/modules/worldengine/deps/acelite/ace/ACE.cpp b/modules/worldengine/deps/acelite/ace/ACE.cpp deleted file mode 100644 index 0e35b2ceb8..0000000000 --- a/modules/worldengine/deps/acelite/ace/ACE.cpp +++ /dev/null @@ -1,3437 +0,0 @@ -#include "ace/ACE.h" - -#include "ace/Basic_Types.h" -#include "ace/Handle_Set.h" -#include "ace/Auto_Ptr.h" -#include "ace/SString.h" -#include "ace/Version.h" -#include "ace/Message_Block.h" -#include "ace/Log_Category.h" -#include "ace/Flag_Manip.h" -#include "ace/OS_NS_sys_select.h" -#include "ace/OS_NS_string.h" -#include "ace/OS_NS_strings.h" -#include "ace/OS_NS_signal.h" -#include "ace/OS_NS_stdio.h" -#include "ace/OS_NS_sys_resource.h" -#include "ace/OS_NS_sys_wait.h" -#include "ace/OS_NS_sys_time.h" -#include "ace/OS_NS_time.h" -#include "ace/OS_NS_sys_uio.h" -#include "ace/OS_NS_sys_stat.h" -#include "ace/OS_NS_ctype.h" -#include "ace/OS_NS_fcntl.h" -#include "ace/OS_TLI.h" -#include "ace/Truncate.h" - -#if !defined (__ACE_INLINE__) -#include "ace/ACE.inl" -#endif /* __ACE_INLINE__ */ - -#if defined (ACE_HAS_POLL) -# include "ace/OS_NS_poll.h" -#endif /* ACE_HAS_POLL */ - -// Open versioned namespace, if enabled by the user. -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -namespace ACE -{ - // private: - // Used internally so not exported. - - // Size of allocation granularity. - size_t allocation_granularity_ = 0; - - // Size of a VM page. - size_t pagesize_ = 0; - - // Are we debugging ACE? - // Keeps track of whether we're in some global debug mode. - char debug_; -} - - -int -ACE::out_of_handles (int error) -{ - // EMFILE is common to all platforms. - if (error == EMFILE || -#if defined (ACE_WIN32) - // On Win32, we need to check for ENOBUFS also. - error == ENOBUFS || -#elif defined (HPUX) - // On HPUX, we need to check for EADDRNOTAVAIL also. - error == EADDRNOTAVAIL || -#elif defined (ACE_LINUX) - // On linux, we need to check for ENOENT also. - error == ENOENT || - // For RedHat5.2, need to check for EINVAL too. - error == EINVAL || - // Without threads check for EOPNOTSUPP - error == EOPNOTSUPP || -#elif defined (sun) - // On sun, we need to check for ENOSR also. - error == ENOSR || - // Without threads check for ENOTSUP - error == ENOTSUP || -#elif defined (__FreeBSD__) - // On FreeBSD we need to check for EOPNOTSUPP (LinuxThreads) or - // ENOSYS (libc_r threads) also. - error == EOPNOTSUPP || - error == ENOSYS || -#elif defined (__OpenBSD__) - // OpenBSD appears to return EBADF. - error == EBADF || -#endif /* ACE_WIN32 */ - error == ENFILE) - return 1; - else - return 0; -} - -u_int -ACE::major_version (void) -{ - return ACE_MAJOR_VERSION; -} - -u_int -ACE::minor_version (void) -{ - return ACE_MINOR_VERSION; -} - -u_int -ACE::beta_version (void) -{ - return ACE_BETA_VERSION; -} - -const ACE_TCHAR * -ACE::compiler_name (void) -{ -#ifdef ACE_CC_NAME - return ACE_CC_NAME; -#else - return ACE_TEXT (""); -#endif -} - -u_int -ACE::compiler_major_version (void) -{ -#ifdef ACE_CC_MAJOR_VERSION - return ACE_CC_MAJOR_VERSION; -#else - return 0; -#endif -} - -u_int -ACE::compiler_minor_version (void) -{ -#ifdef ACE_CC_MINOR_VERSION - return ACE_CC_MINOR_VERSION; -#else - return 0; -#endif -} - -u_int -ACE::compiler_beta_version (void) -{ -#ifdef ACE_CC_BETA_VERSION - return ACE_CC_BETA_VERSION; -#else - return 0; -#endif -} - -ACE_TCHAR -ACE::nibble2hex (u_int n) -{ - // Yes, this works for UNICODE - return ACE_TEXT ("0123456789abcdef")[n & 0x0f]; -} - -bool -ACE::debug (void) -{ - static const char* debug = ACE_OS::getenv ("ACELIB_DEBUG"); - return (ACE::debug_ != 0) ? ACE::debug_ : (debug != 0 ? (*debug != '0') : false); -} - -void -ACE::debug (bool onoff) -{ - ACE::debug_ = onoff; -} - -int -ACE::select (int width, - ACE_Handle_Set *readfds, - ACE_Handle_Set *writefds, - ACE_Handle_Set *exceptfds, - const ACE_Time_Value *timeout) -{ - int result = ACE_OS::select (width, - readfds ? readfds->fdset () : 0, - writefds ? writefds->fdset () : 0, - exceptfds ? exceptfds->fdset () : 0, - timeout); - if (result > 0) - { -# if !defined (ACE_WIN32) - // This isn't needed for Windows... it's a no-op anyway. - if (readfds) - readfds->sync ((ACE_HANDLE) width); - if (writefds) - writefds->sync ((ACE_HANDLE) width); - if (exceptfds) - exceptfds->sync ((ACE_HANDLE) width); -#endif /* ACE_WIN32 */ - } - return result; -} - -int -ACE::select (int width, - ACE_Handle_Set &readfds, - const ACE_Time_Value *timeout) -{ - int result = ACE_OS::select (width, - readfds.fdset (), - 0, - 0, - timeout); - -#if !defined (ACE_WIN32) - if (result > 0) - readfds.sync ((ACE_HANDLE) width); -#endif /* ACE_WIN32 */ - return result; -} - -int -ACE::terminate_process (pid_t pid) -{ -#if defined (ACE_HAS_PHARLAP) - ACE_UNUSED_ARG (pid); - ACE_NOTSUP_RETURN (-1); -#elif defined (ACE_WIN32) - // Create a handle for the given process id. - ACE_HANDLE process_handle = - ::OpenProcess (PROCESS_TERMINATE, - FALSE, // New handle is not inheritable. - pid); - - if (process_handle == ACE_INVALID_HANDLE - || process_handle == 0) - return -1; - else - { - // Kill the process associated with process_handle. - BOOL terminate_result = - ::TerminateProcess (process_handle, 0); - // Free up the kernel resources. - ACE_OS::close (process_handle); - return terminate_result ? 0 : -1; - } -#else - return ACE_OS::kill (pid, 9); -#endif /* ACE_HAS_PHARLAP */ -} - -int -ACE::process_active (pid_t pid) -{ -#if !defined(ACE_WIN32) - if (ACE_OS::kill (pid, 0) == 0) - return 1; - else if (errno == ESRCH) - return 0; - else - return -1; -#else - // Create a handle for the given process id. - ACE_HANDLE process_handle = - ::OpenProcess (PROCESS_QUERY_INFORMATION, FALSE, pid); - if (process_handle == ACE_INVALID_HANDLE || process_handle == 0) - return 0; - else - { - DWORD status; - int result = 1; - if (::GetExitCodeProcess (process_handle, - &status) == 0 - || status != STILL_ACTIVE) - result = 0; - - ::CloseHandle (process_handle); - return result; - } -#endif /* !ACE_WIN32 */ -} - -const ACE_TCHAR * -ACE::execname (const ACE_TCHAR *old_name) -{ -#if defined (ACE_WIN32) - const ACE_TCHAR *suffix = ACE_OS::strrchr (old_name, ACE_TEXT ('.')); - if (suffix == 0 || ACE_OS::strcasecmp (suffix, ACE_TEXT (".exe")) != 0) - { - ACE_TCHAR *new_name = 0; - - size_t size = - ACE_OS::strlen (old_name) - + ACE_OS::strlen (ACE_TEXT (".exe")) - + 1; - - ACE_NEW_RETURN (new_name, - ACE_TCHAR[size], - 0); - ACE_TCHAR *end = new_name; - - end = ACE_OS::strecpy (new_name, old_name); - - // Concatenate the .exe suffix onto the end of the executable. - // end points _after_ the terminating nul. - ACE_OS::strcpy (end - 1, ACE_TEXT (".exe")); - - return new_name; - } -#endif /* ACE_WIN32 */ - return old_name; -} - -u_long -ACE::hash_pjw (const char *str, size_t len) -{ - u_long hash = 0; - - for (size_t i = 0; i < len; i++) - { - const char temp = str[i]; - hash = (hash << 4) + (temp * 13); - - u_long g = hash & 0xf0000000; - - if (g) - { - hash ^= (g >> 24); - hash ^= g; - } - } - - return hash; -} - -u_long -ACE::hash_pjw (const char *str) -{ - return ACE::hash_pjw (str, ACE_OS::strlen (str)); -} - -#if defined (ACE_HAS_WCHAR) -u_long -ACE::hash_pjw (const wchar_t *str, size_t len) -{ - u_long hash = 0; - - for (size_t i = 0; i < len; i++) - { - // @@ UNICODE: Does this function do the correct thing with wchar's? - - const wchar_t temp = str[i]; - hash = (hash << 4) + (temp * 13); - - u_long g = hash & 0xf0000000; - - if (g) - { - hash ^= (g >> 24); - hash ^= g; - } - } - - return hash; -} - -u_long -ACE::hash_pjw (const wchar_t *str) -{ - return ACE::hash_pjw (str, ACE_OS::strlen (str)); -} -#endif /* ACE_HAS_WCHAR */ - -ACE_TCHAR * -ACE::strenvdup (const ACE_TCHAR *str) -{ - ACE_TRACE ("ACE::strenvdup"); - - return ACE_OS::strenvdup (str); -} - -/* - -Examples: - -Source NT UNIX -================================================================== -netsvc netsvc.dll libnetsvc.so -(PATH will be (LD_LIBRARY_PATH -evaluated) evaluated) - -libnetsvc.dll libnetsvc.dll libnetsvc.dll + warning -netsvc.so netsvc.so + warning libnetsvc.so - -..\../libs/netsvc ..\..\libs\netsvc.dll ../../libs/netsvc.so -(absolute path used) (absolute path used) - -*/ - -const ACE_TCHAR * -ACE::basename (const ACE_TCHAR *pathname, ACE_TCHAR delim) -{ - ACE_TRACE ("ACE::basename"); - const ACE_TCHAR *temp = ACE_OS::strrchr (pathname, delim); - - if (temp == 0) - return pathname; - else - return temp + 1; -} - -const ACE_TCHAR * -ACE::dirname (const ACE_TCHAR *pathname, ACE_TCHAR delim) -{ - ACE_TRACE ("ACE::dirname"); - static ACE_TCHAR return_dirname[MAXPATHLEN + 1]; - - const ACE_TCHAR *temp = ACE_OS::strrchr (pathname, delim); - - if (temp == 0) - { - return_dirname[0] = '.'; - return_dirname[1] = '\0'; - - return return_dirname; - } - else - { - // When the len is truncated, there are problems! This should - // not happen in normal circomstances - size_t len = temp - pathname + 1; - if (len > (sizeof return_dirname / sizeof (ACE_TCHAR))) - len = sizeof return_dirname / sizeof (ACE_TCHAR); - - ACE_OS::strsncpy (return_dirname, - pathname, - len); - return return_dirname; - } -} - -ssize_t -ACE::recv (ACE_HANDLE handle, - void *buf, - size_t len, - int flags, - const ACE_Time_Value *timeout) -{ - if (timeout == 0) - return ACE_OS::recv (handle, (char *) buf, len, flags); - else - { - int val = 0; - if (ACE::enter_recv_timedwait (handle, timeout, val) ==-1) - return -1; - else - { - ssize_t bytes_transferred = - ACE_OS::recv (handle, (char *) buf, len, flags); - ACE::restore_non_blocking_mode (handle, val); - return bytes_transferred; - } - } -} - -#if defined (ACE_HAS_TLI) - -ssize_t -ACE::t_rcv (ACE_HANDLE handle, - void *buf, - size_t len, - int *flags, - const ACE_Time_Value *timeout) -{ - if (timeout == 0) - return ACE_OS::t_rcv (handle, (char *) buf, len, flags); - else - { - int val = 0; - if (ACE::enter_recv_timedwait (handle, timeout, val) ==-1) - return -1; - else - { - ssize_t bytes_transferred = - ACE_OS::t_rcv (handle, (char *) buf, len, flags); - ACE::restore_non_blocking_mode (handle, val); - return bytes_transferred; - } - } -} - -#endif /* ACE_HAS_TLI */ - -ssize_t -ACE::recv (ACE_HANDLE handle, - void *buf, - size_t n, - const ACE_Time_Value *timeout) -{ - if (timeout == 0) - return ACE::recv_i (handle, buf, n); - else - { - int val = 0; - if (ACE::enter_recv_timedwait (handle, timeout, val) == -1) - return -1; - else - { - ssize_t bytes_transferred = ACE::recv_i (handle, buf, n); - ACE::restore_non_blocking_mode (handle, val); - return bytes_transferred; - } - } -} - -ssize_t -ACE::recvmsg (ACE_HANDLE handle, - struct msghdr *msg, - int flags, - const ACE_Time_Value *timeout) -{ - if (timeout == 0) - return ACE_OS::recvmsg (handle, msg, flags); - else - { - int val = 0; - if (ACE::enter_recv_timedwait (handle, timeout, val) == -1) - return -1; - else - { - ssize_t bytes_transferred = ACE_OS::recvmsg (handle, msg, flags); - ACE::restore_non_blocking_mode (handle, val); - return bytes_transferred; - } - } -} - -ssize_t -ACE::recvfrom (ACE_HANDLE handle, - char *buf, - int len, - int flags, - struct sockaddr *addr, - int *addrlen, - const ACE_Time_Value *timeout) -{ - if (timeout == 0) - return ACE_OS::recvfrom (handle, buf, len, flags, addr, addrlen); - else - { - int val = 0; - if (ACE::enter_recv_timedwait (handle, timeout, val) == -1) - return -1; - else - { - ssize_t bytes_transferred = - ACE_OS::recvfrom (handle, buf, len, flags, addr, addrlen); - ACE::restore_non_blocking_mode (handle, val); - return bytes_transferred; - } - } -} - -ssize_t -ACE::recv_n_i (ACE_HANDLE handle, - void *buf, - size_t len, - int flags, - size_t *bt) -{ - size_t temp; - size_t &bytes_transferred = bt == 0 ? temp : *bt; - ssize_t n; - - for (bytes_transferred = 0; - bytes_transferred < len; - bytes_transferred += n) - { - // Try to transfer as much of the remaining data as possible. - n = ACE_OS::recv (handle, - static_cast (buf) + bytes_transferred, - len - bytes_transferred, - flags); - // Check EOF. - if (n == 0) - return 0; - - // Check for other errors. - if (n == -1) - { - // Check for possible blocking. - if (errno == EWOULDBLOCK) - { - // Wait for the blocking to subside. - int const result = ACE::handle_read_ready (handle, 0); - - // Did select() succeed? - if (result != -1) - { - // Blocking subsided. Continue data transfer. - n = 0; - continue; - } - } - - // Other data transfer or select() failures. - return -1; - } - } - - return static_cast (bytes_transferred); -} - -ssize_t -ACE::recv_n_i (ACE_HANDLE handle, - void *buf, - size_t len, - int flags, - const ACE_Time_Value *timeout, - size_t *bt) -{ - size_t temp; - size_t &bytes_transferred = bt == 0 ? temp : *bt; - ssize_t n; - ssize_t result = 0; - int error = 0; - - int val = 0; - ACE::record_and_set_non_blocking_mode (handle, val); - - for (bytes_transferred = 0; - bytes_transferred < len; - bytes_transferred += n) - { - // Try to transfer as much of the remaining data as possible. - // Since the socket is in non-blocking mode, this call will not - // block. - n = ACE_OS::recv (handle, - static_cast (buf) + bytes_transferred, - len - bytes_transferred, - flags); - - // Check for errors. - if (n == 0 || - n == -1) - { - // Check for possible blocking. - if (n == -1 && - errno == EWOULDBLOCK) - { - // Wait upto for the blocking to subside. - int const rtn = ACE::handle_read_ready (handle, timeout); - - // Did select() succeed? - if (rtn != -1) - { - // Blocking subsided in period. Continue - // data transfer. - n = 0; - continue; - } - } - - // Wait in select() timed out or other data transfer or - // select() failures. - error = 1; - result = n; - break; - } - } - - ACE::restore_non_blocking_mode (handle, val); - - if (error) - return result; - else - return static_cast (bytes_transferred); -} - -#if defined (ACE_HAS_TLI) - -ssize_t -ACE::t_rcv_n_i (ACE_HANDLE handle, - void *buf, - size_t len, - int *flags, - size_t *bt) -{ - size_t temp; - size_t &bytes_transferred = bt == 0 ? temp : *bt; - ssize_t n; - - for (bytes_transferred = 0; - bytes_transferred < len; - bytes_transferred += n) - { - // Try to transfer as much of the remaining data as possible. - n = ACE_OS::t_rcv (handle, - (char *) buf + bytes_transferred, - len - bytes_transferred, - flags); - // Check EOF. - if (n == 0) - return 0; - - // Check for other errors. - if (n == -1) - { - // Check for possible blocking. - if (errno == EWOULDBLOCK) - { - // Wait for the blocking to subside. - int const result = ACE::handle_read_ready (handle, 0); - - // Did select() succeed? - if (result != -1) - { - // Blocking subsided. Continue data transfer. - n = 0; - continue; - } - } - - // Other data transfer or select() failures. - return -1; - } - } - - return bytes_transferred; -} - -ssize_t -ACE::t_rcv_n_i (ACE_HANDLE handle, - void *buf, - size_t len, - int *flags, - const ACE_Time_Value *timeout, - size_t *bt) -{ - size_t temp; - size_t &bytes_transferred = bt == 0 ? temp : *bt; - ssize_t n; - ssize_t result = 0; - int error = 0; - - int val = 0; - ACE::record_and_set_non_blocking_mode (handle, val); - - for (bytes_transferred = 0; - bytes_transferred < len; - bytes_transferred += n) - { - // Try to transfer as much of the remaining data as possible. - // Since the socket is in non-blocking mode, this call will not - // block. - n = ACE_OS::t_rcv (handle, - (char *) buf + bytes_transferred, - len - bytes_transferred, - flags); - - // Check for errors. - if (n == 0 || - n == -1) - { - // Check for possible blocking. - if (n == -1 && - errno == EWOULDBLOCK) - { - // Wait upto for the blocking to subside. - int const rtn = ACE::handle_read_ready (handle, timeout); - - // Did select() succeed? - if (rtn != -1) - { - // Blocking subsided in period. Continue - // data transfer. - n = 0; - continue; - } - } - - // Wait in select() timed out or other data transfer or - // select() failures. - error = 1; - result = n; - break; - } - } - - ACE::restore_non_blocking_mode (handle, val); - - if (error) - return result; - else - return bytes_transferred; -} - -#endif /* ACE_HAS_TLI */ - -ssize_t -ACE::recv_n_i (ACE_HANDLE handle, - void *buf, - size_t len, - size_t *bt) -{ - size_t temp; - size_t &bytes_transferred = bt == 0 ? temp : *bt; - ssize_t n; - - for (bytes_transferred = 0; - bytes_transferred < len; - bytes_transferred += n) - { - // Try to transfer as much of the remaining data as possible. - n = ACE::recv_i (handle, - static_cast (buf) + bytes_transferred, - len - bytes_transferred); - // Check EOF. - if (n == 0) - { - return 0; - } - // Check for other errors. - if (n == -1) - { - // Check for possible blocking. - if (errno == EWOULDBLOCK) - { - // Wait for the blocking to subside. - int const result = ACE::handle_read_ready (handle, 0); - - // Did select() succeed? - if (result != -1) - { - // Blocking subsided. Continue data transfer. - n = 0; - continue; - } - } - - // Other data transfer or select() failures. - return -1; - } - } - - return static_cast (bytes_transferred); -} - -ssize_t -ACE::recv_n_i (ACE_HANDLE handle, - void *buf, - size_t len, - const ACE_Time_Value *timeout, - size_t *bt) -{ - size_t temp; - size_t &bytes_transferred = bt == 0 ? temp : *bt; - ssize_t n; - ssize_t result = 0; - int error = 0; - - int val = 0; - ACE::record_and_set_non_blocking_mode (handle, val); - - for (bytes_transferred = 0; - bytes_transferred < len; - bytes_transferred += n) - { - // Try to transfer as much of the remaining data as possible. - // Since the socket is in non-blocking mode, this call will not - // block. - n = ACE::recv_i (handle, - static_cast (buf) + bytes_transferred, - len - bytes_transferred); - - // Check for errors. - if (n == 0 || - n == -1) - { - // Check for possible blocking. - if (n == -1 && - errno == EWOULDBLOCK) - { - // Wait upto for the blocking to subside. - int const rtn = ACE::handle_read_ready (handle, timeout); - - // Did select() succeed? - if (rtn != -1) - { - // Blocking subsided in period. Continue - // data transfer. - n = 0; - continue; - } - } - - // Wait in select() timed out or other data transfer or - // select() failures. - error = 1; - result = n; - break; - } - } - - ACE::restore_non_blocking_mode (handle, val); - - if (error) - return result; - else - return static_cast (bytes_transferred); -} - -// This is basically an interface to ACE_OS::readv, that doesn't use -// the struct iovec explicitly. The ... can be passed as an arbitrary -// number of (char *ptr, int len) tuples. However, the count N is the -// *total* number of trailing arguments, *not* a couple of the number -// of tuple pairs! - -ssize_t -ACE::recv (ACE_HANDLE handle, size_t n, ...) -{ - va_list argp; - int const total_tuples = static_cast (n / 2); - iovec *iovp = 0; -#if defined (ACE_HAS_ALLOCA) - iovp = (iovec *) alloca (total_tuples * sizeof (iovec)); -#else - ACE_NEW_RETURN (iovp, - iovec[total_tuples], - -1); -#endif /* !defined (ACE_HAS_ALLOCA) */ - - va_start (argp, n); - - for (int i = 0; i < total_tuples; i++) - { - iovp[i].iov_base = va_arg (argp, char *); - iovp[i].iov_len = va_arg (argp, int); - } - - ssize_t const result = ACE_OS::recvv (handle, iovp, total_tuples); -#if !defined (ACE_HAS_ALLOCA) - delete [] iovp; -#endif /* !defined (ACE_HAS_ALLOCA) */ - va_end (argp); - return result; -} - -ssize_t -ACE::recvv (ACE_HANDLE handle, - iovec *iov, - int iovcnt, - const ACE_Time_Value *timeout) -{ - if (timeout == 0) - return ACE_OS::recvv (handle, iov, iovcnt); - else - { - int val = 0; - if (ACE::enter_recv_timedwait (handle, timeout, val) == -1) - return -1; - else - { - ssize_t bytes_transferred = ACE_OS::recvv (handle, iov, iovcnt); - ACE::restore_non_blocking_mode (handle, val); - return bytes_transferred; - } - } -} - -ssize_t -ACE::recvv_n_i (ACE_HANDLE handle, - iovec *iov, - int iovcnt, - size_t *bt) -{ - size_t temp; - size_t &bytes_transferred = bt == 0 ? temp : *bt; - bytes_transferred = 0; - - for (int s = 0; s < iovcnt; ) - { - // Try to transfer as much of the remaining data as possible. - ssize_t n = ACE_OS::recvv (handle, iov + s, iovcnt - s); - // Check EOF. - if (n == 0) - return 0; - - // Check for other errors. - if (n == -1) - { - // Check for possible blocking. - if (errno == EWOULDBLOCK) - { - // Wait for the blocking to subside. - int const result = ACE::handle_read_ready (handle, 0); - - // Did select() succeed? - if (result != -1) - { - // Blocking subsided. Continue data transfer. - n = 0; - continue; - } - } - - // Other data transfer or select() failures. - return -1; - } - - for (bytes_transferred += n; - s < iovcnt - && n >= static_cast (iov[s].iov_len); - s++) - n -= iov[s].iov_len; - - if (n != 0) - { - char *base = static_cast (iov[s].iov_base); - iov[s].iov_base = base + n; - // This blind cast is safe because n < iov_len, after above loop. - iov[s].iov_len = iov[s].iov_len - static_cast (n); - } - } - - return ACE_Utils::truncate_cast (bytes_transferred); -} - -ssize_t -ACE::recvv_n_i (ACE_HANDLE handle, - iovec *iov, - int iovcnt, - const ACE_Time_Value *timeout, - size_t *bt) -{ - size_t temp; - size_t &bytes_transferred = bt == 0 ? temp : *bt; - bytes_transferred = 0; - ssize_t result = 0; - int error = 0; - - int val = 0; - ACE::record_and_set_non_blocking_mode (handle, val); - - for (int s = 0; s < iovcnt; ) - { - // Try to transfer as much of the remaining data as possible. - // Since the socket is in non-blocking mode, this call will not - // block. - ssize_t n = ACE_OS::recvv (handle, iov + s, iovcnt - s); - - // Check for errors. - if (n == 0 || n == -1) - { - // Check for possible blocking. - if (n == -1 && errno == EWOULDBLOCK) - { - // Wait upto for the blocking to subside. - int const rtn = ACE::handle_read_ready (handle, timeout); - - // Did select() succeed? - if (rtn != -1) - { - // Blocking subsided in period. Continue - // data transfer. - n = 0; - continue; - } - } - - // Wait in select() timed out or other data transfer or - // select() failures. - error = 1; - result = n; - break; - } - - for (bytes_transferred += n; - s < iovcnt - && n >= static_cast (iov[s].iov_len); - s++) - n -= iov[s].iov_len; - - if (n != 0) - { - char *base = reinterpret_cast (iov[s].iov_base); - iov[s].iov_base = base + n; - // This blind cast is safe because n < iov_len, after above loop. - iov[s].iov_len = iov[s].iov_len - static_cast (n); - } - } - - ACE::restore_non_blocking_mode (handle, val); - - if (error) - { - return result; - } - else - { - return ACE_Utils::truncate_cast (bytes_transferred); - } -} - -ssize_t -ACE::recv_n (ACE_HANDLE handle, - ACE_Message_Block *message_block, - const ACE_Time_Value *timeout, - size_t *bt) -{ - size_t temp; - size_t &bytes_transferred = bt == 0 ? temp : *bt; - bytes_transferred = 0; - - iovec iov[ACE_IOV_MAX]; - int iovcnt = 0; - - while (message_block != 0) - { - // Our current message block chain. - const ACE_Message_Block *current_message_block = message_block; - - while (current_message_block != 0) - { - size_t current_message_block_length = - current_message_block->length (); - char *this_rd_ptr = current_message_block->rd_ptr (); - - // Check if this block has any space for incoming data. - while (current_message_block_length > 0) - { - u_long const this_chunk_length = - ACE_Utils::truncate_cast ( - current_message_block_length); - - // Collect the data in the iovec. - iov[iovcnt].iov_base = this_rd_ptr; - iov[iovcnt].iov_len = this_chunk_length; - current_message_block_length -= this_chunk_length; - this_rd_ptr += this_chunk_length; - - // Increment iovec counter. - ++iovcnt; - - // The buffer is full make a OS call. @@ TODO find a way to - // find ACE_IOV_MAX for platforms that do not define it rather - // than simply setting ACE_IOV_MAX to some arbitrary value such - // as 16. - if (iovcnt == ACE_IOV_MAX) - { - size_t current_transfer = 0; - - ssize_t const result = ACE::recvv_n (handle, - iov, - iovcnt, - timeout, - ¤t_transfer); - - // Add to total bytes transferred. - bytes_transferred += current_transfer; - - // Errors. - if (result == -1 || result == 0) - return result; - - // Reset iovec counter. - iovcnt = 0; - } - } - - // Select the next message block in the chain. - current_message_block = current_message_block->cont (); - } - - // Selection of the next message block chain. - message_block = message_block->next (); - } - - // Check for remaining buffers to be sent. This will happen when - // ACE_IOV_MAX is not a multiple of the number of message blocks. - if (iovcnt != 0) - { - size_t current_transfer = 0; - - ssize_t const result = ACE::recvv_n (handle, - iov, - iovcnt, - timeout, - ¤t_transfer); - - // Add to total bytes transferred. - bytes_transferred += current_transfer; - - // Errors. - if (result == -1 || result == 0) - { - return result; - } - } - - // Return total bytes transferred. - return ACE_Utils::truncate_cast (bytes_transferred); -} - -ssize_t -ACE::send (ACE_HANDLE handle, - const void *buf, - size_t n, - int flags, - const ACE_Time_Value *timeout) -{ - if (timeout == 0) - return ACE_OS::send (handle, (const char *) buf, n, flags); - else - { - int val = 0; - if (ACE::enter_send_timedwait (handle, timeout, val) == -1) - return -1; - else - { - ssize_t const bytes_transferred = - ACE_OS::send (handle, (const char *) buf, n, flags); - ACE::restore_non_blocking_mode (handle, val); - return bytes_transferred; - } - } -} - -#if defined (ACE_HAS_TLI) - -ssize_t -ACE::t_snd (ACE_HANDLE handle, - const void *buf, - size_t n, - int flags, - const ACE_Time_Value *timeout) -{ - if (timeout == 0) - return ACE_OS::t_snd (handle, (const char *) buf, n, flags); - else - { - int val = 0; - if (ACE::enter_send_timedwait (handle, timeout, val) == -1) - return -1; - else - { - ssize_t const bytes_transferred = - ACE_OS::t_snd (handle, (const char *) buf, n, flags); - ACE::restore_non_blocking_mode (handle, val); - return bytes_transferred; - } - } -} - -#endif /* ACE_HAS_TLI */ - -ssize_t -ACE::send (ACE_HANDLE handle, - const void *buf, - size_t n, - const ACE_Time_Value *timeout) -{ - if (timeout == 0) - return ACE::send_i (handle, buf, n); - else - { - int val = 0; - if (ACE::enter_send_timedwait (handle, timeout, val) == -1) - return -1; - else - { - ssize_t const bytes_transferred = ACE::send_i (handle, buf, n); - ACE::restore_non_blocking_mode (handle, val); - return bytes_transferred; - } - } -} - -ssize_t -ACE::sendmsg (ACE_HANDLE handle, - const struct msghdr *msg, - int flags, - const ACE_Time_Value *timeout) -{ - if (timeout == 0) - return ACE_OS::sendmsg (handle, msg, flags); - else - { - int val = 0; - if (ACE::enter_send_timedwait (handle, timeout, val) == -1) - return -1; - else - { - ssize_t const bytes_transferred = - ACE_OS::sendmsg (handle, msg, flags); - ACE::restore_non_blocking_mode (handle, val); - return bytes_transferred; - } - } -} - -ssize_t -ACE::sendto (ACE_HANDLE handle, - const char *buf, - int len, - int flags, - const struct sockaddr *addr, - int addrlen, - const ACE_Time_Value *timeout) -{ - if (timeout == 0) - return ACE_OS::sendto (handle, buf, len, flags, addr, addrlen); - else - { - int val = 0; - if (ACE::enter_send_timedwait (handle, timeout, val) == -1) - return -1; - else - { - ssize_t const bytes_transferred = - ACE_OS::sendto (handle, buf, len, flags, addr, addrlen); - ACE::restore_non_blocking_mode (handle, val); - return bytes_transferred; - } - } -} - -ssize_t -ACE::send_n_i (ACE_HANDLE handle, - const void *buf, - size_t len, - int flags, - size_t *bt) -{ - size_t temp; - size_t &bytes_transferred = bt == 0 ? temp : *bt; - ssize_t n; - - for (bytes_transferred = 0; - bytes_transferred < len; - bytes_transferred += n) - { - // Try to transfer as much of the remaining data as possible. - n = ACE_OS::send (handle, - (char *) buf + bytes_transferred, - len - bytes_transferred, - flags); - // Check EOF. - if (n == 0) - return 0; - - // Check for other errors. - if (n == -1) - { - // Check for possible blocking. -#if defined (ACE_WIN32) - if (errno == EWOULDBLOCK) // If enobufs no need to loop -#else - if (errno == EWOULDBLOCK || errno == ENOBUFS) -#endif /* ACE_WIN32 */ - { - // Wait for the blocking to subside. - int const result = ACE::handle_write_ready (handle, 0); - - // Did select() succeed? - if (result != -1) - { - // Blocking subsided. Continue data transfer. - n = 0; - continue; - } - } - - // Other data transfer or select() failures. - return -1; - } - } - - return ACE_Utils::truncate_cast (bytes_transferred); -} - -ssize_t -ACE::send_n_i (ACE_HANDLE handle, - const void *buf, - size_t len, - int flags, - const ACE_Time_Value *timeout, - size_t *bt) -{ - size_t temp; - size_t &bytes_transferred = bt == 0 ? temp : *bt; - ssize_t n; - ssize_t result = 0; - int error = 0; - - int val = 0; - ACE::record_and_set_non_blocking_mode (handle, val); - - for (bytes_transferred = 0; - bytes_transferred < len; - bytes_transferred += n) - { - // Try to transfer as much of the remaining data as possible. - // Since the socket is in non-blocking mode, this call will not - // block. - n = ACE_OS::send (handle, - (char *) buf + bytes_transferred, - len - bytes_transferred, - flags); - - // Check for errors. - if (n == 0 || - n == -1) - { - // Check for possible blocking. - if (n == -1 && (errno == EWOULDBLOCK || errno == ENOBUFS)) - { - // Wait upto for the blocking to subside. - int const rtn = ACE::handle_write_ready (handle, timeout); - - // Did select() succeed? - if (rtn != -1) - { - // Blocking subsided in period. Continue - // data transfer. - n = 0; - continue; - } - } - - // Wait in select() timed out or other data transfer or - // select() failures. - error = 1; - result = n; - break; - } - } - - ACE::restore_non_blocking_mode (handle, val); - - if (error) - { - return result; - } - else - { - return ACE_Utils::truncate_cast (bytes_transferred); - } -} - -#if defined (ACE_HAS_TLI) - -ssize_t -ACE::t_snd_n_i (ACE_HANDLE handle, - const void *buf, - size_t len, - int flags, - size_t *bt) -{ - size_t temp; - size_t &bytes_transferred = bt == 0 ? temp : *bt; - ssize_t n; - - for (bytes_transferred = 0; - bytes_transferred < len; - bytes_transferred += n) - { - // Try to transfer as much of the remaining data as possible. - n = ACE_OS::t_snd (handle, - (char *) buf + bytes_transferred, - len - bytes_transferred, - flags); - // Check EOF. - if (n == 0) - return 0; - - // Check for other errors. - if (n == -1) - { - // Check for possible blocking. - if (errno == EWOULDBLOCK || errno == ENOBUFS) - { - // Wait for the blocking to subside. - int const result = ACE::handle_write_ready (handle, 0); - - // Did select() succeed? - if (result != -1) - { - // Blocking subsided. Continue data transfer. - n = 0; - continue; - } - } - - // Other data transfer or select() failures. - return -1; - } - } - - return bytes_transferred; -} - -ssize_t -ACE::t_snd_n_i (ACE_HANDLE handle, - const void *buf, - size_t len, - int flags, - const ACE_Time_Value *timeout, - size_t *bt) -{ - size_t temp; - size_t &bytes_transferred = bt == 0 ? temp : *bt; - ssize_t n; - ssize_t result = 0; - int error = 0; - - int val = 0; - ACE::record_and_set_non_blocking_mode (handle, val); - - for (bytes_transferred = 0; - bytes_transferred < len; - bytes_transferred += n) - { - // Try to transfer as much of the remaining data as possible. - // Since the socket is in non-blocking mode, this call will not - // block. - n = ACE_OS::t_snd (handle, - (char *) buf + bytes_transferred, - len - bytes_transferred, - flags); - - // Check for errors. - if (n == 0 || - n == -1) - { - // Check for possible blocking. - if (n == -1 && - (errno == EWOULDBLOCK || errno == ENOBUFS)) - { - // Wait upto for the blocking to subside. - int const rtn = ACE::handle_write_ready (handle, timeout); - - // Did select() succeed? - if (rtn != -1) - { - // Blocking subsided in period. Continue - // data transfer. - n = 0; - continue; - } - } - - // Wait in select() timed out or other data transfer or - // select() failures. - error = 1; - result = n; - break; - } - } - - ACE::restore_non_blocking_mode (handle, val); - - if (error) - return result; - else - return bytes_transferred; -} - -#endif /* ACE_HAS_TLI */ - -ssize_t -ACE::send_n_i (ACE_HANDLE handle, - const void *buf, - size_t len, - size_t *bt) -{ - size_t temp; - size_t &bytes_transferred = bt == 0 ? temp : *bt; - ssize_t n; - - for (bytes_transferred = 0; - bytes_transferred < len; - bytes_transferred += n) - { - // Try to transfer as much of the remaining data as possible. - n = ACE::send_i (handle, - (char *) buf + bytes_transferred, - len - bytes_transferred); - // Check EOF. - if (n == 0) - { - return 0; - } - - // Check for other errors. - if (n == -1) - { - // Check for possible blocking. - if (errno == EWOULDBLOCK || errno == ENOBUFS) - { - // Wait for the blocking to subside. - int const result = ACE::handle_write_ready (handle, 0); - - // Did select() succeed? - if (result != -1) - { - // Blocking subsided. Continue data transfer. - n = 0; - continue; - } - } - - // Other data transfer or select() failures. - return -1; - } - } - - return ACE_Utils::truncate_cast (bytes_transferred); -} - -ssize_t -ACE::send_n_i (ACE_HANDLE handle, - const void *buf, - size_t len, - const ACE_Time_Value *timeout, - size_t *bt) -{ - size_t temp; - size_t &bytes_transferred = bt == 0 ? temp : *bt; - ssize_t n; - ssize_t result = 0; - int error = 0; - - int val = 0; - ACE::record_and_set_non_blocking_mode (handle, val); - - for (bytes_transferred = 0; - bytes_transferred < len; - bytes_transferred += n) - { - // Try to transfer as much of the remaining data as possible. - // Since the socket is in non-blocking mode, this call will not - // block. - n = ACE::send_i (handle, - (char *) buf + bytes_transferred, - len - bytes_transferred); - - // Check for errors. - if (n == 0 || - n == -1) - { - // Check for possible blocking. - if (n == -1 && - (errno == EWOULDBLOCK || errno == ENOBUFS)) - { - // Wait upto for the blocking to subside. - int const rtn = ACE::handle_write_ready (handle, timeout); - - // Did select() succeed? - if (rtn != -1) - { - // Blocking subsided in period. Continue - // data transfer. - n = 0; - continue; - } - } - - // Wait in select() timed out or other data transfer or - // select() failures. - error = 1; - result = n; - break; - } - } - - ACE::restore_non_blocking_mode (handle, val); - - if (error) - { - return result; - } - else - { - return ACE_Utils::truncate_cast (bytes_transferred); - } -} - -// Send N char *ptrs and int lengths. Note that the char *'s precede -// the ints (basically, an varargs version of writev). The count N is -// the *total* number of trailing arguments, *not* a couple of the -// number of tuple pairs! - -ssize_t -ACE::send (ACE_HANDLE handle, size_t n, ...) -{ - va_list argp; - int total_tuples = static_cast (n / 2); - iovec *iovp; -#if defined (ACE_HAS_ALLOCA) - iovp = (iovec *) alloca (total_tuples * sizeof (iovec)); -#else - ACE_NEW_RETURN (iovp, - iovec[total_tuples], - -1); -#endif /* !defined (ACE_HAS_ALLOCA) */ - - va_start (argp, n); - - for (int i = 0; i < total_tuples; i++) - { - iovp[i].iov_base = va_arg (argp, char *); - iovp[i].iov_len = va_arg (argp, int); - } - - ssize_t result = ACE_OS::sendv (handle, iovp, total_tuples); -#if !defined (ACE_HAS_ALLOCA) - delete [] iovp; -#endif /* !defined (ACE_HAS_ALLOCA) */ - va_end (argp); - return result; -} - -ssize_t -ACE::sendv (ACE_HANDLE handle, - const iovec *iov, - int iovcnt, - const ACE_Time_Value *timeout) -{ - if (timeout == 0) - return ACE_OS::sendv (handle, iov, iovcnt); - else - { - int val = 0; - if (ACE::enter_send_timedwait (handle, timeout, val) == -1) - return -1; - else - { - ssize_t bytes_transferred = ACE_OS::sendv (handle, iov, iovcnt); - ACE::restore_non_blocking_mode (handle, val); - return bytes_transferred; - } - } -} - -ssize_t -ACE::sendv_n_i (ACE_HANDLE handle, - const iovec *i, - int iovcnt, - size_t *bt) -{ - size_t temp; - size_t &bytes_transferred = bt == 0 ? temp : *bt; - bytes_transferred = 0; - - iovec *iov = const_cast (i); - - for (int s = 0; - s < iovcnt; - ) - { - // Try to transfer as much of the remaining data as possible. - ssize_t n = ACE_OS::sendv (handle, iov + s, iovcnt - s); - - // Check EOF. - if (n == 0) - return 0; - - // Check for other errors. - if (n == -1) - { - // Check for possible blocking. - if (errno == EWOULDBLOCK || errno == ENOBUFS) - { - // Wait for the blocking to subside. - int const result = ACE::handle_write_ready (handle, 0); - - // Did select() succeed? - if (result != -1) - { - // Blocking subsided. Continue data transfer. - n = 0; - continue; - } - } - - // Other data transfer or select() failures. - return -1; - } - - for (bytes_transferred += n; - s < iovcnt - && n >= static_cast (iov[s].iov_len); - s++) - n -= iov[s].iov_len; - - if (n != 0) - { - char *base = reinterpret_cast (iov[s].iov_base); - iov[s].iov_base = base + n; - // This blind cast is safe because n < iov_len, after above loop. - iov[s].iov_len = iov[s].iov_len - static_cast (n); - } - } - - return ACE_Utils::truncate_cast (bytes_transferred); -} - -ssize_t -ACE::sendv_n_i (ACE_HANDLE handle, - const iovec *i, - int iovcnt, - const ACE_Time_Value *timeout, - size_t *bt) -{ - size_t temp; - size_t &bytes_transferred = bt == 0 ? temp : *bt; - bytes_transferred = 0; - ssize_t result = 0; - int error = 0; - - int val = 0; - ACE::record_and_set_non_blocking_mode (handle, val); - - iovec *iov = const_cast (i); - - for (int s = 0; - s < iovcnt; - ) - { - // Try to transfer as much of the remaining data as possible. - // Since the socket is in non-blocking mode, this call will not - // block. - ssize_t n = ACE_OS::sendv (handle, iov + s, iovcnt - s); - - // Check for errors. - if (n == 0 || - n == -1) - { - // Check for possible blocking. - if (n == -1 && - (errno == EWOULDBLOCK || errno == ENOBUFS)) - { - // Wait upto for the blocking to subside. - int const rtn = ACE::handle_write_ready (handle, timeout); - - // Did select() succeed? - if (rtn != -1) - { - // Blocking subsided in period. Continue - // data transfer. - n = 0; - continue; - } - } - - // Wait in select() timed out or other data transfer or - // select() failures. - error = 1; - result = n; - break; - } - - for (bytes_transferred += n; - s < iovcnt - && n >= static_cast (iov[s].iov_len); - s++) - n -= iov[s].iov_len; - - if (n != 0) - { - char *base = reinterpret_cast (iov[s].iov_base); - iov[s].iov_base = base + n; - // This blind cast is safe because n < iov_len, after above loop. - iov[s].iov_len = iov[s].iov_len - static_cast (n); - } - } - - ACE::restore_non_blocking_mode (handle, val); - - if (error) - { - return result; - } - else - { - return ACE_Utils::truncate_cast (bytes_transferred); - } -} - -ssize_t -ACE::write_n (ACE_HANDLE handle, - const ACE_Message_Block *message_block, - size_t *bt) -{ - size_t temp; - size_t &bytes_transferred = bt == 0 ? temp : *bt; - bytes_transferred = 0; - - iovec iov[ACE_IOV_MAX]; - int iovcnt = 0; - - while (message_block != 0) - { - // Our current message block chain. - const ACE_Message_Block *current_message_block = message_block; - - while (current_message_block != 0) - { - size_t current_message_block_length = - current_message_block->length (); - char *this_block_ptr = current_message_block->rd_ptr (); - - // Check if this block has any data to be sent. - while (current_message_block_length > 0) - { - u_long const this_chunk_length = - ACE_Utils::truncate_cast ( - current_message_block_length); - - // Collect the data in the iovec. - iov[iovcnt].iov_base = this_block_ptr; - iov[iovcnt].iov_len = this_chunk_length; - current_message_block_length -= this_chunk_length; - this_block_ptr += this_chunk_length; - - // Increment iovec counter. - ++iovcnt; - - // The buffer is full make a OS call. @@ TODO find a way to - // find ACE_IOV_MAX for platforms that do not define it rather - // than simply setting ACE_IOV_MAX to some arbitrary value such - // as 16. - if (iovcnt == ACE_IOV_MAX) - { - size_t current_transfer = 0; - - ssize_t const result = ACE::writev_n (handle, - iov, - iovcnt, - ¤t_transfer); - - // Add to total bytes transferred. - bytes_transferred += current_transfer; - - // Errors. - if (result == -1 || result == 0) - return result; - - // Reset iovec counter. - iovcnt = 0; - } - } - - // Select the next message block in the chain. - current_message_block = current_message_block->cont (); - } - - // Selection of the next message block chain. - message_block = message_block->next (); - } - - // Check for remaining buffers to be sent. This will happen when - // ACE_IOV_MAX is not a multiple of the number of message blocks. - if (iovcnt != 0) - { - size_t current_transfer = 0; - - ssize_t const result = ACE::writev_n (handle, - iov, - iovcnt, - ¤t_transfer); - - // Add to total bytes transferred. - bytes_transferred += current_transfer; - - // Errors. - if (result == -1 || result == 0) - return result; - } - - // Return total bytes transferred. - return ACE_Utils::truncate_cast (bytes_transferred); -} - -ssize_t -ACE::send_n (ACE_HANDLE handle, - const ACE_Message_Block *message_block, - const ACE_Time_Value *timeout, - size_t *bt) -{ - size_t temp; - size_t &bytes_transferred = bt == 0 ? temp : *bt; - bytes_transferred = 0; - - iovec iov[ACE_IOV_MAX]; - int iovcnt = 0; - - while (message_block != 0) - { - // Our current message block chain. - const ACE_Message_Block *current_message_block = message_block; - - while (current_message_block != 0) - { - char *this_block_ptr = current_message_block->rd_ptr (); - size_t current_message_block_length = - current_message_block->length (); - - // Check if this block has any data to be sent. - while (current_message_block_length > 0) - { - u_long const this_chunk_length = - ACE_Utils::truncate_cast ( - current_message_block_length); - - // Collect the data in the iovec. - iov[iovcnt].iov_base = this_block_ptr; - iov[iovcnt].iov_len = this_chunk_length; - current_message_block_length -= this_chunk_length; - this_block_ptr += this_chunk_length; - - // Increment iovec counter. - ++iovcnt; - - // The buffer is full make a OS call. @@ TODO find a way to - // find ACE_IOV_MAX for platforms that do not define it rather - // than simply setting ACE_IOV_MAX to some arbitrary value such - // as 16. - if (iovcnt == ACE_IOV_MAX) - { - size_t current_transfer = 0; - - ssize_t const result = ACE::sendv_n (handle, - iov, - iovcnt, - timeout, - ¤t_transfer); - - // Add to total bytes transferred. - bytes_transferred += current_transfer; - - // Errors. - if (result == -1 || result == 0) - return result; - - // Reset iovec counter. - iovcnt = 0; - } - } - - // Select the next message block in the chain. - current_message_block = current_message_block->cont (); - } - - // Selection of the next message block chain. - message_block = message_block->next (); - } - - // Check for remaining buffers to be sent. This will happen when - // ACE_IOV_MAX is not a multiple of the number of message blocks. - if (iovcnt != 0) - { - size_t current_transfer = 0; - - ssize_t const result = ACE::sendv_n (handle, - iov, - iovcnt, - timeout, - ¤t_transfer); - - // Add to total bytes transferred. - bytes_transferred += current_transfer; - - // Errors. - if (result == -1 || result == 0) - { - return result; - } - } - - // Return total bytes transferred. - return ACE_Utils::truncate_cast (bytes_transferred); -} - -ssize_t -ACE::readv_n (ACE_HANDLE handle, - iovec *iov, - int iovcnt, - size_t *bt) -{ - size_t temp; - size_t &bytes_transferred = bt == 0 ? temp : *bt; - bytes_transferred = 0; - - for (int s = 0; - s < iovcnt; - ) - { - ssize_t n = ACE_OS::readv (handle, - iov + s, - iovcnt - s); - - if (n == -1 || n == 0) - return n; - - for (bytes_transferred += n; - s < iovcnt - && n >= static_cast (iov[s].iov_len); - s++) - n -= iov[s].iov_len; - - if (n != 0) - { - char *base = reinterpret_cast (iov[s].iov_base); - iov[s].iov_base = base + n; - // This blind cast is safe because n < iov_len, after above loop. - iov[s].iov_len = iov[s].iov_len - static_cast (n); - } - } - - return ACE_Utils::truncate_cast (bytes_transferred); -} - -ssize_t -ACE::writev_n (ACE_HANDLE handle, - const iovec *i, - int iovcnt, - size_t *bt) -{ - size_t temp; - size_t &bytes_transferred = bt == 0 ? temp : *bt; - bytes_transferred = 0; - - iovec *iov = const_cast (i); - - for (int s = 0; - s < iovcnt; - ) - { - ssize_t n = ACE_OS::writev (handle, - iov + s, - iovcnt - s); - - if (n == -1 || n == 0) - { - return n; - } - - for (bytes_transferred += n; - s < iovcnt - && n >= static_cast (iov[s].iov_len); - s++) - n -= iov[s].iov_len; - - if (n != 0) - { - char *base = reinterpret_cast (iov[s].iov_base); - iov[s].iov_base = base + n; - // This blind cast is safe because n < iov_len, after above loop. - iov[s].iov_len = iov[s].iov_len - static_cast (n); - } - } - - return ACE_Utils::truncate_cast (bytes_transferred); -} - -int -ACE::handle_ready (ACE_HANDLE handle, - const ACE_Time_Value *timeout, - int read_ready, - int write_ready, - int exception_ready) -{ -#if defined (ACE_HAS_POLL) - ACE_UNUSED_ARG (exception_ready); - - struct pollfd fds; - - fds.fd = handle; - fds.events = read_ready ? POLLIN : 0; - - if( write_ready ) - { - fds.events |= POLLOUT; - } - - fds.revents = 0; - - int const result = ACE_OS::poll (&fds, 1, timeout); -#else - ACE_Handle_Set handle_set; - handle_set.set_bit (handle); - - // Wait for data or for the timeout to elapse. - int select_width = 0; -#if !defined (ACE_WIN32) - select_width = int (handle) + 1; -# endif /* ACE_WIN64 */ - int result = ACE_OS::select (select_width, - read_ready ? handle_set.fdset () : 0, // read_fds. - write_ready ? handle_set.fdset () : 0, // write_fds. - exception_ready ? handle_set.fdset () : 0, // exception_fds. - timeout); - -#endif /* ACE_HAS_POLL */ - switch (result) - { - case 0: // Timer expired. - errno = ETIME; - /* FALLTHRU */ - case -1: // we got here directly - select() returned -1. - return -1; - case 1: // Handle has data. - /* FALLTHRU */ - default: // default is case result > 0; return a - // ACE_ASSERT (result == 1); - return result; - } -} - -int -ACE::enter_recv_timedwait (ACE_HANDLE handle, - const ACE_Time_Value *timeout, - int &val) -{ - int const result = ACE::handle_read_ready (handle, timeout); - - if (result == -1) - return -1; - - ACE::record_and_set_non_blocking_mode (handle, val); - - return result; -} - -int -ACE::enter_send_timedwait (ACE_HANDLE handle, - const ACE_Time_Value *timeout, - int &val) -{ - int const result = ACE::handle_write_ready (handle, timeout); - - if (result == -1) - return -1; - - ACE::record_and_set_non_blocking_mode (handle, val); - - return result; -} - -void -ACE::record_and_set_non_blocking_mode (ACE_HANDLE handle, int &val) -{ - // We need to record whether we are already *in* nonblocking mode, - // so that we can correctly reset the state when we're done. - val = ACE::get_flags (handle); - - if (ACE_BIT_DISABLED (val, ACE_NONBLOCK)) - // Set the handle into non-blocking mode if it's not already in - // it. - ACE::set_flags (handle, ACE_NONBLOCK); -} - -void -ACE::restore_non_blocking_mode (ACE_HANDLE handle, int val) -{ - if (ACE_BIT_DISABLED (val, ACE_NONBLOCK)) - { - // Save/restore errno. - ACE_Errno_Guard error (errno); - // Only disable ACE_NONBLOCK if we weren't in non-blocking mode - // originally. - ACE::clr_flags (handle, ACE_NONBLOCK); - } -} - -/// Format buffer into printable format. This is useful for debugging. -/// Portions taken from mdump by J.P. Knight (J.P.Knight@lut.ac.uk) -/// Modifications by Todd Montgomery. -size_t -ACE::format_hexdump (const char *buffer, - size_t size, - ACE_TCHAR *obuf, - size_t obuf_sz) -{ - ACE_TRACE ("ACE::format_hexdump"); - - u_char c; - ACE_TCHAR textver[16 + 1]; - - // We can fit 16 bytes output in text mode per line, 4 chars per byte. - size_t maxlen = (obuf_sz / 68) * 16; - - if (size > maxlen) - size = maxlen; - - size_t i; - - size_t const lines = size / 16; - for (i = 0; i < lines; i++) - { - size_t j; - - for (j = 0 ; j < 16; j++) - { - c = (u_char) buffer[(i << 4) + j]; // or, buffer[i*16+j] - ACE_OS::sprintf (obuf, - ACE_TEXT ("%02x "), - c); - obuf += 3; - if (j == 7) - { - ACE_OS::sprintf (obuf, - ACE_TEXT (" ")); - ++obuf; - } - textver[j] = ACE_OS::ace_isprint (c) ? c : u_char ('.'); - } - - textver[j] = 0; - - ACE_OS::sprintf (obuf, -#if !defined (ACE_WIN32) && defined (ACE_USES_WCHAR) - ACE_TEXT (" %ls\n"), -#else - ACE_TEXT (" %s\n"), -#endif - textver); - - while (*obuf != '\0') - ++obuf; - } - - if (size % 16) - { - for (i = 0 ; i < size % 16; i++) - { - c = (u_char) buffer[size - size % 16 + i]; - ACE_OS::sprintf (obuf, - ACE_TEXT ("%02x "), - c); - obuf += 3; - if (i == 7) - { - ACE_OS::sprintf (obuf, - ACE_TEXT (" ")); - ++obuf; - } - textver[i] = ACE_OS::ace_isprint (c) ? c : u_char ('.'); - } - - for (i = size % 16; i < 16; i++) - { - ACE_OS::sprintf (obuf, - ACE_TEXT (" ")); - obuf += 3; - if (i == 7) - { - ACE_OS::sprintf (obuf, - ACE_TEXT (" ")); - ++obuf; - } - textver[i] = ' '; - } - - textver[i] = 0; - ACE_OS::sprintf (obuf, -#if !defined (ACE_WIN32) && defined (ACE_USES_WCHAR) - ACE_TEXT (" %ls\n"), -#else - ACE_TEXT (" %s\n"), -#endif - textver); - } - return size; -} - -// Returns the current timestamp in the form -// "hour:minute:second:microsecond." The month, day, and year are -// also stored in the beginning of the date_and_time array -// using ISO-8601 format. - -ACE_TCHAR * -ACE::timestamp (ACE_TCHAR date_and_time[], - size_t date_and_timelen, - bool return_pointer_to_first_digit) -{ - return ACE::timestamp (ACE_Time_Value::zero, - date_and_time, - date_and_timelen, - return_pointer_to_first_digit); -} - -// Returns the given timestamp in the form -// "hour:minute:second:microsecond." The month, day, and year are -// also stored in the beginning of the date_and_time array -// using ISO-8601 format. -// 012345678901234567890123456 -// 2010-12-02 12:56:00.123456 - -ACE_TCHAR * -ACE::timestamp (const ACE_Time_Value& time_value, - ACE_TCHAR date_and_time[], - size_t date_and_timelen, - bool return_pointer_to_first_digit) -{ - //ACE_TRACE ("ACE::timestamp"); - - // This magic number is from the formatting statement - // farther down this routine. - if (date_and_timelen < 27) - { - errno = EINVAL; - return 0; - } - - ACE_Time_Value cur_time = - (time_value == ACE_Time_Value::zero) ? - ACE_Time_Value (ACE_OS::gettimeofday ()) : time_value; - time_t secs = cur_time.sec (); - struct tm tms; - ACE_OS::localtime_r (&secs, &tms); - ACE_OS::snprintf (date_and_time, - date_and_timelen, - ACE_TEXT ("%4.4d-%2.2d-%2.2d %2.2d:%2.2d:%2.2d.%06ld"), - tms.tm_year + 1900, - tms.tm_mon + 1, - tms.tm_mday, - tms.tm_hour, - tms.tm_min, - tms.tm_sec, - static_cast (cur_time.usec())); - date_and_time[date_and_timelen - 1] = '\0'; - return &date_and_time[10 + (return_pointer_to_first_digit != 0)]; -} - -// This function rounds the request to a multiple of the page size. - -size_t -ACE::round_to_pagesize (size_t len) -{ - ACE_TRACE ("ACE::round_to_pagesize"); - - if (ACE::pagesize_ == 0) - ACE::pagesize_ = ACE_OS::getpagesize (); - - return (len + (ACE::pagesize_ - 1)) & ~(ACE::pagesize_ - 1); -} - -size_t -ACE::round_to_allocation_granularity (size_t len) -{ - ACE_TRACE ("ACE::round_to_allocation_granularity"); - - if (ACE::allocation_granularity_ == 0) - ACE::allocation_granularity_ = ACE_OS::allocation_granularity (); - - return (len + (ACE::allocation_granularity_ - 1)) & ~(ACE::allocation_granularity_ - 1); -} - -ACE_HANDLE -ACE::handle_timed_complete (ACE_HANDLE h, - const ACE_Time_Value *timeout, - int is_tli) -{ - ACE_TRACE ("ACE::handle_timed_complete"); - -#if !defined (ACE_WIN32) && defined (ACE_HAS_POLL) - - struct pollfd fds; - - fds.fd = h; - fds.events = POLLIN | POLLOUT; - fds.revents = 0; - -#else - ACE_Handle_Set rd_handles; - ACE_Handle_Set wr_handles; - rd_handles.set_bit (h); - wr_handles.set_bit (h); -#endif /* !ACE_WIN32 && ACE_HAS_POLL */ - -#if defined (ACE_WIN32) - // Winsock is different - it sets the exception bit for failed connect, - // unlike other platforms, where the write bit is set for both success - // and fail. - ACE_Handle_Set ex_handles; - ex_handles.set_bit (h); -#endif /* ACE_WIN32 */ - - bool need_to_check = false; - bool known_failure = false; - -#if defined (ACE_WIN32) - int n = ACE_OS::select (0, // Ignored on Windows: int (h) + 1, - 0, - wr_handles, - ex_handles, - timeout); -#else -# if defined (ACE_HAS_POLL) - - int n = ACE_OS::poll (&fds, 1, timeout); - -# else - int n = 0; - if (is_tli) - n = ACE_OS::select (int (h) + 1, - rd_handles, - wr_handles, - 0, - timeout); - else - n = ACE_OS::select (int (h) + 1, - 0, - wr_handles, - 0, - timeout); -# endif /* ACE_HAS_POLL */ -#endif /* ACE_WIN32 */ - - // If we failed to connect within the time period allocated by the - // caller, then we fail (e.g., the remote host might have been too - // busy to accept our call). - if (n <= 0) - { - if (n == 0 && timeout != 0) - errno = ETIME; - return ACE_INVALID_HANDLE; - } - - // On Windows, a ready-for-write handle is successfully connected, and - // ready-for-exception is a failure. On fails, we need to grab the error - // code via getsockopt. - // On BSD sockets using select(), the handle becomes writable on - // completion either success or fail, so if the select() does not time - // out, we need to check for success/fail. - // It is believed that TLI sockets use the readable=fail, writeable=success - // but that hasn't been as well tested. -#if defined (ACE_WIN32) - ACE_UNUSED_ARG (is_tli); - - // On Win32, ex_handle set indicates a failure. We'll do the check - // to try and get an errno value, but the connect failed regardless of - // what getsockopt says about the error. - if (ex_handles.is_set (h)) - { - need_to_check = true; - known_failure = true; - } -#else - if (is_tli) -# if defined (ACE_HAS_POLL) - need_to_check = (fds.revents & POLLIN) && !(fds.revents & POLLOUT); -# else - need_to_check = rd_handles.is_set (h) && !wr_handles.is_set (h); -# endif /* ACE_HAS_POLL */ - - else -# if defined (ACE_HAS_POLL) - { - // The "official" bit for failed connect is POLLIN. However, POLLERR - // is often set and there are occasional cases seen with some kernels - // where only POLLERR is set on a failed connect. - need_to_check = (fds.revents & POLLIN) || (fds.revents & POLLERR); - known_failure = (fds.revents & POLLERR); - } -# else - need_to_check = true; -# endif /* ACE_HAS_POLL */ -#endif /* ACE_WIN32 */ - - if (need_to_check) - { -#if defined (SOL_SOCKET) && defined (SO_ERROR) - int sock_err = 0; - int sock_err_len = sizeof (sock_err); - int sockopt_ret = ACE_OS::getsockopt (h, SOL_SOCKET, SO_ERROR, - (char *)&sock_err, &sock_err_len); - if (sockopt_ret < 0) - { - h = ACE_INVALID_HANDLE; - } - - if (sock_err != 0 || known_failure) - { - h = ACE_INVALID_HANDLE; - errno = sock_err; - } -#else - char dummy; - - // The following recv() won't block provided that the - // ACE_NONBLOCK flag has not been turned off . - n = ACE::recv (h, &dummy, 1, MSG_PEEK); - - // If no data was read/peeked at, check to see if it's because - // of a non-connected socket (and therefore an error) or there's - // just no data yet. - if (n <= 0) - { - if (n == 0) - { - errno = ECONNREFUSED; - h = ACE_INVALID_HANDLE; - } - else if (errno != EWOULDBLOCK && errno != EAGAIN) - h = ACE_INVALID_HANDLE; - } -#endif - } - - // 1. The HANDLE is ready for writing and doesn't need to be checked or - // 2. recv() returned an indication of the state of the socket - if there is - // either data present, or a recv is legit but there's no data yet, - // the connection was successfully established. - return h; -} - -// Wait up to amount of time to accept a connection. - -int -ACE::handle_timed_accept (ACE_HANDLE listener, - ACE_Time_Value *timeout, - bool restart) -{ - ACE_TRACE ("ACE::handle_timed_accept"); - // Make sure we don't bomb out on erroneous values. - if (listener == ACE_INVALID_HANDLE) - return -1; - -#if defined (ACE_HAS_POLL) - - struct pollfd fds; - - fds.fd = listener; - fds.events = POLLIN; - fds.revents = 0; - -#else - // Use the select() implementation rather than poll(). - ACE_Handle_Set rd_handle; - rd_handle.set_bit (listener); -#endif /* ACE_HAS_POLL */ - - // We need a loop here if is enabled. - - for (;;) - { -#if defined (ACE_HAS_POLL) - - int n = ACE_OS::poll (&fds, 1, timeout); - -#else - int select_width = 0; -# if !defined (ACE_WIN32) - select_width = int (listener) + 1; -# endif /* ACE_WIN32 */ - int n = ACE_OS::select (select_width, - rd_handle, 0, 0, - timeout); -#endif /* ACE_HAS_POLL */ - - switch (n) - { - case -1: - if (errno == EINTR && restart) - continue; - else - return -1; - /* NOTREACHED */ - case 0: - if (timeout != 0 && *timeout == ACE_Time_Value::zero) - errno = EWOULDBLOCK; - else - errno = ETIMEDOUT; - return -1; - /* NOTREACHED */ - case 1: - return 0; - /* NOTREACHED */ - default: - errno = EINVAL; - return -1; - /* NOTREACHED */ - } - } -} - -// Make the current process a UNIX daemon. This is based on Stevens -// code from APUE. - -int -ACE::daemonize (const ACE_TCHAR pathname[], - bool close_all_handles, - const ACE_TCHAR program_name[]) -{ - ACE_TRACE ("ACE::daemonize"); -#if !defined (ACE_LACKS_FORK) - pid_t pid = ACE_OS::fork (); - - if (pid == -1) - return -1; - else if (pid != 0) - ACE_OS::exit (0); // Parent exits. - - // 1st child continues. - ACE_OS::setsid (); // Become session leader. - - ACE_OS::signal (SIGHUP, SIG_IGN); - - pid = ACE_OS::fork (program_name); - - if (pid != 0) - ACE_OS::exit (0); // First child terminates. - - // Second child continues. - - if (pathname != 0) - // change working directory. - ACE_OS::chdir (pathname); - - ACE_OS::umask (0); // clear our file mode creation mask. - - // Close down the I/O handles. - if (close_all_handles) - { - for (int i = ACE::max_handles () - 1; i >= 0; i--) - ACE_OS::close (i); - - int fd = ACE_OS::open ("/dev/null", O_RDWR, 0); - if (fd != -1) - { - ACE_OS::dup2 (fd, ACE_STDIN); - ACE_OS::dup2 (fd, ACE_STDOUT); - ACE_OS::dup2 (fd, ACE_STDERR); - - if (fd > ACE_STDERR) - ACE_OS::close (fd); - } - } - - return 0; -#else - ACE_UNUSED_ARG (pathname); - ACE_UNUSED_ARG (close_all_handles); - ACE_UNUSED_ARG (program_name); - - ACE_NOTSUP_RETURN (-1); -#endif /* ACE_LACKS_FORK */ -} - -pid_t -ACE::fork (const ACE_TCHAR *program_name, - int avoid_zombies) -{ - if (avoid_zombies == 0) - return ACE_OS::fork (program_name); - else - { - // This algorithm is adapted from an example in the Stevens book - // "Advanced Programming in the Unix Environment" and an item in - // Andrew Gierth's Unix Programming FAQ. It creates an orphan - // process that's inherited by the init process; init cleans up - // when the orphan process terminates. - // - // Another way to avoid zombies is to ignore or catch the - // SIGCHLD signal; we don't use that approach here. - - pid_t pid = ACE_OS::fork (); - if (pid == 0) - { - // The child process forks again to create a grandchild. - switch (ACE_OS::fork (program_name)) - { - case 0: // grandchild returns 0. - return 0; - case -1: // assumes all errnos are < 256 - ACE_OS::_exit (errno); - default: // child terminates, orphaning grandchild - ACE_OS::_exit (0); - } - } - - // Parent process waits for child to terminate. - ACE_exitcode status; - if (pid < 0 || ACE_OS::waitpid (pid, &status, 0) < 0) - return -1; - - // child terminated by calling exit()? - if (WIFEXITED ((status))) - { - // child terminated normally? - if (WEXITSTATUS ((status)) == 0) - return 1; - else - errno = WEXITSTATUS ((status)); - } - else - // child didn't call exit(); perhaps it received a signal? - errno = EINTR; - - return -1; - } -} - -int -ACE::max_handles (void) -{ - ACE_TRACE ("ACE::max_handles"); -#if defined (RLIMIT_NOFILE) && !defined (ACE_LACKS_RLIMIT) - rlimit rl; - int const r = ACE_OS::getrlimit (RLIMIT_NOFILE, &rl); -# if !defined (RLIM_INFINITY) - if (r == 0) - return rl.rlim_cur; -# else - if (r == 0 && rl.rlim_cur != RLIM_INFINITY) - return rl.rlim_cur; - // If == RLIM_INFINITY, fall through to the ACE_LACKS_RLIMIT sections -# endif /* RLIM_INFINITY */ -#endif /* RLIMIT_NOFILE && !ACE_LACKS_RLIMIT */ - -#if defined (_SC_OPEN_MAX) - return static_cast (ACE_OS::sysconf (_SC_OPEN_MAX)); -#elif defined (FD_SETSIZE) - return FD_SETSIZE; -#else - ACE_NOTSUP_RETURN (-1); -#endif /* _SC_OPEN_MAX */ -} - -// Set the number of currently open handles in the process. -// -// If NEW_LIMIT == -1 set the limit to the maximum allowable. -// Otherwise, set it to be the value of NEW_LIMIT. - -int -ACE::set_handle_limit (int new_limit, - int increase_limit_only) -{ - ACE_TRACE ("ACE::set_handle_limit"); - int cur_limit = ACE::max_handles (); - int max_limit = cur_limit; - - if (cur_limit == -1) - return -1; - -#if !defined (ACE_LACKS_RLIMIT) && defined (RLIMIT_NOFILE) - struct rlimit rl; - - ACE_OS::memset ((void *) &rl, 0, sizeof rl); - int r = ACE_OS::getrlimit (RLIMIT_NOFILE, &rl); - if (r == 0) - max_limit = rl.rlim_max; -#endif /* ACE_LACKS_RLIMIT */ - - if (new_limit == -1) - new_limit = max_limit; - - if (new_limit < 0) - { - errno = EINVAL; - return -1; - } - else if (new_limit > cur_limit) - { - // Increase the limit. -#if !defined (ACE_LACKS_RLIMIT) && defined (RLIMIT_NOFILE) - rl.rlim_cur = new_limit; - return ACE_OS::setrlimit (RLIMIT_NOFILE, &rl); -#elif !defined (RLIMIT_NOFILE) - return 0; -#else - // Must return EINVAL errno. - ACE_NOTSUP_RETURN (-1); -#endif /* ACE_LACKS_RLIMIT */ - } - else if (increase_limit_only == 0) - { - // Decrease the limit. -#if !defined (ACE_LACKS_RLIMIT) && defined (RLIMIT_NOFILE) - rl.rlim_cur = new_limit; - return ACE_OS::setrlimit (RLIMIT_NOFILE, &rl); -#else - // We give a chance to platforms without RLIMIT to work. - // Instead of ACE_NOTSUP_RETURN (0), just return 0 because - // new_limit is <= cur_limit, so it's a no-op. - return 0; -#endif /* ACE_LACKS_RLIMIT */ - } - - return 0; -} - -// Euclid's greatest common divisor algorithm. -u_long -ACE::gcd (u_long x, u_long y) -{ - while (y != 0) - { - u_long r = x % y; - x = y; - y = r; - } - - return x; -} - - -// Calculates the minimum enclosing frame size for the given values. -u_long -ACE::minimum_frame_size (u_long period1, u_long period2) -{ - // if one of the periods is zero, treat it as though it as - // uninitialized and return the other period as the frame size - if (0 == period1) - { - return period2; - } - if (0 == period2) - { - return period1; - } - - // if neither is zero, find the greatest common divisor of the two periods - u_long greatest_common_divisor = ACE::gcd (period1, period2); - - // explicitly consider cases to reduce risk of possible overflow errors - if (greatest_common_divisor == 1) - { - // periods are relative primes: just multiply them together - return period1 * period2; - } - else if (greatest_common_divisor == period1) - { - // the first period divides the second: return the second - return period2; - } - else if (greatest_common_divisor == period2) - { - // the second period divides the first: return the first - return period1; - } - else - { - // the current frame size and the entry's effective period - // have a non-trivial greatest common divisor: return the - // product of factors divided by those in their gcd. - return (period1 * period2) / greatest_common_divisor; - } -} - - -u_long -ACE::is_prime (const u_long n, - const u_long min_factor, - const u_long max_factor) -{ - if (n > 3) - for (u_long factor = min_factor; - factor <= max_factor; - ++factor) - if (n / factor * factor == n) - return factor; - - return 0; -} - -const ACE_TCHAR * -ACE::sock_error (int error) -{ -#if defined (ACE_WIN32) - static ACE_TCHAR unknown_msg[64]; - - switch (error) - { - case WSAVERNOTSUPPORTED: - return ACE_TEXT ("version of WinSock not supported"); - /* NOTREACHED */ - case WSASYSNOTREADY: - return ACE_TEXT ("WinSock not present or not responding"); - /* NOTREACHED */ - case WSAEINVAL: - return ACE_TEXT ("app version not supported by DLL"); - /* NOTREACHED */ - case WSAHOST_NOT_FOUND: - return ACE_TEXT ("Authoritive: Host not found"); - /* NOTREACHED */ - case WSATRY_AGAIN: - return ACE_TEXT ("Non-authoritive: host not found or server failure"); - /* NOTREACHED */ - case WSANO_RECOVERY: - return ACE_TEXT ("Non-recoverable: refused or not implemented"); - /* NOTREACHED */ - case WSANO_DATA: - return ACE_TEXT ("Valid name, no data record for type"); - /* NOTREACHED */ - /* - case WSANO_ADDRESS: - return "Valid name, no MX record"; - */ - case WSANOTINITIALISED: - return ACE_TEXT ("WSA Startup not initialized"); - /* NOTREACHED */ - case WSAENETDOWN: - return ACE_TEXT ("Network subsystem failed"); - /* NOTREACHED */ - case WSAEINPROGRESS: - return ACE_TEXT ("Blocking operation in progress"); - /* NOTREACHED */ - case WSAEINTR: - return ACE_TEXT ("Blocking call cancelled"); - /* NOTREACHED */ - case WSAEAFNOSUPPORT: - return ACE_TEXT ("address family not supported"); - /* NOTREACHED */ - case WSAEMFILE: - return ACE_TEXT ("no file handles available"); - /* NOTREACHED */ - case WSAENOBUFS: - return ACE_TEXT ("no buffer space available"); - /* NOTREACHED */ - case WSAEPROTONOSUPPORT: - return ACE_TEXT ("specified protocol not supported"); - /* NOTREACHED */ - case WSAEPROTOTYPE: - return ACE_TEXT ("protocol wrong type for this socket"); - /* NOTREACHED */ - case WSAESOCKTNOSUPPORT: - return ACE_TEXT ("socket type not supported for address family"); - /* NOTREACHED */ - case WSAENOTSOCK: - return ACE_TEXT ("handle is not a socket"); - /* NOTREACHED */ - case WSAEWOULDBLOCK: - return ACE_TEXT ("resource temporarily unavailable"); - /* NOTREACHED */ - case WSAEADDRINUSE: - return ACE_TEXT ("address already in use"); - /* NOTREACHED */ - case WSAECONNABORTED: - return ACE_TEXT ("connection aborted"); - /* NOTREACHED */ - case WSAECONNRESET: - return ACE_TEXT ("connection reset"); - /* NOTREACHED */ - case WSAENOTCONN: - return ACE_TEXT ("not connected"); - /* NOTREACHED */ - case WSAETIMEDOUT: - return ACE_TEXT ("connection timed out"); - /* NOTREACHED */ - case WSAECONNREFUSED: - return ACE_TEXT ("connection refused"); - /* NOTREACHED */ - case WSAEHOSTDOWN: - return ACE_TEXT ("host down"); - /* NOTREACHED */ - case WSAEHOSTUNREACH: - return ACE_TEXT ("host unreachable"); - /* NOTREACHED */ - case WSAEADDRNOTAVAIL: - return ACE_TEXT ("address not available"); - /* NOTREACHED */ - case WSAEISCONN: - return ACE_TEXT ("socket is already connected"); - /* NOTREACHED */ - case WSAENETRESET: - return ACE_TEXT ("network dropped connection on reset"); - /* NOTREACHED */ - case WSAEMSGSIZE: - return ACE_TEXT ("message too long"); - /* NOTREACHED */ - case WSAENETUNREACH: - return ACE_TEXT ("network is unreachable"); - /* NOTREACHED */ - case WSAEFAULT: - return ACE_TEXT ("bad address"); - /* NOTREACHED */ - case WSAEDISCON: - return ACE_TEXT ("graceful shutdown in progress"); - /* NOTREACHED */ - case WSAEACCES: - return ACE_TEXT ("permission denied"); - /* NOTREACHED */ - case WSAESHUTDOWN: - return ACE_TEXT ("cannot send after socket shutdown"); - /* NOTREACHED */ - case WSAEPROCLIM: - return ACE_TEXT ("too many processes"); - /* NOTREACHED */ - case WSAEALREADY: - return ACE_TEXT ("operation already in progress"); - /* NOTREACHED */ - case WSAEPFNOSUPPORT: - return ACE_TEXT ("protocol family not supported"); - /* NOTREACHED */ - case WSAENOPROTOOPT: - return ACE_TEXT ("bad protocol option"); - /* NOTREACHED */ - case WSATYPE_NOT_FOUND: - return ACE_TEXT ("class type not found"); - /* NOTREACHED */ - case WSAEOPNOTSUPP: - return ACE_TEXT ("operation not supported"); - /* NOTREACHED */ - case WSAEDESTADDRREQ: - return ACE_TEXT ("destination address required"); - /* NOTREACHED */ - default: - ACE_OS::sprintf (unknown_msg, ACE_TEXT ("unknown error: %d"), error); - return unknown_msg; - /* NOTREACHED */ - } -#else - ACE_UNUSED_ARG (error); - ACE_NOTSUP_RETURN (0); -#endif /* ACE_WIN32 */ -} - -bool -ACE::is_sock_error (int error) -{ -#if defined (ACE_WIN32) - switch (error) - { - case WSAVERNOTSUPPORTED: - case WSASYSNOTREADY: - case WSAEINVAL: - case WSAHOST_NOT_FOUND: - case WSATRY_AGAIN: - case WSANO_RECOVERY: - case WSANO_DATA: - /* - case WSANO_ADDRESS: - */ - case WSANOTINITIALISED: - case WSAENETDOWN: - case WSAEINPROGRESS: - case WSAEINTR: - case WSAEAFNOSUPPORT: - case WSAEMFILE: - case WSAENOBUFS: - case WSAEPROTONOSUPPORT: - case WSAEPROTOTYPE: - case WSAESOCKTNOSUPPORT: - case WSAENOTSOCK: - case WSAEWOULDBLOCK: - case WSAEADDRINUSE: - case WSAECONNABORTED: - case WSAECONNRESET: - case WSAENOTCONN: - case WSAETIMEDOUT: - case WSAECONNREFUSED: - case WSAEHOSTDOWN: - case WSAEHOSTUNREACH: - case WSAEADDRNOTAVAIL: - case WSAEISCONN: - case WSAENETRESET: - case WSAEMSGSIZE: - case WSAENETUNREACH: - case WSAEFAULT: - case WSAEDISCON: - case WSAEACCES: - case WSAESHUTDOWN: - case WSAEPROCLIM: - case WSAEALREADY: - case WSAEPFNOSUPPORT: - case WSAENOPROTOOPT: - case WSATYPE_NOT_FOUND: - case WSAEOPNOTSUPP: - return true; - } -#else - ACE_UNUSED_ARG (error); -#endif /* ACE_WIN32 */ - return false; -} - -char * -ACE::strndup (const char *str, size_t n) -{ - const char *t = str; - size_t len; - - // Figure out how long this string is (remember, it might not be - // NUL-terminated). - - for (len = 0; - len < n && *t++ != '\0'; - len++) - continue; - - char *s; - ACE_ALLOCATOR_RETURN (s, - (char *) ACE_OS::malloc (len + 1), - 0); - return ACE_OS::strsncpy (s, str, len + 1); -} - -#if defined (ACE_HAS_WCHAR) -wchar_t * -ACE::strndup (const wchar_t *str, size_t n) -{ - const wchar_t *t = str; - size_t len; - - // Figure out how long this string is (remember, it might not be - // NUL-terminated). - - for (len = 0; - len < n && *t++ != '\0'; - len++) - continue; - - wchar_t *s; - ACE_ALLOCATOR_RETURN (s, - static_cast ( - ACE_OS::malloc ((len + 1) * sizeof (wchar_t))), - 0); - return ACE_OS::strsncpy (s, str, len + 1); -} -#endif /* ACE_HAS_WCHAR */ - -char * -ACE::strnnew (const char *str, size_t n) -{ - const char *t = str; - size_t len; - - // Figure out how long this string is (remember, it might not be - // NUL-terminated). - - for (len = 0; - len < n && *t++ != L'\0'; - len++) - continue; - - char *s; - ACE_NEW_RETURN (s, - char[len + 1], - 0); - return ACE_OS::strsncpy (s, str, len + 1); -} - -#if defined (ACE_HAS_WCHAR) -wchar_t * -ACE::strnnew (const wchar_t *str, size_t n) -{ - const wchar_t *t = str; - size_t len; - - // Figure out how long this string is (remember, it might not be - // NUL-terminated). - - for (len = 0; - len < n && *t++ != ACE_TEXT_WIDE ('\0'); - len++) - continue; - - wchar_t *s; - ACE_NEW_RETURN (s, - wchar_t[len + 1], - 0); - return ACE_OS::strsncpy (s, str, len + 1); -} -#endif /* ACE_HAS_WCHAR */ - -const char * -ACE::strend (const char *s) -{ - while (*s++ != '\0') - continue; - - return s; -} - -#if defined ACE_HAS_WCHAR -const wchar_t * -ACE::strend (const wchar_t *s) -{ - while (*s++ != ACE_TEXT_WIDE ('\0')) - continue; - - return s; -} -#endif - -char * -ACE::strnew (const char *s) -{ - if (s == 0) - return 0; - char *t = 0; - ACE_NEW_RETURN (t, - char [ACE_OS::strlen (s) + 1], - 0); - return ACE_OS::strcpy (t, s); -} - -#if defined (ACE_HAS_WCHAR) -wchar_t * -ACE::strnew (const wchar_t *s) -{ - if (s == 0) - return 0; - wchar_t *t = 0; - ACE_NEW_RETURN (t, - wchar_t[ACE_OS::strlen (s) + 1], - 0); - return ACE_OS::strcpy (t, s); -} -#endif /* ACE_HAS_WCHAR */ - -// helper functions for ACE::wild_match() -namespace -{ - - inline bool equal_char (char a, char b, bool case_sensitive) - { - if (case_sensitive) - return a == b; - return ACE_OS::ace_tolower (a) == ACE_OS::ace_tolower (b); - } - - // precond: *p == '[' start of char class - // postcond: *p == ']' end of the char class - inline bool equal_class (char s, const char *&p, bool case_sensitive) - { - ++p; - bool negate = false; - if (*p == '!') - { - negate = true; - ++p; - } - // ] and - are regular in 1st position - for (bool first = true; *p && (first || *p != ']'); ++p) - { - if (!first && *p == '-' && p[1] != ']') - { - if (!p[1] || p[1] <= p[-1]) // invalid range - { - continue; - } - // Since we are in the POSIX locale, only the basic ASCII - // characters are allowed as the range endpoints. These characters - // are the same values in both signed and unsigned chars so we - // don't have to account for any "pathological cases." - for (char range = static_cast (p[-1] + 1); range <= p[1]; ++range) - { - if (equal_char (s, range, case_sensitive)) - { - while (*++p != ']') {} - return !negate; - } - } - ++p; // consume the character 1 past the - - } - else if (equal_char (s, *p, case_sensitive)) - { - while (*++p != ']') {} - return !negate; - } - first = false; - } - return negate; - } -} - -bool -ACE::wild_match(const char *str, const char *pat, bool case_sensitive, - bool character_classes) -{ - if (str == pat) - return true; - if (pat == 0 || str == 0) - return false; - - bool star = false, escape = false; - const char *s = str; - const char *p = pat; - while (*s != '\0') - { - if (!escape && *p == '\\') - { - ++p; - escape = true; - } - else if (!escape && *p == '*') - { - star = true; - pat = p; - while (*++pat == '*') {} - - if (*pat == '\0') - return true; - p = pat; - } - else if (!escape && *p == '?') - { - ++s; - ++p; - } - else if (!escape && character_classes && *p == '[') - { - if (equal_class (*s, p, case_sensitive)) - { - ++p; - } - else - { - if (!star) - return false; - p = pat; - } - ++s; - } - else if (!equal_char (*s, *p, case_sensitive)) - { - if (!star) - return false; - ++s; - p = pat; - escape = false; - } - else - { - ++s; - ++p; - escape = false; - } - } - if (*p == '*') - while (*++p == '*') {} - - return *p == '\0'; -} - -// Close versioned namespace, if enabled by the user. -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/ACE.h b/modules/worldengine/deps/acelite/ace/ACE.h deleted file mode 100644 index 370bd36bb5..0000000000 --- a/modules/worldengine/deps/acelite/ace/ACE.h +++ /dev/null @@ -1,884 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file ACE.h - * - * This file contains value added ACE functions that extend the - * behavior of the UNIX and Win32 OS calls. - * - * All these ACE static functions are consolidated in a single place - * in order to manage the namespace better. These functions are put - * here rather than in @c ACE_OS in order to separate concerns. - * - * @author Douglas C. Schmidt - */ -//============================================================================= - -#ifndef ACE_ACE_H -#define ACE_ACE_H - -#include /**/ "ace/pre.h" - -#include /**/ "ace/config-lite.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Basic_Types.h" -#include "ace/Default_Constants.h" - -#if defined (ACE_EXPORT_MACRO) -# undef ACE_EXPORT_MACRO -#endif -#define ACE_EXPORT_MACRO ACE_Export - -// Open versioned namespace, if enabled by the user. -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -// Forward declarations. -class ACE_Time_Value; -class ACE_Message_Block; -class ACE_Handle_Set; - -/** - * @namespace ACE - * - * @brief The namespace containing the ACE framework itself. - * - * The ACE namespace contains all types (classes, structures, - * typedefs, etc), and global functions and variables in the ACE - * framework. - */ -namespace ACE -{ - // = ACE version information. - /// e.g., the "5" in ACE 5.1.12. - extern ACE_Export u_int major_version (void); - - /// e.g., the "1" in ACE 5.1.12. - extern ACE_Export u_int minor_version (void); - - /// e.g., the "12" in ACE 5.1.12. - /// Returns 0 for "stable" (non-beta) releases. - extern ACE_Export u_int beta_version (void); - - // = C++ compiler version information. - /// E.g., the "SunPro C++" in SunPro C++ 4.32.0 - extern ACE_Export const ACE_TCHAR * compiler_name (void); - - /// E.g., the "4" in SunPro C++ 4.32.0 - extern ACE_Export u_int compiler_major_version (void); - - /// E.g., the "32" in SunPro C++ 4.32.0 - extern ACE_Export u_int compiler_minor_version (void); - - /// E.g., the "0" in SunPro C++ 4.32.0 - extern ACE_Export u_int compiler_beta_version (void); - - /// Check if error indicates the process being out of handles (file - /// descriptors). - extern ACE_Export int out_of_handles (int error); - - /// Simple wildcard matching function supporting '*' and '?' - /// return true if string s matches pattern. - /// If @a character_classes is true, '[' is treated as a wildcard character - /// as described in the fnmatch() POSIX API. The following POSIX "bracket - /// expression" features are not implemented: collating symbols, equivalence - /// class expressions, and character class expressions. The POSIX locale is - /// assumed. - extern ACE_Export bool wild_match(const char* s, const char* pattern, - bool case_sensitive = true, bool character_classes = false); - - /** - * @name I/O operations - * - * Notes on common parameters: - * - * @a handle is the connected endpoint that will be used for I/O. - * - * @a buf is the buffer to write from or receive into. - * - * @a len is the number of bytes to transfer. - * - * The @a timeout parameter in the following methods indicates how - * long to blocking trying to transfer data. If @a timeout == 0, - * then the call behaves as a normal send/recv call, i.e., for - * blocking sockets, the call will block until action is possible; - * for non-blocking sockets, @c EWOULDBLOCK will be returned if no - * action is immediately possible. - * - * If @a timeout != 0, the call will wait until the relative time - * specified in @a *timeout elapses. - * - * The "_n()" I/O methods keep looping until all the data has been - * transferred. These methods also work for sockets in non-blocking - * mode i.e., they keep looping on @c EWOULDBLOCK. @a timeout is - * used to make sure we keep making progress, i.e., the same timeout - * value is used for every I/O operation in the loop and the timeout - * is not counted down. - * - * The return values for the "*_n()" methods match the return values - * from the non "_n()" methods and are specified as follows: - * - * - On complete transfer, the number of bytes transferred is returned. - * - On timeout, -1 is returned, @c errno == @c ETIME. - * - On error, -1 is returned, @c errno is set to appropriate error. - * - On @c EOF, 0 is returned, @c errno is irrelevant. - * - * On partial transfers, i.e., if any data is transferred before - * timeout / error / @c EOF, @a bytes_transferred> will contain the - * number of bytes transferred. - * - * Methods with @a iovec parameter are I/O vector variants of the - * I/O operations. - * - * Methods with the extra @a flags argument will always result in - * @c send getting called. Methods without the extra @a flags - * argument will result in @c send getting called on Win32 - * platforms, and @c write getting called on non-Win32 platforms. - */ - //@{ - extern ACE_Export ssize_t recv (ACE_HANDLE handle, - void *buf, - size_t len, - int flags, - const ACE_Time_Value *timeout = 0); - -#if defined (ACE_HAS_TLI) - - extern ACE_Export ssize_t t_rcv (ACE_HANDLE handle, - void *buf, - size_t len, - int *flags, - const ACE_Time_Value *timeout = 0); - -#endif /* ACE_HAS_TLI */ - - extern ACE_Export ssize_t recv (ACE_HANDLE handle, - void *buf, - size_t len, - const ACE_Time_Value *timeout = 0); - - extern ACE_Export ssize_t recvmsg (ACE_HANDLE handle, - struct msghdr *msg, - int flags, - const ACE_Time_Value *timeout = 0); - - extern ACE_Export ssize_t recvfrom (ACE_HANDLE handle, - char *buf, - int len, - int flags, - struct sockaddr *addr, - int *addrlen, - const ACE_Time_Value *timeout = 0); - - ACE_NAMESPACE_INLINE_FUNCTION - ssize_t recv_n (ACE_HANDLE handle, - void *buf, - size_t len, - int flags, - const ACE_Time_Value *timeout = 0, - size_t *bytes_transferred = 0); - -#if defined (ACE_HAS_TLI) - - ACE_NAMESPACE_INLINE_FUNCTION - ssize_t t_rcv_n (ACE_HANDLE handle, - void *buf, - size_t len, - int *flags, - const ACE_Time_Value *timeout = 0, - size_t *bytes_transferred = 0); - -#endif /* ACE_HAS_TLI */ - - ACE_NAMESPACE_INLINE_FUNCTION - ssize_t recv_n (ACE_HANDLE handle, - void *buf, - size_t len, - const ACE_Time_Value *timeout = 0, - size_t *bytes_transferred = 0); - - /// Receive into a variable number of pieces. - /** - * Accepts a variable, caller-specified, number of pointer/length - * pairs. Arguments following @a n are char *, size_t pairs. - * - * @param handle The I/O handle to receive on - * @param n The total number of char *, size_t pairs following @a n. - * - * @return -1 on error, else total number of bytes received. - */ - extern ACE_Export ssize_t recv (ACE_HANDLE handle, size_t n, ...); - - extern ACE_Export ssize_t recvv (ACE_HANDLE handle, - iovec *iov, - int iovcnt, - const ACE_Time_Value *timeout = 0); - - ACE_NAMESPACE_INLINE_FUNCTION - ssize_t recvv_n (ACE_HANDLE handle, - iovec *iov, - int iovcnt, - const ACE_Time_Value *timeout = 0, - size_t *bytes_transferred = 0); - - extern ACE_Export ssize_t recv_n (ACE_HANDLE handle, - ACE_Message_Block *message_block, - const ACE_Time_Value *timeout = 0, - size_t *bytes_transferred = 0); - - extern ACE_Export ssize_t send (ACE_HANDLE handle, - const void *buf, - size_t len, - int flags, - const ACE_Time_Value *timeout = 0); - -#if defined (ACE_HAS_TLI) - - extern ACE_Export ssize_t t_snd (ACE_HANDLE handle, - const void *buf, - size_t len, - int flags, - const ACE_Time_Value *timeout = 0); - -#endif /* ACE_HAS_TLI */ - - extern ACE_Export ssize_t send (ACE_HANDLE handle, - const void *buf, - size_t len, - const ACE_Time_Value *timeout = 0); - - extern ACE_Export ssize_t sendmsg (ACE_HANDLE handle, - const struct msghdr *msg, - int flags, - const ACE_Time_Value *timeout = 0); - - extern ACE_Export ssize_t sendto (ACE_HANDLE handle, - const char *buf, - int len, - int flags, - const struct sockaddr *addr, - int addrlen, - const ACE_Time_Value *timeout = 0); - - ACE_NAMESPACE_INLINE_FUNCTION - ssize_t send_n (ACE_HANDLE handle, - const void *buf, - size_t len, - int flags, - const ACE_Time_Value *timeout = 0, - size_t *bytes_transferred = 0); - -#if defined (ACE_HAS_TLI) - - ACE_NAMESPACE_INLINE_FUNCTION - ssize_t t_snd_n (ACE_HANDLE handle, - const void *buf, - size_t len, - int flags, - const ACE_Time_Value *timeout = 0, - size_t *bytes_transferred = 0); - -#endif /* ACE_HAS_TLI */ - - ACE_NAMESPACE_INLINE_FUNCTION - ssize_t send_n (ACE_HANDLE handle, - const void *buf, - size_t len, - const ACE_Time_Value *timeout = 0, - size_t *bytes_transferred = 0); - - /// Varargs variant. - extern ACE_Export ssize_t send (ACE_HANDLE handle, size_t n, ...); - - extern ACE_Export ssize_t sendv (ACE_HANDLE handle, - const iovec *iov, - int iovcnt, - const ACE_Time_Value *timeout = 0); - - ACE_NAMESPACE_INLINE_FUNCTION - ssize_t sendv_n (ACE_HANDLE handle, - const iovec *iov, - int iovcnt, - const ACE_Time_Value *timeout = 0, - size_t *bytes_transferred = 0); - - /// Send all the @a message_blocks chained through their @c next and - /// @c cont pointers. This call uses the underlying OS gather-write - /// operation to reduce the domain-crossing penalty. - extern ACE_Export ssize_t send_n (ACE_HANDLE handle, - const ACE_Message_Block *message_block, - const ACE_Time_Value *timeout = 0, - size_t *bytes_transferred = 0); - - // = File system I/O functions (these don't support timeouts). - - ACE_NAMESPACE_INLINE_FUNCTION - ssize_t read_n (ACE_HANDLE handle, - void *buf, - size_t len, - size_t *bytes_transferred = 0); - - ACE_NAMESPACE_INLINE_FUNCTION - ssize_t write_n (ACE_HANDLE handle, - const void *buf, - size_t len, - size_t *bytes_transferred = 0); - - /// Write all the @a message_blocks chained through their @c next - /// and @c cont pointers. This call uses the underlying OS - /// gather-write operation to reduce the domain-crossing penalty. - extern ACE_Export ssize_t write_n (ACE_HANDLE handle, - const ACE_Message_Block *message_block, - size_t *bytes_transferred = 0); - - extern ACE_Export ssize_t readv_n (ACE_HANDLE handle, - iovec *iov, - int iovcnt, - size_t *bytes_transferred = 0); - - extern ACE_Export ssize_t writev_n (ACE_HANDLE handle, - const iovec *iov, - int iovcnt, - size_t *bytes_transferred = 0); - //@} - - /** - * Wait up to @a timeout amount of time to passively establish a - * connection. This method doesn't perform the @c accept, it just - * does the timed wait. - */ - extern ACE_Export int handle_timed_accept (ACE_HANDLE listener, - ACE_Time_Value *timeout, - bool restart); - - /** - * Wait up to @a timeout amount of time to complete an actively - * established non-blocking connection. If @a is_tli is non-0 then - * we are being called by a TLI wrapper (which behaves slightly - * differently from a socket wrapper). - */ - extern ACE_Export ACE_HANDLE handle_timed_complete ( - ACE_HANDLE listener, - const ACE_Time_Value *timeout, - int is_tli = 0); - - /** - * Reset the limit on the number of open handles. If @a new_limit - * == -1 set the limit to the maximum allowable. Otherwise, set - * the limit value to @a new_limit. If @a increase_limit_only is - * non-0 then only allow increases to the limit. - */ - extern ACE_Export int set_handle_limit (int new_limit = -1, - int increase_limit_only = 0); - - /** - * Returns the maximum number of open handles currently permitted in - * this process. This maximum may be extended using - * @c ACE::set_handle_limit. - */ - extern ACE_Export int max_handles (void); - - // = String functions - /** - * Return a dynamically allocated duplicate of @a str, substituting - * the environment variable if @c str[0] @c == @c '$'. Note that - * the pointer is allocated with @c ACE_OS::malloc and must be freed - * by @c ACE_OS::free. - */ - extern ACE_Export ACE_TCHAR *strenvdup (const ACE_TCHAR *str); - - /// Returns a pointer to the "end" of the string, i.e., the character - /// past the '\0'. - extern ACE_Export const char *strend (const char *s); - - /// This method is just like @c strdup, except that it uses - /// @c operator @c new rather than @c malloc. If @a s is NULL - /// returns NULL rather than segfaulting. - extern ACE_Export char *strnew (const char *s); - - /// Delete the memory allocated by @c strnew. - ACE_NAMESPACE_INLINE_FUNCTION void strdelete (char *s); - - /// Create a fresh new copy of @a str, up to @a n chars long. Uses - /// @c ACE_OS::malloc to allocate the new string. - extern ACE_Export char *strndup (const char *str, size_t n); - - /// Create a fresh new copy of @a str, up to @a n chars long. Uses - /// @c ACE_OS::malloc to allocate the new string. - extern ACE_Export char *strnnew (const char *str, size_t n); - - /// Determine if a specified pathname is "dot dir" (ie. "." or ".."). - ACE_NAMESPACE_INLINE_FUNCTION bool isdotdir (const char *s); - -#if defined (ACE_HAS_WCHAR) - extern ACE_Export const wchar_t *strend (const wchar_t *s); - - extern ACE_Export wchar_t *strnew (const wchar_t *s); - - ACE_NAMESPACE_INLINE_FUNCTION void strdelete (wchar_t *s); - - extern ACE_Export wchar_t *strndup (const wchar_t *str, size_t n); - - extern ACE_Export wchar_t *strnnew (const wchar_t *str, size_t n); - - ACE_NAMESPACE_INLINE_FUNCTION bool isdotdir (const wchar_t *s); - -#endif /* ACE_HAS_WCHAR */ - - /** - * On Windows, determines if a specified pathname ends with ".exe" - * (not case sensitive). If on Windows and there is no ".exe" suffix, - * a new ACE_TCHAR array is allocated and a copy of @c pathname with - * the ".exe" suffix is copied into it. In this case, the caller is - * responsible for calling delete [] on the returned pointer. - * - * @param pathname The name to check for a proper suffix. - * - * @retval @c pathname if there is a proper suffix for Windows. This is - * always the return value for non-Windows platforms. - * @retval If a suffix needs to be added, returns a pointer to new[] - * allocated memory containing the original @c pathname plus - * a ".exe" suffix. The caller is responsible for freeing the - * memory using delete []. - */ - extern ACE_Export const ACE_TCHAR *execname (const ACE_TCHAR *pathname); - - /** - * Returns the "basename" of a @a pathname separated by @a delim. - * For instance, the basename of "/tmp/foo.cpp" is "foo.cpp" when - * @a delim is @a '/'. - */ - extern ACE_Export const ACE_TCHAR *basename (const ACE_TCHAR *pathname, - ACE_TCHAR delim = - ACE_DIRECTORY_SEPARATOR_CHAR); - - /** - * Returns the "dirname" of a @a pathname. For instance, the - * dirname of "/tmp/foo.cpp" is "/tmp" when @a delim is @a '/'. If - * @a pathname has no @a delim ".\0" is returned. This method does - * not modify @a pathname and is not reentrant. - */ - extern ACE_Export const ACE_TCHAR *dirname (const ACE_TCHAR *pathname, - ACE_TCHAR delim = - ACE_DIRECTORY_SEPARATOR_CHAR); - - /** - * Translate the given timestamp to ISO-8601 format. - * - * @param time_value ACE_Time_Value to format. This is assumed to be - * an absolute time value. - * @param date_and_time Array to hold the timestamp. - * @param time_len Size of @a date_and_time in ACE_TCHARs. - * Must be greater than or equal to 27. - * @param return_pointer_to_first_digit If true, returned pointer value - * is to the first time digit, else to the space - * prior to the first time digit. See Return Values. - * - * @retval 0 if unsuccessful, with errno set. If @a time_len is less than - * 27 errno will be EINVAL. - * @retval If successful, pointer to beginning of the "time" portion of - * @a date_and_time. If @a return_pointer_to_first_digit is false - * the pointer is actually to the space before the time, else - * the pointer is to the first time digit. - */ - extern ACE_Export ACE_TCHAR *timestamp (const ACE_Time_Value& time_value, - ACE_TCHAR date_and_time[], - size_t time_len, - bool return_pointer_to_first_digit = false); - - /** - * Translate the current time to ISO-8601 timestamp format. - * - * @param date_and_time Array to hold the timestamp. - * @param time_len Size of @a date_and_time in ACE_TCHARs. - * Must be greater than or equal to 27. - * @param return_pointer_to_first_digit If true, returned pointer value - * is to the first time digit, else to the space - * prior to the first time digit. See Return Values. - * - * @retval 0 if unsuccessful, with errno set. If @a time_len is less than - * 27 errno will be EINVAL. - * @retval If successful, pointer to beginning of the "time" portion of - * @a date_and_time. If @a return_pointer_to_first_digit is false - * the pointer is actually to the space before the time, else - * the pointer is to the first time digit. - */ - extern ACE_Export ACE_TCHAR *timestamp (ACE_TCHAR date_and_time[], - size_t time_len, - bool return_pointer_to_first_digit = false); - - /** - * if @a avoid_zombies == 0 call @c ACE_OS::fork directly, else - * create an orphan process that's inherited by the init process; - * init cleans up when the orphan process terminates so we don't - * create zombies. Returns -1 on failure and either the child PID - * on success if @a avoid_zombies == 0 or 1 on success if @a - * avoid_zombies != 0 (this latter behavior is a known bug that - * needs to be fixed). - */ - extern ACE_Export pid_t fork ( - const ACE_TCHAR *program_name = ACE_TEXT (""), - int avoid_zombies = 0); - - /** - * Become a daemon process using the algorithm in Richard Stevens - * "Advanced Programming in the UNIX Environment." If - * @a close_all_handles is non-zero then all open file handles are - * closed. - */ - extern ACE_Export int daemonize ( - const ACE_TCHAR pathname[] = ACE_TEXT ("/"), - bool close_all_handles = ACE_DEFAULT_CLOSE_ALL_HANDLES, - const ACE_TCHAR program_name[] = ACE_TEXT ("")); - - // = Miscellaneous functions. - /// Rounds the request to a multiple of the page size. - extern ACE_Export size_t round_to_pagesize (size_t len); - - /// Rounds the request to a multiple of the allocation granularity. - extern ACE_Export size_t round_to_allocation_granularity (size_t len); - - // @@ UNICODE what about buffer? - /// Format buffer into printable format. This is useful for - /// debugging. - extern ACE_Export size_t format_hexdump (const char *buffer, size_t size, - ACE_TCHAR *obuf, size_t obuf_sz); - - /// Computes the hash value of {str} using the "Hash PJW" routine. - extern ACE_Export u_long hash_pjw (const char *str); - - /// Computes the hash value of {str} using the "Hash PJW" routine. - extern ACE_Export u_long hash_pjw (const char *str, size_t len); - -#if defined (ACE_HAS_WCHAR) - /// Computes the hash value of {str} using the "Hash PJW" routine. - extern ACE_Export u_long hash_pjw (const wchar_t *str); - - /// Computes the hash value of {str} using the "Hash PJW" routine. - extern ACE_Export u_long hash_pjw (const wchar_t *str, size_t len); -#endif /* ACE_HAS_WCHAR */ - - /// Computes CRC-CCITT for the string. - extern ACE_Export ACE_UINT16 crc_ccitt(const char *str); - - /// Computes CRC-CCITT for the buffer. - extern ACE_Export ACE_UINT16 crc_ccitt(const void *buf, size_t len, - ACE_UINT16 crc = 0); - - /// Computes CRC-CCITT for the @ len iovec buffers. - extern ACE_Export ACE_UINT16 crc_ccitt(const iovec *iov, int len, - ACE_UINT16 crc = 0); - - /// Computes the ISO 8802-3 standard 32 bits CRC for the string. - extern ACE_Export ACE_UINT32 crc32 (const char *str); - - /// Computes the ISO 8802-3 standard 32 bits CRC for the buffer. - extern ACE_Export ACE_UINT32 crc32 (const void *buf, size_t len, - ACE_UINT32 crc = 0); - - /// Computes the ISO 8802-3 standard 32 bits CRC for the - /// @ len iovec buffers. - extern ACE_Export ACE_UINT32 crc32 (const iovec *iov, int len, - ACE_UINT32 crc = 0); - - /// Euclid's greatest common divisor algorithm. - extern ACE_Export u_long gcd (u_long x, u_long y); - - /// Calculates the minimum enclosing frame size for the given values. - extern ACE_Export u_long minimum_frame_size (u_long period1, u_long period2); - - /** - * Function that can burn up noticeable CPU time: brute-force - * determination of whether number @a n is prime. Returns 0 if - * it is prime, or the smallest factor if it is not prime. - * @a min_factor and @a max_factor can be used to partition the work - * among threads. For just one thread, typical values are 2 and - * n/2. - */ - extern ACE_Export u_long is_prime (const u_long n, - const u_long min_factor, - const u_long max_factor); - - /// Map troublesome win32 errno values to values that standard C - /// strerr function understands. Thank you Microsoft. - extern ACE_Export int map_errno (int error); - - /// Returns a string containing the error message corresponding to a - /// WinSock error. This works around an omission in the Win32 API. - /// @internal - extern ACE_Export const ACE_TCHAR * sock_error (int error); - - /// Determins whether the given error code corresponds to to a - /// WinSock error. If so returns true, false otherwise. - /// @internal - extern ACE_Export bool is_sock_error (int error); - - /** - * Checks if process with {pid} is still alive. Returns 1 if it is - * still alive, 0 if it isn't alive, and -1 if something weird - * happened. - */ - extern ACE_Export int process_active (pid_t pid); - - /** - * Terminate the process abruptly with id @a pid. On Win32 platforms - * this uses {TerminateProcess} and on POSIX platforms is uses - * {kill} with the -9 (SIGKILL) signal, which cannot be caught or - * ignored. Note that this call is potentially dangerous to use - * since the process being terminated may not have a chance to - * cleanup before it shuts down. - */ - extern ACE_Export int terminate_process (pid_t pid); - - /** - * This method uses process id and object pointer to come up with a - * machine wide unique name. The process ID will provide uniqueness - * between processes on the same machine. The "this" pointer of the - * {object} will provide uniqueness between other "live" objects in - * the same process. The uniqueness of this name is therefore only - * valid for the life of {object}. - */ - ACE_NAMESPACE_INLINE_FUNCTION void unique_name (const void *object, - ACE_TCHAR *name, - size_t length); - - /// Computes the base 2 logarithm of {num}. - ACE_NAMESPACE_INLINE_FUNCTION u_long log2 (u_long num); - - /// Helper to avoid comparing floating point values with == - /// (uses < and > operators). - template - bool is_equal (const T& a, const T& b) - { - return !((a < b) || (a > b)); - } - - /// Helper to avoid comparing floating point values with != - /// (uses < and > operators). - template - bool is_inequal (const T& a, const T& b) - { - return !is_equal (a, b); - } - - /// Hex conversion utility. - extern ACE_Export ACE_TCHAR nibble2hex (u_int n); - - /// Convert a hex character to its byte representation. - ACE_NAMESPACE_INLINE_FUNCTION u_char hex2byte (ACE_TCHAR c); - - // = Set/get the debug level. - extern ACE_Export bool debug (void); - extern ACE_Export void debug (bool onoff); - - /// Wrapper facade for @c select that uses @c ACE_Handle_Sets. - extern ACE_Export int select (int width, - ACE_Handle_Set *readfds, - ACE_Handle_Set *writefds = 0, - ACE_Handle_Set *exceptfds = 0, - const ACE_Time_Value *timeout = 0); - - /// Wrapper facade for the most common use of @c select that uses - /// @c ACE_Handle_Sets. - extern ACE_Export int select (int width, - ACE_Handle_Set &readfds, - const ACE_Time_Value *timeout = 0); - - /// Timed wait for handle to get read ready. - /// @retval -1 for error - /// @retval 0 for timeout - /// @retval 1 the handle is ready - ACE_NAMESPACE_INLINE_FUNCTION - int handle_read_ready (ACE_HANDLE handle, - const ACE_Time_Value *timeout); - - /// Timed wait for handle to get write ready. - /// @retval -1 for error - /// @retval 0 for timeout - /// @retval 1 the handle is ready - ACE_NAMESPACE_INLINE_FUNCTION - int handle_write_ready (ACE_HANDLE handle, - const ACE_Time_Value *timeout); - - /// Timed wait for handle to get exception ready. - /// @retval -1 for error - /// @retval 0 for timeout - /// @retval 1 the handle is ready - ACE_NAMESPACE_INLINE_FUNCTION - int handle_exception_ready (ACE_HANDLE handle, - const ACE_Time_Value *timeout); - - /// Timed wait for handle to get read, write, or exception ready. - /// @retval -1 for error - /// @retval 0 for timeout - /// @retval 1 the handle is ready - extern ACE_Export int handle_ready (ACE_HANDLE handle, - const ACE_Time_Value *timeout, - int read_ready, - int write_ready, - int exception_ready); - - /// Wait for @a timeout before proceeding to a @c recv operation. - /// @a val keeps track of whether we're in non-blocking mode or - /// not. - extern ACE_Export int enter_recv_timedwait (ACE_HANDLE handle, - const ACE_Time_Value *timeout, - int &val); - - /// Wait for @a timeout before proceeding to a @c send operation. - /// @a val keeps track of whether we're in non-blocking mode or - /// not. - extern ACE_Export int enter_send_timedwait (ACE_HANDLE handle, - const ACE_Time_Value* timeout, - int &val); - - /// This makes sure that @a handle is set into non-blocking mode. - /// @a val keeps track of whether were in non-blocking mode or not. - extern ACE_Export void record_and_set_non_blocking_mode (ACE_HANDLE handle, - int &val); - - /// Cleanup after a timed operation, restore the appropriate - /// non-blocking status of @a handle. - extern ACE_Export void restore_non_blocking_mode (ACE_HANDLE handle, - int val); - - // private: - // These functions aren't meant to be used internally, so they are - // not exported. - - // - // = Recv_n helpers - // - - ACE_NAMESPACE_INLINE_FUNCTION ssize_t recv_i (ACE_HANDLE handle, - void *buf, - size_t len); - - extern ACE_Export ssize_t recv_n_i (ACE_HANDLE handle, - void *buf, - size_t len, - int flags, - size_t *bytes_transferred); - - extern ACE_Export ssize_t recv_n_i (ACE_HANDLE handle, - void *buf, - size_t len, - int flags, - const ACE_Time_Value *timeout, - size_t *bytes_transferred); - -#if defined (ACE_HAS_TLI) - - extern ACE_Export ssize_t t_rcv_n_i (ACE_HANDLE handle, - void *buf, - size_t len, - int *flags, - size_t *bytes_transferred); - - extern ACE_Export ssize_t t_rcv_n_i (ACE_HANDLE handle, - void *buf, - size_t len, - int *flags, - const ACE_Time_Value *timeout, - size_t *bytes_transferred); - -#endif /* ACE_HAS_TLI */ - - extern ACE_Export ssize_t recv_n_i (ACE_HANDLE handle, - void *buf, - size_t len, - size_t *bytes_transferred); - - extern ACE_Export ssize_t recv_n_i (ACE_HANDLE handle, - void *buf, - size_t len, - const ACE_Time_Value *timeout, - size_t *bytes_transferred); - - extern ACE_Export ssize_t recvv_n_i (ACE_HANDLE handle, - iovec *iov, - int iovcnt, - size_t *bytes_transferred); - - extern ACE_Export ssize_t recvv_n_i (ACE_HANDLE handle, - iovec *iov, - int iovcnt, - const ACE_Time_Value *timeout, - size_t *bytes_transferred); - - // - // = Send_n helpers - // - - ACE_NAMESPACE_INLINE_FUNCTION ssize_t send_i (ACE_HANDLE handle, - const void *buf, - size_t len); - - extern ACE_Export ssize_t send_n_i (ACE_HANDLE handle, - const void *buf, - size_t len, - int flags, - size_t *bytes_transferred); - - extern ACE_Export ssize_t send_n_i (ACE_HANDLE handle, - const void *buf, - size_t len, - int flags, - const ACE_Time_Value *timeout, - size_t *bytes_transferred); - -#if defined (ACE_HAS_TLI) - - extern ACE_Export ssize_t t_snd_n_i (ACE_HANDLE handle, - const void *buf, - size_t len, - int flags, - size_t *bytes_transferred); - - extern ACE_Export ssize_t t_snd_n_i (ACE_HANDLE handle, - const void *buf, - size_t len, - int flags, - const ACE_Time_Value *timeout, - size_t *bytes_transferred); - -#endif /* ACE_HAS_TLI */ - - extern ACE_Export ssize_t send_n_i (ACE_HANDLE handle, - const void *buf, - size_t len, - size_t *bytes_transferred); - - extern ACE_Export ssize_t send_n_i (ACE_HANDLE handle, - const void *buf, - size_t len, - const ACE_Time_Value *timeout, - size_t *bytes_transferred); - - extern ACE_Export ssize_t sendv_n_i (ACE_HANDLE handle, - const iovec *iov, - int iovcnt, - size_t *bytes_transferred); - - extern ACE_Export ssize_t sendv_n_i (ACE_HANDLE handle, - const iovec *iov, - int iovcnt, - const ACE_Time_Value *timeout, - size_t *bytes_transferred); - -} - -// Close versioned namespace, if enabled by the user. -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/ACE.inl" -#endif /* __ACE_INLINE__ */ - -#include /**/ "ace/post.h" - -#endif /* ACE_ACE_H */ diff --git a/modules/worldengine/deps/acelite/ace/ACE.inl b/modules/worldengine/deps/acelite/ace/ACE.inl deleted file mode 100644 index 95f45ee99d..0000000000 --- a/modules/worldengine/deps/acelite/ace/ACE.inl +++ /dev/null @@ -1,333 +0,0 @@ -// -*- C++ -*- -// -// $Id: ACE.inl 95761 2012-05-15 18:23:04Z johnnyw $ - -#include "ace/OS_NS_unistd.h" -#include "ace/OS_NS_Thread.h" -#include "ace/OS_NS_ctype.h" -#include "ace/OS_NS_sys_socket.h" - -// Open versioned namespace, if enabled by the user. -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - - -// Wrappers for methods that have been moved to ACE_OS. - -ACE_INLINE ssize_t -ACE::read_n (ACE_HANDLE handle, - void *buf, - size_t len, - size_t *bytes_transferred) -{ - return ACE_OS::read_n (handle, - buf, - len, - bytes_transferred); -} - -ACE_INLINE ssize_t -ACE::write_n (ACE_HANDLE handle, - const void *buf, - size_t len, - size_t *bytes_transferred) -{ - return ACE_OS::write_n (handle, - buf, - len, - bytes_transferred); -} - -ACE_INLINE ssize_t -ACE::recv_n (ACE_HANDLE handle, - void *buf, - size_t len, - int flags, - const ACE_Time_Value *timeout, - size_t *bytes_transferred) -{ - if (timeout == 0) - return ACE::recv_n_i (handle, - buf, - len, - flags, - bytes_transferred); - else - return ACE::recv_n_i (handle, - buf, - len, - flags, - timeout, - bytes_transferred); -} - -#if defined (ACE_HAS_TLI) - -ACE_INLINE ssize_t -ACE::t_rcv_n (ACE_HANDLE handle, - void *buf, - size_t len, - int *flags, - const ACE_Time_Value *timeout, - size_t *bytes_transferred) -{ - if (timeout == 0) - return ACE::t_rcv_n_i (handle, - buf, - len, - flags, - bytes_transferred); - else - return ACE::t_rcv_n_i (handle, - buf, - len, - flags, - timeout, - bytes_transferred); -} - -#endif /* ACE_HAS_TLI */ - -ACE_INLINE ssize_t -ACE::recv_n (ACE_HANDLE handle, - void *buf, - size_t len, - const ACE_Time_Value *timeout, - size_t *bytes_transferred) -{ - if (timeout == 0) - return ACE::recv_n_i (handle, - buf, - len, - bytes_transferred); - else - return ACE::recv_n_i (handle, - buf, - len, - timeout, - bytes_transferred); -} - -ACE_INLINE ssize_t -ACE::recvv_n (ACE_HANDLE handle, - iovec *iov, - int iovcnt, - const ACE_Time_Value *timeout, - size_t *bytes_transferred) -{ - if (timeout == 0) - return ACE::recvv_n_i (handle, - iov, - iovcnt, - bytes_transferred); - else - return ACE::recvv_n_i (handle, - iov, - iovcnt, - timeout, - bytes_transferred); -} - -ACE_INLINE ssize_t -ACE::send_n (ACE_HANDLE handle, - const void *buf, - size_t len, - int flags, - const ACE_Time_Value *timeout, - size_t *bytes_transferred) -{ - if (timeout == 0) - return ACE::send_n_i (handle, - buf, - len, - flags, - bytes_transferred); - else - return ACE::send_n_i (handle, - buf, - len, - flags, - timeout, - bytes_transferred); -} - -#if defined (ACE_HAS_TLI) - -ACE_INLINE ssize_t -ACE::t_snd_n (ACE_HANDLE handle, - const void *buf, - size_t len, - int flags, - const ACE_Time_Value *timeout, - size_t *bytes_transferred) -{ - if (timeout == 0) - return ACE::t_snd_n_i (handle, - buf, - len, - flags, - bytes_transferred); - else - return ACE::t_snd_n_i (handle, - buf, - len, - flags, - timeout, - bytes_transferred); -} - -#endif /* ACE_HAS_TLI */ - -ACE_INLINE ssize_t -ACE::send_n (ACE_HANDLE handle, - const void *buf, - size_t len, - const ACE_Time_Value *timeout, - size_t *bytes_transferred) -{ - if (timeout == 0) - return ACE::send_n_i (handle, - buf, - len, - bytes_transferred); - else - return ACE::send_n_i (handle, - buf, - len, - timeout, - bytes_transferred); -} - -ACE_INLINE ssize_t -ACE::sendv_n (ACE_HANDLE handle, - const iovec *iov, - int iovcnt, - const ACE_Time_Value *timeout, - size_t *bytes_transferred) -{ - if (timeout == 0) - return ACE::sendv_n_i (handle, - iov, - iovcnt, - bytes_transferred); - else - return ACE::sendv_n_i (handle, - iov, - iovcnt, - timeout, - bytes_transferred); -} - -ACE_INLINE ssize_t -ACE::send_i (ACE_HANDLE handle, const void *buf, size_t len) -{ -#if defined (ACE_WIN32) || defined (HPUX) - return ACE_OS::send (handle, (const char *) buf, len); -#else - return ACE_OS::write (handle, (const char *) buf, len); -#endif /* ACE_WIN32 */ -} - -ACE_INLINE ssize_t -ACE::recv_i (ACE_HANDLE handle, void *buf, size_t len) -{ -#if defined (ACE_WIN32) || defined (ACE_OPENVMS) - return ACE_OS::recv (handle, (char *) buf, len); -#else - return ACE_OS::read (handle, (char *) buf, len); -#endif /* ACE_WIN32 */ -} - -ACE_INLINE int -ACE::handle_read_ready (ACE_HANDLE handle, const ACE_Time_Value *timeout) -{ - return ACE::handle_ready (handle, timeout, 1, 0, 0); -} - -ACE_INLINE int -ACE::handle_write_ready (ACE_HANDLE handle, const ACE_Time_Value *timeout) -{ - return ACE::handle_ready (handle, timeout, 0, 1, 0); -} - -ACE_INLINE int -ACE::handle_exception_ready (ACE_HANDLE handle, const ACE_Time_Value *timeout) -{ - return ACE::handle_ready (handle, timeout, 0, 0, 1); -} - -ACE_INLINE void -ACE::strdelete (char *s) -{ - delete [] s; -} - -#if defined (ACE_HAS_WCHAR) -ACE_INLINE void -ACE::strdelete (wchar_t *s) -{ - delete [] s; -} -#endif /* ACE_HAS_WCHAR */ - -ACE_INLINE bool -ACE::isdotdir (const char *s) -{ - return (s[0] == '.' && - ((s[1] == 0) || (s[1] == '.' && s[2] == 0))); -} - -#if defined (ACE_HAS_WCHAR) -ACE_INLINE bool -ACE::isdotdir (const wchar_t *s) -{ - return (s[0] == ACE_TEXT ('.') && - ((s[1] == 0) || (s[1] == ACE_TEXT ('.') && s[2] == 0))); -} -#endif /* ACE_HAS_WCHAR */ - -ACE_INLINE void -ACE::unique_name (const void *object, - ACE_TCHAR *name, - size_t length) -{ - ACE_OS::unique_name (object, name, length); -} - -ACE_INLINE u_long -ACE::log2 (u_long num) -{ - u_long log = 0; - - for (; num > 1; ++log) - num >>= 1; - - return log; -} - -ACE_INLINE int -ACE::map_errno (int error) -{ -#if defined (ACE_WIN32) - switch (error) - { - case WSAEWOULDBLOCK: - return EAGAIN; // Same as UNIX errno EWOULDBLOCK. - } -#endif /* ACE_WIN32 */ - - return error; -} - -ACE_INLINE u_char -ACE::hex2byte (ACE_TCHAR c) -{ - if (ACE_OS::ace_isdigit (c)) - return (u_char) (c - ACE_TEXT ('0')); - else if (ACE_OS::ace_islower (c)) - return (u_char) (10 + c - ACE_TEXT ('a')); - else - return (u_char) (10 + c - ACE_TEXT ('A')); -} - -// Close versioned namespace, if enabled by the user. -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/ACE.pc.in b/modules/worldengine/deps/acelite/ace/ACE.pc.in deleted file mode 100644 index 90b2a9eebd..0000000000 --- a/modules/worldengine/deps/acelite/ace/ACE.pc.in +++ /dev/null @@ -1,10 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ - -Name: ACE -Description: ADAPTIVE Communication Environment -Version: @VERSION@ -Libs: -L${libdir} -lACE @LIBS@ -Cflags: -I${includedir} diff --git a/modules/worldengine/deps/acelite/ace/ACE_crc32.cpp b/modules/worldengine/deps/acelite/ace/ACE_crc32.cpp deleted file mode 100644 index f9eb064f51..0000000000 --- a/modules/worldengine/deps/acelite/ace/ACE_crc32.cpp +++ /dev/null @@ -1,156 +0,0 @@ -// $Id: ACE_crc32.cpp 91286 2010-08-05 09:04:31Z johnnyw $ - -#include "ace/ACE.h" - -namespace -{ - /*****************************************************************/ - /* */ - /* CRC LOOKUP TABLE */ - /* ================ */ - /* The following CRC lookup table was generated automagically */ - /* by the Rocksoft^tm Model CRC Algorithm Table Generation */ - /* Program V1.0 using the following model parameters: */ - /* */ - /* Width : 4 bytes. */ - /* Poly : 0x04C11DB7L */ - /* Reverse : TRUE. */ - /* */ - /* For more information on the Rocksoft^tm Model CRC Algorithm, */ - /* see the document titled "A Painless Guide to CRC Error */ - /* Detection Algorithms" by Ross Williams */ - /* (ross@guest.adelaide.edu.au.). This document is likely to be */ - /* in the FTP archive "ftp.adelaide.edu.au/pub/rocksoft". */ - /* */ - /*****************************************************************/ - - const ACE_UINT32 crc_table[] = - { - 0x00000000L, 0x77073096L, 0xEE0E612CL, 0x990951BAL, - 0x076DC419L, 0x706AF48FL, 0xE963A535L, 0x9E6495A3L, - 0x0EDB8832L, 0x79DCB8A4L, 0xE0D5E91EL, 0x97D2D988L, - 0x09B64C2BL, 0x7EB17CBDL, 0xE7B82D07L, 0x90BF1D91L, - 0x1DB71064L, 0x6AB020F2L, 0xF3B97148L, 0x84BE41DEL, - 0x1ADAD47DL, 0x6DDDE4EBL, 0xF4D4B551L, 0x83D385C7L, - 0x136C9856L, 0x646BA8C0L, 0xFD62F97AL, 0x8A65C9ECL, - 0x14015C4FL, 0x63066CD9L, 0xFA0F3D63L, 0x8D080DF5L, - 0x3B6E20C8L, 0x4C69105EL, 0xD56041E4L, 0xA2677172L, - 0x3C03E4D1L, 0x4B04D447L, 0xD20D85FDL, 0xA50AB56BL, - 0x35B5A8FAL, 0x42B2986CL, 0xDBBBC9D6L, 0xACBCF940L, - 0x32D86CE3L, 0x45DF5C75L, 0xDCD60DCFL, 0xABD13D59L, - 0x26D930ACL, 0x51DE003AL, 0xC8D75180L, 0xBFD06116L, - 0x21B4F4B5L, 0x56B3C423L, 0xCFBA9599L, 0xB8BDA50FL, - 0x2802B89EL, 0x5F058808L, 0xC60CD9B2L, 0xB10BE924L, - 0x2F6F7C87L, 0x58684C11L, 0xC1611DABL, 0xB6662D3DL, - 0x76DC4190L, 0x01DB7106L, 0x98D220BCL, 0xEFD5102AL, - 0x71B18589L, 0x06B6B51FL, 0x9FBFE4A5L, 0xE8B8D433L, - 0x7807C9A2L, 0x0F00F934L, 0x9609A88EL, 0xE10E9818L, - 0x7F6A0DBBL, 0x086D3D2DL, 0x91646C97L, 0xE6635C01L, - 0x6B6B51F4L, 0x1C6C6162L, 0x856530D8L, 0xF262004EL, - 0x6C0695EDL, 0x1B01A57BL, 0x8208F4C1L, 0xF50FC457L, - 0x65B0D9C6L, 0x12B7E950L, 0x8BBEB8EAL, 0xFCB9887CL, - 0x62DD1DDFL, 0x15DA2D49L, 0x8CD37CF3L, 0xFBD44C65L, - 0x4DB26158L, 0x3AB551CEL, 0xA3BC0074L, 0xD4BB30E2L, - 0x4ADFA541L, 0x3DD895D7L, 0xA4D1C46DL, 0xD3D6F4FBL, - 0x4369E96AL, 0x346ED9FCL, 0xAD678846L, 0xDA60B8D0L, - 0x44042D73L, 0x33031DE5L, 0xAA0A4C5FL, 0xDD0D7CC9L, - 0x5005713CL, 0x270241AAL, 0xBE0B1010L, 0xC90C2086L, - 0x5768B525L, 0x206F85B3L, 0xB966D409L, 0xCE61E49FL, - 0x5EDEF90EL, 0x29D9C998L, 0xB0D09822L, 0xC7D7A8B4L, - 0x59B33D17L, 0x2EB40D81L, 0xB7BD5C3BL, 0xC0BA6CADL, - 0xEDB88320L, 0x9ABFB3B6L, 0x03B6E20CL, 0x74B1D29AL, - 0xEAD54739L, 0x9DD277AFL, 0x04DB2615L, 0x73DC1683L, - 0xE3630B12L, 0x94643B84L, 0x0D6D6A3EL, 0x7A6A5AA8L, - 0xE40ECF0BL, 0x9309FF9DL, 0x0A00AE27L, 0x7D079EB1L, - 0xF00F9344L, 0x8708A3D2L, 0x1E01F268L, 0x6906C2FEL, - 0xF762575DL, 0x806567CBL, 0x196C3671L, 0x6E6B06E7L, - 0xFED41B76L, 0x89D32BE0L, 0x10DA7A5AL, 0x67DD4ACCL, - 0xF9B9DF6FL, 0x8EBEEFF9L, 0x17B7BE43L, 0x60B08ED5L, - 0xD6D6A3E8L, 0xA1D1937EL, 0x38D8C2C4L, 0x4FDFF252L, - 0xD1BB67F1L, 0xA6BC5767L, 0x3FB506DDL, 0x48B2364BL, - 0xD80D2BDAL, 0xAF0A1B4CL, 0x36034AF6L, 0x41047A60L, - 0xDF60EFC3L, 0xA867DF55L, 0x316E8EEFL, 0x4669BE79L, - 0xCB61B38CL, 0xBC66831AL, 0x256FD2A0L, 0x5268E236L, - 0xCC0C7795L, 0xBB0B4703L, 0x220216B9L, 0x5505262FL, - 0xC5BA3BBEL, 0xB2BD0B28L, 0x2BB45A92L, 0x5CB36A04L, - 0xC2D7FFA7L, 0xB5D0CF31L, 0x2CD99E8BL, 0x5BDEAE1DL, - 0x9B64C2B0L, 0xEC63F226L, 0x756AA39CL, 0x026D930AL, - 0x9C0906A9L, 0xEB0E363FL, 0x72076785L, 0x05005713L, - 0x95BF4A82L, 0xE2B87A14L, 0x7BB12BAEL, 0x0CB61B38L, - 0x92D28E9BL, 0xE5D5BE0DL, 0x7CDCEFB7L, 0x0BDBDF21L, - 0x86D3D2D4L, 0xF1D4E242L, 0x68DDB3F8L, 0x1FDA836EL, - 0x81BE16CDL, 0xF6B9265BL, 0x6FB077E1L, 0x18B74777L, - 0x88085AE6L, 0xFF0F6A70L, 0x66063BCAL, 0x11010B5CL, - 0x8F659EFFL, 0xF862AE69L, 0x616BFFD3L, 0x166CCF45L, - 0xA00AE278L, 0xD70DD2EEL, 0x4E048354L, 0x3903B3C2L, - 0xA7672661L, 0xD06016F7L, 0x4969474DL, 0x3E6E77DBL, - 0xAED16A4AL, 0xD9D65ADCL, 0x40DF0B66L, 0x37D83BF0L, - 0xA9BCAE53L, 0xDEBB9EC5L, 0x47B2CF7FL, 0x30B5FFE9L, - 0xBDBDF21CL, 0xCABAC28AL, 0x53B39330L, 0x24B4A3A6L, - 0xBAD03605L, 0xCDD70693L, 0x54DE5729L, 0x23D967BFL, - 0xB3667A2EL, 0xC4614AB8L, 0x5D681B02L, 0x2A6F2B94L, - 0xB40BBE37L, 0xC30C8EA1L, 0x5A05DF1BL, 0x2D02EF8DL - }; - - /*****************************************************************/ - /* End of CRC Lookup Table */ - /*****************************************************************/ -} - -#define COMPUTE(var, ch) (var) = (crc_table[(var ^ ch) & 0xFF] ^ (var >> 8)) - -// Open versioned namespace, if enabled by the user. -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_UINT32 -ACE::crc32 (const char *string) -{ - ACE_UINT32 crc = 0xFFFFFFFF; - - for (const char *p = string; - *p != 0; - ++p) - { - COMPUTE (crc, *p); - } - - return ~crc; -} - -ACE_UINT32 -ACE::crc32 (const void *buffer, size_t len, ACE_UINT32 crc) -{ - crc = ~crc; - - for (const char *p = (const char *) buffer, - *e = (const char *) buffer + len; - p != e; - ++p) - { - COMPUTE (crc, *p); - } - - return ~crc; -} - -ACE_UINT32 -ACE::crc32 (const iovec *iov, int len, ACE_UINT32 crc) -{ - crc = ~crc; - - for (int i = 0; i < len; ++i) - { - for (const char *p = (const char *) iov[i].iov_base, - *e = (const char *) iov[i].iov_base + iov[i].iov_len; - p != e; - ++p) - COMPUTE (crc, *p); - } - - return ~crc; -} - -// Close versioned namespace, if enabled by the user. -ACE_END_VERSIONED_NAMESPACE_DECL - -#undef COMPUTE diff --git a/modules/worldengine/deps/acelite/ace/ACE_crc_ccitt.cpp b/modules/worldengine/deps/acelite/ace/ACE_crc_ccitt.cpp deleted file mode 100644 index c1455d7917..0000000000 --- a/modules/worldengine/deps/acelite/ace/ACE_crc_ccitt.cpp +++ /dev/null @@ -1,124 +0,0 @@ -// $Id: ACE_crc_ccitt.cpp 96017 2012-08-08 22:18:09Z mitza $ - -#include "ace/ACE.h" - -namespace -{ - /*****************************************************************/ - /* */ - /* CRC LOOKUP TABLE */ - /* ================ */ - /* The following CRC lookup table was generated automagically */ - /* by the Rocksoft^tm Model CRC Algorithm Table Generation */ - /* Program V1.0 using the following model parameters: */ - /* */ - /* Width : 2 bytes. */ - /* Poly : 0x1021 */ - /* Reverse : TRUE. */ - /* */ - /* For more information on the Rocksoft^tm Model CRC Algorithm, */ - /* see the document titled "A Painless Guide to CRC Error */ - /* Detection Algorithms" by Ross Williams */ - /* (ross@guest.adelaide.edu.au.). This document is likely to be */ - /* in the FTP archive "ftp.adelaide.edu.au/pub/rocksoft". */ - /* */ - /*****************************************************************/ - - const ACE_UINT16 crc_table[] = - { - 0x0000, 0x1189, 0x2312, 0x329B, 0x4624, 0x57AD, 0x6536, 0x74BF, - 0x8C48, 0x9DC1, 0xAF5A, 0xBED3, 0xCA6C, 0xDBE5, 0xE97E, 0xF8F7, - 0x1081, 0x0108, 0x3393, 0x221A, 0x56A5, 0x472C, 0x75B7, 0x643E, - 0x9CC9, 0x8D40, 0xBFDB, 0xAE52, 0xDAED, 0xCB64, 0xF9FF, 0xE876, - 0x2102, 0x308B, 0x0210, 0x1399, 0x6726, 0x76AF, 0x4434, 0x55BD, - 0xAD4A, 0xBCC3, 0x8E58, 0x9FD1, 0xEB6E, 0xFAE7, 0xC87C, 0xD9F5, - 0x3183, 0x200A, 0x1291, 0x0318, 0x77A7, 0x662E, 0x54B5, 0x453C, - 0xBDCB, 0xAC42, 0x9ED9, 0x8F50, 0xFBEF, 0xEA66, 0xD8FD, 0xC974, - 0x4204, 0x538D, 0x6116, 0x709F, 0x0420, 0x15A9, 0x2732, 0x36BB, - 0xCE4C, 0xDFC5, 0xED5E, 0xFCD7, 0x8868, 0x99E1, 0xAB7A, 0xBAF3, - 0x5285, 0x430C, 0x7197, 0x601E, 0x14A1, 0x0528, 0x37B3, 0x263A, - 0xDECD, 0xCF44, 0xFDDF, 0xEC56, 0x98E9, 0x8960, 0xBBFB, 0xAA72, - 0x6306, 0x728F, 0x4014, 0x519D, 0x2522, 0x34AB, 0x0630, 0x17B9, - 0xEF4E, 0xFEC7, 0xCC5C, 0xDDD5, 0xA96A, 0xB8E3, 0x8A78, 0x9BF1, - 0x7387, 0x620E, 0x5095, 0x411C, 0x35A3, 0x242A, 0x16B1, 0x0738, - 0xFFCF, 0xEE46, 0xDCDD, 0xCD54, 0xB9EB, 0xA862, 0x9AF9, 0x8B70, - 0x8408, 0x9581, 0xA71A, 0xB693, 0xC22C, 0xD3A5, 0xE13E, 0xF0B7, - 0x0840, 0x19C9, 0x2B52, 0x3ADB, 0x4E64, 0x5FED, 0x6D76, 0x7CFF, - 0x9489, 0x8500, 0xB79B, 0xA612, 0xD2AD, 0xC324, 0xF1BF, 0xE036, - 0x18C1, 0x0948, 0x3BD3, 0x2A5A, 0x5EE5, 0x4F6C, 0x7DF7, 0x6C7E, - 0xA50A, 0xB483, 0x8618, 0x9791, 0xE32E, 0xF2A7, 0xC03C, 0xD1B5, - 0x2942, 0x38CB, 0x0A50, 0x1BD9, 0x6F66, 0x7EEF, 0x4C74, 0x5DFD, - 0xB58B, 0xA402, 0x9699, 0x8710, 0xF3AF, 0xE226, 0xD0BD, 0xC134, - 0x39C3, 0x284A, 0x1AD1, 0x0B58, 0x7FE7, 0x6E6E, 0x5CF5, 0x4D7C, - 0xC60C, 0xD785, 0xE51E, 0xF497, 0x8028, 0x91A1, 0xA33A, 0xB2B3, - 0x4A44, 0x5BCD, 0x6956, 0x78DF, 0x0C60, 0x1DE9, 0x2F72, 0x3EFB, - 0xD68D, 0xC704, 0xF59F, 0xE416, 0x90A9, 0x8120, 0xB3BB, 0xA232, - 0x5AC5, 0x4B4C, 0x79D7, 0x685E, 0x1CE1, 0x0D68, 0x3FF3, 0x2E7A, - 0xE70E, 0xF687, 0xC41C, 0xD595, 0xA12A, 0xB0A3, 0x8238, 0x93B1, - 0x6B46, 0x7ACF, 0x4854, 0x59DD, 0x2D62, 0x3CEB, 0x0E70, 0x1FF9, - 0xF78F, 0xE606, 0xD49D, 0xC514, 0xB1AB, 0xA022, 0x92B9, 0x8330, - 0x7BC7, 0x6A4E, 0x58D5, 0x495C, 0x3DE3, 0x2C6A, 0x1EF1, 0x0F78 - }; - - /*****************************************************************/ - /* End of CRC Lookup Table */ - /*****************************************************************/ -} - -#define COMPUTE(var, ch) (var) = static_cast (crc_table[(var ^ ch) & 0xFF] ^ (var >> 8)) - -// Open versioned namespace, if enabled by the user. -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_UINT16 -ACE::crc_ccitt (const char *string) -{ - ACE_UINT16 crc = 0xFFFF; - - for (const char *p = string; - *p != 0; - ++p) - { - COMPUTE (crc, *p); - } - - return static_cast (~crc); -} - -ACE_UINT16 -ACE::crc_ccitt (const void *buffer, size_t len, ACE_UINT16 crc) -{ - crc = static_cast (~crc); - - for (const char *p = (const char *) buffer, - *e = (const char *) buffer + len; - p != e; - ++p) - { - COMPUTE (crc, *p); - } - - return static_cast (~crc); -} - -ACE_UINT16 -ACE::crc_ccitt (const iovec *iov, int len, ACE_UINT16 crc) -{ - crc = static_cast (~crc); - - for (int i = 0; i < len; ++i) - { - for (const char *p = (const char *) iov[i].iov_base, - *e = (const char *) iov[i].iov_base + iov[i].iov_len; - p != e; - ++p) - COMPUTE (crc, *p); - } - - return static_cast (~crc); -} - -// Close versioned namespace, if enabled by the user. -ACE_END_VERSIONED_NAMESPACE_DECL - -#undef COMPUTE diff --git a/modules/worldengine/deps/acelite/ace/ACE_export.h b/modules/worldengine/deps/acelite/ace/ACE_export.h deleted file mode 100644 index 74c62ec34d..0000000000 --- a/modules/worldengine/deps/acelite/ace/ACE_export.h +++ /dev/null @@ -1,74 +0,0 @@ -// -*- C++ -*- -// $Id: ACE_export.h 91683 2010-09-09 09:07:49Z johnnyw $ -// Definition for Win32 Export directives. -// This file is generated automatically by -// generate_export_file.pl -// ------------------------------ - -#ifndef ACE_EXPORT_H -#define ACE_EXPORT_H - -#include "ace/config-lite.h" - -#if defined (ACE_AS_STATIC_LIBS) - -# if !defined (ACE_HAS_DLL) -# define ACE_HAS_DLL 0 -# endif /* ! ACE_HAS_DLL */ -#else -# if !defined (ACE_HAS_DLL) -# define ACE_HAS_DLL 1 -# endif /* ! ACE_HAS_DLL */ -#endif /* ACE_AS_STATIC_LIB */ - -#if defined (ACE_HAS_DLL) -# if (ACE_HAS_DLL == 1) -# if defined (ACE_BUILD_DLL) -# define ACE_Export ACE_Proper_Export_Flag -# define ACE_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) -# define ACE_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# else -# define ACE_Export ACE_Proper_Import_Flag -# define ACE_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) -# define ACE_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# endif /* ACE_BUILD_DLL */ -# else -# define ACE_Export -# define ACE_SINGLETON_DECLARATION(T) -# define ACE_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# endif /* ! ACE_HAS_DLL == 1 */ -#else -# define ACE_Export -# define ACE_SINGLETON_DECLARATION(T) -# define ACE_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -#endif /* ACE_HAS_DLL */ - -// Added by hand to help with ACE_OS namespace -#if defined (__TANDEM) && defined (USE_EXPLICIT_EXPORT) -#define ACE_NAMESPACE_STORAGE_CLASS ACE_EXPORT_MACRO extern -#else -#define ACE_NAMESPACE_STORAGE_CLASS extern ACE_EXPORT_MACRO -#endif - -#if defined (__ACE_INLINE__) -# if defined (_MSC_VER) || defined (__MINGW32__) || defined (CYGWIN32) || \ - (defined (__SUNPRO_CC) && __SUNPRO_CC >= 0x560) || \ - (defined (__HP_aCC) && (__HP_aCC >= 60500)) -# define ACE_NAMESPACE_INLINE_FUNCTION inline -# else -# define ACE_NAMESPACE_INLINE_FUNCTION ACE_NAMESPACE_STORAGE_CLASS inline -# endif -# define ACE_INLINE_TEMPLATE_FUNCTION inline -#else -# define ACE_NAMESPACE_INLINE_FUNCTION ACE_NAMESPACE_STORAGE_CLASS -// Microsoft Visual C++ will accept 'extern'; others refuse. -# if defined (_MSC_VER) || defined (__BORLANDC__) -# define ACE_INLINE_TEMPLATE_FUNCTION ACE_Export -# else -# define ACE_INLINE_TEMPLATE_FUNCTION -# endif -#endif - -#endif /* ACE_EXPORT_H */ - -// End of auto generated file. diff --git a/modules/worldengine/deps/acelite/ace/ARGV.cpp b/modules/worldengine/deps/acelite/ace/ARGV.cpp deleted file mode 100644 index 8ad1fc001c..0000000000 --- a/modules/worldengine/deps/acelite/ace/ARGV.cpp +++ /dev/null @@ -1,379 +0,0 @@ -#ifndef ACE_ARGV_CPP -#define ACE_ARGV_CPP - -#include "ace/Log_Category.h" -#include "ace/OS_NS_unistd.h" -#include "ace/OS_NS_string.h" -#include "ace/OS_Memory.h" - -#if !defined (__ACE_INLINE__) -#include "ace/ARGV.inl" -#endif /* __ACE_INLINE__ */ - -// Open versioned namespace, if enabled by the user. -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_ALLOC_HOOK_DEFINE (ACE_ARGV_Queue_Entry) -ACE_ALLOC_HOOK_DEFINE (ACE_ARGV) - -template -void -ACE_ARGV_Queue_Entry_T::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_ARGV_Queue_Entry_T::dump"); - - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("arg_ = %s"), this->arg_)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("quote_arg_ = %d"), (int)this->quote_arg_)); - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} - -template -void -ACE_ARGV_T::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_ARGV_T::dump"); - - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("argc_ = %d"), this->argc_)); - - ACE_ARGV *this_obj = const_cast (this); - - for (int i = 0; i < this->argc_; i++) - ACELIB_DEBUG ((LM_DEBUG, - ACE_TEXT ("\nargv_[%i] = %s"), - i, - this_obj->argv ()[i])); - - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("\nbuf = %s\n"), this->buf_)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("\n"))); - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} - -// Creates this->argv_ out of this->buf_. New memory is allocated for -// each element of the array. This is used by the array-to-string -// style constructor and for creating this->argv_ when in iterative -// mode. - -template -int -ACE_ARGV_T::string_to_argv (void) -{ - ACE_TRACE ("ACE_ARGV_T::string_to_argv"); - - return ACE_OS::string_to_argv (this->buf_, - this->argc_, - this->argv_, - this->substitute_env_args_); -} - -template -ACE_ARGV_T::ACE_ARGV_T (const CHAR_TYPE buf[], - bool substitute_env_args) - : substitute_env_args_ (substitute_env_args), - iterative_ (false), - argc_ (0), - argv_ (0), - buf_ (0), - length_ (0), - queue_ () -{ - ACE_TRACE ("ACE_ARGV_T::ACE_ARGV_T CHAR_TYPE[] to CHAR_TYPE *[]"); - - if (buf == 0 || buf[0] == 0) - return; - - // Make an internal copy of the string. - ACE_NEW (this->buf_, - CHAR_TYPE[ACE_OS::strlen (buf) + 1]); - ACE_OS::strcpy (this->buf_, buf); - - // Create this->argv_. - if (this->string_to_argv () == -1) - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("%p\n"), - ACE_TEXT ("string_to_argv"))); -} - -template -ACE_ARGV_T::ACE_ARGV_T (CHAR_TYPE *argv[], - bool substitute_env_args, - bool quote_arg) - : substitute_env_args_ (substitute_env_args), - iterative_ (false), - argc_ (0), - argv_ (0), - buf_ (0), - length_ (0), - queue_ () -{ - ACE_TRACE ("ACE_ARGV_T::ACE_ARGV_T CHAR_TYPE*[] to CHAR_TYPE[]"); - - if (argv == 0 || argv[0] == 0) - return; - - this->argc_ = ACE_OS::argv_to_string (argv, - this->buf_, - substitute_env_args, - quote_arg); -} - -template -ACE_ARGV_T::ACE_ARGV_T (int argc, - CHAR_TYPE *argv[], - bool substitute_env_args, - bool quote_arg) - : substitute_env_args_ (substitute_env_args), - iterative_ (false), - argc_ (0), - argv_ (0), - buf_ (0), - length_ (0), - queue_ () -{ - ACE_TRACE ("ACE_ARGV_T::ACE_ARGV_T int,CHAR_TYPE*[] to CHAR_TYPE[]"); - - this->argc_ = ACE_OS::argv_to_string (argc, - argv, - this->buf_, - substitute_env_args, - quote_arg); -} - - -template -ACE_ARGV_T::ACE_ARGV_T (CHAR_TYPE *first_argv[], - CHAR_TYPE *second_argv[], - bool substitute_env_args, - bool quote_args) - : substitute_env_args_ (substitute_env_args), - iterative_ (false), - argc_ (0), - argv_ (0), - buf_ (0), - length_ (0), - queue_ () -{ - ACE_TRACE ("ACE_ARGV_T::ACE_ARGV_T CHAR_TYPE*[] + CHAR_TYPE *[] to CHAR_TYPE[]"); - - int first_argc = 0; - int second_argc = 0; - - CHAR_TYPE *first_buf = 0; - CHAR_TYPE *second_buf = 0; - size_t buf_len = 1; - - // convert the first argv to a string - if (first_argv != 0 && first_argv[0] != 0) - { - first_argc = ACE_OS::argv_to_string (first_argv, - first_buf, - substitute_env_args, - quote_args); - buf_len += ACE_OS::strlen (first_buf); - } - - // convert the second argv to a string - if (second_argv != 0 && second_argv[0] != 0) - { - second_argc = ACE_OS::argv_to_string (second_argv, - second_buf, - substitute_env_args, - quote_args); - buf_len += ACE_OS::strlen (second_buf); - } - - // Add the number of arguments in both the argvs. - this->argc_ = first_argc + second_argc; - - // Allocate memory to the lenght of the combined argv string. - ACE_NEW (this->buf_, - CHAR_TYPE[buf_len + 1]); - - // copy the first argv string to the buffer - ACE_OS::strcpy (this->buf_, first_buf); - - // concatenate the second argv string to the buffer - ACE_OS::strcat (this->buf_, second_buf); - - // Delete the first and second buffers - delete [] first_buf; - delete [] second_buf; -} - -template -ACE_ARGV_T::ACE_ARGV_T (bool substitute_env_args) - : substitute_env_args_ (substitute_env_args), - iterative_ (true), - argc_ (0), - argv_ (0), - buf_ (0), - length_ (0), - queue_ () -{ - ACE_TRACE ("ACE_ARGV_T::ACE_ARGV_T Iterative"); - - // Nothing to do yet -- the user puts in arguments via add () -} - -template -int -ACE_ARGV_T::add (const CHAR_TYPE *next_arg, bool quote_arg) -{ - // Only allow this to work in the "iterative" verion -- the - // ACE_ARGVs created with the one argument constructor. - if (!this->iterative_) - { - errno = EINVAL; - return -1; - } - - this->length_ += ACE_OS::strlen (next_arg); - if (quote_arg && ACE_OS::strchr (next_arg, ' ') != 0) - { - this->length_ += 2; - if (ACE_OS::strchr (next_arg, '"') != 0) - for (const CHAR_TYPE * p = next_arg; *p != '\0'; ++p) - if (*p == '"') ++this->length_; - } - else - { - quote_arg = false; - } - - // Put the new argument at the end of the queue. - if (this->queue_.enqueue_tail (ACE_ARGV_Queue_Entry_T (next_arg, quote_arg)) == -1) - ACELIB_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("Can't add more to ARGV queue")), - -1); - - ++this->argc_; - - // Wipe argv_ and buf_ away so that they will be recreated if the - // user calls argv () or buf (). - if (this->argv_ != 0) - { - for (int i = 0; this->argv_[i] != 0; i++) - ACE_OS::free ((void *) this->argv_[i]); - - delete [] this->argv_; - this->argv_ = 0; - } - - delete [] this->buf_; - this->buf_ = 0; - - return 0; -} - -template -int -ACE_ARGV_T::add (CHAR_TYPE *argv[], bool quote_args) -{ - for (int i = 0; argv[i] != 0; i++) - if (this->add (argv[i], quote_args) == -1) - return -1; - - return 0; -} - -// Free up argv_ and buf_ - -template -ACE_ARGV_T::~ACE_ARGV_T (void) -{ - ACE_TRACE ("ACE_ARGV_T::~ACE_ARGV_T"); - - if (this->argv_ != 0) - for (int i = 0; this->argv_[i] != 0; i++) - ACE_OS::free ((void *) this->argv_[i]); - - delete [] this->argv_; - delete [] this->buf_; -} - -// Create buf_ out of the queue_. This is only used in the -// "iterative" mode. - -template -int -ACE_ARGV_T::create_buf_from_queue (void) -{ - ACE_TRACE ("ACE_ARGV_T::create_buf_from_queue"); - - // If the are no arguments, don't do anything - if (this->argc_ <= 0) - return -1; - - delete [] this->buf_; - - ACE_NEW_RETURN (this->buf_, - CHAR_TYPE[this->length_ + this->argc_], - -1); - - // Get an iterator over the queue - ACE_Unbounded_Queue_Iterator > iter (this->queue_); - - ACE_ARGV_Queue_Entry_T *arg = 0; - CHAR_TYPE *ptr = this->buf_; - size_t len; - - while (!iter.done ()) - { - // Get next argument from the queue. - iter.next (arg); - iter.advance (); - - if (arg->quote_arg_) - { - *ptr++ = '"'; - if (ACE_OS::strchr (arg->arg_, '"') != 0) - { - CHAR_TYPE prev = 0; - for (const CHAR_TYPE * p = arg->arg_; *p != '\0'; ++p) - { - if (*p == '"' && prev != '\\') *ptr++ = '\\'; - prev = *ptr++ = *p; - } - } - else - { - len = ACE_OS::strlen (arg->arg_); - // Copy the argument into buf_ - ACE_OS::memcpy ((void *) ptr, - (const void *) (arg->arg_), - len * sizeof (CHAR_TYPE)); - // Move the pointer down. - ptr += len; - } - *ptr++ = '"'; - } - else - { - len = ACE_OS::strlen (arg->arg_); - // Copy the argument into buf_ - ACE_OS::memcpy ((void *) ptr, - (const void *) (arg->arg_), - len * sizeof (CHAR_TYPE)); - // Move the pointer down. - ptr += len; - } - - // Put in an argument separating space. - *ptr++ = ' '; - } - - // Put in the NUL terminator - ptr[-1] = '\0'; - - return 0; -} - -// Close versioned namespace, if enabled by the user. -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_ARGV_CPP */ diff --git a/modules/worldengine/deps/acelite/ace/ARGV.h b/modules/worldengine/deps/acelite/ace/ARGV.h deleted file mode 100644 index 1c291bd6ed..0000000000 --- a/modules/worldengine/deps/acelite/ace/ARGV.h +++ /dev/null @@ -1,333 +0,0 @@ -// -*- C++ -*- - -//========================================================================== -/** - * @file ARGV.h - * - * $Id: ARGV.h 95972 2012-07-26 10:20:42Z johnnyw $ - * - * @author Doug Schmidt - * @author Everett Anderson - */ -//========================================================================== - -#ifndef ACE_ARGUMENT_VECTOR_H -#define ACE_ARGUMENT_VECTOR_H -#include /**/ "ace/pre.h" - -#include /**/ "ace/ACE_export.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Global_Macros.h" -#include "ace/Unbounded_Queue.h" - -// Open versioned namespace, if enabled by the user. -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_ARGV_Queue_Entry_T - * - * @brief An entry in the queue which keeps user supplied arguments. - */ -template -class ACE_ARGV_Queue_Entry_T -{ -public: - // = Initialization and termination. - /// Initialize a ACE_ARGV_Queue_Entry_T. - ACE_ARGV_Queue_Entry_T (void); - - /** - * Initialize a ACE_ARGV_Queue_Entry_T. - * - * @param arg Pointer to an argument - * - * @param quote_arg The argument @a arg need to be quoted - * while adding to the vector. - */ - ACE_ARGV_Queue_Entry_T (const CHAR_TYPE *arg, - bool quote_arg); - - /** - * Initialize a ACE_ARGV_Queue_Entry_T. - * - * @param entry Pointer to a queue entry - */ - ACE_ARGV_Queue_Entry_T (const ACE_ARGV_Queue_Entry_T &entry); - - /// We need this destructor to keep some compilers from complaining. - /// It's just a no-op, however. - ~ACE_ARGV_Queue_Entry_T (void); - - /// Dump the state of this object. - void dump (void) const; - - // Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - - /// Pointer to the argument. - const CHAR_TYPE * arg_; - - /// The argument need to be quoted while adding to the vector. - bool quote_arg_; -}; - -/** - * @class ACE_ARGV_T - * - * @brief Builds a counted argument vector (ala argc/argv) from either - * a string or a set of separate tokens. This class preserves whitespace - * within tokens only if the whitespace-containing token is enclosed in - * either single (') or double (") quotes. This is consistent with the - * expected behavior if an argument vector obtained using this class is - * passed to, for example, ACE_Get_Opt. - * - * This class can substitute environment variable values for tokens that - * are environment variable references (e.g., @c $VAR). This only works - * if the token is an environment variable reference and nothing else; it - * doesn't substitute environment variable references within a token. - * For example, @c $HOME/file will not substitute the value of the HOME - * environment variable. - */ -template -class ACE_ARGV_T -{ -public: - // = Initialization and termination. - /** - * Splits the specified string into an argument vector. Arguments in the - * string are delimited by whitespace. Whitespace-containing arguments - * must be enclosed in quotes, either single (') or double ("). - * - * @param buf A nul-terminated CHAR_TYPE array to split into arguments - * for the vector. - * - * @param substitute_env_args If non-zero, any token that is an - * environment variable reference (e.g., @c $VAR) will have - * its environment variable value in the resultant vector - * in place of the environment variable name. - */ - explicit ACE_ARGV_T (const CHAR_TYPE buf[], - bool substitute_env_args = true); - - /** - * Initializes the argument vector from a set of arguments. Any environment - * variable references are translated (if applicable) during execution of - * this method. In contrast with ACE_ARGV_T(CHAR_TYPE *[], bool, bool), this - * ctor does not require argv to be 0-terminated as the number of arguments - * is provided explicitely. - * - * @param argc The number of arguments in the argv array. - * - * @param argv An array of tokens to initialize the object with. All needed - * data is copied from @a argv during this call; the pointers - * in @a argv are not needed after this call, and the memory - * referred to by @a argv is not referenced by this object. - * - * @param substitute_env_args If non-zero, any element of @a argv that is - * an environment variable reference (e.g., @c $VAR) will have - * its environment variable value in the resultant vector - * in place of the environment variable name. - * - * @param quote_args If non-zero each argument @a argv[i] needs to - * be enclosed in double quotes ('"'). - */ - explicit ACE_ARGV_T (int argc, - CHAR_TYPE *argv[], - bool substitute_env_args = true, - bool quote_args = false); - - /** - * Initializes the argument vector from a set of arguments. Any environment - * variable references are translated (if applicable) during execution of - * this method. - * - * @param argv An array of tokens to initialize the object with. The - * array must be terminated with a 0 pointer. All needed - * data is copied from @a argv during this call; the pointers - * in @a argv are not needed after this call, and the memory - * referred to by @a argv is not referenced by this object. - * - * @param substitute_env_args If non-zero, any element of @a argv that is - * an environment variable reference (e.g., @c $VAR) will have - * its environment variable value in the resultant vector - * in place of the environment variable name. - * - * @param quote_args If non-zero each argument @a argv[i] needs to - * be enclosed in double quotes ('"'). - */ - explicit ACE_ARGV_T (CHAR_TYPE *argv[], - bool substitute_env_args = true, - bool quote_args = false); - - /** - * Initializes the argument vector from two combined argument vectors. - * - * @param first_argv An array of tokens to initialize the object with. - * The array must be terminated with a 0 pointer. - * @param second_argv An array of tokens that is concatenated with the - * the tokens in @a first_argv. The array must be - * terminated with a 0 pointer. - * @param substitute_env_args If non-zero, any element of @a first_argv - * or @a second_argv that is an environment variable - * reference (e.g., @c $VAR) will have its environment - * variable value in the resultant vector in place - * of the environment variable name. - * - * @param quote_args If non-zero each arguments @a first_argv[i] and - * @a second_argv[i] needs to be enclosed - * in double quotes ('"'). - */ - ACE_ARGV_T (CHAR_TYPE *first_argv[], - CHAR_TYPE *second_argv[], - bool substitute_env_args = true, - bool quote_args = false); - - /** - * Initialize this object so arguments can be added later using one - * of the add methods. This is referred to as the @i iterative method - * of adding arguments to this object. - */ - explicit ACE_ARGV_T (bool substitute_env_args = true); - - /// Destructor. - ~ACE_ARGV_T (void); - - /** @name Accessor methods - * - * These methods access the argument vector contained in this object. - */ - //@{ - /** - * Returns the specified element of the current argument vector. - * - * @param index Index to the desired element. - * - * @retval Pointer to the indexed string. - * @retval 0 if @a index is out of bounds. - */ - const CHAR_TYPE *operator[] (size_t index); - - /** - * Returns the current argument vector. The returned pointers are to data - * maintained internally to this class. Do not change or delete either the - * pointers or the memory to which they refer. - */ - CHAR_TYPE **argv (void); - - /// Returns the current number of arguments. - int argc (void) const; - - /** - * Returns a single string form of the current arguments. The returned - * pointer refers to memory maintained internally to this class. Do not - * change or delete it. - */ - const CHAR_TYPE *buf (void); - - //@} - - /// Dump the state of this object. - void dump (void) const; - - // Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - - /** - * Add another argument. This only works in the iterative mode. - * - * @note This method copies the specified pointer, but not the data - * contained in the referenced memory. Thus, if the content of - * the memory referred to by @a next_arg are changed after this - * method returns, the results are undefined. - * - * @param next_arg Pointer to the next argument to add to the vector. - * - * @param quote_arg The argument @a next_arg need to be quoted while - * adding to the vector. - * - * @retval 0 on success; -1 on failure. Most likely @c errno values are: - * - EINVAL: This object is not in iterative mode. - * - ENOMEM: Not enough memory available to save @a next_arg. - */ - int add (const CHAR_TYPE *next_arg, bool quote_arg = false); - - /** - * Add an array of arguments. This only works in the iterative mode. - * - * @note This method copies the specified pointers, but not the data - * contained in the referenced memory. Thus, if the content of - * the memory referred to by any of the @a argv elements is - * changed after this method returns, the results are undefined. - * - * @param argv Pointers to the arguments to add to the vector. - * @a argv must be terminated by a 0 pointer. - * - * @param quote_args If non-zero each argument @a argv[i] needs to - * be enclosed in double quotes ('"'). - * - * @retval 0 on success; -1 on failure. Most likely @c errno values are: - * - EINVAL: This object is not in iterative mode. - * - ENOMEM: Not enough memory available to save @a next_arg. - */ - int add (CHAR_TYPE *argv[], bool quote_args = false); - -private: - /// Copy constructor not implemented. - ACE_UNIMPLEMENTED_FUNC (ACE_ARGV_T (const ACE_ARGV_T&)) - - /// Assignment operator not implemented. - ACE_UNIMPLEMENTED_FUNC (ACE_ARGV_T operator= (const ACE_ARGV_T&)) - - /// Creates buf_ from the queue of added args, deletes previous buf_. - int create_buf_from_queue (void); - - /// Converts buf_ into the CHAR_TYPE *argv[] format. - int string_to_argv (void); - - /// Replace args with environment variable values? - bool substitute_env_args_; - - bool iterative_; - - /// Number of arguments in the ARGV array. - int argc_; - - /// The array of string arguments. - CHAR_TYPE **argv_; - - /// Buffer containing the contents. - CHAR_TYPE *buf_; - - /// Total length of the arguments in the queue, not counting - /// separating spaces - size_t length_; - - /// Queue which keeps user supplied arguments. This is only - /// active in the "iterative" mode. - ACE_Unbounded_Queue > queue_; -}; - -typedef ACE_ARGV_Queue_Entry_T ACE_ARGV_Queue_Entry; -typedef ACE_ARGV_T ACE_ARGV; - -// Close versioned namespace, if enabled by the user. -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/ARGV.inl" -#endif /* __ACE_INLINE__ */ - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "ace/ARGV.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("ARGV.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ - -#include /**/ "ace/post.h" -#endif /* ACE_ARGUMENT_VECTOR_H */ diff --git a/modules/worldengine/deps/acelite/ace/ARGV.inl b/modules/worldengine/deps/acelite/ace/ARGV.inl deleted file mode 100644 index fdc5b13d7c..0000000000 --- a/modules/worldengine/deps/acelite/ace/ARGV.inl +++ /dev/null @@ -1,104 +0,0 @@ -/* -*- C++ -*- */ -// $Id: ARGV.inl 80826 2008-03-04 14:51:23Z wotte $ - -#include "ace/Global_Macros.h" - -// Open versioned namespace, if enabled by the user. -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -template ACE_INLINE -ACE_ARGV_Queue_Entry_T::ACE_ARGV_Queue_Entry_T (void) - : arg_(0), - quote_arg_(false) -{ - // No-op -} - -template ACE_INLINE -ACE_ARGV_Queue_Entry_T::ACE_ARGV_Queue_Entry_T (const CHAR_TYPE *arg, - bool quote_arg) - : arg_(arg), - quote_arg_(quote_arg) -{ - // No-op -} - -template ACE_INLINE -ACE_ARGV_Queue_Entry_T::ACE_ARGV_Queue_Entry_T (const ACE_ARGV_Queue_Entry_T &entry) - : arg_(entry.arg_), - quote_arg_(entry.quote_arg_) -{ - // No-op -} - -template ACE_INLINE -ACE_ARGV_Queue_Entry_T::~ACE_ARGV_Queue_Entry_T (void) -{ - // No-op just to keep some compilers happy... -} - -// Return the number of args -template -ACE_INLINE int -ACE_ARGV_T::argc (void) const -{ - ACE_TRACE ("ACE_ARGV_T::argc"); - // Try to create the argv_ if it isn't there - ACE_ARGV_T *nonconst_this = - const_cast *> (this); - (void) nonconst_this->argv (); - return this->argc_; -} - -// Return the arguments in a space-separated string -template -ACE_INLINE const CHAR_TYPE * -ACE_ARGV_T::buf (void) -{ - ACE_TRACE ("ACE_ARGV_T::buf"); - - if (this->buf_ == 0 && this->iterative_) - this->create_buf_from_queue (); - - return (const CHAR_TYPE *) this->buf_; -} - -// Return the arguments in an entry-per-argument array - -template -ACE_INLINE CHAR_TYPE ** -ACE_ARGV_T::argv (void) -{ - ACE_TRACE ("ACE_ARGV_T::argv"); - - // Try to create the argv_ if it isn't there - if (this->argv_ == 0) - { - if (this->iterative_ && this->buf_ == 0) - this->create_buf_from_queue (); - - // Convert buf_ to argv_ - if (this->string_to_argv () == -1) - return (CHAR_TYPE **) 0; - } - - return (CHAR_TYPE **) this->argv_; -} - -// Subscript operator. - -template -ACE_INLINE const CHAR_TYPE * -ACE_ARGV_T::operator[] (size_t i) -{ - ACE_TRACE ("ACE_ARGV_T::operator[]"); - - // Don't go out of bounds. - if (i >= static_cast (this->argc_)) - return 0; - - return (const CHAR_TYPE *) this->argv ()[i]; -} - -// Close versioned namespace, if enabled by the user. -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/ATM_Acceptor.cpp b/modules/worldengine/deps/acelite/ace/ATM_Acceptor.cpp deleted file mode 100644 index db7d676585..0000000000 --- a/modules/worldengine/deps/acelite/ace/ATM_Acceptor.cpp +++ /dev/null @@ -1,307 +0,0 @@ -#include "ace/ATM_Acceptor.h" - - - -#if defined (ACE_HAS_ATM) - -#if defined (ACE_HAS_LINUX_ATM) -#include /**/ "linux/atmdev.h" -#endif /* ACE_HAS_LINUX_ATM */ - -#if !defined (__ACE_INLINE__) -#include "ace/ATM_Acceptor.inl" -#endif /* __ACE_INLINE__ */ - - -// Open versioned namespace, if enabled by the user. -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -// Put the actual definitions of the ACE_ATM_Request and -// ACE_ATM_Request_Queue classes here to hide them from clients... - -ACE_ALLOC_HOOK_DEFINE(ACE_ATM_Acceptor) - -ACE_ATM_Acceptor::ACE_ATM_Acceptor (void) -{ - ACE_TRACE ("ACE_ATM_Acceptor::ACE_ATM_Acceptor"); -} - -ACE_ATM_Acceptor::~ACE_ATM_Acceptor (void) -{ - ACE_TRACE ("ACE_ATM_Acceptor::~ACE_ATM_Acceptor"); -} - -int -ACE_ATM_Acceptor::get_local_addr (ACE_ATM_Addr &local_addr) -{ - ACE_TRACE ("ACE_ATM_Acceptor::get_local_addr"); - -#if defined (ACE_HAS_FORE_ATM_WS2) - unsigned long ret = 0; - DWORD deviceID = 0; - ATM_ADDRESS addr; - struct sockaddr_atm *laddr; - - if (::WSAIoctl ((int) ((ACE_SOCK_Acceptor *)this) -> get_handle (), - SIO_GET_ATM_ADDRESS, - (LPVOID) &deviceID, - sizeof (DWORD), - (LPVOID)&addr, - sizeof (ATM_ADDRESS), - &ret, - 0, - 0) == SOCKET_ERROR) { - ACE_OS::printf ("ATM_Acceptor (get_local_addr): WSIoctl: %d\n", - ::WSAGetLastError ()); - return -1; - } - - laddr = (struct sockaddr_atm *)local_addr.get_addr (); - ACE_OS::memcpy ((void *)& (laddr -> satm_number), - (void *)&addr, - ATM_ADDR_SIZE - 1); - - return 0; -#elif defined (ACE_HAS_FORE_ATM_XTI) - ACE_UNUSED_ARG (local_addr); - - return 0; -#elif defined (ACE_HAS_LINUX_ATM) - ATM_Addr *myaddr = (ATM_Addr *)local_addr.get_addr (); - int addrlen = sizeof (myaddr->sockaddratmsvc); - - if (ACE_OS::getsockname (acceptor_.get_handle (), - (struct sockaddr *) & (myaddr->sockaddratmsvc), - &addrlen) < 0) { - ACELIB_DEBUG ((LM_DEBUG, - ACE_TEXT ("ATM_Acceptor (get_local_addr): ioctl: %d\n"), - errno)); - return -1; - } - - return 0; -#else - ACE_UNUSED_ARG (local_addr); - - return 0; -#endif /* ACE_HAS_FORE_ATM_WS2 && ACE_HAS_FORE_ATM_XTI */ -} - -ACE_HANDLE -ACE_ATM_Acceptor::open (const ACE_Addr &remote_sap, - int backlog, - ACE_ATM_Params params) -{ - ACE_TRACE ("ACE_ATM_Acceptor::open"); -#if defined (ACE_HAS_FORE_ATM_XTI) - ACE_HANDLE handle = acceptor_.open (remote_sap, - params.get_reuse_addr (), - params.get_oflag (), - params.get_info (), - backlog, - params.get_device ()); - return (handle == ACE_INVALID_HANDLE ? -1 : 0); -#elif defined (ACE_HAS_FORE_ATM_WS2) - struct sockaddr_atm local_atm_addr; - ACE_HANDLE ret; - DWORD flags = 0; - - /* Create a local endpoint of communication */ - - // Only leaves can listen. - flags = ACE_FLAG_MULTIPOINT_C_LEAF | ACE_FLAG_MULTIPOINT_D_LEAF; - - if ((ret = ACE_OS::socket (AF_ATM, - SOCK_RAW, - ATMPROTO_AAL5, - 0, - 0, - flags)) - == ACE_INVALID_HANDLE) { - ACE_OS::printf ("Acceptor (open): socket %d\n", - ::WSAGetLastError ()); - return (ret); - } - - ((ACE_SOCK_Acceptor *)this) -> set_handle (ret); - - /* Set up the address information to become a server */ - ACE_OS::memset ((void *) &local_atm_addr, 0, sizeof local_atm_addr); - local_atm_addr.satm_family = AF_ATM; - local_atm_addr.satm_number.AddressType = SAP_FIELD_ANY_AESA_REST; - local_atm_addr.satm_number.Addr[ ATM_ADDR_SIZE - 1 ] - = ((ACE_ATM_Addr *)&remote_sap) -> get_selector (); - local_atm_addr.satm_blli.Layer2Protocol = SAP_FIELD_ANY; - local_atm_addr.satm_blli.Layer3Protocol = SAP_FIELD_ABSENT; - local_atm_addr.satm_bhli.HighLayerInfoType = SAP_FIELD_ABSENT; - - /* Associate address with endpoint */ - if (ACE_OS::bind (((ACE_SOCK_Acceptor *)this) -> get_handle (), - reinterpret_cast (&local_atm_addr), - sizeof local_atm_addr) == -1) { - ACE_OS::printf ("Acceptor (open): bind %d\n", ::WSAGetLastError ()); - return (ACE_INVALID_HANDLE); - } - - /* Make endpoint listen for service requests */ - if (ACE_OS::listen (( (ACE_SOCK_Acceptor *)this) -> get_handle (), - backlog) - == -1) { - ACE_OS::printf ("Acceptor (open): listen %d\n", ::WSAGetLastError ()); - return (ACE_INVALID_HANDLE); - } - - return 0; -#elif defined (ACE_HAS_LINUX_ATM) - //we need to set the qos before binding to the socket - //use remote_sap as local_sap - - ACE_ATM_Addr local_sap; - ATM_Addr *local_sap_addr = (ATM_Addr*)local_sap.get_addr (); - ACE_ATM_QoS def_qos; - ATM_QoS qos = def_qos.get_qos (); - - ACE_HANDLE handle; - if ((handle = ACE_OS::socket (params.get_protocol_family (), - params.get_type (), - params.get_protocol (), - params.get_protocol_info (), - params.get_sock_group (), - params.get_flags () - )) - == ACE_INVALID_HANDLE) { - ACELIB_DEBUG (LM_DEBUG, - ACE_TEXT ("Acceptor (socket): socket %d\n"), - errno); - return (ACE_INVALID_HANDLE); - } - - ((ACE_SOCK_Acceptor *)this) -> set_handle (handle); - if (ACE_OS::setsockopt (handle, - SOL_ATM, - SO_ATMQOS, - reinterpret_cast (&qos), - sizeof (qos)) < 0) { - ACE_OS::printf ("Acceptor (setsockopt): setsockopt:%d\n", - errno); - } - - struct atmif_sioc req; - struct sockaddr_atmsvc aux_addr[1024]; - - req.number = 0; - req.arg = aux_addr; - req.length = sizeof (aux_addr); - if (ACE_OS::ioctl (handle, - ATM_GETADDR, - &req) < 0) { - ACE_OS::perror ("Acceptor (setsockopt): ioctl:"); - } - else { - local_sap_addr->sockaddratmsvc = aux_addr[0]; - } - local_sap.set_selector (( (ACE_ATM_Addr*)&remote_sap)->get_selector ()); - - if (ACE_OS::bind (handle, - reinterpret_cast ( - &(local_sap_addr->sockaddratmsvc)), - sizeof (local_sap_addr->sockaddratmsvc) - ) == -1) { - ACELIB_DEBUG (LM_DEBUG, - ACE_TEXT ("Acceptor (open): bind %d\n"), - errno); - return -1; - } - // Make endpoint listen for service requests - if (ACE_OS::listen (handle, - backlog) - == -1) { - ACELIB_DEBUG (LM_DEBUG, - ACE_TEXT ("Acceptor (listen): listen %d\n"), - errno); - return -1; - } - - return 0; -#else - ACE_UNUSED_ARG (remote_sap); - ACE_UNUSED_ARG (backlog); - ACE_UNUSED_ARG (params); -#endif /* ACE_HAS_FORE_ATM_XTI/ACE_HAS_FORE_ATM_WS2/ACE_HAS_LINUX_ATM */ -} - -int -ACE_ATM_Acceptor::accept (ACE_ATM_Stream &new_sap, - ACE_Addr *remote_addr, - ACE_Time_Value *timeout, - bool restart, - bool reset_new_handle, - ACE_ATM_Params params, - ACE_ATM_QoS qos) -{ - ACE_TRACE ("ACE_ATM_Acceptor::accept"); -#if defined (ACE_HAS_FORE_ATM_XTI) - ATM_QoS optbuf = qos.get_qos (); - - return (acceptor_.accept (new_sap.get_stream (), - remote_addr, - timeout, - restart, - reset_new_handle, - params.get_rw_flag (), - params.get_user_data (), - &optbuf)); -#elif defined (ACE_HAS_FORE_ATM_WS2) - ACE_HANDLE n_handle; - ACE_HANDLE s_handle = ((ACE_SOCK_Acceptor *) this) -> get_handle (); - struct sockaddr_atm *cli_addr - = (struct sockaddr_atm *)remote_addr -> get_addr (); - int caddr_len = sizeof (struct sockaddr_atm); - - do { - n_handle = ACE_OS::accept (s_handle, - reinterpret_cast (cli_addr), - &caddr_len); - } while (n_handle == ACE_INVALID_HANDLE && errno == EINTR); - - ((ACE_ATM_Addr *)remote_addr) -> set (cli_addr, - ((ACE_ATM_Addr *)remote_addr) -> get_selector ()); - ((ACE_IPC_SAP *)&new_sap) -> set_handle (n_handle); - - return 0; -#elif defined (ACE_HAS_LINUX_ATM) - ACE_UNUSED_ARG (params); - - ACE_HANDLE s_handle = ((ACE_SOCK_Acceptor *) this) -> get_handle (); - struct atm_qos accept_qos = qos.get_qos (); - - if (ACE_OS::setsockopt (s_handle, - SOL_ATM, - SO_ATMQOS, - reinterpret_cast (&accept_qos), - sizeof (accept_qos)) < 0) { - ACE_OS::printf ("Acceptor (accept): error setting Qos"); - } - - return (acceptor_.accept (new_sap.get_stream (), - remote_addr, - timeout, - restart, - reset_new_handle)); -#else - ACE_UNUSED_ARG (new_sap); - ACE_UNUSED_ARG (remote_addr); - ACE_UNUSED_ARG (timeout); - ACE_UNUSED_ARG (restart); - ACE_UNUSED_ARG (reset_new_handle); - ACE_UNUSED_ARG (params); - ACE_UNUSED_ARG (qos); - return 0; -#endif /* ACE_HAS_FORE_ATM_XTI */ -} - -// Close versioned namespace, if enabled by the user. -ACE_END_VERSIONED_NAMESPACE_DECL - - -#endif /* ACE_HAS_ATM */ diff --git a/modules/worldengine/deps/acelite/ace/ATM_Acceptor.h b/modules/worldengine/deps/acelite/ace/ATM_Acceptor.h deleted file mode 100644 index 736c980d6f..0000000000 --- a/modules/worldengine/deps/acelite/ace/ATM_Acceptor.h +++ /dev/null @@ -1,121 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file ATM_Acceptor.h - * - * @author Joe Hoffert - */ -//============================================================================= - - -#ifndef ACE_ATM_ACCEPTOR_H -#define ACE_ATM_ACCEPTOR_H -#include /**/ "ace/pre.h" - -#include /**/ "ace/config-all.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#if defined (ACE_HAS_ATM) - -#include "ace/ATM_Stream.h" -#include "ace/ATM_Params.h" -#include "ace/ATM_QoS.h" - -#if defined (ACE_HAS_LINUX_ATM) -#include /**/ "atm.h" -#endif /* ACE_HAS_LINUX_ATM */ - -#if defined (ACE_HAS_FORE_ATM_WS2) || defined (ACE_HAS_LINUX_ATM) -#include "ace/SOCK_Acceptor.h" -ACE_BEGIN_VERSIONED_NAMESPACE_DECL -typedef ACE_SOCK_Acceptor ATM_Acceptor; -ACE_END_VERSIONED_NAMESPACE_DECL -#elif defined (ACE_HAS_FORE_ATM_XTI) -#include "ace/TLI_Acceptor.h" -ACE_BEGIN_VERSIONED_NAMESPACE_DECL -typedef ACE_TLI_Acceptor ATM_Acceptor; -ACE_END_VERSIONED_NAMESPACE_DECL -#endif // ACE_HAS_FORE_ATM_WS2 || ACE_HAS_LINUX_ATM - -// Open versioned namespace, if enabled by the user. -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -// Forward declarations. -class ACE_Time_Value; - -/** - * @class ACE_ATM_Acceptor - * - * @brief Defines the member functions for ACE_ATM_Acceptor abstraction. - * - * This class wraps up the ACE_SOCK_Acceptor and ACE_TLI_Acceptor - * to make the mechanism for the ATM protocol transparent. - */ -class ACE_Export ACE_ATM_Acceptor -{ - -public: - // = Initialization and termination methods. - /// Default constructor. - ACE_ATM_Acceptor (void); - - ~ACE_ATM_Acceptor (); - - /// Initiate a passive mode connection. - ACE_ATM_Acceptor (const ACE_Addr &remote_sap, - int backlog = ACE_DEFAULT_BACKLOG, - ACE_ATM_Params params = ACE_ATM_Params()); - - /// Initiate a passive mode socket. - ACE_HANDLE open (const ACE_Addr &remote_sap, - int backlog = ACE_DEFAULT_BACKLOG, - ACE_ATM_Params params = ACE_ATM_Params()); - - /// Close down the acceptor and release resources. - int close (void); - - // = Passive connection acceptance method. - - /// Accept a new data transfer connection. A @a timeout of 0 means - /// block forever, a @a timeout of {0, 0} means poll. @a restart == 1 - /// means "restart if interrupted." - int accept (ACE_ATM_Stream &new_sap, - ACE_Addr *remote_addr = 0, - ACE_Time_Value *timeout = 0, - bool restart = true, - bool reset_new_handle = false, - ACE_ATM_Params params = ACE_ATM_Params(), - ACE_ATM_QoS qos = ACE_ATM_QoS()); - - /// Get the local address currently listening on - int get_local_addr( ACE_ATM_Addr &local_addr ); - - // = Meta-type info - typedef ACE_ATM_Addr PEER_ADDR; - typedef ACE_ATM_Stream PEER_STREAM; - - /// Dump the state of an object. - void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - -private: - ATM_Acceptor acceptor_; -}; - -// Close versioned namespace, if enabled by the user. -ACE_END_VERSIONED_NAMESPACE_DECL - - -#if defined (__ACE_INLINE__) -#include "ace/ATM_Acceptor.inl" -#endif /* __ACE_INLINE__ */ - -#endif /* ACE_HAS_ATM */ -#include /**/ "ace/post.h" -#endif /* ACE_ATM_ACCEPTOR_H */ diff --git a/modules/worldengine/deps/acelite/ace/ATM_Acceptor.inl b/modules/worldengine/deps/acelite/ace/ATM_Acceptor.inl deleted file mode 100644 index 8e4aef7fa0..0000000000 --- a/modules/worldengine/deps/acelite/ace/ATM_Acceptor.inl +++ /dev/null @@ -1,40 +0,0 @@ -// -*- C++ -*- -// Open versioned namespace, if enabled by the user. -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_INLINE void -ACE_ATM_Acceptor::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_ATM_Acceptor::dump"); -#endif /* ACE_HAS_DUMP */ -} - -ACE_INLINE -ACE_ATM_Acceptor::ACE_ATM_Acceptor (const ACE_Addr &remote_sap, - int backlog, - ACE_ATM_Params params) -{ - ACE_TRACE ("ACE_ATM_Acceptor::ACE_ATM_Acceptor"); - - //FUZZ: disable check_for_lack_ACE_OS - if (open (remote_sap, backlog, params) < 0) - //FUZZ: enable check_for_lack_ACE_OS - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("%p\n"), - ACE_TEXT ("ACE_ATM_Acceptor::ACE_ATM_Acceptor"))); -} - -ACE_INLINE -int -ACE_ATM_Acceptor::close (void) -{ -#if defined (ACE_HAS_FORE_ATM_XTI) || defined (ACE_HAS_FORE_ATM_WS2) || defined (ACE_HAS_LINUX_ATM) - return (acceptor_.close()); -#else - return 0; -#endif // ACE_HAS_FORE_ATM_XTI || ACE_HAS_FORE_ATM_WS2 || ACE_HAS_LINUX_ATM -} - -// Close versioned namespace, if enabled by the user. -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/ATM_Addr.cpp b/modules/worldengine/deps/acelite/ace/ATM_Addr.cpp deleted file mode 100644 index afe10cc8f9..0000000000 --- a/modules/worldengine/deps/acelite/ace/ATM_Addr.cpp +++ /dev/null @@ -1,519 +0,0 @@ -// Defines the Internet domain address family address format. - -#include "ace/ATM_Addr.h" -#if defined (ACE_HAS_ATM) - -#include "ace/Log_Category.h" - -#if defined (ACE_HAS_FORE_ATM_WS2) -#include /**/ "forews2.h" -#endif /* ACE_HAS_FORE_ATM_WS2 */ - -#if !defined (__ACE_INLINE__) -#include "ace/ATM_Addr.inl" -#endif /* __ACE_INLINE__ */ - - - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_ALLOC_HOOK_DEFINE(ACE_ATM_Addr) - -#if defined (ACE_HAS_FORE_ATM_XTI) || defined (ACE_HAS_FORE_ATM_WS2) -#define BHLI_MAGIC "FORE_ATM" -// This is line rate in cells/s for an OC-3 MM interface. -const long ACE_ATM_Addr::LINE_RATE = 353207; -const int ACE_ATM_Addr::OPT_FLAGS_CPID = 0x1; -const int ACE_ATM_Addr::OPT_FLAGS_PMP = 0x2; -const int ACE_ATM_Addr::DEFAULT_SELECTOR = 0x99; -#elif defined (ACE_HAS_LINUX_ATM) -//pbrandao:for Linux: -//pbrandao:for now stick with current definitions -//pbrandao:see if later need to change -const long ACE_ATM_Addr::LINE_RATE = 353207; -const int ACE_ATM_Addr::OPT_FLAGS_CPID = 0; -const int ACE_ATM_Addr::OPT_FLAGS_PMP = 0; -const int ACE_ATM_Addr::DEFAULT_SELECTOR = 0x99; -#else -const long ACE_ATM_Addr::LINE_RATE = 0L; -const int ACE_ATM_Addr::OPT_FLAGS_CPID = 0; -const int ACE_ATM_Addr::OPT_FLAGS_PMP = 0; -const int ACE_ATM_Addr::DEFAULT_SELECTOR = 0x0; -#endif /* ACE_HAS_FORE_ATM_XTI || ACE_HAS_FORE_ATM_WS2 || ACE_HAS_LINUX_ATM */ - -// Default constructor - -ACE_ATM_Addr::ACE_ATM_Addr (u_char selector) -#if defined (ACE_HAS_FORE_ATM_XTI) || defined (ACE_HAS_FORE_ATM_WS2) - : ACE_Addr (AF_ATM, -#elif defined (ACE_HAS_LINUX_ATM) - : ACE_Addr (PF_ATMSVC, -#else - : ACE_Addr (AF_UNSPEC, -#endif /* ACE_HAS_FORE_ATM_XTI || ACE_HAS_FORE_ATM_WS2 || ACE_HAS_LINUX_ATM */ - sizeof this->atm_addr_) -{ - // ACE_TRACE ("ACE_ATM_Addr::ACE_ATM_Addr"); - (void) ACE_OS::memset ((void *) &this->atm_addr_, - 0, - sizeof this->atm_addr_); - this->init (selector); -} - -// Copy constructor. - -ACE_ATM_Addr::ACE_ATM_Addr (const ACE_ATM_Addr &sap, - u_char selector) -#if defined (ACE_HAS_FORE_ATM_XTI) || defined (ACE_HAS_FORE_ATM_WS2) - : ACE_Addr (AF_ATM, -#elif defined (ACE_HAS_LINUX_ATM) - : ACE_Addr (PF_ATMSVC, -#else - : ACE_Addr (AF_UNSPEC, -#endif /* ACE_HAS_FORE_ATM_XTI || ACE_HAS_FORE_ATM_WS2 || ACE_HAS_LINUX_ATM */ - sizeof this->atm_addr_) -{ - ACE_TRACE ("ACE_ATM_Addr::ACE_ATM_Addr"); - this->set (sap, selector); -#if defined (ACE_HAS_LINUX_ATM) - this->atm_addr_.sockaddratmsvc.sas_family = PF_ATMSVC; - this->atm_addr_.atmsap.blli[0].l3_proto = ATM_L3_NONE; - this->atm_addr_.atmsap.blli[0].l2_proto = ATM_L2_NONE; - this->atm_addr_.atmsap.bhli.hl_type = ATM_HL_NONE; -#endif /* ACE_HAS_LINUX_ATM */ -} - -ACE_ATM_Addr::ACE_ATM_Addr (const ATM_Addr *sap, - u_char selector) -#if defined (ACE_HAS_FORE_ATM_XTI) || defined (ACE_HAS_FORE_ATM_WS2) - : ACE_Addr (AF_ATM, -#elif defined (ACE_HAS_LINUX_ATM) - : ACE_Addr (PF_ATMSVC, -#else - : ACE_Addr (AF_UNSPEC, -#endif /* ACE_HAS_FORE_ATM_XTI || ACE_HAS_FORE_ATM_WS2 || ACE_HAS_LINUX_ATM */ - sizeof this->atm_addr_) -{ - ACE_TRACE ("ACE_ATM_Addr::ACE_ATM_Addr"); - this->set (sap, selector); -} - - -ACE_ATM_Addr::ACE_ATM_Addr (const ACE_TCHAR sap[], - u_char selector) -#if defined (ACE_HAS_FORE_ATM_XTI) || defined (ACE_HAS_FORE_ATM_WS2) - : ACE_Addr (AF_ATM, -#elif defined (ACE_HAS_LINUX_ATM) - : ACE_Addr (PF_ATMSVC, -#else - : ACE_Addr (AF_UNSPEC, -#endif /* ACE_HAS_FORE_ATM_XTI || ACE_HAS_FORE_ATM_WS2 || ACE_HAS_LINUX_ATM */ - sizeof this->atm_addr_) -{ - ACE_TRACE ("ACE_ATM_Addr::ACE_ATM_Addr"); - this->set (sap, selector); -} - -ACE_ATM_Addr::~ACE_ATM_Addr (void) -{ -} - -// Return the address. - -void * -ACE_ATM_Addr::get_addr (void) const -{ - ACE_TRACE ("ACE_ATM_Addr::get_addr"); - return (void *) &this->atm_addr_; -} - -void -ACE_ATM_Addr::init (u_char selector) -{ -#if defined (ACE_HAS_FORE_ATM_XTI) - // Note: this approach may be FORE implementation-specific. When we - // bind with tag_addr ABSENT and tag_selector PRESENT, only the - // selector (i.e. address[19]) is used by the TP. The rest of the - // local address is filled in by the TP and can be obtained via the - // 'ret' parameter or with t_getname ()/t_getprotaddr (). - - atm_addr_.addressType = (u_int16_t) AF_ATM; - - atm_addr_.sap.t_atm_sap_addr.SVE_tag_addr = (int8_t) T_ATM_ABSENT; - atm_addr_.sap.t_atm_sap_addr.SVE_tag_selector = (int8_t) T_ATM_PRESENT; - - atm_addr_.sap.t_atm_sap_addr.address_format = (u_int8_t) T_ATM_ENDSYS_ADDR; - atm_addr_.sap.t_atm_sap_addr.address_length = ATMNSAP_ADDR_LEN; - atm_addr_.sap.t_atm_sap_addr.address[ATMNSAP_ADDR_LEN - 1] = selector; - - atm_addr_.sap.t_atm_sap_layer2.SVE_tag = (int8_t) T_ATM_ABSENT; - atm_addr_.sap.t_atm_sap_layer3.SVE_tag = (int8_t) T_ATM_ABSENT; - - atm_addr_.sap.t_atm_sap_appl.SVE_tag = (int8_t) T_ATM_PRESENT; - atm_addr_.sap.t_atm_sap_appl.ID_type = (u_int8_t) T_ATM_USER_APP_ID; - - ACE_OS::memcpy (atm_addr_.sap.t_atm_sap_appl.ID.user_defined_ID, - BHLI_MAGIC, - sizeof atm_addr_.sap.t_atm_sap_appl.ID); -#elif defined (ACE_HAS_FORE_ATM_WS2) - ACE_OS::memset ((void *)&atm_addr_, 0, sizeof atm_addr_); - atm_addr_.satm_number.Addr[ ATM_ADDR_SIZE - 1 ] = (char)selector; - atm_addr_.satm_family = AF_ATM; - atm_addr_.satm_number.AddressType = ATM_NSAP; - atm_addr_.satm_number.NumofDigits = ATM_ADDR_SIZE; - atm_addr_.satm_blli.Layer2Protocol = SAP_FIELD_ABSENT; - atm_addr_.satm_blli.Layer3Protocol = SAP_FIELD_ABSENT; - atm_addr_.satm_bhli.HighLayerInfoType = SAP_FIELD_ABSENT; - - // Need to know the correspondence. - //atm_addr_.sap.t_atm_sap_appl.SVE_tag = (int8_t) T_ATM_PRESENT; - //atm_addr_.sap.t_atm_sap_appl.ID_type = (u_int8_t) T_ATM_USER_APP_ID; - //ACE_OS::memcpy (atm_addr_.sap.t_atm_sap_appl.ID.user_defined_ID, - // BHLI_MAGIC, - // sizeof atm_addr_.sap.t_atm_sap_appl.ID); -#elif defined (ACE_HAS_LINUX_ATM) - atm_addr_.sockaddratmsvc.sas_family = AF_ATMSVC; - atm_addr_.sockaddratmsvc.sas_addr.prv[ATM_ESA_LEN - 1] = (char)selector; - atm_addr_.atmsap.blli[0].l3_proto = ATM_L3_NONE; - atm_addr_.atmsap.blli[0].l2_proto = ATM_L2_NONE; - atm_addr_.atmsap.bhli.hl_type = ATM_HL_NONE; -#else - ACE_UNUSED_ARG (selector); -#endif /* ACE_HAS_FORE_ATM_XTI || ACE_HAS_FORE_ATM_WS2 || ACE_HAS_LINUX_ATM */ -} - -int -ACE_ATM_Addr::set (const ACE_ATM_Addr &sap, - u_char selector) -{ - ACE_TRACE ("ACE_ATM_Addr::set"); - - this->init (selector); - - this->ACE_Addr::base_set (sap.get_type (), - sap.get_size ()); - -#if defined (ACE_HAS_FORE_ATM_XTI) || defined (ACE_HAS_FORE_ATM_WS2) - ACE_ASSERT (sap.get_type () == AF_ATM); -#elif defined (ACE_HAS_LINUX_ATM) - ACE_ASSERT (sap.get_type () == PF_ATMSVC); -#endif /* ACE_HAS_FORE_ATM_XTI || ACE_HAS_FORE_ATM_WS2 */ - - (void) ACE_OS::memcpy ((void *) &this->atm_addr_, - (void *) &sap.atm_addr_, - sizeof this->atm_addr_); - return 0; -} - -int -ACE_ATM_Addr::set (const ATM_Addr *sap, - u_char selector) -{ - ACE_TRACE ("ACE_ATM_Addr::set"); - - this->init (selector); - -#if defined (ACE_HAS_FORE_ATM_XTI) || defined (ACE_HAS_FORE_ATM_WS2) - this->ACE_Addr::base_set (AF_ATM, -#elif defined (ACE_HAS_LINUX_ATM) - this->ACE_Addr::base_set (PF_ATMSVC, -#else - this->ACE_Addr::base_set (AF_UNSPEC, -#endif /* ACE_HAS_FORE_ATM_XTI || ACE_HAS_FORE_ATM_WS2 */ - sizeof (*sap)); - - (void) ACE_OS::memcpy ((void *) &this->atm_addr_, - (void *) sap, - sizeof this->atm_addr_); - return 0; -} - -int -ACE_ATM_Addr::set (const ACE_TCHAR address[], - u_char selector) -{ - ACE_TRACE ("ACE_ATM_Addr::set"); - int ret; - - this->init (selector); - -#if defined (ACE_HAS_FORE_ATM_XTI) - atm_addr_.sap.t_atm_sap_addr.SVE_tag_addr = - (int8_t) T_ATM_PRESENT; -#endif /* ACE_HAS_FORE_ATM_XTI */ - - ret = this -> string_to_addr (address); - this -> set_selector (selector); - return ret; -} - -// Transform the string into the current addressing format. - -int -ACE_ATM_Addr::string_to_addr (const ACE_TCHAR sap[]) -{ - ACE_TRACE ("ACE_ATM_Addr::string_to_addr"); - -#if defined (ACE_HAS_FORE_ATM_XTI) || defined (ACE_HAS_FORE_ATM_WS2) - this->ACE_Addr::base_set (AF_ATM, -#elif defined (ACE_HAS_LINUX_ATM) - this->ACE_Addr::base_set (PF_ATMSVC, -#else - this->ACE_Addr::base_set (AF_UNSPEC, -#endif /* ACE_HAS_FORE_ATM_XTI || ACE_HAS_FORE_ATM_WS2 || ACE_HAS_LINUX_ATM */ - sizeof this->atm_addr_); -#if defined (ACE_HAS_FORE_ATM_XTI) - struct hostent *entry; - struct atmnsap_addr *nsap; - - // Yow, someone gave us a NULL ATM address! - if (sap == 0) - { - errno = EINVAL; - return -1; - } - else if ((entry = gethostbyname_atmnsap ((ACE_TCHAR *)sap)) != 0) - { - ACE_OS::memcpy (atm_addr_.sap.t_atm_sap_addr.address, - entry->h_addr_list[0], - ATMNSAP_ADDR_LEN - 1); - } - else if ((nsap = atmnsap_addr (sap)) != 0) - { - ACE_OS::memcpy (atm_addr_.sap.t_atm_sap_addr.address, - nsap->atmnsap, - ATMNSAP_ADDR_LEN); - } - else { - errno = EINVAL; - return -1; - } -#elif defined (ACE_HAS_FORE_ATM_WS2) - DWORD dwValue; - HANDLE hLookup; - WSAQUERYSETW qsRestrictions; - CSADDR_INFO csaBuffer; - WCHAR tmpWStr[100]; - - MultiByteToWideChar (CP_ACP, MB_PRECOMPOSED, sap, -1, tmpWStr, 100); - - csaBuffer.LocalAddr.iSockaddrLength = sizeof (struct sockaddr_atm); - csaBuffer.LocalAddr.lpSockaddr = (struct sockaddr *)&atm_addr_; - csaBuffer.RemoteAddr.iSockaddrLength = sizeof (struct sockaddr_atm); - csaBuffer.RemoteAddr.lpSockaddr = (struct sockaddr *)&atm_addr_; - - qsRestrictions.dwSize = sizeof (WSAQUERYSETW); - qsRestrictions.lpszServiceInstanceName = 0; - qsRestrictions.lpServiceClassId = &FORE_NAME_CLASS; - qsRestrictions.lpVersion = 0; - qsRestrictions.lpszComment = 0; - qsRestrictions.dwNameSpace = FORE_NAME_SPACE; - qsRestrictions.lpNSProviderId = 0; - qsRestrictions.lpszContext = L""; - qsRestrictions.dwNumberOfProtocols = 0; - qsRestrictions.lpafpProtocols = 0; - qsRestrictions.lpszQueryString = tmpWStr; - qsRestrictions.dwNumberOfCsAddrs = 1; - qsRestrictions.lpcsaBuffer = &csaBuffer; - qsRestrictions.lpBlob = 0; //&blob; - - if (::WSALookupServiceBeginW (&qsRestrictions, LUP_RETURN_ALL, &hLookup) - == SOCKET_ERROR) { - ACE_OS::printf ("Error: WSALookupServiceBeginW failed! %d\n", - ::WSAGetLastError ()); - return -1; - } - - dwValue = sizeof (WSAQUERYSETW); - - if (::WSALookupServiceNextW (hLookup, 0, &dwValue, &qsRestrictions) - == SOCKET_ERROR) { - if (WSAGetLastError () != WSA_E_NO_MORE) { - ACE_OS::printf ("Error: WSALookupServiceNextW failed! %d\n", - ::WSAGetLastError ()); - return -1; - } - } - - if (WSALookupServiceEnd (hLookup) == SOCKET_ERROR) { - ACE_OS::printf ("Error : WSALookupServiceEnd failed! %d\n", - ::WSAGetLastError ()); - errno = EINVAL; - return -1; - } -#elif defined (ACE_HAS_LINUX_ATM) - if (sap == 0 || !ACE_OS::strcmp (sap,"")) { - errno = EINVAL; - return -1; - } - - if (text2atm ((ACE_TCHAR *)sap, - (struct sockaddr *)& (atm_addr_.sockaddratmsvc), - sizeof (atm_addr_.sockaddratmsvc), - T2A_SVC | T2A_NAME) < 0) { - ACELIB_DEBUG (LM_DEBUG, - "Error : text2atm failed!\n"); - errno = EINVAL; - return -1; - } -#else - ACE_UNUSED_ARG (sap); - - return 0; -#endif /* ACE_HAS_FORE_ATM_XTI || ACE_HAS_FORE_ATM_WS2 || ACE_HAS_LINUX_ATM */ - -#if defined (ACE_HAS_FORE_ATM_XTI) || defined (ACE_HAS_FORE_ATM_WS2) || defined (ACE_HAS_LINUX_ATM) - return 0; -#endif /* ACE_HAS_FORE_ATM_XTI || ACE_HAS_FORE_ATM_WS2 */ -} - -// Transform the current address into string format. - -int -ACE_ATM_Addr::addr_to_string (ACE_TCHAR addr[], - size_t addrlen) const -{ - ACE_TRACE ("ACE_ATM_Addr::addr_to_string"); - -#if defined (ACE_HAS_FORE_ATM_XTI) - ACE_TCHAR buffer[MAXNAMELEN + 1]; - struct atmnsap_addr nsap; - ACE_OS::memcpy (nsap.atmnsap, - atm_addr_.sap.t_atm_sap_addr.address, - ATMNSAP_ADDR_LEN); - ACE_OS::sprintf (buffer, - ACE_TEXT ("%s"), - atmnsap_ntoa (nsap)); - - size_t total_len = ACE_OS::strlen (buffer) + sizeof ('\0'); - - if (addrlen < total_len) - return -1; - else - ACE_OS::strcpy (addr, buffer); - - return 0; -#elif defined (ACE_HAS_FORE_ATM_WS2) - ACE_TCHAR buffer[MAXNAMELEN + 1]; - int i; - - if (addrlen < ATM_ADDR_SIZE + 1) - return -1; - - for (i = 0; i < ATM_ADDR_SIZE; i++) { - buffer[ i * 3 ] = '\0'; - ACE_OS::sprintf (buffer, ACE_TEXT ("%s%02x."), - buffer, - atm_addr_.satm_number.Addr[ i ]); - } - - buffer[ ATM_ADDR_SIZE * 3 - 1 ] = '\0'; - ACE_OS::strcpy (addr, buffer); - - return 0; -#elif defined (ACE_HAS_LINUX_ATM) - ACE_TCHAR buffer[MAX_ATM_ADDR_LEN + 1]; - int total_len; - if ((total_len = atm2text (buffer, - sizeof buffer, - (struct sockaddr *)& (atm_addr_.sockaddratmsvc), - A2T_PRETTY)) < 0) { - ACELIB_DEBUG ((LM_DEBUG,"ACE_ATM_Addr (addr_to_string): atm2text failed\n")); - return -1; - } - if (addrlen < (size_t)total_len) - return -1; - else - ACE_OS::strcpy (addr, - buffer); - - return 0; -#else - ACE_UNUSED_ARG (addr); - ACE_UNUSED_ARG (addrlen); - return -1; -#endif /* ACE_HAS_FORE_ATM_XTI && ACE_HAS_FORE_ATM_WS2 */ -} - -const ACE_TCHAR * -ACE_ATM_Addr::addr_to_string (void) const -{ - ACE_TRACE ("ACE_ATM_Addr::addr_to_string"); - - static ACE_TCHAR addr[MAXHOSTNAMELEN + 1]; - if (this->addr_to_string (addr, - MAXHOSTNAMELEN + 1) < 0) - return 0; - - return addr; -} - -// Set a pointer to the address. -void -ACE_ATM_Addr::set_addr (const void *addr, int len) -{ - ACE_TRACE ("ACE_ATM_Addr::set_addr"); - -#if defined (ACE_HAS_FORE_ATM_XTI) || defined (ACE_HAS_FORE_ATM_WS2) - this->ACE_Addr::base_set (AF_ATM, -#elif defined (ACE_HAS_LINUX_ATM) - this->ACE_Addr::base_set (PF_ATMSVC, -#else - this->ACE_Addr::base_set (AF_UNSPEC, -#endif /* ACE_HAS_FORE_ATM_XTI || ACE_HAS_FORE_WS2 */ - len); - ACE_OS::memcpy (&this->atm_addr_, addr, len); -} - -// Compare two addresses for inequality. - -bool -ACE_ATM_Addr::operator != (const ACE_ATM_Addr &sap) const -{ - ACE_TRACE ("ACE_ATM_Addr::operator !="); - return ! ((*this) == sap); -} - -// Compare two addresses for equality. - -bool -ACE_ATM_Addr::operator == (const ACE_ATM_Addr &sap) const -{ - ACE_TRACE ("ACE_ATM_Addr::operator =="); - -#if defined (ACE_HAS_LINUX_ATM) - return (atm_equal ((const struct sockaddr *)& (this->atm_addr_.sockaddratmsvc), - (const struct sockaddr *)& (sap.atm_addr_.sockaddratmsvc), - 0, - 0) - && - sap_equal (& (this->atm_addr_.atmsap), - & (sap.atm_addr_.atmsap), - 0)); -#else - return ACE_OS::memcmp (&atm_addr_, - &sap.atm_addr_, - sizeof (ATM_Addr)) == 0; -#endif /* ACE_HAS_LINUX_ATM */ -} - -void -ACE_ATM_Addr::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_ATM_Addr::dump"); - - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - - ACE_TCHAR s[ACE_MAX_FULLY_QUALIFIED_NAME_LEN + 16]; - ACE_OS::sprintf (s, - ACE_TEXT ("%s"), - this->addr_to_string ()); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("%s"), s)); - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_HAS_ATM */ diff --git a/modules/worldengine/deps/acelite/ace/ATM_Addr.h b/modules/worldengine/deps/acelite/ace/ATM_Addr.h deleted file mode 100644 index 8f8aac81d6..0000000000 --- a/modules/worldengine/deps/acelite/ace/ATM_Addr.h +++ /dev/null @@ -1,195 +0,0 @@ -// -*- C++ -*- - -//========================================================================== -/** - * @file ATM_Addr.h - * - * @author Joe Hoffert - */ -//========================================================================== - -#ifndef ACE_ATM_ADDR_H -#define ACE_ATM_ADDR_H -#include /**/ "ace/pre.h" - -#include /**/ "ace/config-all.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#if defined (ACE_HAS_ATM) - -#include /**/ "ace/ACE_export.h" -#include "ace/Addr.h" - -#if defined (ACE_HAS_FORE_ATM_XTI) -ACE_BEGIN_VERSIONED_NAMESPACE_DECL -typedef ATMSAPAddress ATM_Addr; -ACE_END_VERSIONED_NAMESPACE_DECL -#elif defined (ACE_HAS_FORE_ATM_WS2) -#define FORE_NAME_SPACE NS_ALL -ACE_BEGIN_VERSIONED_NAMESPACE_DECL -typedef struct sockaddr_atm ATM_Addr; -ACE_END_VERSIONED_NAMESPACE_DECL -#elif defined (ACE_HAS_LINUX_ATM) - -#include /**/ "atm.h" - -// Open versioned namespace, if enabled by the user. -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -//pbrandao:as Linux has this 2 structs separeted we "link it" here -typedef struct _linux_atm_addr -{ - struct sockaddr_atmsvc sockaddratmsvc; - struct atm_sap atmsap; -} ATM_Addr; -#else -typedef int ATM_Addr; -#endif /* ACE_HAS_FORE_ATM_XTI/ACE_HAS_FORE_ATM_WS2/ACE_HAS_LINUX_ATM */ - -/** - * @class ACE_ATM_Addr - * - * @brief Defines the ATM domain address family address format. - */ -class ACE_Export ACE_ATM_Addr : public ACE_Addr -{ -public: - // Constants used for ATM options - static const long LINE_RATE; - static const int OPT_FLAGS_CPID; - static const int OPT_FLAGS_PMP; - static const int DEFAULT_SELECTOR; - - // = Initialization methods. - /// Default constructor. - ACE_ATM_Addr (u_char selector = DEFAULT_SELECTOR); - - /// Copy constructor. - ACE_ATM_Addr (const ACE_ATM_Addr &, - u_char selector = DEFAULT_SELECTOR); - - /** - * Creates an ACE_ATM_Addr from an ATMSAPAddress structure. This - * is vendor specific (FORE systems). May need to change when other - * vendors are supported. - */ - ACE_ATM_Addr (const ATM_Addr *, - u_char selector = DEFAULT_SELECTOR); - - /** - * Initializes an ACE_ATM_Addr from the which can be - * "atm-address" (e.g., - * "47.0005.80.ffe100.0000.f20f.2200.0020480694f9.00") or "hostname" - * (e.g., "frisbee.cs.wustl.edu"). - */ - ACE_ATM_Addr (const ACE_TCHAR sap[], - u_char selector = DEFAULT_SELECTOR); - - /// Default dtor. - ~ACE_ATM_Addr (void); - - // = Initialization methods (useful after object construction). - /// Default initialization for non-address values (e.g., - /// t_atm_sap_addr.SVE_tag_addr, t_atm_sap_addr.SVE_tag_selector) - void init (u_char selector = DEFAULT_SELECTOR); - - /// Initializes from another ACE_ATM_Addr. - int set (const ACE_ATM_Addr &, - u_char selector = DEFAULT_SELECTOR); - - /** - * Initializes an ACE_ATM_Addr from an ATMSAPAddress/sockaddr_atm - * structure. This is vendor specific (FORE systems). May need to - * change when other vendors are supported. - */ - int set (const ATM_Addr *, - u_char selector = DEFAULT_SELECTOR); - - /** - * Initializes an ACE_ATM_Addr from the which can be - * "atm-address" (e.g., - * "47.0005.80.ffe100.0000.f20f.2200.0020480694f9.00") or "hostname" - * (e.g., "frisbee.cs.wustl.edu"). - */ - int set (const ACE_TCHAR sap[], - u_char selector = DEFAULT_SELECTOR); - - /** - * Initializes an ACE_ATM_Addr from the which can be - * "atm-address" (e.g., - * "47.0005.80.ffe100.0000.f20f.2200.0020480694f9.00") or "hostname" - * (e.g., "frisbee.cs.wustl.edu"). - */ - virtual int string_to_addr (const ACE_TCHAR sap[]); - - /** - * Return the character representation of the ATM address (e.g., - * "47.0005.80.ffe100.0000.f20f.2200.0020480694f9.00") storing it in - * the @a addr (which is assumed to be bytes long). This - * version is reentrant. Returns -1 if the of the @a addr - * is too small, else 0. - */ - virtual int addr_to_string (ACE_TCHAR addr[], - size_t addrlen) const; - - /** - * Return the character representation of the ATM address (e.g., - * "47.0005.80.ffe100.0000.f20f.2200.0020480694f9.00"). Returns -1 - * if the of the is too small, else 0.(This version - * is non-reentrant since it returns a pointer to a static data - * area.) - */ - const ACE_TCHAR *addr_to_string (void) const; - - /// Return a pointer to the underlying network address. - virtual void *get_addr (void) const; - - /// Set a pointer to the address. - virtual void set_addr (const void *, int); - - /// Return the selector for network address. - u_char get_selector (void) const; - - /// Set the selector for the network address. - void set_selector (u_char selector); - - /** - * Compare two addresses for equality. The addresses are considered - * equal if they contain the same ATM address. Q: Is there any - * other check for equality needed for ATM? - */ - bool operator == (const ACE_ATM_Addr &SAP) const; - - /// Compare two addresses for inequality. - bool operator != (const ACE_ATM_Addr &SAP) const; - - /// Dump the state of an object. - void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - -// char *construct_options (ACE_HANDLE fd, -// int qos_kb, -// int flags, -// long *optsize); -// // Construct options for ATM connections - -private: - ATM_Addr atm_addr_; -}; - -// Close versioned namespace, if enabled by the user. -ACE_END_VERSIONED_NAMESPACE_DECL - - -#if defined (__ACE_INLINE__) -#include "ace/ATM_Addr.inl" -#endif /* __ACE_INLINE__ */ - -#endif /* ACE_HAS_ATM */ -#include /**/ "ace/post.h" -#endif /* ACE_ATM_ADDR_H */ diff --git a/modules/worldengine/deps/acelite/ace/ATM_Addr.inl b/modules/worldengine/deps/acelite/ace/ATM_Addr.inl deleted file mode 100644 index d1f7e2c4d1..0000000000 --- a/modules/worldengine/deps/acelite/ace/ATM_Addr.inl +++ /dev/null @@ -1,34 +0,0 @@ -// -*- C++ -*- -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_INLINE u_char -ACE_ATM_Addr::get_selector (void) const -{ - ACE_TRACE ("ACE_ATM_Addr::get_selector"); -#if defined (ACE_HAS_FORE_ATM_XTI) - return atm_addr_.sap.t_atm_sap_addr.address[ATMNSAP_ADDR_LEN - 1]; -#elif defined (ACE_HAS_FORE_ATM_WS2) - return atm_addr_.satm_number.Addr[ ATM_ADDR_SIZE - 1 ]; -#elif defined (ACE_HAS_LINUX_ATM) - return atm_addr_.sockaddratmsvc.sas_addr.prv[ATM_ESA_LEN - 1]; -#else - return 0; -#endif /* ACE_HAS_FORE_ATM_XTI || ACE_HAS_FORE_ATM_WS2 || ACE_HAS_LINUX_ATM */ -} - -ACE_INLINE void -ACE_ATM_Addr::set_selector (u_char selector) -{ - ACE_TRACE ("ACE_ATM_Addr::set_selector"); -#if defined (ACE_HAS_FORE_ATM_XTI) - atm_addr_.sap.t_atm_sap_addr.address[ATMNSAP_ADDR_LEN - 1] = selector; -#elif defined (ACE_HAS_FORE_ATM_WS2) - atm_addr_.satm_number.Addr[ ATM_ADDR_SIZE - 1 ] = selector; -#elif defined (ACE_HAS_LINUX_ATM) - atm_addr_.sockaddratmsvc.sas_addr.prv[ATM_ESA_LEN - 1] = selector; -#else - ACE_UNUSED_ARG (selector); -#endif /* ACE_HAS_FORE_ATM_XTI || ACE_HAS_FORE_ATM_WS2 || ACE_HAS_LINUX_ATM */ -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/ATM_Connector.cpp b/modules/worldengine/deps/acelite/ace/ATM_Connector.cpp deleted file mode 100644 index b05860557d..0000000000 --- a/modules/worldengine/deps/acelite/ace/ATM_Connector.cpp +++ /dev/null @@ -1,136 +0,0 @@ -// ATM_Connector.cpp -#include "ace/ATM_Connector.h" -#if defined (ACE_HAS_ATM) - -#include "ace/Handle_Set.h" - - - -#if !defined (__ACE_INLINE__) -#include "ace/ATM_Connector.inl" -#endif /* __ACE_INLINE__ */ - -// Open versioned namespace, if enabled by the user. -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_ALLOC_HOOK_DEFINE(ACE_ATM_Connector) - -ACE_ATM_Connector::ACE_ATM_Connector (void) -{ - ACE_TRACE ("ACE_ATM_Connector::ACE_ATM_Connector"); -} - -// Actively connect and produce a new ACE_ATM_Stream if things go well... -// Connect the to the , waiting up to -// amount of time if necessary. - -int -ACE_ATM_Connector::connect (ACE_ATM_Stream &new_stream, - const ACE_ATM_Addr &remote_sap, - ACE_ATM_Params params, - ACE_ATM_QoS options, - ACE_Time_Value *timeout, - const ACE_ATM_Addr &local_sap, - int reuse_addr, - int flags, - int perms) -{ - ACE_TRACE ("ACE_ATM_Connector::connect"); -#if defined (ACE_HAS_FORE_ATM_XTI) - return connector_.connect(new_stream.get_stream(), - remote_sap, - timeout, - local_sap, - reuse_addr, - flags, - perms, - params.get_device(), - params.get_info(), - params.get_rw_flag(), - params.get_user_data(), - &options.get_qos()); -#elif defined (ACE_HAS_FORE_ATM_WS2) - ACELIB_DEBUG(LM_DEBUG, - ACE_TEXT ("ATM_Connector(connect): set QoS parameters\n" )); - - ACE_HANDLE s = new_stream.get_handle(); - struct sockaddr_atm *saddr = ( struct sockaddr_atm *)remote_sap.get_addr(); - ACE_QoS cqos = options.get_qos(); - - ACE_QoS_Params qos_params = ACE_QoS_Params(0, - 0, - &cqos, - 0, - 0); - - ACELIB_DEBUG(LM_DEBUG, - ACE_TEXT ("ATM_Connector(connect): connecting...\n")); - - int result = ACE_OS::connect( s, - ( struct sockaddr *)saddr, - sizeof( struct sockaddr_atm ), - qos_params ); - - if ( result != 0 ) - ACE_OS::printf( "ATM_Connector(connect): connection failed, %d\n", - ::WSAGetLastError()); - - return result; -#elif defined (ACE_HAS_LINUX_ATM) - ACE_UNUSED_ARG (params); - ACE_UNUSED_ARG (timeout); - ACE_UNUSED_ARG (reuse_addr); - ACE_UNUSED_ARG (perms); - ACE_UNUSED_ARG (flags); - - ACE_HANDLE handle = new_stream.get_handle(); - ATM_QoS qos =options.get_qos(); - ATM_Addr *local_addr=(ATM_Addr*)local_sap.get_addr(), - *remote_addr=(ATM_Addr*)remote_sap.get_addr(); - - if (ACE_OS::setsockopt(handle, - SOL_ATM, - SO_ATMSAP, - reinterpret_cast (&(local_addr->atmsap)), - sizeof(local_addr->atmsap)) < 0) { - ACE_OS::printf( "ATM_Connector(connect): unable to set atmsap %d\nContinuing...", - errno); - } - if (ACE_OS::setsockopt(handle, - SOL_ATM, - SO_ATMQOS, - reinterpret_cast (&qos), - sizeof(qos)) < 0) { - ACELIB_DEBUG((LM_DEBUG,ACE_TEXT ("ATM_Connector(connect): unable to set qos %d\n"), - errno)); - return -1; - } - - int result = ACE_OS::connect(handle, - (struct sockaddr *)&(remote_addr->sockaddratmsvc), - sizeof( remote_addr->sockaddratmsvc)); - - if ( result != 0 ) - ACELIB_DEBUG(LM_DEBUG, - ACE_TEXT ("ATM_Connector(connect): connection failed, %d\n"), - errno); - - return result; -#else - ACE_UNUSED_ARG (new_stream); - ACE_UNUSED_ARG (remote_sap); - ACE_UNUSED_ARG (params); - ACE_UNUSED_ARG (options); - ACE_UNUSED_ARG (timeout); - ACE_UNUSED_ARG (local_sap); - ACE_UNUSED_ARG (reuse_addr); - ACE_UNUSED_ARG (flags); - ACE_UNUSED_ARG (perms); - return 0; -#endif /* ACE_HAS_FORE_ATM_XTI || ACE_HAS_FORE_ATM_WS2 || ACE_HAS_LINUX_ATM */ -} - -// Close versioned namespace, if enabled by the user. -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_HAS_ATM */ diff --git a/modules/worldengine/deps/acelite/ace/ATM_Connector.h b/modules/worldengine/deps/acelite/ace/ATM_Connector.h deleted file mode 100644 index 2bca5b61d6..0000000000 --- a/modules/worldengine/deps/acelite/ace/ATM_Connector.h +++ /dev/null @@ -1,162 +0,0 @@ -/* -*- C++ -*- */ - -//============================================================================= -/** - * @file ATM_Connector.h - * - * @author Joe Hoffert - */ -//============================================================================= - -#ifndef ACE_ATM_CONNECTOR_H -#define ACE_ATM_CONNECTOR_H -#include /**/ "ace/pre.h" - -#include /**/ "ace/config-all.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#if defined (ACE_HAS_ATM) - -#include "ace/ATM_Stream.h" -#include "ace/ATM_Params.h" -#include "ace/ATM_QoS.h" - -#if defined (ACE_WIN32) || defined (ACE_HAS_LINUX_ATM) -#include "ace/SOCK_Connector.h" -ACE_BEGIN_VERSIONED_NAMESPACE_DECL -typedef ACE_SOCK_Connector ATM_Connector; -ACE_END_VERSIONED_NAMESPACE_DECL -#else -#include "ace/XTI_ATM_Mcast.h" -ACE_BEGIN_VERSIONED_NAMESPACE_DECL -typedef ACE_XTI_ATM_Mcast ATM_Connector; -// Open versioned namespace, if enabled by the user. -ACE_END_VERSIONED_NAMESPACE_DECL -#endif - -// Open versioned namespace, if enabled by the user. -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_ATM_Connector - * - * @brief Defines an active connection factory for the ACE_ATM C++ - * wrappers. - */ -class ACE_Export ACE_ATM_Connector -{ -public: - // = Initialization methods. - /// Default constructor. - ACE_ATM_Connector (void); - - /** - * Actively connect and produce a @a new_stream if things go well. - * The @a remote_sap is the address that we are trying to connect - * with. The are the parameters needed for either socket - * or XTI/ATM connections. The @a timeout is the amount of time to - * wait to connect. If it's 0 then we block indefinitely. If - * *timeout == {0, 0} then the connection is done using non-blocking - * mode. In this case, if the connection can't be made immediately - * the value of -1 is returned with @c errno == EWOULDBLOCK. If - * *timeout > {0, 0} then this is the maximum amount of time to wait before - * timing out. If the time expires before the connection is made - * @c errno == ETIME. The @a local_sap is the value of local address - * to bind to. If it's the default value of then - * the user is letting the OS do the binding. If @a reuse_addr == 1 - * then the is reused, even if it hasn't been cleanedup yet. - */ - ACE_ATM_Connector (ACE_ATM_Stream &new_stream, - const ACE_ATM_Addr &remote_sap, - ACE_ATM_Params params = ACE_ATM_Params(), - ACE_ATM_QoS options = ACE_ATM_QoS(), - ACE_Time_Value *timeout = 0, - const ACE_ATM_Addr &local_sap = ACE_ATM_Addr( "", 0 ), - int reuse_addr = 0, -#if defined (ACE_WIN32) - int flags = 0, -#else - int flags = O_RDWR, -#endif /* ACE_WIN32 */ - int perms = 0); - - /** - * Actively connect and produce a @a new_stream if things go well. - * The @a remote_sap is the address that we are trying to connect - * with. The are the parameters needed for either socket - * or XTI/ATM connections. The @a timeout is the amount of time to - * wait to connect. If it's 0 then we block indefinitely. If - * *timeout == {0, 0} then the connection is done using non-blocking - * mode. In this case, if the connection can't be made immediately - * the value of -1 is returned with @c errno == EWOULDBLOCK. If - * *timeout > {0, 0} then this is the maximum amount of time to wait before - * timing out. If the time expires before the connection is made - * @c errno == ETIME. The @a local_sap is the value of local address - * to bind to. If it's the default value of then - * the user is letting the OS do the binding. If @a reuse_addr == 1 - * then the is reused, even if it hasn't been cleanedup yet. - */ - int connect (ACE_ATM_Stream &new_stream, - const ACE_ATM_Addr &remote_sap, - ACE_ATM_Params params = ACE_ATM_Params(), - ACE_ATM_QoS options = ACE_ATM_QoS(), - ACE_Time_Value *timeout = 0, - const ACE_ATM_Addr &local_sap = ACE_ATM_Addr( "", - 0 ), - int reuse_addr = 0, -#if defined (ACE_WIN32) - int flags = 0, -#else - int flags = O_RDWR, -#endif /* ACE_WIN32 */ - int perms = 0); - - /** - * Try to complete a non-blocking connection. - * If connection completion is successful then @a new_stream contains - * the connected ACE_SOCK_Stream. If @a remote_sap is non-NULL then it - * will contain the address of the connected peer. - */ - int complete (ACE_ATM_Stream &new_stream, - ACE_ATM_Addr *remote_sap, - ACE_Time_Value *tv); - - /** - * Actively add a leaf to the root (i.e., point-to-multipoint). The - * @a remote_sap is the address of the leaf that we - * are trying to add. - */ - int add_leaf (ACE_ATM_Stream ¤t_stream, - const ACE_Addr &remote_sap, - ACE_ATM_QoS &qos); - - /// Resets any event associations on this handle - bool reset_new_handle (ACE_HANDLE handle); - - // = Meta-type info - typedef ACE_ATM_Addr PEER_ADDR; - typedef ACE_ATM_Stream PEER_STREAM; - - /// Dump the state of an object. - void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - -private: - ATM_Connector connector_; -}; - -// Open versioned namespace, if enabled by the user. -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/ATM_Connector.inl" -#endif /* __ACE_INLINE__ */ - -#endif /* ACE_HAS_ATM */ -#include /**/ "ace/post.h" -#endif /* ACE_ATM_CONNECTOR_H */ diff --git a/modules/worldengine/deps/acelite/ace/ATM_Connector.inl b/modules/worldengine/deps/acelite/ace/ATM_Connector.inl deleted file mode 100644 index e35f408546..0000000000 --- a/modules/worldengine/deps/acelite/ace/ATM_Connector.inl +++ /dev/null @@ -1,129 +0,0 @@ -// -*- C++ -*- -// Open versioned namespace, if enabled by the user. -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_INLINE void -ACE_ATM_Connector::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_ATM_Connector::dump"); -#endif /* ACE_HAS_DUMP */ -} - -ACE_INLINE -ACE_ATM_Connector::ACE_ATM_Connector (ACE_ATM_Stream &new_stream, - const ACE_ATM_Addr &remote_sap, - ACE_ATM_Params params, - ACE_ATM_QoS options, - ACE_Time_Value *timeout, - const ACE_ATM_Addr &local_sap, - int reuse_addr, - int flags, - int perms) -{ - ACE_TRACE ("ACE_ATM_Connector::ACE_ATM_Connector"); - if ((ACE_HANDLE)this->connect (new_stream, - remote_sap, - params, - options, - timeout, - local_sap, - reuse_addr, - flags, - perms) == ACE_INVALID_HANDLE - && timeout != 0 && !(errno == EWOULDBLOCK || errno == ETIME)) - ACELIB_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), - ACE_TEXT ("ACE_ATM_Stream::ACE_ATM_Stream"))); -} - -// Try to complete a non-blocking connection. - -ACE_INLINE -int -ACE_ATM_Connector::complete (ACE_ATM_Stream &new_stream, - ACE_ATM_Addr *remote_sap, - ACE_Time_Value *tv) -{ - ACE_TRACE ("ACE_ATM_Connector::complete"); -#if defined (ACE_HAS_ATM) - return connector_.complete(new_stream.get_stream(), - remote_sap, - tv); -#else - ACE_UNUSED_ARG(new_stream); - ACE_UNUSED_ARG(remote_sap); - ACE_UNUSED_ARG(tv); - return 0; -#endif -} - -ACE_INLINE -int -ACE_ATM_Connector::add_leaf (ACE_ATM_Stream ¤t_stream, - const ACE_Addr &remote_sap, - ACE_ATM_QoS &qos) -{ - ACE_TRACE ("ACE_ATM_Connector::add_leaf"); -#if defined (ACE_HAS_FORE_ATM_XTI) - return connector_.add_leaf(current_stream.get_stream(), - remote_sap, - leaf_id, - timeout); -#elif defined (ACE_HAS_FORE_ATM_WS2) - struct sockaddr_atm *saddr = (struct sockaddr_atm *)remote_sap.get_addr(); - ACE_QoS cqos = qos.get_qos(); - int addr_len = sizeof( struct sockaddr_atm ); - - ACE_QoS_Params qos_params(0, - 0, - &cqos, - 0, - (JL_SENDER_ONLY)); - - ACE_OS::printf( "ATM_Connector::add_leaf: connecting...\n" ); - - ACE_HANDLE result = ACE_OS::join_leaf(current_stream.get_handle(), - (struct sockaddr *)saddr, - addr_len, - qos_params); - - if ( result == ACE_INVALID_HANDLE ) - ACE_OS::printf( "ATM_Connector(add_leaf): connection failed, %d\n", - ::WSAGetLastError()); - - return (result != ACE_INVALID_HANDLE); -#elif defined (ACE_HAS_LINUX_ATM) - ACE_OS::printf("ATM_Connector(add_leaf): not yet implemented in Linux\n"); - - ACE_UNUSED_ARG(current_stream); - ACE_UNUSED_ARG(remote_sap); - ACE_UNUSED_ARG(leaf_id); - ACE_UNUSED_ARG(timeout); - - return 0; -#else - ACE_UNUSED_ARG(current_stream); - ACE_UNUSED_ARG(remote_sap); - ACE_UNUSED_ARG(leaf_id); - ACE_UNUSED_ARG(timeout); - return 0; -#endif -} - -ACE_INLINE -bool -ACE_ATM_Connector::reset_new_handle (ACE_HANDLE handle) -{ -#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) - // Reset the event association - return ::WSAEventSelect ((SOCKET) handle, - 0, - 0); -#else /* !defined ACE_HAS_WINSOCK2 */ - ACE_UNUSED_ARG (handle); - return false; -#endif /* ACE_WIN32 */ -} - -// Close versioned namespace, if enabled by the user. -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/ATM_Params.cpp b/modules/worldengine/deps/acelite/ace/ATM_Params.cpp deleted file mode 100644 index ac8a996e58..0000000000 --- a/modules/worldengine/deps/acelite/ace/ATM_Params.cpp +++ /dev/null @@ -1,18 +0,0 @@ -#include "ace/ATM_Params.h" - -#if defined (ACE_HAS_ATM) - - - -#if !defined (__ACE_INLINE__) -#include "ace/ATM_Params.inl" -#endif /* __ACE_INLINE__ */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_ALLOC_HOOK_DEFINE(ACE_ATM_Params) - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_HAS_ATM */ - diff --git a/modules/worldengine/deps/acelite/ace/ATM_Params.h b/modules/worldengine/deps/acelite/ace/ATM_Params.h deleted file mode 100644 index 34db502486..0000000000 --- a/modules/worldengine/deps/acelite/ace/ATM_Params.h +++ /dev/null @@ -1,212 +0,0 @@ -// -*- C++ -*- - -//========================================================================== -/** - * @file ATM_Params.h - * - * @author Joe Hoffert - */ -//========================================================================== - - -#ifndef ACE_ATM_PARAMS_H -#define ACE_ATM_PARAMS_H -#include /**/ "ace/pre.h" - -#include /**/ "ace/config-all.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#if defined (ACE_HAS_ATM) - -#include /**/ "ace/ACE_export.h" - -#if defined (ACE_HAS_FORE_ATM_XTI) -#include "ace/TLI.h" -#define ATM_PROTOCOL_DEFAULT 0 -typedef struct t_info Param_Info; -typedef struct netbuf Param_Udata; -#elif defined (ACE_HAS_FORE_ATM_WS2) -#include "ace/SOCK.h" -#define ATM_PROTOCOL_DEFAULT ATMPROTO_AAL5 -#define ACE_XTI_ATM_DEVICE "" -typedef int Param_Info; -typedef int Param_Udata; -#elif defined (ACE_HAS_LINUX_ATM) -#include /**/ "atm.h" -#define AF_ATM PF_ATMSVC -#define ACE_XTI_ATM_DEVICE "" -#define ATM_PROTOCOL_DEFAULT ATM_AAL5 -typedef int Param_Info; -typedef int Param_Udata; -#else -#define ACE_XTI_ATM_DEVICE "" -typedef int Param_Info; -typedef int Param_Udata; -#endif /* ACE_HAS_FORE_ATM_XTI || ACE_HAS_FORE_ATM_WS2 || ACE_HAS_LINUX_ATM */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_ATM_Params - * - * @brief Wrapper class that simplifies the information passed to the ATM - * enabled ACE_ATM_Connector class. - */ -class ACE_Export ACE_ATM_Params -{ -public: - /** - * Initialize the data members. This class combines options from - * ACE_SOCK_Connector (@a protocol_family, @a protocol, , - * @a protocol_info, , and @a flags) and - * ACE_TLI_Connector (, , , , and ) - * so that either mechanism can be used transparently for ATM. - */ - ACE_ATM_Params (int rw_flag = 1, - const char device[] = ACE_XTI_ATM_DEVICE, - Param_Info *info = 0, - Param_Udata *udata = 0, - int oflag = O_RDWR, - int protocol_family = AF_ATM, - int protocol = ATM_PROTOCOL_DEFAULT, - int type = -#if defined (ACE_HAS_LINUX_ATM) - SOCK_DGRAM, -#else - SOCK_RAW, -#endif /* ACE_HAS_LINUX_ATM */ - ACE_Protocol_Info *protocol_info = 0, - ACE_SOCK_GROUP g = 0, - u_long flags - = ACE_FLAG_MULTIPOINT_C_ROOT - | ACE_FLAG_MULTIPOINT_D_ROOT, // connector by default - int reuse_addr = 0); - - /// Destructor. - ~ACE_ATM_Params (); - - /// Get protocol family. - int get_protocol_family (void) const; - - /// Set protocol family. - void set_protocol_family (int); - - /// Get protocol. - int get_protocol (void) const; - - /// Set protocol. - void set_protocol (int); - - /// Get type. - int get_type (void) const; - - /// Set type. - void set_type (int); - - /// Get protocol info. - ACE_Protocol_Info *get_protocol_info( void ); - - /// Set protocol info. - void set_protocol_info( ACE_Protocol_Info *); - - /// Get socket group. - ACE_SOCK_GROUP get_sock_group( void ); - - /// Set socket group. - void set_sock_group( ACE_SOCK_GROUP ); - - /// Get socket flags. - u_long get_flags( void ); - - /// Set socket flags. - void set_flags( u_long ); - - /// Get reuse_addr flag. - int get_reuse_addr (void) const; - - /// Set reuse_addr flag. - void set_reuse_addr (int); - - /// Get device. - const char* get_device (void) const; - - /// Get info. - Param_Info* get_info (void) const; - - /// Set info. - void set_info (Param_Info *); - - /// Get r/w flag. - int get_rw_flag (void) const; - - /// Set r/w flag. - void set_rw_flag (int); - - /// Get user data. - Param_Udata* get_user_data (void) const; - - /// Set user data. - void set_user_data (Param_Udata*); - - /// Get open flag. - int get_oflag (void) const; - - /// Set open flag. - void set_oflag (int); - - /// Dump the state of an object. - void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - -private: - /// Protocol family for sockets connections. - int protocol_family_; - - /// Protocol for sockets connections. - int protocol_; - - /// Type for opening sockets. - int type_; - - /// Information about the protocol. - ACE_Protocol_Info *protocol_info_; - - /// Socket group used (for sockets only). - ACE_SOCK_GROUP group_; - - /// Flags for sockets (for sockets only). - u_long flags_; - - /// Flag for reusing address for opening sockets. - int reuse_addr_; - - /// Device name for XTI/ATM connections. - const char *device_; - - /// Info for XTI/ATM connections. - Param_Info *info_; - - /// R/W flag for XTI/ATM connections. - int rw_flag_; - - /// User data for XTI/ATM connections. - Param_Udata *udata_; - - /// Open flag for XTI/ATM connections. - int oflag_; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/ATM_Params.inl" -#endif /* __ACE_INLINE__ */ - -#endif /* ACE_HAS_ATM */ -#include /**/ "ace/post.h" -#endif /* ACE_ATM_PARAMS_H */ diff --git a/modules/worldengine/deps/acelite/ace/ATM_Params.inl b/modules/worldengine/deps/acelite/ace/ATM_Params.inl deleted file mode 100644 index 59ec331b53..0000000000 --- a/modules/worldengine/deps/acelite/ace/ATM_Params.inl +++ /dev/null @@ -1,232 +0,0 @@ -// -*- C++ -*- -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_INLINE void -ACE_ATM_Params::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_ATM_Params::dump"); -#endif /* ACE_HAS_DUMP */ -} - -ACE_INLINE -ACE_ATM_Params::ACE_ATM_Params (int rw_flag, - const char device[], - Param_Info *info, - Param_Udata *udata, - int oflag, - int protocol_family, - int protocol, - int type, - ACE_Protocol_Info *protocol_info, - ACE_SOCK_GROUP g, - u_long flags, - int reuse_addr) - : protocol_family_(protocol_family), - protocol_(protocol), - type_(type), - protocol_info_(protocol_info), - group_(g), - flags_(flags), - reuse_addr_(reuse_addr), - device_(device), - info_(info), - rw_flag_(rw_flag), - udata_(udata), - oflag_(oflag) -{ - ACE_TRACE ("ACE_ATM_Params::ACE_ATM_Params"); -} - -// Default dtor. -ACE_INLINE -ACE_ATM_Params::~ACE_ATM_Params (void) -{ - ACE_TRACE ("ACE_ATM_Params::~ACE_ATM_Params"); -} - -ACE_INLINE -int -ACE_ATM_Params::get_protocol_family (void) const -{ - ACE_TRACE ("ACE_ATM_Params::get_protocol_family"); - return protocol_family_; -} - -ACE_INLINE -void -ACE_ATM_Params::set_protocol_family (int family) -{ - ACE_TRACE ("ACE_ATM_Params::set_protocol_family"); - protocol_family_ = family; -} - -ACE_INLINE -int -ACE_ATM_Params::get_protocol (void) const -{ - ACE_TRACE ("ACE_ATM_Params::get_protocol"); - return protocol_; -} - -ACE_INLINE -void -ACE_ATM_Params::set_protocol (int protocol) -{ - ACE_TRACE ("ACE_ATM_Params::set_protocol"); - protocol_ = protocol; -} - -ACE_INLINE -int -ACE_ATM_Params::get_type (void) const -{ - ACE_TRACE ("ACE_ATM_Params::get_type"); - return type_; -} - -ACE_INLINE -void -ACE_ATM_Params::set_type (int type) -{ - ACE_TRACE ("ACE_ATM_Params::set_type"); - type_ = type; -} - -ACE_INLINE -ACE_Protocol_Info* -ACE_ATM_Params::get_protocol_info( void ) -{ - ACE_TRACE ("ACE_ATM_Params::get_protocol_info"); - return protocol_info_; -} - -ACE_INLINE -void -ACE_ATM_Params::set_protocol_info( ACE_Protocol_Info *protocol_info ) -{ - ACE_TRACE ("ACE_ATM_Params::set_protocol_info"); - protocol_info_ = protocol_info; -} - -ACE_INLINE -ACE_SOCK_GROUP -ACE_ATM_Params::get_sock_group( void ) -{ - ACE_TRACE ("ACE_ATM_Params::get_sock_group"); - return group_; -} - -ACE_INLINE -void -ACE_ATM_Params::set_sock_group( ACE_SOCK_GROUP g ) -{ - ACE_TRACE ("ACE_ATM_Params::set_sock_group"); - group_ = g; -} - -ACE_INLINE -u_long -ACE_ATM_Params::get_flags( void ) -{ - ACE_TRACE ("ACE_ATM_Params::get_flags"); - return flags_; -} - -ACE_INLINE -void -ACE_ATM_Params::set_flags( u_long flags) -{ - ACE_TRACE ("ACE_ATM_Params::set_flags"); - flags_ = flags; -} - -ACE_INLINE -int -ACE_ATM_Params::get_reuse_addr (void) const -{ - ACE_TRACE ("ACE_ATM_Params::get_reuse_addr"); - return reuse_addr_; -} - -ACE_INLINE -void -ACE_ATM_Params::set_reuse_addr (int reuse_addr) -{ - ACE_TRACE ("ACE_ATM_Params::set_reuse_addr"); - reuse_addr_ = reuse_addr; -} - -ACE_INLINE -const char* -ACE_ATM_Params::get_device (void) const -{ - ACE_TRACE ("ACE_ATM_Params::get_device"); - return device_; -} - -ACE_INLINE -Param_Info* -ACE_ATM_Params::get_info (void) const -{ - ACE_TRACE ("ACE_ATM_Params::get_info"); - return info_; -} - -ACE_INLINE -void -ACE_ATM_Params::set_info (Param_Info* info) -{ - ACE_TRACE ("ACE_ATM_Params::set_info"); - info_ = info; -} - -ACE_INLINE -int -ACE_ATM_Params::get_rw_flag (void) const -{ - ACE_TRACE ("ACE_ATM_Params::get_rw_flag"); - return rw_flag_; -} - -ACE_INLINE -void -ACE_ATM_Params::set_rw_flag (int rw_flag) -{ - ACE_TRACE ("ACE_ATM_Params::set_rw_flag"); - rw_flag_ = rw_flag; -} - -ACE_INLINE -Param_Udata* -ACE_ATM_Params::get_user_data (void) const -{ - ACE_TRACE ("ACE_ATM_Params::get_user_data"); - return udata_; -} - -ACE_INLINE -void -ACE_ATM_Params::set_user_data (Param_Udata *udata) -{ - ACE_TRACE ("ACE_ATM_Params::set_user_data"); - udata_ = udata; -} - -ACE_INLINE -int -ACE_ATM_Params::get_oflag (void) const -{ - ACE_TRACE ("ACE_ATM_Params::get_oflag"); - return oflag_; -} - -ACE_INLINE -void -ACE_ATM_Params::set_oflag (int oflag) -{ - ACE_TRACE ("ACE_ATM_Params::set_oflag"); - oflag_ = oflag; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/ATM_QoS.cpp b/modules/worldengine/deps/acelite/ace/ATM_QoS.cpp deleted file mode 100644 index a6b097326a..0000000000 --- a/modules/worldengine/deps/acelite/ace/ATM_QoS.cpp +++ /dev/null @@ -1,629 +0,0 @@ -#include "ace/ATM_QoS.h" - - - -#if defined (ACE_HAS_ATM) - -#if !defined (__ACE_INLINE__) -#include "ace/ATM_QoS.inl" -#endif /* __ACE_INLINE__ */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -#if defined (ACE_HAS_FORE_ATM_XTI) || defined (ACE_HAS_FORE_ATM_WS2) -#define BHLI_MAGIC "FORE_ATM" -// This is line rate in cells/s for an OC-3 MM interface. -const long ACE_ATM_QoS::LINE_RATE = 353207; -const int ACE_ATM_QoS::OPT_FLAGS_CPID = 0x1; -const int ACE_ATM_QoS::OPT_FLAGS_PMP = 0x2; -const int ACE_ATM_QoS::DEFAULT_SELECTOR = 0x99; -const int ACE_ATM_QoS::DEFAULT_PKT_SIZE = 8192; -#elif defined (ACE_HAS_LINUX_ATM) -//pbrandao:for Linux: -//pbrandao:for now stick with current definitions -//pbrandao:see if later need to change -const long ACE_ATM_QoS::LINE_RATE = 353207; -const int ACE_ATM_QoS::OPT_FLAGS_CPID = 0x1; -const int ACE_ATM_QoS::OPT_FLAGS_PMP = 0x2; -const int ACE_ATM_QoS::DEFAULT_SELECTOR = 0x99; -const int ACE_ATM_QoS::DEFAULT_PKT_SIZE = 8192; -#else -const long ACE_ATM_QoS::LINE_RATE = 0L; -const int ACE_ATM_QoS::OPT_FLAGS_CPID = 0; -const int ACE_ATM_QoS::OPT_FLAGS_PMP = 0; -const int ACE_ATM_QoS::DEFAULT_SELECTOR = 0x0; -const int ACE_ATM_QoS::DEFAULT_PKT_SIZE = 0; -#endif /* ACE_HAS_FORE_ATM_XTI || ACE_HAS_FORE_ATM_WS2 || ACE_HAS_LINUX_ATM */ - -ACE_ALLOC_HOOK_DEFINE(ACE_ATM_QoS) - -ACE_ATM_QoS::ACE_ATM_QoS (int pktSize) -{ - ACE_TRACE ("ACE_ATM_QoS::ACE_ATM_QoS"); -#if defined (ACE_HAS_LINUX_ATM) - ACE_OS::memset(&qos_, 0, sizeof(qos_)); - qos_.aal = ATM_PROTOCOL_DEFAULT; - qos_.rxtp.traffic_class = ATM_ANYCLASS; - qos_.rxtp.max_sdu = pktSize; - qos_.txtp.traffic_class = ATM_ANYCLASS; - qos_.txtp.max_sdu = pktSize; -#else - ACE_UNUSED_ARG (pktSize); -#endif /* ACE_HAS_LINUX_ATM */ -} - -ACE_ATM_QoS::ACE_ATM_QoS(int rate, - int pktSize) -{ - ACE_TRACE( "ACE_ATM_QoS::ACE_ATM_QoS" ); -#if defined (ACE_HAS_FORE_ATM_WS2) - AAL_PARAMETERS_IE ie_aalparams; - ATM_TRAFFIC_DESCRIPTOR_IE ie_td; - ATM_BROADBAND_BEARER_CAPABILITY_IE ie_bbc; - ATM_QOS_CLASS_IE ie_qos; - Q2931_IE *ie_ptr; - int size; - - // Setting up cbr parameters ... - ie_aalparams.AALType = AALTYPE_5; - ie_aalparams.AALSpecificParameters.AAL5Parameters.ForwardMaxCPCSSDUSize - = pktSize; // was 1516; - ie_aalparams.AALSpecificParameters.AAL5Parameters.BackwardMaxCPCSSDUSize - = pktSize; // was 1516; - ie_aalparams.AALSpecificParameters.AAL5Parameters.Mode = AAL5_MODE_MESSAGE; - ie_aalparams.AALSpecificParameters.AAL5Parameters.SSCSType = AAL5_SSCS_NULL; - - size = sizeof(Q2931_IE_TYPE) + sizeof(ULONG) + sizeof(AAL_PARAMETERS_IE); - - ie_td.Forward.PeakCellRate_CLP0 = SAP_FIELD_ABSENT; - ie_td.Forward.PeakCellRate_CLP01 = rate; - ie_td.Forward.SustainableCellRate_CLP0 = SAP_FIELD_ABSENT; - ie_td.Forward.SustainableCellRate_CLP01 = SAP_FIELD_ABSENT; - ie_td.Forward.MaxBurstSize_CLP0 = SAP_FIELD_ABSENT; - ie_td.Forward.MaxBurstSize_CLP01 = SAP_FIELD_ABSENT; - ie_td.Forward.Tagging = SAP_FIELD_ABSENT; - - ie_td.Backward.PeakCellRate_CLP0 = SAP_FIELD_ABSENT; - ie_td.Backward.PeakCellRate_CLP01 = rate; - ie_td.Backward.SustainableCellRate_CLP0 = SAP_FIELD_ABSENT; - ie_td.Backward.SustainableCellRate_CLP01 = SAP_FIELD_ABSENT; - ie_td.Backward.MaxBurstSize_CLP0 = SAP_FIELD_ABSENT; - ie_td.Backward.MaxBurstSize_CLP01 = SAP_FIELD_ABSENT; - ie_td.Backward.Tagging = SAP_FIELD_ABSENT; - - ie_td.BestEffort = 0; // Note: this must be set to zero for CBR. - - size += sizeof( Q2931_IE_TYPE ) - + sizeof( ULONG ) - + sizeof( ATM_TRAFFIC_DESCRIPTOR_IE ); - - ie_bbc.BearerClass = BCOB_X; - ie_bbc.TrafficType = TT_CBR; - ie_bbc.TimingRequirements = TR_END_TO_END; - ie_bbc.ClippingSusceptability = CLIP_NOT; - ie_bbc.UserPlaneConnectionConfig = UP_P2P; - - size += sizeof( Q2931_IE_TYPE ) - + sizeof( ULONG ) - + sizeof( ATM_BROADBAND_BEARER_CAPABILITY_IE ); - - ie_qos.QOSClassForward = QOS_CLASS1; - ie_qos.QOSClassBackward = QOS_CLASS1; // This may not be really used - // since we do only simplex data xfer. - - size += sizeof(Q2931_IE_TYPE) + sizeof(ULONG) + sizeof(ATM_QOS_CLASS_IE); - - qos_.ProviderSpecific.buf = (char *) ACE_OS::malloc(size); - if (qos_.ProviderSpecific.buf == 0) { - ACELIB_ERROR((LM_ERROR, - ACE_TEXT ("ACE_ATM_QoS::ACE_ATM_QoS: Unable to allocate %d bytes for qos_.ProviderSpecific.buf\n"), - size)); - return; - } - qos_.ProviderSpecific.len = size; - ACE_OS::memset(qos_.ProviderSpecific.buf, 0, size); - - ie_ptr = (Q2931_IE *) qos_.ProviderSpecific.buf; - ie_ptr->IEType = IE_AALParameters; - ie_ptr->IELength = sizeof( Q2931_IE_TYPE ) - + sizeof( ULONG ) - + sizeof( AAL_PARAMETERS_IE ); - ACE_OS::memcpy(ie_ptr->IE, &ie_aalparams, sizeof(AAL_PARAMETERS_IE)); - - ie_ptr = (Q2931_IE *) ((char *)ie_ptr + ie_ptr->IELength); - ie_ptr->IEType = IE_TrafficDescriptor; - ie_ptr->IELength = sizeof( Q2931_IE_TYPE ) - + sizeof( ULONG ) - + sizeof( ATM_TRAFFIC_DESCRIPTOR_IE ); - ACE_OS::memcpy(ie_ptr->IE, &ie_td, sizeof(ATM_TRAFFIC_DESCRIPTOR_IE)); - - ie_ptr = (Q2931_IE *) ((char *)ie_ptr + ie_ptr->IELength); - ie_ptr->IEType = IE_BroadbandBearerCapability; - ie_ptr->IELength = sizeof( Q2931_IE_TYPE ) - + sizeof( ULONG ) - + sizeof( ATM_BROADBAND_BEARER_CAPABILITY_IE ); - ACE_OS::memcpy(ie_ptr->IE, - &ie_bbc, - sizeof(ATM_BROADBAND_BEARER_CAPABILITY_IE)); - - ie_ptr = (Q2931_IE *) ((char *)ie_ptr + ie_ptr->IELength); - ie_ptr->IEType = IE_QOSClass; - ie_ptr->IELength = sizeof( Q2931_IE_TYPE ) - + sizeof( ULONG ) - + sizeof( ATM_QOS_CLASS_IE ); - ACE_OS::memcpy(ie_ptr->IE, &ie_qos, sizeof(ATM_QOS_CLASS_IE)); - - // qos_.SendingFlowspec.TokenRate = 0xffffffff; - // qos_.SendingFlowspec.TokenBucketSize = 0xffffffff; - // qos_.SendingFlowspec.PeakBandwidth = 0xffffffff; - // qos_.SendingFlowspec.Latency = 0xffffffff; - // qos_.SendingFlowspec.DelayVariation = 0xffffffff; - // qos_.SendingFlowspec.ServiceType = SERVICETYPE_BESTEFFORT; - // This will most probably be ignored by the service provider. - // qos_.SendingFlowspec.MaxSduSize = 0xffffffff; - // qos_.SendingFlowspec.MinimumPolicedSize = 0xffffffff; - - // qos_.ReceivingFlowspec.TokenRate = 0xffffffff; - // qos_.ReceivingFlowspec.TokenBucketSize = 0xffffffff; - // qos_.ReceivingFlowspec.PeakBandwidth = 0xffffffff; - // qos_.ReceivingFlowspec.Latency = 0xffffffff; - // qos_.ReceivingFlowspec.DelayVariation = 0xffffffff; - // qos_.ReceivingFlowspec.ServiceType = SERVICETYPE_BESTEFFORT; - // This will most probably be ignored by the service provider. - // qos_.ReceivingFlowspec.MaxSduSize = 0xffffffff; - // qos_.ReceivingFlowspec.MinimumPolicedSize = 0; - - ACE_Flow_Spec send_fspec( 0xffffffff, - 0xffffffff, - 0xffffffff, - 0xffffffff, - 0xffffffff, - SERVICETYPE_BESTEFFORT, - // This will most probably ignored by SP. - 0xffffffff, - 0xffffffff, - 15, - ACE_DEFAULT_THREAD_PRIORITY ), - recv_fspec( 0xffffffff, - 0xffffffff, - 0xffffffff, - 0xffffffff, - 0xffffffff, - SERVICETYPE_BESTEFFORT, - // This will most probably ignored by SP. - 0xffffffff, - 0, - 15, - ACE_DEFAULT_THREAD_PRIORITY ); - - qos_.sending_flowspec (send_fspec); - qos_.receiving_flowspec (recv_fspec); -#elif defined (ACE_HAS_FORE_ATM_XTI) - ACE_UNUSED_ARG (rate); - ACE_UNUSED_ARG (pktSize); -#elif defined (ACE_HAS_LINUX_ATM) - ACE_OS::memset(&qos_, - 0, - sizeof(qos_)); - qos_.aal = ATM_PROTOCOL_DEFAULT; - qos_.rxtp.max_sdu = pktSize; - - if (rate > 0) { - qos_.rxtp.pcr = rate; - qos_.rxtp.traffic_class = ATM_CBR; - qos_.txtp.traffic_class = ATM_CBR; - qos_.txtp.pcr = rate; - } - else { - qos_.rxtp.traffic_class = ATM_UBR; - qos_.txtp.traffic_class = ATM_UBR; - } - - qos_.txtp.max_sdu = pktSize; -#else - ACE_UNUSED_ARG (rate); -#endif /* ACE_HAS_FORE_ATM_WS2 || ACE_HAS_FORE_ATM_XTI || ACE_HAS_LINUX_ATM */ -} - -void -ACE_ATM_QoS::set_cbr_rate (int rate, - int pktSize) -{ - ACE_TRACE ("ACE_ATM_QoS::set_cbr_rate"); -#if defined (ACE_HAS_FORE_ATM_WS2) - /* - AAL_PARAMETERS_IE ie_aalparams; - ATM_TRAFFIC_DESCRIPTOR_IE ie_td; - ATM_BROADBAND_BEARER_CAPABILITY_IE ie_bbc; - ATM_QOS_CLASS_IE ie_qos; - Q2931_IE *ie_ptr; - int size; - */ - - ACE_OS::printf( "ATM_QoS(set_cbr_rate): set rate to %d c/s\n", rate ); - - // Setting up cbr parameters ... - /* - FORE has changed this - we no longer specify QoS this way - ie_aalparams.AALType = AALTYPE_5; - ie_aalparams.AALSpecificParameters.AAL5Parameters.ForwardMaxCPCSSDUSize - = pktSize; // was 1516; - ie_aalparams.AALSpecificParameters.AAL5Parameters.BackwardMaxCPCSSDUSize - = pktSize; // was 1516; - ie_aalparams.AALSpecificParameters.AAL5Parameters.Mode = AAL5_MODE_MESSAGE; - ie_aalparams.AALSpecificParameters.AAL5Parameters.SSCSType = AAL5_SSCS_NULL; - - size = sizeof(Q2931_IE_TYPE) + sizeof(ULONG) + sizeof(AAL_PARAMETERS_IE); - - ie_td.Forward.PeakCellRate_CLP0 = SAP_FIELD_ABSENT; - ie_td.Forward.PeakCellRate_CLP01 = rate; - ie_td.Forward.SustainableCellRate_CLP0 = SAP_FIELD_ABSENT; - ie_td.Forward.SustainableCellRate_CLP01 = SAP_FIELD_ABSENT; - ie_td.Forward.MaxBurstSize_CLP0 = SAP_FIELD_ABSENT; - ie_td.Forward.MaxBurstSize_CLP01 = SAP_FIELD_ABSENT; - ie_td.Forward.Tagging = SAP_FIELD_ABSENT; - - ie_td.Backward.PeakCellRate_CLP0 = SAP_FIELD_ABSENT; - ie_td.Backward.PeakCellRate_CLP01 = rate; - ie_td.Backward.SustainableCellRate_CLP0 = SAP_FIELD_ABSENT; - ie_td.Backward.SustainableCellRate_CLP01 = SAP_FIELD_ABSENT; - ie_td.Backward.MaxBurstSize_CLP0 = SAP_FIELD_ABSENT; - ie_td.Backward.MaxBurstSize_CLP01 = SAP_FIELD_ABSENT; - ie_td.Backward.Tagging = SAP_FIELD_ABSENT; - - ie_td.BestEffort = 0; // Note: this must be set to zero for CBR. - - size += sizeof( Q2931_IE_TYPE ) + - sizeof( ULONG ) + - sizeof( ATM_TRAFFIC_DESCRIPTOR_IE ); - - ie_bbc.BearerClass = BCOB_X; - ie_bbc.TrafficType = TT_CBR; - ie_bbc.TimingRequirements = TR_END_TO_END; - ie_bbc.ClippingSusceptability = CLIP_NOT; - ie_bbc.UserPlaneConnectionConfig = UP_P2P; - - size += sizeof(Q2931_IE_TYPE) + - sizeof(ULONG) + - sizeof(ATM_BROADBAND_BEARER_CAPABILITY_IE); - - ie_qos.QOSClassForward = QOS_CLASS1; - ie_qos.QOSClassBackward = QOS_CLASS1; // This may not be really used - // since we only simplex data xfer. - - size += sizeof(Q2931_IE_TYPE) + sizeof(ULONG) + sizeof(ATM_QOS_CLASS_IE); - - qos_.ProviderSpecific.buf = (char *) ACE_OS::malloc(size); - if (qos_.ProviderSpecific.buf == 0) { - ACELIB_ERROR((LM_ERROR, - ACE_TEXT ("ACE_ATM_QoS::ACE_ATM_QoS: Unable to allocate %d bytes for qos_.ProviderSpecific.buf\n"), - size)); - return; - } - qos_.ProviderSpecific.len = size; - ACE_OS::memset(qos_.ProviderSpecific.buf, 0, size); - - ie_ptr = (Q2931_IE *) qos_.ProviderSpecific.buf; - ie_ptr->IEType = IE_AALParameters; - ie_ptr->IELength = sizeof( Q2931_IE_TYPE ) + - sizeof( ULONG ) + - sizeof( AAL_PARAMETERS_IE ); - ACE_OS::memcpy(ie_ptr->IE, &ie_aalparams, sizeof(AAL_PARAMETERS_IE)); - - ie_ptr = (Q2931_IE *) ((char *)ie_ptr + ie_ptr->IELength); - ie_ptr->IEType = IE_TrafficDescriptor; - ie_ptr->IELength = sizeof( Q2931_IE_TYPE ) + - sizeof( ULONG ) + - sizeof( ATM_TRAFFIC_DESCRIPTOR_IE ); - ACE_OS::memcpy(ie_ptr->IE, &ie_td, sizeof(ATM_TRAFFIC_DESCRIPTOR_IE)); - - ie_ptr = (Q2931_IE *) ((char *)ie_ptr + ie_ptr->IELength); - ie_ptr->IEType = IE_BroadbandBearerCapability; - ie_ptr->IELength = sizeof( Q2931_IE_TYPE ) + - sizeof( ULONG ) + - sizeof( ATM_BROADBAND_BEARER_CAPABILITY_IE ); - ACE_OS::memcpy( ie_ptr->IE, - &ie_bbc, - sizeof( ATM_BROADBAND_BEARER_CAPABILITY_IE )); - - ie_ptr = (Q2931_IE *) ((char *)ie_ptr + ie_ptr->IELength); - ie_ptr->IEType = IE_QOSClass; - ie_ptr->IELength = sizeof(Q2931_IE_TYPE) + sizeof(ULONG) + - sizeof(ATM_QOS_CLASS_IE); - ACE_OS::memcpy(ie_ptr->IE, &ie_qos, sizeof(ATM_QOS_CLASS_IE)); - */ - - const int BYTES_PER_ATM_CELL = 53; - ACE_OS::memset(&qos_, 0, sizeof(ATM_QoS)); - // Setting the token rate sets the minimum rate. 3 Mbits/sec seems too high. - // Certainly for Vaudeville audio, we only need about 1000 c/s which is - // 424000 bits/sec which is 53000 bytes/sec. - //qos_.SendingFlowspec.TokenRate = 3*(1024*128); // 3Mbits/sec - qos_.SendingFlowspec.TokenRate = 53000; // 1000 cells/sec - qos_.SendingFlowspec.TokenBucketSize = 32*1024; // our block size - //ourQos.SendingFlowspec.PeakBandwidth = ourQos.SendingFlowspec.TokenRate; - qos_.SendingFlowspec.ServiceType = SERVICETYPE_GUARANTEED; - // Peak bandwidth is in bytes/sec. The rate is specified in cells/sec so - // we need to convert from cells/sec to bytes/sec (i.e., multiply by 53). - qos_.SendingFlowspec.PeakBandwidth = rate * BYTES_PER_ATM_CELL; - qos_.SendingFlowspec.Latency = -1; // we don't care too much - qos_.SendingFlowspec.DelayVariation = -1; // we don't care too much - // no provider-specific data allowed on ATM - qos_.ProviderSpecific.buf=0; - qos_.ProviderSpecific.len=0; - // unidirectional P2MP; we don't need to setup the Receiving flowspec - - //qos_.SendingFlowspec.TokenRate = 0xffffffff; - //qos_.SendingFlowspec.TokenBucketSize = 0xffffffff; - //qos_.SendingFlowspec.PeakBandwidth = 0xffffffff; - //qos_.SendingFlowspec.Latency = 0xffffffff; - //qos_.SendingFlowspec.DelayVariation = 0xffffffff; - //qos_.SendingFlowspec.ServiceType = SERVICETYPE_BESTEFFORT; - // This will most probably be ignored by the service provider. - //qos_.SendingFlowspec.MaxSduSize = 0xffffffff; - //qos_.SendingFlowspec.MinimumPolicedSize = 0xffffffff; - - //qos_.ReceivingFlowspec.TokenRate = 0xffffffff; - //qos_.ReceivingFlowspec.TokenBucketSize = 0xffffffff; - //qos_.ReceivingFlowspec.PeakBandwidth = 0xffffffff; - //qos_.ReceivingFlowspec.Latency = 0xffffffff; - //qos_.ReceivingFlowspec.DelayVariation = 0xffffffff; - //qos_.ReceivingFlowspec.ServiceType = SERVICETYPE_BESTEFFORT; - // This will most probably be ignored by the service provider. - //qos_.ReceivingFlowspec.MaxSduSize = 0xffffffff; - //qos_.ReceivingFlowspec.MinimumPolicedSize = 0; - - /* - ACE_Flow_Spec send_fspec( 0xffffffff, - 0xffffffff, - 0xffffffff, - 0xffffffff, - 0xffffffff, - SERVICETYPE_BESTEFFORT, - // This will most probably ignored by SP. - 0xffffffff, - 0xffffffff, - 15, - ACE_DEFAULT_THREAD_PRIORITY ), - recv_fspec( 0xffffffff, - 0xffffffff, - 0xffffffff, - 0xffffffff, - 0xffffffff, - SERVICETYPE_BESTEFFORT, - // This will most probably ignored by SP. - 0xffffffff, - 0, - 15, - ACE_DEFAULT_THREAD_PRIORITY ); - - qos_.sending_flowspec( send_fspec ); - qos_.receiving_flowspec( recv_fspec ); - */ -#elif defined (ACE_HAS_FORE_ATM_XTI) - ACE_UNUSED_ARG (rate); - ACE_UNUSED_ARG (pktSize); -#elif defined (ACE_HAS_LINUX_ATM) - ACE_UNUSED_ARG (pktSize); - - qos_.rxtp.traffic_class = ATM_CBR; - qos_.rxtp.pcr = rate; - qos_.txtp.traffic_class = ATM_CBR; - qos_.txtp.pcr = rate; -#else - ACE_UNUSED_ARG (rate); -#endif /* ACE_HAS_FORE_ATM_WS2 || ACE_HAS_FORE_ATM_XTI || ACE_HAS_LINUX_ATM */ -} - -void -ACE_ATM_QoS::set_rate (ACE_HANDLE fd, - int rate, - int flags) -{ - ACE_TRACE ("ACE_ATM_QoS::set_rate"); -#if defined (ACE_HAS_FORE_ATM_WS2) || defined (ACE_HAS_LINUX_ATM) - set_cbr_rate( rate ); - - ACE_UNUSED_ARG( fd ); - ACE_UNUSED_ARG( flags ); -#elif defined (ACE_HAS_FORE_ATM_XTI) - long optlen = 0; - qos_.buf = construct_options(fd, - rate, - flags, - &optlen); - qos_.len = optlen; -#else - ACE_UNUSED_ARG (rate); -#endif /* ACE_HAS_FORE_ATM_WS2 || ACE_HAS_LINUX_ATM || ACE_HAS_FORE_ATM_XTI */ -} - -char* -ACE_ATM_QoS::construct_options (ACE_HANDLE fd, - int rate, - int flags, - long *len) -{ -#if defined (ACE_HAS_FORE_ATM_WS2) || defined (ACE_HAS_LINUX_ATM) - ACE_UNUSED_ARG (fd); - ACE_UNUSED_ARG (rate); - ACE_UNUSED_ARG (flags); - ACE_UNUSED_ARG (len); - return 0; -#elif defined (ACE_HAS_FORE_ATM_XTI) - struct t_opthdr *popt; - char *buf; - int qos_cells; - struct t_info info; - - if (ACE_OS::t_getinfo (fd, &info) == -1) - { - ACE_OS::t_error ("t_getinfo"); - return 0; - } - - buf = (char *) ACE_OS::malloc (info.options); - - if (buf == 0) - ACELIB_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("Unable to allocate %d bytes for options\n"), - info.options), - 0); - - popt = (struct t_opthdr *) buf; - - if (flags & OPT_FLAGS_CPID) - { - // This constructs the T_ATM_ORIG_ADDR option, which is used to - // signal the UNI 3.1 Calling Party ID Information Element. - t_atm_addr *source_addr; - - popt->len = sizeof (struct t_opthdr) + sizeof (t_atm_addr); - popt->level = T_ATM_SIGNALING; - popt->name = T_ATM_ORIG_ADDR; - popt->status = 0; - - source_addr = - (t_atm_addr *)((char *) popt + sizeof (struct t_opthdr)); - - source_addr->address_format = T_ATM_ENDSYS_ADDR; - source_addr->address_length = ATMNSAP_ADDR_LEN; - - ATMSAPAddress local_addr; - struct t_bind boundaddr; - - boundaddr.addr.maxlen = sizeof(local_addr); - boundaddr.addr.buf = (char *) &local_addr; - - //if (ACE_OS::t_getprotaddr(fd, &boundaddr, 0) < 0) { - if (ACE_OS::t_getname(fd, - &boundaddr.addr, - LOCALNAME) < 0) - { - ACE_OS::t_error("t_getname (local_address)"); - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("Can't get local address!\n"))); - ACE_OS::free (buf); - return 0; - } - - ACE_OS::memcpy(source_addr->address, - local_addr.sap.t_atm_sap_addr.address, - ATMNSAP_ADDR_LEN); - - popt = T_OPT_NEXTHDR (buf, info.options , popt); - } - - // This constructs all options necessary (bearer cap., QoS, and - // Traffic Descriptor) to signal for a CBR connection with the - // specified QoS in kbit/sec., and/or specify a PMP connection. - - // For FORE 200e cards, the adapter shapes traffic to CBR with rate - // equal to PCR CLP=0+1 (traffic.forward.PCR_all_traffic) - - qos_cells = (rate * 1000) / (48*8); - - if ((qos_cells > 0 && qos_cells < LINE_RATE) - || (ACE_BIT_ENABLED (flags, OPT_FLAGS_PMP))) - { - struct t_atm_bearer *bearer; - struct t_atm_traffic *traffic; - - // T_ATM_BEARER_CAP: Broadband bearer capability - popt->len = sizeof (struct t_opthdr) + sizeof (struct t_atm_bearer); - popt->level = T_ATM_SIGNALING; - popt->name = T_ATM_BEARER_CAP; - popt->status = 0; - - bearer = (struct t_atm_bearer *)((char *) popt + - sizeof (struct t_opthdr)); - bearer->bearer_class = T_ATM_CLASS_X; - - if (qos_cells) - { - bearer->traffic_type = T_ATM_CBR; - bearer->timing_requirements = T_ATM_END_TO_END; - } - else - { - bearer->traffic_type = 0; // UBR - bearer->timing_requirements = 0; - } - bearer->clipping_susceptibility = T_ATM_NULL; - - if (ACE_BIT_ENABLED (flags, OPT_FLAGS_PMP)) - bearer->connection_configuration = T_ATM_1_TO_MANY; - else - bearer->connection_configuration = T_ATM_1_TO_1; - - popt = T_OPT_NEXTHDR (buf, info.options, popt); - - // T_ATM_TRAFFIC: traffic descriptor - popt->len = sizeof (struct t_opthdr) + sizeof (struct t_atm_traffic); - popt->level = T_ATM_SIGNALING; - popt->name = T_ATM_TRAFFIC; - popt->status = 0; - - traffic = (struct t_atm_traffic *)((char *) popt + - sizeof (struct t_opthdr)); - - traffic->forward.PCR_high_priority = T_ATM_ABSENT; - traffic->forward.PCR_all_traffic = qos_cells ? qos_cells : LINE_RATE; - traffic->forward.SCR_high_priority = T_ATM_ABSENT; - traffic->forward.SCR_all_traffic = T_ATM_ABSENT; - traffic->forward.MBS_high_priority = T_ATM_ABSENT; - traffic->forward.MBS_all_traffic = T_ATM_ABSENT; - traffic->forward.tagging = T_NO; - - traffic->backward.PCR_high_priority = T_ATM_ABSENT; - traffic->backward.PCR_all_traffic = - (ACE_BIT_ENABLED (flags, OPT_FLAGS_PMP)) - ? 0 : qos_cells ? qos_cells : LINE_RATE; - traffic->backward.SCR_high_priority = T_ATM_ABSENT; - traffic->backward.SCR_all_traffic = T_ATM_ABSENT; - traffic->backward.MBS_high_priority = T_ATM_ABSENT; - traffic->backward.MBS_all_traffic = T_ATM_ABSENT; - traffic->backward.tagging = T_NO; - - traffic->best_effort = qos_cells ? T_NO : T_YES; - - popt = T_OPT_NEXTHDR (buf, - info.options, - popt); - } - - if (qos_cells > 0 && qos_cells < LINE_RATE) - { - struct t_atm_qos *qos; - - // T_ATM_QOS: Quality of Service - popt->len = sizeof (struct t_opthdr) + sizeof (struct t_atm_qos); - popt->level = T_ATM_SIGNALING; - popt->name = T_ATM_QOS; - popt->status = 0; - - qos = (struct t_atm_qos *)((char *) popt + sizeof (struct t_opthdr)); - qos->coding_standard = T_ATM_ITU_CODING; - qos->forward.qos_class = T_ATM_QOS_CLASS_1; - qos->backward.qos_class = T_ATM_QOS_CLASS_1; - - popt = T_OPT_NEXTHDR (buf, info.options, popt); - } - - // Return actual size of options and option buffer to user. - *len = (char *) popt - buf; - - return buf; -#else - ACE_UNUSED_ARG (fd); - ACE_UNUSED_ARG (rate); - ACE_UNUSED_ARG (flag); - ACE_UNUSED_ARG (len); - return 0; -#endif /* ACE_HAS_FORE_ATM_WS2 */ -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_HAS_ATM */ - diff --git a/modules/worldengine/deps/acelite/ace/ATM_QoS.h b/modules/worldengine/deps/acelite/ace/ATM_QoS.h deleted file mode 100644 index 02aa7d7c91..0000000000 --- a/modules/worldengine/deps/acelite/ace/ATM_QoS.h +++ /dev/null @@ -1,113 +0,0 @@ -// -*- C++ -*- - -//========================================================================== -/** - * @file ATM_QoS.h - * - * @author Joe Hoffert - */ -//========================================================================== - - -#ifndef ACE_ATM_QoS_H -#define ACE_ATM_QoS_H -#include /**/ "ace/pre.h" - -#include /**/ "ace/config-all.h" - -#if !defined(ACE_LACKS_PRAGMA_ONCE) -#pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#if defined (ACE_HAS_ATM) - -#if defined (ACE_HAS_FORE_ATM_WS2) -ACE_BEGIN_VERSIONED_NAMESPACE_DECL -// just map to WS2 GQOS struct -typedef ACE_QoS ATM_QoS; -ACE_END_VERSIONED_NAMESPACE_DECL -#elif defined (ACE_HAS_FORE_ATM_XTI) -ACE_BEGIN_VERSIONED_NAMESPACE_DECL -typedef struct netbuf ATM_QoS; -ACE_END_VERSIONED_NAMESPACE_DECL -#elif defined (ACE_HAS_LINUX_ATM) -#include /**/ "atm.h" -#include "ace/ATM_Params.h" -ACE_BEGIN_VERSIONED_NAMESPACE_DECL -typedef struct atm_qos ATM_QoS; -ACE_END_VERSIONED_NAMESPACE_DECL -#else -ACE_BEGIN_VERSIONED_NAMESPACE_DECL -typedef int ATM_QoS; -ACE_END_VERSIONED_NAMESPACE_DECL -#endif /* ACE_HAS_FORE_ATM_WS2 || ACE_HAS_FORE_ATM_XTI || ACE_HAS_LINUX_ATM */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_ATM_QoS - * - * @brief Define the QoS parameters for ATM - * - * This class wraps up QoS parameters for both ATM/XTI and - * ATM/WinSock2 to make the mechanism for the ATM protocol - * transparent. - */ -class ACE_Export ACE_ATM_QoS -{ -public: - // Constants used for ATM options - static const long LINE_RATE; - static const int OPT_FLAGS_CPID; - static const int OPT_FLAGS_PMP; - static const int DEFAULT_SELECTOR; - static const int DEFAULT_PKT_SIZE; - - // = Initializattion and termination methods. - /// Default constructor. - ACE_ATM_QoS(int = DEFAULT_PKT_SIZE); - - /// Constructor with a CBR rate. - ACE_ATM_QoS(int, - int = DEFAULT_PKT_SIZE); - - ~ACE_ATM_QoS (); - - /// Set the rate. - void set_rate (ACE_HANDLE, - int, - int); - - /// Set CBR rate in cells per second. - void set_cbr_rate (int, - int = DEFAULT_PKT_SIZE); - - /// Get ATM_QoS struct. - ATM_QoS get_qos (void); - - /// Dump the state of an object. - void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - -protected: - /// Construct QoS options. - char* construct_options(ACE_HANDLE, - int, - int, - long*); - -private: - ATM_QoS qos_; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/ATM_QoS.inl" -#endif /* __ACE_INLINE__ */ - -#endif /* ACE_HAS_ATM */ -#include /**/ "ace/post.h" -#endif /* ACE_ATM_QoS_H */ diff --git a/modules/worldengine/deps/acelite/ace/ATM_QoS.inl b/modules/worldengine/deps/acelite/ace/ATM_QoS.inl deleted file mode 100644 index 479079e993..0000000000 --- a/modules/worldengine/deps/acelite/ace/ATM_QoS.inl +++ /dev/null @@ -1,26 +0,0 @@ -// -*- C++ -*- -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_INLINE void -ACE_ATM_QoS::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_ATM_QoS::dump"); -#endif /* ACE_HAS_DUMP */ -} - -ACE_INLINE -ACE_ATM_QoS::~ACE_ATM_QoS () -{ - ACE_TRACE ("ACE_ATM_QoS::~ACE_ATM_QoS"); -} - -ACE_INLINE -ATM_QoS -ACE_ATM_QoS::get_qos (void) -{ - ACE_TRACE ("ACE_ATM_QoS::get_qos"); - return qos_; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/ATM_Stream.cpp b/modules/worldengine/deps/acelite/ace/ATM_Stream.cpp deleted file mode 100644 index f87ac4def1..0000000000 --- a/modules/worldengine/deps/acelite/ace/ATM_Stream.cpp +++ /dev/null @@ -1,288 +0,0 @@ -#include "ace/ATM_Stream.h" - -#if defined (ACE_HAS_ATM) - -#include "ace/OS_NS_string.h" - -#if !defined (__ACE_INLINE__) -#include "ace/ATM_Stream.inl" -#endif /* __ACE_INLINE__ */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_ALLOC_HOOK_DEFINE (ACE_ATM_Stream) - -char* -ACE_ATM_Stream::get_peer_name (void) const -{ - ACE_TRACE ("ACE_ATM_Stream::get_peer_name"); -#if defined (ACE_HAS_FORE_ATM_XTI) - // // Use t_getprotaddr for XTI/ATM - // struct t_bind *localaddr - // = (struct t_bind *) ACE_OS::t_alloc (get_handle (), - // T_BIND, - // T_ADDR); - // struct t_bind *peeraddr - // = (struct t_bind *) ACE_OS::t_alloc (get_handle (), - // T_BIND, - // T_ADDR); - // ::t_getprotaddr (get_handle (), - // localaddr, - // peeraddr); - - // char* connected_name = (char*) ACE_OS::malloc (peeraddr->addr.len + 1); - // ACE_OS::strcpy (connected_name, - // peeraddr->addr.buf); - // ACE_OS::t_free ((char *) localaddr, - // T_BIND); - // ACE_OS::t_free ((char *) peeraddr, - // T_BIND); - // return (connected_name); - -#error "This doesn't seem to work. May need to jimmy-rig something with the" -#error "/etc/xti_hosts file - Ugh!" - - ACE_ATM_Addr sa; - struct netbuf name; - name.maxlen = sa.get_size (); - name.buf = (char *) sa.get_addr (); - ACE_OS::t_getname (this->get_handle (), &name, REMOTENAME); - // ACE_OS::ioctl (this->get_handle (), - // TI_GETPEERNAME, - // &name); - return (name.buf); - -#elif defined (ACE_HAS_FORE_ATM_WS2) - // Use getpeername for WinSock2. - struct sockaddr_atm name; - ACE_OS::memset (&name, 0, sizeof (name)); - int nameSize = sizeof (name); - - if (ACE_OS::getpeername (this->get_handle (), - (struct sockaddr *) &name, - &nameSize) != 0) { - return 0; - } - - char buffer[256]; - for (unsigned int index = 0; index < ATM_ADDR_SIZE - 1; index++) { - buffer[ index * 3 ] = '\0'; - ACE_OS::sprintf (buffer, "%s%02x.", buffer, name.satm_number.Addr[ index ]); - } - buffer[ (ATM_ADDR_SIZE - 1) * 3 ] = '\0'; - ACE_OS::sprintf (buffer, "%s%02x.", buffer, 0); - buffer[ ATM_ADDR_SIZE * 3 - 1 ] = '\0'; - for (index = 0; index < ACE_OS::strlen (buffer); ++index) - buffer[index] = ACE_OS::ace_tolower (buffer[index]); - - ifstream atm_hosts ("C:/WINNT/atmhosts"); - assert (atm_hosts.is_open ()); - - // Find the host address in the ATM hosts file and return the - // host name - char line[256]; - char *host_ptr, *host_name = 0; - ACE_NEW_RETURN (host_name, char[256], 0); - while (!atm_hosts.eof ()) { - atm_hosts.getline (line, 256); - // Convert the line to lower case to ease comparison - for (index = 0; index < ACE_OS::strlen (line); ++index) - line[index] = ACE_OS::ace_tolower (line[index]); - if (ACE_OS::strstr (line, buffer) != 0) - { - char *strtok_p; - // Grab the second token which is the host name - ACE_OS::strtok_r (line, " \t", &strtok_p); - host_ptr = ACE_OS::strtok (0, " \t", &strtok_p); - ACE_OS::strcpy (host_name, host_ptr); - break; - } - } - - return host_name; -#elif defined (ACE_HAS_LINUX_ATM) - ATM_Addr name; - int nameSize = sizeof (name.sockaddratmsvc); - - if (ACE_OS::getpeername (this->get_handle (), - (struct sockaddr *) & (name.sockaddratmsvc), - &nameSize) < 0) { - ACE_OS::perror ("ACE_ATM_Stream (get_peer_name) : "); - return 0; - } - - static ACE_TCHAR buffer[MAX_ATM_ADDR_LEN + 1]; - int total_len; - if ((total_len = atm2text (buffer,sizeof buffer, - (struct sockaddr *) & (name.sockaddratmsvc), - A2T_PRETTY|A2T_NAME)) < 0) { - ACELIB_DEBUG ((LM_DEBUG,ACE_TEXT ("ACE_ATM_Stream (get_peer_name) :%d"),errno)); - return 0; - } - - return (char*) buffer; -#else - return 0; -#endif /* ACE_HAS_FORE_ATM_XTI || ACE_HAS_FORE_ATM_WS2 || ACE_HAS_LINUX_ATM */ -} - -ACE_HANDLE -ACE_ATM_Stream::get_handle (void) const -{ - ACE_TRACE ("ACE_ATM_Stream::get_handle"); -#if defined (ACE_HAS_FORE_ATM_XTI) || defined (ACE_HAS_FORE_ATM_WS2) || defined (ACE_HAS_LINUX_ATM) - return stream_.get_handle (); -#else - return 0; -#endif /* ACE_HAS_FORE_ATM_XTI || ACE_HAS_FORE_ATM_WS2 || ACE_HAS_LINUX_ATM */ -} - -int -ACE_ATM_Stream::get_vpi_vci (ACE_UINT16 &vpi, - ACE_UINT16 &vci) const -{ - ACE_TRACE ("ACE_ATM_Stream::get_vpi_vci"); -#if defined (ACE_HAS_FORE_ATM_XTI) - struct t_atm_conn_prop conn_prop; - char* connect_opts = (char *) &conn_prop; - int opt_size = sizeof (t_atm_conn_prop); - struct t_info info; - struct t_optmgmt opt_req, opt_ret; - - if (ACE_OS::t_getinfo (stream_.get_handle (), - &info) < 0) - { - ACE_OS::t_error ("t_getinfo"); - return -1; - } - - char *buf_req = (char *) ACE_OS::malloc (info.options); - if (buf_req == 0) - { - ACE_OS::fprintf (stderr, - "Unable to allocate %ld bytes for options\n", - info.options); - return -1; - } - - char *buf_ret = (char *) ACE_OS::malloc (info.options); - if (buf_ret == 0) - { - ACE_OS::fprintf (stderr, - "Unable to allocate %ld bytes for options\n", - info.options); - return -1; - } - - ACE_OS::memset (&opt_req, 0, sizeof (opt_req)); - ACE_OS::memset (&opt_ret, 0, sizeof (opt_ret)); - - struct t_opthdr *popt = (struct t_opthdr *) buf_req; - struct t_opthdr *popt_ret = (struct t_opthdr *) buf_ret; - - popt->len= sizeof (struct t_opthdr) + opt_size; - - // We are only concerned with SVCs so no other check or values are needed - // here. - popt->level = T_ATM_SIGNALING; - popt->name = T_ATM_CONN_PROP; - popt->status = 0; - - opt_req.opt.len = popt->len; - opt_req.opt.buf = (char *) popt; - opt_req.flags = T_CURRENT; - - popt = T_OPT_NEXTHDR (buf_req, - info.options, - popt); - opt_ret.opt.maxlen = info.options; - opt_ret.opt.buf = (char *) popt_ret; - - if (ACE_OS::t_optmgmt (stream_.get_handle (), - &opt_req, - &opt_ret) < 0) { - ACE_OS::t_error ("t_optmgmt"); - return -1; - } - - ACE_OS::memcpy (connect_opts, - (char *) popt_ret + sizeof (struct t_opthdr), - opt_size); - - ACE_OS::free (buf_ret); - ACE_OS::free (buf_req); - - vpi = conn_prop.vpi; - vci = conn_prop.vci; - return 0; -#elif defined (ACE_HAS_FORE_ATM_WS2) - ATM_CONNECTION_ID connID; - DWORD bytes = 0; - - if (::WSAIoctl ((int) this -> get_handle (), - SIO_GET_ATM_CONNECTION_ID, - 0, - 0, - (LPVOID) &connID, - sizeof (ATM_CONNECTION_ID), - &bytes, - 0, - 0) - == SOCKET_ERROR) { - ACE_OS::printf ("Error: WSAIoctl %d\n", WSAGetLastError ()); - } - - vpi = (ACE_UINT16) connID.VPI; - vci = (ACE_UINT16) connID.VCI; - - return 0; -#elif defined (ACE_HAS_LINUX_ATM) -#if defined (SO_ATMPVC) /* atm version>=0.62 */ - struct sockaddr_atmpvc mypvcaddr; - int addrpvclen = sizeof (mypvcaddr); - if (ACE_OS::getsockopt (stream_.get_handle (), - SOL_ATM, - SO_ATMPVC, - reinterpret_cast (&mypvcaddr), - &addrpvclen) < 0) { - ACELIB_DEBUG (LM_DEBUG, - ACE_TEXT ("ACE_ATM_Stream::get_vpi_vci: getsockopt %d\n"), - errno); - return -1; - } - vpi = (ACE_UINT16) mypvcaddr.sap_addr.vpi; - vci = (ACE_UINT16) mypvcaddr.sap_addr.vci; - - return 0; -#elif defined (SO_VCID) /* patch for atm version 0.59 */ - struct atm_vcid mypvcid; - int pvcidlen = sizeof (mypvcid); - if (ACE_OS::getsockopt (stream_.get_handle (), - SOL_ATM,SO_VCID, - reinterpret_cast (&mypvcid), - &pvcidlen) < 0) { - ACELIB_DEBUG (LM_DEBUG, - ACE_TEXT ("ACE_ATM_Stream::get_vpi_vci: getsockopt %d\n"), - errno); - return -1; - } - vpi = (ACE_UINT16) mypvcid.vpi; - vci = (ACE_UINT16) mypvcid.vci; - - return 0; -#else - ACELIB_DEBUG (LM_DEBUG, - ACE_TEXT ("ACE_ATM_Stream::get_vpi_vci: Not implemented in this ATM version. Update to >= 0.62\n Or patch 0.59")); - ACE_UNUSED_ARG (vci); - ACE_UNUSED_ARG (vpi); - - return -1; -#endif /* SO_ATMPVC || SO_VCID */ -#else - return -1; -#endif /* ACE_HAS_FORE_ATM_XTI || ACE_HAS_FORE_ATM_WS2 || ACE_HAS_LINUX_ATM */ -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_HAS_ATM */ diff --git a/modules/worldengine/deps/acelite/ace/ATM_Stream.h b/modules/worldengine/deps/acelite/ace/ATM_Stream.h deleted file mode 100644 index 10bd3e7002..0000000000 --- a/modules/worldengine/deps/acelite/ace/ATM_Stream.h +++ /dev/null @@ -1,105 +0,0 @@ -/* -*- C++ -*- */ - -//============================================================================= -/** - * @file ATM_Stream.h - * - * @author Joe Hoffert - */ -//============================================================================= - - -#ifndef ACE_ATM_STREAM_H -#define ACE_ATM_STREAM_H -#include /**/ "ace/pre.h" - -#include /**/ "ace/config-all.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#if defined (ACE_HAS_ATM) - -#include "ace/ATM_Addr.h" -#include "ace/ATM_Params.h" - -#if defined (ACE_WIN32) -#include "ace/SOCK_Stream.h" -ACE_BEGIN_VERSIONED_NAMESPACE_DECL -typedef ACE_SOCK_Stream ATM_Stream; -ACE_END_VERSIONED_NAMESPACE_DECL -#else -#include "ace/TLI_Stream.h" -ACE_BEGIN_VERSIONED_NAMESPACE_DECL -typedef ACE_TLI_Stream ATM_Stream; -ACE_END_VERSIONED_NAMESPACE_DECL -#endif - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_ATM_Stream - * - * @brief Defines the member functions for ACE_ATM_Stream abstraction. - */ -class ACE_Export ACE_ATM_Stream -{ -public: - // = Initialization and termination methods. - /// Default constructor. - ACE_ATM_Stream (void); - - // = ATM-specific open and shutdown operations. - /// open the stream. - int open (ACE_ATM_Params params = ACE_ATM_Params()); - - /// Close down and release resources. - int close (void); - - /// Get the underlying handle. - ACE_HANDLE get_handle (void) const; - - /// Get the underlying stream. - ATM_Stream& get_stream (void); - - /// Get the name of the connected host. - char* get_peer_name (void) const; - - /// Get the VPI and VCI of the stream. - int get_vpi_vci (ACE_UINT16 &vpi, - ACE_UINT16 &vci) const; - - /// Recv an n byte buffer from the connected transport mechanism. - ssize_t recv (void *buf, - size_t n, - int *flags = 0) const; - - /// Send exactly n bytes to the connected transport mechanism. - ssize_t send_n (const void *buf, - size_t n, - int flags) const; - - // = Meta-type info - typedef ACE_ATM_Addr PEER_ADDR; - - /// Dump the state of an object. - void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - -private: - /// Typedef'd to the appropriate stream mechanism above. - ATM_Stream stream_; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/ATM_Stream.inl" -#endif /* __ACE_INLINE__ */ - -#endif /* ACE_HAS_ATM */ -#include /**/ "ace/post.h" -#endif /* ACE_ATM_STREAM_H */ diff --git a/modules/worldengine/deps/acelite/ace/ATM_Stream.inl b/modules/worldengine/deps/acelite/ace/ATM_Stream.inl deleted file mode 100644 index eda7ca9bc8..0000000000 --- a/modules/worldengine/deps/acelite/ace/ATM_Stream.inl +++ /dev/null @@ -1,130 +0,0 @@ -// -*- C++ -*- -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_INLINE void -ACE_ATM_Stream::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_ATM_Stream::dump"); -#endif /* ACE_HAS_DUMP */ -} - -ACE_INLINE -ACE_ATM_Stream::ACE_ATM_Stream (void) -{ - ACE_TRACE ("ACE_ATM_Stream::ACE_ATM_Stream"); -} - -ACE_INLINE -int -ACE_ATM_Stream::open (ACE_ATM_Params params) -{ - ACE_TRACE ("ACE_ATM_Stream::open"); -#if defined (ACE_HAS_FORE_ATM_XTI) - ACE_HANDLE handle = stream_.open (params.get_device(), - params.get_oflag(), - params.get_info()); - return (handle == ACE_INVALID_HANDLE ? -1 : 0); -#elif defined (ACE_HAS_FORE_ATM_WS2) - params.set_flags( ACE_FLAG_MULTIPOINT_C_ROOT | ACE_FLAG_MULTIPOINT_D_ROOT ); - - int retval = stream_.open (params.get_type(), - params.get_protocol_family(), - params.get_protocol(), - params.get_protocol_info(), - params.get_sock_group(), - params.get_flags(), - params.get_reuse_addr()); - if (retval == -1) - return -1; - - struct sockaddr_atm sock_addr; - - ACE_OS::memset(&sock_addr, 0, sizeof(struct sockaddr_atm)); - sock_addr.satm_family = AF_ATM; - sock_addr.satm_number.AddressType=ADDR_ANY; - sock_addr.satm_number.NumofDigits = ATM_ADDR_SIZE; - sock_addr.satm_blli.Layer2Protocol = SAP_FIELD_ABSENT; - sock_addr.satm_blli.Layer3Protocol = SAP_FIELD_ABSENT; - sock_addr.satm_bhli.HighLayerInfoType = SAP_FIELD_ABSENT; - if (ACE_OS::bind(get_handle(), - (struct sockaddr FAR *)&sock_addr, - sizeof(struct sockaddr_atm)) < 0) - { - ACE_OS::printf("Error binding local address: %d",WSAGetLastError()); - return -1; - } - - return 0; -#else - ACE_UNUSED_ARG(params); - return 0; -#endif /* ACE_HAS_FORE_ATM_XTI */ -} - -ACE_INLINE -int -ACE_ATM_Stream::close (void) -{ - ACE_TRACE ("ACE_ATM_Stream::close"); -#if defined (ACE_HAS_FORE_ATM_XTI) || defined (ACE_HAS_FORE_ATM_WS2) - return stream_.close (); -#else - return 0; -#endif /* ACE_HAS_FORE_ATM_XTI || ACE_HAS_FORE_ATM_WS2 */ -} - -ACE_INLINE -ATM_Stream& -ACE_ATM_Stream::get_stream (void) -{ - ACE_TRACE ("ACE_ATM_Stream::get_stream"); - return stream_; -} - -ACE_INLINE -ssize_t -ACE_ATM_Stream::recv (void *buf, - size_t n, - int *flags) const -{ - ACE_TRACE ("ACE_ATM_Stream::recv"); -#if defined (ACE_HAS_FORE_ATM_XTI) - return stream_.recv (buf, - n, - flags); -#elif defined (ACE_HAS_FORE_ATM_WS2) - return stream_.recv (buf, - n); -#else - ACE_UNUSED_ARG(buf); - ACE_UNUSED_ARG(n); - ACE_UNUSED_ARG(flags); - return 0; -#endif /* ACE_HAS_FORE_ATM_XTI */ -} - -ACE_INLINE -ssize_t -ACE_ATM_Stream::send_n (const void *buf, - size_t n, - int flags) const -{ - ACE_TRACE ("ACE_ATM_Stream::send_n"); -#if defined (ACE_HAS_FORE_ATM_XTI) - return stream_.send_n (buf, - n, - flags); -#elif defined (ACE_HAS_FORE_ATM_WS2) - return stream_.send_n (buf, - n, - flags); -#else - ACE_UNUSED_ARG(buf); - ACE_UNUSED_ARG(n); - ACE_UNUSED_ARG(flags); - return 0; -#endif /* ACE_HAS_FORE_ATM_XTI */ -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Abstract_Timer_Queue.cpp b/modules/worldengine/deps/acelite/ace/Abstract_Timer_Queue.cpp deleted file mode 100644 index 3207733b24..0000000000 --- a/modules/worldengine/deps/acelite/ace/Abstract_Timer_Queue.cpp +++ /dev/null @@ -1,26 +0,0 @@ -//$Id: Abstract_Timer_Queue.cpp 95334 2011-12-15 12:52:50Z msmit $ - -#ifndef ACE_ABSTRACT_TIMER_QUEUE_CPP -#define ACE_ABSTRACT_TIMER_QUEUE_CPP -#include "ace/config-all.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Abstract_Timer_Queue.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -// Even though the destructor is pure virtual you must provide an -// implementation. Most people know this, but sometimes we all -// forget, and we might be tempted to remove this code. -template -ACE_Abstract_Timer_Queue:: -~ACE_Abstract_Timer_Queue () -{ -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_ABSTRACT_TIMER_QUEUE_CPP */ diff --git a/modules/worldengine/deps/acelite/ace/Abstract_Timer_Queue.h b/modules/worldengine/deps/acelite/ace/Abstract_Timer_Queue.h deleted file mode 100644 index ddb8abf7f1..0000000000 --- a/modules/worldengine/deps/acelite/ace/Abstract_Timer_Queue.h +++ /dev/null @@ -1,230 +0,0 @@ -//$Id: Abstract_Timer_Queue.h 95368 2011-12-19 13:38:49Z mcorino $ - -#ifndef ACE_ABSTRACT_TIMER_QUEUE_H -#define ACE_ABSTRACT_TIMER_QUEUE_H - -#include /**/ "ace/pre.h" -/** - * @file Abstract_Timer_Queue.h - * - * @author Carlos O'Ryan - * - * Based on classes and files developed by Doug Schmidt, Darrell - * Brunsch, Irfan Pyarali and a cast of thousands. - */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -// Forward declares -class ACE_Time_Value; -class ACE_Command_Base; -template class ACE_Timer_Queue_Iterator_T; -template class ACE_Timer_Node_T; - -/** - * @class ACE_Abstract_Timer_Queue - * - * @brief Base class for all timer queues of a single type. - * - * This is a base class for all the timer queues, regardless of - * locking strategy, upcall mechanism, internal implementation, etc. - * The class was motivated by bug 3706: - * http://bugzilla.dre.vanderbilt.edu/show_bug.cgi?id=3706 - * In short, the Reactor (and potentially other classes) want to refer - * to timer queues regardless of the implementation internals. - */ -template -class ACE_Abstract_Timer_Queue -{ -public: - /// Destructor - virtual ~ACE_Abstract_Timer_Queue (void) = 0; - - /// True if queue is empty, else false. - virtual bool is_empty (void) const = 0; - - /// Returns the time of the earlier node in the Timer_Queue. Must - /// be called on a non-empty queue. - virtual const ACE_Time_Value &earliest_time (void) const = 0; - - /** - * Schedule @a type that will expire at @a future_time, which is - * specified in absolute time. If it expires then @a act is passed - * in as the value to the . If @a interval is != to - * ACE_Time_Value::zero then it is used to reschedule the @a type - * automatically, using relative time to the current . - * This method returns a that uniquely identifies the the - * @a type entry in an internal list. This can be used to - * cancel the timer before it expires. The cancellation ensures - * that are unique up to values of greater than 2 - * billion timers. As long as timers don't stay around longer than - * this there should be no problems with accidentally deleting the - * wrong timer. Returns -1 on failure (which is guaranteed never to - * be a valid ). - */ - virtual long schedule (const TYPE &type, - const void *act, - const ACE_Time_Value &future_time, - const ACE_Time_Value &interval = ACE_Time_Value::zero) = 0; - - /** - * Run the for all timers whose values are <= @a current_time. - * This does not account for . Returns the number of - * timers canceled. - */ - virtual int expire (const ACE_Time_Value ¤t_time) = 0; - - /** - * Run the for all timers whose values are <= - * . Also accounts for . - * - * Depending on the resolution of the underlying OS the system calls - * like select()/poll() might return at time different than that is - * specified in the timeout. Suppose the OS guarantees a resolution of t ms. - * The timeline will look like - * - * A B - * | | - * V V - * |-------------|-------------|-------------|-------------| - * t t t t t - * - * - * If you specify a timeout value of A, then the timeout will not occur - * at A but at the next interval of the timer, which is later than - * that is expected. Similarly, if your timeout value is equal to B, - * then the timeout will occur at interval after B. Now depending upon the - * resolution of your timeouts and the accuracy of the timeouts - * needed for your application, you should set the value of - * . In the above case, if you want the timeout A to fire - * no later than A, then you should specify your to be - * A % t. - * - * The timeout value should be specified via the macro ACE_TIMER_SKEW - * in your config.h file. The default value is zero. - * - * Things get interesting if the t before the timeout value B is zero - * i.e your timeout is less than the interval. In that case, you are - * almost sure of not getting the desired timeout behaviour. Maybe you - * should look for a better OS :-) - * - * Returns the number of timers canceled. - */ - virtual int expire (void) = 0; - - /** - * A couple of classes using Timer_Queues need to dispatch a single - * event at a time. But before they dispatch the event they need to - * release a lock, signal other threads, etc. - * - * This member function should be used in that case. The additional - * operations to be called just before dispatching the event, and - * only if an event will be dispatched, are encapsulated in the - * ACE_Command_Base object. - */ - virtual int expire_single(ACE_Command_Base & pre_dispatch_command) = 0; - - /** - * Resets the interval of the timer represented by @a timer_id to - * @a interval, which is specified in relative time to the current - * . If @a interval is equal to - * ACE_Time_Value::zero, the timer will become a non-rescheduling - * timer. Returns 0 if successful, -1 if not. - */ - virtual int reset_interval (long timer_id, - const ACE_Time_Value &interval) = 0; - - /** - * Cancel all timer associated with @a type. If - * @a dont_call_handle_close is 0 then the will be invoked, - * which typically invokes the hook. Returns number - * of timers cancelled. - */ - virtual int cancel (const TYPE &type, - int dont_call_handle_close = 1) = 0; - - /** - * Cancel the single timer that matches the @a timer_id value (which - * was returned from the method). If act is non-NULL - * then it will be set to point to the ``magic cookie'' argument - * passed in when the timer was registered. This makes it possible - * to free up the memory and avoid memory leaks. If - * @a dont_call_handle_close is 0 then the will be invoked, - * which typically calls the hook. Returns 1 if - * cancellation succeeded and 0 if the @a timer_id wasn't found. - */ - virtual int cancel (long timer_id, - const void **act = 0, - int dont_call_handle_close = 1) = 0; - - /** - * Close timer queue. Cancels all timers. - */ - virtual int close (void) = 0; - - /** - * Returns the current time of day. This method allows different - * implementations of the timer queue to use special high resolution - * timers. - */ - virtual ACE_Time_Value gettimeofday (void) = 0; - - /** - * Allows applications to control how the timer queue gets the time - * of day. - * @deprecated Use TIME_POLICY support instead. See Timer_Queue_T.h - */ - virtual void gettimeofday (ACE_Time_Value (*gettimeofday)(void)) = 0; - - /// Determine the next event to timeout. Returns @a max if there are - /// no pending timers or if all pending timers are longer than max. - /// This method acquires a lock internally since it modifies internal state. - virtual ACE_Time_Value *calculate_timeout (ACE_Time_Value *max) = 0; - - /** - * Determine the next event to timeout. Returns @a max if there are - * no pending timers or if all pending timers are longer than max. - * should be a pointer to storage for the timeout value, - * and this value is also returned. This method does not acquire a - * lock internally since it doesn't modify internal state. If you - * need to call this method when the queue is being modified - * concurrently, however, you should make sure to acquire the - * externally before making the call. - */ - virtual ACE_Time_Value *calculate_timeout (ACE_Time_Value *max, - ACE_Time_Value *the_timeout) = 0; - - /** - * Return the current time, using the right time policy and any - * timer skew defined in derived classes. - */ - virtual ACE_Time_Value current_time() = 0; - - /// Type of Iterator. - typedef ACE_Timer_Queue_Iterator_T ITERATOR; - - /// Returns a pointer to this ACE_Timer_Queue's iterator. - virtual ITERATOR & iter (void) = 0; - - /// Removes the earliest node from the queue and returns it - virtual ACE_Timer_Node_T *remove_first (void) = 0; - - /// Reads the earliest node from the queue and returns it. - virtual ACE_Timer_Node_T *get_first (void) = 0; - - /// Dump the state of a object. - virtual void dump (void) const = 0; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "ace/Abstract_Timer_Queue.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Abstract_Timer_Queue.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ - -#include /**/ "ace/post.h" -#endif /* ACE_ABSTRACT_TIMER_QUEUE_H */ diff --git a/modules/worldengine/deps/acelite/ace/Acceptor.cpp b/modules/worldengine/deps/acelite/ace/Acceptor.cpp deleted file mode 100644 index a2df5e8360..0000000000 --- a/modules/worldengine/deps/acelite/ace/Acceptor.cpp +++ /dev/null @@ -1,1254 +0,0 @@ -#ifndef ACE_ACCEPTOR_CPP -#define ACE_ACCEPTOR_CPP - -#include "ace/ACE.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Acceptor.h" -#include "ace/Svc_Handler.h" -#include "ace/WFMO_Reactor.h" -#include "ace/OS_NS_stdio.h" -#include "ace/OS_NS_string.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_ALLOC_HOOK_DEFINE(ACE_Acceptor) - -template void -ACE_Acceptor::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_Acceptor::dump"); - - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - this->peer_acceptor_.dump (); - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} - -template -ACE_Acceptor::operator PEER_ACCEPTOR & () const -{ - ACE_TRACE ("ACE_Acceptor::operator PEER_ACCEPTOR &"); - return (PEER_ACCEPTOR &) this->peer_acceptor_; -} - -template PEER_ACCEPTOR & -ACE_Acceptor::acceptor (void) const -{ - ACE_TRACE ("ACE_Acceptor::acceptor"); - return const_cast (this->peer_acceptor_); -} - -// Returns ACE_HANDLE of the underlying Acceptor_Strategy. - -template ACE_HANDLE -ACE_Acceptor::get_handle (void) const -{ - ACE_TRACE ("ACE_Acceptor::get_handle"); - return this->peer_acceptor_.get_handle (); -} - -// Initialize the appropriate strategies for creation, passive -// connection acceptance, and concurrency, and then register -// with the Reactor and listen for connection requests at the -// designated . - -template int -ACE_Acceptor::open - (const typename PEER_ACCEPTOR::PEER_ADDR &local_addr, - ACE_Reactor *reactor, - int flags, - int use_select, - int reuse_addr) -{ - ACE_TRACE ("ACE_Acceptor::open"); - this->flags_ = flags; - this->use_select_ = use_select; - this->reuse_addr_ = reuse_addr; - this->peer_acceptor_addr_ = local_addr; - - // Must supply a valid Reactor to Acceptor::open()... - - if (reactor == 0) - { - errno = EINVAL; - return -1; - } - - // Open the underlying PEER_ACCEPTOR. - if (this->peer_acceptor_.open (local_addr, reuse_addr) == -1) - return -1; - - // Set the peer acceptor's handle into non-blocking mode. This is a - // safe-guard against the race condition that can otherwise occur - // between the time when indicates that a passive-mode - // socket handle is "ready" and when we call . During this - // interval, the client can shutdown the connection, in which case, - // the call can hang! - if (this->accept_strategy_->acceptor ().enable (ACE_NONBLOCK) != 0) - return -1; - - // Initialize the concurrency strategy. - - if (con_s == 0) - { - ACE_NEW_RETURN (con_s, - CONCURRENCY_STRATEGY, - -1); - this->delete_concurrency_strategy_ = true; - } - this->concurrency_strategy_ = con_s; - - // Initialize the scheduling strategy. - - if (sch_s == 0) - { - ACE_NEW_RETURN (sch_s, - SCHEDULING_STRATEGY, - -1); - this->delete_scheduling_strategy_ = true; - } - this->scheduling_strategy_ = sch_s; - - this->use_select_ = use_select; - - return this->reactor ()->register_handler - (this, - ACE_Event_Handler::ACCEPT_MASK); -} - -// Simple constructor. - -template -ACE_Strategy_Acceptor::ACE_Strategy_Acceptor - (const ACE_TCHAR service_name[], - const ACE_TCHAR service_description[], - int use_select, - int reuse_addr) - : creation_strategy_ (0), - delete_creation_strategy_ (false), - accept_strategy_ (0), - delete_accept_strategy_ (false), - concurrency_strategy_ (0), - delete_concurrency_strategy_ (false), - scheduling_strategy_ (0), - delete_scheduling_strategy_ (false), - service_name_ (0), - service_description_ (0) -{ - ACE_TRACE ("ACE_Strategy_Acceptor::ACE_Strategy_Acceptor"); - - if (service_name != 0) - ACE_ALLOCATOR (this->service_name_, - ACE_OS::strdup (service_name)); - if (service_description != 0) - ACE_ALLOCATOR (this->service_description_, - ACE_OS::strdup (service_description)); - this->use_select_ = use_select; - this->reuse_addr_ = reuse_addr; -} - -template -ACE_Strategy_Acceptor::ACE_Strategy_Acceptor - (const typename PEER_ACCEPTOR::PEER_ADDR &addr, - ACE_Reactor *reactor, - ACE_Creation_Strategy *cre_s, - ACE_Accept_Strategy *acc_s, - ACE_Concurrency_Strategy *con_s, - ACE_Scheduling_Strategy *sch_s, - const ACE_TCHAR service_name[], - const ACE_TCHAR service_description[], - int use_select, - int reuse_addr) - : creation_strategy_ (0), - delete_creation_strategy_ (false), - accept_strategy_ (0), - delete_accept_strategy_ (false), - concurrency_strategy_ (0), - delete_concurrency_strategy_ (false), - scheduling_strategy_ (0), - delete_scheduling_strategy_ (false), - service_name_ (0), - service_description_ (0) -{ - ACE_TRACE ("ACE_Strategy_Acceptor::ACE_Strategy_Acceptor"); - - if (this->open (addr, - reactor, - cre_s, - acc_s, - con_s, - sch_s, - service_name, - service_description, - use_select, - reuse_addr) == -1) - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("%p\n"), - ACE_TEXT ("ACE_Strategy_Acceptor::ACE_Strategy_Acceptor"))); -} - -// Perform termination activities when is removed from the -// . - -template int -ACE_Strategy_Acceptor::handle_close (ACE_HANDLE, - ACE_Reactor_Mask) -{ - ACE_TRACE ("ACE_Strategy_Acceptor::handle_close"); - // Guard against multiple closes. - if (this->reactor () != 0) - { - ACE_HANDLE handle = this->get_handle (); - - if (this->delete_creation_strategy_) - delete this->creation_strategy_; - this->delete_creation_strategy_ = false; - this->creation_strategy_ = 0; - - if (this->delete_accept_strategy_) - delete this->accept_strategy_; - this->delete_accept_strategy_ = false; - this->accept_strategy_ = 0; - - if (this->delete_concurrency_strategy_) - delete this->concurrency_strategy_; - this->delete_concurrency_strategy_ = false; - this->concurrency_strategy_ = 0; - - if (this->delete_scheduling_strategy_) - delete this->scheduling_strategy_; - this->delete_scheduling_strategy_ = false; - this->scheduling_strategy_ = 0; - - // We must use the obtained *before* we deleted the - // accept_strategy_... - - this->reactor ()->remove_handler - (handle, - ACE_Event_Handler::ACCEPT_MASK | ACE_Event_Handler::DONT_CALL); - - // Set the Reactor to 0 so that we don't try to close down - // again. - this->reactor (0); - } - return 0; -} - -// Bridge method for creating a . The strategy for -// creating a are configured into the Acceptor via it's -// . The default is to create a new -// . However, subclasses can override this strategy to -// perform creation in any way that they like (such as -// creating subclass instances of , using a singleton, -// dynamically linking the handler, etc.). - -template int -ACE_Strategy_Acceptor::make_svc_handler (SVC_HANDLER *&sh) -{ - ACE_TRACE ("ACE_Strategy_Acceptor::make_svc_handler"); - return this->creation_strategy_->make_svc_handler (sh); -} - -// Bridge method for accepting the new connection into the -// . The default behavior delegates to the -// in the Acceptor_Strategy. - -template int -ACE_Strategy_Acceptor::accept_svc_handler - (SVC_HANDLER *svc_handler) -{ - ACE_TRACE ("ACE_Strategy_Acceptor::accept_svc_handler"); - return this->accept_strategy_->accept_svc_handler (svc_handler); -} - -// Bridge method for activating a with the appropriate -// concurrency strategy. The default behavior of this method is to -// activate the SVC_HANDLER by calling its open() method (which allows -// the SVC_HANDLER to define its own concurrency strategy). However, -// subclasses can override this strategy to do more sophisticated -// concurrency activations (such as creating the SVC_HANDLER as an -// "active object" via multi-threading or multi-processing). - -template int -ACE_Strategy_Acceptor::activate_svc_handler - (SVC_HANDLER *svc_handler) -{ - ACE_TRACE ("ACE_Strategy_Acceptor::activate_svc_handler"); - return this->concurrency_strategy_->activate_svc_handler - (svc_handler, - (void *) this); -} - -template -ACE_Strategy_Acceptor::~ACE_Strategy_Acceptor (void) -{ - ACE_TRACE ("ACE_Strategy_Acceptor::~ACE_Strategy_Acceptor"); - ACE_OS::free ((void *) this->service_name_); - ACE_OS::free ((void *) this->service_description_); - this->handle_close (); -} - -// Signal the server to shutdown gracefully. - -template int -ACE_Strategy_Acceptor::handle_signal (int, siginfo_t *, ucontext_t *) -{ - ACE_Reactor::instance()->end_reactor_event_loop (); - return 0; -} - -template int -ACE_Strategy_Acceptor::info (ACE_TCHAR **strp, - size_t length) const -{ - ACE_TRACE ("ACE_Strategy_Acceptor::info"); - - ACE_TCHAR buf[BUFSIZ]; - ACE_TCHAR service_addr_str[BUFSIZ]; - typename PEER_ACCEPTOR::PEER_ADDR addr; - - if (this->acceptor ().get_local_addr (addr) == -1) - return -1; - else if (addr.addr_to_string (service_addr_str, - sizeof service_addr_str) == -1) - return -1; - - // @@ Should add the protocol in... - ACE_OS::sprintf (buf, - ACE_TEXT ("%s\t %s #%s\n"), - this->service_name_ == 0 - ? ACE_TEXT ("") - : this->service_name_, - service_addr_str, - this->service_description_ == 0 - ? ACE_TEXT ("") - : this->service_description_); - - if (*strp == 0 && (*strp = ACE_OS::strdup (buf)) == 0) - return -1; - else - ACE_OS::strsncpy (*strp, buf, length); - return static_cast (ACE_OS::strlen (buf)); -} - -template int -ACE_Strategy_Acceptor::fini (void) -{ - ACE_TRACE ("ACE_Strategy_Acceptor::fini"); - return this->ACE_Strategy_Acceptor::handle_close (); -} - -ACE_ALLOC_HOOK_DEFINE(ACE_Oneshot_Acceptor) - -template void -ACE_Oneshot_Acceptor::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_Oneshot_Acceptor::dump"); - - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("\nsvc_handler_ = %x"), this->svc_handler_)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("\nrestart_ = %d"), this->restart_)); - this->peer_acceptor_.dump (); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("delete_concurrency_strategy_ = %d"), - delete_concurrency_strategy_)); - this->concurrency_strategy_->dump (); - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} - -template int -ACE_Oneshot_Acceptor::open - (const typename PEER_ACCEPTOR::PEER_ADDR &local_addr, - ACE_Reactor *reactor, - ACE_Concurrency_Strategy *con_s) -{ - ACE_TRACE ("ACE_Oneshot_Acceptor::open"); - this->reactor (reactor); - - // Initialize the concurrency strategy. - - if (con_s == 0) - { - ACE_NEW_RETURN (con_s, - ACE_Concurrency_Strategy, - -1); - this->delete_concurrency_strategy_ = true; - } - this->concurrency_strategy_ = con_s; - - // Reuse the addr, even if it is already in use...! - return this->peer_acceptor_.open (local_addr, 1); -} - -template -ACE_Oneshot_Acceptor::ACE_Oneshot_Acceptor (void) - : svc_handler_ (0), - restart_ (false), - concurrency_strategy_ (0), - delete_concurrency_strategy_ (false) -{ - ACE_TRACE ("ACE_Oneshot_Acceptor::ACE_Oneshot_Acceptor"); - this->reactor (0); -} - -template -ACE_Oneshot_Acceptor::ACE_Oneshot_Acceptor - (const typename PEER_ACCEPTOR::PEER_ADDR &local_addr, - ACE_Reactor *reactor, - ACE_Concurrency_Strategy *cs) - : svc_handler_ (0), - restart_ (false), - concurrency_strategy_ (0), - delete_concurrency_strategy_ (false) -{ - ACE_TRACE ("ACE_Oneshot_Acceptor::ACE_Oneshot_Acceptor"); - if (this->open (local_addr, reactor, cs) == -1) - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("%p\n"), - ACE_TEXT ("ACE_Oneshot_Acceptor::ACE_Oneshot_Acceptor"))); -} - -template -ACE_Oneshot_Acceptor::~ACE_Oneshot_Acceptor (void) -{ - ACE_TRACE ("ACE_Oneshot_Acceptor::~ACE_Oneshot_Acceptor"); - this->handle_close (); -} - -template int -ACE_Oneshot_Acceptor::close (void) -{ - ACE_TRACE ("ACE_Oneshot_Acceptor::close"); - return this->handle_close (); -} - -template int -ACE_Oneshot_Acceptor::handle_close (ACE_HANDLE, - ACE_Reactor_Mask) -{ - ACE_TRACE ("ACE_Oneshot_Acceptor::handle_close"); - - // Guard against multiple closes. - if (this->delete_concurrency_strategy_) - { - delete this->concurrency_strategy_; - this->delete_concurrency_strategy_ = false; - this->concurrency_strategy_ = 0; - } - // Note that if we aren't actually registered with the - // ACE_Reactor then it's ok for this call to fail... - - if (this->reactor ()) - this->reactor ()->remove_handler - (this, - ACE_Event_Handler::ACCEPT_MASK | ACE_Event_Handler::DONT_CALL); - - if (this->peer_acceptor_.close () == -1) - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("close\n"))); - return 0; -} - -template int -ACE_Oneshot_Acceptor::handle_timeout - (const ACE_Time_Value &tv, - const void *arg) -{ - ACE_TRACE ("ACE_Oneshot_Acceptor::handle_timeout"); - errno = ETIME; - - if (this->svc_handler_->handle_timeout (tv, arg) == -1) - this->svc_handler_->handle_close (this->svc_handler_->get_handle (), - ACE_Event_Handler::TIMER_MASK); - - // Since we aren't necessarily registered with the Reactor, don't - // bother to check the return value here... - if (this->reactor ()) - this->reactor ()->remove_handler (this, - ACE_Event_Handler::ACCEPT_MASK); - return 0; -} - -template int -ACE_Oneshot_Acceptor::cancel (void) -{ - ACE_TRACE ("ACE_Oneshot_Acceptor::cancel"); - return this->reactor () && this->reactor ()->cancel_timer (this); -} - -template int -ACE_Oneshot_Acceptor::register_handler - (SVC_HANDLER *svc_handler, - const ACE_Synch_Options &synch_options, - bool restart) -{ - ACE_TRACE ("ACE_Oneshot_Acceptor::register_handler"); - // Can't do this if we don't have a Reactor. - if (this->reactor () == 0) - { - errno = EINVAL; - return -1; - } - else - { - this->svc_handler_ = svc_handler; - this->restart_ = restart; - ACE_Time_Value *tv = (ACE_Time_Value *) synch_options.time_value (); - - if (tv != 0 - && this->reactor ()->schedule_timer (this, - synch_options.arg (), - *tv) == -1) - return -1; - else - return this->reactor ()->register_handler - (this, - ACE_Event_Handler::ACCEPT_MASK); - } -} - -// Bridge method for activating a with the appropriate -// concurrency strategy. The default behavior of this method is to -// activate the SVC_HANDLER by calling its open() method (which allows -// the SVC_HANDLER to define its own concurrency strategy). However, -// subclasses can override this strategy to do more sophisticated -// concurrency activations (such as creating the SVC_HANDLER as an -// "active object" via multi-threading or multi-processing). - -template int -ACE_Oneshot_Acceptor::activate_svc_handler - (SVC_HANDLER *svc_handler) -{ - ACE_TRACE ("ACE_Oneshot_Acceptor::activate_svc_handler"); - return this->concurrency_strategy_->activate_svc_handler - (svc_handler, - (void *) this); -} - -// Factors out the code shared between the and -// methods. - -template int -ACE_Oneshot_Acceptor::shared_accept - (SVC_HANDLER *svc_handler, - typename PEER_ACCEPTOR::PEER_ADDR *remote_addr, - ACE_Time_Value *timeout, - bool restart, - bool reset_new_handle) -{ - ACE_TRACE ("ACE_Oneshot_Acceptor::shared_accept"); - if (svc_handler == 0) - return -1; - - // Accept connection into the Svc_Handler. - else if (this->peer_acceptor_.accept (svc_handler->peer (), // stream - remote_addr, // remote address - timeout, // timeout - restart, // restart - reset_new_handle // reset new handle - ) == -1) - { - // Check whether we just timed out or whether we failed... - if (!(errno == EWOULDBLOCK || errno == ETIME)) - // Close down handler to avoid memory leaks. - svc_handler->close (CLOSE_DURING_NEW_CONNECTION); - return -1; - } - // Activate the using the designated concurrency - // strategy (note that this method becomes responsible for handling - // errors and freeing up the memory if things go awry...) - else - return this->activate_svc_handler (svc_handler); -} - -// Make a SVC_HANDLER, accept the connection into the SVC_HANDLER, and -// then activate the SVC_HANDLER. Note that SVC_HANDLER::open() -// decides what type of concurrency strategy to use. - -template int -ACE_Oneshot_Acceptor::accept - (SVC_HANDLER *svc_handler, - typename PEER_ACCEPTOR::PEER_ADDR *remote_addr, - const ACE_Synch_Options &synch_options, - bool restart, - bool reset_new_handle) -{ - ACE_TRACE ("ACE_Oneshot_Acceptor::accept"); - // Note that if timeout == ACE_Time_Value (x, y) where (x > 0 || y > - // 0) then this->connector_.connect() will block synchronously. If - // is set then we don't want this to happen (since we - // want the ACE_Reactor to do the timeout asynchronously). - // Therefore, we'll force this->connector_ to use ACE_Time_Value (0, - // 0) in this case... - - ACE_Time_Value *timeout; - int use_reactor = synch_options[ACE_Synch_Options::USE_REACTOR]; - - if (use_reactor) - timeout = (ACE_Time_Value *) &ACE_Time_Value::zero; - else - timeout = (ACE_Time_Value *) synch_options.time_value (); - - if (this->shared_accept (svc_handler, // stream - remote_addr, // remote address - timeout, // timeout - restart, // restart - reset_new_handle // reset new handler - ) == -1) - { - if (use_reactor && errno == EWOULDBLOCK) - // We couldn't accept right away, so let's wait in the - // . - this->register_handler (svc_handler, - synch_options, - restart); - return -1; - } - return 0; -} - -// Accepts one pending connection from a client (since we're the -// "oneshot" Acceptor). - -template int -ACE_Oneshot_Acceptor::handle_input (ACE_HANDLE) -{ - ACE_TRACE ("ACE_Oneshot_Acceptor::handle_input"); - int result = 0; - - // Cancel any timer that might be pending. - this->cancel (); - - // Try to find out if the implementation of the reactor that we are - // using requires us to reset the event association for the newly - // created handle. This is because the newly created handle will - // inherit the properties of the listen handle, including its event - // associations. - ACE_Reactor *reactor = this->reactor (); - bool reset_new_handle = false; - - // There is a use-case whereby this object will be gone upon return - // from shared_accept - if the Svc_Handler deletes this Oneshot_Acceptor - // during the shared_accept/activation steps. So, do whatever we need - // to do with this object before calling shared_accept. - if (reactor) - { - reset_new_handle = reactor->uses_event_associations (); - reactor->remove_handler - (this, - ACE_Event_Handler::ACCEPT_MASK | ACE_Event_Handler::DONT_CALL); - } - - if (this->shared_accept (this->svc_handler_, // stream - 0, // remote address - 0, // timeout - this->restart_, // restart - reset_new_handle // reset new handle - ) == -1) - result = -1; - - return result; -} - -// Hook called by the explicit dynamic linking facility. - -template int -ACE_Oneshot_Acceptor::init (int, ACE_TCHAR *[]) -{ - ACE_TRACE ("ACE_Oneshot_Acceptor::init"); - return -1; -} - -template int -ACE_Oneshot_Acceptor::fini (void) -{ - ACE_TRACE ("ACE_Oneshot_Acceptor::fini"); - return this->handle_close (); -} - -template int -ACE_Oneshot_Acceptor::info (ACE_TCHAR **strp, - size_t length) const -{ - ACE_TRACE ("ACE_Oneshot_Acceptor::info"); - ACE_TCHAR buf[BUFSIZ]; - ACE_TCHAR addr_str[BUFSIZ]; - typename PEER_ACCEPTOR::PEER_ADDR addr; - - if (this->peer_acceptor_.get_local_addr (addr) == -1) - return -1; - else if (addr.addr_to_string (addr_str, sizeof addr_str) == -1) - return -1; - - ACE_OS::sprintf (buf, - ACE_TEXT ("%s\t %s %s"), - ACE_TEXT ("ACE_Oneshot_Acceptor"), - addr_str, - ACE_TEXT ("#oneshot acceptor factory\n")); - - if (*strp == 0 && (*strp = ACE_OS::strdup (buf)) == 0) - return -1; - else - ACE_OS::strsncpy (*strp, buf, length); - return static_cast (ACE_OS::strlen (buf)); -} - -template int -ACE_Oneshot_Acceptor::suspend (void) -{ - ACE_TRACE ("ACE_Oneshot_Acceptor::suspend"); - return this->reactor () && this->reactor ()->suspend_handler (this); -} - -template int -ACE_Oneshot_Acceptor::resume (void) -{ - ACE_TRACE ("ACE_Oneshot_Acceptor::resume"); - return this->reactor () && this->reactor ()->resume_handler (this); -} - -// Returns ACE_HANDLE of the underlying peer_acceptor. - -template ACE_HANDLE -ACE_Oneshot_Acceptor::get_handle (void) const -{ - ACE_TRACE ("ACE_Oneshot_Acceptor::get_handle"); - return this->peer_acceptor_.get_handle (); -} - -template PEER_ACCEPTOR & -ACE_Oneshot_Acceptor::acceptor (void) const -{ - ACE_TRACE ("ACE_Oneshot_Acceptor::acceptor"); - return (PEER_ACCEPTOR &) this->peer_acceptor_; -} - -template -ACE_Oneshot_Acceptor::operator PEER_ACCEPTOR & () const -{ - ACE_TRACE ("ACE_Oneshot_Acceptor::operator PEER_ACCEPTOR &"); - return (PEER_ACCEPTOR &) this->peer_acceptor_; -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_ACCEPTOR_CPP */ diff --git a/modules/worldengine/deps/acelite/ace/Acceptor.h b/modules/worldengine/deps/acelite/ace/Acceptor.h deleted file mode 100644 index 5923718fbc..0000000000 --- a/modules/worldengine/deps/acelite/ace/Acceptor.h +++ /dev/null @@ -1,701 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Acceptor.h - * - * @author Douglas C. Schmidt - */ -//============================================================================= - -#ifndef ACE_ACCEPTOR_H -#define ACE_ACCEPTOR_H - -#include /**/ "ace/pre.h" - -#include "ace/Service_Object.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Strategies_T.h" -#include "ace/Synch_Options.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_Acceptor - * - * @brief Abstract factory for creating a service handler - * (SVC_HANDLER), accepting into the SVC_HANDLER, and - * activating the SVC_HANDLER. - * - * Implements the basic strategy for passively establishing - * connections with clients. An ACE_Acceptor inherits from - * ACE_Service_Object, which in turn inherits from ACE_Event_Handler. - * This enables the ACE_Reactor to dispatch the ACE_Acceptor's - * handle_input method when connection events occur. The handle_input - * method performs the ACE_Acceptor's default creation, connection - * establishment, and service activation strategies. These strategies - * can be overridden by subclasses individually or as a group. - * - * An ACE_Acceptor is parameterized by concrete types that conform to - * the interfaces of SVC_HANDLER and PEER_ACCEPTOR described below. - * - * @tparam SVC_HANDLER The name of the concrete type that performs the - * application-specific service. The SVC_HANDLER typically - * inherits from ACE_Svc_Handler. @see Svc_Handler.h. - * - * @tparam PEER_ACCEPTOR The name of the class that implements the - * PEER_ACCEPTOR endpoint (e.g., ACE_SOCK_Acceptor) to - * passively establish connections. A PEER_ACCEPTOR - * implementation must provide a PEER_STREAM and PEER_ADDR - * trait to identify the type of stream (e.g., - * ACE_SOCK_Stream) and type of address (e.g., ACE_INET_Addr) - * used by the endpoint. - */ -template -class ACE_Acceptor : public ACE_Service_Object -{ -public: - - // Useful STL-style traits. - typedef typename PEER_ACCEPTOR::PEER_ADDR addr_type; - typedef PEER_ACCEPTOR acceptor_type; - typedef SVC_HANDLER handler_type; - typedef typename SVC_HANDLER::stream_type stream_type; - - /// "Do-nothing" constructor. - ACE_Acceptor (ACE_Reactor * = 0, - int use_select = 1); - - /** - * Open the contained @c PEER_ACCEPTOR object to begin listening, and - * register with the specified reactor for accept events. An - * acceptor can only listen to one port at a time, so make sure to - * @c close() the acceptor before calling @c open() again. - * - * The @c PEER_ACCEPTOR handle is put into non-blocking mode as a - * safeguard against the race condition that can otherwise occur - * between the time when the passive-mode socket handle is "ready" - * and when the actual @c accept() call is made. During this - * interval, the client can shutdown the connection, in which case, - * the @c accept() call can hang. - * - * @param local_addr The address to listen at. - * @param reactor Pointer to the ACE_Reactor instance to register - * this object with. The default is the singleton. - * @param flags Flags to control what mode an accepted socket - * will be put into after it is accepted. The only - * legal value for this argument is @c ACE_NONBLOCK, - * which enables non-blocking mode on the accepted - * peer stream object in @c SVC_HANDLER. The default - * is 0. - * @param use_select Affects behavior when called back by the reactor - * when a connection can be accepted. If non-zero, - * this object will accept all pending connections, - * instead of just the one that triggered the reactor - * callback. Uses ACE_OS::select() internally to - * detect any remaining acceptable connections. - * The default is 1. - * @param reuse_addr Passed to the @c PEER_ACCEPTOR::open() method with - * @p local_addr. Generally used to request that the - * OS allow reuse of the listen port. The default is 1. - */ - ACE_Acceptor (const typename PEER_ACCEPTOR::PEER_ADDR &local_addr, - ACE_Reactor *reactor = ACE_Reactor::instance (), - int flags = 0, - int use_select = 1, - int reuse_addr = 1); - - /** - * Open the contained @c PEER_ACCEPTOR object to begin listening, and - * register with the specified reactor for accept events. An - * acceptor can only listen to one port at a time, so make sure to - * @c close() the acceptor before calling @c open() again. - * - * The @c PEER_ACCEPTOR handle is put into non-blocking mode as a - * safeguard against the race condition that can otherwise occur - * between the time when the passive-mode socket handle is "ready" - * and when the actual @c accept() call is made. During this - * interval, the client can shutdown the connection, in which case, - * the @c accept() call can hang. - * - * @param local_addr The address to listen at. - * @param reactor Pointer to the ACE_Reactor instance to register - * this object with. The default is the singleton. - * @param flags Flags to control what mode an accepted socket - * will be put into after it is accepted. The only - * legal value for this argument is @c ACE_NONBLOCK, - * which enables non-blocking mode on the accepted - * peer stream object in @c SVC_HANDLER. The default - * is 0. - * @param use_select Affects behavior when called back by the reactor - * when a connection can be accepted. If non-zero, - * this object will accept all pending connections, - * instead of just the one that triggered the reactor - * callback. Uses ACE_OS::select() internally to - * detect any remaining acceptable connections. - * The default is 1. - * @param reuse_addr Passed to the @c PEER_ACCEPTOR::open() method with - * @p local_addr. Generally used to request that the - * OS allow reuse of the listen port. The default is 1. - * - * @retval 0 Success - * @retval -1 Failure, @c errno contains an error code. - */ - virtual int open (const typename PEER_ACCEPTOR::PEER_ADDR &local_addr, - ACE_Reactor *reactor = ACE_Reactor::instance (), - int flags = 0, - int use_select = 1, - int reuse_addr = 1); - - /// Close down the Acceptor's resources. - virtual ~ACE_Acceptor (void); - - /// Return the underlying PEER_ACCEPTOR object. - virtual operator PEER_ACCEPTOR &() const; - - /// Return the underlying PEER_ACCEPTOR object. - virtual PEER_ACCEPTOR &acceptor (void) const; - - /// Returns the listening acceptor's {ACE_HANDLE}. - virtual ACE_HANDLE get_handle (void) const; - - /// Close down the Acceptor - virtual int close (void); - - /// In the event that an accept fails, this method will be called and - /// the return value will be returned from handle_input(). - virtual int handle_accept_error (void); - - /// Dump the state of an object. - void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - -protected: - // = The following three methods define the Acceptor's strategies - // for creating, accepting, and activating SVC_HANDLER's, - // respectively. - - /** - * Bridge method for creating a SVC_HANDLER. The default is to - * create a new {SVC_HANDLER} if {sh} == 0, else {sh} is unchanged. - * However, subclasses can override this policy to perform - * SVC_HANDLER creation in any way that they like (such as creating - * subclass instances of SVC_HANDLER, using a singleton, dynamically - * linking the handler, etc.). Returns -1 on failure, else 0. - */ - virtual int make_svc_handler (SVC_HANDLER *&sh); - - /** - * Bridge method for accepting the new connection into the - * @a svc_handler. The default behavior delegates to the - * PEER_ACCEPTOR::accept. - */ - virtual int accept_svc_handler (SVC_HANDLER *svc_handler); - - /** - * Bridge method for activating a @a svc_handler with the appropriate - * concurrency strategy. The default behavior of this method is to - * activate the SVC_HANDLER by calling its open() method (which - * allows the SVC_HANDLER to define its own concurrency strategy). - * However, subclasses can override this strategy to do more - * sophisticated concurrency activations (such as making the - * SVC_HANDLER as an "active object" via multi-threading or - * multi-processing). - */ - virtual int activate_svc_handler (SVC_HANDLER *svc_handler); - - // = Demultiplexing hooks. - /// Perform termination activities when {this} is removed from the - /// {reactor}. - virtual int handle_close (ACE_HANDLE = ACE_INVALID_HANDLE, - ACE_Reactor_Mask = ACE_Event_Handler::ALL_EVENTS_MASK); - - /// Accepts all pending connections from clients, and creates and - /// activates SVC_HANDLERs. - virtual int handle_input (ACE_HANDLE); - - // = Dynamic linking hooks. - /// Default version does no work and returns -1. Must be overloaded - /// by application developer to do anything meaningful. - virtual int init (int argc, ACE_TCHAR *argv[]); - - /// Calls {handle_close}. - virtual int fini (void); - - /// Default version returns address info in {buf}. - virtual int info (ACE_TCHAR **buf, size_t) const; - -public: - // = Service management hooks. - /// This method calls {Reactor::suspend}. - virtual int suspend (void); - - /// This method calls {Reactor::resume}. - virtual int resume (void); - -protected: - /// Concrete factory for accepting connections from clients... - PEER_ACCEPTOR peer_acceptor_; - - /// Needed to reopen the socket if {accept} fails. - typename PEER_ACCEPTOR::PEER_ADDR peer_acceptor_addr_; - - /** - * Flags that indicate how {SVC_HANDLER}'s should be initialized - * prior to being activated. Right now, the only flag that is - * processed is {ACE_NONBLOCK}, which enabled non-blocking I/O on - * the {SVC_HANDLER} when it is opened. - */ - int flags_; - - /// Flag that indicates whether it shall use {select} in the - /// {accept}-loop. - int use_select_; - - /// Needed to reopen the socket if {accept} fails. - int reuse_addr_; -}; - -/** - * @class ACE_Strategy_Acceptor - * - * @brief Abstract factory for creating a service handler - * (SVC_HANDLER), accepting into the SVC_HANDLER, and activating - * the SVC_HANDLER. - * - * Implements a flexible and extensible set of strategies for - * passively establishing connections with clients. There are - * three main strategies: (1) creating a SVC_HANDLER, (2) - * passively accepting a new connection from a client into the - * SVC_HANDLER, and (3) activating the SVC_HANDLER with a - * particular concurrency mechanism. - */ -template -class ACE_Strategy_Acceptor - : public ACE_Acceptor -{ -public: - - // Useful STL-style traits. - typedef ACE_Creation_Strategy - creation_strategy_type; - typedef ACE_Accept_Strategy - accept_strategy_type; - typedef ACE_Concurrency_Strategy - concurrency_strategy_type; - typedef ACE_Scheduling_Strategy scheduling_strategy_type; - typedef ACE_Acceptor - base_type; - - // = Define some useful (old style) traits. - typedef ACE_Creation_Strategy CREATION_STRATEGY; - typedef ACE_Accept_Strategy ACCEPT_STRATEGY; - typedef ACE_Concurrency_Strategy CONCURRENCY_STRATEGY; - typedef ACE_Scheduling_Strategy SCHEDULING_STRATEGY; - - /// Default constructor. - ACE_Strategy_Acceptor (const ACE_TCHAR service_name[] = 0, - const ACE_TCHAR service_description[] = 0, - int use_select = 1, - int reuse_addr = 1); - - /** - * Initialize the appropriate strategies for creation, passive - * connection acceptance, and concurrency, and then register {this} - * with the Reactor and listen for connection requests at the - * designated {local_addr}. - */ - ACE_Strategy_Acceptor (const typename PEER_ACCEPTOR::PEER_ADDR &local_addr, - ACE_Reactor * = ACE_Reactor::instance (), - ACE_Creation_Strategy * = 0, - ACE_Accept_Strategy * = 0, - ACE_Concurrency_Strategy * = 0, - ACE_Scheduling_Strategy * = 0, - const ACE_TCHAR service_name[] = 0, - const ACE_TCHAR service_description[] = 0, - int use_select = 1, - int reuse_addr = 1); - - /** - * Open the contained @c PEER_ACCEPTOR object to begin listening, and - * register with the specified reactor for accept events. - * - * The @c PEER_ACCEPTOR handle is put into non-blocking mode as a - * safeguard against the race condition that can otherwise occur - * between the time when the passive-mode socket handle is "ready" - * and when the actual @c accept call is made. During this - * interval, the client can shutdown the connection, in which case, - * the {accept} call can hang. - * - * @param local_addr The address to listen at. - * @param reactor Pointer to the ACE_Reactor instance to register - * this object with. The default is the singleton. - * @param flags Flags to control what mode an accepted socket - * will be put into after it is accepted. The only - * legal value for this argument is @c ACE_NONBLOCK, - * which enables non-blocking mode on the accepted - * peer stream object in @c SVC_HANDLER. The default - * is 0. - * @param use_select Affects behavior when called back by the reactor - * when a connection can be accepted. If non-zero, - * this object will accept all pending connections, - * instead of just the one that triggered the reactor - * callback. Uses ACE_OS::select() internally to - * detect any remaining acceptable connections. - * The default is 1. - * @param reuse_addr Passed to the @c PEER_ACCEPTOR::open() method with - * @p local_addr. Generally used to request that the - * OS allow reuse of the listen port. The default is 1. - * - * @retval 0 Success - * @retval -1 Failure, @c errno contains an error code. - */ - virtual int open (const typename PEER_ACCEPTOR::PEER_ADDR &local_addr, - ACE_Reactor *reactor, - int flags = 0, - int use_select = 1, - int reuse_addr = 1); - - /** - * Initialize the appropriate strategies for creation, passive - * connection acceptance, and concurrency, and then register {this} - * with the Reactor and listen for connection requests at the - * designated {local_addr}. - */ - virtual int open (const typename PEER_ACCEPTOR::PEER_ADDR &, - ACE_Reactor * = ACE_Reactor::instance (), - ACE_Creation_Strategy * = 0, - ACE_Accept_Strategy * =0, - ACE_Concurrency_Strategy * = 0, - ACE_Scheduling_Strategy * = 0, - const ACE_TCHAR *service_name = 0, - const ACE_TCHAR *service_description = 0, - int use_select = 1, - int reuse_addr = 1); - - /// Close down the Strategy_Acceptor's resources. - virtual ~ACE_Strategy_Acceptor (void); - - /// Return the underlying PEER_ACCEPTOR object. - virtual operator PEER_ACCEPTOR &() const; - - /// Return the underlying PEER_ACCEPTOR object. - virtual PEER_ACCEPTOR &acceptor (void) const; - - /// Returns the listening acceptor's {ACE_HANDLE}. - virtual ACE_HANDLE get_handle (void) const; - - /// Dump the state of an object. - void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - - // = Service management hooks. - - /// This method delegates to the {Scheduling_Strategy}'s {suspend} - /// method. - virtual int suspend (void); - - /// This method delegates to the {Scheduling_Strategy}'s {resume} - /// method. - virtual int resume (void); - -protected: - - /// Calls {handle_close} when dynamically unlinked. - virtual int fini (void); - - /// Default version returns address info in {buf}. - virtual int info (ACE_TCHAR **buf, size_t) const; - - // = The following three methods define the {Acceptor}'s strategies - // for creating, accepting, and activating {SVC_HANDLER}'s, - // respectively. - - /** - * Bridge method for creating a {SVC_HANDLER}. The strategy for - * creating a {SVC_HANDLER} are configured into the Acceptor via - * it's {creation_strategy_}. The default is to create a new - * {SVC_HANDLER} if {sh} == 0, else {sh} is unchanged. However, - * subclasses can override this policy to perform {SVC_HANDLER} - * creation in any way that they like (such as creating subclass - * instances of {SVC_HANDLER}, using a singleton, dynamically - * linking the handler, etc.). Returns -1 on failure, else 0. - */ - virtual int make_svc_handler (SVC_HANDLER *&); - - /** - * Bridge method for accepting the new connection into the - * {SVC_HANDLER}. The default behavior delegates to the - * {PEER_ACCEPTOR::accept} in the {Acceptor_Strategy}. - */ - virtual int accept_svc_handler (SVC_HANDLER *svc_handler); - - /** - * Bridge method for activating a {SVC_HANDLER} with the appropriate - * concurrency strategy. The default behavior of this method is to - * activate the {SVC_HANDLER} by calling its {open} method (which - * allows the {SVC_HANDLER} to define its own concurrency strategy). - * However, subclasses can override this strategy to do more - * sophisticated concurrency activations (such as creating the - * {SVC_HANDLER} as an "active object" via multi-threading or - * multi-processing). - */ - virtual int activate_svc_handler (SVC_HANDLER *svc_handler); - - // = Demultiplexing hooks. - /// Perform termination activities when {this} is removed from the - /// {Reactor}. - virtual int handle_close (ACE_HANDLE = ACE_INVALID_HANDLE, - ACE_Reactor_Mask = ACE_Event_Handler::ALL_EVENTS_MASK); - - /// Handle SIGINT. - virtual int handle_signal (int signum, siginfo_t *, ucontext_t *); - - // = These data members are "logically private" but are put in the - // protected part in case subclasses want to access them. - - // = Strategy objects. - - /// Creation strategy for an Acceptor. - CREATION_STRATEGY *creation_strategy_; - - /// true if {Acceptor} created the creation strategy and thus should - /// delete it, else false. - bool delete_creation_strategy_; - - /// Accept strategy for an {Acceptor}. - ACCEPT_STRATEGY *accept_strategy_; - - /// true if {Acceptor} created the accept strategy and thus should delete - /// it, else false. - bool delete_accept_strategy_; - - /// Concurrency strategy for an {Acceptor}. - CONCURRENCY_STRATEGY *concurrency_strategy_; - - /// true if {Acceptor} created the concurrency strategy and thus should - /// delete it, else false. - bool delete_concurrency_strategy_; - - /// Scheduling strategy for an {Acceptor}. - SCHEDULING_STRATEGY *scheduling_strategy_; - - /// true if {Acceptor} created the scheduling strategy and thus should - /// delete it, else false. - bool delete_scheduling_strategy_; - - // = Service information objects. - - /// Name of the service. - ACE_TCHAR *service_name_; - - /// Description of the service. - ACE_TCHAR *service_description_; - - /// Address that the {Strategy_Acceptor} uses to listen for - /// connections. - typename PEER_ACCEPTOR::PEER_ADDR service_addr_; -}; - -/** - * @class ACE_Oneshot_Acceptor - * - * @brief Generic factory for passively connecting clients and creating - * exactly one service handler of the type SVC_HANDLER specified in the - * template. - * - * This class works similarly to the regular ACE_Acceptor, but - * with the following differences: - * -# ACE_Oneshot_Acceptor doesn't automatically register itself with the - * ACE_Reactor; the caller is expected to call the accept() method - * directly. Since a later call to accept() may require a reactor, - * the constructor and open() methods both accept an ACE_Reactor pointer - * which is saved in case it's needed in accept(). - * -# ACE_Oneshot_Acceptor doesn't need an ACE_Creation_Strategy (because - * the user supplies the SVC_HANDLER) or an ACE_Accept_Strategy (because - * this class only accepts one connection and then removes all traces of - * itself from the ACE_Reactor if it was registered for asynchronous - * accepts). - * - * The usage model for ACE_Oneshot_Acceptor is: - * - Instantiate an object and establish its local address to listen at. - * This can be accomplished using either the address-accepting constructor - * (but there's no error indication) or the default constructor followed - * by a call to open(). - * - Call the accept() method. This will attempt to accept a connection - * immediately. If there is no immediately available connection to accept, - * behavior is governed by the ACE_Synch_Options argument passed to open(). - */ -template -class ACE_Oneshot_Acceptor : public ACE_Service_Object -{ -public: - - // Useful STL-style traits. - typedef typename PEER_ACCEPTOR::PEER_ADDR addr_type; - typedef PEER_ACCEPTOR acceptor_type; - typedef SVC_HANDLER handler_type; - typedef typename SVC_HANDLER::stream_type stream_type; - - /// Constructor. - ACE_Oneshot_Acceptor (void); - - /** - * Initialize the appropriate strategies for concurrency and then - * open the acceptor at the designated @a local_addr. Note - * that unlike ACE_Acceptor and ACE_Strategy_Acceptor, this - * method does NOT register this acceptor with the @a reactor at - * this point -- the @a reactor parameter is saved in case it's - * needed later. - */ - ACE_Oneshot_Acceptor (const typename PEER_ACCEPTOR::PEER_ADDR &local_addr, - ACE_Reactor *reactor = ACE_Reactor::instance (), - ACE_Concurrency_Strategy * = 0); - - /** - * Initialize the appropriate strategies for concurrency and then - * open the acceptor at the designated @a local_addr. Note - * that unlike ACE_Acceptor and ACE_Strategy_Acceptor, this - * method does NOT register this acceptor with the @a reactor at - * this point -- the @a reactor parameter is saved in case it's - * needed later. - */ - int open (const typename PEER_ACCEPTOR::PEER_ADDR &, - ACE_Reactor *reactor = ACE_Reactor::instance (), - ACE_Concurrency_Strategy * = 0); - - /// Close down the {Oneshot_Acceptor}. - virtual ~ACE_Oneshot_Acceptor (void); - - // = Explicit factory operation. - /// Create a {SVC_HANDLER}, accept the connection into the - /// {SVC_HANDLER}, and activate the {SVC_HANDLER}. - virtual int accept (SVC_HANDLER * = 0, - typename PEER_ACCEPTOR::PEER_ADDR *remote_addr = 0, - const ACE_Synch_Options &synch_options = ACE_Synch_Options::defaults, - bool restart = true, - bool reset_new_handle = false); - - /// Cancel a oneshot acceptor that was started asynchronously. - virtual int cancel (void); - - /// Return the underlying {PEER_ACCEPTOR} object. - virtual operator PEER_ACCEPTOR &() const; - - /// Return the underlying {PEER_ACCEPTOR} object. - virtual PEER_ACCEPTOR &acceptor (void) const; - - /// Close down the {Oneshot_Acceptor}. - virtual int close (void); - - /// Dump the state of an object. - void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - -protected: - /** - * Bridge method for activating a {svc_handler} with the appropriate - * concurrency strategy. Default behavior is to activate the - * {SVC_HANDLER} as a "passive object." However, subclasses can - * override this strategy to do more sophisticated concurrency - * activations (such as creating the {SVC_HANDLER} as an "active - * object" via multi-threading or multi-processing). - */ - virtual int activate_svc_handler (SVC_HANDLER *svc_handler); - - /// Factors out the code shared between the {accept} and - /// {handle_input} methods. - int shared_accept (SVC_HANDLER *svc_handler, - typename PEER_ACCEPTOR::PEER_ADDR *remote_addr, - ACE_Time_Value *timeout, - bool restart, - bool reset_new_handle); - - // = Demultiplexing hooks. - /// Returns the listening acceptor's {ACE_HANDLE}. - virtual ACE_HANDLE get_handle (void) const; - - /// Perform termination activities when {this} is removed from the - /// {reactor}. - virtual int handle_close (ACE_HANDLE = ACE_INVALID_HANDLE, - ACE_Reactor_Mask = ACE_Event_Handler::ALL_EVENTS_MASK); - - /// Accept one connection from a client and activates the - /// SVC_HANDLER. - virtual int handle_input (ACE_HANDLE); - - /// Called when an acceptor times out... - virtual int handle_timeout (const ACE_Time_Value &tv, - const void *arg); - - // = Dynamic linking hooks. - /// Default version does no work and returns -1. Must be overloaded - /// by application developer to do anything meaningful. - virtual int init (int argc, ACE_TCHAR *argv[]); - - /// Default version does no work and returns -1. Must be overloaded - /// by application developer to do anything meaningful. - virtual int fini (void); - - /// Default version returns address info in {buf}. - virtual int info (ACE_TCHAR **, size_t) const; - - // = Service management hooks. - /// Default version does no work and returns -1. Must be overloaded - /// by application developer to do anything meaningful. - virtual int suspend (void); - - /// Default version does no work and returns -1. Must be overloaded - /// by application developer to do anything meaningful. - virtual int resume (void); - -private: - /** - * Insert ourselves into the {ACE_Reactor} so that we can continue - * accepting this connection asynchronously. This method should NOT - * be called by developers directly. - */ - int register_handler (SVC_HANDLER *svc_handler, - const ACE_Synch_Options &options, - bool restart); - - /// Hold the svc_handler_ across asynchrony boundaries. - SVC_HANDLER *svc_handler_; - - /// Hold the restart flag across asynchrony boundaries. - bool restart_; - - /// Factory that establishes connections passively. - PEER_ACCEPTOR peer_acceptor_; - - /// Concurrency strategy for an Acceptor. - ACE_Concurrency_Strategy *concurrency_strategy_; - - /// true if Acceptor created the concurrency strategy and thus should - /// delete it, else false. - bool delete_concurrency_strategy_; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "ace/Acceptor.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Acceptor.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ - -#include /**/ "ace/post.h" - -#endif /* ACE_ACCEPTOR_H */ diff --git a/modules/worldengine/deps/acelite/ace/Activation_Queue.cpp b/modules/worldengine/deps/acelite/ace/Activation_Queue.cpp deleted file mode 100644 index 5921c26c47..0000000000 --- a/modules/worldengine/deps/acelite/ace/Activation_Queue.cpp +++ /dev/null @@ -1,134 +0,0 @@ -#include "ace/Activation_Queue.h" - -#if !defined (__ACE_INLINE__) -#include "ace/Activation_Queue.inl" -#endif /* __ACE_INLINE__ */ - -#include "ace/Log_Category.h" -#include "ace/Method_Request.h" -#include "ace/Malloc_Base.h" -#include "ace/Time_Value.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -void -ACE_Activation_Queue::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - ACELIB_DEBUG ((LM_DEBUG, - ACE_TEXT ("delete_queue_ = %d\n"), - this->delete_queue_)); - ACELIB_DEBUG ((LM_INFO, ACE_TEXT ("queue_:\n"))); - if (this->queue_) - this->queue_->dump(); - else - //FUZZ: disable check_for_NULL - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("(NULL)\n"))); - //FUZZ: enable check_for_NULL - - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} - -ACE_Activation_Queue::ACE_Activation_Queue (ACE_Message_Queue *new_queue, - ACE_Allocator *alloc, - ACE_Allocator *db_alloc) - : delete_queue_ (false) - , allocator_(alloc) - , data_block_allocator_(db_alloc) -{ - if (this->allocator_ == 0) - this->allocator_ = ACE_Allocator::instance (); - - if (new_queue) - this->queue_ = new_queue; - else - { - ACE_NEW (this->queue_, - ACE_Message_Queue); - this->delete_queue_ = true; - } -} - -void -ACE_Activation_Queue::queue (ACE_Message_Queue *q) -{ - // Destroy the internal queue if one exist. - if (this->delete_queue_) - { - // Destroy the current queue. - delete this->queue_; - - // Set the flag to false. NOTE that the delete_queue_ flag is a - // flag used to only indicate whether or not if an internal - // ACE_Message_Queue has been created, therefore, it will not - // affect the user if the user decided to replace the queue with - // their own queue no matter how many time they call on this - // function. - this->delete_queue_ = false; - } - - queue_ = q; -} - -ACE_Activation_Queue::~ACE_Activation_Queue (void) -{ - if (this->delete_queue_) - delete this->queue_; -} - -ACE_Method_Request * -ACE_Activation_Queue::dequeue (ACE_Time_Value *tv) -{ - ACE_Message_Block *mb = 0; - - // Dequeue the message. - if (this->queue_->dequeue_head (mb, tv) != -1) - { - // Get the next . - ACE_Method_Request *mr = - reinterpret_cast (mb->base ()); - // Delete the message block. - mb->release (); - return mr; - } - else - return 0; -} - -int -ACE_Activation_Queue::enqueue (ACE_Method_Request *mr, - ACE_Time_Value *tv) -{ - ACE_Message_Block *mb = 0; - - // We pass sizeof (*mr) here so that flow control will work - // correctly. Since we also pass note that no unnecessary - // memory is actually allocated -- just the size field is set. - ACE_NEW_MALLOC_RETURN (mb, - static_cast (this->allocator_->malloc (sizeof (ACE_Message_Block))), - ACE_Message_Block (sizeof (*mr), // size - ACE_Message_Block::MB_DATA, // type - 0, // cont - (char *) mr, // data - 0, // allocator - 0, // locking strategy - mr->priority (), // priority - ACE_Time_Value::zero, // execution time - ACE_Time_Value::max_time, // absolute time of deadline - this->data_block_allocator_, // data_block allocator - this->allocator_), // message_block allocator - -1); - - // Enqueue in priority order. - int const result = this->queue_->enqueue_prio (mb, tv); - - // Free ACE_Message_Block if enqueue_prio failed. - if (result == -1) - ACE_DES_FREE (mb, this->allocator_->free, ACE_Message_Block); - - return result; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Activation_Queue.h b/modules/worldengine/deps/acelite/ace/Activation_Queue.h deleted file mode 100644 index a386ca7672..0000000000 --- a/modules/worldengine/deps/acelite/ace/Activation_Queue.h +++ /dev/null @@ -1,168 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Activation_Queue.h - * - * @author Andres Kruse - * @author Douglas C. Schmidt - */ -//============================================================================= - -#ifndef ACE_ACTIVATION_QUEUE_H -#define ACE_ACTIVATION_QUEUE_H - -#include /**/ "ace/pre.h" - -#include /**/ "ace/ACE_export.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Message_Queue.h" -#include "ace/Copy_Disabled.h" -#include "ace/Condition_Thread_Mutex.h" - -/// Define to be compatible with the terminology in the POSA2 book! -#define ACE_Activation_List ACE_Activation_Queue - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -class ACE_Method_Request; - -/** - * @class ACE_Activation_Queue - * - * @brief - * Reifies a method into a request. Subclasses typically - * represent necessary state and behavior. - * - * Maintains a priority-ordered queue of ACE_Method_Request objects. - * A scheduler class (often derived from ACE_Task) subsequently removes - * each method request and invokes its @c call() method. - * - * This class is discussed in depth in the Active Object chapter - * of POSA2. In that book, it is referred to as an Activation List. - * - * @sa ACE_Method_Request - */ -class ACE_Export ACE_Activation_Queue -{ -public: - /// Constructor. - /** - * Initializes a new activation queue. - * - * @param new_queue The activation queue uses an ACE_Message_Queue to - * queue and order the method requests. If this argument - * is 0, a new ACE_Message_Queue is created for this - * object's use and will be deleted when this object is - * destroyed. If a non-zero pointer is supplied, the - * passed object will be used and will not be deleted when - * this object is destroyed. If an ACE_Task is being created - * to act as the scheduler, for instance, its - * ACE_Message_Queue pointer can be passed to this object. - * @param alloc Optional, the allocator to use when allocating - * ACE_Message_Block instances that wrap the method requests - * queued to this activation queue. Defaults to - * ACE_Allocator::instance(). - * @param db_alloc Optional, the allocator to use when allocating - * data blocks for the ACE_Message_Block instances that - * wrap the method requests queued to this activation queue. - * Defaults to ACE_Allocator::instance(). - */ - ACE_Activation_Queue (ACE_Message_Queue *new_queue = 0, - ACE_Allocator *alloc = 0, - ACE_Allocator *db_alloc = 0); - - /// Destructor. - virtual ~ACE_Activation_Queue (void); - - // = Activate Queue operations. - - /// Dequeue the next available ACE_Method_Request. - /** - * @param tv If 0, the method will block until a method request is - * available, else will wait until the absolute time specified - * in the referenced ACE_Time_Value. This method will return, - * earlier, however, if queue is closed, deactivated, or when - * a signal occurs. - * - * @retval Pointer to the dequeued ACE_Method_Request object. - * @retval 0 an error occurs; errno contains further information. If - * the specified timeout elapses, errno will be @c EWOULDBLOCK. - */ - ACE_Method_Request *dequeue (ACE_Time_Value *tv = 0); - - /// Enqueue the ACE_Method_Request in priority order. - /** - * The priority of the method request is obtained via the @c priority() - * method of the queued method request. Priority ordering is determined - * by the ACE_Message_Queue class; 0 is the lowest priority. - * - * @param new_method_request Pointer to the ACE_Method_Request object to - * queue. This object's @c priority() method is called to obtain - * the priority. - * @param tv If 0, the method will block until the method request can - * be queued, else will wait until the absolute time specified - * in the referenced ACE_Time_Value. This method will return, - * earlier, however, if queue is closed, deactivated, or when - * a signal occurs. - * - * @retval >0 The number of method requests on the queue after adding - * the specified request. - * @retval -1 if an error occurs; errno contains further information. If - * the specified timeout elapses, errno will be @c EWOULDBLOCK. - */ - int enqueue (ACE_Method_Request *new_method_request, ACE_Time_Value *tv = 0); - - /// Get the current number of method objects in the queue. - size_t method_count (void) const; - - /// Returns 1 if the queue is empty, 0 otherwise. - int is_empty (void) const; - - /// Returns 1 if the queue is full, 0 otherwise. - int is_full (void) const; - - /// Dump the state of an request. - void dump (void) const; - - /// Get a pointer to the underlying queue. - ACE_Message_Queue *queue (void) const; - - /// Set the pointer to the underlying queue. - void queue (ACE_Message_Queue *q); - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - -protected: - - /// Stores the Method_Requests. - ACE_Message_Queue *queue_; - - /// Keeps track of whether we need to delete the queue. - bool delete_queue_; - -private: - - /// Allocation strategy of the queue. - ACE_Allocator *allocator_; - - /// Allocation strategy of the message blocks. - ACE_Allocator *data_block_allocator_; - - ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Activation_Queue &)) - ACE_UNIMPLEMENTED_FUNC (ACE_Activation_Queue (const ACE_Activation_Queue &)) -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/Activation_Queue.inl" -#endif /* __ACE_INLINE__ */ - -#include /**/ "ace/post.h" -#endif /* ACE_ACTIVATION_QUEUE_H */ diff --git a/modules/worldengine/deps/acelite/ace/Activation_Queue.inl b/modules/worldengine/deps/acelite/ace/Activation_Queue.inl deleted file mode 100644 index 4c0ffc049d..0000000000 --- a/modules/worldengine/deps/acelite/ace/Activation_Queue.inl +++ /dev/null @@ -1,31 +0,0 @@ -// -*- C++ -*- -// -// $Id: Activation_Queue.inl 80826 2008-03-04 14:51:23Z wotte $ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_INLINE size_t -ACE_Activation_Queue::method_count (void) const -{ - return queue_->message_count (); -} - -ACE_INLINE int -ACE_Activation_Queue::is_full (void) const -{ - return queue_->is_full (); -} - -ACE_INLINE int -ACE_Activation_Queue::is_empty (void) const -{ - return queue_->is_empty (); -} - -ACE_INLINE ACE_Message_Queue * -ACE_Activation_Queue::queue (void) const -{ - return queue_; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Active_Map_Manager.cpp b/modules/worldengine/deps/acelite/ace/Active_Map_Manager.cpp deleted file mode 100644 index 574bcb8575..0000000000 --- a/modules/worldengine/deps/acelite/ace/Active_Map_Manager.cpp +++ /dev/null @@ -1,7 +0,0 @@ -// $Id: Active_Map_Manager.cpp 91286 2010-08-05 09:04:31Z johnnyw $ - -#include "ace/Active_Map_Manager.h" - -#if !defined (__ACE_INLINE__) -#include "ace/Active_Map_Manager.inl" -#endif /* __ACE_INLINE__ */ diff --git a/modules/worldengine/deps/acelite/ace/Active_Map_Manager.h b/modules/worldengine/deps/acelite/ace/Active_Map_Manager.h deleted file mode 100644 index 7bade46aa5..0000000000 --- a/modules/worldengine/deps/acelite/ace/Active_Map_Manager.h +++ /dev/null @@ -1,116 +0,0 @@ -/* -*- C++ -*- */ - -//============================================================================= -/** - * @file Active_Map_Manager.h - * - * $Id: Active_Map_Manager.h 93359 2011-02-11 11:33:12Z mcorino $ - * - * @author Irfan Pyarali - */ -//============================================================================= - - -#ifndef ACE_ACTIVE_MAP_MANAGER_H -#define ACE_ACTIVE_MAP_MANAGER_H -#include /**/ "ace/pre.h" - -#include /**/ "ace/ACE_export.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Basic_Types.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_Active_Map_Manager_Key - * - * @brief Key used in the Active Object Map. - * - * This key keeps information of the index and the generation - * count of the slot it represents. Since the index information - * is part of the key, lookups are super fast and predictable, - */ -class ACE_Export ACE_Active_Map_Manager_Key -{ -public: - /// Default constructor. - ACE_Active_Map_Manager_Key (void); - - /** - * Constructor given the @a slot_index and @a slot_generation number. - * This is useful once the user has somehow recovered the - * @a slot_index and @a slot_generation number from the client. - */ - ACE_Active_Map_Manager_Key (ACE_UINT32 slot_index, - ACE_UINT32 slot_generation); - - /// Get the slot_index. - ACE_UINT32 slot_index (void) const; - - /// Set the slot_index. - void slot_index (ACE_UINT32 i); - - /// Get the slot_generation number. - ACE_UINT32 slot_generation (void) const; - - /// Set the slot_generation number. - void slot_generation (ACE_UINT32 g); - - /// Size required to store information about active key. - static size_t size (void); - - /// Recover state of active key from @a data. User must make sure - /// that @a data encoded using the encode() method. - void decode (const void *data); - - /// Encode state of the active key into @a data. @a data must be as - /// big as the value returned from size(). - void encode (void *data) const; - - /// Compare keys. - bool operator== (const ACE_Active_Map_Manager_Key &rhs) const; - bool operator!= (const ACE_Active_Map_Manager_Key &rhs) const; - - // = This really should be protected but because of template - // friends, they are not. - - /// Increment the slot_generation number. - void increment_slot_generation_count (void); - -private: - - /** - * @brief Data for the Active Object Map Key. - * - * This separate structure makes it easier to manage copying - * the index and the generation to and from the user buffer. - * - */ - struct key_data - { - /// Slot index in the active map. - ACE_UINT32 slot_index_; - - /// Slot generation number of @c slot_index_ slot in the active map. - ACE_UINT32 slot_generation_; - }; - - /// Data for the Active Object Map Key. - key_data key_data_; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/Active_Map_Manager.inl" -#endif /* __ACE_INLINE__ */ - -// Include the templates here. -#include "ace/Active_Map_Manager_T.h" - -#include /**/ "ace/post.h" -#endif /* ACE_ACTIVE_MAP_MANAGER_H */ diff --git a/modules/worldengine/deps/acelite/ace/Active_Map_Manager.inl b/modules/worldengine/deps/acelite/ace/Active_Map_Manager.inl deleted file mode 100644 index df90ada6a0..0000000000 --- a/modules/worldengine/deps/acelite/ace/Active_Map_Manager.inl +++ /dev/null @@ -1,95 +0,0 @@ -// -*- C++ -*- -// -// $Id: Active_Map_Manager.inl 80826 2008-03-04 14:51:23Z wotte $ - -#include "ace/OS_NS_string.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_INLINE -ACE_Active_Map_Manager_Key::ACE_Active_Map_Manager_Key (void) -{ - // If you change ~0, please change ACE_Map_Manager::free_list_id() - // accordingly. - this->key_data_.slot_index_ = (ACE_UINT32) ~0; - this->key_data_.slot_generation_ = 0; -} - -ACE_INLINE -ACE_Active_Map_Manager_Key::ACE_Active_Map_Manager_Key (ACE_UINT32 slot_index, - ACE_UINT32 slot_generation) -{ - this->key_data_.slot_index_ = slot_index; - this->key_data_.slot_generation_ = slot_generation; -} - -ACE_INLINE ACE_UINT32 -ACE_Active_Map_Manager_Key::slot_index (void) const -{ - return this->key_data_.slot_index_; -} - -ACE_INLINE ACE_UINT32 -ACE_Active_Map_Manager_Key::slot_generation (void) const -{ - return this->key_data_.slot_generation_; -} - -ACE_INLINE bool -ACE_Active_Map_Manager_Key::operator== (const ACE_Active_Map_Manager_Key &rhs) const -{ - return - this->key_data_.slot_index_ == rhs.key_data_.slot_index_ && - this->key_data_.slot_generation_ == rhs.key_data_.slot_generation_; -} - -ACE_INLINE bool -ACE_Active_Map_Manager_Key::operator!= (const ACE_Active_Map_Manager_Key &rhs) const -{ - return !this->operator== (rhs); -} - -ACE_INLINE void -ACE_Active_Map_Manager_Key::slot_index (ACE_UINT32 i) -{ - this->key_data_.slot_index_ = i; -} - -ACE_INLINE void -ACE_Active_Map_Manager_Key::slot_generation (ACE_UINT32 g) -{ - this->key_data_.slot_generation_ = g; -} - -ACE_INLINE void -ACE_Active_Map_Manager_Key::increment_slot_generation_count (void) -{ - ++this->key_data_.slot_generation_; -} - -/* static */ -ACE_INLINE size_t -ACE_Active_Map_Manager_Key::size (void) -{ - return sizeof (ACE_UINT32) + sizeof (ACE_UINT32); -} - -ACE_INLINE void -ACE_Active_Map_Manager_Key::decode (const void *data) -{ - // Copy the information from the user buffer into the key. - ACE_OS::memcpy (&this->key_data_, - data, - sizeof this->key_data_); -} - -ACE_INLINE void -ACE_Active_Map_Manager_Key::encode (void *data) const -{ - // Copy the key data to the user buffer. - ACE_OS::memcpy (data, - &this->key_data_, - sizeof this->key_data_); -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Active_Map_Manager_T.cpp b/modules/worldengine/deps/acelite/ace/Active_Map_Manager_T.cpp deleted file mode 100644 index 732cc29511..0000000000 --- a/modules/worldengine/deps/acelite/ace/Active_Map_Manager_T.cpp +++ /dev/null @@ -1,22 +0,0 @@ -// $Id: Active_Map_Manager_T.cpp 80826 2008-03-04 14:51:23Z wotte $ - -#ifndef ACE_ACTIVE_MAP_MANAGER_T_CPP -#define ACE_ACTIVE_MAP_MANAGER_T_CPP - -#include "ace/Active_Map_Manager_T.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#if !defined (__ACE_INLINE__) -#include "ace/Active_Map_Manager_T.inl" -#endif /* __ACE_INLINE__ */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_ALLOC_HOOK_DEFINE(ACE_Active_Map_Manager) - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_ACTIVE_MAP_MANAGER_T_CPP */ diff --git a/modules/worldengine/deps/acelite/ace/Active_Map_Manager_T.h b/modules/worldengine/deps/acelite/ace/Active_Map_Manager_T.h deleted file mode 100644 index 80eaada26a..0000000000 --- a/modules/worldengine/deps/acelite/ace/Active_Map_Manager_T.h +++ /dev/null @@ -1,211 +0,0 @@ -/* -*- C++ -*- */ - -//============================================================================= -/** - * @file Active_Map_Manager_T.h - * - * $Id: Active_Map_Manager_T.h 84316 2009-02-03 19:46:05Z johnnyw $ - * - * @author Irfan Pyarali - */ -//============================================================================= - - -#ifndef ACE_ACTIVE_MAP_MANAGER_T_H -#define ACE_ACTIVE_MAP_MANAGER_T_H -#include /**/ "ace/pre.h" - -#include "ace/Map_Manager.h" -#include "ace/Active_Map_Manager.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Null_Mutex.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_Active_Map_Manager - * - * @brief Define a map abstraction that associates system generated - * keys with user specified values. - * - * Since the key is system generated, searches are very fast and - * take a constant amount of time. - */ -template -class ACE_Active_Map_Manager : public ACE_Map_Manager -{ -public: - - // = Traits. - typedef ACE_Active_Map_Manager_Key key_type; - typedef T mapped_type; - - typedef ACE_Map_Entry ENTRY; - typedef ACE_Map_Iterator ITERATOR; - typedef ACE_Map_Reverse_Iterator REVERSE_ITERATOR; - - typedef ENTRY entry; - typedef ITERATOR iterator; - typedef REVERSE_ITERATOR reverse_iterator; - - // = Initialization and termination methods. - /// Initialize a Active_Map_Manager with the ACE_DEFAULT_MAP_SIZE. - ACE_Active_Map_Manager (ACE_Allocator *alloc = 0); - - /// Initialize a Active_Map_Manager with @a size entries. - ACE_Active_Map_Manager (size_t size, - ACE_Allocator *alloc = 0); - - /// Close down a Active_Map_Manager and release dynamically - /// allocated resources. - ~ACE_Active_Map_Manager (void); - - /// Initialize a Active_Map_Manager with size @a length. - int open (size_t length = ACE_DEFAULT_MAP_SIZE, - ACE_Allocator *alloc = 0); - - /// Close down a Active_Map_Manager and release dynamically - /// allocated resources. - int close (void); - - /// Add @a value to the map, and the corresponding key produced by the - /// Active_Map_Manager is returned through @a key. - int bind (const T &value, - ACE_Active_Map_Manager_Key &key); - - /// Add @a value to the map. The user does not care about the - /// corresponding key produced by the Active_Map_Manager. - int bind (const T &value); - - /** - * Reserves a slot in the internal structure and returns the key and - * a pointer to the value. User should place their @a value into - * @a internal_value. This method is useful in reducing the number - * of copies required in some cases. Note that @a internal_value is - * only a temporary pointer and will change when the map resizes. - * Therefore, the user should use the pointer immediately and not - * hold on to it. - */ - int bind (ACE_Active_Map_Manager_Key &key, - T *&internal_value); - - /// Reassociate @a key with @a value. The function fails if @a key is - /// not in the map. - int rebind (const ACE_Active_Map_Manager_Key &key, - const T &value); - - /** - * Reassociate @a key with @a value, storing the old value into the - * "out" parameter @a old_value. The function fails if @a key is not - * in the map. - */ - int rebind (const ACE_Active_Map_Manager_Key &key, - const T &value, - T &old_value); - - /** - * Reassociate @a key with @a value, storing the old key and value - * into the "out" parameter @a old_key and @a old_value. The function - * fails if @a key is not in the map. - */ - int rebind (const ACE_Active_Map_Manager_Key &key, - const T &value, - ACE_Active_Map_Manager_Key &old_key, - T &old_value); - - /// Locate @a value associated with @a key. - int find (const ACE_Active_Map_Manager_Key &key, - T &value) const; - - /// Is @a key in the map? - int find (const ACE_Active_Map_Manager_Key &key) const; - - /** - * Locate @a value associated with @a key. The value is returned via - * @a internal_value and hence a copy is saved. Note that - * @a internal_value is only a temporary pointer and will change when - * the map resizes. Therefore, the user should use the pointer - * immediately and not hold on to it. - */ - int find (const ACE_Active_Map_Manager_Key &key, - T *&internal_value) const; - - // Creates a key. User should place their @a value into - // <*internal_value>. This method is useful in reducing the number - // of copies required in some cases. - - /// Remove @a key from the map. - int unbind (const ACE_Active_Map_Manager_Key &key); - - /// Remove @a key from the map, and return the @a value associated with - /// @a key. - int unbind (const ACE_Active_Map_Manager_Key &key, - T &value); - - /** - * Locate @a value associated with @a key. The value is returned via - * @a internal_value and hence a copy is saved. Note that - * @a internal_value is only a temporary pointer and will change when - * the map resizes or when this slot is reused. Therefore, the user - * should use the pointer immediately and not hold on to it. - */ - int unbind (const ACE_Active_Map_Manager_Key &key, - T *&internal_value); - - /// Return the current size of the map. - size_t current_size (void) const; - - /// Return the total size of the map. - size_t total_size (void) const; - - /// Returns a key that cannot be found in the map. - static const ACE_Active_Map_Manager_Key npos (void); - - /// Dump the state of an object. - void dump (void) const; - - // = STL styled iterator factory functions. - - /// Return forward iterator. - ACE_Map_Iterator begin (void); - ACE_Map_Iterator end (void); - - /// Return reverse iterator. - ACE_Map_Reverse_Iterator rbegin (void); - ACE_Map_Reverse_Iterator rend (void); - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - -protected: - - /// Private base class - typedef ACE_Map_Manager ACE_AMM_BASE; - -private: - - // = Disallow these operations. - ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Active_Map_Manager &)) - ACE_UNIMPLEMENTED_FUNC (ACE_Active_Map_Manager (const ACE_Active_Map_Manager &)) -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/Active_Map_Manager_T.inl" -#endif /* __ACE_INLINE__ */ - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "ace/Active_Map_Manager_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Active_Map_Manager_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ - -#include /**/ "ace/post.h" -#endif /* ACE_ACTIVE_MAP_MANAGER_T_H */ diff --git a/modules/worldengine/deps/acelite/ace/Active_Map_Manager_T.inl b/modules/worldengine/deps/acelite/ace/Active_Map_Manager_T.inl deleted file mode 100644 index 647b55ebd5..0000000000 --- a/modules/worldengine/deps/acelite/ace/Active_Map_Manager_T.inl +++ /dev/null @@ -1,311 +0,0 @@ -// -*- C++ -*- -// -// $Id: Active_Map_Manager_T.inl 80826 2008-03-04 14:51:23Z wotte $ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -template ACE_INLINE int -ACE_Active_Map_Manager::bind (ACE_Active_Map_Manager_Key &key, - T *&internal_value) -{ - ACE_UINT32 slot_index; - int result = this->next_free (slot_index); - - if (result == 0) - { - // Move from free list to occupied list - this->move_from_free_list_to_occupied_list (slot_index); - - // Reset the key. - this->search_structure_[slot_index].ext_id_.increment_slot_generation_count (); - this->search_structure_[slot_index].ext_id_.slot_index (slot_index); - - // Copy the key for the user. - key = this->search_structure_[slot_index].ext_id_; - - // This is where the user should place the value. - internal_value = &this->search_structure_[slot_index].int_id_; - - // Update the current size. - ++this->cur_size_; - } - - return result; -} - -template ACE_INLINE int -ACE_Active_Map_Manager::bind (const T &value, - ACE_Active_Map_Manager_Key &key) -{ - T *internal_value = 0; - int result = this->bind (key, - internal_value); - - if (result == 0) - { - // Store new value. - *internal_value = value; - } - - return result; -} - -template ACE_INLINE int -ACE_Active_Map_Manager::bind (const T &value) -{ - ACE_Active_Map_Manager_Key key; - return this->bind (value, key); -} - -template ACE_INLINE int -ACE_Active_Map_Manager::find (const ACE_Active_Map_Manager_Key &key, - T *&internal_value) const -{ - ACE_UINT32 slot_index = key.slot_index (); - ACE_UINT32 slot_generation = key.slot_generation (); - - if (slot_index > this->total_size_ || -#if defined (ACE_HAS_LAZY_MAP_MANAGER) - this->search_structure_[slot_index].free_ || -#endif /* ACE_HAS_LAZY_MAP_MANAGER */ - this->search_structure_[slot_index].ext_id_.slot_generation () != slot_generation || - this->search_structure_[slot_index].ext_id_.slot_index () == - (ACE_UINT32)this->free_list_id ()) - { - return -1; - } - else - { - // This is where the user value is. - internal_value = &this->search_structure_[slot_index].int_id_; - } - - return 0; -} - -template ACE_INLINE int -ACE_Active_Map_Manager::find (const ACE_Active_Map_Manager_Key &key) const -{ - T *internal_value = 0; - return this->find (key, - internal_value); -} - -template ACE_INLINE int -ACE_Active_Map_Manager::find (const ACE_Active_Map_Manager_Key &key, - T &value) const -{ - T *internal_value = 0; - int result = this->find (key, - internal_value); - - if (result == 0) - value = *internal_value; - - return result; -} - -template ACE_INLINE int -ACE_Active_Map_Manager::rebind (const ACE_Active_Map_Manager_Key &key, - const T &value) -{ - int result = this->find (key); - - if (result == 0) - { - // Store new value. - this->search_structure_[key.slot_index ()].int_id_ = value; - } - - return result; -} - -template ACE_INLINE int -ACE_Active_Map_Manager::rebind (const ACE_Active_Map_Manager_Key &key, - const T &value, - T &old_value) -{ - int result = this->find (key); - - if (result == 0) - { - // Copy old value. - old_value = this->search_structure_[key.slot_index ()].int_id_; - - // Store new value. - this->search_structure_[key.slot_index ()].int_id_ = value; - } - - return result; -} - -template ACE_INLINE int -ACE_Active_Map_Manager::rebind (const ACE_Active_Map_Manager_Key &key, - const T &value, - ACE_Active_Map_Manager_Key &old_key, - T &old_value) -{ - int result = this->find (key); - - if (result == 0) - { - // Copy old key. - old_key = this->search_structure_[key.slot_index ()].ext_id_; - - // Copy old value. - old_value = this->search_structure_[key.slot_index ()].int_id_; - - // Store new value. - this->search_structure_[key.slot_index ()].int_id_ = value; - } - - return result; -} - -template ACE_INLINE int -ACE_Active_Map_Manager::unbind (const ACE_Active_Map_Manager_Key &key, - T *&internal_value) -{ - int result = this->find (key, - internal_value); - - if (result == 0) - { - ACE_UINT32 slot_index = key.slot_index (); - -#if defined (ACE_HAS_LAZY_MAP_MANAGER) - - // - // In the case of lazy map managers, the movement of free slots - // from the occupied list to the free list is delayed until we - // run out of free slots in the free list. - // - - this->search_structure_[slot_index].free_ = 1; - -#else - - // Move from occupied list to free list. - this->move_from_occupied_list_to_free_list (slot_index); - -#endif /* ACE_HAS_LAZY_MAP_MANAGER */ - - // Reset the slot_index. This will tell us that this entry is free. - this->search_structure_[slot_index].ext_id_.slot_index (this->free_list_id ()); - - // Update the current size. - --this->cur_size_; - } - - return result; -} - -template ACE_INLINE int -ACE_Active_Map_Manager::unbind (const ACE_Active_Map_Manager_Key &key, - T &value) -{ - T *internal_value; - int result = this->unbind (key, - internal_value); - - if (result == 0) - { - // Copy old value. - value = *internal_value; - } - - return result; -} - -template ACE_INLINE int -ACE_Active_Map_Manager::unbind (const ACE_Active_Map_Manager_Key &key) -{ - T *internal_value; - return this->unbind (key, - internal_value); -} - -template ACE_INLINE -ACE_Active_Map_Manager::ACE_Active_Map_Manager (ACE_Allocator *alloc) - : ACE_AMM_BASE (alloc) -{ -} - -template ACE_INLINE -ACE_Active_Map_Manager::ACE_Active_Map_Manager (size_t size, - ACE_Allocator *alloc) - : ACE_AMM_BASE (size, - alloc) -{ -} - -template ACE_INLINE -ACE_Active_Map_Manager::~ACE_Active_Map_Manager (void) -{ -} - -template ACE_INLINE int -ACE_Active_Map_Manager::open (size_t length, - ACE_Allocator *alloc) -{ - return ACE_AMM_BASE::open (length, alloc); -} - -template ACE_INLINE int -ACE_Active_Map_Manager::close (void) -{ - return ACE_AMM_BASE::close (); -} - -template ACE_INLINE size_t -ACE_Active_Map_Manager::current_size (void) const -{ - return ACE_AMM_BASE::current_size (); -} - -template ACE_INLINE size_t -ACE_Active_Map_Manager::total_size (void) const -{ - return ACE_AMM_BASE::total_size (); -} - -/* static */ -template ACE_INLINE const ACE_Active_Map_Manager_Key -ACE_Active_Map_Manager::npos (void) -{ - return ACE_Active_Map_Manager_Key (~0, ~0); -} - -template ACE_INLINE void -ACE_Active_Map_Manager::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_AMM_BASE::dump (); -#endif /* ACE_HAS_DUMP */ -} - -template ACE_Map_Iterator -ACE_Active_Map_Manager::begin (void) -{ - return ACE_AMM_BASE::begin (); -} - -template ACE_INLINE ACE_Map_Iterator -ACE_Active_Map_Manager::end (void) -{ - return ACE_AMM_BASE::end (); -} - -template ACE_INLINE ACE_Map_Reverse_Iterator -ACE_Active_Map_Manager::rbegin (void) -{ - return ACE_AMM_BASE::rbegin (); -} - -template ACE_INLINE ACE_Map_Reverse_Iterator -ACE_Active_Map_Manager::rend (void) -{ - return ACE_AMM_BASE::rend (); -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Addr.cpp b/modules/worldengine/deps/acelite/ace/Addr.cpp deleted file mode 100644 index dbf1a5c3bd..0000000000 --- a/modules/worldengine/deps/acelite/ace/Addr.cpp +++ /dev/null @@ -1,65 +0,0 @@ -#include "ace/Addr.h" - -#if !defined (__ACE_INLINE__) -#include "ace/Addr.inl" -#endif /* __ACE_INLINE__ */ - -#include "ace/Log_Category.h" -#include "ace/os_include/sys/os_socket.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -// Note: this object requires static construction and destruction. -/* static */ -const ACE_Addr ACE_Addr::sap_any (AF_ANY, -1); - -ACE_ALLOC_HOOK_DEFINE(ACE_Addr) - - -// Initializes instance variables. Note that 0 is an unspecified -// protocol family type... - -ACE_Addr::ACE_Addr (int type, int size) : - addr_type_ (type), - addr_size_ (size) -{ -} - -ACE_Addr::~ACE_Addr (void) -{ -} - -void * -ACE_Addr::get_addr (void) const -{ - return 0; -} - -void -ACE_Addr::set_addr (const void *, int) -{ -} - -// Initializes instance variables. - -void -ACE_Addr::base_set (int type, int size) -{ - this->addr_type_ = type; - this->addr_size_ = size; -} - -void -ACE_Addr::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_Addr::dump"); - - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("addr_type_ = %d"), this->addr_type_)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("\naddr_size_ = %d"), this->addr_size_)); - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Addr.h b/modules/worldengine/deps/acelite/ace/Addr.h deleted file mode 100644 index 6175fbb27b..0000000000 --- a/modules/worldengine/deps/acelite/ace/Addr.h +++ /dev/null @@ -1,101 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Addr.h - * - * @author Douglas C. Schmidt - */ -//============================================================================= - -#ifndef ACE_ADDR_H -#define ACE_ADDR_H - -#include /**/ "ace/pre.h" - -#include /**/ "ace/ACE_export.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_Addr - * - * @brief Defines the base class for the "address family independent" - * address format. - */ -class ACE_Export ACE_Addr -{ -public: - // = Initialization and termination methods. - /// Initializes instance variables. - ACE_Addr (int type = -1, int size = -1); - - /// Destructor. - virtual ~ACE_Addr (void); - - // = Get/set the size of the address. - - /// Return the size of the address. - int get_size (void) const; - - /// Sets the size of the address. - void set_size (int size); - - // = Get/set the type of the address. - - /// Get the type of the address. - int get_type (void) const; - - /// Set the type of the address. - void set_type (int type); - - /// Return a pointer to the address. - virtual void *get_addr (void) const; - - /// Set a pointer to the address. - virtual void set_addr (const void *, int len); - - // = Equality/inequality tests - /// Check for address equality. - bool operator == (const ACE_Addr &sap) const; - - /// Check for address inequality. - bool operator != (const ACE_Addr &sap) const; - - /// Initializes instance variables. - void base_set (int type, int size); - - /// Wild-card address. - static const ACE_Addr sap_any; - - /// Returns a hash value. This should be overwritten by a subclass - /// that can produce a better hash value. - virtual unsigned long hash (void) const; - - /// Dump the state of an object. - void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - -protected: - /// e.g., AF_UNIX, AF_INET, AF_SPIPE, etc. - int addr_type_; - - /// Number of bytes in the address. - int addr_size_; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/Addr.inl" -#endif /* __ACE_INLINE__ */ - -#include /**/ "ace/post.h" - -#endif /* ACE_ADDR_H */ diff --git a/modules/worldengine/deps/acelite/ace/Addr.inl b/modules/worldengine/deps/acelite/ace/Addr.inl deleted file mode 100644 index 0ff355eaeb..0000000000 --- a/modules/worldengine/deps/acelite/ace/Addr.inl +++ /dev/null @@ -1,57 +0,0 @@ -// -*- C++ -*- -// -// $Id: Addr.inl 87295 2009-11-02 14:45:59Z johnnyw $ - -// Return the address of the address. - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_INLINE bool -ACE_Addr::operator == (const ACE_Addr &sap) const -{ - return (sap.addr_type_ == this->addr_type_ && - sap.addr_size_ == this->addr_size_ ); -} - -ACE_INLINE bool -ACE_Addr::operator != (const ACE_Addr &sap) const -{ - return (sap.addr_type_ != this->addr_type_ || - sap.addr_size_ != this->addr_size_ ); -} - -/// Return the size of the address. -ACE_INLINE int -ACE_Addr::get_size (void) const -{ - return this->addr_size_; -} - -/// Sets the size of the address. -ACE_INLINE void -ACE_Addr::set_size (int size) -{ - this->addr_size_ = size; -} - -/// Return the type of the address. -ACE_INLINE int -ACE_Addr::get_type (void) const -{ - return this->addr_type_; -} - -/// Set the type of the address. -ACE_INLINE void -ACE_Addr::set_type (int type) -{ - this->addr_type_ = type; -} - -ACE_INLINE unsigned long -ACE_Addr::hash (void) const -{ - return 0; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Arg_Shifter.cpp b/modules/worldengine/deps/acelite/ace/Arg_Shifter.cpp deleted file mode 100644 index 6267860356..0000000000 --- a/modules/worldengine/deps/acelite/ace/Arg_Shifter.cpp +++ /dev/null @@ -1,226 +0,0 @@ -// $Id: Arg_Shifter.cpp 91286 2010-08-05 09:04:31Z johnnyw $ - -#ifndef ACE_ARG_SHIFTER_T_CPP -#define ACE_ARG_SHIFTER_T_CPP - -#include "ace/Arg_Shifter.h" -#include "ace/OS_NS_string.h" -#include "ace/OS_NS_strings.h" -#include "ace/OS_Errno.h" -#include "ace/OS_Memory.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -template -ACE_Arg_Shifter_T::ACE_Arg_Shifter_T (int& argc, - const CHAR_TYPE** argv, - const CHAR_TYPE** temp) - : argc_ (argc), - total_size_ (argc), - temp_ (temp), - argv_ (argv), - current_index_ (0), - back_ (argc - 1), - front_ (0) -{ - this->init (); -} - -template -ACE_Arg_Shifter_T::ACE_Arg_Shifter_T (int& argc, - CHAR_TYPE** argv, - CHAR_TYPE** temp) - : argc_ (argc), - total_size_ (argc), - temp_ ((const CHAR_TYPE **) temp), - argv_ ((const CHAR_TYPE **) argv), - current_index_ (0), - back_ (argc - 1), - front_ (0) -{ - this->init (); -} - -template -void -ACE_Arg_Shifter_T::init (void) -{ - // If not provided with one, allocate a temporary array. - if (this->temp_ == 0) - ACE_NEW (this->temp_, - const CHAR_TYPE *[this->total_size_]); - - if (this->temp_ != 0) - { - // Fill the temporary array. - this->argc_ = 0; - for (int i = 0; i < this->total_size_; i++) - { - this->temp_[i] = this->argv_[i]; - this->argv_[i] = 0; - } - } - else - { - // Allocation failed, prohibit iteration. - this->current_index_ = this->argc_; - this->front_ = this->argc_; - } -} - -template -ACE_Arg_Shifter_T::~ACE_Arg_Shifter_T (void) -{ - // Delete the temporary vector. - delete [] temp_; -} - -template -const CHAR_TYPE * -ACE_Arg_Shifter_T::get_current (void) const -{ - const CHAR_TYPE * retval = 0; - - if (this->is_anything_left ()) - retval = this->temp_[current_index_]; - - return retval; -} - -template -const CHAR_TYPE * -ACE_Arg_Shifter_T::get_the_parameter (const CHAR_TYPE *flag) -{ - // the return 0's abound because this method - // would otherwise be a deep if { } else { } - - // check to see if any arguments still exist - if (!this->is_anything_left()) - return 0; - - // check to see if the flag is the argument - int const offset = this->cur_arg_strncasecmp (flag); - if (offset == -1) - return 0; - - if (offset == 0) - { - this->consume_arg (); - - if (!this->is_parameter_next()) - { - return 0; - } - } - // the parameter is in the middle somewhere... - return this->temp_[current_index_] + offset; -} - -template -int -ACE_Arg_Shifter_T::cur_arg_strncasecmp (const CHAR_TYPE *flag) -{ - // Check for a current argument - if (this->is_anything_left()) - { - size_t const flag_length = ACE_OS::strlen (flag); - - // Check for presence of the flag - if (ACE_OS::strncasecmp(this->temp_[current_index_], - flag, - flag_length) == 0) - { - if (ACE_OS::strlen(temp_[current_index_]) == flag_length) - { - // match and lengths are equal - return 0; - } - else - { - // matches, with more info to boot! - size_t const remaining = ACE_OS::strspn - (this->temp_[current_index_] + flag_length, - ACE_TEXT (" ")) + flag_length; - return static_cast (remaining); - } - } - } - // failure - return -1; -} - -template -int -ACE_Arg_Shifter_T::consume_arg (int number) -{ - int retval = 0; - - // Stick knowns at the end of the vector (consumed). - if (this->is_anything_left() >= number) - { - for (int i = 0, j = this->back_ - (number - 1); - i < number; - ++i, ++j, ++this->current_index_) - this->argv_[j] = this->temp_[this->current_index_]; - - this->back_ -= number; - retval = 1; - } - - return retval; -} - -template -int -ACE_Arg_Shifter_T::ignore_arg (int number) -{ - int retval = 0; - - // Keep unknowns at the head of the vector. - if (this->is_anything_left () >= number) - { - for (int i = 0; - i < number; - i++, this->current_index_++, this->front_++) - this->argv_[this->front_] = this->temp_[this->current_index_]; - - retval = 1; - this->argc_ += number; - } - - return retval; -} - -template -int -ACE_Arg_Shifter_T::is_anything_left (void) const -{ - return this->total_size_ - this->current_index_; -} - -template -int -ACE_Arg_Shifter_T::is_option_next (void) const -{ - return this->is_anything_left () && - this->temp_[this->current_index_][0] == '-'; -} - -template -int -ACE_Arg_Shifter_T::is_parameter_next (void) const -{ - return this->is_anything_left () - && this->temp_[this->current_index_][0] != '-'; -} - -template -int -ACE_Arg_Shifter_T::num_ignored_args (void) const -{ - return this->front_; -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_ATOMIC_OP_T_CPP */ diff --git a/modules/worldengine/deps/acelite/ace/Arg_Shifter.h b/modules/worldengine/deps/acelite/ace/Arg_Shifter.h deleted file mode 100644 index 123a70560c..0000000000 --- a/modules/worldengine/deps/acelite/ace/Arg_Shifter.h +++ /dev/null @@ -1,234 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Arg_Shifter.h - * - * $Id: Arg_Shifter.h 95972 2012-07-26 10:20:42Z johnnyw $ - * - * @author Seth Widoff - */ -//============================================================================= - -#ifndef ACE_ARG_SHIFTER_H -#define ACE_ARG_SHIFTER_H - -#include /**/ "ace/pre.h" - -#include /**/ "ace/ACE_export.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Global_Macros.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_Arg_Shifter_T - * - * @brief This ADT operates on a specified set of arguments (@a argv). - * As known arguments are scanned, they are shifted to the back of the - * @a argv vector, so deeper levels of argument parsing can locate the yet - * unprocessed arguments at the beginning of the vector. - * - * Nomenclature: - * argument - a member of the argv array - * option - an argument starting with '-' - * flag - synonym for "option" - * parameter value - an argument not starting with '-' - * parameter - synonym for "parameter value" - * - * The @c ACE_Arg_Shifter copies the pointers of the @a argv vector - * into a temporary array, emptying the original. As the @c ACE_Arg_Shifter - * iterates over the temporary array, it places known arguments in the rear - * of the original array and places the unknown ones in the beginning of the - * original array. It modifies argc to be the number of unknown arguments, - * so it looks to the caller as if the original array contains only unknown - * arguments. So, after @c ACE_Arg_Shifter has visited all the arguments - * in the temporary array, the original @a argv array appears to contain - * only the unknown arguments in their original order (but it actually has - * all the known arguments, too, beyond argc). - */ -template -class ACE_Arg_Shifter_T -{ -public: - // = Initialization and termination methods. - /** - * Initialize the ACE_Arg_Shifter to the vector over which to - * iterate. Optionally, also provide the temporary array for - * use in shifting the arguments. If ACE_Arg_Shifter must allocate - * the temporary vector internally and dynamic allocation fails, the - * ACE_Arg_Shifter will set all indicators to end of the vector, - * forbidding iteration. Following iteration over @a argv, the - * @a argc value will be updated to contain the number of - * unconsumed arguments. - * @param argc The number of strings in @a argv. @a argc will be - * updated to reflect the number of unconsumed arguments. - * @param argv The argument vector to shift. The string pointers in - * the vector will be reordered to place the @a argc unconsumed - * arguments at the front of the vector. - * @param temp A vector of @c CHAR_TYPE pointers at least @a argc - * elements long. The vector will be used for argument shifting as - * the specified @a argv vector is consumed. The vector must not - * be modified while this object exists. If this argument is 0 - * (the default) the object will allocate and free the temporary - * vector transparently. - */ - ACE_Arg_Shifter_T (int& argc, - const CHAR_TYPE **argv, - const CHAR_TYPE **temp = 0); - - /// Same behavior as the preceding constructor, but without the - /// "const" qualifier. - ACE_Arg_Shifter_T (int& argc, - CHAR_TYPE **argv, - CHAR_TYPE **temp = 0); - - /// Destructor. - ~ACE_Arg_Shifter_T (void); - - /// Get the current head of the vector. - const CHAR_TYPE *get_current (void) const; - - /** - * If the @a flag matches the current_arg of arg shifter - * this method will attempt to return the associated - * parameter value - * - * Safe to call without checking that a current arg exists - * - * In the following examples, a pointer to the char* "value" is ret - * - * eg: main -foobar value, main -FooBar value - * main -FOOBARvalue - * - * all of the above will all match the @a flag == -FooBar - * and will return a char* to "value" - * - * main -foobar 4 would succeed and return a char* to "4" - * main -foobar -4 does not succeed (-4 is not a parameter) - * but instead, would return 0 - * - * 0 is returned: - * If the current argument does not match flag - * If there is no parameter found after a 'matched' flag - * - * If the flag is matched and the flag and parameter DO NOT RUN - * together, the flag is consumed, the parameter is returned, - * and the new current argument is the parameter value. - * ie '-foobarflag VALUE' leaves the new cur arg == "VALUE" - * - * If the flag is matched and the flag and parameter RUN - * together '-foobarflagVALUE', the flag is NOT consumed - * and the cur arg is left pointing to the entire flag/value pair - */ - const CHAR_TYPE *get_the_parameter (const CHAR_TYPE* flag); - - /** - * Check if the current argument matches (case insensitive) @a flag - * - * ------------------------------------------------------------ - * - * Case A: Perfect Match (case insensitive) - * 0 is returned. - * - * ie: when current_arg = "-foobar" or "-FOOBAR" or "-fooBAR" - * this->cur_arg_strncasecmp ("-FooBar); - * will return 0 - * - * ------------------------------------------------------------ - * - * Case B: Perfect Match (case insensitive) but the current_arg - * is longer than the flag. Returns a number equal to the index - * in the char* indicating the start of the extra characters - * - * ie: when current_arg = "-foobar98023" - * this->cur_arg_strncasecmp ("-FooBar); - * will return 7 - * - * Notice: this number will always be > 0 - * - * ------------------------------------------------------------ - * - * Case C: If neither of Case A or B is met (no match) - * then -1 is returned - */ - int cur_arg_strncasecmp (const CHAR_TYPE *flag); - - /// Consume @a number argument(s) by sticking them/it on the end of - /// the vector. - int consume_arg (int number = 1); - - /// Place @a number arguments in the same relative order ahead of the - /// known arguments in the vector. - int ignore_arg (int number = 1); - - /// Returns the number of args left to see in the vector. - int is_anything_left (void) const; - - /// Returns 1 if there's a next item in the vector and it begins with - /// '-'. - int is_option_next (void) const; - - /// Returns 1 if there's a next item in the vector and it doesn't - /// begin with '-'. - int is_parameter_next (void) const; - - /// Returns the number of irrelevant args seen. - int num_ignored_args (void) const; - -private: - /// Copy Constructor should not be used. - ACE_UNIMPLEMENTED_FUNC (ACE_Arg_Shifter_T (const ACE_Arg_Shifter_T&)) - - /// Assignment '=' operator should not be used. - ACE_UNIMPLEMENTED_FUNC (ACE_Arg_Shifter_T operator= (const ACE_Arg_Shifter_T&)) - - /// Refactor the constructor logic. - void init (void); - - /// The size of the argument vector. - int& argc_; - - /// The size of argv_. - int total_size_; - - /// The temporary array over which we traverse. - const CHAR_TYPE **temp_; - - /// The array in which the arguments are reordered. - const CHAR_TYPE **argv_; - - /// The element in we're currently examining. - int current_index_; - - /// The index of in which we'll stick the next unknown - /// argument. - int back_; - - /// The index of in which we'll stick the next known - /// argument. - /** This is not really the "front" at all. It's the point after - * which the unknown arguments end and at which the known arguments begin. - */ - int front_; -}; - -typedef ACE_Arg_Shifter_T ACE_Arg_Shifter; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "ace/Arg_Shifter.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Arg_Shifter.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ - -#include /**/ "ace/post.h" - -#endif /* ACE_ARG_SHIFTER_H */ diff --git a/modules/worldengine/deps/acelite/ace/Argv_Type_Converter.cpp b/modules/worldengine/deps/acelite/ace/Argv_Type_Converter.cpp deleted file mode 100644 index 4c8e4fbb93..0000000000 --- a/modules/worldengine/deps/acelite/ace/Argv_Type_Converter.cpp +++ /dev/null @@ -1,190 +0,0 @@ -#include "ace/Argv_Type_Converter.h" - -#if !defined (__ACE_INLINE__) -#include "ace/Argv_Type_Converter.inl" -#endif /* __ACE_INLINE__ */ - -#include "ace/OS_NS_string.h" -#include "ace/OS_Errno.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -#if defined (ACE_USES_WCHAR) -ACE_Argv_Type_Converter::ACE_Argv_Type_Converter (int &argc, wchar_t** argv) - : saved_argc_ (argc), - char_argv_ (0), - wchar_argv_ (argv), - before_pass_argc_ (argc), - original_type_ (true), - wchar_passed_ (false), - char_passed_ (false) -{ - this->initialize (); - - for (int i = 0; i < argc; ++i) - this->char_argv_[i] = ACE_OS::strdup (ACE_TEXT_ALWAYS_CHAR (argv[i])); -} -#endif // ACE_USES_WCHAR - - -ACE_Argv_Type_Converter::ACE_Argv_Type_Converter (int &argc, char **argv) - : saved_argc_(argc), - char_argv_(argv) -#if defined (ACE_USES_WCHAR) - , wchar_argv_(0), - before_pass_argc_(argc), - original_type_(false), - wchar_passed_(false), - char_passed_(false) -{ - this->initialize(); - - for (int i = 0; i < argc; ++i) - this->wchar_argv_[i] = ACE_OS::strdup (ACE_TEXT_ANTI_TO_TCHAR (argv[i])); -} -#else -{ -} -#endif // ACE_USES_WCHAR - -ACE_Argv_Type_Converter::~ACE_Argv_Type_Converter (void) -{ -#if defined (ACE_USES_WCHAR) - // selectively delete the 'copy' of argv - if (this->original_type_) - { - // if original type is wchar_t - if (this->char_passed_) - this->align_wchar_with_char (); - - for (int i = 0; i < this->before_pass_argc_; ++i) - ACE_OS::free (this->char_argv_[i]); - - delete [] this->char_argv_; - } - else - { - // if original type is char - if (this->wchar_passed_) - this->align_char_with_wchar (); - - for (int i = 0; i < this->before_pass_argc_; ++i) - ACE_OS::free (this->wchar_argv_[i]); - - delete [] this->wchar_argv_; - } -#endif // ACE_USES_WCHAR -} - -#if defined (ACE_USES_WCHAR) -void -ACE_Argv_Type_Converter::initialize (void) -{ - if (this->original_type_) - { - // Make a copy of argv in 'char'. type Create one more argv entry - // than original argc for the NULL. - ACE_NEW (char_argv_, - char *[this->saved_argc_ + 1]); - this->char_argv_[saved_argc_] = 0; // last entry of argv is - // always a NULL - } - else - { - // make a copy of argv in 'wchar_t' type - ACE_NEW (this->wchar_argv_, - wchar_t*[this->saved_argc_ + 1]); - this->wchar_argv_[saved_argc_] = 0; - } -} - - -void -ACE_Argv_Type_Converter::align_char_with_wchar (void) -{ - for (int wchar_argv_index = 0; wchar_argv_index < this->saved_argc_; - ++wchar_argv_index) - { - wchar_t *match_argv = this->wchar_argv_[wchar_argv_index]; - // if n'th entries of both argv lists are different - if (ACE_OS::strcmp (this->char_argv_[wchar_argv_index], - ACE_TEXT_ALWAYS_CHAR (match_argv)) != 0) - { - // loop through the wchar argv list entries that are after - // wchar_argv_index - for (int i = wchar_argv_index + 1; i < before_pass_argc_; ++i) - { - if (ACE_OS::strcmp (this->char_argv_[i], - ACE_TEXT_ALWAYS_CHAR (match_argv)) == 0) - { - // swap the pointers in the char argv list - char *temp = this->char_argv_[wchar_argv_index]; - this->char_argv_[wchar_argv_index] = this->char_argv_[i]; - this->char_argv_[i] = temp; - break; - } - } - } - } - - this->cleanup (); -} - -void -ACE_Argv_Type_Converter::align_wchar_with_char (void) -{ - for (int char_argv_index = 0; char_argv_index < saved_argc_; - ++char_argv_index) - { - char* match_argv = this->char_argv_[char_argv_index]; - // if n'th entries of both argv lists are different - if (ACE_OS::strcmp ( - ACE_TEXT_ALWAYS_CHAR (this->wchar_argv_[char_argv_index]), - match_argv) != 0) - { - // loop through the wchar argv list entries that are after - // wchar_argv_index - for (int i = char_argv_index + 1; i < this->before_pass_argc_; ++i) - { - if (ACE_OS::strcmp ( - ACE_TEXT_ALWAYS_CHAR(this->wchar_argv_[i]), - match_argv) == 0) { - // swap the pointers in the char argv list - wchar_t* temp = this->wchar_argv_[char_argv_index]; - this->wchar_argv_[char_argv_index] = this->wchar_argv_[i]; - this->wchar_argv_[i] = temp; - break; - } - } - } - } - - this->cleanup(); -} - -void -ACE_Argv_Type_Converter::cleanup (void) -{ - for (int i = this->saved_argc_; i < this->before_pass_argc_; ++i) - { - // Check whether it's ours to delete. - if (original_type_) - { - ACE_OS::free (this->char_argv_[i]); - this->char_argv_[i] = 0; - } - else - { - ACE_OS::free (this->wchar_argv_[i]); - this->wchar_argv_[i] = 0; - } - } - - this->before_pass_argc_ = this->saved_argc_; - - this->wchar_passed_ = false; - this->char_passed_ = false; -} -#endif // ACE_USES_WCHAR - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Argv_Type_Converter.h b/modules/worldengine/deps/acelite/ace/Argv_Type_Converter.h deleted file mode 100644 index 9734a1de03..0000000000 --- a/modules/worldengine/deps/acelite/ace/Argv_Type_Converter.h +++ /dev/null @@ -1,117 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Argv_Type_Converter.h - * - * @author Si Mong Park - */ -//============================================================================= - -#ifndef ACE_ARGV_TYPE_CONVERTER_H -#define ACE_ARGV_TYPE_CONVERTER_H - -#include /**/ "ace/pre.h" - -#include /**/ "ace/ACE_export.h" -#include "ace/OS_Memory.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_Argv_Type_Converter - * - * @brief To convert 'char' input/command line parameter to 'wchar_t'. - * - * This class is to convert 'char' type command line parameter to - * wide-character (wchar_t) format and stores the copy of it. - * This is useful for all classes that use 'char**' argv but cannot - * be converted into 'ACE_TCHAR**' version. - * Note that the converted data will be lost upon destruction, so - * classes should use this class as their data member. - */ -class ACE_Export ACE_Argv_Type_Converter -{ -public: - - ACE_Argv_Type_Converter (int &argc, char** argv); - -#if defined (ACE_USES_WCHAR) - ACE_Argv_Type_Converter (int &argc, wchar_t** argv); -#endif // ACE_USES_WCHAR - - ~ACE_Argv_Type_Converter (void); - - /// Returns the pointer of converted command line. - ACE_TCHAR** get_TCHAR_argv (void); - - /// Returns the pointer of ASCII (char) command line. - char** get_ASCII_argv (void); - - /// Returns the number of sub parameters (argc). - int& get_argc (void); - -private: - - /// Copy Constructor should not be used. - ACE_Argv_Type_Converter (const ACE_Argv_Type_Converter&); - - /// Assignment '=' operator should not be used. - ACE_Argv_Type_Converter operator= (const ACE_Argv_Type_Converter&); - -#if defined (ACE_USES_WCHAR) - - /// Perform common initialization for two Ctor's. - void initialize (void); - - /// Align all entries in the char type argv list with wchar_t type - /// argv list. - void align_char_with_wchar (void); - - /// Align all entries in the wchar_t type argv list with char type - /// argv list. - void align_wchar_with_char (void); - - /// Clean up removed (consumed) argv entries and reset the pass flags. - void cleanup (void); -#endif // ACE_USES_WCHAR - -private: - /// Original number of input parameter, same as 'argc'. - int &saved_argc_; - - /// Data member pointer that contains converted argv in ACE_ANTI_TCHAR. - char** char_argv_; - -#if defined (ACE_USES_WCHAR) - /// Data member pointer that contains converted argv in ACE_TCHAR. - wchar_t** wchar_argv_; - - /// argc value before any argv has been passed. - int before_pass_argc_; - - /// false represents original argv passed in is char, and true - /// represents wchar_t. - bool const original_type_; - - /// true indicates wchar_t type argv has been passed. - bool wchar_passed_; - - /// true indicates char type argv has been passed. - bool char_passed_; -#endif /* ACE_USES_WCHAR */ -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/Argv_Type_Converter.inl" -#endif /* __ACE_INLINE__ */ - -#include /**/ "ace/post.h" - -#endif /* ACE_ARGV_TYPE_CONVERTER_H */ diff --git a/modules/worldengine/deps/acelite/ace/Argv_Type_Converter.inl b/modules/worldengine/deps/acelite/ace/Argv_Type_Converter.inl deleted file mode 100644 index 8c7bc89ca8..0000000000 --- a/modules/worldengine/deps/acelite/ace/Argv_Type_Converter.inl +++ /dev/null @@ -1,41 +0,0 @@ -// -*- C++ -*- -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_INLINE ACE_TCHAR** -ACE_Argv_Type_Converter::get_TCHAR_argv (void) -{ -#if defined (ACE_USES_WCHAR) - if (this->char_passed_) - { - this->align_wchar_with_char (); - } - - this->wchar_passed_ = true; - return this->wchar_argv_; -#else - return this->char_argv_; -#endif // ACE_USES_WCHAR -} - -ACE_INLINE char** -ACE_Argv_Type_Converter::get_ASCII_argv (void) -{ -#if defined (ACE_USES_WCHAR) - if (this->wchar_passed_) - { - this->align_char_with_wchar (); - } - - this->char_passed_ = true; -#endif // ACE_USES_WCHAR - - return this->char_argv_; -} - -ACE_INLINE int& -ACE_Argv_Type_Converter::get_argc (void) -{ - return this->saved_argc_; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Array_Base.cpp b/modules/worldengine/deps/acelite/ace/Array_Base.cpp deleted file mode 100644 index 830634f7bf..0000000000 --- a/modules/worldengine/deps/acelite/ace/Array_Base.cpp +++ /dev/null @@ -1,233 +0,0 @@ -#ifndef ACE_ARRAY_BASE_CPP -#define ACE_ARRAY_BASE_CPP - -#include "ace/Array_Base.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#if !defined (__ACE_INLINE__) -#include "ace/Array_Base.inl" -#endif /* __ACE_INLINE__ */ - -#include "ace/Malloc_Base.h" -#include "ace/os_include/os_errno.h" - -#include - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -// Dynamically initialize an array. -template -ACE_Array_Base::ACE_Array_Base (typename ACE_Array_Base::size_type size, - ACE_Allocator *alloc) - : max_size_ (size), - cur_size_ (size), - allocator_ (alloc) -{ - if (this->allocator_ == 0) - this->allocator_ = ACE_Allocator::instance (); - - if (size != 0) - { - ACE_ALLOCATOR (this->array_, - (T *) this->allocator_->malloc (size * sizeof (T))); - for (size_type i = 0; i < size; ++i) - new (&array_[i]) T; - } - else - this->array_ = 0; -} - -template -ACE_Array_Base::ACE_Array_Base (typename ACE_Array_Base::size_type size, - const T &default_value, - ACE_Allocator *alloc) - : max_size_ (size), - cur_size_ (size), - allocator_ (alloc) -{ - if (this->allocator_ == 0) - this->allocator_ = ACE_Allocator::instance (); - - if (size != 0) - { - ACE_ALLOCATOR (this->array_, - (T *) this->allocator_->malloc (size * sizeof (T))); - for (size_type i = 0; i < size; ++i) - new (&array_[i]) T (default_value); - } - else - this->array_ = 0; -} - -// The copy constructor (performs initialization). - -template -ACE_Array_Base::ACE_Array_Base (const ACE_Array_Base &s) - : max_size_ (s.size ()), - cur_size_ (s.size ()), - allocator_ (s.allocator_) -{ - if (this->allocator_ == 0) - this->allocator_ = ACE_Allocator::instance (); - - ACE_ALLOCATOR (this->array_, - (T *) this->allocator_->malloc (s.size () * sizeof (T))); - for (size_type i = 0; i < this->size (); ++i) - new (&this->array_[i]) T (s.array_[i]); -} - -// Assignment operator (performs assignment). - -template void -ACE_Array_Base::operator= (const ACE_Array_Base &s) -{ - // Check for "self-assignment". - - if (this != &s) - { - if (this->max_size_ < s.size ()) - { - // Need to reallocate memory. - - // Strongly exception-safe assignment. - // - // Note that we're swapping the allocators here, too. - // Should we? Probably. "*this" should be a duplicate of - // the "right hand side". - ACE_Array_Base tmp (s); - this->swap (tmp); - } - else - { - // Underlying array is large enough. No need to reallocate - // memory. - // - // "*this" still owns the memory for the underlying array. - // Do not swap out the allocator. - // - // @@ Why don't we just drop the explicit destructor and - // placement operator new() calls with a straight - // element-by-element assignment? Is the existing - // approach more efficient? - // -Ossama - - ACE_DES_ARRAY_NOFREE (this->array_, - s.size (), - T); - - this->cur_size_ = s.size (); - - for (size_type i = 0; i < this->size (); ++i) - new (&this->array_[i]) T (s.array_[i]); - } - } -} - -// Set an item in the array at location slot. - -template int -ACE_Array_Base::set (const T &new_item, - typename ACE_Array_Base::size_type slot) -{ - if (this->in_range (slot)) - { - this->array_[slot] = new_item; - return 0; - } - else - return -1; -} - -// Get an item in the array at location slot. - -template int -ACE_Array_Base::get (T &item, - typename ACE_Array_Base::size_type slot) const -{ - if (this->in_range (slot)) - { - // Copies the item. If you don't want to copy, use operator [] - // instead (but then you'll be responsible for range checking). - item = this->array_[slot]; - return 0; - } - else - return -1; -} - -template int -ACE_Array_Base::max_size (typename ACE_Array_Base::size_type new_size) -{ - if (new_size > this->max_size_) - { - T *tmp = 0; - - ACE_ALLOCATOR_RETURN (tmp, - (T *) this->allocator_->malloc (new_size * sizeof (T)), - -1); - for (size_type i = 0; i < this->cur_size_; ++i) - new (&tmp[i]) T (this->array_[i]); - - // Initialize the new portion of the array that exceeds the - // previously allocated section. - for (size_type j = this->cur_size_; j < new_size; ++j) - new (&tmp[j]) T; - - ACE_DES_ARRAY_FREE (this->array_, - this->max_size_, - this->allocator_->free, - T); - this->array_ = tmp; - this->max_size_ = new_size; - this->cur_size_ = new_size; - } - - return 0; -} - -template int -ACE_Array_Base::size (typename ACE_Array_Base::size_type new_size) -{ - int const r = this->max_size (new_size); - - if (r == 0) - this->cur_size_ = new_size; - - return r; -} - -template -void -ACE_Array_Base::swap (ACE_Array_Base & rhs) -{ - std::swap (this->max_size_ , rhs.max_size_); - std::swap (this->cur_size_ , rhs.cur_size_); - std::swap (this->array_ , rhs.array_); - std::swap (this->allocator_, rhs.allocator_); -} - -// **************************************************************** - -template int -ACE_Array_Iterator::next (T *&item) -{ - // ACE_TRACE ("ACE_Array_Iterator::next"); - - if (this->done ()) - { - item = 0; - return 0; - } - else - { - item = &array_[current_]; - return 1; - } -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_ARRAY_BASE_CPP */ diff --git a/modules/worldengine/deps/acelite/ace/Array_Base.h b/modules/worldengine/deps/acelite/ace/Array_Base.h deleted file mode 100644 index 4fafa4bb83..0000000000 --- a/modules/worldengine/deps/acelite/ace/Array_Base.h +++ /dev/null @@ -1,254 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Array_Base.h - * - * @author Douglas C. Schmidt - */ -//============================================================================= - -#ifndef ACE_ARRAY_BASE_H -#define ACE_ARRAY_BASE_H - -#include /**/ "ace/pre.h" - -#include /**/ "ace/config-all.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Global_Macros.h" -#include "ace/Malloc_Base.h" -#include /* For reverse_iterator adapters */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -// Forward declaration. -template class ACE_Array_Iterator; - -/** - * @class ACE_Array_Base - * - * @brief Implement a simple dynamic array - * - * This parametric class implements a simple dynamic array; - * resizing must be controlled by the user. No comparison or find - * operations are implemented. - */ -template -class ACE_Array_Base -{ -public: - - // Old/ACE-style traits. - typedef T TYPE; - typedef ACE_Array_Iterator ITERATOR; - - // STL-style typedefs/traits. - typedef T value_type; - typedef value_type * iterator; - typedef value_type const * const_iterator; - typedef value_type & reference; - typedef value_type const & const_reference; - typedef value_type * pointer; - typedef value_type const * const_pointer; - typedef ptrdiff_t difference_type; - typedef ACE_Allocator::size_type size_type; - - ACE_DECLARE_STL_REVERSE_ITERATORS - - // = Initialization and termination methods. - - /// Dynamically create an uninitialized array. - ACE_Array_Base (size_type size = 0, - ACE_Allocator * the_allocator = 0); - - /// Dynamically initialize the entire array to the @a default_value. - ACE_Array_Base (size_type size, - T const & default_value, - ACE_Allocator * the_allocator = 0); - - /** - * The copy constructor performs initialization by making an exact - * copy of the contents of parameter @a s, i.e., *this == s will - * return true. - */ - ACE_Array_Base (ACE_Array_Base const & s); - - /** - * Assignment operator performs an assignment by making an exact - * copy of the contents of parameter @a s, i.e., *this == s will - * return true. Note that if the of is >= than - * we can copy it without reallocating. However, if - * is < we must delete the , - * reallocate a new , and then copy the contents of . - */ - void operator= (ACE_Array_Base const & s); - - /// Clean up the array (e.g., delete dynamically allocated memory). - ~ACE_Array_Base (void); - - // = Set/get methods. - - /// Set item in the array at location @a slot. Doesn't - /// perform range checking. - T & operator[] (size_type slot); - - /// Get item in the array at location @a slot. Doesn't - /// perform range checking. - T const & operator[] (size_type slot) const; - - /// Set an item in the array at location @a slot. Returns - /// -1 if @a slot is not in range, else returns 0. - int set (T const & new_item, size_type slot); - - /** - * Get an item in the array at location @a slot. Returns -1 if - * @a slot is not in range, else returns 0. Note that this function - * copies the item. If you want to avoid the copy, you can use - * the const operator [], but then you'll be responsible for range checking. - */ - int get (T & item, size_type slot) const; - - /// Returns the of the array. - size_type size (void) const; - - /** - * Changes the size of the array to match @a new_size. - * It copies the old contents into the new array. - * Return -1 on failure. - */ - int size (size_type new_size); - - /// Returns the of the array. - size_type max_size (void) const; - - /** - * Changes the size of the array to match @a new_size. - * It copies the old contents into the new array. - * Return -1 on failure. - * It does not affect new_size - */ - int max_size (size_type new_size); - - /** - * @name Forward Iterator Accessors - * - * Forward iterator accessors. - */ - //@{ - iterator begin (void); - iterator end (void); - const_iterator begin (void) const; - const_iterator end (void) const; - //@} - - /** - * @name Reverse Iterator Accessors - * - * Reverse iterator accessors. - */ - //@{ - reverse_iterator rbegin (void); - reverse_iterator rend (void); - const_reverse_iterator rbegin (void) const; - const_reverse_iterator rend (void) const; - //@} - - /// Swap the contents of this array with the given @a array in - /// an exception-safe manner. - void swap (ACE_Array_Base & array); - -protected: - - /// Returns 1 if @a slot is within range, i.e., 0 >= @a slot < - /// @c cur_size_, else returns 0. - bool in_range (size_type slot) const; - - /// Maximum size of the array, i.e., the total number of @c T elements - /// in @c array_. - size_type max_size_; - - /** - * Current size of the array. This starts out being == to - * . However, if we are assigned a smaller array, then - * will become less than . The purpose of - * keeping track of both sizes is to avoid reallocating memory if we - * don't have to. - */ - size_type cur_size_; - - /// Pointer to the array's storage buffer. - value_type * array_; - - /// Allocation strategy of the ACE_Array_Base. - ACE_Allocator * allocator_; - - friend class ACE_Array_Iterator; -}; - -// **************************************************************** - -/** - * @class ACE_Array_Iterator - * - * @brief Implement an iterator over an ACE_Array. - * - * This iterator is safe in the face of array element deletions. - * But it is NOT safe if the array is resized (via the ACE_Array - * assignment operator) during iteration. That would be very - * odd, and dangerous. - */ -template -class ACE_Array_Iterator -{ -public: - // = Initialization method. - ACE_Array_Iterator (ACE_Array_Base &); - - // = Iteration methods. - - /// Pass back the @a next_item that hasn't been seen in the Array. - /// Returns 0 when all items have been seen, else 1. - int next (T *&next_item); - - /// Move forward by one element in the Array. Returns 0 when all the - /// items in the Array have been seen, else 1. - int advance (void); - - /// Returns 1 when all items have been seen, else 0. - int done (void) const; - - /// Dump the state of an object. - void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - -private: - /// Pointer to the current item in the iteration. - size_t current_; - - /// Pointer to the Array we're iterating over. - ACE_Array_Base &array_; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/Array_Base.inl" -#endif /* __ACE_INLINE__ */ - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "ace/Array_Base.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Array_Base.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ - -#include /**/ "ace/post.h" - -#endif /* ACE_ARRAY_BASE_H */ diff --git a/modules/worldengine/deps/acelite/ace/Array_Base.inl b/modules/worldengine/deps/acelite/ace/Array_Base.inl deleted file mode 100644 index ccd367f2d9..0000000000 --- a/modules/worldengine/deps/acelite/ace/Array_Base.inl +++ /dev/null @@ -1,143 +0,0 @@ -// -*- C++ -*- -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -// Clean up the array (e.g., delete dynamically allocated memory). -template ACE_INLINE -ACE_Array_Base::~ACE_Array_Base (void) -{ - ACE_DES_ARRAY_FREE (this->array_, - this->max_size_, - this->allocator_->free, - T); -} - -template -ACE_INLINE typename ACE_Array_Base::iterator -ACE_Array_Base::begin (void) -{ - return this->array_; -} - -template -ACE_INLINE typename ACE_Array_Base::iterator -ACE_Array_Base::end (void) -{ - return this->array_ + this->cur_size_; -} - -template -ACE_INLINE typename ACE_Array_Base::const_iterator -ACE_Array_Base::begin (void) const -{ - return this->array_; -} - -template -ACE_INLINE typename ACE_Array_Base::const_iterator -ACE_Array_Base::end (void) const -{ - return this->array_ + this->cur_size_; -} - -template -ACE_INLINE typename ACE_Array_Base::reverse_iterator -ACE_Array_Base::rbegin (void) -{ - return reverse_iterator (this->end ()); -} - -template -ACE_INLINE typename ACE_Array_Base::reverse_iterator -ACE_Array_Base::rend (void) -{ - return reverse_iterator (this->begin ()); -} - -template -ACE_INLINE typename ACE_Array_Base::const_reverse_iterator -ACE_Array_Base::rbegin (void) const -{ - return const_reverse_iterator (this->end ()); -} - -template -ACE_INLINE typename ACE_Array_Base::const_reverse_iterator -ACE_Array_Base::rend (void) const -{ - return const_reverse_iterator (this->begin ()); -} - -template ACE_INLINE typename ACE_Array_Base::size_type -ACE_Array_Base::size (void) const -{ - return this->cur_size_; -} - -template ACE_INLINE typename ACE_Array_Base::size_type -ACE_Array_Base::max_size (void) const -{ - return this->max_size_; -} - -template ACE_INLINE bool -ACE_Array_Base::in_range (typename ACE_Array_Base::size_type index) const -{ - return index < this->cur_size_; -} - -template ACE_INLINE T & -ACE_Array_Base::operator[] (typename ACE_Array_Base::size_type index) -{ - return this->array_[index]; -} - -template ACE_INLINE const T & -ACE_Array_Base::operator[] (typename ACE_Array_Base::size_type index) const -{ - return this->array_[index]; -} - -// **************************************************************** - -template ACE_INLINE void -ACE_Array_Iterator::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - // ACE_TRACE ("ACE_Array_Iterator::dump"); -#endif /* ACE_HAS_DUMP */ -} - -template ACE_INLINE -ACE_Array_Iterator::ACE_Array_Iterator (ACE_Array_Base &a) - : current_ (0), - array_ (a) -{ - // ACE_TRACE ("ACE_Array_Iterator::ACE_Array_Iterator"); -} - -template ACE_INLINE int -ACE_Array_Iterator::advance (void) -{ - // ACE_TRACE ("ACE_Array_Iterator::advance"); - - if (this->current_ < array_.size ()) - { - ++this->current_; - return 1; - } - else - { - // Already finished iterating. - return 0; - } -} - -template ACE_INLINE int -ACE_Array_Iterator::done (void) const -{ - ACE_TRACE ("ACE_Array_Iterator::done"); - - return this->current_ >= array_.size (); -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Array_Map.cpp b/modules/worldengine/deps/acelite/ace/Array_Map.cpp deleted file mode 100644 index 219144e829..0000000000 --- a/modules/worldengine/deps/acelite/ace/Array_Map.cpp +++ /dev/null @@ -1,260 +0,0 @@ -#ifndef ACE_ARRAY_MAP_CPP -#define ACE_ARRAY_MAP_CPP - -#include "ace/Array_Map.h" - -#ifndef __ACE_INLINE__ -# include "ace/Array_Map.inl" -#endif /* !__ACE_INLINE__ */ - -#include "ace/checked_iterator.h" - -#include - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -template -template -ACE_Array_Map::ACE_Array_Map (InputIterator f, - InputIterator l) - : size_ (l - f) - , capacity_ (size_) - , nodes_ (size_ == 0 ? 0 : new value_type[size_]) -{ - (void) std::copy (f, - l, - ACE_make_checked_array_iterator (this->begin (), - this->size_)); - -// iterator n = this->begin (); - -// for (InputIterator i = f; i != l; ++i, ++n) -// *n = *i; -} - -template -ACE_Array_Map::ACE_Array_Map ( - ACE_Array_Map const & map) - : size_ (map.size_) - , capacity_ (map.size_) - , nodes_ (size_ == 0 ? 0 : new value_type[size_]) -{ - std::copy (map.begin (), - map.end (), - ACE_make_checked_array_iterator (this->begin (), - this->size_)); - -// iterator f = map.begin (); -// iterator l = map.end (); -// iterator n = this->begin (); - -// for (iterator i = f; i != l; ++i, ++n) -// *n = *i; -} - -template -ACE_Array_Map::~ACE_Array_Map (void) -{ - delete[] this->nodes_; -} - -template -void -ACE_Array_Map::swap ( - ACE_Array_Map & map) -{ - std::swap (this->size_, map.size_); - std::swap (this->capacity_, map.capacity_); - std::swap (this->nodes_, map.nodes_); -} - -template -std::pair::iterator, bool> -ACE_Array_Map::insert ( - typename ACE_Array_Map::value_type const & x) -{ - // Linear insertion due to linear duplicate key search. - - bool inserted = false; - iterator i = this->find (x.first); - - if (i == this->end ()) - { - // Add the element to the array. - - size_type const old_size = this->size (); - this->grow (1); // Increase size by at least one. - - i = this->begin () + old_size; - *i = x; - - ++this->size_; - - inserted = true; - } - - return std::make_pair (i, inserted); -} - -template -template -void -ACE_Array_Map::insert (InputIterator f, InputIterator l) -{ - this->grow (l - f); // Preallocate storage. - - for (InputIterator i = f; i != l; ++i) - { - (void) this->insert (*i); - } -} - -template -void -ACE_Array_Map::erase ( - typename ACE_Array_Map::iterator pos) -{ - iterator const first = this->begin (); - iterator const last = this->end (); - - if (pos >= first && pos < last) - { - if (pos != last - 1) - { - // Relocate the tail element to the location of the erased - // element to prevent introduction of "holes" in the - // underlying array. - *pos = *(last - 1); - } - - // Explicitly destroy the tail element by assigning a default - // constructed instance to it. Note that this also works for - // the case of a map of size 1. - *(last - 1) = value_type (); - - --this->size_; - } -} - -template -typename ACE_Array_Map::size_type -ACE_Array_Map::erase ( - typename ACE_Array_Map::key_type const & k) -{ - iterator pos = this->find (k); - - size_type const old_size = this->size_; - - this->erase (pos); - - return old_size - this->size_; -} - -template -void -ACE_Array_Map::erase ( - typename ACE_Array_Map::iterator first, - typename ACE_Array_Map::iterator last) -{ - if (this->begin () <= first && first < last && last < this->end ()) - for (iterator i = first; i != last; ++i) - this->erase (i); -} - -template -void -ACE_Array_Map::clear (void) -{ - this->size_ = 0; // No need to deallocate array nor destroy elements. -} - -template -typename ACE_Array_Map::iterator -ACE_Array_Map::find ( - typename ACE_Array_Map::key_type const & k) -{ - iterator const the_end = this->end (); - - EqualTo eq; - - for (iterator i = this->begin (); i != the_end; ++i) - if (eq (k, i->first)) - return i; - - return this->end (); -} - -template -typename ACE_Array_Map::const_iterator -ACE_Array_Map::find ( - typename ACE_Array_Map::key_type const & k) const -{ - const_iterator const the_end = this->end (); - - EqualTo eq; - - for (const_iterator i = this->begin (); i != the_end; ++i) - if (eq (k, i->first)) - return i; - - return this->end (); -} - -template -void -ACE_Array_Map::grow ( - typename ACE_Array_Map::size_type s) -{ - if (this->size () + s > this->capacity_) - { - // This implementation focuses more on static footprint than - // speed. - - // Strongly exception safe. - - ACE_Array_Map temp (this->size () + s); - - std::copy (this->begin (), - this->end (), - ACE_make_checked_array_iterator (temp.begin (), - temp.capacity_)); - - size_type const n = this->size (); // Do not swap out the size - // since we bypassed the - // temporary map's element - // counting code. - this->swap (temp); - - this->size_ = n; - } -} - -// --------------------------------------------------------------- - -template -bool -operator== (ACE_Array_Map const & lhs, - ACE_Array_Map const & rhs) -{ - // Do not include Array_Map capacity in comparison. It isn't useful - // in this case. - - return (lhs.size () == rhs.size () - && std::equal (lhs.begin (), - lhs.end (), - ACE_make_checked_array_iterator (rhs.begin (), - rhs.size ()))); -} - -template -bool -operator< (ACE_Array_Map const & lhs, - ACE_Array_Map const & rhs) -{ - return std::lexicographical_compare (lhs.begin (), lhs.end (), - rhs.begin (), rhs.end ()); -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_ARRAY_MAP_CPP */ diff --git a/modules/worldengine/deps/acelite/ace/Array_Map.h b/modules/worldengine/deps/acelite/ace/Array_Map.h deleted file mode 100644 index 03830b52ce..0000000000 --- a/modules/worldengine/deps/acelite/ace/Array_Map.h +++ /dev/null @@ -1,289 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Array_Map.h - * - * Light weight array-based map with fast iteration but linear - * (i.e. O(n)) search times. STL-style interface is exposed. - * - * @note This class requires the STL generic algorithms and - * reverse_iterator adapter. - * - * @author Ossama Othman - */ -//============================================================================= - - -#ifndef ACE_ARRAY_MAP_H -#define ACE_ARRAY_MAP_H - -#include /**/ "ace/pre.h" - -#include /**/ "ace/config-lite.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include -#include -#include - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_Array_Map - * - * @brief Light weight array-based map with fast iteration, but linear - * (i.e. O(n)) search times. - * - * Map implementation that focuses on small footprint and fast - * iteration. Search times are, however, linear (O(n)) meaning that - * this map isn't suitable for large data sets that will be searched - * in performance critical areas of code. Iteration over large data - * sets, however, is faster than linked list-based maps, for example, - * since spatial locality is maximized through the use of contiguous - * arrays as the underlying storage. - * @par - * An @c ACE_Array_Map is a unique associative container, meaning that - * duplicate values may not be added to the map. It is also pair - * associative (value_type is a std::pair<>). It is not a sorted - * container. - * @par - * An STL @c std::map -like interface is exposed by this class - * portability. Furthermore, this map's iterators are compatible with - * STL algorithms. - * @par - * Requirements and Performance Characteristics - * - Internal Structure - * Array - * - Duplicates allowed? - * No - * - Random access allowed? - * Yes - * - Search speed - * O(n) - * - Insert/replace speed - * O(n), can be longer if the map has to resize - * - Iterator still valid after change to container? - * No - * - Frees memory for removed elements? - * Yes - * - Items inserted by - * Value - * - Requirements for key type - * -# Default constructor - * -# Copy constructor - * -# operator= - * -# operator== - * - Requirements for object type - * -# Default constructor - * -# Copy constructor - * -# operator= - */ -template > -class ACE_Array_Map -{ -public: - - // STL-style typedefs/traits. - typedef Key key_type; - typedef Value data_type; - typedef std::pair value_type; - typedef value_type * iterator; - typedef value_type const * const_iterator; - typedef value_type & reference; - typedef value_type const & const_reference; - typedef value_type * pointer; - typedef value_type const * const_pointer; - typedef ptrdiff_t difference_type; - typedef size_t size_type; - - ACE_DECLARE_STL_REVERSE_ITERATORS - - /// Default Constructor. - /** - * Create an empty map with a preallocated buffer of size @a s. - */ - ACE_Array_Map (size_type s = 0); - - template - ACE_Array_Map (InputIterator f, InputIterator l); - - ACE_Array_Map (ACE_Array_Map const & map); - ACE_Array_Map & operator= (ACE_Array_Map const & map); - - /// Destructor. - ~ACE_Array_Map (void); - - /** - * @name Forward Iterator Accessors - * - * Forward iterator accessors. - */ - //@{ - iterator begin (void); - iterator end (void); - const_iterator begin (void) const; - const_iterator end (void) const; - //@} - - /** - * @name Reverse Iterator Accessors - * - * Reverse iterator accessors. - */ - //@{ - reverse_iterator rbegin (void); - reverse_iterator rend (void); - const_reverse_iterator rbegin (void) const; - const_reverse_iterator rend (void) const; - //@} - - /// Return current size of map. - /** - * @return The number of elements in the map. - */ - size_type size (void) const; - - /// Maximum number of elements the map can hold. - size_type max_size (void) const; - - /// Return @c true if the map is empty, else @c false. - bool is_empty (void) const; // ACE style - - /** - * Return @c true if the map is empty, else @c false. We recommend - * using @c is_empty() instead since it's more consistent with the - * ACE container naming conventions. - */ - bool empty (void) const; // STL style - - /// Swap the contents of this map with the given @a map in an - /// exception-safe manner. - void swap (ACE_Array_Map & map); - - /// Insert the value @a x into the map. - /** - * STL-style map insertion method. - * - * @param x @c std::pair containing key and datum. - * - * @return @c std::pair::second will be @c false if the map already - * contains a value with the same key as @a x. - */ - std::pair insert (value_type const & x); - - /// Insert range of elements into map. - template - void insert (InputIterator f, InputIterator l); - - /// Remove element at position @a pos from the map. - void erase (iterator pos); - - /// Remove element corresponding to key @a k from the map. - /** - * @return Number of elements that were erased. - */ - size_type erase (key_type const & k); - - /// Remove range of elements [@a first, @a last) from the map. - /** - * @note [@a first, @a last) must be valid range within the map. - */ - void erase (iterator first, iterator last); - - /// Clear contents of map. - /** - * @note This a constant time (O(1)) operation. - */ - void clear (void); - - /** - * @name Search Operations - * - * Search the map for data corresponding to key @a k. - */ - //@{ - /** - * @return @c end() if data corresponding to key @a k is not in the - * map. - */ - iterator find (key_type const & k); - - /** - * @return @c end() if data corresponding to key @a k is not in the - * map. - */ - const_iterator find (key_type const & k) const; - //@} - - /// Count the number of elements corresponding to key @a k. - /** - * @return In the case of this map, the count will always be one if - * such exists in the map. - */ - size_type count (key_type const & k); - - /// Convenience array index operator. - /** - * Array index operator that allows insertion and retrieval of - * elements using an array index syntax, such as: - * @par - * map["Foo"] = 12; - */ - data_type & operator[] (key_type const & k); - -private: - - /// Increase size of underlying buffer by @a s. - void grow (size_type s); - -private: - - /// Number of elements in the map. - size_type size_; - - /// Current size of underlying array. - /** - * @note @c capacity_ is always greater than or equal to @c size_; - */ - size_type capacity_; - - /// Underlying array containing keys and data. - value_type * nodes_; - -}; - -// -------------------------------------------------------------- - -/// @c ACE_Array_Map equality operator. -template -bool operator== (ACE_Array_Map const & lhs, - ACE_Array_Map const & rhs); - -/// @c ACE_Array_Map lexicographical comparison operator. -template -bool operator< (ACE_Array_Map const & lhs, - ACE_Array_Map const & rhs); - -// -------------------------------------------------------------- - -ACE_END_VERSIONED_NAMESPACE_DECL - -#ifdef __ACE_INLINE__ -# include "ace/Array_Map.inl" -#endif /* __ACE_INLINE__ */ - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -# include "ace/Array_Map.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Array_Map.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ - -#include /**/ "ace/post.h" - -#endif /* ACE_ARRAY_MAP_H */ diff --git a/modules/worldengine/deps/acelite/ace/Array_Map.inl b/modules/worldengine/deps/acelite/ace/Array_Map.inl deleted file mode 100644 index c331fae801..0000000000 --- a/modules/worldengine/deps/acelite/ace/Array_Map.inl +++ /dev/null @@ -1,130 +0,0 @@ -// -*- C++ -*- -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -template -ACE_INLINE -ACE_Array_Map::ACE_Array_Map ( - typename ACE_Array_Map::size_type s) - : size_ (0) - , capacity_ (s) - , nodes_ (s == 0 ? 0 : new value_type[s]) -{ -} - -template -ACE_INLINE ACE_Array_Map & -ACE_Array_Map::operator= ( - ACE_Array_Map const & map) -{ - // Strongly exception-safe assignment. - - ACE_Array_Map temp (map); - this->swap (temp); - return *this; -} - -template -ACE_INLINE typename ACE_Array_Map::iterator -ACE_Array_Map::begin (void) -{ - return this->nodes_; -} - -template -ACE_INLINE typename ACE_Array_Map::iterator -ACE_Array_Map::end (void) -{ - return this->nodes_ + this->size_; -} - -template -ACE_INLINE typename ACE_Array_Map::const_iterator -ACE_Array_Map::begin (void) const -{ - return this->nodes_; -} - -template -ACE_INLINE typename ACE_Array_Map::const_iterator -ACE_Array_Map::end (void) const -{ - return this->nodes_ + this->size_; -} - -template -ACE_INLINE typename ACE_Array_Map::reverse_iterator -ACE_Array_Map::rbegin (void) -{ - return reverse_iterator (this->end ()); -} - -template -ACE_INLINE typename ACE_Array_Map::reverse_iterator -ACE_Array_Map::rend (void) -{ - return reverse_iterator (this->begin ()); -} - -template -ACE_INLINE typename ACE_Array_Map::const_reverse_iterator -ACE_Array_Map::rbegin (void) const -{ - return const_reverse_iterator (this->end ()); -} - -template -ACE_INLINE typename ACE_Array_Map::const_reverse_iterator -ACE_Array_Map::rend (void) const -{ - return const_reverse_iterator (this->begin ()); -} - -template -ACE_INLINE typename ACE_Array_Map::size_type -ACE_Array_Map::size (void) const -{ - return this->size_; -} - -template -ACE_INLINE typename ACE_Array_Map::size_type -ACE_Array_Map::max_size (void) const -{ - return size_type (-1) / sizeof (value_type); -} - -template -ACE_INLINE bool -ACE_Array_Map::is_empty (void) const -{ - return this->size_ == 0; -} - -// The following method is deprecated. - -template -ACE_INLINE bool -ACE_Array_Map::empty (void) const -{ - return this->is_empty (); -} - -template -ACE_INLINE typename ACE_Array_Map::size_type -ACE_Array_Map::count ( - typename ACE_Array_Map::key_type const & k) -{ - return - (this->find (k) == this->end () ? 0 : 1); // Only one datum per key. -} - -template -ACE_INLINE typename ACE_Array_Map::data_type & -ACE_Array_Map::operator[] ( - typename ACE_Array_Map::key_type const & k) -{ - iterator i = (this->insert (value_type (k, data_type ()))).first; - return (*i).second; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Assert.cpp b/modules/worldengine/deps/acelite/ace/Assert.cpp deleted file mode 100644 index 8578844904..0000000000 --- a/modules/worldengine/deps/acelite/ace/Assert.cpp +++ /dev/null @@ -1,20 +0,0 @@ -#include "ace/Assert.h" -#include "ace/Log_Category.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -// The following ASSERT macro is courtesy of Alexandre Karev -// . -void -__ace_assert(const char *file, int line, const ACE_TCHAR *expression) -{ - int error = ACE_Log_Msg::last_error_adapter (); - ACE_Log_Msg *log = ACE_Log_Msg::instance (); - - log->set (file, line, -1, error, log->restart (), - log->msg_ostream (), log->msg_callback ()); - - log->log (LM_ERROR, ACE_TEXT ("ACE_ASSERT: file %N, line %l assertion failed for '%s'.%a\n"), expression, -1); -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Assert.h b/modules/worldengine/deps/acelite/ace/Assert.h deleted file mode 100644 index 7732323f08..0000000000 --- a/modules/worldengine/deps/acelite/ace/Assert.h +++ /dev/null @@ -1,38 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Assert.h - * - * @author Douglas C. Schmidt - */ -//============================================================================= - -#ifndef ACE_ASSERT_H -#define ACE_ASSERT_H - -#include /**/ "ace/pre.h" - -#include /**/ "ace/ACE_export.h" - -#include /**/ "ace/config-all.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL -ACE_Export void __ace_assert(const char *file, int line, const ACE_TCHAR *expression); -ACE_END_VERSIONED_NAMESPACE_DECL - -#define ACE_TEST_ASSERT(X) \ - ((X) \ - ? static_cast(0) \ - : ACE_VERSIONED_NAMESPACE_NAME::__ace_assert(__FILE__, __LINE__, ACE_TEXT_CHAR_TO_TCHAR (#X))) - -#if defined (ACE_NDEBUG) -#define ACE_ASSERT(x) \ - (static_cast(0)) -#else -#define ACE_ASSERT(X) ACE_TEST_ASSERT(X) -#endif /* ACE_NDEBUG */ - -#include /**/ "ace/post.h" - -#endif /* ACE_ASSERT */ diff --git a/modules/worldengine/deps/acelite/ace/Asynch_Acceptor.cpp b/modules/worldengine/deps/acelite/ace/Asynch_Acceptor.cpp deleted file mode 100644 index c518c3a62f..0000000000 --- a/modules/worldengine/deps/acelite/ace/Asynch_Acceptor.cpp +++ /dev/null @@ -1,506 +0,0 @@ -/* -*- C++ -*- */ -#ifndef ACE_ASYNCH_ACCEPTOR_C -#define ACE_ASYNCH_ACCEPTOR_C - -#include "ace/Asynch_Acceptor.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#if defined (ACE_HAS_WIN32_OVERLAPPED_IO) || defined (ACE_HAS_AIO_CALLS) -// This only works on platforms that support async i/o. - -#include "ace/OS_Errno.h" -#include "ace/OS_Memory.h" -#include "ace/OS_NS_sys_socket.h" -#include "ace/Log_Category.h" -#include "ace/Message_Block.h" -#include "ace/INET_Addr.h" -#include "ace/SOCK_Stream.h" -#include "ace/Sock_Connect.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -template -ACE_Asynch_Acceptor::ACE_Asynch_Acceptor (void) - : listen_handle_ (ACE_INVALID_HANDLE), - pass_addresses_ (false), - validate_new_connection_ (false), - reissue_accept_ (1), - bytes_to_read_ (0), - addr_family_ (0) -{ -} - -template -ACE_Asynch_Acceptor::~ACE_Asynch_Acceptor (void) -{ - // Close down the listen socket - if (this->listen_handle_ != ACE_INVALID_HANDLE) - { - ACE_OS::closesocket (this->listen_handle_); - this->listen_handle_ = ACE_INVALID_HANDLE; - } -} - -template int -ACE_Asynch_Acceptor::open (const ACE_INET_Addr &address, - size_t bytes_to_read, - bool pass_addresses, - int backlog, - int reuse_addr, - ACE_Proactor *proactor, - bool validate_new_connection, - int reissue_accept, - int number_of_initial_accepts) -{ - ACE_TRACE ("ACE_Asynch_Acceptor<>::open"); - - this->proactor (proactor); - this->pass_addresses_ = pass_addresses; - this->bytes_to_read_ = bytes_to_read; - this->validate_new_connection_ = validate_new_connection; - this->reissue_accept_ = reissue_accept; - this->addr_family_ = address.get_type (); - - // Create the listener socket - this->listen_handle_ = ACE_OS::socket (address.get_type (), SOCK_STREAM, 0); - if (this->listen_handle_ == ACE_INVALID_HANDLE) - ACELIB_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("%p\n"), - ACE_TEXT ("ACE_OS::socket")), - -1); - // Initialize the ACE_Asynch_Accept - if (this->asynch_accept_.open (*this, - this->listen_handle_, - 0, - this->proactor ()) == -1) - { - ACE_Errno_Guard g (errno); - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("%p\n"), - ACE_TEXT ("ACE_Asynch_Accept::open"))); - ACE_OS::closesocket (this->listen_handle_); - this->listen_handle_ = ACE_INVALID_HANDLE; - return -1; - } - - if (reuse_addr) - { - // Reuse the address - int one = 1; - if (ACE_OS::setsockopt (this->listen_handle_, - SOL_SOCKET, - SO_REUSEADDR, - (const char*) &one, - sizeof one) == -1) - { - ACE_Errno_Guard g (errno); - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("%p\n"), - ACE_TEXT ("ACE_OS::setsockopt"))); - ACE_OS::closesocket (this->listen_handle_); - this->listen_handle_ = ACE_INVALID_HANDLE; - return -1; - } - } - - // If port is not specified, bind to any port. - static ACE_INET_Addr sa (ACE_sap_any_cast (const ACE_INET_Addr &)); - - if (address == sa && - ACE::bind_port (this->listen_handle_, - INADDR_ANY, - address.get_type()) == -1) - { - ACE_Errno_Guard g (errno); - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("%p\n"), - ACE_TEXT ("ACE::bind_port"))); - ACE_OS::closesocket (this->listen_handle_); - this->listen_handle_ = ACE_INVALID_HANDLE; - return -1; - } - - // Bind to the specified port. - if (ACE_OS::bind (this->listen_handle_, - reinterpret_cast (address.get_addr ()), - address.get_size ()) == -1) - { - ACE_Errno_Guard g (errno); - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("%p\n"), - ACE_TEXT ("ACE_OS::bind"))); - ACE_OS::closesocket (this->listen_handle_); - this->listen_handle_ = ACE_INVALID_HANDLE; - return -1; - } - - // Start listening. - if (ACE_OS::listen (this->listen_handle_, backlog) == -1) - { - ACE_Errno_Guard g (errno); - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("%p\n"), - ACE_TEXT ("ACE_OS::listen"))); - ACE_OS::closesocket (this->listen_handle_); - this->listen_handle_ = ACE_INVALID_HANDLE; - return -1; - } - - // For the number of . - if (number_of_initial_accepts == -1) - number_of_initial_accepts = backlog; - - for (int i = 0; i < number_of_initial_accepts; i++) - { - // Initiate accepts. - if (this->accept (bytes_to_read) == -1) - { - ACE_Errno_Guard g (errno); - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("%p\n"), - ACE_TEXT ("ACE_Asynch_Acceptor::accept"))); - ACE_OS::closesocket (this->listen_handle_); - this->listen_handle_ = ACE_INVALID_HANDLE; - return -1; - } - } - - return 0; -} - -template int -ACE_Asynch_Acceptor::set_handle (ACE_HANDLE listen_handle) -{ - ACE_TRACE ("ACE_Asynch_Acceptor<>::set_handle"); - - // Take ownership of the - this->listen_handle_ = listen_handle; - - // Reinitialize the ACE_Asynch_Accept - if (this->asynch_accept_.open (*this, - this->listen_handle_, - 0, - this->proactor ()) == -1) - ACELIB_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("%p\n"), - ACE_TEXT ("ACE_Asynch_Accept::open")), - -1); - return 0; -} - -template ACE_HANDLE -ACE_Asynch_Acceptor::get_handle (void) const -{ - return this->listen_handle_; -} - -template int -ACE_Asynch_Acceptor::accept (size_t bytes_to_read, const void *act) -{ - ACE_TRACE ("ACE_Asynch_Acceptor<>::accept"); - - ACE_Message_Block *message_block = 0; - // The space_needed calculation is drive by needs of Windows. POSIX doesn't - // need to extra 16 bytes, but it doesn't hurt. - size_t space_needed = sizeof (sockaddr_in) + 16; -#if defined (ACE_HAS_IPV6) - if (PF_INET6 == this->addr_family_) - space_needed = sizeof (sockaddr_in6) + 16; -#endif /* ACE_HAS_IPV6 */ - space_needed = (2 * space_needed) + bytes_to_read; - - // Create a new message block big enough for the addresses and data - ACE_NEW_RETURN (message_block, - ACE_Message_Block (space_needed), - -1); - - // Initiate asynchronous accepts - if (this->asynch_accept_.accept (*message_block, - bytes_to_read, - ACE_INVALID_HANDLE, - act, - 0, - ACE_SIGRTMIN, - this->addr_family_) == -1) - { - // Cleanup on error - message_block->release (); - return -1; - } - return 0; -} - -template void -ACE_Asynch_Acceptor::handle_accept (const ACE_Asynch_Accept::Result &result) -{ - ACE_TRACE ("ACE_Asynch_Acceptor<>::handle_accept"); - - // Variable for error tracking - int error = 0; - - // If the asynchronous accept fails. - if (!result.success () || result.accept_handle () == ACE_INVALID_HANDLE) - { - error = 1; - } - -#if defined (ACE_WIN32) - // In order to use accept handle with other Window Sockets 1.1 - // functions, we call the setsockopt function with the - // SO_UPDATE_ACCEPT_CONTEXT option. This option initializes the - // socket so that other Windows Sockets routines to access the - // socket correctly. - if (!error && - ACE_OS::setsockopt (result.accept_handle (), - SOL_SOCKET, - SO_UPDATE_ACCEPT_CONTEXT, - (char *) &this->listen_handle_, - sizeof (this->listen_handle_)) == -1) - { - error = 1; - } -#endif /* ACE_WIN32 */ - - // Parse address. - ACE_INET_Addr local_address; - ACE_INET_Addr remote_address; - if (!error && - (this->validate_new_connection_ || this->pass_addresses_)) - // Parse the addresses. - this->parse_address (result, - remote_address, - local_address); - - // Validate remote address - if (!error && - this->validate_new_connection_ && - (this->validate_connection (result, remote_address, local_address) == -1)) - { - error = 1; - } - - HANDLER *new_handler = 0; - if (!error) - { - // The Template method - new_handler = this->make_handler (); - if (new_handler == 0) - { - error = 1; - } - } - - // If no errors - if (!error) - { - // Update the Proactor unless make_handler() or constructed handler - // set up its own. - if (new_handler->proactor () == 0) - new_handler->proactor (this->proactor ()); - - // Pass the addresses - if (this->pass_addresses_) - new_handler->addresses (remote_address, - local_address); - - // Pass the ACT - if (result.act () != 0) - new_handler->act (result.act ()); - - // Set up the handler's new handle value - new_handler->handle (result.accept_handle ()); - - // Initiate the handler - new_handler->open (result.accept_handle (), - result.message_block ()); - } - - // On failure, no choice but to close the socket - if (error && - result.accept_handle() != ACE_INVALID_HANDLE ) - ACE_OS::closesocket (result.accept_handle ()); - - // Delete the dynamically allocated message_block - result.message_block ().release (); - - // Start off another asynchronous accept to keep the backlog going, - // unless we closed the listen socket already (from the destructor), - // or this callback is the result of a canceled/aborted accept. - if (this->should_reissue_accept () && - this->listen_handle_ != ACE_INVALID_HANDLE -#if defined (ACE_WIN32) - && result.error () != ERROR_OPERATION_ABORTED -#else - && result.error () != ECANCELED -#endif - ) - this->accept (this->bytes_to_read_, result.act ()); -} - -template int -ACE_Asynch_Acceptor::validate_connection - (const ACE_Asynch_Accept::Result& /* result */, - const ACE_INET_Addr& /* remote */, - const ACE_INET_Addr& /* local */) -{ - // Default implementation always validates the remote address. - return 0; -} - -template int -ACE_Asynch_Acceptor::cancel (void) -{ - ACE_TRACE ("ACE_Asynch_Acceptor<>::cancel"); - - // All I/O operations that are canceled will complete with the error - // ERROR_OPERATION_ABORTED. All completion notifications for the I/O - // operations will occur normally. -#if defined (ACE_HAS_WIN32_OVERLAPPED_IO) - return (int) ::CancelIo (this->listen_handle_); -#else - // Supported now - return this->asynch_accept_.cancel(); -#endif /* defined (ACE_HAS_WIN32_OVERLAPPED_IO) */ -} - -template void -ACE_Asynch_Acceptor::parse_address (const - ACE_Asynch_Accept::Result &result, - ACE_INET_Addr &remote_address, - ACE_INET_Addr &local_address) -{ - ACE_TRACE ("ACE_Asynch_Acceptor<>::parse_address"); - -#if defined (ACE_HAS_AIO_CALLS) - - // Use an ACE_SOCK to get the addresses - it knows how to deal with - // ACE_INET_Addr objects and get IPv4/v6 addresses. - ACE_SOCK_Stream str (result.accept_handle ()); - str.get_local_addr (local_address); - str.get_remote_addr (remote_address); - -#elif defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) - - ACE_Message_Block &message_block = result.message_block (); - - sockaddr *local_addr = 0; - sockaddr *remote_addr = 0; - int local_size = 0; - int remote_size = 0; - // This matches setup in accept(). - size_t addr_size = sizeof (sockaddr_in) + 16; -#if defined (ACE_HAS_IPV6) - if (this->addr_family_ == PF_INET6) - addr_size = sizeof (sockaddr_in6) + 16; -#endif /* ACE_HAS_IPV6 */ - - ::GetAcceptExSockaddrs (message_block.rd_ptr (), - static_cast (this->bytes_to_read_), - static_cast (addr_size), - static_cast (addr_size), - &local_addr, - &local_size, - &remote_addr, - &remote_size); - - local_address.set (reinterpret_cast (local_addr), - local_size); - remote_address.set (reinterpret_cast (remote_addr), - remote_size); -#else - // just in case - errno = ENOTSUP; -#endif /* defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) */ - return; -} - -template ACE_HANDLE -ACE_Asynch_Acceptor::handle (void) const -{ - return this->listen_handle_; -} - -template void -ACE_Asynch_Acceptor::handle (ACE_HANDLE h) -{ - ACE_Handler::handle (h); -} - -template ACE_Asynch_Accept & -ACE_Asynch_Acceptor::asynch_accept (void) -{ - return this->asynch_accept_; -} - -template HANDLER * -ACE_Asynch_Acceptor::make_handler (void) -{ - // Default behavior - HANDLER *handler = 0; - ACE_NEW_RETURN (handler, - HANDLER, - 0); - return handler; -} - -template bool -ACE_Asynch_Acceptor::pass_addresses (void) const -{ - return this->pass_addresses_; -} - -template void -ACE_Asynch_Acceptor::pass_addresses (bool new_value) -{ - this->pass_addresses_ = new_value; -} - -template bool -ACE_Asynch_Acceptor::validate_new_connection (void) const -{ - return this->validate_new_connection_; -} - -template void -ACE_Asynch_Acceptor::validate_new_connection (bool new_value) -{ - this->validate_new_connection_ = new_value; -} - -template int -ACE_Asynch_Acceptor::reissue_accept (void) const -{ - return this->reissue_accept_; -} - -template void -ACE_Asynch_Acceptor::reissue_accept (int new_value) -{ - this->reissue_accept_ = new_value; -} - -template size_t -ACE_Asynch_Acceptor::bytes_to_read (void) const -{ - return this->bytes_to_read_; -} - -template void -ACE_Asynch_Acceptor::bytes_to_read (size_t new_value) -{ - this->bytes_to_read_ = new_value; -} - -template int -ACE_Asynch_Acceptor::should_reissue_accept (void) -{ - return this->reissue_accept_; -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_WIN32 || ACE_HAS_AIO_CALLS */ -#endif /* ACE_ASYNCH_ACCEPTOR_C */ diff --git a/modules/worldengine/deps/acelite/ace/Asynch_Acceptor.h b/modules/worldengine/deps/acelite/ace/Asynch_Acceptor.h deleted file mode 100644 index 520c7bf3f8..0000000000 --- a/modules/worldengine/deps/acelite/ace/Asynch_Acceptor.h +++ /dev/null @@ -1,274 +0,0 @@ -/* -*- C++ -*- */ - -//============================================================================= -/** - * @file Asynch_Acceptor.h - * - * @author Irfan Pyarali (irfan@cs.wustl.edu) - */ -//============================================================================= - -#ifndef ACE_ASYNCH_ACCEPTOR_H -#define ACE_ASYNCH_ACCEPTOR_H -#include /**/ "ace/pre.h" - -#include /**/ "ace/config-all.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#if defined (ACE_HAS_WIN32_OVERLAPPED_IO) || defined (ACE_HAS_AIO_CALLS) -// This only works on platforms that support async i/o. - -#include "ace/Default_Constants.h" -#include "ace/Asynch_IO.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -// Forward declarations -class ACE_Message_Block; -class ACE_INET_Addr; - -/** - * @class ACE_Asynch_Acceptor - * - * @brief This class is an example of the Acceptor Pattern. This class - * will accept new connections and create new HANDLER to handle - * the new connections. - * - * Unlike the ACE_Acceptor, however, this class is designed to - * be used asynchronously. - */ -template -class ACE_Asynch_Acceptor : public ACE_Handler -{ -public: - /// A do nothing constructor. - ACE_Asynch_Acceptor (void); - - /// Virtual destruction - virtual ~ACE_Asynch_Acceptor (void); - - /** - * @c open starts one or more asynchronous accept requests on a - * @a address. Each accept operation may optionally read an - * initial buffer from the new connection when accepted. - * - * @param address The address to listen/accept connections on. - * If the address does not specify a port, a random - * port is selected and bound. - * @param bytes_to_read Optional, specifies the maximum number of bytes - * to read with the accept. The buffer for the initial - * data is allocated internally and passed to the - * @c ACE_Service_Handler::open() hook method. It is - * legitimate only during the @c open() method and must - * be copied if required after @c open() returns. - * This pre-read function works only on Windows. - * @param pass_addresses Optional, a non-zero value indicates that - * the local and peer addresses should be passed to the - * associated @c ACE_Service_Handler::addresses() method - * after any call to @c validate_new_connection() and prior - * to the @c open() hook method call. - * @param backlog Optional, defaulting to @c ACE_DEFAULT_ASYNCH_BACKLOG (which - * can be adjusted in your platform's @c config.h file). - * Specifies the listening backlog for the listening socket. - * @param reuse_addr Optional, indicates whether the @c SO_REUSEADDR - * option is set on the listening socket or not. - * @param proactor Optional, pointer to the @c ACE_Proactor to use for - * demultiplexing asynchronous accepts. If 0, the - * process's singleton @c ACE_Proactor is used. - * @param validate_new_connection Optional, if true, this object's - * @c validate_connection() method is called after - * the accept completes, but before the service handler's - * @c open() hook method is called. If @c - * validate_connection() returns -1, the newly-accepted - * socket is immediately closed, and the @c addresses() - * method is not called. - * @param reissue_accept Optional, if non-zero (the default), a new - * asynchronous accept operation is started after each - * completion, whether the completion is for success or - * failure, and whether or not a successfully-accepted - * connection is subsequently refused. - * @param number_of_initial_accepts Optional, the number of asynchronous - * accepts that are started immediately. If -1 (the - * default), the value of @a backlog is used. - * - * @note On Windows, the peer address is only available at the time - * the connection is accepted. Therefore, if you require the peer - * address on Windows, do not rely on the - * @c ACE_SOCK::get_remote_addr() method - it won't work. You must - * supply a non-zero value for @a pass_addresses and obtain the - * peer address in the @c ACE_Service_Handler::addresses() method. - * - * @see ACE_INET_Addr - * @see ACE_Service_Handler - */ - virtual int open (const ACE_INET_Addr &address, - size_t bytes_to_read = 0, - bool pass_addresses = false, - int backlog = ACE_DEFAULT_ASYNCH_BACKLOG, - int reuse_addr = 1, - ACE_Proactor *proactor = 0, - bool validate_new_connection = false, - int reissue_accept = 1, - int number_of_initial_accepts = -1); - - /// Get the underlying handle. - virtual ACE_HANDLE get_handle (void) const; - - /** - * Set the underlying listen handle. It is the user's responsibility - * to make sure that the old listen handle has been appropriately - * closed and the all outstanding asynchronous operations have - * either completed or have been canceled on the old listen handle. - */ - virtual int set_handle (ACE_HANDLE handle); - - /// This initiates a new asynchronous accept operation. - /** - * You need only call this method if the @a reissue_accept argument - * passed to @c open() was 0. - */ - virtual int accept (size_t bytes_to_read = 0, const void *act = 0); - - /** - * Cancels all pending accepts operations issued by this object. - * - * @note On Windows, only accept operations initiated by the calling thread - * are canceled. - */ - virtual int cancel (void); - - /** - * Template method to validate peer before service is opened. - * This method is called after a new connection is accepted if the - * @a validate_connection argument to @c open() was non-zero or - * the @c validate_new_connection() method is called to turn this - * feature on. The default implementation returns 0. Users can - * reimplement this method to perform validation of the peer - * using it's address, running an authentication procedure (such as - * SSL) or anything else necessary or desireable. The return value - * from this method determines whether or not ACE will continue - * opening the service or abort the connection. - * - * @param result Result of the connection acceptance. - * @param remote Peer's address. - * @param local Local address connection was accepted at. - * - * @retval -1 ACE_Asynch_Acceptor will close the connection, and - * the service will not be opened. - * @retval 0 Service opening will proceeed. - */ - virtual int validate_connection (const ACE_Asynch_Accept::Result& result, - const ACE_INET_Addr &remote, - const ACE_INET_Addr& local); - - /** - * Template method for deciding whether to reissue accept. - * - * This hook method is called after each accept completes to decide if - * another accept should be initiated. If the method returns a non-zero - * value, another accept is initiated. - * - * The default implemenation always returns the value passed as the - * @c open() method's @a reissue_accept argument. That value can also - * be changed using the @c reissue_accept() method. - */ - virtual int should_reissue_accept (void); - - // - // These are low level tweaking methods - // - - /// Get flag that indicates if parsing and passing of addresses to - /// the service_handler is necessary. - virtual bool pass_addresses (void) const; - - /// Set flag that indicates if parsing and passing of addresses to - /// the service_handler is necessary. - virtual void pass_addresses (bool new_value); - - /// Get flag that indicates if address validation is required. - virtual bool validate_new_connection (void) const; - - /// Set flag that indicates if address validation is required. - virtual void validate_new_connection (bool new_value); - - /// Get flag that indicates if a new accept should be reissued when a accept - /// completes. - virtual int reissue_accept (void) const; - - /// Set flag that indicates if a new accept should be reissued when a accept - /// completes. - virtual void reissue_accept (int new_value); - - /// Get bytes to be read with the call. - virtual size_t bytes_to_read (void) const; - - /// Set bytes to be read with the call. - virtual void bytes_to_read (size_t new_value); - -protected: - - /// This is called when an outstanding accept completes. - virtual void handle_accept (const ACE_Asynch_Accept::Result &result); - - /// Return the listen handle. - ACE_HANDLE handle (void) const; - /// Set the listen handle. - void handle (ACE_HANDLE h); - - /// This parses the address from read buffer. - void parse_address (const ACE_Asynch_Accept::Result &result, - ACE_INET_Addr &remote_address, - ACE_INET_Addr &local_address); - - /// Return the asynch accept object. - ACE_Asynch_Accept &asynch_accept (void); - - /** - * This is the template method used to create new handler. - * Subclasses must overwrite this method if a new handler creation - * strategy is required. - */ - virtual HANDLER *make_handler (void); - -private: - /// Handle used to listen for new connections. - ACE_HANDLE listen_handle_; - - /// Asynch_Accept used to make life easier :-) - ACE_Asynch_Accept asynch_accept_; - - /// Flag that indicates if parsing of addresses is necessary. - bool pass_addresses_; - - /// Flag that indicates if address validation is required. - bool validate_new_connection_; - - /// Flag that indicates if a new accept should be reissued when a - /// accept completes. - int reissue_accept_; - - /// Bytes to be read with the call. - size_t bytes_to_read_; - - /// Address family used to open this object. Obtained from @a address passed - /// to @c open(). - int addr_family_; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "ace/Asynch_Acceptor.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Asynch_Acceptor.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ - -#endif /* ACE_HAS_WIN32_OVERLAPPED_IO || ACE_HAS_AIO_CALLS */ -#include /**/ "ace/post.h" -#endif /* ACE_ASYNCH_ACCEPTOR_H */ diff --git a/modules/worldengine/deps/acelite/ace/Asynch_Connector.cpp b/modules/worldengine/deps/acelite/ace/Asynch_Connector.cpp deleted file mode 100644 index 5391ca5ad5..0000000000 --- a/modules/worldengine/deps/acelite/ace/Asynch_Connector.cpp +++ /dev/null @@ -1,268 +0,0 @@ -#ifndef ACE_ASYNCH_CONNECTOR_CPP -#define ACE_ASYNCH_CONNECTOR_CPP - -#include "ace/Asynch_Connector.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#if (defined (ACE_WIN32) || defined (ACE_HAS_AIO_CALLS)) && !defined(ACE_HAS_WINCE) -// This only works on platforms that support async I/O. - -#include "ace/OS_NS_sys_socket.h" -#include "ace/OS_Memory.h" -#include "ace/Flag_Manip.h" -#include "ace/Log_Category.h" -#include "ace/Message_Block.h" -#include "ace/INET_Addr.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -template -ACE_Asynch_Connector::ACE_Asynch_Connector (void) - : pass_addresses_ (false), - validate_new_connection_ (false) -{ -} - -template -ACE_Asynch_Connector::~ACE_Asynch_Connector (void) -{ - //this->asynch_connect_.close (); -} - -template int -ACE_Asynch_Connector::open (bool pass_addresses, - ACE_Proactor *proactor, - bool validate_new_connection) -{ - this->proactor (proactor); - this->pass_addresses_ = pass_addresses; - this->validate_new_connection_ = validate_new_connection; - - // Initialize the ACE_Asynch_Connect - if (this->asynch_connect_.open (*this, - ACE_INVALID_HANDLE, - 0, - this->proactor ()) == -1) - ACELIB_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("%p\n"), - ACE_TEXT ("ACE_Asynch_Connect::open")), - -1); - return 0; -} - -template int -ACE_Asynch_Connector::connect (const ACE_INET_Addr & remote_sap, - const ACE_INET_Addr & local_sap, - int reuse_addr, - const void *act) -{ - // Initiate asynchronous connect - if (this->asynch_connect_.connect (ACE_INVALID_HANDLE, - remote_sap, - local_sap, - reuse_addr, - act) == -1) - ACELIB_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("%p\n"), - ACE_TEXT ("ACE_Asynch_Connect::connect")), - -1); - return 0; -} - -template void -ACE_Asynch_Connector::handle_connect (const ACE_Asynch_Connect::Result &result) -{ - // Variable for error tracking - int error = 0; - - // If the asynchronous connect fails. - if (!result.success () || - result.connect_handle () == ACE_INVALID_HANDLE) - { - error = 1; - } - - if (result.error () != 0) - { - error = 1; - } - - // set blocking mode - if (!error && - ACE::clr_flags - (result.connect_handle (), ACE_NONBLOCK) != 0) - { - error = 1; - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("%p\n"), - ACE_TEXT ("ACE_Asynch_Connector::handle_connect : Set blocking mode"))); - } - - // Parse the addresses. - ACE_INET_Addr local_address; - ACE_INET_Addr remote_address; - if (!error && - (this->validate_new_connection_ || this->pass_addresses_)) - this->parse_address (result, - remote_address, - local_address); - - // Call validate_connection even if there was an error - it's the only - // way the application can learn the connect disposition. - if (this->validate_new_connection_ && - this->validate_connection (result, remote_address, local_address) == -1) - { - error = 1; - } - - HANDLER *new_handler = 0; - if (!error) - { - // The Template method - new_handler = this->make_handler (); - if (new_handler == 0) - { - error = 1; - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("%p\n"), - ACE_TEXT ("ACE_Asynch_Connector::handle_connect : Making of new handler failed"))); - } - } - - // If no errors - if (!error) - { - // Update the Proactor. - new_handler->proactor (this->proactor ()); - - // Pass the addresses - if (this->pass_addresses_) - new_handler->addresses (remote_address, - local_address); - - // Pass the ACT - if (result.act () != 0) - new_handler->act (result.act ()); - - // Set up the handler's new handle value - new_handler->handle (result.connect_handle ()); - - ACE_Message_Block mb; - - // Initiate the handler with empty message block; - new_handler->open (result.connect_handle (), mb); - } - - // On failure, no choice but to close the socket - if (error && - result.connect_handle() != ACE_INVALID_HANDLE) - ACE_OS::closesocket (result.connect_handle ()); -} - -template int -ACE_Asynch_Connector::validate_connection - (const ACE_Asynch_Connect::Result &, - const ACE_INET_Addr & /* remote_address */, - const ACE_INET_Addr & /* local_address */) -{ - // Default implementation always validates the remote address. - return 0; -} - -template int -ACE_Asynch_Connector::cancel (void) -{ - return this->asynch_connect_.cancel (); -} - -template void -ACE_Asynch_Connector::parse_address (const ACE_Asynch_Connect::Result &result, - ACE_INET_Addr &remote_address, - ACE_INET_Addr &local_address) -{ -#if defined (ACE_HAS_IPV6) - // Getting the addresses. - sockaddr_in6 local_addr; - sockaddr_in6 remote_addr; -#else - // Getting the addresses. - sockaddr_in local_addr; - sockaddr_in remote_addr; -#endif /* ACE_HAS_IPV6 */ - - // Get the length. - int local_size = sizeof (local_addr); - int remote_size = sizeof (remote_addr); - - // Get the local address. - if (ACE_OS::getsockname (result.connect_handle (), - reinterpret_cast (&local_addr), - &local_size) < 0) - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT("%p\n"), - ACE_TEXT("ACE_Asynch_Connector:: failed"))); - - // Get the remote address. - if (ACE_OS::getpeername (result.connect_handle (), - reinterpret_cast (&remote_addr), - &remote_size) < 0) - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT("%p\n"), - ACE_TEXT("ACE_Asynch_Connector:: failed"))); - - // Set the addresses. - local_address.set (reinterpret_cast (&local_addr), - local_size); - remote_address.set (reinterpret_cast (&remote_addr), - remote_size); - - return; -} - - -template ACE_Asynch_Connect & -ACE_Asynch_Connector::asynch_connect (void) -{ - return this->asynch_connect_; -} - -template HANDLER * -ACE_Asynch_Connector::make_handler (void) -{ - // Default behavior - HANDLER *handler = 0; - ACE_NEW_RETURN (handler, HANDLER, 0); - return handler; -} - -template bool -ACE_Asynch_Connector::pass_addresses (void) const -{ - return this->pass_addresses_; -} - -template void -ACE_Asynch_Connector::pass_addresses (bool new_value) -{ - this->pass_addresses_ = new_value; -} - -template bool -ACE_Asynch_Connector::validate_new_connection (void) const -{ - return this->validate_new_connection_; -} - -template void -ACE_Asynch_Connector::validate_new_connection (bool new_value) -{ - this->validate_new_connection_ = new_value; -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_WIN32 || ACE_HAS_AIO_CALLS */ -#endif /* ACE_ASYNCH_CONNECTOR_CPP */ diff --git a/modules/worldengine/deps/acelite/ace/Asynch_Connector.h b/modules/worldengine/deps/acelite/ace/Asynch_Connector.h deleted file mode 100644 index 8706fd2221..0000000000 --- a/modules/worldengine/deps/acelite/ace/Asynch_Connector.h +++ /dev/null @@ -1,169 +0,0 @@ -/* -*- C++ -*- */ - -//============================================================================= -/** - * @file Asynch_Connector.h - * - * @author Alexander Libman - */ -//============================================================================= - -#ifndef ACE_ASYNCH_CONNECTOR_H -#define ACE_ASYNCH_CONNECTOR_H -#include /**/ "ace/pre.h" - -#include /**/ "ace/config-all.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#if (defined (ACE_WIN32) || defined (ACE_HAS_AIO_CALLS)) && !defined(ACE_HAS_WINCE) -// This only works on platforms that support async i/o. - -#include "ace/Asynch_IO.h" -#include "ace/INET_Addr.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -// Forward declarations -class ACE_Message_Block; - -/** - * @class ACE_Asynch_Connector - * - * @brief This class is an example of the Connector pattern. This class - * will establish new connections and create new HANDLER objects to handle - * the new connections. - * - * Unlike the ACE_Connector, however, this class is designed to - * be used asynchronously with the ACE Proactor framework. - */ - -template -class ACE_Asynch_Connector : public ACE_Handler -{ -public: - /// A do nothing constructor. - ACE_Asynch_Connector (void); - - /// Virtual destruction - virtual ~ACE_Asynch_Connector (void); - - /** - * This opens asynch connector - */ - virtual int open (bool pass_addresses = false, - ACE_Proactor *proactor = 0, - bool validate_new_connection = true); - - /// This initiates a new asynchronous connect - virtual int connect (const ACE_INET_Addr &remote_sap, - const ACE_INET_Addr &local_sap = - (const ACE_INET_Addr &)ACE_Addr::sap_any, - int reuse_addr = 1, - const void *act = 0); - - /** - * This cancels all pending accepts operations that were issued by - * the calling thread. - * - * @note On Windows, this method does not cancel connect operations - * issued by other threads. - * - * @note On POSIX, delegates cancelation to ACE_POSIX_Asynch_Connect. - */ - virtual int cancel (void); - - - /** - * Template method to validate peer before service is opened. - * This method is called when the connection attempt completes, - * whether it succeeded or failed, if the @a validate_connection - * argument to @c open() was non-zero or the @c validate_new_connection() - * method is called to turn this feature on. The default implementation - * returns 0. Users can (and probably should) reimplement this method - * to learn about the success or failure of the connection attempt. - * If the connection completed successfully, this method can be used to - * perform validation of the peer using it's address, running an - * authentication procedure (such as SSL) or anything else necessary or - * desireable. The return value from this method determines whether or - * not ACE will continue opening the service or abort the connection. - * - * @param result Result of the connection acceptance. Use - * result.success() to determine success or failure of - * the connection attempt. - * @param remote Peer's address. If the connection failed, this object - * is undefined. - * @param local Local address connection was completed from. If the - * connection failed, this object is undefined. - * - * @retval -1 ACE_Asynch_Connector will close the connection, and - * the service will not be opened. - * @retval 0 Service opening will proceeed. - * @return Return value is ignored if the connection attempt failed. - */ - virtual int validate_connection (const ACE_Asynch_Connect::Result& result, - const ACE_INET_Addr &remote, - const ACE_INET_Addr& local); - - // - // These are low level tweaking methods - // - - /// Set and get flag that indicates if parsing and passing of - /// addresses to the service_handler is necessary. - virtual bool pass_addresses (void) const; - virtual void pass_addresses (bool new_value); - - /// Set and get flag that indicates if address validation is - /// required. - virtual bool validate_new_connection (void) const; - virtual void validate_new_connection (bool new_value); - -protected: - - /// This is called when an outstanding accept completes. - virtual void handle_connect (const ACE_Asynch_Connect::Result &result); - - - /// This parses the address from read buffer. - void parse_address (const ACE_Asynch_Connect::Result &result, - ACE_INET_Addr &remote_address, - ACE_INET_Addr &local_address); - - /// Return the asynch Connect object. - ACE_Asynch_Connect & asynch_connect (void); - - /** - * This is the template method used to create new handler. - * Subclasses must overwrite this method if a new handler creation - * strategy is required. - */ - virtual HANDLER *make_handler (void); - -private: - - /// Asynch_Connect used to make life easier :-) - ACE_Asynch_Connect asynch_connect_; - - /// Flag that indicates if parsing of addresses is necessary. - bool pass_addresses_; - - /// Flag that indicates if address validation is required. - bool validate_new_connection_; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "ace/Asynch_Connector.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Asynch_Connector.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ - -#endif /* ACE_WIN32 || ACE_HAS_AIO_CALLS */ -#include /**/ "ace/post.h" -#endif /* ACE_ASYNCH_CONNECTOR_H */ diff --git a/modules/worldengine/deps/acelite/ace/Asynch_IO.cpp b/modules/worldengine/deps/acelite/ace/Asynch_IO.cpp deleted file mode 100644 index f50cdc33d3..0000000000 --- a/modules/worldengine/deps/acelite/ace/Asynch_IO.cpp +++ /dev/null @@ -1,1410 +0,0 @@ -#include "ace/Asynch_IO.h" - -#if defined (ACE_HAS_WIN32_OVERLAPPED_IO) || defined (ACE_HAS_AIO_CALLS) -// This only works on platforms with Asynchronous IO - -#include "ace/Proactor.h" -#include "ace/Message_Block.h" -#include "ace/INET_Addr.h" -#include "ace/Asynch_IO_Impl.h" -#include "ace/os_include/os_errno.h" -#include "ace/Truncate.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -size_t -ACE_Asynch_Result::bytes_transferred (void) const -{ - return this->implementation ()->bytes_transferred (); -} - -const void * -ACE_Asynch_Result::act (void) const -{ - return this->implementation ()->act (); -} - -int -ACE_Asynch_Result::success (void) const -{ - return this->implementation ()->success (); -} - -const void * -ACE_Asynch_Result::completion_key (void) const -{ - return this->implementation ()->completion_key (); -} - -unsigned long -ACE_Asynch_Result::error (void) const -{ - return this->implementation ()->error (); -} - -ACE_HANDLE -ACE_Asynch_Result::event (void) const -{ - return this->implementation ()->event (); -} - -unsigned long -ACE_Asynch_Result::offset (void) const -{ - return this->implementation ()->offset (); -} - -unsigned long -ACE_Asynch_Result::offset_high (void) const -{ - return this->implementation ()->offset_high (); -} - -int -ACE_Asynch_Result::priority (void) const -{ - return this->implementation ()->priority (); -} - -int -ACE_Asynch_Result::signal_number (void) const -{ - return this->implementation ()->signal_number (); -} - -ACE_Asynch_Result::ACE_Asynch_Result (ACE_Asynch_Result_Impl *implementation) - : implementation_ (implementation) -{ -} - -ACE_Asynch_Result::~ACE_Asynch_Result (void) -{ - // Proactor deletes the implementation when the finishes. -} - -ACE_Asynch_Result_Impl * -ACE_Asynch_Result::implementation (void) const -{ - return this->implementation_; -} - -// ********************************************************************* - -int -ACE_Asynch_Operation::open (ACE_Handler &handler, - ACE_HANDLE handle, - const void *completion_key, - ACE_Proactor *proactor) -{ - return this->implementation ()->open (handler.proxy (), - handle, - completion_key, - proactor); -} - -int -ACE_Asynch_Operation::cancel (void) -{ - if (0 == this->implementation ()) - { - errno = EFAULT; - return -1; - } - return this->implementation ()->cancel (); -} - -ACE_Proactor * -ACE_Asynch_Operation::proactor (void) const -{ - if (0 == this->implementation ()) - { - errno = EFAULT; - return 0; - } - return this->implementation ()->proactor (); -} - -ACE_Asynch_Operation::ACE_Asynch_Operation (void) -{ -} - -ACE_Asynch_Operation::~ACE_Asynch_Operation (void) -{ -} - -ACE_Proactor * -ACE_Asynch_Operation::get_proactor (ACE_Proactor *user_proactor, - ACE_Handler &handler) const -{ - if (user_proactor == 0) - { - // Grab the singleton proactor if proactor> is zero - user_proactor = handler.proactor (); - if (user_proactor == 0) - user_proactor = ACE_Proactor::instance (); - } - - return user_proactor; -} - -// ************************************************************ - -ACE_Asynch_Read_Stream::ACE_Asynch_Read_Stream (void) - : implementation_ (0) -{ -} - -ACE_Asynch_Read_Stream::~ACE_Asynch_Read_Stream (void) -{ - // Delete the implementation. - delete this->implementation_; - this->implementation_ = 0; -} - -int -ACE_Asynch_Read_Stream::open (ACE_Handler &handler, - ACE_HANDLE handle, - const void *completion_key, - ACE_Proactor *proactor) -{ - // Get a proactor for/from the user. - proactor = this->get_proactor (proactor, handler); - - // Now let us get the implementation initialized. - if ((this->implementation_ = proactor->create_asynch_read_stream ()) == 0) - return -1; - - // Call the method of the base class. - return ACE_Asynch_Operation::open (handler, - handle, - completion_key, - proactor); -} - -int -ACE_Asynch_Read_Stream::read (ACE_Message_Block &message_block, - size_t bytes_to_read, - const void *act, - int priority, - int signal_number) -{ - if (0 == this->implementation_) - { - errno = EFAULT; - return -1; - } - return this->implementation_->read (message_block, - bytes_to_read, - act, - priority, - signal_number); -} - -#if defined (ACE_HAS_WIN32_OVERLAPPED_IO) -int -ACE_Asynch_Read_Stream::readv (ACE_Message_Block &message_block, - size_t bytes_to_read, - const void *act, - int priority, - int signal_number) -{ - if (0 == this->implementation_) - { - errno = EFAULT; - return -1; - } - return this->implementation_->readv (message_block, - bytes_to_read, - act, - priority, - signal_number); -} -#endif /* ACE_HAS_WIN32_OVERLAPPED_IO */ - -ACE_Asynch_Operation_Impl * -ACE_Asynch_Read_Stream::implementation (void) const -{ - return this->implementation_; -} - -// ************************************************************ - -size_t -ACE_Asynch_Read_Stream::Result::bytes_to_read (void) const -{ - return this->implementation ()->bytes_to_read (); -} - -ACE_Message_Block & -ACE_Asynch_Read_Stream::Result::message_block (void) const -{ - return this->implementation ()->message_block (); -} - -ACE_HANDLE -ACE_Asynch_Read_Stream::Result::handle (void) const -{ - return this->implementation ()->handle (); -} - -ACE_Asynch_Read_Stream::Result::Result (ACE_Asynch_Read_Stream_Result_Impl *implementation) - : ACE_Asynch_Result (implementation), - implementation_ (implementation) -{ -} - -ACE_Asynch_Read_Stream::Result::~Result (void) -{ - // Proactor will delete the implementation after is - // finished. -} - -ACE_Asynch_Read_Stream_Result_Impl * -ACE_Asynch_Read_Stream::Result::implementation (void) const -{ - return this->implementation_; -} - -// *************************************************** - -ACE_Asynch_Write_Stream::ACE_Asynch_Write_Stream (void) - : implementation_ (0) -{ -} - -ACE_Asynch_Write_Stream::~ACE_Asynch_Write_Stream (void) -{ - // Delete the implementation. - delete this->implementation_; - this->implementation_ = 0; -} - -int -ACE_Asynch_Write_Stream::open (ACE_Handler &handler, - ACE_HANDLE handle, - const void *completion_key, - ACE_Proactor *proactor) -{ - // Get a proactor for/from the user. - proactor = this->get_proactor (proactor, handler); - - // Now let us get the implementation initialized. - if ((this->implementation_ = proactor->create_asynch_write_stream ()) == 0) - return -1; - - // Call the method of the base class. - return ACE_Asynch_Operation::open (handler, - handle, - completion_key, - proactor); -} - -int -ACE_Asynch_Write_Stream::write (ACE_Message_Block &message_block, - size_t bytes_to_write, - const void *act, - int priority, - int signal_number) -{ - if (0 == this->implementation_) - { - errno = EFAULT; - return -1; - } - return this->implementation_->write (message_block, - bytes_to_write, - act, - priority, - signal_number); -} - -#if defined (ACE_HAS_WIN32_OVERLAPPED_IO) -int -ACE_Asynch_Write_Stream::writev (ACE_Message_Block &message_block, - size_t bytes_to_write, - const void *act, - int priority, - int signal_number) -{ - if (0 == this->implementation_) - { - errno = EFAULT; - return -1; - } - return this->implementation_->writev (message_block, - bytes_to_write, - act, - priority, - signal_number); -} -#endif /* ACE_HAS_WIN32_OVERLAPPED_IO */ - -ACE_Asynch_Operation_Impl * -ACE_Asynch_Write_Stream::implementation (void) const -{ - return this->implementation_; -} - -// ************************************************************ - -size_t -ACE_Asynch_Write_Stream::Result::bytes_to_write (void) const -{ - return this->implementation ()->bytes_to_write (); -} - -ACE_Message_Block & -ACE_Asynch_Write_Stream::Result::message_block (void) const -{ - return this->implementation ()->message_block (); -} - -ACE_HANDLE -ACE_Asynch_Write_Stream::Result::handle (void) const -{ - return this->implementation ()->handle (); -} - -ACE_Asynch_Write_Stream::Result::Result (ACE_Asynch_Write_Stream_Result_Impl *implementation) - : ACE_Asynch_Result (implementation), - implementation_ (implementation) -{ -} - -ACE_Asynch_Write_Stream::Result::~Result (void) -{ - // Proactor will delte the implementation when the call - // finishes. -} - -ACE_Asynch_Write_Stream_Result_Impl * -ACE_Asynch_Write_Stream::Result::implementation (void) const -{ - return this->implementation_; -} - -// ************************************************************ - -ACE_Asynch_Read_File::ACE_Asynch_Read_File (void) - : implementation_ (0) -{ -} - -ACE_Asynch_Read_File::~ACE_Asynch_Read_File (void) -{ - // Delete the implementation. - delete this->implementation_; - this->implementation_ = 0; -} - -int -ACE_Asynch_Read_File::open (ACE_Handler &handler, - ACE_HANDLE handle, - const void *completion_key, - ACE_Proactor *proactor) -{ - // Get a proactor for/from the user. - proactor = this->get_proactor (proactor, handler); - - // Now let us get the implementation initialized. - if ((this->implementation_ = proactor->create_asynch_read_file ()) == 0) - return -1; - - // Call the method of the base class. - return ACE_Asynch_Operation::open (handler, - handle, - completion_key, - proactor); -} - -int -ACE_Asynch_Read_File::read (ACE_Message_Block &message_block, - size_t bytes_to_read, - unsigned long offset, - unsigned long offset_high, - const void *act, - int priority, - int signal_number) -{ - if (0 == this->implementation_) - { - errno = EFAULT; - return -1; - } - return this->implementation_->read (message_block, - bytes_to_read, - offset, - offset_high, - act, - priority, - signal_number); -} - -#if (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) -int -ACE_Asynch_Read_File::readv (ACE_Message_Block &message_block, - size_t bytes_to_read, - unsigned long offset, - unsigned long offset_high, - const void *act, - int priority, - int signal_number) -{ - if (0 == this->implementation_) - { - errno = EFAULT; - return -1; - } - return this->implementation_->readv (message_block, - bytes_to_read, - offset, - offset_high, - act, - priority, - signal_number); -} -#endif /* (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) */ - -ACE_Asynch_Operation_Impl * -ACE_Asynch_Read_File::implementation (void) const -{ - return this->implementation_; -} - -// ************************************************************ - -ACE_Asynch_Read_File::Result::Result (ACE_Asynch_Read_File_Result_Impl *implementation) - : ACE_Asynch_Read_Stream::Result (implementation), - implementation_ (implementation) -{ -} - -ACE_Asynch_Read_File::Result::~Result (void) -{ - // Proactor will delete the implementation when call - // completes. -} - -ACE_Asynch_Read_File_Result_Impl * -ACE_Asynch_Read_File::Result::implementation (void) const -{ - return this->implementation_; -} - -// ************************************************************ - -ACE_Asynch_Write_File::ACE_Asynch_Write_File (void) - : implementation_ (0) -{ -} - -ACE_Asynch_Write_File::~ACE_Asynch_Write_File (void) -{ - // Delete the implementation. - delete this->implementation_; - this->implementation_ = 0; -} - -int -ACE_Asynch_Write_File::open (ACE_Handler &handler, - ACE_HANDLE handle, - const void *completion_key, - ACE_Proactor *proactor) -{ - // Get a proactor for/from the user. - proactor = this->get_proactor (proactor, handler); - - // Now let us get the implementation initialized. - if ((this->implementation_ = proactor->create_asynch_write_file ()) == 0) - return -1; - - // Call the method of the base class. - return ACE_Asynch_Operation::open (handler, - handle, - completion_key, - proactor); -} - -int -ACE_Asynch_Write_File::write (ACE_Message_Block &message_block, - size_t bytes_to_write, - unsigned long offset, - unsigned long offset_high, - const void *act, - int priority, - int signal_number) -{ - if (0 == this->implementation_) - { - errno = EFAULT; - return -1; - } - return this->implementation_->write (message_block, - bytes_to_write, - offset, - offset_high, - act, - priority, - signal_number); -} - -#if (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) -int -ACE_Asynch_Write_File::writev (ACE_Message_Block &message_block, - size_t bytes_to_write, - unsigned long offset, - unsigned long offset_high, - const void *act, - int priority, - int signal_number) -{ - if (0 == this->implementation_) - { - errno = EFAULT; - return -1; - } - return this->implementation_->writev (message_block, - bytes_to_write, - offset, - offset_high, - act, - priority, - signal_number); -} -#endif /* (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) */ - -ACE_Asynch_Operation_Impl * -ACE_Asynch_Write_File::implementation (void) const -{ - return this->implementation_; -} - -// ************************************************************ - -ACE_Asynch_Write_File::Result::Result (ACE_Asynch_Write_File_Result_Impl *implementation) - : ACE_Asynch_Write_Stream::Result (implementation), - implementation_ (implementation) -{ -} - -ACE_Asynch_Write_File::Result::~Result (void) -{ - // Proactor will delete the implementation when the call - // completes. -} - -ACE_Asynch_Write_File_Result_Impl * -ACE_Asynch_Write_File::Result::implementation (void) const -{ - return this->implementation_; -} - -// ********************************************************************* - -ACE_Asynch_Accept::ACE_Asynch_Accept (void) - : implementation_ (0) -{ -} - -ACE_Asynch_Accept::~ACE_Asynch_Accept (void) -{ - // Delete the implementation. - delete this->implementation_; - this->implementation_ = 0; -} - -int -ACE_Asynch_Accept::open (ACE_Handler &handler, - ACE_HANDLE handle, - const void *completion_key, - ACE_Proactor *proactor) -{ - // Get a proactor for/from the user. - proactor = this->get_proactor (proactor, handler); - - // Now let us get the implementation initialized. - if ((this->implementation_ = proactor->create_asynch_accept ()) == 0) - return -1; - - // Call the method of the base class. - return ACE_Asynch_Operation::open (handler, - handle, - completion_key, - proactor); -} - -int -ACE_Asynch_Accept::accept (ACE_Message_Block &message_block, - size_t bytes_to_read, - ACE_HANDLE accept_handle, - const void *act, - int priority, - int signal_number, - int addr_family) -{ - if (0 == this->implementation_) - { - errno = EFAULT; - return -1; - } - return this->implementation_->accept (message_block, - bytes_to_read, - accept_handle, - act, - priority, - signal_number, - addr_family); -} - -ACE_Asynch_Operation_Impl * -ACE_Asynch_Accept::implementation (void) const -{ - return this->implementation_; -} - -// ************************************************************ - -size_t -ACE_Asynch_Accept::Result::bytes_to_read (void) const -{ - return this->implementation ()->bytes_to_read (); -} - -ACE_Message_Block & -ACE_Asynch_Accept::Result::message_block (void) const -{ - return this->implementation ()->message_block (); -} - -ACE_HANDLE -ACE_Asynch_Accept::Result::listen_handle (void) const -{ - return this->implementation ()->listen_handle (); -} - -ACE_HANDLE -ACE_Asynch_Accept::Result::accept_handle (void) const -{ - return this->implementation ()->accept_handle (); -} - -ACE_Asynch_Accept::Result::Result (ACE_Asynch_Accept_Result_Impl *implementation) - : ACE_Asynch_Result (implementation), - implementation_ (implementation) -{ -} - -ACE_Asynch_Accept::Result::~Result (void) -{ - // Proactor will delete the implementation when the call - // completes. -} - -ACE_Asynch_Accept_Result_Impl * -ACE_Asynch_Accept::Result::implementation (void) const -{ - return this->implementation_; -} - - - -// ********************************************************************* - -ACE_Asynch_Connect::ACE_Asynch_Connect (void) - : implementation_ (0) -{ -} - -ACE_Asynch_Connect::~ACE_Asynch_Connect (void) -{ - // Delete the implementation. - delete this->implementation_; - this->implementation_ = 0; -} - -int -ACE_Asynch_Connect::open (ACE_Handler &handler, - ACE_HANDLE handle, - const void *completion_key, - ACE_Proactor *proactor) -{ - // Get a proactor for/from the user. - proactor = this->get_proactor (proactor, handler); - - // Now let us get the implementation initialized. - if ((this->implementation_ = proactor->create_asynch_connect ()) == 0) - return -1; - - // Call the method of the base class. - return ACE_Asynch_Operation::open (handler, - handle, - completion_key, - proactor); -} - -int -ACE_Asynch_Connect::connect (ACE_HANDLE connect_handle, - const ACE_Addr & remote_sap, - const ACE_Addr & local_sap, - int reuse_addr, - const void *act, - int priority, - int signal_number) -{ - if (0 == this->implementation_) - { - errno = EFAULT; - return -1; - } - return this->implementation_->connect (connect_handle, - remote_sap, - local_sap, - reuse_addr, - act, - priority, - signal_number); -} - -ACE_Asynch_Operation_Impl * -ACE_Asynch_Connect::implementation (void) const -{ - return this->implementation_; -} - -// ************************************************************ - -ACE_Asynch_Connect::Result::Result (ACE_Asynch_Connect_Result_Impl *implementation) - : ACE_Asynch_Result (implementation), - implementation_ (implementation) -{ -} - -ACE_Asynch_Connect::Result::~Result (void) -{ - // Proactor will delete the implementation when the call - // completes. -} - -ACE_HANDLE -ACE_Asynch_Connect::Result::connect_handle (void) const -{ - return this->implementation ()->connect_handle (); -} - - -ACE_Asynch_Connect_Result_Impl * -ACE_Asynch_Connect::Result::implementation (void) const -{ - return this->implementation_; -} - -// ************************************************************ - -ACE_Asynch_Transmit_File::ACE_Asynch_Transmit_File (void) - : implementation_ (0) -{ -} - -ACE_Asynch_Transmit_File::~ACE_Asynch_Transmit_File (void) -{ - // Delete the implementation. - delete this->implementation_; - this->implementation_ = 0; -} - -int -ACE_Asynch_Transmit_File::open (ACE_Handler &handler, - ACE_HANDLE handle, - const void *completion_key, - ACE_Proactor *proactor) -{ - // Get a proactor for/from the user. - proactor = this->get_proactor (proactor, handler); - - // Now let us get the implementation initialized. - if ((this->implementation_ = proactor->create_asynch_transmit_file ()) == 0) - return -1; - - // Call the method of the base class. - return ACE_Asynch_Operation::open (handler, - handle, - completion_key, - proactor); -} - -int -ACE_Asynch_Transmit_File::transmit_file (ACE_HANDLE file, - Header_And_Trailer *header_and_trailer, - size_t bytes_to_write, - unsigned long offset, - unsigned long offset_high, - size_t bytes_per_send, - unsigned long flags, - const void *act, - int priority, - int signal_number) -{ - if (0 == this->implementation_) - { - errno = EFAULT; - return -1; - } - return this->implementation_->transmit_file (file, - header_and_trailer, - bytes_to_write, - offset, - offset_high, - bytes_per_send, - flags, - act, - priority, - signal_number); -} - -ACE_Asynch_Operation_Impl * -ACE_Asynch_Transmit_File::implementation (void) const -{ - return this->implementation_; -} - -// **************************************************************************** - -ACE_HANDLE -ACE_Asynch_Transmit_File::Result::socket (void) const -{ - return this->implementation ()->socket (); -} - -ACE_HANDLE -ACE_Asynch_Transmit_File::Result::file (void) const -{ - return this->implementation ()->file (); -} - -ACE_Asynch_Transmit_File::Header_And_Trailer * -ACE_Asynch_Transmit_File::Result::header_and_trailer (void) const -{ - return this->implementation ()->header_and_trailer (); -} - -size_t -ACE_Asynch_Transmit_File::Result::bytes_to_write (void) const -{ - return this->implementation ()->bytes_to_write (); -} - -size_t -ACE_Asynch_Transmit_File::Result::bytes_per_send (void) const -{ - return this->implementation ()->bytes_per_send (); -} - -unsigned long -ACE_Asynch_Transmit_File::Result::flags (void) const -{ - return this->implementation ()->flags (); -} - -ACE_Asynch_Transmit_File::Result::Result (ACE_Asynch_Transmit_File_Result_Impl *implementation) - : ACE_Asynch_Result (implementation), - implementation_ (implementation) -{ -} - -ACE_Asynch_Transmit_File::Result::~Result (void) -{ -} - -ACE_Asynch_Transmit_File_Result_Impl * -ACE_Asynch_Transmit_File::Result::implementation (void) const -{ - return this->implementation_; -} - -// ************************************************************ - -ACE_Asynch_Transmit_File::Header_And_Trailer::Header_And_Trailer (ACE_Message_Block *header, - size_t header_bytes, - ACE_Message_Block *trailer, - size_t trailer_bytes) - : header_ (header), - header_bytes_ (header_bytes), - trailer_ (trailer), - trailer_bytes_ (trailer_bytes) -{ -} - -ACE_Asynch_Transmit_File::Header_And_Trailer::~Header_And_Trailer (void) -{ -} - -void -ACE_Asynch_Transmit_File::Header_And_Trailer::header_and_trailer (ACE_Message_Block *header, - size_t header_bytes, - ACE_Message_Block *trailer, - size_t trailer_bytes) -{ - this->header (header); - this->header_bytes (header_bytes); - this->trailer (trailer); - this->trailer_bytes (trailer_bytes); -} - -ACE_Message_Block * -ACE_Asynch_Transmit_File::Header_And_Trailer::header (void) const -{ - return this->header_; -} - -void -ACE_Asynch_Transmit_File::Header_And_Trailer::header (ACE_Message_Block *message_block) -{ - this->header_ = message_block; -} - -size_t -ACE_Asynch_Transmit_File::Header_And_Trailer::header_bytes (void) const -{ - return this->header_bytes_; -} - -void -ACE_Asynch_Transmit_File::Header_And_Trailer::header_bytes (size_t bytes) -{ - this->header_bytes_ = bytes; -} - -ACE_Message_Block * -ACE_Asynch_Transmit_File::Header_And_Trailer::trailer (void) const -{ - return this->trailer_; -} - -void -ACE_Asynch_Transmit_File::Header_And_Trailer::trailer (ACE_Message_Block *message_block) -{ - this->trailer_ = message_block; -} - -size_t -ACE_Asynch_Transmit_File::Header_And_Trailer::trailer_bytes (void) const -{ - return this->trailer_bytes_; -} - -void -ACE_Asynch_Transmit_File::Header_And_Trailer::trailer_bytes (size_t bytes) -{ - this->trailer_bytes_ = bytes; -} - -ACE_LPTRANSMIT_FILE_BUFFERS -ACE_Asynch_Transmit_File::Header_And_Trailer::transmit_buffers (void) -{ - // If both are zero, return zero - if (this->header_ == 0 && this->trailer_ == 0) - { - return 0; - } - else - { - // Something is valid - - // If header is valid, set the fields - if (this->header_ != 0) - { - this->transmit_buffers_.Head = this->header_->rd_ptr (); -#if defined (ACE_WIN64) || defined (ACE_WIN32) - this->transmit_buffers_.HeadLength = - ACE_Utils::truncate_cast (this->header_bytes_); -#else - this->transmit_buffers_.HeadLength = this->header_bytes_; -#endif /* ACE_WIN64 || ACE_WIN32 */ - } - else - { - this->transmit_buffers_.Head = 0; - this->transmit_buffers_.HeadLength = 0; - } - - // If trailer is valid, set the fields - if (this->trailer_ != 0) - { - this->transmit_buffers_.Tail = this->trailer_->rd_ptr (); -#if defined(ACE_WIN64) || defined (ACE_WIN32) - this->transmit_buffers_.TailLength = - ACE_Utils::truncate_cast (this->trailer_bytes_); -#else - this->transmit_buffers_.TailLength = this->trailer_bytes_; -#endif /* ACE_WIN64 || ACE_WIN32 */ - } - else - { - this->transmit_buffers_.Tail = 0; - this->transmit_buffers_.TailLength = 0; - } - - // Return the transmit buffers - return &this->transmit_buffers_; - } -} - -// ********************************************************************* - -ACE_Handler::ACE_Handler (void) - : proactor_ (0), handle_ (ACE_INVALID_HANDLE) -{ - ACE_Handler::Proxy *p; - ACE_NEW (p, ACE_Handler::Proxy (this)); - this->proxy_.reset (p); -} - -ACE_Handler::ACE_Handler (ACE_Proactor *d) - : proactor_ (d), handle_ (ACE_INVALID_HANDLE) -{ - ACE_Handler::Proxy *p; - ACE_NEW (p, ACE_Handler::Proxy (this)); - this->proxy_.reset (p); -} - -ACE_Handler::~ACE_Handler (void) -{ - ACE_Handler::Proxy *p = this->proxy_.get (); - if (p) - p->reset (); -} - -void -ACE_Handler::handle_read_stream (const ACE_Asynch_Read_Stream::Result & /* result */) -{ -} - -void -ACE_Handler::handle_write_stream (const ACE_Asynch_Write_Stream::Result & /* result */) -{ -} - -void -ACE_Handler::handle_write_dgram (const ACE_Asynch_Write_Dgram::Result & /* result */) -{ -} - -void -ACE_Handler::handle_read_dgram (const ACE_Asynch_Read_Dgram::Result & /* result */) -{ -} - -void -ACE_Handler::handle_accept (const ACE_Asynch_Accept::Result & /* result */) -{ -} - -void -ACE_Handler::handle_connect (const ACE_Asynch_Connect::Result & /* result */) -{ -} - -void -ACE_Handler::handle_transmit_file (const ACE_Asynch_Transmit_File::Result & /* result */) -{ -} - -void -ACE_Handler::handle_read_file (const ACE_Asynch_Read_File::Result & /* result */) -{ -} - -void -ACE_Handler::handle_write_file (const ACE_Asynch_Write_File::Result & /* result */) -{ -} - -void -ACE_Handler::handle_time_out (const ACE_Time_Value & /* tv */, - const void * /* act */) -{ -} - -void -ACE_Handler::handle_wakeup (void) -{ -} - -ACE_Proactor * -ACE_Handler::proactor (void) -{ - return this->proactor_; -} - -void -ACE_Handler::proactor (ACE_Proactor *p) -{ - this->proactor_ = p; -} - -ACE_HANDLE -ACE_Handler::handle (void) const -{ - return this->handle_; -} - -void -ACE_Handler::handle (ACE_HANDLE h) -{ - this->handle_ = h; -} - -ACE_Refcounted_Auto_Ptr & -ACE_Handler::proxy (void) -{ - return this->proxy_; -} - -// ************************************************************ - -ACE_Service_Handler::ACE_Service_Handler (void) -{ -} - -ACE_Service_Handler::~ACE_Service_Handler (void) -{ -} - -void -ACE_Service_Handler::addresses (const ACE_INET_Addr & /* remote_address */, - const ACE_INET_Addr & /* local_address */ ) -{ -} - -void -ACE_Service_Handler::act (const void *) -{ -} - -void -ACE_Service_Handler::open (ACE_HANDLE, - ACE_Message_Block &) -{ -} - - -// ************************************************************ - -ACE_Asynch_Read_Dgram::ACE_Asynch_Read_Dgram (void) - : implementation_ (0) -{ -} - -ACE_Asynch_Read_Dgram::~ACE_Asynch_Read_Dgram (void) -{ - // Delete the implementation. - delete this->implementation_; - this->implementation_ = 0; -} - -int -ACE_Asynch_Read_Dgram::open (ACE_Handler &handler, - ACE_HANDLE handle, - const void *completion_key, - ACE_Proactor *proactor) -{ - // Get a proactor for/from the user. - proactor = this->get_proactor (proactor, handler); - - // Now let us get the implementation initialized. - if ((this->implementation_ = proactor->create_asynch_read_dgram ()) == 0) - return -1; - - // Call the method of the base class. - return ACE_Asynch_Operation::open (handler, - handle, - completion_key, - proactor); -} - -ssize_t -ACE_Asynch_Read_Dgram::recv (ACE_Message_Block *message_block, - size_t &number_of_bytes_recvd, - int flags, - int protocol_family, - const void *act, - int priority, - int signal_number) -{ - if (0 == this->implementation_) - { - errno = EFAULT; - return -1; - } - return this->implementation_->recv (message_block, - number_of_bytes_recvd, - flags, - protocol_family, - act, - priority, - signal_number); -} - -ACE_Asynch_Operation_Impl * -ACE_Asynch_Read_Dgram::implementation (void) const -{ - return this->implementation_; -} - -// ************************************************************ - -int -ACE_Asynch_Read_Dgram::Result::remote_address (ACE_Addr& addr) const -{ - return this->implementation ()->remote_address (addr); -} - -ACE_Message_Block* -ACE_Asynch_Read_Dgram::Result::message_block (void) const -{ - return this->implementation ()->message_block (); -} - -int -ACE_Asynch_Read_Dgram::Result::flags (void) const -{ - return this->implementation ()->flags (); -} - -size_t -ACE_Asynch_Read_Dgram::Result::bytes_to_read (void) const -{ - return this->implementation ()->bytes_to_read (); -} - -ACE_HANDLE -ACE_Asynch_Read_Dgram::Result::handle (void) const -{ - return this->implementation ()->handle(); -} - -ACE_Asynch_Read_Dgram::Result::Result (ACE_Asynch_Read_Dgram_Result_Impl *implementation) -: ACE_Asynch_Result (implementation), - implementation_ (implementation) -{ -} - -ACE_Asynch_Read_Dgram::Result::~Result (void) -{ -} - -ACE_Asynch_Read_Dgram_Result_Impl * -ACE_Asynch_Read_Dgram::Result::implementation (void) const -{ - return this->implementation_; -} - -// ************************************************************ - - -ACE_Asynch_Write_Dgram::ACE_Asynch_Write_Dgram (void) - : implementation_ (0) -{ -} - -ACE_Asynch_Write_Dgram::~ACE_Asynch_Write_Dgram (void) -{ - // Delete the implementation. - delete this->implementation_; - this->implementation_ = 0; -} - -int -ACE_Asynch_Write_Dgram::open (ACE_Handler &handler, - ACE_HANDLE handle, - const void *completion_key, - ACE_Proactor *proactor) -{ - // Get a proactor for/from the user. - proactor = this->get_proactor (proactor, handler); - - // Now let us get the implementation initialized. - if ((this->implementation_ = proactor->create_asynch_write_dgram ()) == 0) - return -1; - - // Call the method of the base class. - return ACE_Asynch_Operation::open (handler, - handle, - completion_key, - proactor); -} - -ssize_t -ACE_Asynch_Write_Dgram::send (ACE_Message_Block *message_block, - size_t &number_of_bytes_sent, - int flags, - const ACE_Addr& remote_addr, - const void *act, - int priority, - int signal_number) -{ - if (0 == this->implementation_) - { - errno = EFAULT; - return -1; - } - return this->implementation_->send (message_block, - number_of_bytes_sent, - flags, - remote_addr, - act, - priority, - signal_number); -} - -ACE_Asynch_Operation_Impl * -ACE_Asynch_Write_Dgram::implementation (void) const -{ - return this->implementation_; -} - -// ************************************************************ - -size_t -ACE_Asynch_Write_Dgram::Result::bytes_to_write (void) const -{ - return this->implementation ()->bytes_to_write (); -} - -ACE_Message_Block* -ACE_Asynch_Write_Dgram::Result::message_block () const -{ - return this->implementation ()->message_block (); -} - -int -ACE_Asynch_Write_Dgram::Result::flags (void) const -{ - return this->implementation ()->flags (); -} - -ACE_HANDLE -ACE_Asynch_Write_Dgram::Result::handle (void) const -{ - return this->implementation ()->handle (); -} - -ACE_Asynch_Write_Dgram_Result_Impl * -ACE_Asynch_Write_Dgram::Result::implementation (void) const -{ - return this->implementation_; -} - -ACE_Asynch_Write_Dgram::Result::Result (ACE_Asynch_Write_Dgram_Result_Impl *implementation) -: ACE_Asynch_Result (implementation), - implementation_ (implementation) -{ -} - -ACE_Asynch_Write_Dgram::Result::~Result (void) -{ -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_HAS_WIN32_OVERLAPPED_IO || ACE_HAS_AIO_CALLS */ diff --git a/modules/worldengine/deps/acelite/ace/Asynch_IO.h b/modules/worldengine/deps/acelite/ace/Asynch_IO.h deleted file mode 100644 index 6cc143d240..0000000000 --- a/modules/worldengine/deps/acelite/ace/Asynch_IO.h +++ /dev/null @@ -1,1760 +0,0 @@ -/* -*- C++ -*- */ - -//============================================================================= -/** - * @file Asynch_IO.h - * - * This works on Win32 (defined (ACE_WIN32) && !defined - * (ACE_HAS_WINCE)) platforms and on POSIX4 platforms with {aio_*} - * routines (defined (ACE_HAS_AIO_CALLS)) - * - * On Win32 platforms, the implementation of - * {ACE_Asynch_Transmit_File} and {ACE_Asynch_Accept} are only - * supported if ACE_HAS_WINSOCK2 is defined or you are on WinNT 4.0 - * or higher. - * - * @author Irfan Pyarali - * @author Tim Harrison - * @author Alexander Babu Arulanthu - * @author Roger Tragin - * @author Alexander Libman - */ -//============================================================================= - -#ifndef ACE_ASYNCH_IO_H -#define ACE_ASYNCH_IO_H -#include /**/ "ace/pre.h" - -#include /**/ "ace/ACE_export.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -#pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#if defined (ACE_HAS_WIN32_OVERLAPPED_IO) || defined (ACE_HAS_AIO_CALLS) - -#include "ace/Synch_Traits.h" -#if defined (ACE_HAS_THREADS) -# include "ace/Thread_Mutex.h" -#else -# include "ace/Null_Mutex.h" -#endif /* ACE_HAS_THREADS */ -#include "ace/Refcounted_Auto_Ptr.h" - -#include "ace/os_include/os_signal.h" -#include "ace/os_include/sys/os_socket.h" -#include "ace/os_include/sys/os_types.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -# if defined (ACE_HAS_WIN32_OVERLAPPED_IO) -typedef TRANSMIT_FILE_BUFFERS ACE_TRANSMIT_FILE_BUFFERS; -typedef LPTRANSMIT_FILE_BUFFERS ACE_LPTRANSMIT_FILE_BUFFERS; -typedef PTRANSMIT_FILE_BUFFERS ACE_PTRANSMIT_FILE_BUFFERS; - -# define ACE_INFINITE INFINITE -# define ACE_STATUS_TIMEOUT STATUS_TIMEOUT -# define ACE_WAIT_FAILED WAIT_FAILED -# define ACE_WAIT_TIMEOUT WAIT_TIMEOUT -# else /* ACE_HAS_WIN32_OVERLAPPED_IO */ -struct ACE_TRANSMIT_FILE_BUFFERS -{ - void *Head; - size_t HeadLength; - void *Tail; - size_t TailLength; -}; -typedef ACE_TRANSMIT_FILE_BUFFERS* ACE_PTRANSMIT_FILE_BUFFERS; -typedef ACE_TRANSMIT_FILE_BUFFERS* ACE_LPTRANSMIT_FILE_BUFFERS; - -# if !defined (ACE_INFINITE) -# define ACE_INFINITE LONG_MAX -# endif /* ACE_INFINITE */ -# define ACE_STATUS_TIMEOUT LONG_MAX -# define ACE_WAIT_FAILED LONG_MAX -# define ACE_WAIT_TIMEOUT LONG_MAX -# endif /* ACE_HAS_WIN32_OVERLAPPED_IO */ - -// Forward declarations -class ACE_Proactor; -class ACE_Handler; -class ACE_Message_Block; -class ACE_INET_Addr; -class ACE_Addr; - -// Forward declarations -class ACE_Asynch_Result_Impl; -class ACE_Time_Value; - -/** - * @class ACE_Asynch_Result - * - * @brief An interface base class which allows users access to common - * information related to an asynchronous operation. - * - * An interface base class from which you can obtain some basic - * information like the number of bytes transferred, the ACT - * associated with the asynchronous operation, indication of - * success or failure, etc. Subclasses may want to store more - * information that is particular to the asynchronous operation - * it represents. - */ -class ACE_Export ACE_Asynch_Result -{ - -public: - /// Number of bytes transferred by the operation. - size_t bytes_transferred (void) const; - - /// ACT associated with the operation. - const void *act (void) const; - - /// Did the operation succeed? - int success (void) const; - - /** - * This is the ACT associated with the handle on which the - * Asynch_Operation takes place. - * - * On WIN32, this returns the ACT associated with the handle when it - * was registered with the I/O completion port. - * - * @@ This is not implemented for POSIX4 platforms. Returns 0. - */ - const void *completion_key (void) const; - - /// Error value if the operation fails. - unsigned long error (void) const; - - /** - * On WIN32, this returns the event associated with the OVERLAPPED - * structure. - * - * This returns ACE_INVALID_HANDLE on POSIX4-Unix platforms. - */ - ACE_HANDLE event (void) const; - - /** - * This really makes sense only when doing file I/O. - * - * On WIN32, these are represented in the OVERLAPPED datastructure. - * - * @@ On POSIX4-Unix, offset_high should be supported using - * aiocb64. - */ - unsigned long offset (void) const; - unsigned long offset_high (void) const; - - /** - * Priority of the operation. - * - * On POSIX4-Unix, this is supported. Priority works like {nice} in - * Unix. Negative values are not allowed. 0 means priority of the - * operation same as the process priority. 1 means priority of the - * operation is one less than process. And so forth. - * - * On Win32, this is a no-op. - */ - int priority (void) const; - - /** - * POSIX4 real-time signal number to be used for the - * operation. {signal_number} ranges from ACE_SIGRTMIN to ACE_SIGRTMAX. By - * default, ACE_SIGRTMIN is used to issue {aio_} calls. This is a no-op - * on non-POSIX4 systems and returns 0. - */ - int signal_number (void) const; - - - /// Destructor. - virtual ~ACE_Asynch_Result (void); - -protected: - /// Constructor. This implementation will not be deleted. The - /// implementation will be deleted by the Proactor. - ACE_Asynch_Result (ACE_Asynch_Result_Impl *implementation); - - /// Get the implementation class. - ACE_Asynch_Result_Impl *implementation (void) const; - - /// Implementation class. - ACE_Asynch_Result_Impl *implementation_; -}; - -// Forward declarations -class ACE_Asynch_Operation_Impl; - -/** - * @class ACE_Asynch_Operation - * - * @brief This is an interface base class for all asynch - * operations. The resposiblility of this class is to forward - * all methods to its delegation/implementation class, e.g., - * ACE_WIN32_Asynch_Operation or ACE_POSIX_Asynch_Operation. - * - * There are some attributes and functionality which is common - * to all asychronous operations. The delegation classes of this - * class will factor out this code. - */ -class ACE_Export ACE_Asynch_Operation -{ - -public: - /** - * Initializes the factory with information which will be used with - * each asynchronous call. If ({handle} == ACE_INVALID_HANDLE), - * {ACE_Handler::handle} will be called on the {handler} to get the - * correct handle. - */ - int open (ACE_Handler &handler, - ACE_HANDLE handle, - const void *completion_key, - ACE_Proactor *proactor); - - /** - * (Attempts to) cancel the asynchronous operation pending against - * the {handle} registered with this Operation. - * - * All completion notifications for the I/O operations will occur - * normally. - * - * = Return Values: - * - * -1 : Operation failed. (can get only in POSIX). - * 0 : All the operations were cancelled. - * 1 : All the operations were already finished in this - * handle. Unable to cancel them. - * 2 : Atleast one of the requested operations cannot be - * cancelled. - * - * There is slight difference in the semantics between NT and POSIX - * platforms which is given below. - * - * = Win32 : - * - * cancels all pending accepts operations that were issued by the - * calling thread. The function does not cancel asynchronous - * operations issued by other threads. - * All I/O operations that are canceled will complete with the - * error ERROR_OPERATION_ABORTED. - * - * = POSIX: - * - * Attempts to cancel one or more asynchronous I/O requests - * currently outstanding against the {handle} registered in this - * operation. - * For requested operations that are successfully canceled, the - * associated error status is set to ECANCELED. - */ - int cancel (void); - - - // = Access methods. - - /// Return the underlying proactor. - ACE_Proactor* proactor (void) const; - - /// Destructor. - virtual ~ACE_Asynch_Operation (void); - -protected: - /// Constructor. - ACE_Asynch_Operation (void); - - /// Return the underlying implementation class. - virtual ACE_Asynch_Operation_Impl *implementation (void) const = 0; - - /// Get a proactor for/from the user - ACE_Proactor *get_proactor (ACE_Proactor *user_proactor, - ACE_Handler &handler) const; -}; - -// Forward declarations -class ACE_Asynch_Read_Stream_Result_Impl; -class ACE_Asynch_Read_Stream_Impl; - -/** - * @class ACE_Asynch_Read_Stream - * - * @brief This class is a factory for starting off asynchronous reads - * on a stream. This class forwards all methods to its - * implementation class. - * - * Once {open} is called, multiple asynchronous {read}s can - * started using this class. An ACE_Asynch_Read_Stream::Result - * will be passed back to the {handler} when the asynchronous - * reads completes through the {ACE_Handler::handle_read_stream} - * callback. - */ -class ACE_Export ACE_Asynch_Read_Stream : public ACE_Asynch_Operation -{ - -public: - /// A do nothing constructor. - ACE_Asynch_Read_Stream (void); - - /// Destructor - virtual ~ACE_Asynch_Read_Stream (void); - - /** - * Initializes the factory with information which will be used with - * each asynchronous call. - * - * @param handler The ACE_Handler that will be called to handle completions - * for operations initiated using this factory. - * @param handle The handle that future read operations will use. - * If handle == @c ACE_INVALID_HANDLE, - * ACE_Handler::handle() will be called on @ handler - * to get the correct handle. - * - * @retval 0 for success. - * @retval -1 for failure; consult @c errno for further information. - */ - int open (ACE_Handler &handler, - ACE_HANDLE handle = ACE_INVALID_HANDLE, - const void *completion_key = 0, - ACE_Proactor *proactor = 0); - - /** - * Initiate an asynchronous read operation. - * - * @param message_block The ACE_Message_Block to receive the data. - * Received bytes will be placed in the block - * beginning at its current write pointer. - * If data is read, the message block's write - * pointer will be advanced by the number of - * bytes read. - * @param num_bytes_to_read The maximum number of bytes to read. - * @param act Asynchronous Completion Token; passed through to - * the completion handler in the Result object. - * @param priority Priority of the operation. On POSIX4-Unix, - * this is supported. Works like @c nice in Unix. - * Negative values are not allowed. 0 means - * priority of the operation same as the process - * priority. 1 means priority of the operation is - * one less than process priority, etc. - * Ignored on Windows. - * @param signal_number The POSIX4 real-time signal number to be used - * to signal completion of the operation. Values - * range from ACE_SIGRTMIN to ACE_SIGRTMAX. - * This argument is ignored on non-POSIX4 systems. - */ - int read (ACE_Message_Block &message_block, - size_t num_bytes_to_read, - const void *act = 0, - int priority = 0, - int signal_number = ACE_SIGRTMIN); - -#if defined (ACE_HAS_WIN32_OVERLAPPED_IO) - /** - * Same as above but with scatter support, through chaining of composite - * message blocks using the continuation field. - */ - int readv (ACE_Message_Block &message_block, - size_t num_bytes_to_read, - const void *act = 0, - int priority = 0, - int signal_number = ACE_SIGRTMIN); -#endif /* defined (ACE_HAS_WIN32_OVERLAPPED_IO) */ - - /// Return the underlying implementation class. - // (this should be protected...) - virtual ACE_Asynch_Operation_Impl *implementation (void) const; - -protected: - /// Implementation class that all methods will be forwarded to. - ACE_Asynch_Read_Stream_Impl *implementation_; - -public: -/** - * @class Result - * - * @brief This is the class which will be passed back to the - * ACE_Handler::handle_read_stream when the asynchronous read completes. - * This class forwards all the methods to the implementation classes. - * - * This class has all the information necessary for the - * handler to uniquiely identify the completion of the - * asynchronous read. - */ - class ACE_Export Result : public ACE_Asynch_Result - { - - /// The concrete implementation result classes only construct this - /// class. - friend class ACE_POSIX_Asynch_Read_Stream_Result; - friend class ACE_WIN32_Asynch_Read_Stream_Result; - - public: - /// The number of bytes which were requested at the start of the - /// asynchronous read. - size_t bytes_to_read (void) const; - - /// Message block which contains the read data. - ACE_Message_Block &message_block (void) const; - - /// I/O handle used for reading. - ACE_HANDLE handle (void) const; - - /// Get the implementation class. - ACE_Asynch_Read_Stream_Result_Impl *implementation (void) const; - - protected: - /// Constructor. - Result (ACE_Asynch_Read_Stream_Result_Impl *implementation); - - /// Destructor. - virtual ~Result (void); - - /// The implementation class. - ACE_Asynch_Read_Stream_Result_Impl *implementation_; - }; -private: - ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Asynch_Read_Stream &)) - ACE_UNIMPLEMENTED_FUNC (ACE_Asynch_Read_Stream (const ACE_Asynch_Read_Stream &)) -}; - -// Forward declarations -class ACE_Asynch_Write_Stream_Impl; -class ACE_Asynch_Write_Stream_Result_Impl; - -/** - * @class ACE_Asynch_Write_Stream - * - * @brief This class is a factory for initiating asynchronous writes - * on a connected TCP/IP stream. This class forwards all methods to its - * implementation class. - * - * Once open() is called, multiple asynchronous writes can be - * started using this class. An ACE_Asynch_Write_Stream::Result - * will be passed to the ACE_Handler::handle_write_stream() method on the - * opened ACE_Handler object when the asynchronous write completes. - */ -class ACE_Export ACE_Asynch_Write_Stream : public ACE_Asynch_Operation -{ - -public: - /// A do nothing constructor. - ACE_Asynch_Write_Stream (void); - - /// Destructor. - virtual ~ACE_Asynch_Write_Stream (void); - - /** - * Initializes the factory with information which will be used with - * each asynchronous operation. - * - * @param handler ACE_Handler to be notified when operations initiated - * via this factory complete. The handle_write_stream() - * method will be called on this object. - * @param handle The socket handle to initiate write operations on. - * If handle is @c ACE_INVALID_HANDLE, - * ACE_Handler::handle() will be called on handler to - * get the handle value. - * @param completion_key A token that is passed to the completion handler. - * @param proactor The ACE_Proactor object which will control operation - * completion and dispatching the results to handler. - * If this is 0, the process's singleton ACE_Proactor - * will be used. - * - * @retval 0 for success. - * @retval -1 for failure; consult @c errno for further information. - */ - int open (ACE_Handler &handler, - ACE_HANDLE handle = ACE_INVALID_HANDLE, - const void *completion_key = 0, - ACE_Proactor *proactor = 0); - - /** - * Initiates an asynchronous write on a socket. If the operation completes - * the ACE_Handler object registered in open() will receive a completion - * callback via its handle_write_stream() method. - * - * @param bytes_to_write The number of bytes to write. - * @param message_block The ACE_Message_Block containing data to write. - * Data is written to the socket beginning at the - * block's rd_ptr. Upon successful completion - * of the write operation, the message_block rd_ptr - * is updated to reflect the data that was written. - * @param act Token that is passed through to the completion - * handler. - * @param priority Priority of the operation. This argument only has - * an affect on POSIX4-Unix. Works like @c nice in - * Unix; negative values are not allowed. 0 means - * priority of the operation same as the process - * priority. 1 means priority of the operation is one - * less than the process, and so forth. - * @param signal_number The POSIX4 real-time signal number to be used - * for the operation. signal_number ranges from - * ACE_SIGRTMIN to ACE_SIGRTMAX. This argument is - * not used on other platforms. - * - * @retval 0 for success, and the handle_write_stream associated - * with the opened ACE_Handler will be called. An - * instance of ACE_Asynch_Write_Stream::Result will be - * passed to the completion handler. - * @retval -1 for failure; consult @c errno for further information. - */ - int write (ACE_Message_Block &message_block, - size_t bytes_to_write, - const void *act = 0, - int priority = 0, - int signal_number = ACE_SIGRTMIN); - -#if defined (ACE_HAS_WIN32_OVERLAPPED_IO) - /** - * Same as above but with gather support, through chaining of composite - * message blocks using the continuation field. - */ - int writev (ACE_Message_Block &message_block, - size_t bytes_to_write, - const void *act = 0, - int priority = 0, - int signal_number = ACE_SIGRTMIN); -#endif /* defined (ACE_HAS_WIN32_OVERLAPPED_IO) */ - - /// Return the underlying implementation class. - /// @todo (this should be protected...) - virtual ACE_Asynch_Operation_Impl *implementation (void) const; - -protected: - /// Implementation class that all methods will be forwarded to. - ACE_Asynch_Write_Stream_Impl *implementation_; - -public: -/** - * @class Result - * - * @brief This is that class which will be passed back to the - * ACE_Handler when the asynchronous write completes. This class - * forwards all the methods to the implementation class. - * - * This class has all the information necessary for the - * handler to uniquiely identify the completion of the - * asynchronous write. - */ - class ACE_Export Result : public ACE_Asynch_Result - { - - /// The concrete implementation result classes only construct this - /// class. - friend class ACE_POSIX_Asynch_Write_Stream_Result; - friend class ACE_WIN32_Asynch_Write_Stream_Result; - - public: - /// The number of bytes which were requested at the start of the - /// asynchronous write. - size_t bytes_to_write (void) const; - - /// Message block that contains the data to be written. - ACE_Message_Block &message_block (void) const; - - /// I/O handle used for writing. - ACE_HANDLE handle (void) const; - - /// Get the implementation class. - ACE_Asynch_Write_Stream_Result_Impl *implementation (void) const; - - protected: - /// Constructor. - Result (ACE_Asynch_Write_Stream_Result_Impl *implementation); - - /// Destructor. - virtual ~Result (void); - - /// Implementation class. - ACE_Asynch_Write_Stream_Result_Impl *implementation_; - }; -private: - ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Asynch_Write_Stream &)) - ACE_UNIMPLEMENTED_FUNC (ACE_Asynch_Write_Stream (const ACE_Asynch_Write_Stream &)) -}; - -// Forward declarations -class ACE_Asynch_Read_File_Impl; -class ACE_Asynch_Read_File_Result_Impl; - -/** - * @class ACE_Asynch_Read_File - * - * @brief This class is a factory for starting off asynchronous reads - * on a file. This class forwards all methods to its - * implementation class. - * - * Once open() is called, multiple asynchronous reads can - * started using this class. An ACE_Asynch_Read_File::Result - * will be passed back to the completion handler's - * ACE_Handler::handle_read_file() method when each asynchronous - * read completes. - * This class differs slightly from ACE_Asynch_Read_Stream as it - * allows the user to specify an offset for the read. - */ -class ACE_Export ACE_Asynch_Read_File : public ACE_Asynch_Read_Stream -{ - -public: - /// A do nothing constructor. - ACE_Asynch_Read_File (void); - - /// Destructor. - virtual ~ACE_Asynch_Read_File (void); - - /** - * Initializes the factory with information which will be used with - * each asynchronous operation. - * - * @param handler ACE_Handler to be notified when operations initiated - * via this factory complete. The - * ACE_Handler::handle_read_file() method will be - * called on this object. - * @param handle The file handle to initiate read operations on. - * If handle is @c ACE_INVALID_HANDLE, - * ACE_Handler::handle() will be called on handler to - * get the handle value. - * @param completion_key A token that is passed to the completion handler. - * @param proactor The ACE_Proactor object which will control operation - * completion and dispatching the results to handler. - * If this is 0, the process's singleton ACE_Proactor - * will be used. - * - * @retval 0 for success. - * @retval -1 for failure; consult @c errno for further information. - */ - int open (ACE_Handler &handler, - ACE_HANDLE handle = ACE_INVALID_HANDLE, - const void *completion_key = 0, - ACE_Proactor *proactor = 0); - - /** - * This starts off an asynchronous read. Upto {bytes_to_read} will - * be read and stored in the {message_block}. The read will start - * at {offset} from the beginning of the file. Priority of the - * operation is specified by {priority}. On POSIX4-Unix, this is - * supported. Works like {nice} in Unix. Negative values are not - * allowed. 0 means priority of the operation same as the process - * priority. 1 means priority of the operation is one less than - * process. And so forth. On Win32, this argument is a no-op. - * {signal_number} is the POSIX4 real-time signal number to be used - * for the operation. {signal_number} ranges from ACE_SIGRTMIN to - * ACE_SIGRTMAX. This argument is a no-op on non-POSIX4 systems. - */ - int read (ACE_Message_Block &message_block, - size_t bytes_to_read, - unsigned long offset = 0, - unsigned long offset_high = 0, - const void *act = 0, - int priority = 0, - int signal_number = ACE_SIGRTMIN); - -#if (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) - /** - * Same as above but with scatter support, through chaining of composite - * message blocks using the continuation field. - * @note In win32 Each data block payload must be at least the size of a system - * memory page and must be aligned on a system memory page size boundary - */ - int readv (ACE_Message_Block &message_block, - size_t bytes_to_read, - unsigned long offset = 0, - unsigned long offset_high = 0, - const void *act = 0, - int priority = 0, - int signal_number = ACE_SIGRTMIN); -#endif /* (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) */ - - /// Return the underlying implementation class. - // (this should be protected...) - virtual ACE_Asynch_Operation_Impl *implementation (void) const; - -protected: - /// Delegation/implementation class that all methods will be - /// forwarded to. - ACE_Asynch_Read_File_Impl *implementation_; - -public: -/** - * @class Result - * - * @brief This is that class which will be passed back to the - * {handler} when the asynchronous read completes. This class - * forwards all the methods to the implementation class. - * - * This class has all the information necessary for the - * {handler} to uniquiely identify the completion of the - * asynchronous read. - * This class differs slightly from - * ACE_Asynch_Read_Stream::Result as it calls back - * {ACE_Handler::handle_read_file} on the {handler} instead of - * {ACE_Handler::handle_read_stream}. No additional state is - * required by this class as ACE_Asynch_Result can store the - * {offset}. - */ - class ACE_Export Result : public ACE_Asynch_Read_Stream::Result - { - - /// The concrete implementation result classes only construct this - /// class. - friend class ACE_POSIX_Asynch_Read_File_Result; - friend class ACE_WIN32_Asynch_Read_File_Result; - - public: - /// Get the implementation class. - ACE_Asynch_Read_File_Result_Impl *implementation (void) const; - - protected: - /// Constructor. This implementation will not be deleted. - Result (ACE_Asynch_Read_File_Result_Impl *implementation); - - /// Destructor. - virtual ~Result (void); - - /// The implementation class. - ACE_Asynch_Read_File_Result_Impl *implementation_; - - private: - /// Here just to provide an dummpy implementation, since the - /// one auto generated by MSVC is flagged as infinitely recursive - void operator= (Result &) {} - }; -private: - ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Asynch_Read_File &)) - ACE_UNIMPLEMENTED_FUNC (ACE_Asynch_Read_File (const ACE_Asynch_Read_File &)) -}; - -// Forward declarations -class ACE_Asynch_Write_File_Impl; -class ACE_Asynch_Write_File_Result_Impl; - -/** - * @class ACE_Asynch_Write_File - * - * @brief This class is a factory for starting off asynchronous writes - * on a file. This class forwards all methods to its - * implementation class. - * - * Once {open} is called, multiple asynchronous {write}s can be - * started using this class. A ACE_Asynch_Write_File::Result - * will be passed back to the {handler} when the asynchronous - * writes completes through the {ACE_Handler::handle_write_file} - * callback. - * This class differs slightly from ACE_Asynch_Write_Stream as - * it allows the user to specify an offset for the write. - */ -class ACE_Export ACE_Asynch_Write_File : public ACE_Asynch_Write_Stream -{ - -public: - /// A do nothing constructor. - ACE_Asynch_Write_File (void); - - /// Destructor. - virtual ~ACE_Asynch_Write_File (void); - - /** - * Initializes the factory with information which will be used with - * each asynchronous call. If ({handle} == ACE_INVALID_HANDLE), - * {ACE_Handler::handle} will be called on the {handler} to get the - * correct handle. - */ - int open (ACE_Handler &handler, - ACE_HANDLE handle = ACE_INVALID_HANDLE, - const void *completion_key = 0, - ACE_Proactor *proactor = 0); - - /** - * This starts off an asynchronous write. Upto {bytes_to_write} - * will be written from the {message_block}, starting at the - * block's {rd_ptr}. The write will go to the file, starting - * {offset} bytes from the beginning of the file. Priority of the - * operation is specified by {priority}. On POSIX4-Unix, this is - * supported. Works like {nice} in Unix. Negative values are not - * allowed. 0 means priority of the operation same as the process - * priority. 1 means priority of the operation is one less than - * process. And so forth. On Win32, this is a no-op. - * {signal_number} is the POSIX4 real-time signal number to be used - * for the operation. {signal_number} ranges from ACE_SIGRTMIN to - * ACE_SIGRTMAX. This argument is a no-op on non-POSIX4 systems. - */ - int write (ACE_Message_Block &message_block, - size_t bytes_to_write, - unsigned long offset = 0, - unsigned long offset_high = 0, - const void *act = 0, - int priority = 0, - int signal_number = ACE_SIGRTMIN); - -#if (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) - /** - * Same as above but with gather support, through chaining of composite - * message blocks using the continuation field. - * @note In win32 Each data block payload must be at least the size of a system - * memory page and must be aligned on a system memory page size boundary - */ - int writev (ACE_Message_Block &message_block, - size_t bytes_to_write, - unsigned long offset = 0, - unsigned long offset_high = 0, - const void *act = 0, - int priority = 0, - int signal_number = ACE_SIGRTMIN); -#endif /* (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) */ - - /// Return the underlying implementation class. - // (this should be protected...) - virtual ACE_Asynch_Operation_Impl *implementation (void) const; - -protected: - /// Implementation object. - ACE_Asynch_Write_File_Impl *implementation_; - -public: -/** - * @class Result - * - * @brief This is that class which will be passed back to the - * {handler} when the asynchronous write completes. This class - * forwards all the methods to the implementation class. - * - * This class has all the information necessary for the - * {handler} to uniquiely identify the completion of the - * asynchronous write. - * This class differs slightly from - * ACE_Asynch_Write_Stream::Result as it calls back - * {ACE_Handler::handle_write_file} on the {handler} instead - * of {ACE_Handler::handle_write_stream}. No additional state - * is required by this class as ACE_Asynch_Result can store - * the {offset}. - */ - class ACE_Export Result : public ACE_Asynch_Write_Stream::Result - { - - /// The concrete implementation result classes only construct this - /// class. - friend class ACE_POSIX_Asynch_Write_File_Result; - friend class ACE_WIN32_Asynch_Write_File_Result; - - public: - /// Get the implementation class. - ACE_Asynch_Write_File_Result_Impl *implementation (void) const; - - protected: - /// Constructor. This implementation will not be deleted. - Result (ACE_Asynch_Write_File_Result_Impl *implementation); - - /// Destructor. - virtual ~Result (void); - - /// The implementation class. - ACE_Asynch_Write_File_Result_Impl *implementation_; - - private: - /// Here just to provide an dummpy implementation, since the - /// one auto generated by MSVC is flagged as infinitely recursive - void operator= (Result &) {}; - }; -private: - ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Asynch_Write_File &)) - ACE_UNIMPLEMENTED_FUNC (ACE_Asynch_Write_File (const ACE_Asynch_Write_File &)) -}; - -// Forward declarations -class ACE_Asynch_Accept_Result_Impl; -class ACE_Asynch_Accept_Impl; - -/** - * @class ACE_Asynch_Accept - * - * @brief This class is a factory for starting off asynchronous accepts - * on a listen handle. This class forwards all methods to its - * implementation class. - * - * Once {open} is called, multiple asynchronous {accept}s can - * started using this class. A ACE_Asynch_Accept::Result will - * be passed back to the {handler} when the asynchronous accept - * completes through the {ACE_Handler::handle_accept} - * callback. - */ -class ACE_Export ACE_Asynch_Accept : public ACE_Asynch_Operation -{ - -public: - /// A do nothing constructor. - ACE_Asynch_Accept (void); - - /// Destructor. - virtual ~ACE_Asynch_Accept (void); - - /** - * Initializes the factory with information which will be used with - * each asynchronous call. If ({handle} == ACE_INVALID_HANDLE), - * {ACE_Handler::handle} will be called on the {handler} to get the - * correct handle. - */ - int open (ACE_Handler &handler, - ACE_HANDLE handle = ACE_INVALID_HANDLE, - const void *completion_key = 0, - ACE_Proactor *proactor = 0); - - /** - * This starts off an asynchronous accept. The asynchronous accept - * call also allows any initial data to be returned to the - * handler specified to @c open(). - * @param message_block A message block to receive initial data, as well - * as the local and remote addresses when the - * connection is made. Since the block receives - * the addresses regardless of whether or not - * initial data is available or requested, the - * message block size must be at least - * @a bytes_to_read plus two times the size of - * the addresses used (IPv4 or IPv6). - * @param bytes_to_read The maximum number of bytes of initial data - * to read into @a message_block. - * @param accept_handle The handle that the new connection will be - * accepted on. If @c INVALID_HANDLE, a new - * handle will be created using @a addr_family. - * @param act Value to be passed in result when operation - * completes. - * @param priority Priority of the operation. On POSIX4-Unix, this - * is supported. Works like @c nice in Unix. - * Negative values are not allowed. 0 means - * priority of the operation same as the process - * priority. 1 means priority of the operation is - * one less than process. And so forth. - * On Win32, this argument is ignored. - * @param signal_number The POSIX4 real-time signal number to be used - * for the operation. Value range is from - * @c ACE_SIGRTMIN to @c ACE_SIGRTMAX. - * This argument is ignored on non-POSIX4 systems. - * @param addr_family The address family to use if @a accept_handle - * is @c ACE_INVALID_HANDLE and a new handle must - * be opened. Values are @c AF_INET and @c PF_INET6. - */ - int accept (ACE_Message_Block &message_block, - size_t bytes_to_read, - ACE_HANDLE accept_handle = ACE_INVALID_HANDLE, - const void *act = 0, - int priority = 0, - int signal_number = ACE_SIGRTMIN, - int addr_family = AF_INET); - - /// Return the underlying implementation class. - // (this should be protected...) - virtual ACE_Asynch_Operation_Impl *implementation (void) const; - -protected: - /// Delegation/implementation class that all methods will be - /// forwarded to. - ACE_Asynch_Accept_Impl *implementation_; - -public: -/** - * @class Result - * - * @brief This is that class which will be passed back to the - * {handler} when the asynchronous accept completes. - * - * This class has all the information necessary for the - * {handler} to uniquiely identify the completion of the - * asynchronous accept. - */ - class ACE_Export Result : public ACE_Asynch_Result - { - - /// The concrete implementation result classes only construct this - /// class. - friend class ACE_POSIX_Asynch_Accept_Result; - friend class ACE_WIN32_Asynch_Accept_Result; - - public: - /// The number of bytes which were requested at the start of the - /// asynchronous accept. - size_t bytes_to_read (void) const; - - /// Message block which contains the read data. - ACE_Message_Block &message_block (void) const; - - /// I/O handle used for accepting new connections. - ACE_HANDLE listen_handle (void) const; - - /// I/O handle for the new connection. - ACE_HANDLE accept_handle (void) const; - - /// Get the implementation. - ACE_Asynch_Accept_Result_Impl *implementation (void) const; - - protected: - /// Contructor. Implementation will not be deleted. - Result (ACE_Asynch_Accept_Result_Impl *implementation); - - /// Destructor. - virtual ~Result (void); - - /// Impelmentation class. - ACE_Asynch_Accept_Result_Impl *implementation_; - }; -private: - ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Asynch_Accept &)) - ACE_UNIMPLEMENTED_FUNC (ACE_Asynch_Accept (const ACE_Asynch_Accept &)) -}; -// Forward declarations -class ACE_Asynch_Connect_Result_Impl; -class ACE_Asynch_Connect_Impl; - -/** - * @class ACE_Asynch_Connect - * - * @brief This class is a factory for starting off asynchronous connects - * This class forwards all methods to its implementation class. - * - * Once @c open is called, multiple asynchronous connect operationss can - * started using this class. A ACE_Asynch_Connect::Result will - * be passed back to the associated ACE_Handler when the asynchronous connect - * completes through the ACE_Handler::handle_connect() callback. - */ -class ACE_Export ACE_Asynch_Connect : public ACE_Asynch_Operation -{ - -public: - /// A do nothing constructor. - ACE_Asynch_Connect (void); - - /// Destructor. - virtual ~ACE_Asynch_Connect (void); - - /** - * Initializes the factory with information which will be used with - * each asynchronous call. - * - * @note @arg handle is ignored and should be @c ACE_INVALID_HANDLE. - */ - int open (ACE_Handler &handler, - ACE_HANDLE handle = ACE_INVALID_HANDLE, - const void *completion_key = 0, - ACE_Proactor *proactor = 0); - - /** - * This starts off an asynchronous Connect. - */ - int connect (ACE_HANDLE connect_handle, - const ACE_Addr & remote_sap, - const ACE_Addr & local_sap, - int reuse_addr, - const void *act=0, - int priority = 0, - int signal_number = ACE_SIGRTMIN); - - /// Return the underlying implementation class. - // (this should be protected...) - virtual ACE_Asynch_Operation_Impl *implementation (void) const; - -protected: - /// Delegation/implementation class that all methods will be - /// forwarded to. - ACE_Asynch_Connect_Impl *implementation_; - -public: -/** - * @class Result - * - * @brief This is that class which will be passed back to the - * handler when the asynchronous connect completes. - * - * This class has all the information necessary for the - * handler to uniquely identify the completion of the - * asynchronous connect. - */ - class ACE_Export Result : public ACE_Asynch_Result - { - - /// The concrete implementation result classes only construct this - /// class. - friend class ACE_POSIX_Asynch_Connect_Result; - friend class ACE_WIN32_Asynch_Connect_Result; - - public: - - /// I/O handle for the connection. - ACE_HANDLE connect_handle (void) const; - - /// Get the implementation. - ACE_Asynch_Connect_Result_Impl *implementation (void) const; - - protected: - /// Contructor. Implementation will not be deleted. - Result (ACE_Asynch_Connect_Result_Impl *implementation); - - /// Destructor. - virtual ~Result (void); - - /// Impelmentation class. - ACE_Asynch_Connect_Result_Impl *implementation_; - }; -private: - ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Asynch_Connect &)) - ACE_UNIMPLEMENTED_FUNC (ACE_Asynch_Connect (const ACE_Asynch_Connect &)) -}; - -// Forward declarations -class ACE_Asynch_Transmit_File_Result_Impl; -class ACE_Asynch_Transmit_File_Impl; - -/** - * @class ACE_Asynch_Transmit_File - * - * @brief This class is a factory for starting off asynchronous - * transmit files on a stream. - * - * Once {open} is called, multiple asynchronous {transmit_file}s - * can started using this class. A - * ACE_Asynch_Transmit_File::Result will be passed back to the - * {handler} when the asynchronous transmit file completes - * through the {ACE_Handler::handle_transmit_file} callback. - * The transmit_file function transmits file data over a - * connected network connection. The function uses the operating - * system's cache manager to retrieve the file data. This - * function provides high-performance file data transfer over - * network connections. This function would be of great use in - * a Web Server, Image Server, etc. - */ -class ACE_Export ACE_Asynch_Transmit_File : public ACE_Asynch_Operation -{ - -public: - // Forward declarations - class Header_And_Trailer; - - /// A do nothing constructor. - ACE_Asynch_Transmit_File (void); - - /// Destructor. - virtual ~ACE_Asynch_Transmit_File (void); - - /** - * Initializes the factory with information which will be used with - * each asynchronous call. If ({handle} == ACE_INVALID_HANDLE), - * {ACE_Handler::handle} will be called on the {handler} to get the - * correct handle. - */ - int open (ACE_Handler &handler, - ACE_HANDLE handle = ACE_INVALID_HANDLE, - const void *completion_key = 0, - ACE_Proactor *proactor = 0); - - /** - * This starts off an asynchronous transmit file. The {file} is a - * handle to an open file. {header_and_trailer} is a pointer to a - * data structure that contains pointers to data to send before and - * after the file data is sent. Set this parameter to 0 if you only - * want to transmit the file data. Upto {bytes_to_write} will be - * written to the {socket}. If you want to send the entire file, - * let {bytes_to_write} = 0. {bytes_per_send} is the size of each - * block of data sent per send operation. Please read the Win32 - * documentation on what the flags should be. Priority of the - * operation is specified by {priority}. On POSIX4-Unix, this is - * supported. Works like {nice} in Unix. Negative values are not - * allowed. 0 means priority of the operation same as the process - * priority. 1 means priority of the operation is one less than - * process. And so forth. On Win32, this is a no-op. - * {signal_number} is the POSIX4 real-time signal number to be used - * for the operation. {signal_number} ranges from ACE_SIGRTMIN to - * ACE_SIGRTMAX. This argument is a no-op on non-POSIX4 systems. - */ - int transmit_file (ACE_HANDLE file, - Header_And_Trailer *header_and_trailer = 0, - size_t bytes_to_write = 0, - unsigned long offset = 0, - unsigned long offset_high = 0, - size_t bytes_per_send = 0, - unsigned long flags = 0, - const void *act = 0, - int priority = 0, - int signal_number = ACE_SIGRTMIN); - - /// Return the underlying implementation class. - // (this should be protected...) - virtual ACE_Asynch_Operation_Impl *implementation (void) const; - -protected: - /// The implementation class. - ACE_Asynch_Transmit_File_Impl *implementation_; - -public: -/** - * @class Result - * - * @brief This is that class which will be passed back to the - * {handler} when the asynchronous transmit file completes. - * - * This class has all the information necessary for the - * {handler} to uniquiely identify the completion of the - * asynchronous transmit file. - */ - class ACE_Export Result : public ACE_Asynch_Result - { - - /// The concrete implementation result classes only construct this - /// class. - friend class ACE_POSIX_Asynch_Transmit_File_Result; - friend class ACE_WIN32_Asynch_Transmit_File_Result; - - public: - /// Socket used for transmitting the file. - ACE_HANDLE socket (void) const; - - /// File from which the data is read. - ACE_HANDLE file (void) const; - - /// Header and trailer data associated with this transmit file. - Header_And_Trailer *header_and_trailer (void) const; - - /// The number of bytes which were requested at the start of the - /// asynchronous transmit file. - size_t bytes_to_write (void) const; - - /// Number of bytes per send requested at the start of the transmit - /// file. - size_t bytes_per_send (void) const; - - /// Flags which were passed into transmit file. - unsigned long flags (void) const; - - /// Get the implementation class. - ACE_Asynch_Transmit_File_Result_Impl *implementation (void) const; - - protected: - /// Constructor. - Result (ACE_Asynch_Transmit_File_Result_Impl *implementation); - - /// Destructor. - virtual ~Result (void); - - /// The implementation class. - ACE_Asynch_Transmit_File_Result_Impl *implementation_; - }; - -/** - * @class Header_And_Trailer - * - * @brief The class defines a data structure that contains pointers - * to data to send before and after the file data is sent. - * - * This class provides a wrapper over TRANSMIT_FILE_BUFFERS - * and provided a consistent use of ACE_Message_Blocks. - */ - class ACE_Export Header_And_Trailer - { - - public: - /// Constructor. - Header_And_Trailer (ACE_Message_Block *header = 0, - size_t header_bytes = 0, - ACE_Message_Block *trailer = 0, - size_t trailer_bytes = 0); - - /// Destructor - virtual ~Header_And_Trailer (void); - - /// This method allows all the member to be set in one fell swoop. - void header_and_trailer (ACE_Message_Block *header = 0, - size_t header_bytes = 0, - ACE_Message_Block *trailer = 0, - size_t trailer_bytes = 0); - - /// Get header which goes before the file data. - ACE_Message_Block *header (void) const; - - /// Set header which goes before the file data. - void header (ACE_Message_Block *message_block); - - /// Get size of the header data. - size_t header_bytes (void) const; - - /// Set size of the header data. - void header_bytes (size_t bytes); - - /// Get trailer which goes after the file data. - ACE_Message_Block *trailer (void) const; - - /// Set trailer which goes after the file data. - void trailer (ACE_Message_Block *message_block); - - /// Get size of the trailer data. - size_t trailer_bytes (void) const; - - /// Set size of the trailer data. - void trailer_bytes (size_t bytes); - - /// Conversion routine. - ACE_LPTRANSMIT_FILE_BUFFERS transmit_buffers (void); - - protected: - /// Header data. - ACE_Message_Block *header_; - - /// Size of header data. - size_t header_bytes_; - - /// Trailer data. - ACE_Message_Block *trailer_; - - /// Size of trailer data. - size_t trailer_bytes_; - - /// Target data structure. - ACE_TRANSMIT_FILE_BUFFERS transmit_buffers_; - }; -private: - ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Asynch_Transmit_File &)) - ACE_UNIMPLEMENTED_FUNC (ACE_Asynch_Transmit_File (const ACE_Asynch_Transmit_File &)) -}; - - -// Forward declarations -class ACE_Asynch_Read_Dgram_Result_Impl; -class ACE_Asynch_Read_Dgram_Impl; -class ACE_Addr; - -/** - * @class ACE_Asynch_Read_Dgram - * - * @brief This class is a factory for starting off asynchronous reads - * on a UDP socket. This class forwards all methods to its - * implementation class. - * - * Once {open} is called, multiple asynchronous {read}s can be - * started using this class. An ACE_Asynch_Read_Dgram::Result - * will be passed back to the {handler} when the asynchronous - * reads completes through the {ACE_Handler::handle_read_dgram} - * callback. - */ -class ACE_Export ACE_Asynch_Read_Dgram : public ACE_Asynch_Operation -{ - -public: - /// A do nothing constructor. - ACE_Asynch_Read_Dgram (void); - - /// Destructor - virtual ~ACE_Asynch_Read_Dgram (void); - - /** - * Initializes the factory with information which will be used with - * each asynchronous call. If ({handle} == ACE_INVALID_HANDLE), - * {ACE_Handler::handle} will be called on the {handler} to get the - * correct handle. - */ - int open (ACE_Handler &handler, - ACE_HANDLE handle = ACE_INVALID_HANDLE, - const void *completion_key = 0, - ACE_Proactor *proactor = 0); - - /** This starts off an asynchronous read. Upto - * {message_block->total_size()} will be read and stored in the - * {message_block}. {message_block}'s {wr_ptr} will be updated to reflect - * the added bytes if the read operation is successfully completed. - * Return code of 1 means immediate success and {number_of_bytes_recvd} - * will contain number of bytes read. The {ACE_Handler::handle_read_dgram} - * method will still be called. Return code of 0 means the IO will - * complete proactively. Return code of -1 means there was an error, use - * errno to get the error code. - * - * Scatter/gather is supported on WIN32 by using the {message_block->cont()} - * method. Up to ACE_IOV_MAX {message_block}'s are supported. Upto - * {message_block->size()} bytes will be read into each {message block} for - * a total of {message_block->total_size()} bytes. All {message_block}'s - * {wr_ptr}'s will be updated to reflect the added bytes for each - * {message_block} - * - * Priority of the operation is specified by {priority}. On POSIX4-Unix, - * this is supported. Works like {nice} in Unix. Negative values are not - * allowed. 0 means priority of the operation same as the process - * priority. 1 means priority of the operation is one less than - * process. And so forth. On Win32, {priority} is a no-op. - * {signal_number} is the POSIX4 real-time signal number to be used - * for the operation. {signal_number} ranges from ACE_SIGRTMIN to - * ACE_SIGRTMAX. This argument is a no-op on non-POSIX4 systems. - */ - ssize_t recv (ACE_Message_Block *message_block, - size_t &number_of_bytes_recvd, - int flags, - int protocol_family = PF_INET, - const void *act = 0, - int priority = 0, - int signal_number = ACE_SIGRTMIN); - - /// Return the underlying implementation class. - // (this should be protected...) - virtual ACE_Asynch_Operation_Impl *implementation (void) const; - -protected: - /// Implementation class that all methods will be forwarded to. - ACE_Asynch_Read_Dgram_Impl *implementation_; - -public: -/** - * @class Result - * - * @brief This is the class which will be passed back to the - * {handler} when the asynchronous read completes. This class - * forwards all the methods to the implementation classes. - * - * This class has all the information necessary for the - * {handler} to uniquiely identify the completion of the - * asynchronous read. - */ - class ACE_Export Result : public ACE_Asynch_Result - { - - /// The concrete implementation result classes only construct this - /// class. - friend class ACE_POSIX_Asynch_Read_Dgram_Result; - friend class ACE_WIN32_Asynch_Read_Dgram_Result; - - public: - - /// The number of bytes which were requested at the start of the - /// asynchronous read. - size_t bytes_to_read (void) const; - - /// Message block which contains the read data - ACE_Message_Block *message_block (void) const; - - /// The flags used in the read - int flags (void) const; - - /// The address of where the packet came from - int remote_address (ACE_Addr& addr) const; - - /// I/O handle used for reading. - ACE_HANDLE handle (void) const; - - /// Get the implementation class. - ACE_Asynch_Read_Dgram_Result_Impl *implementation (void) const; - - protected: - /// Constructor. - Result (ACE_Asynch_Read_Dgram_Result_Impl *implementation); - - /// Destructor. - virtual ~Result (void); - - /// The implementation class. - ACE_Asynch_Read_Dgram_Result_Impl *implementation_; - }; -private: - ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Asynch_Read_Dgram &)) - ACE_UNIMPLEMENTED_FUNC (ACE_Asynch_Read_Dgram (const ACE_Asynch_Read_Dgram &)) -}; - -// Forward declarations -class ACE_Asynch_Write_Dgram_Impl; -class ACE_Asynch_Write_Dgram_Result_Impl; - -/** - * @class ACE_Asynch_Write_Dgram - * - * @brief This class is a factory for starting off asynchronous writes - * on a UDP socket. This class forwards all methods to its - * implementation class. - * - * Once {open} is called, multiple asynchronous {writes}s can - * started using this class. An ACE_Asynch_Write_Dgram::Result - * will be passed back to the {handler} when the asynchronous - * write completes through the - * {ACE_Handler::handle_write_dgram} callback. - */ -class ACE_Export ACE_Asynch_Write_Dgram : public ACE_Asynch_Operation -{ - -public: - /// A do nothing constructor. - ACE_Asynch_Write_Dgram (void); - - /// Destructor. - virtual ~ACE_Asynch_Write_Dgram (void); - - /** - * Initializes the factory with information which will be used with - * each asynchronous call. If ({handle} == ACE_INVALID_HANDLE), - * {ACE_Handler::handle} will be called on the {handler} to get the - * correct handle. - */ - int open (ACE_Handler &handler, - ACE_HANDLE handle = ACE_INVALID_HANDLE, - const void *completion_key = 0, - ACE_Proactor *proactor = 0); - - /** This starts off an asynchronous send. Upto - * {message_block->total_length()} will be sent. {message_block}'s - * {rd_ptr} will be updated to reflect the sent bytes if the send operation - * is successfully completed. - * Return code of 1 means immediate success and {number_of_bytes_sent} - * is updated to number of bytes sent. The {ACE_Handler::handle_write_dgram} - * method will still be called. Return code of 0 means the IO will - * complete proactively. Return code of -1 means there was an error, use - * errno to get the error code. - * - * Scatter/gather is supported on WIN32 by using the {message_block->cont()} - * method. Up to ACE_IOV_MAX {message_block}'s are supported. Upto - * {message_block->length()} bytes will be sent from each {message block} - * for a total of {message_block->total_length()} bytes. All - * {message_block}'s {rd_ptr}'s will be updated to reflect the bytes sent - * from each {message_block}. - * - * Priority of the operation is specified by {priority}. On POSIX4-Unix, - * this is supported. Works like {nice} in Unix. Negative values are not - * allowed. 0 means priority of the operation same as the process - * priority. 1 means priority of the operation is one less than - * process. And so forth. On Win32, this argument is a no-op. - * {signal_number} is the POSIX4 real-time signal number to be used - * for the operation. {signal_number} ranges from ACE_SIGRTMIN to - * ACE_SIGRTMAX. This argument is a no-op on non-POSIX4 systems. - */ - ssize_t send (ACE_Message_Block *message_block, - size_t &number_of_bytes_sent, - int flags, - const ACE_Addr& remote_addr, - const void *act = 0, - int priority = 0, - int signal_number = ACE_SIGRTMIN); - - /// Return the underlying implementation class. - // (this should be protected...) - virtual ACE_Asynch_Operation_Impl *implementation (void) const; - -protected: - /// Implementation class that all methods will be forwarded to. - ACE_Asynch_Write_Dgram_Impl *implementation_; - -public: -/** - * @class Result - * - * @brief This is that class which will be passed back to the - * {handler} when the asynchronous write completes. This class - * forwards all the methods to the implementation class. - * - * This class has all the information necessary for the - * {handler} to uniquiely identify the completion of the - * asynchronous write. - */ - class ACE_Export Result : public ACE_Asynch_Result - { - - /// The concrete implementation result classes only construct this - /// class. - friend class ACE_POSIX_Asynch_Write_Dgram_Result; - friend class ACE_WIN32_Asynch_Write_Dgram_Result; - - public: - - /// The number of bytes which were requested at the start of the - /// asynchronous write. - size_t bytes_to_write (void) const; - - /// Message block which contains the sent data - ACE_Message_Block *message_block (void) const; - - /// The flags using in the write - int flags (void) const; - - /// I/O handle used for writing. - ACE_HANDLE handle (void) const; - - /// Get the implementation class. - ACE_Asynch_Write_Dgram_Result_Impl *implementation (void) const; - - protected: - /// Constructor. - Result (ACE_Asynch_Write_Dgram_Result_Impl *implementation); - - /// Destructor. - virtual ~Result (void); - - /// Implementation class. - ACE_Asynch_Write_Dgram_Result_Impl *implementation_; - }; -private: - ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Asynch_Write_Dgram &)) - ACE_UNIMPLEMENTED_FUNC (ACE_Asynch_Write_Dgram (const ACE_Asynch_Write_Dgram &)) -}; - - -/** - * @class ACE_Handler - * - * @brief This base class defines the interface for receiving the - * results of asynchronous operations. - * - * Subclasses of this class will fill in appropriate methods. - */ -class ACE_Export ACE_Handler -{ -public: - /// A do nothing constructor. - ACE_Handler (void); - - /// A do nothing constructor which allows proactor to be set to \. - ACE_Handler (ACE_Proactor *p); - - /// Virtual destruction. - virtual ~ACE_Handler (void); - - /// This method will be called when an asynchronous read completes on - /// a stream. - virtual void handle_read_stream (const ACE_Asynch_Read_Stream::Result &result); - - /// This method will be called when an asynchronous write completes - /// on a UDP socket. - virtual void handle_write_dgram (const ACE_Asynch_Write_Dgram::Result &result); - - /// This method will be called when an asynchronous read completes on - /// a UDP socket. - virtual void handle_read_dgram (const ACE_Asynch_Read_Dgram::Result &result); - - /// This method will be called when an asynchronous write completes - /// on a stream. - virtual void handle_write_stream (const ACE_Asynch_Write_Stream::Result &result); - - /// This method will be called when an asynchronous read completes on - /// a file. - virtual void handle_read_file (const ACE_Asynch_Read_File::Result &result); - - /// This method will be called when an asynchronous write completes - /// on a file. - virtual void handle_write_file (const ACE_Asynch_Write_File::Result &result); - - /// This method will be called when an asynchronous accept completes. - virtual void handle_accept (const ACE_Asynch_Accept::Result &result); - - /// This method will be called when an asynchronous connect completes. - virtual void handle_connect (const ACE_Asynch_Connect::Result &result); - - /// This method will be called when an asynchronous transmit file - /// completes. - virtual void handle_transmit_file (const ACE_Asynch_Transmit_File::Result &result); - - /// Called when timer expires. {tv} was the requested time value and - /// {act} is the ACT passed when scheduling the timer. - virtual void handle_time_out (const ACE_Time_Value &tv, - const void *act = 0); - - /** - * This is method works with the {run_event_loop} of the - * ACE_Proactor. A special {Wake_Up_Completion} is used to wake up - * all the threads that are blocking for completions. - */ - virtual void handle_wakeup (void); - - /// Get the proactor associated with this handler. - ACE_Proactor *proactor (void); - - /// Set the proactor. - void proactor (ACE_Proactor *p); - - /** - * Get the I/O handle used by this {handler}. This method will be - * called by the ACE_Asynch_* classes when an ACE_INVALID_HANDLE is - * passed to {open}. - */ - virtual ACE_HANDLE handle (void) const; - - /// Set the ACE_HANDLE value for this Handler. - virtual void handle (ACE_HANDLE); - - /** - * @class Proxy - * - * @brief The Proxy class acts as a proxy for dispatch of completions - * to operations issued for the associated handler. It allows the handler - * to be deleted while operations are outstanding. The proxy must be used - * to get the ACE_Handler pointer for dispatching, and if it's 0, the - * handler is no longer valid and the result should not be dispatched. - */ - class ACE_Export Proxy - { - public: - Proxy (ACE_Handler *handler) : handler_ (handler) {}; - void reset (void) { this->handler_ = 0; }; - ACE_Handler *handler (void) { return this->handler_; }; - private: - ACE_Handler *handler_; - }; - typedef ACE_Refcounted_Auto_Ptr - Proxy_Ptr; - - Proxy_Ptr &proxy (void); - -protected: - /// The proactor associated with this handler. - ACE_Proactor *proactor_; - - /// The ACE_HANDLE in use with this handler. - ACE_HANDLE handle_; - - /// Refers to proxy for this handler. - ACE_Refcounted_Auto_Ptr proxy_; - -private: - ACE_UNIMPLEMENTED_FUNC (ACE_Handler (const ACE_Handler &)) - ACE_UNIMPLEMENTED_FUNC (ACE_Handler operator= (const ACE_Handler &)) -}; - -// Forward declarations -class ACE_INET_Addr; - -// Forward declarations -template -class ACE_Asynch_Acceptor; - -/** - * @class ACE_Service_Handler - * - * @brief This base class defines the interface for the - * ACE_Asynch_Acceptor to call into when new connection are - * accepted. - * - * Subclasses of this class will fill in appropriate methods to - * define application specific behavior. - */ -class ACE_Export ACE_Service_Handler : public ACE_Handler -{ - - /// The Acceptor is the factory and therefore should have special - /// privileges. - friend class ACE_Asynch_Acceptor; - -public: - /// A do nothing constructor. - ACE_Service_Handler (void); - - /// Virtual destruction. - virtual ~ACE_Service_Handler (void); - - /** - * {open} is called by ACE_Asynch_Acceptor to initialize a new - * instance of ACE_Service_Handler that has been created after the - * new connection is accepted. The handle for the new connection is - * passed along with the initial data that may have shown up. - */ - virtual void open (ACE_HANDLE new_handle, - ACE_Message_Block &message_block); - - // protected: - // This should be corrected after the correct semantics of the - // friend has been figured out. - - /// Called by ACE_Asynch_Acceptor to pass the addresses of the new - /// connections. - virtual void addresses (const ACE_INET_Addr &remote_address, - const ACE_INET_Addr &local_address); - - /// Called by ACE_Asynch_Acceptor to pass the act. - virtual void act (const void *); -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_WIN32 || ACE_HAS_AIO_CALLS*/ -#include /**/ "ace/post.h" -#endif /* ACE_ASYNCH_IO_H */ diff --git a/modules/worldengine/deps/acelite/ace/Asynch_IO_Impl.cpp b/modules/worldengine/deps/acelite/ace/Asynch_IO_Impl.cpp deleted file mode 100644 index 1f25a1ee7b..0000000000 --- a/modules/worldengine/deps/acelite/ace/Asynch_IO_Impl.cpp +++ /dev/null @@ -1,115 +0,0 @@ -#include "ace/Asynch_IO_Impl.h" - -#if defined (ACE_HAS_WIN32_OVERLAPPED_IO) || defined (ACE_HAS_AIO_CALLS) -// This only works on Win32 platforms and on Unix platforms supporting -// aio calls. - -#if !defined (__ACE_INLINE__) -#include "ace/Asynch_IO_Impl.inl" -#endif /* __ACE_INLINE__ */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_Asynch_Result_Impl::~ACE_Asynch_Result_Impl (void) -{ -} - -ACE_Asynch_Operation_Impl::~ACE_Asynch_Operation_Impl (void) -{ -} - -ACE_Asynch_Read_Stream_Impl::~ACE_Asynch_Read_Stream_Impl (void) -{ -} - -ACE_Asynch_Read_Stream_Result_Impl::~ACE_Asynch_Read_Stream_Result_Impl (void) -{ -} - -ACE_Asynch_Write_Stream_Impl::~ACE_Asynch_Write_Stream_Impl (void) -{ -} - -ACE_Asynch_Write_Stream_Result_Impl::~ACE_Asynch_Write_Stream_Result_Impl (void) -{ -} - -ACE_Asynch_Read_File_Impl::~ACE_Asynch_Read_File_Impl (void) -{ -} - -ACE_Asynch_Write_File_Impl::~ACE_Asynch_Write_File_Impl (void) -{ -} - -ACE_Asynch_Read_File_Result_Impl::~ACE_Asynch_Read_File_Result_Impl (void) -{ -} - -ACE_Asynch_Write_File_Result_Impl::~ACE_Asynch_Write_File_Result_Impl (void) -{ -} - -ACE_Asynch_Accept_Result_Impl::~ACE_Asynch_Accept_Result_Impl (void) -{ -} - -ACE_Asynch_Connect_Result_Impl::~ACE_Asynch_Connect_Result_Impl (void) -{ -} - -ACE_Asynch_Accept_Impl::~ACE_Asynch_Accept_Impl (void) -{ -} - -ACE_Asynch_Connect_Impl::~ACE_Asynch_Connect_Impl (void) -{ -} - -ACE_Asynch_Transmit_File_Impl::~ACE_Asynch_Transmit_File_Impl (void) -{ -} - -ACE_Asynch_Transmit_File_Result_Impl::~ACE_Asynch_Transmit_File_Result_Impl (void) -{ -} - -ACE_Asynch_Read_Dgram_Impl::~ACE_Asynch_Read_Dgram_Impl (void) -{ -} - -ACE_Asynch_Read_Dgram_Impl::ACE_Asynch_Read_Dgram_Impl (void) -{ -} - -ACE_Asynch_Write_Dgram_Impl::~ACE_Asynch_Write_Dgram_Impl (void) -{ -} - -ACE_Asynch_Write_Dgram_Impl::ACE_Asynch_Write_Dgram_Impl (void) -{ -} - -//*********************************************** - -ACE_Asynch_Read_Dgram_Result_Impl::~ACE_Asynch_Read_Dgram_Result_Impl (void) -{ -} - -ACE_Asynch_Read_Dgram_Result_Impl::ACE_Asynch_Read_Dgram_Result_Impl (void) -{ -} - -//*********************************************** - -ACE_Asynch_Write_Dgram_Result_Impl::~ACE_Asynch_Write_Dgram_Result_Impl (void) -{ -} - -ACE_Asynch_Write_Dgram_Result_Impl::ACE_Asynch_Write_Dgram_Result_Impl (void) -{ -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_HAS_WIN32_OVERLAPPED_IO || ACE_HAS_AIO_CALLS */ diff --git a/modules/worldengine/deps/acelite/ace/Asynch_IO_Impl.h b/modules/worldengine/deps/acelite/ace/Asynch_IO_Impl.h deleted file mode 100644 index a4ec996df1..0000000000 --- a/modules/worldengine/deps/acelite/ace/Asynch_IO_Impl.h +++ /dev/null @@ -1,793 +0,0 @@ -/* -*- C++ -*- */ - -//============================================================================= -/** - * @file Asynch_IO_Impl.h - * - * This class contains asbtract base classes for all the concrete - * implementation classes for the various asynchronous operations - * that are used with the Praoctor. - * - * @author Irfan Pyarali (irfan@cs.wustl.edu) - * @author Tim Harrison (harrison@cs.wustl.edu) - * @author Alexander Babu Arulanthu - * @author Roger Tragin - * @author Alexander Libman - */ -//============================================================================= - -#ifndef ACE_ASYNCH_IO_IMPL_H -#define ACE_ASYNCH_IO_IMPL_H -#include /**/ "ace/pre.h" - -#include /**/ "ace/config-all.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -#pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#if defined (ACE_HAS_WIN32_OVERLAPPED_IO) || defined (ACE_HAS_AIO_CALLS) -// This only works on Win32 platforms and on Unix platforms supporting -// aio calls. - -#include "ace/Asynch_IO.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -// Forward declaration. -class ACE_Proactor_Impl; - -/** - * @class ACE_Asynch_Result_Impl - * - * @brief Abstract base class for the all the classes that provide - * concrete implementations for ACE_Asynch_Result. - */ -class ACE_Export ACE_Asynch_Result_Impl -{ -public: - virtual ~ACE_Asynch_Result_Impl (void); - - /// Number of bytes transferred by the operation. - virtual size_t bytes_transferred (void) const = 0; - - /// ACT associated with the operation. - virtual const void *act (void) const = 0; - - /// Did the operation succeed? - virtual int success (void) const = 0; - - /// This ACT is not the same as the ACT associated with the - /// asynchronous operation. - virtual const void *completion_key (void) const = 0; - - /// Error value if the operation fail. - virtual u_long error (void) const = 0; - - /// Event associated with the OVERLAPPED structure. - virtual ACE_HANDLE event (void) const = 0; - - /// This really make sense only when doing file I/O. - virtual u_long offset (void) const = 0; - virtual u_long offset_high (void) const = 0; - - /// Priority of the operation. - virtual int priority (void) const = 0; - - /** - * POSIX4 real-time signal number to be used for the - * operation. signal_number ranges from SIGRTMIN to SIGRTMAX. By - * default, SIGRTMIN is used to issue calls. This is a no-op - * on non-POSIX4 systems and returns 0. - */ - virtual int signal_number (void) const = 0; - - // protected: - // - // These two should really be protected. But sometimes it - // simplifies code to be able to "fake" a result. Use carefully. - /// This is called when the asynchronous operation completes. - virtual void complete (size_t bytes_transferred, - int success, - const void *completion_key, - u_long error = 0) = 0; - - /// Post @c this to the Proactor's completion port. - virtual int post_completion (ACE_Proactor_Impl *proactor) = 0; - -protected: - /// Do-nothing constructor. - ACE_Asynch_Result_Impl (void); -}; - -/** - * @class ACE_Asynch_Operation_Impl - * - * @brief Abstract base class for all the concrete implementation - * classes that provide different implementations for the - * ACE_Asynch_Operation. - */ -class ACE_Export ACE_Asynch_Operation_Impl -{ -public: - virtual ~ACE_Asynch_Operation_Impl (void); - - /** - * Initializes the factory with information which will be used with - * each asynchronous call. If @a handle == ACE_INVALID_HANDLE, - * ACE_Handler::handle() will be called on the proxied handler to get the - * correct handle. - */ - virtual int open (const ACE_Handler::Proxy_Ptr &handler_proxy, - ACE_HANDLE handle, - const void *completion_key, - ACE_Proactor *proactor) = 0; - - /** - * This cancels all pending accepts operations that were issued by - * the calling thread. The function does not cancel asynchronous - * operations issued by other threads. - */ - virtual int cancel (void) = 0; - - // = Access methods. - - /// Return the underlying proactor. - virtual ACE_Proactor* proactor (void) const = 0; - -protected: - /// Do-nothing constructor. - ACE_Asynch_Operation_Impl (void); -}; - -/** - * @class ACE_Asynch_Read_Stream_Impl - * - * @brief Abstract base class for all the concrete implementation - * classes that provide different implementations for the - * ACE_Asynch_Read_Stream - */ -class ACE_Export ACE_Asynch_Read_Stream_Impl : public virtual ACE_Asynch_Operation_Impl -{ -public: - virtual ~ACE_Asynch_Read_Stream_Impl (void); - - /// This starts off an asynchronous read. Upto @a bytes_to_read will - /// be read and stored in the @a message_block. - virtual int read (ACE_Message_Block &message_block, - size_t bytes_to_read, - const void *act, - int priority, - int signal_number) = 0; - -#if (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) - /** - * Same as above but with scatter support, through chaining of composite - * message blocks using the continuation field. - */ - virtual int readv (ACE_Message_Block &message_block, - size_t bytes_to_read, - const void *act, - int priority, - int signal_number) = 0; -#endif /* (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) */ - -protected: - /// Do-nothing constructor. - ACE_Asynch_Read_Stream_Impl (void); -}; - -/** - * @class ACE_Asynch_Read_Stream_Result_Impl - * - * @brief Abstract base class for all the concrete implementation - * classes that provide different implementations for the - * ACE_Asynch_Read_Stream::Result class. - */ -class ACE_Export ACE_Asynch_Read_Stream_Result_Impl : public virtual ACE_Asynch_Result_Impl -{ -public: - virtual ~ACE_Asynch_Read_Stream_Result_Impl (void); - - /// The number of bytes which were requested at the start of the - /// asynchronous read. - virtual size_t bytes_to_read (void) const = 0; - - /// Message block which contains the read data. - virtual ACE_Message_Block &message_block (void) const = 0; - - /// I/O handle used for reading. - virtual ACE_HANDLE handle (void) const = 0; - -protected: - /// Do-nothing constructor. - ACE_Asynch_Read_Stream_Result_Impl (void); -}; - -/** - * @class ACE_Asynch_Write_Stream_Impl - * - * @brief Abstract base class for all the concrete implementation - * classes that provide different implementations for the - * ACE_Asynch_Write_Stream class. - */ -class ACE_Export ACE_Asynch_Write_Stream_Impl : public virtual ACE_Asynch_Operation_Impl -{ -public: - virtual ~ACE_Asynch_Write_Stream_Impl (void); - - /// This starts off an asynchronous write. Upto @a bytes_to_write - /// will be written from the @a message_block. - virtual int write (ACE_Message_Block &message_block, - size_t bytes_to_write, - const void *act, - int priority, - int signal_number) = 0; - -#if (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) - /** - * Same as above but with gather support, through chaining of composite - * message blocks using the continuation field. - */ - virtual int writev (ACE_Message_Block &message_block, - size_t bytes_to_write, - const void *act, - int priority, - int signal_number) = 0; -#endif /* (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) */ - -protected: - /// Do-nothing constructor. - ACE_Asynch_Write_Stream_Impl (void); -}; - -/** - * @class ACE_Asynch_Write_Stream_Result_Impl - * - * @brief Abstract base class for all the concrete implementation - * classes that provide different implementations for the - * ACE_Asynch_Write_Stream::Result. - */ -class ACE_Export ACE_Asynch_Write_Stream_Result_Impl : public virtual ACE_Asynch_Result_Impl -{ -public: - virtual ~ACE_Asynch_Write_Stream_Result_Impl (void); - - /// The number of bytes which were requested at the start of the - /// asynchronous write. - virtual size_t bytes_to_write (void) const = 0; - - /// Message block that contains the data to be written. - virtual ACE_Message_Block &message_block (void) const = 0; - - /// I/O handle used for writing. - virtual ACE_HANDLE handle (void) const = 0; - -protected: - /// Do-nothing constructor. - ACE_Asynch_Write_Stream_Result_Impl (void); -}; - -/** - * @class ACE_Asynch_Read_File_Impl - * - * @brief Abstract base class for all the concrete implementation - * classes that provide different implementations for the - * ACE_Asynch_Read_File::Result. - */ -class ACE_Export ACE_Asynch_Read_File_Impl : public virtual ACE_Asynch_Read_Stream_Impl -{ -public: - virtual ~ACE_Asynch_Read_File_Impl (void); - - /** - * This starts off an asynchronous read. Upto @a bytes_to_read will - * be read and stored in the @a message_block. The read will start - * at @a offset from the beginning of the file. - */ - virtual int read (ACE_Message_Block &message_block, - size_t bytes_to_read, - u_long offset, - u_long offset_high, - const void *act, - int priority, - int signal_number) = 0; - -#if (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) - /** - * Same as above but with scatter support, through chaining of composite - * message blocks using the continuation field. - * @note In win32 Each data block payload must be at least the size of a system - * memory page and must be aligned on a system memory page size boundary - */ - virtual int readv (ACE_Message_Block &message_block, - size_t bytes_to_read, - u_long offset, - u_long offset_high, - const void *act, - int priority, - int signal_number) = 0; -#endif /* (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) */ - - /// This starts off an asynchronous read. Upto @a bytes_to_read will - /// be read and stored in the @a message_block. - virtual int read (ACE_Message_Block &message_block, - size_t bytes_to_read, - const void *act, - int priority, - int signal_number) = 0; - -#if (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) - /** - * Same as above but with scatter support, through chaining of composite - * message blocks using the continuation field. - */ - virtual int readv (ACE_Message_Block &message_block, - size_t bytes_to_read, - const void *act, - int priority, - int signal_number) = 0; -#endif /* (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) */ - -protected: - /// Do-nothing constructor. - ACE_Asynch_Read_File_Impl (void); -}; - -/** - * @class ACE_Asynch_Read_File_Result_Impl - * - * @brief This is the abstract base class for all the concrete - * implementation classes for ACE_Asynch_Read_File::Result. - */ -class ACE_Export ACE_Asynch_Read_File_Result_Impl : public virtual ACE_Asynch_Read_Stream_Result_Impl -{ -public: - /// Destructor. - virtual ~ACE_Asynch_Read_File_Result_Impl (void); - -protected: - /// Do-nothing constructor. - ACE_Asynch_Read_File_Result_Impl (void); -}; - -/** - * @class ACE_Asynch_Write_File_Impl - * - * @brief Abstract base class for all the concrete implementation - * classes that provide different implementations for the - * ACE_Asynch_Write_File. - */ -class ACE_Export ACE_Asynch_Write_File_Impl : public virtual ACE_Asynch_Write_Stream_Impl -{ -public: - virtual ~ACE_Asynch_Write_File_Impl (void); - - /** - * This starts off an asynchronous write. Upto @a bytes_to_write - * will be write and stored in the @a message_block. The write will - * start at @a offset from the beginning of the file. - */ - virtual int write (ACE_Message_Block &message_block, - size_t bytes_to_write, - u_long offset, - u_long offset_high, - const void *act, - int priority, - int signal_number) = 0; - -#if (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) - /** - * Same as above but with gather support, through chaining of composite - * message blocks using the continuation field. - * @note In win32 Each data block payload must be at least the size of a system - * memory page and must be aligned on a system memory page size boundary - */ - virtual int writev (ACE_Message_Block &message_block, - size_t bytes_to_write, - u_long offset, - u_long offset_high, - const void *act, - int priority, - int signal_number) = 0; -#endif /* (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) */ - - /// This starts off an asynchronous write. Upto @a bytes_to_write - /// will be written from the @a message_block. - virtual int write (ACE_Message_Block &message_block, - size_t bytes_to_write, - const void *act, - int priority, - int signal_number) = 0; - -#if (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) - /** - * Same as above but with gather support, through chaining of composite - * message blocks using the continuation field. - */ - virtual int writev (ACE_Message_Block &message_block, - size_t bytes_to_write, - const void *act, - int priority, - int signal_number) = 0; -#endif /* (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) */ - -protected: - /// Do-nothing constructor. - ACE_Asynch_Write_File_Impl (void); -}; - -/** - * @class ACE_Asynch_Write_File_Result_Impl - * - * @brief This is the abstract base class for all the concrete - * implementation classes that provide different implementations - * for the ACE_Asynch_Write_File::Result. - */ -class ACE_Export ACE_Asynch_Write_File_Result_Impl : public virtual ACE_Asynch_Write_Stream_Result_Impl -{ -public: - virtual ~ACE_Asynch_Write_File_Result_Impl (void); - -protected: - /// Do-nothing constructor. - ACE_Asynch_Write_File_Result_Impl (void); -}; - -/** - * @class ACE_Asynch_Accept_Impl - * - * @brief Abstract base class for all the concrete implementation - * classes that provide different implementations for the - * ACE_Asynch_Accept. - */ -class ACE_Export ACE_Asynch_Accept_Impl : public virtual ACE_Asynch_Operation_Impl -{ -public: - virtual ~ACE_Asynch_Accept_Impl (void); - - /** - * This starts off an asynchronous accept. The asynchronous accept - * call also allows any initial data to be returned to the - * . Upto @a bytes_to_read will be read and stored in the - * @a message_block. The @a accept_handle will be used for the - * call. If (@a accept_handle == INVALID_HANDLE), a new - * handle will be created. - * - * @a message_block must be specified. This is because the address of - * the new connection is placed at the end of this buffer. - */ - virtual int accept (ACE_Message_Block &message_block, - size_t bytes_to_read, - ACE_HANDLE accept_handle, - const void *act, - int priority, - int signal_number, - int addr_family) = 0; - -protected: - /// Do-nothing constructor. - ACE_Asynch_Accept_Impl (void); -}; - -/** - * @class ACE_Asynch_Accept_Result_Impl - * - * @brief Abstract base class for all the concrete implementation - * classes that provide different implementations for the - * ACE_Asynch_Accept. - */ -class ACE_Export ACE_Asynch_Accept_Result_Impl : public virtual ACE_Asynch_Result_Impl -{ -public: - virtual ~ACE_Asynch_Accept_Result_Impl (void); - - /// The number of bytes which were requested at the start of the - /// asynchronous accept. - virtual size_t bytes_to_read (void) const = 0; - - /// Message block which contains the read data. - virtual ACE_Message_Block &message_block (void) const = 0; - - /// I/O handle used for accepting new connections. - virtual ACE_HANDLE listen_handle (void) const = 0; - - /// I/O handle for the new connection. - virtual ACE_HANDLE accept_handle (void) const = 0; - -protected: - /// Do-nothing constructor. - ACE_Asynch_Accept_Result_Impl (void); -}; - - -/** - * @class ACE_Asynch_Connect_Impl - * - * @brief Abstract base class for all the concrete implementation - * classes that provide different implementations for the - * ACE_Asynch_Connect. - */ -class ACE_Export ACE_Asynch_Connect_Impl : public virtual ACE_Asynch_Operation_Impl -{ -public: - virtual ~ACE_Asynch_Connect_Impl (void); - - /** - * This starts off an asynchronous connect - */ - virtual int connect (ACE_HANDLE connect_handle, - const ACE_Addr & remote_sap, - const ACE_Addr & local_sap, - int reuse_addr, - const void *act, - int priority, - int signal_number) = 0; - -protected: - /// Do-nothing constructor. - ACE_Asynch_Connect_Impl (void); -}; - -/** - * @class ACE_Asynch_Connect_Result_Impl - * - * @brief Abstract base class for all the concrete implementation - * classes that provide different implementations for the - * ACE_Asynch_Connect. - */ -class ACE_Export ACE_Asynch_Connect_Result_Impl : public virtual ACE_Asynch_Result_Impl -{ -public: - virtual ~ACE_Asynch_Connect_Result_Impl (void); - - /// I/O handle for the connection. - virtual ACE_HANDLE connect_handle (void) const = 0; - -protected: - /// Do-nothing constructor. - ACE_Asynch_Connect_Result_Impl (void); -}; - - -/** - * @class ACE_Asynch_Transmit_File_Impl - * - * @brief Abstract base class for all the concrete implementation - * classes that provide different implementations for the - * ACE_Asynch_Transmit_File. - */ -class ACE_Asynch_Transmit_File_Impl : public virtual ACE_Asynch_Operation_Impl -{ -public: - virtual ~ACE_Asynch_Transmit_File_Impl (void); - - /// This starts off an asynchronous transmit file. - virtual int transmit_file (ACE_HANDLE file, - ACE_Asynch_Transmit_File::Header_And_Trailer *header_and_trailer, - size_t bytes_to_write, - u_long offset, - u_long offset_high, - size_t bytes_per_send, - u_long flags, - const void *act, - int priority, - int signal_number) = 0; - -protected: - /// Do-nothing constructor. - ACE_Asynch_Transmit_File_Impl (void); -}; - -/** - * @class ACE_Asynch_Transmit_File_Result_Impl - * - * @brief Abstract base class for all the concrete implementation - * classes that provide different implementations for the - * ACE_Asynch_Transmit_File::Result. - */ -class ACE_Export ACE_Asynch_Transmit_File_Result_Impl : public virtual ACE_Asynch_Result_Impl -{ -public: - virtual ~ACE_Asynch_Transmit_File_Result_Impl (void); - - /// Socket used for transmitting the file. - virtual ACE_HANDLE socket (void) const = 0; - - /// File from which the data is read. - virtual ACE_HANDLE file (void) const = 0; - - /// Header and trailer data associated with this transmit file. - virtual ACE_Asynch_Transmit_File::Header_And_Trailer *header_and_trailer (void) const = 0; - - /// The number of bytes which were requested at the start of the - /// asynchronous transmit file. - virtual size_t bytes_to_write (void) const = 0; - - /// Number of bytes per send requested at the start of the transmit - /// file. - virtual size_t bytes_per_send (void) const = 0; - - /// Flags which were passed into transmit file. - virtual u_long flags (void) const = 0; - -protected: - /// Do-nothing constructor. - ACE_Asynch_Transmit_File_Result_Impl (void); -}; - - -/** - * @class ACE_Asynch_Read_Dgram_Impl - * - * @brief Abstract base class for all the concrete implementation - * classes that provide different implementations for the - * ACE_Asynch_Read_Dgram - */ -class ACE_Export ACE_Asynch_Read_Dgram_Impl : public virtual ACE_Asynch_Operation_Impl -{ -public: - virtual ~ACE_Asynch_Read_Dgram_Impl (void); - - /** This starts off an asynchronous read. Upto - * total_size()> will be read and stored in the - * @a message_block. @a message_block's will be updated to reflect - * the added bytes if the read operation is successful completed. - * Return code of 1 means immediate success and - * will contain number of bytes read. The - * method will still be called. Return code of 0 means the IO will - * complete proactively. Return code of -1 means there was an error, use - * errno to get the error code. - * - * Scatter/gather is supported on WIN32 by using the cont()> - * method. Up to ACE_IOV_MAX @a message_block's are supported. Upto - * size()> bytes will be read into each for - * a total of total_size()> bytes. All @a message_block's - * 's will be updated to reflect the added bytes for each - * @a message_block - * - * Priority of the operation is specified by @a priority. On POSIX4-Unix, - * this is supported. Works like in Unix. Negative values are not - * allowed. 0 means priority of the operation same as the process - * priority. 1 means priority of the operation is one less than - * process. And so forth. On Win32, @a priority is a no-op. - * @a signal_number is the POSIX4 real-time signal number to be used - * for the operation. @a signal_number ranges from ACE_SIGRTMIN to - * ACE_SIGRTMAX. This argument is a no-op on non-POSIX4 systems. - */ - virtual ssize_t recv (ACE_Message_Block *message_block, - size_t &number_of_bytes_recvd, - int flags, - int protocol_family, - const void *act, - int priority, - int signal_number) = 0; - -protected: - /// Do-nothing constructor. - ACE_Asynch_Read_Dgram_Impl (void); -}; - -/** - * @class ACE_Asynch_Read_Dgram_Result_Impl - * - * @brief Abstract base class for all the concrete implementation - * classes that provide different implementations for the - * ACE_Asynch_Read_Dgram::Result class. - */ -class ACE_Export ACE_Asynch_Read_Dgram_Result_Impl : public virtual ACE_Asynch_Result_Impl -{ -public: - virtual ~ACE_Asynch_Read_Dgram_Result_Impl (void); - - /// Message block which contains the read data - virtual ACE_Message_Block *message_block (void) const = 0; - - /// The number of bytes which were requested at the start of the - /// asynchronous read. - virtual size_t bytes_to_read (void) const = 0; - - /// The address of where the packet came from - virtual int remote_address (ACE_Addr& addr) const = 0; - - /// The flags used in the read - virtual int flags (void) const = 0; - - /// I/O handle used for reading. - virtual ACE_HANDLE handle (void) const = 0; - -protected: - /// Do-nothing constructor. - ACE_Asynch_Read_Dgram_Result_Impl (void); -}; - -/** - * @class ACE_Asynch_Write_Dgram_Impl - * - * @brief Abstract base class for all the concrete implementation - * classes that provide different implementations for the - * ACE_Asynch_Write_Dgram class. - */ -class ACE_Export ACE_Asynch_Write_Dgram_Impl : public virtual ACE_Asynch_Operation_Impl -{ -public: - virtual ~ACE_Asynch_Write_Dgram_Impl (void); - - /** This starts off an asynchronous send. Upto - * total_length()> will be sent. @a message_block's - * will be updated to reflect the sent bytes if the send operation - * is successful completed. - * Return code of 1 means immediate success and - * is updated to number of bytes sent. The - * method will still be called. Return code of 0 means the IO will - * complete proactively. Return code of -1 means there was an error, use - * errno to get the error code. - * - * Scatter/gather is supported on WIN32 by using the cont()> - * method. Up to ACE_IOV_MAX @a message_block's are supported. Upto - * length()> bytes will be sent from each - * for a total of total_length()> bytes. All - * @a message_block's 's will be updated to reflect the bytes sent - * from each @a message_block. - * - * Priority of the operation is specified by @a priority. On POSIX4-Unix, - * this is supported. Works like in Unix. Negative values are not - * allowed. 0 means priority of the operation same as the process - * priority. 1 means priority of the operation is one less than - * process. And so forth. On Win32, this argument is a no-op. - * @a signal_number is the POSIX4 real-time signal number to be used - * for the operation. @a signal_number ranges from ACE_SIGRTMIN to - * ACE_SIGRTMAX. This argument is a no-op on non-POSIX4 systems. - */ - virtual ssize_t send (ACE_Message_Block *message_block, - size_t &number_of_bytes_sent, - int flags, - const ACE_Addr &addr, - const void *act, - int priority, - int signal_number) = 0; - -protected: - /// Do-nothing constructor. - ACE_Asynch_Write_Dgram_Impl (void); -}; - -/** - * @class ACE_Asynch_Write_Dgram_Result_Impl - * - * @brief Abstract base class for all the concrete implementation - * classes that provide different implementations for the - * ACE_Asynch_Write_Dgram::Result class. - */ -class ACE_Export ACE_Asynch_Write_Dgram_Result_Impl : public virtual ACE_Asynch_Result_Impl -{ -public: - virtual ~ACE_Asynch_Write_Dgram_Result_Impl (void); - - /// The number of bytes which were requested at the start of the - /// asynchronous write. - virtual size_t bytes_to_write (void) const = 0; - - /// Message block which contains the sent data - virtual ACE_Message_Block *message_block (void) const = 0; - - /// The flags using in the write - virtual int flags (void) const = 0; - - /// I/O handle used for writing. - virtual ACE_HANDLE handle (void) const = 0; - -protected: - /// Do-nothing constructor. - ACE_Asynch_Write_Dgram_Result_Impl (void); -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/Asynch_IO_Impl.inl" -#endif /* __ACE_INLINE__ */ - -#endif /* ACE_HAS_WIN32_OVERLAPPED_IO || ACE_HAS_AIO_CALLS */ -#include /**/ "ace/post.h" -#endif /* ACE_ASYNCH_IO_IMPL_H */ diff --git a/modules/worldengine/deps/acelite/ace/Asynch_IO_Impl.inl b/modules/worldengine/deps/acelite/ace/Asynch_IO_Impl.inl deleted file mode 100644 index e6fce33b38..0000000000 --- a/modules/worldengine/deps/acelite/ace/Asynch_IO_Impl.inl +++ /dev/null @@ -1,103 +0,0 @@ -// -*- C++ -*- -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_INLINE -ACE_Asynch_Result_Impl::ACE_Asynch_Result_Impl (void) -{ -} - -ACE_INLINE -ACE_Asynch_Operation_Impl::ACE_Asynch_Operation_Impl (void) -{ -} - -ACE_INLINE -ACE_Asynch_Read_Stream_Impl::ACE_Asynch_Read_Stream_Impl (void) - : ACE_Asynch_Operation_Impl () -{ -} - -ACE_INLINE -ACE_Asynch_Read_Stream_Result_Impl::ACE_Asynch_Read_Stream_Result_Impl (void) - : ACE_Asynch_Result_Impl () -{ -} - -ACE_INLINE -ACE_Asynch_Write_Stream_Impl::ACE_Asynch_Write_Stream_Impl (void) - : ACE_Asynch_Operation_Impl () -{ -} - -ACE_INLINE -ACE_Asynch_Write_Stream_Result_Impl::ACE_Asynch_Write_Stream_Result_Impl (void) - : ACE_Asynch_Result_Impl () -{ -} - -ACE_INLINE -ACE_Asynch_Read_File_Impl::ACE_Asynch_Read_File_Impl (void) - : ACE_Asynch_Operation_Impl (), - ACE_Asynch_Read_Stream_Impl () -{ -} - -ACE_INLINE -ACE_Asynch_Read_File_Result_Impl::ACE_Asynch_Read_File_Result_Impl (void) - : ACE_Asynch_Result_Impl (), - ACE_Asynch_Read_Stream_Result_Impl () -{ -} - -ACE_INLINE -ACE_Asynch_Write_File_Impl::ACE_Asynch_Write_File_Impl (void) - : ACE_Asynch_Operation_Impl (), - ACE_Asynch_Write_Stream_Impl () -{ -} - -ACE_INLINE -ACE_Asynch_Write_File_Result_Impl::ACE_Asynch_Write_File_Result_Impl (void) - : ACE_Asynch_Result_Impl (), - ACE_Asynch_Write_Stream_Result_Impl () -{ -} - -ACE_INLINE -ACE_Asynch_Accept_Impl::ACE_Asynch_Accept_Impl (void) - : ACE_Asynch_Operation_Impl () -{ -} - -ACE_INLINE -ACE_Asynch_Accept_Result_Impl::ACE_Asynch_Accept_Result_Impl (void) - : ACE_Asynch_Result_Impl () -{ -} - -ACE_INLINE -ACE_Asynch_Connect_Impl::ACE_Asynch_Connect_Impl (void) - : ACE_Asynch_Operation_Impl () -{ -} - -ACE_INLINE -ACE_Asynch_Connect_Result_Impl::ACE_Asynch_Connect_Result_Impl (void) - : ACE_Asynch_Result_Impl () -{ -} - - -ACE_INLINE -ACE_Asynch_Transmit_File_Impl::ACE_Asynch_Transmit_File_Impl (void) - : ACE_Asynch_Operation_Impl () -{ -} - -ACE_INLINE -ACE_Asynch_Transmit_File_Result_Impl::ACE_Asynch_Transmit_File_Result_Impl (void) - : ACE_Asynch_Result_Impl () -{ -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Asynch_Pseudo_Task.cpp b/modules/worldengine/deps/acelite/ace/Asynch_Pseudo_Task.cpp deleted file mode 100644 index 0b6a14b60e..0000000000 --- a/modules/worldengine/deps/acelite/ace/Asynch_Pseudo_Task.cpp +++ /dev/null @@ -1,126 +0,0 @@ -#include "ace/Asynch_Pseudo_Task.h" - -#include "ace/OS_NS_errno.h" -#include "ace/OS_NS_signal.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_Asynch_Pseudo_Task::ACE_Asynch_Pseudo_Task () - : select_reactor_ (), // should be initialized before reactor_ - reactor_ (&select_reactor_, 0) // don't delete implementation -{ -} - -ACE_Asynch_Pseudo_Task::~ACE_Asynch_Pseudo_Task () -{ - this->stop (); -} - -int -ACE_Asynch_Pseudo_Task::start (void) -{ - if (this->reactor_.initialized () == 0) - ACELIB_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("%N:%l:%p\n"), - ACE_TEXT ("start reactor is not initialized")), - -1); - - return this->activate () == -1 ? -1 : 0; // If started, return 0 -} - -int -ACE_Asynch_Pseudo_Task::stop (void) -{ - if (this->thr_count () == 0) // already stopped - return 0; - - if (this->reactor_.end_reactor_event_loop () == -1) - return -1; - - this->wait (); - this->reactor_.close (); - return 0; -} - -int -ACE_Asynch_Pseudo_Task::svc (void) -{ -#if !defined (ACE_WIN32) - - sigset_t RT_signals; - - sigemptyset (&RT_signals); - for (int si = ACE_SIGRTMIN; si <= ACE_SIGRTMAX; si++) - sigaddset (&RT_signals, si); - - if (ACE_OS::pthread_sigmask (SIG_BLOCK, &RT_signals, 0) != 0) - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("Error:(%P | %t):%p\n"), - ACE_TEXT ("pthread_sigmask"))); -#endif - - reactor_.owner (ACE_Thread::self ()); - reactor_.run_reactor_event_loop (); - - return 0; -} - - - -int -ACE_Asynch_Pseudo_Task::register_io_handler (ACE_HANDLE handle, - ACE_Event_Handler *handler, - ACE_Reactor_Mask mask, - int flg_suspend) -{ - // Register the handler with the reactor. - if (-1 == this->reactor_.register_handler (handle, handler, mask)) - return -1; - - if (flg_suspend == 0) - return 0; - - // Suspend the handle now. Enable only when the accept is issued - // by the application. - if (this->reactor_.suspend_handler (handle) == -1) - { - ACELIB_ERROR - ((LM_ERROR, - ACE_TEXT ("%N:%l:%p\n"), - ACE_TEXT ("register_io_handler (suspended)"))); - this->reactor_.remove_handler (handle, ACE_Event_Handler::ALL_EVENTS_MASK - | ACE_Event_Handler::DONT_CALL); - return -1; - } - - return 0; -} - -int -ACE_Asynch_Pseudo_Task::remove_io_handler (ACE_HANDLE handle) -{ - return this->reactor_.remove_handler (handle, - ACE_Event_Handler::ALL_EVENTS_MASK - | ACE_Event_Handler::DONT_CALL); -} - -int -ACE_Asynch_Pseudo_Task::remove_io_handler (ACE_Handle_Set &set) -{ - return this->reactor_.remove_handler (set, ACE_Event_Handler::ALL_EVENTS_MASK - | ACE_Event_Handler::DONT_CALL); -} - -int -ACE_Asynch_Pseudo_Task::suspend_io_handler (ACE_HANDLE handle) -{ - return this->reactor_.suspend_handler (handle); -} - -int -ACE_Asynch_Pseudo_Task::resume_io_handler (ACE_HANDLE handle) -{ - return this->reactor_.resume_handler (handle); -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Asynch_Pseudo_Task.h b/modules/worldengine/deps/acelite/ace/Asynch_Pseudo_Task.h deleted file mode 100644 index 4337361fe4..0000000000 --- a/modules/worldengine/deps/acelite/ace/Asynch_Pseudo_Task.h +++ /dev/null @@ -1,70 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Asynch_Pseudo_Task.h - * - * @author Alexander Libman - */ -//============================================================================= - -#ifndef ACE_ASYNCH_PSEUDO_TASK_H -#define ACE_ASYNCH_PSEUDO_TASK_H - -#include /**/ "ace/pre.h" - -#include /**/ "ace/config-all.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -#pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Reactor.h" -#include "ace/Select_Reactor.h" -#include "ace/Task.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/* - * Specialization hook to replace the Reactor with the - * concrete Reactor implementation, e.g., select_st, - * select_mt etc. - */ -//@@ REACTOR_SPL_INCLUDE_FORWARD_DECL_ADD_HOOK - -/** - * @class ACE_Asynch_Pseudo_Task - */ -class ACE_Export ACE_Asynch_Pseudo_Task : public ACE_Task -{ -public: - ACE_Asynch_Pseudo_Task(); - virtual ~ACE_Asynch_Pseudo_Task(); - - int start (void); - int stop (void); - - int register_io_handler (ACE_HANDLE handle, - ACE_Event_Handler *handler, - ACE_Reactor_Mask mask, - int flg_suspend); - - int remove_io_handler (ACE_HANDLE handle); - int remove_io_handler (ACE_Handle_Set &set); - int resume_io_handler (ACE_HANDLE handle); - int suspend_io_handler (ACE_HANDLE handle); - -protected: - virtual int svc (void); - - /// Should be initialized before reactor_ - ACE_Select_Reactor select_reactor_; - - ACE_Reactor reactor_; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#include /**/ "ace/post.h" - -#endif /* ACE_ASYNCH_PSEUDO_TASK_H */ diff --git a/modules/worldengine/deps/acelite/ace/Atomic_Op.cpp b/modules/worldengine/deps/acelite/ace/Atomic_Op.cpp deleted file mode 100644 index 5b8cc7a0d5..0000000000 --- a/modules/worldengine/deps/acelite/ace/Atomic_Op.cpp +++ /dev/null @@ -1,304 +0,0 @@ -#include "ace/Atomic_Op.h" -#include "ace/OS_NS_unistd.h" - -#if !defined (__ACE_INLINE__) -#include "ace/Atomic_Op.inl" -#endif /* __ACE_INLINE__ */ - -#if defined (ACE_HAS_BUILTIN_ATOMIC_OP) - -#if defined (ACE_INCLUDE_ATOMIC_OP_SPARC) -# include "ace/Atomic_Op_Sparc.h" -#endif /* ACE_INCLUDE_ATOMIC_OP_SPARC */ - -namespace { - -#if defined (_MSC_VER) -// Disable "no return value" warning, as we will be putting -// the return values directly into the EAX register. -#pragma warning (push) -#pragma warning (disable: 4035) -#endif /* _MSC_VER */ - -long -single_cpu_increment (volatile long *value) -{ -#if defined (ACE_HAS_INTEL_ASSEMBLY) - long tmp = 1; - unsigned long addr = reinterpret_cast (value); - asm( "xadd %0, (%1)" : "+r"(tmp) : "r"(addr) ); - return tmp + 1; -#elif !defined (ACE_HAS_SOLARIS_ATOMIC_LIB) && (defined (sun) || \ - (defined (__SUNPRO_CC) && (defined (__i386) || defined (__x86_64)))) - return ace_atomic_add_long ( - reinterpret_cast (value), 1); -#elif defined(__GNUC__) && defined(PPC) - long tmp; - asm("lwz %0,%1" : "=r" (tmp) : "m" (*value) ); - asm("addi %0,%0,1" : "+r" (tmp) ); - asm("stw %0,%1" : "+r" (tmp), "=m" (*value) ); - return tmp; -#else /* ACE_HAS_INTEL_ASSEMBLY*/ - ACE_UNUSED_ARG (value); - ACE_NOTSUP_RETURN (-1); -#endif /* ACE_HAS_INTEL_ASSEMBLY*/ -} - -long -single_cpu_decrement (volatile long *value) -{ -#if defined (ACE_HAS_INTEL_ASSEMBLY) - long tmp = -1; - unsigned long addr = reinterpret_cast (value); - asm( "xadd %0, (%1)" : "+r"(tmp) : "r"(addr) ); - return tmp - 1; -#elif !defined (ACE_HAS_SOLARIS_ATOMIC_LIB) && (defined (sun) || \ - (defined (__SUNPRO_CC) && (defined (__i386) || defined (__x86_64)))) - return ace_atomic_add_long ( - reinterpret_cast (value), -1); -#elif defined(__GNUC__) && defined(PPC) - long tmp; - asm("lwz %0,%1" : "=r" (tmp) : "m" (*value) ); - asm("addi %0,%0,-1" : "+r" (tmp) ); - asm("stw %0,%1" : "+r" (tmp), "=m" (*value) ); - return tmp; -#else /* ACE_HAS_INTEL_ASSEMBLY*/ - ACE_UNUSED_ARG (value); - ACE_NOTSUP_RETURN (-1); -#endif /* ACE_HAS_INTEL_ASSEMBLY*/ -} - -long -single_cpu_exchange (volatile long *value, long rhs) -{ -#if defined (ACE_HAS_INTEL_ASSEMBLY) - unsigned long addr = reinterpret_cast (value); - asm( "xchg %0, (%1)" : "+r"(rhs) : "r"(addr) ); - return rhs; -#elif !defined (ACE_HAS_SOLARIS_ATOMIC_LIB) && (defined (sun) || \ - (defined (__SUNPRO_CC) && (defined (__i386) || defined (__x86_64)))) - return ace_atomic_swap_long ( - reinterpret_cast (value), rhs); -#elif defined(__GNUC__) && defined(PPC) - long tmp; - asm("lwz %0,%1" : "=r" (tmp) : "m" (rhs) ); - asm("stw %0,%1" : "+r" (tmp), "=m" (*value) ); - return tmp; -#else /* ACE_HAS_INTEL_ASSEMBLY*/ - ACE_UNUSED_ARG (value); - ACE_UNUSED_ARG (rhs); - ACE_NOTSUP_RETURN (-1); -#endif /* ACE_HAS_INTEL_ASSEMBLY*/ -} - -long -single_cpu_exchange_add (volatile long *value, long rhs) -{ -#if defined (ACE_HAS_INTEL_ASSEMBLY) - unsigned long addr = reinterpret_cast (value); - asm( "xadd %0, (%1)" : "+r"(rhs) : "r"(addr) ); - return rhs; -#elif !defined (ACE_HAS_SOLARIS_ATOMIC_LIB) && (defined (sun) || \ - (defined (__SUNPRO_CC) && (defined (__i386) || defined (__x86_64)))) - return ace_atomic_swap_add_long ( - reinterpret_cast (value), rhs); -#elif defined(__GNUC__) && defined(PPC) - long tmp; - asm("add %0,%1,%2" : "=r" (tmp) : "r" (*value), "r" (rhs) ); - asm("stw %0,%1" : "+r" (tmp), "=m" (*value) ); - return tmp; -#elif defined (WIN32) && !defined (ACE_HAS_INTERLOCKED_EXCHANGEADD) -# if defined (_MSC_VER) - __asm - { - mov eax, rhs - mov edx, value - xadd [edx], eax - } - // Return value is already in EAX register. -# elif defined (__BORLANDC__) - _EAX = rhs; - _EDX = reinterpret_cast (value); - __emit__(0x0F, 0xC1, 0x02); // xadd [edx], eax - // Return value is already in EAX register. -# else /* _MSC_VER */ - ACE_UNUSED_ARG (value); - ACE_UNUSED_ARG (rhs); - ACE_NOTSUP_RETURN (-1); -# endif /* _MSC_VER */ -#else /* ACE_HAS_INTEL_ASSEMBLY*/ - ACE_UNUSED_ARG (value); - ACE_UNUSED_ARG (rhs); - ACE_NOTSUP_RETURN (-1); -#endif /* ACE_HAS_INTEL_ASSEMBLY*/ -} - -long -multi_cpu_increment (volatile long *value) -{ -#if defined (ACE_HAS_INTEL_ASSEMBLY) - long tmp = 1; - unsigned long addr = reinterpret_cast (value); - asm( "lock ; xadd %0, (%1)" : "+r"(tmp) : "r"(addr) ); - return tmp + 1; -#elif !defined (ACE_HAS_SOLARIS_ATOMIC_LIB) && (defined (sun) || \ - (defined (__SUNPRO_CC) && (defined (__i386) || defined (__x86_64)))) - return ace_atomic_add_long ( - reinterpret_cast (value), 1); -#else /* ACE_HAS_INTEL_ASSEMBLY*/ - ACE_UNUSED_ARG (value); - ACE_NOTSUP_RETURN (-1); -#endif /* ACE_HAS_INTEL_ASSEMBLY*/ -} - -long -multi_cpu_decrement (volatile long *value) -{ -#if defined (ACE_HAS_INTEL_ASSEMBLY) - long tmp = -1; - unsigned long addr = reinterpret_cast (value); - asm( "lock ; xadd %0, (%1)" : "+r"(tmp) : "r"(addr) ); - return tmp - 1; -#elif !defined (ACE_HAS_SOLARIS_ATOMIC_LIB) && (defined (sun) || \ - (defined (__SUNPRO_CC) && (defined (__i386) || defined (__x86_64)))) - return ace_atomic_add_long ( - reinterpret_cast (value), -1); -#else /* ACE_HAS_INTEL_ASSEMBLY*/ - ACE_UNUSED_ARG (value); - ACE_NOTSUP_RETURN (-1); -#endif /* ACE_HAS_INTEL_ASSEMBLY*/ -} - -long -multi_cpu_exchange (volatile long *value, long rhs) -{ -#if defined (ACE_HAS_INTEL_ASSEMBLY) - unsigned long addr = reinterpret_cast (value); - // The XCHG instruction automatically follows LOCK semantics - asm( "xchg %0, (%1)" : "+r"(rhs) : "r"(addr) ); - return rhs; -#elif !defined (ACE_HAS_SOLARIS_ATOMIC_LIB) && (defined (sun) || \ - (defined (__SUNPRO_CC) && (defined (__i386) || defined (__x86_64)))) - return ace_atomic_swap_long ( - reinterpret_cast (value), rhs); -#else /* ACE_HAS_INTEL_ASSEMBLY*/ - ACE_UNUSED_ARG (value); - ACE_UNUSED_ARG (rhs); - ACE_NOTSUP_RETURN (-1); -#endif /* ACE_HAS_INTEL_ASSEMBLY*/ -} - -long -multi_cpu_exchange_add (volatile long *value, long rhs) -{ -#if defined (ACE_HAS_INTEL_ASSEMBLY) - unsigned long addr = reinterpret_cast (value); - asm( "lock ; xadd %0, (%1)" : "+r"(rhs) : "r"(addr) ); - return rhs; -#elif !defined (ACE_HAS_SOLARIS_ATOMIC_LIB) && (defined (sun) || \ - (defined (__SUNPRO_CC) && (defined (__i386) || defined (__x86_64)))) - return ace_atomic_swap_add_long ( - reinterpret_cast (value), rhs); -#elif defined (WIN32) && !defined (ACE_HAS_INTERLOCKED_EXCHANGEADD) -# if defined (_MSC_VER) - __asm - { - mov eax, rhs - mov edx, value - lock xadd [edx], eax - } - // Return value is already in EAX register. -# elif defined (__BORLANDC__) - _EAX = rhs; - _EDX = reinterpret_cast (value); - __emit__(0xF0, 0x0F, 0xC1, 0x02); // lock xadd [edx], eax - // Return value is already in EAX register. -# else /* _MSC_VER */ - ACE_UNUSED_ARG (value); - ACE_UNUSED_ARG (rhs); - ACE_NOTSUP_RETURN (-1); -# endif /* _MSC_VER */ -#else /* ACE_HAS_INTEL_ASSEMBLY*/ - ACE_UNUSED_ARG (value); - ACE_UNUSED_ARG (rhs); - ACE_NOTSUP_RETURN (-1); -#endif /* ACE_HAS_INTEL_ASSEMBLY*/ -} - -#if defined (_MSC_VER) -#pragma warning (pop) -#endif /* _MSC_VER */ - -} // end namespace - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -long (*ACE_Atomic_Op::increment_fn_) (volatile long *) = multi_cpu_increment; -long (*ACE_Atomic_Op::decrement_fn_) (volatile long *) = multi_cpu_decrement; -long (*ACE_Atomic_Op::exchange_fn_) (volatile long *, long) = multi_cpu_exchange; -long (*ACE_Atomic_Op::exchange_add_fn_) (volatile long *, long) = multi_cpu_exchange_add; - -void -ACE_Atomic_Op::init_functions (void) -{ - if (ACE_OS::num_processors () == 1) - { - increment_fn_ = single_cpu_increment; - decrement_fn_ = single_cpu_decrement; - exchange_fn_ = single_cpu_exchange; - exchange_add_fn_ = single_cpu_exchange_add; - } - else - { - increment_fn_ = multi_cpu_increment; - decrement_fn_ = multi_cpu_decrement; - exchange_fn_ = multi_cpu_exchange; - exchange_add_fn_ = multi_cpu_exchange_add; - } -} - -void -ACE_Atomic_Op::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} - -long (*ACE_Atomic_Op::increment_fn_) (volatile long *) = multi_cpu_increment; -long (*ACE_Atomic_Op::decrement_fn_) (volatile long *) = multi_cpu_decrement; -long (*ACE_Atomic_Op::exchange_fn_) (volatile long *, long) = multi_cpu_exchange; -long (*ACE_Atomic_Op::exchange_add_fn_) (volatile long *, long) = multi_cpu_exchange_add; - -void -ACE_Atomic_Op::init_functions (void) -{ - if (ACE_OS::num_processors () == 1) - { - increment_fn_ = single_cpu_increment; - decrement_fn_ = single_cpu_decrement; - exchange_fn_ = single_cpu_exchange; - exchange_add_fn_ = single_cpu_exchange_add; - } - else - { - increment_fn_ = multi_cpu_increment; - decrement_fn_ = multi_cpu_decrement; - exchange_fn_ = multi_cpu_exchange; - exchange_add_fn_ = multi_cpu_exchange_add; - } -} - -void -ACE_Atomic_Op::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_HAS_BUILTIN_ATOMIC_OP */ diff --git a/modules/worldengine/deps/acelite/ace/Atomic_Op.h b/modules/worldengine/deps/acelite/ace/Atomic_Op.h deleted file mode 100644 index 8ae1b2e5ed..0000000000 --- a/modules/worldengine/deps/acelite/ace/Atomic_Op.h +++ /dev/null @@ -1,384 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Atomic_Op.h - * - * @author Douglas C. Schmidt - */ -//============================================================================= - -#ifndef ACE_ATOMIC_OP_H -#define ACE_ATOMIC_OP_H -#include /**/ "ace/pre.h" - -#include /**/ "ace/config-all.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Thread_Mutex.h" - -// Include the templates here. -#include "ace/Atomic_Op_T.h" - -// Determine whether builtin atomic op support is -// available on this platform. -#if defined (ACE_HAS_THREADS) -# if defined (WIN32) -# if defined (ACE_HAS_INTRINSIC_INTERLOCKED) -# define ACE_HAS_BUILTIN_ATOMIC_OP -# endif /* ACE_HAS_INTRINSIC_INTERLOCKED */ -# if defined (ACE_HAS_INTERLOCKED_EXCHANGEADD) -# define ACE_HAS_BUILTIN_ATOMIC_OP -# else /* ACE_HAS_INTERLOCKED_EXCHANGEADD */ - // Inline assembly emulation of InterlockedExchangeAdd - // is currently only implemented for MSVC (x86 only) and Borland. -# if (defined (_MSC_VER) && defined (_M_IX86)) || defined (__BORLANDC__) -# define ACE_HAS_BUILTIN_ATOMIC_OP -# endif /* _MSC_VER || __BORLANDC__ */ -# endif /* ACE_HAS_INTERLOCKED_EXCHANGEADD */ -# elif defined (ACE_HAS_INTEL_ASSEMBLY) -# define ACE_HAS_BUILTIN_ATOMIC_OP -# elif defined (ACE_HAS_VXATOMICLIB) -# define ACE_HAS_BUILTIN_ATOMIC_OP -# elif defined (ACE_HAS_SOLARIS_ATOMIC_LIB) && !defined (ACE_HAS_BUILTIN_ATOMIC_OP) -# define ACE_HAS_BUILTIN_ATOMIC_OP -# endif /* WIN32 */ -#endif /* ACE_HAS_THREADS */ - -// If we have the GCC Atomic builtin support, use it -#if defined (ACE_HAS_GCC_ATOMIC_BUILTINS) && (ACE_HAS_GCC_ATOMIC_BUILTINS == 1) -# undef ACE_HAS_BUILTIN_ATOMIC_OP -#endif - -// Include the templates here. -#include "ace/Atomic_Op_GCC_T.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -#if defined (ACE_HAS_BUILTIN_ATOMIC_OP) - -/** - * @brief Specialization of ACE_Atomic_Op for platforms that - * support atomic integer operations. - * - * Specialization of ACE_Atomic_Op for platforms that support atomic - * integer operations. - */ -template<> -class ACE_Export ACE_Atomic_Op -{ -public: - /// Initialize @c value_ to 0. - ACE_Atomic_Op (void); - - /// Initialize @c value_ to c. - ACE_Atomic_Op (long c); - - /// Manage copying... - ACE_Atomic_Op (const ACE_Atomic_Op &c); - - /// Atomically pre-increment @c value_. - long operator++ (void); - - /// Atomically post-increment @c value_. - long operator++ (int); - - /// Atomically increment @c value_ by rhs. - long operator+= (long rhs); - - /// Atomically pre-decrement @c value_. - long operator-- (void); - - /// Atomically post-decrement @c value_. - long operator-- (int); - - /// Atomically decrement @c value_ by rhs. - long operator-= (long rhs); - - /// Atomically compare @c value_ with rhs. - bool operator== (long rhs) const; - - /// Atomically compare @c value_ with rhs. - bool operator!= (long rhs) const; - - /// Atomically check if @c value_ greater than or equal to rhs. - bool operator>= (long rhs) const; - - /// Atomically check if @c value_ greater than rhs. - bool operator> (long rhs) const; - - /// Atomically check if @c value_ less than or equal to rhs. - bool operator<= (long rhs) const; - - /// Atomically check if @c value_ less than rhs. - bool operator< (long rhs) const; - - /// Atomically assign rhs to @c value_. - ACE_Atomic_Op &operator= (long rhs); - - /// Atomically assign to @c value_. - ACE_Atomic_Op &operator= (const ACE_Atomic_Op &rhs); - - /// Exchange value with @a newval. - long exchange (long newval); - - /// Explicitly return @c value_. - long value (void) const; - - /// Dump the state of an object. - void dump (void) const; - - /// Explicitly return @c value_ (by reference). - volatile long &value_i (void); - - // ACE_ALLOC_HOOK_DECLARE; - // Declare the dynamic allocation hooks. - - /// Used during ACE object manager initialization to optimize the fast - /// atomic op implementation according to the number of CPUs. - static void init_functions (void); - -private: - - /// This function cannot be supported by this template specialization. - /// If you need access to an underlying lock, use the ACE_Atomic_Op_Ex - /// template instead. - ACE_Thread_Mutex &mutex (void); - -private: - - /// Current object decorated by the atomic op. - volatile long value_; - - /// Pointers to selected atomic op implementations. - static long (*increment_fn_) (volatile long *); - static long (*decrement_fn_) (volatile long *); - static long (*exchange_fn_) (volatile long *, long); - static long (*exchange_add_fn_) (volatile long *, long); -}; - -/** - * @brief Specialization of ACE_Atomic_Op for platforms that - * support atomic integer operations. - * - * Specialization of ACE_Atomic_Op for platforms that support atomic - * integer operations. - */ -template<> -class ACE_Export ACE_Atomic_Op -{ -public: - /// Initialize @c value_ to 0. - ACE_Atomic_Op (void); - - /// Initialize @c value_ to c. - ACE_Atomic_Op (unsigned long c); - - /// Manage copying... - ACE_Atomic_Op (const ACE_Atomic_Op &c); - - /// Atomically pre-increment @c value_. - unsigned long operator++ (void); - - /// Atomically post-increment @c value_. - unsigned long operator++ (int); - - /// Atomically increment @c value_ by rhs. - unsigned long operator+= (unsigned long rhs); - - /// Atomically pre-decrement @c value_. - unsigned long operator-- (void); - - /// Atomically post-decrement @c value_. - unsigned long operator-- (int); - - /// Atomically decrement @c value_ by rhs. - unsigned long operator-= (unsigned long rhs); - - /// Atomically compare @c value_ with rhs. - bool operator== (unsigned long rhs) const; - - /// Atomically compare @c value_ with rhs. - bool operator!= (unsigned long rhs) const; - - /// Atomically check if @c value_ greater than or equal to rhs. - bool operator>= (unsigned long rhs) const; - - /// Atomically check if @c value_ greater than rhs. - bool operator> (unsigned long rhs) const; - - /// Atomically check if @c value_ less than or equal to rhs. - bool operator<= (unsigned long rhs) const; - - /// Atomically check if @c value_ less than rhs. - bool operator< (unsigned long rhs) const; - - /// Atomically assign rhs to @c value_. - ACE_Atomic_Op &operator= (unsigned long rhs); - - /// Atomically assign to @c value_. - ACE_Atomic_Op &operator= (const ACE_Atomic_Op &rhs); - - /// Exchange value with @a newval. - unsigned long exchange (unsigned long newval); - - /// Explicitly return @c value_. - unsigned long value (void) const; - - /// Dump the state of an object. - void dump (void) const; - - /// Explicitly return @c value_ (by reference). - volatile unsigned long &value_i (void); - - // ACE_ALLOC_HOOK_DECLARE; - // Declare the dynamic allocation hooks. - - /// Used during ACE object manager initialization to optimize the fast - /// atomic op implementation according to the number of CPUs. - static void init_functions (void); - -private: - - /// This function cannot be supported by this template specialization. - /// If you need access to an underlying lock, use the ACE_Atomic_Op_Ex - /// template instead. - ACE_Thread_Mutex &mutex (void); - -private: - - /// Current object decorated by the atomic op. - volatile unsigned long value_; - - // Pointers to selected atomic op implementations. - static long (*increment_fn_) (volatile long *); - static long (*decrement_fn_) (volatile long *); - static long (*exchange_fn_) (volatile long *, long); - static long (*exchange_add_fn_) (volatile long *, long); -}; - -#endif /* !ACE_HAS_BUILTIN_ATOMIC_OP */ - -#if defined (ACE_HAS_GCC_ATOMIC_BUILTINS) && (ACE_HAS_GCC_ATOMIC_BUILTINS == 1) - -template<> -class ACE_Export ACE_Atomic_Op -: public ACE_Atomic_Op_GCC -{ -public: - ACE_Atomic_Op (void); - ACE_Atomic_Op (int c); - ACE_Atomic_Op (const ACE_Atomic_Op &c); - ACE_Atomic_Op &operator= (int rhs); -}; - -template<> -class ACE_Export ACE_Atomic_Op -: public ACE_Atomic_Op_GCC -{ -public: - ACE_Atomic_Op (void); - ACE_Atomic_Op (unsigned int c); - ACE_Atomic_Op (const ACE_Atomic_Op &c); - ACE_Atomic_Op &operator= (unsigned int rhs); -}; - -// If we have built in atomic op, use that, the assignment operator -// is faster for a long/unsinged long -template<> -class ACE_Export ACE_Atomic_Op -: public ACE_Atomic_Op_GCC -{ -public: - ACE_Atomic_Op (void); - ACE_Atomic_Op (long c); - ACE_Atomic_Op (const ACE_Atomic_Op &c); - ACE_Atomic_Op &operator= (long rhs); -}; - -template<> -class ACE_Export ACE_Atomic_Op -: public ACE_Atomic_Op_GCC -{ -public: - ACE_Atomic_Op (void); - ACE_Atomic_Op (unsigned long c); - ACE_Atomic_Op (const ACE_Atomic_Op &c); - ACE_Atomic_Op &operator= (unsigned long rhs); -}; - -// The long long intrinsics are not available on PPC -#if !defined (__powerpc__) -template<> -class ACE_Export ACE_Atomic_Op -: public ACE_Atomic_Op_GCC -{ -public: - ACE_Atomic_Op (void); - ACE_Atomic_Op (long long c); - ACE_Atomic_Op (const ACE_Atomic_Op &c); - ACE_Atomic_Op &operator= (long long rhs); -}; - -template<> -class ACE_Export ACE_Atomic_Op -: public ACE_Atomic_Op_GCC -{ -public: - ACE_Atomic_Op (void); - ACE_Atomic_Op (unsigned long long c); - ACE_Atomic_Op (const ACE_Atomic_Op &c); - ACE_Atomic_Op &operator= (unsigned long long rhs); -}; -#endif /* !__powerpc__ */ - -#if !defined (ACE_LACKS_GCC_ATOMIC_BUILTINS_2) -template<> -class ACE_Export ACE_Atomic_Op -: public ACE_Atomic_Op_GCC -{ -public: - ACE_Atomic_Op (void); - ACE_Atomic_Op (short c); - ACE_Atomic_Op (const ACE_Atomic_Op &c); - ACE_Atomic_Op &operator= (short rhs); -}; - -template<> -class ACE_Export ACE_Atomic_Op -: public ACE_Atomic_Op_GCC -{ -public: - ACE_Atomic_Op (void); - ACE_Atomic_Op (unsigned short c); - ACE_Atomic_Op (const ACE_Atomic_Op &c); - ACE_Atomic_Op &operator= (unsigned short rhs); -}; -#endif - -#if !defined (ACE_LACKS_GCC_ATOMIC_BUILTINS_1) -template<> -class ACE_Export ACE_Atomic_Op -: public ACE_Atomic_Op_GCC -{ -public: - ACE_Atomic_Op (void); - ACE_Atomic_Op (bool c); - ACE_Atomic_Op (const ACE_Atomic_Op &c); - ACE_Atomic_Op &operator= (bool rhs); -}; -#endif - -#endif /* ACE_HAS_BUILTIN_ATOMIC_OP */ - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/Atomic_Op.inl" -#endif /* __ACE_INLINE__ */ - -#include /**/ "ace/post.h" -#endif /*ACE_ATOMIC_OP_H*/ diff --git a/modules/worldengine/deps/acelite/ace/Atomic_Op.inl b/modules/worldengine/deps/acelite/ace/Atomic_Op.inl deleted file mode 100644 index 2f9ec57bac..0000000000 --- a/modules/worldengine/deps/acelite/ace/Atomic_Op.inl +++ /dev/null @@ -1,666 +0,0 @@ -// -*- C++ -*- -#if defined (ACE_HAS_INTRINSIC_INTERLOCKED) -# include "ace/os_include/os_intrin.h" -# pragma intrinsic (_InterlockedExchange, _InterlockedExchangeAdd, _InterlockedIncrement, _InterlockedDecrement) -#endif /* ACE_HAS_INTRINSIC_INTERLOCKED */ - -#if defined (ACE_HAS_VXATOMICLIB) -# include -#endif - -#if defined (ACE_HAS_SOLARIS_ATOMIC_LIB) -# include -#endif - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -#if defined (ACE_HAS_BUILTIN_ATOMIC_OP) - -ACE_INLINE -ACE_Atomic_Op::ACE_Atomic_Op (void) - : value_ (0) -{ -} - -ACE_INLINE -ACE_Atomic_Op::ACE_Atomic_Op (long c) - : value_ (c) -{ -} - -ACE_INLINE -ACE_Atomic_Op::ACE_Atomic_Op ( - const ACE_Atomic_Op &rhs) - : value_ (rhs.value_) -{ -} - -ACE_INLINE long -ACE_Atomic_Op::operator++ (void) -{ -#if defined (ACE_HAS_INTRINSIC_INTERLOCKED) - return ::_InterlockedIncrement (const_cast (&this->value_)); -#elif defined (WIN32) - return ::InterlockedIncrement (const_cast (&this->value_)); -#elif defined (ACE_HAS_VXATOMICLIB) - return ::vxAtomicInc (reinterpret_cast (const_cast (&this->value_))) + 1; -#elif defined (ACE_HAS_SOLARIS_ATOMIC_LIB) - return ::atomic_inc_ulong_nv (reinterpret_cast(&this->value_)); -#else /* WIN32 */ - return (*increment_fn_) (&this->value_); -#endif /* WIN32 */ -} - -ACE_INLINE long -ACE_Atomic_Op::operator++ (int) -{ - return ++*this - 1; -} - -ACE_INLINE long -ACE_Atomic_Op::operator-- (void) -{ -#if defined (ACE_HAS_INTRINSIC_INTERLOCKED) - return ::_InterlockedDecrement (const_cast (&this->value_)); -#elif defined (WIN32) - return ::InterlockedDecrement (const_cast (&this->value_)); -#elif defined (ACE_HAS_VXATOMICLIB) - return ::vxAtomicDec (reinterpret_cast (const_cast (&this->value_))) - 1; -#elif defined (ACE_HAS_SOLARIS_ATOMIC_LIB) - return ::atomic_dec_ulong_nv (reinterpret_cast(&this->value_)); -#else /* WIN32 */ - return (*decrement_fn_) (&this->value_); -#endif /* WIN32 */ -} - -ACE_INLINE long -ACE_Atomic_Op::operator-- (int) -{ - return --*this + 1; -} - -ACE_INLINE long -ACE_Atomic_Op::operator+= (long rhs) -{ -#if defined (ACE_HAS_INTRINSIC_INTERLOCKED) - return ::_InterlockedExchangeAdd (const_cast (&this->value_), - rhs) + rhs; -#elif defined (WIN32) && defined (ACE_HAS_INTERLOCKED_EXCHANGEADD) - return ::InterlockedExchangeAdd (const_cast (&this->value_), - rhs) + rhs; -#elif defined (ACE_HAS_VXATOMICLIB) - return ::vxAtomicAdd (reinterpret_cast (const_cast (&this->value_)), rhs) + rhs; -#elif defined (ACE_HAS_SOLARIS_ATOMIC_LIB) - return ::atomic_add_long_nv (reinterpret_cast(&this->value_), rhs); -#else /* WIN32 && ACE_HAS_INTERLOCKED_EXCHANGEADD */ - return (*exchange_add_fn_) (&this->value_, rhs) + rhs; -#endif /* WIN32 && ACE_HAS_INTERLOCKED_EXCHANGEADD */ -} - -ACE_INLINE long -ACE_Atomic_Op::operator-= (long rhs) -{ -#if defined (ACE_HAS_INTRINSIC_INTERLOCKED) - return ::_InterlockedExchangeAdd (const_cast (&this->value_), - -rhs) - rhs; -#elif defined (WIN32) && defined (ACE_HAS_INTERLOCKED_EXCHANGEADD) - return ::InterlockedExchangeAdd (const_cast (&this->value_), - -rhs) - rhs; -#elif defined (ACE_HAS_VXATOMICLIB) - return ::vxAtomicSub (reinterpret_cast (const_cast (&this->value_)), rhs) - rhs; -#elif defined (ACE_HAS_SOLARIS_ATOMIC_LIB) - return ::atomic_add_long_nv (reinterpret_cast(&this->value_), -rhs); -#else /* WIN32 && ACE_HAS_INTERLOCKED_EXCHANGEADD */ - return (*exchange_add_fn_) (&this->value_, -rhs) - rhs; -#endif /* WIN32 && ACE_HAS_INTERLOCKED_EXCHANGEADD */ -} - -ACE_INLINE bool -ACE_Atomic_Op::operator== (long rhs) const -{ - return (this->value_ == rhs); -} - -ACE_INLINE bool -ACE_Atomic_Op::operator!= (long rhs) const -{ - return (this->value_ != rhs); -} - -ACE_INLINE bool -ACE_Atomic_Op::operator>= (long rhs) const -{ - return (this->value_ >= rhs); -} - -ACE_INLINE bool -ACE_Atomic_Op::operator> (long rhs) const -{ - return (this->value_ > rhs); -} - -ACE_INLINE bool -ACE_Atomic_Op::operator<= (long rhs) const -{ - return (this->value_ <= rhs); -} - -ACE_INLINE bool -ACE_Atomic_Op::operator< (long rhs) const -{ - return (this->value_ < rhs); -} - -ACE_INLINE ACE_Atomic_Op & -ACE_Atomic_Op::operator= (long rhs) -{ -#if defined (ACE_HAS_INTRINSIC_INTERLOCKED) - ::_InterlockedExchange (const_cast (&this->value_), rhs); -#elif defined (WIN32) - ::InterlockedExchange (const_cast (&this->value_), rhs); -#elif defined (ACE_HAS_VXATOMICLIB) - ::vxAtomicSet (reinterpret_cast (const_cast (&this->value_)), rhs); -#elif defined (ACE_HAS_SOLARIS_ATOMIC_LIB) - ::atomic_swap_ulong (reinterpret_cast(&this->value_), rhs); -#else /* WIN32 */ - (*exchange_fn_) (&this->value_, rhs); -#endif /* WIN32 */ - return *this; -} - -ACE_INLINE ACE_Atomic_Op & -ACE_Atomic_Op::operator= ( - const ACE_Atomic_Op &rhs) -{ -#if defined (ACE_HAS_INTRINSIC_INTERLOCKED) - ::_InterlockedExchange (const_cast (&this->value_), rhs.value_); -#elif defined (WIN32) - ::InterlockedExchange (const_cast (&this->value_), rhs.value_); -#elif defined (ACE_HAS_VXATOMICLIB) - ::vxAtomicSet (reinterpret_cast (const_cast (&this->value_)), rhs.value_); -#elif defined (ACE_HAS_SOLARIS_ATOMIC_LIB) - ::atomic_swap_ulong (reinterpret_cast(&this->value_), rhs.value_); -#else /* WIN32 */ - (*exchange_fn_) (&this->value_, rhs.value_); -#endif /* WIN32 */ - return *this; -} - -ACE_INLINE long -ACE_Atomic_Op::exchange (long newval) -{ -#if defined (ACE_HAS_INTRINSIC_INTERLOCKED) - return ::_InterlockedExchange (const_cast (&this->value_), newval); -#elif defined (WIN32) - return ::InterlockedExchange (const_cast (&this->value_), newval); -#elif defined (ACE_HAS_VXATOMICLIB) - return ::vxAtomicSet (reinterpret_cast (const_cast (&this->value_)), newval); -#elif defined (ACE_HAS_SOLARIS_ATOMIC_LIB) - return ::atomic_swap_ulong (reinterpret_cast(&this->value_), newval); -#else /* WIN32 */ - return (*exchange_fn_) (&this->value_, newval); -#endif /* WIN32 */ -} - -ACE_INLINE long -ACE_Atomic_Op::value (void) const -{ - return this->value_; -} - -ACE_INLINE volatile long & -ACE_Atomic_Op::value_i (void) -{ - return this->value_; -} - - -ACE_INLINE -ACE_Atomic_Op::ACE_Atomic_Op (void) - : value_ (0) -{ -} - -ACE_INLINE -ACE_Atomic_Op::ACE_Atomic_Op (unsigned long c) - : value_ (c) -{ -} - -ACE_INLINE -ACE_Atomic_Op::ACE_Atomic_Op ( - const ACE_Atomic_Op &rhs) - : value_ (rhs.value_) -{ -} - -ACE_INLINE unsigned long -ACE_Atomic_Op::operator++ (void) -{ -#if defined (ACE_HAS_INTRINSIC_INTERLOCKED) - return static_cast (::_InterlockedIncrement (const_cast (reinterpret_cast(&this->value_)))); -#elif defined (WIN32) - return static_cast (::InterlockedIncrement (const_cast (reinterpret_cast(&this->value_)))); -#elif defined (ACE_HAS_VXATOMICLIB) - return static_cast (::vxAtomicInc (reinterpret_cast (const_cast (reinterpret_cast(&this->value_))))) + 1; -#elif defined (ACE_HAS_SOLARIS_ATOMIC_LIB) - return ::atomic_inc_ulong_nv (&this->value_); -#else /* WIN32 */ - return static_cast ((*increment_fn_) (reinterpret_cast (&this->value_))); -#endif /* WIN32 */ -} - -ACE_INLINE unsigned long -ACE_Atomic_Op::operator++ (int) -{ - return ++*this - 1; -} - -ACE_INLINE unsigned long -ACE_Atomic_Op::operator-- (void) -{ -#if defined (ACE_HAS_INTRINSIC_INTERLOCKED) - return static_cast (::_InterlockedDecrement (const_cast (reinterpret_cast(&this->value_)))); -#elif defined (WIN32) - return static_cast (::InterlockedDecrement (const_cast (reinterpret_cast(&this->value_)))); -#elif defined (ACE_HAS_VXATOMICLIB) - return static_cast (::vxAtomicDec (reinterpret_cast (const_cast (reinterpret_cast(&this->value_))))) - 1; -#elif defined (ACE_HAS_SOLARIS_ATOMIC_LIB) - return ::atomic_dec_ulong_nv (&this->value_); -#else /* WIN32 */ - return static_cast ((*decrement_fn_) (reinterpret_cast (&this->value_))); -#endif /* WIN32 */ -} - -ACE_INLINE unsigned long -ACE_Atomic_Op::operator-- (int) -{ - return --*this + 1; -} - -ACE_INLINE unsigned long -ACE_Atomic_Op::operator+= (unsigned long rhs) -{ -#if defined (ACE_HAS_INTRINSIC_INTERLOCKED) - return static_cast (::_InterlockedExchangeAdd (const_cast (reinterpret_cast (&this->value_)), - rhs)) + rhs; -#elif defined (WIN32) && defined (ACE_HAS_INTERLOCKED_EXCHANGEADD) - return static_cast (::InterlockedExchangeAdd (const_cast (reinterpret_cast (&this->value_)), - rhs)) + rhs; -#elif defined (ACE_HAS_VXATOMICLIB) - return static_cast (::vxAtomicAdd (reinterpret_cast (const_cast (reinterpret_cast(&this->value_))), rhs)) + rhs; -#elif defined (ACE_HAS_SOLARIS_ATOMIC_LIB) - return ::atomic_add_long_nv (&this->value_, rhs); -#else /* WIN32 && ACE_HAS_INTERLOCKED_EXCHANGEADD */ - return static_cast ((*exchange_add_fn_) (reinterpret_cast (&this->value_), rhs)) + rhs; -#endif /* WIN32 && ACE_HAS_INTERLOCKED_EXCHANGEADD */ -} - -ACE_INLINE unsigned long -ACE_Atomic_Op::operator-= (unsigned long rhs) -{ -#if defined (ACE_HAS_INTRINSIC_INTERLOCKED) - return static_cast (::_InterlockedExchangeAdd (const_cast (reinterpret_cast(&this->value_)), - -static_cast(rhs))) - rhs; -#elif defined (WIN32) && defined (ACE_HAS_INTERLOCKED_EXCHANGEADD) - return static_cast (::InterlockedExchangeAdd (const_cast (reinterpret_cast(&this->value_)), - -static_cast(rhs))) - rhs; -#elif defined (ACE_HAS_VXATOMICLIB) - return static_cast (::vxAtomicSub (reinterpret_cast (const_cast (reinterpret_cast(&this->value_))), rhs)) - rhs; -#elif defined (ACE_HAS_SOLARIS_ATOMIC_LIB) - return ::atomic_add_long_nv (&this->value_, -rhs); -#else /* WIN32 && ACE_HAS_INTERLOCKED_EXCHANGEADD */ - long l_rhs = static_cast (rhs); - return static_cast ((*exchange_add_fn_) (reinterpret_cast (&this->value_), -l_rhs)) - rhs; -#endif /* WIN32 && ACE_HAS_INTERLOCKED_EXCHANGEADD */ -} - -ACE_INLINE bool -ACE_Atomic_Op::operator== (unsigned long rhs) const -{ - return (this->value_ == rhs); -} - -ACE_INLINE bool -ACE_Atomic_Op::operator!= (unsigned long rhs) const -{ - return (this->value_ != rhs); -} - -ACE_INLINE bool -ACE_Atomic_Op::operator>= (unsigned long rhs) const -{ - return (this->value_ >= rhs); -} - -ACE_INLINE bool -ACE_Atomic_Op::operator> (unsigned long rhs) const -{ - return (this->value_ > rhs); -} - -ACE_INLINE bool -ACE_Atomic_Op::operator<= (unsigned long rhs) const -{ - return (this->value_ <= rhs); -} - -ACE_INLINE bool -ACE_Atomic_Op::operator< (unsigned long rhs) const -{ - return (this->value_ < rhs); -} - -ACE_INLINE ACE_Atomic_Op & -ACE_Atomic_Op::operator= (unsigned long rhs) -{ -#if defined (ACE_HAS_INTRINSIC_INTERLOCKED) - ::_InterlockedExchange (const_cast (reinterpret_cast (&this->value_)), rhs); -#elif defined (WIN32) - ::InterlockedExchange (const_cast (reinterpret_cast (&this->value_)), rhs); -#elif defined (ACE_HAS_VXATOMICLIB) - ::vxAtomicSet (reinterpret_cast (const_cast (reinterpret_cast (&this->value_))), rhs); -#elif defined (ACE_HAS_SOLARIS_ATOMIC_LIB) - ::atomic_swap_ulong (&this->value_, rhs); -#else /* WIN32 */ - (*exchange_fn_) (reinterpret_cast (&this->value_), rhs); -#endif /* WIN32 */ - return *this; -} - -ACE_INLINE ACE_Atomic_Op & -ACE_Atomic_Op::operator= ( - const ACE_Atomic_Op &rhs) -{ -#if defined (ACE_HAS_INTRINSIC_INTERLOCKED) - ::_InterlockedExchange (const_cast (reinterpret_cast (&this->value_)), rhs.value_); -#elif defined (WIN32) - ::InterlockedExchange (const_cast (reinterpret_cast (&this->value_)), rhs.value_); -#elif defined (ACE_HAS_VXATOMICLIB) - ::vxAtomicSet (reinterpret_cast (const_cast (reinterpret_cast (&this->value_))), rhs.value_); -#elif defined (ACE_HAS_SOLARIS_ATOMIC_LIB) - ::atomic_swap_ulong (&this->value_, rhs.value_); -#else /* WIN32 */ - (*exchange_fn_) (reinterpret_cast (&this->value_), rhs.value_); -#endif /* WIN32 */ - return *this; -} - -ACE_INLINE unsigned long -ACE_Atomic_Op::exchange (unsigned long newval) -{ -#if defined (ACE_HAS_INTRINSIC_INTERLOCKED) - return ::_InterlockedExchange (const_cast (reinterpret_cast (&this->value_)), newval); -#elif defined (WIN32) - return ::InterlockedExchange (const_cast (reinterpret_cast (&this->value_)), newval); -#elif defined (ACE_HAS_VXATOMICLIB) - return ::vxAtomicSet (reinterpret_cast (const_cast (reinterpret_cast (&this->value_))), newval); -#elif defined (ACE_HAS_SOLARIS_ATOMIC_LIB) - return ::atomic_swap_ulong (&this->value_, newval); -#else /* WIN32 */ - return (*exchange_fn_) (reinterpret_cast (&this->value_), newval); -#endif /* WIN32 */ -} - -ACE_INLINE unsigned long -ACE_Atomic_Op::value (void) const -{ - return this->value_; -} - -ACE_INLINE volatile unsigned long & -ACE_Atomic_Op::value_i (void) -{ - return this->value_; -} - -#endif /* ACE_HAS_BUILTIN_ATOMIC_OP */ - -#if defined (ACE_HAS_GCC_ATOMIC_BUILTINS) && (ACE_HAS_GCC_ATOMIC_BUILTINS == 1) - -ACE_INLINE -ACE_Atomic_Op::ACE_Atomic_Op (void) : - ACE_Atomic_Op_GCC () -{ -} - -ACE_INLINE -ACE_Atomic_Op::ACE_Atomic_Op (int c) : - ACE_Atomic_Op_GCC(c) -{ -} - -ACE_INLINE -ACE_Atomic_Op::ACE_Atomic_Op (const ACE_Atomic_Op &c) : - ACE_Atomic_Op_GCC(c) -{ -} - -ACE_INLINE -ACE_Atomic_Op& -ACE_Atomic_Op::operator= (int rhs) -{ - ACE_Atomic_Op_GCC::operator= (rhs); - return *this; -} - - -ACE_INLINE -ACE_Atomic_Op::ACE_Atomic_Op (void) : - ACE_Atomic_Op_GCC() -{ -} - -ACE_INLINE -ACE_Atomic_Op::ACE_Atomic_Op (const ACE_Atomic_Op &c) : - ACE_Atomic_Op_GCC(c) -{ -} - -ACE_INLINE -ACE_Atomic_Op::ACE_Atomic_Op (unsigned int c) : - ACE_Atomic_Op_GCC(c) -{ -} - -ACE_INLINE -ACE_Atomic_Op& -ACE_Atomic_Op::operator= (unsigned int rhs) -{ - ACE_Atomic_Op_GCC::operator= (rhs); - return *this; -} - -ACE_INLINE -ACE_Atomic_Op::ACE_Atomic_Op (void) : - ACE_Atomic_Op_GCC() -{ -} - -ACE_INLINE -ACE_Atomic_Op::ACE_Atomic_Op (long c) : - ACE_Atomic_Op_GCC(c) -{ -} - -ACE_INLINE -ACE_Atomic_Op::ACE_Atomic_Op (const ACE_Atomic_Op &c) : - ACE_Atomic_Op_GCC(c) -{ -} - -ACE_INLINE -ACE_Atomic_Op& -ACE_Atomic_Op::operator= (long rhs) -{ - ACE_Atomic_Op_GCC::operator= (rhs); - return *this; -} - -ACE_INLINE -ACE_Atomic_Op::ACE_Atomic_Op (void) : - ACE_Atomic_Op_GCC () -{ -} - -ACE_INLINE -ACE_Atomic_Op::ACE_Atomic_Op (unsigned long c) : - ACE_Atomic_Op_GCC(c) -{ -} - -ACE_INLINE -ACE_Atomic_Op::ACE_Atomic_Op (const ACE_Atomic_Op &c) : - ACE_Atomic_Op_GCC(c) -{ -} - -ACE_INLINE -ACE_Atomic_Op& -ACE_Atomic_Op::operator= (unsigned long rhs) -{ - ACE_Atomic_Op_GCC::operator= (rhs); - return *this; -} - -// The long long intrinsics are not available on PPC -#if !defined (__powerpc__) -ACE_INLINE -ACE_Atomic_Op::ACE_Atomic_Op (void) : - ACE_Atomic_Op_GCC() -{ -} - -ACE_INLINE -ACE_Atomic_Op::ACE_Atomic_Op (long long c) : - ACE_Atomic_Op_GCC(c) -{ -} - -ACE_INLINE -ACE_Atomic_Op::ACE_Atomic_Op (const ACE_Atomic_Op &c) : - ACE_Atomic_Op_GCC(c) -{ -} - -ACE_INLINE -ACE_Atomic_Op& -ACE_Atomic_Op::operator= (long long rhs) -{ - ACE_Atomic_Op_GCC::operator= (rhs); - return *this; -} - -ACE_INLINE -ACE_Atomic_Op::ACE_Atomic_Op (void) : - ACE_Atomic_Op_GCC () -{ -} - -ACE_INLINE -ACE_Atomic_Op::ACE_Atomic_Op (unsigned long long c) : - ACE_Atomic_Op_GCC(c) -{ -} - -ACE_INLINE -ACE_Atomic_Op::ACE_Atomic_Op (const ACE_Atomic_Op &c) : - ACE_Atomic_Op_GCC(c) -{ -} - -ACE_INLINE -ACE_Atomic_Op& -ACE_Atomic_Op::operator= (unsigned long long rhs) -{ - ACE_Atomic_Op_GCC::operator= (rhs); - return *this; -} -#endif /* !__powerpc__ */ - -#if !defined (ACE_LACKS_GCC_ATOMIC_BUILTINS_2) -ACE_INLINE -ACE_Atomic_Op::ACE_Atomic_Op (void) : - ACE_Atomic_Op_GCC() -{ -} - -ACE_INLINE -ACE_Atomic_Op::ACE_Atomic_Op (short c) : - ACE_Atomic_Op_GCC(c) -{ -} - -ACE_INLINE -ACE_Atomic_Op::ACE_Atomic_Op (const ACE_Atomic_Op &c) : - ACE_Atomic_Op_GCC(c) -{ -} - -ACE_INLINE -ACE_Atomic_Op& -ACE_Atomic_Op::operator= (short rhs) -{ - ACE_Atomic_Op_GCC::operator= (rhs); - return *this; -} - -ACE_INLINE -ACE_Atomic_Op::ACE_Atomic_Op (void) : - ACE_Atomic_Op_GCC () -{ -} - -ACE_INLINE -ACE_Atomic_Op::ACE_Atomic_Op (unsigned short c) : - ACE_Atomic_Op_GCC(c) -{ -} - -ACE_INLINE -ACE_Atomic_Op::ACE_Atomic_Op (const ACE_Atomic_Op &c) : - ACE_Atomic_Op_GCC(c) -{ -} - -ACE_INLINE -ACE_Atomic_Op& -ACE_Atomic_Op::operator= (unsigned short rhs) -{ - ACE_Atomic_Op_GCC::operator= (rhs); - return *this; -} -#endif - -#if !defined (ACE_LACKS_GCC_ATOMIC_BUILTINS_1) -ACE_INLINE -ACE_Atomic_Op::ACE_Atomic_Op (void) : - ACE_Atomic_Op_GCC () -{ -} - -ACE_INLINE -ACE_Atomic_Op::ACE_Atomic_Op (bool c) : - ACE_Atomic_Op_GCC(c) -{ -} - -ACE_INLINE -ACE_Atomic_Op::ACE_Atomic_Op (const ACE_Atomic_Op &c) : - ACE_Atomic_Op_GCC(c) -{ -} - -ACE_INLINE -ACE_Atomic_Op& -ACE_Atomic_Op::operator= (bool rhs) -{ - ACE_Atomic_Op_GCC::operator= (rhs); - return *this; -} -#endif - -#endif /* ACE_HAS_GCC_ATOMIC_BUILTINS==1 */ - -ACE_END_VERSIONED_NAMESPACE_DECL - diff --git a/modules/worldengine/deps/acelite/ace/Atomic_Op_GCC_T.cpp b/modules/worldengine/deps/acelite/ace/Atomic_Op_GCC_T.cpp deleted file mode 100644 index 3e7e7cada0..0000000000 --- a/modules/worldengine/deps/acelite/ace/Atomic_Op_GCC_T.cpp +++ /dev/null @@ -1,23 +0,0 @@ -#include "ace/OS_NS_unistd.h" - -#if defined (ACE_HAS_GCC_ATOMIC_BUILTINS) && (ACE_HAS_GCC_ATOMIC_BUILTINS == 1) - -#if !defined (__ACE_INLINE__) -#include "ace/Atomic_Op_GCC_T.inl" -#endif /* __ACE_INLINE__ */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -template -void -ACE_Atomic_Op_GCC::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_HAS_GCC_ATOMIC_BUILTINS */ diff --git a/modules/worldengine/deps/acelite/ace/Atomic_Op_GCC_T.h b/modules/worldengine/deps/acelite/ace/Atomic_Op_GCC_T.h deleted file mode 100644 index 6a25fe176b..0000000000 --- a/modules/worldengine/deps/acelite/ace/Atomic_Op_GCC_T.h +++ /dev/null @@ -1,137 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Atomic_Op_GCC_T.h - * - * @author Johnny Willemsen -class ACE_Export ACE_Atomic_Op_GCC -{ -public: - /// Atomically pre-increment @c value_. - T operator++ (void); - - /// Atomically post-increment @c value_. - T operator++ (int); - - /// Atomically increment @c value_ by rhs. - T operator+= (T rhs); - - /// Atomically pre-decrement @c value_. - T operator-- (void); - - /// Atomically post-decrement @c value_. - T operator-- (int); - - /// Atomically decrement @c value_ by rhs. - T operator-= (T rhs); - - /// Atomically compare @c value_ with rhs. - bool operator== (T rhs) const; - - /// Atomically compare @c value_ with rhs. - bool operator!= (T rhs) const; - - /// Atomically check if @c value_ greater than or equal to rhs. - bool operator>= (T rhs) const; - - /// Atomically check if @c value_ greater than rhs. - bool operator> (T rhs) const; - - /// Atomically check if @c value_ less than or equal to rhs. - bool operator<= (T rhs) const; - - /// Atomically check if @c value_ less than rhs. - bool operator< (T rhs) const; - - /// Exchange value with @a newval. - T exchange (T newval); - - /// Explicitly return @c value_. - T value (void) const; - - /// Dump the state of an object. - void dump (void) const; - - /// Explicitly return @c value_ (by reference). - volatile T &value_i (void); - - // ACE_ALLOC_HOOK_DECLARE; - // Declare the dynamic allocation hooks. - -protected: - /// Atomically assign rhs to @c value_. - ACE_Atomic_Op_GCC &operator= (T rhs); - - /// Atomically assign to @c value_. - ACE_Atomic_Op_GCC &operator= (const ACE_Atomic_Op_GCC &rhs); - - /// Initialize @c value_ to 0. - ACE_Atomic_Op_GCC (void); - - /// Initialize @c value_ to c. - ACE_Atomic_Op_GCC (T c); - - /// Manage copying... - ACE_Atomic_Op_GCC (const ACE_Atomic_Op_GCC &c); - -private: - - // This function cannot be supported by this template specialization. - // If you need access to an underlying lock, use the ACE_Atomic_Op_Ex - // template instead. - ACE_Thread_Mutex &mutex (void); - -private: - - /// Current object decorated by the atomic op. - volatile T value_; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/Atomic_Op_GCC_T.inl" -#endif /* __ACE_INLINE__ */ - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "ace/Atomic_Op_GCC_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Atomic_Op_GCC_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ - - -#endif /* ACE_HAS_GCC_ATOMIC_BUILTINS */ - -#include /**/ "ace/post.h" -#endif /*ACE_ATOMIC_OP_GCC_T_H*/ diff --git a/modules/worldengine/deps/acelite/ace/Atomic_Op_GCC_T.inl b/modules/worldengine/deps/acelite/ace/Atomic_Op_GCC_T.inl deleted file mode 100644 index 90f7c4839c..0000000000 --- a/modules/worldengine/deps/acelite/ace/Atomic_Op_GCC_T.inl +++ /dev/null @@ -1,152 +0,0 @@ -// -*- C++ -*- -#if defined (ACE_HAS_GCC_ATOMIC_BUILTINS) && (ACE_HAS_GCC_ATOMIC_BUILTINS == 1) - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -template -ACE_INLINE -ACE_Atomic_Op_GCC::ACE_Atomic_Op_GCC (void) - : value_ (0) -{ -} - -template -ACE_INLINE -ACE_Atomic_Op_GCC::ACE_Atomic_Op_GCC (T c) - : value_ (c) -{ -} - -template -ACE_INLINE -ACE_Atomic_Op_GCC::ACE_Atomic_Op_GCC ( - const ACE_Atomic_Op_GCC &rhs) - : value_ (rhs.value_) -{ -} - -template -ACE_INLINE T -ACE_Atomic_Op_GCC::operator++ (void) -{ - return __sync_add_and_fetch (&this->value_, 1); -} - -template -ACE_INLINE T -ACE_Atomic_Op_GCC::operator++ (int) -{ - return __sync_fetch_and_add (&this->value_, 1); -} - -template -ACE_INLINE T -ACE_Atomic_Op_GCC::operator-- (void) -{ - return __sync_sub_and_fetch (&this->value_, 1); -} - -template -ACE_INLINE T -ACE_Atomic_Op_GCC::operator-- (int) -{ - return __sync_fetch_and_sub (&this->value_, 1); -} - -template -ACE_INLINE T -ACE_Atomic_Op_GCC::operator+= (T rhs) -{ - return __sync_add_and_fetch (&this->value_, rhs); -} - -template -ACE_INLINE T -ACE_Atomic_Op_GCC::operator-= (T rhs) -{ - return __sync_sub_and_fetch (&this->value_, rhs); -} - -template -ACE_INLINE bool -ACE_Atomic_Op_GCC::operator== (T rhs) const -{ - return (this->value_ == rhs); -} - -template -ACE_INLINE bool -ACE_Atomic_Op_GCC::operator!= (T rhs) const -{ - return (this->value_ != rhs); -} - -template -ACE_INLINE bool -ACE_Atomic_Op_GCC::operator>= (T rhs) const -{ - return (this->value_ >= rhs); -} - -template -ACE_INLINE bool -ACE_Atomic_Op_GCC::operator> (T rhs) const -{ - return (this->value_ > rhs); -} - -template -ACE_INLINE bool -ACE_Atomic_Op_GCC::operator<= (T rhs) const -{ - return (this->value_ <= rhs); -} - -template -ACE_INLINE bool -ACE_Atomic_Op_GCC::operator< (T rhs) const -{ - return (this->value_ < rhs); -} - -template -ACE_INLINE ACE_Atomic_Op_GCC & -ACE_Atomic_Op_GCC::operator= (T rhs) -{ - (void) __sync_lock_test_and_set (&this->value_, rhs); - return *this; -} - -template -ACE_INLINE ACE_Atomic_Op_GCC & -ACE_Atomic_Op_GCC::operator= ( - const ACE_Atomic_Op_GCC &rhs) -{ - (void) __sync_lock_test_and_set (&this->value_, rhs.value_); - return *this; -} - -template -ACE_INLINE T -ACE_Atomic_Op_GCC::exchange (T newval) -{ - return __sync_val_compare_and_swap (&this->value_, this->value_, newval); -} - -template -ACE_INLINE T -ACE_Atomic_Op_GCC::value (void) const -{ - return this->value_; -} - -template -ACE_INLINE volatile T & -ACE_Atomic_Op_GCC::value_i (void) -{ - return this->value_; -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_HAS_GCC_ATOMIC_BUILTINS */ diff --git a/modules/worldengine/deps/acelite/ace/Atomic_Op_Sparc.c b/modules/worldengine/deps/acelite/ace/Atomic_Op_Sparc.c deleted file mode 100644 index 9e59864ae8..0000000000 --- a/modules/worldengine/deps/acelite/ace/Atomic_Op_Sparc.c +++ /dev/null @@ -1,187 +0,0 @@ -/* - * - * This is a C file for a reason. The Sun C++ compiler does not accept - * inline assembler. - * - * Portions of this code are based on atomic operations found in the - * linux kernel source code. - */ - -#if defined (ACE_INCLUDE_ATOMIC_OP_SPARC) - -#if defined(__i386) && defined(__SUNPRO_C) -static void -__sunpro_asm_code() { - __asm("\n\ - .globl ace_atomic_add_long \n\ - .type ace_atomic_add_long,@function \n\ - .align 4 \n\ -ace_atomic_add_long: \n\ - movl 0x00000004(%esp), %edx \n\ - movl 0x00000008(%esp), %eax \n\ - lock; xadd %eax, (%edx) \n\ - addl 0x00000008(%esp), %eax \n\ - ret \n\ - "); - - __asm("\n\ - .globl ace_atomic_swap_long \n\ - .type ace_atomic_swap_long,@function \n\ - .align 4 \n\ -ace_atomic_swap_long: \n\ - movl 0x00000004(%esp), %edx \n\ - movl 0x00000008(%esp), %eax \n\ - xchg %eax, (%edx) \n\ - ret \n\ - "); - - __asm("\n\ - .globl ace_atomic_swap_add_long \n\ - .type ace_atomic_swap_add_long,@function \n\ - .align 4 \n\ -ace_atomic_swap_add_long: \n\ - movl 0x00000004(%esp), %edx \n\ - movl 0x00000008(%esp), %eax \n\ - lock; xadd %eax, (%edx) \n\ - ret \n\ - "); -} - -#elif defined(__x86_64) && defined(__SUNPRO_C) - -static void -__sunpro_asm_code() { - __asm("\n\ - .globl ace_atomic_add_long \n\ - .type ace_atomic_add_long,@function \n\ - .align 16 \n\ -ace_atomic_add_long: \n\ - movq %rsi, %rax \n\ - lock; xaddq %rax, (%rdi) \n\ - addq %rsi, %rax \n\ - ret \n\ - "); - - __asm("\n\ - .globl ace_atomic_swap_long \n\ - .type ace_atomic_swap_long,@function \n\ - .align 16 \n\ -ace_atomic_swap_long: \n\ - xchgq %rsi, (%rdi) \n\ - movq %rsi, %rax \n\ - ret \n\ - "); - - __asm("\n\ - .globl ace_atomic_swap_add_long \n\ - .type ace_atomic_swap_add_long,@function \n\ - .align 16 \n\ -ace_atomic_swap_add_long: \n\ - lock; xaddq %rsi, (%rdi) \n\ - movq %rsi, %rax \n\ - ret \n\ - "); -} - -#elif defined (__sparcv9) - -unsigned long -ace_atomic_add_long (volatile unsigned long *dest, long rhs) -{ - __asm ("restore\n" - "ldx [%o0], %o2\n" - ".again_add:\n" - "add %o2, %o1, %o3\n" - "casx [%o0], %o2, %o3\n" - "cmp %o2, %o3\n" - "bne,pn %xcc, .again_add\n" - "mov %o3, %o2\n" - "retl\n" - "add %o2, %o1, %o0\n"); -} - -unsigned long -ace_atomic_swap_long (volatile unsigned long *dest, unsigned long rhs) -{ - __asm ("restore\n" - "ldx [%o0], %o2\n" - ".again_swap:\n" - "mov %o1, %o3\n" - "casx [%o0], %o2, %o3\n" - "cmp %o2, %o3\n" - "bne,pn %xcc, .again_swap\n" - "mov %o3, %o2\n" - "retl\n" - "mov %o3, %o0\n"); -} - -unsigned long -ace_atomic_swap_add_long (volatile unsigned long *dest, long rhs) -{ - __asm ("restore\n" - "ldx [%o0], %o2\n" - ".again_swap_add:\n" - "mov %o2, %o4\n" - "add %o2, %o1, %o3\n" - "casx [%o0], %o2, %o3\n" - "cmp %o2, %o3\n" - "bne,pn %xcc, .again_swap_add\n" - "mov %o3, %o2\n" - "retl\n" - "mov %o4, %o0\n"); -} - -#else - -unsigned long -ace_atomic_add_long (volatile unsigned long *dest, long rhs) -{ - __asm ("restore\n" - "ld [%o0], %o2\n" - ".again_add:\n" - "add %o2, %o1, %o3\n" - "cas [%o0], %o2, %o3\n" - "cmp %o2, %o3\n" - "bne,pn %icc, .again_add\n" - "mov %o3, %o2\n" - "retl\n" - "add %o2, %o1, %o0\n"); -} - -unsigned long -ace_atomic_swap_long (volatile unsigned long *dest, unsigned long rhs) -{ - __asm ("restore\n" - "ld [%o0], %o2\n" - ".again_swap:\n" - "mov %o1, %o3\n" - "cas [%o0], %o2, %o3\n" - "cmp %o2, %o3\n" - "bne,pn %icc, .again_swap\n" - "mov %o3, %o2\n" - "retl\n" - "mov %o3, %o0\n"); -} - -unsigned long -ace_atomic_swap_add_long (volatile unsigned long *dest, long rhs) -{ - __asm ("restore\n" - "ld [%o0], %o2\n" - ".again_swap_add:\n" - "mov %o2, %o4\n" - "add %o2, %o1, %o3\n" - "cas [%o0], %o2, %o3\n" - "cmp %o2, %o3\n" - "bne,pn %icc, .again_swap_add\n" - "mov %o3, %o2\n" - "retl\n" - "mov %o4, %o0\n"); -} - -# endif /* __sparcv9 */ - -#elif !defined (__GNUC__) && !defined (__INTEL_COMPILER) -/* Make compilers stop complaining about an empty translation unit */ -static int shut_up_compiler = 0; -#endif /* ACE_INCLUDE_ATOMIC_OP_SPARC */ diff --git a/modules/worldengine/deps/acelite/ace/Atomic_Op_Sparc.h b/modules/worldengine/deps/acelite/ace/Atomic_Op_Sparc.h deleted file mode 100644 index 3c4d883c2a..0000000000 --- a/modules/worldengine/deps/acelite/ace/Atomic_Op_Sparc.h +++ /dev/null @@ -1,12 +0,0 @@ -/* -*- C++ -*- */ -#ifndef ACE_ATOMIC_OP_SPARC_H -#define ACE_ATOMIC_OP_SPARC_H - -extern "C" -{ - unsigned long ace_atomic_add_long (volatile unsigned long *dest, long rhs); - unsigned long ace_atomic_swap_long (volatile unsigned long *dest, unsigned long rhs); - unsigned long ace_atomic_swap_add_long (volatile unsigned long *dest, long rhs); -} - -#endif /* ACE_ATOMIC_OP_SPARC_H */ diff --git a/modules/worldengine/deps/acelite/ace/Atomic_Op_T.cpp b/modules/worldengine/deps/acelite/ace/Atomic_Op_T.cpp deleted file mode 100644 index 82311d3e26..0000000000 --- a/modules/worldengine/deps/acelite/ace/Atomic_Op_T.cpp +++ /dev/null @@ -1,80 +0,0 @@ -#ifndef ACE_ATOMIC_OP_T_CPP -#define ACE_ATOMIC_OP_T_CPP - -#include "ace/Atomic_Op_T.h" - -#ifdef ACE_HAS_DUMP -# include "ace/Log_Category.h" -#endif /* ACE_HAS_DUMP */ - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#if !defined (__ACE_INLINE__) -#include "ace/Atomic_Op_T.inl" -#endif /* __ACE_INLINE__ */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_ALLOC_HOOK_DEFINE(ACE_Atomic_Op_Ex) -ACE_ALLOC_HOOK_DEFINE(ACE_Atomic_Op) - -// ************************************************* -template ACE_LOCK & -ACE_Atomic_Op_Ex::mutex (void) -{ - // ACE_TRACE ("ACE_Atomic_Op_Ex::mutex"); - return this->mutex_; -} - -template -void -ACE_Atomic_Op_Ex::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - // ACE_TRACE ("ACE_Atomic_Op_Ex::dump"); - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - this->mutex_.dump (); - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} - -template -ACE_Atomic_Op_Ex::ACE_Atomic_Op_Ex (ACE_LOCK & mtx) - : mutex_ (mtx) - , value_ (0) -{ - // ACE_TRACE ("ACE_Atomic_Op_Ex::ACE_Atomic_Op_Ex"); -} - -template -ACE_Atomic_Op_Ex::ACE_Atomic_Op_Ex ( - ACE_LOCK & mtx, - typename ACE_Atomic_Op_Ex::arg_type c) - : mutex_ (mtx) - , value_ (c) -{ - // ACE_TRACE ("ACE_Atomic_Op_Ex::ACE_Atomic_Op_Ex"); -} - -// **************************************************************** - -template -ACE_Atomic_Op::ACE_Atomic_Op (void) - : impl_ (this->own_mutex_) -{ - // ACE_TRACE ("ACE_Atomic_Op::ACE_Atomic_Op"); -} - -template -ACE_Atomic_Op::ACE_Atomic_Op ( - typename ACE_Atomic_Op::arg_type c) - : impl_ (own_mutex_, c) -{ - // ACE_TRACE ("ACE_Atomic_Op::ACE_Atomic_Op"); -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_ATOMIC_OP_T_CPP */ diff --git a/modules/worldengine/deps/acelite/ace/Atomic_Op_T.h b/modules/worldengine/deps/acelite/ace/Atomic_Op_T.h deleted file mode 100644 index 86fb0ef098..0000000000 --- a/modules/worldengine/deps/acelite/ace/Atomic_Op_T.h +++ /dev/null @@ -1,357 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Atomic_Op_T.h - * - * @author Douglas C. Schmidt - */ -//============================================================================= - -#ifndef ACE_ATOMIC_OP_T_H -#define ACE_ATOMIC_OP_T_H -#include /**/ "ace/pre.h" - -#include /**/ "ace/config-all.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -template -struct ACE_Type_Traits -{ - typedef TYPE const & parameter_type; -}; - -template<> -struct ACE_Type_Traits -{ - typedef bool parameter_type; -}; - -template<> -struct ACE_Type_Traits -{ - typedef char parameter_type; -}; - -template<> -struct ACE_Type_Traits -{ - typedef signed char parameter_type; -}; - -template<> -struct ACE_Type_Traits -{ - typedef unsigned char parameter_type; -}; - -template<> -struct ACE_Type_Traits -{ - typedef short parameter_type; -}; - -template<> -struct ACE_Type_Traits -{ - typedef unsigned short parameter_type; -}; - -template<> -struct ACE_Type_Traits -{ - typedef int parameter_type; -}; - -template<> -struct ACE_Type_Traits -{ - typedef unsigned int parameter_type; -}; - -template<> -struct ACE_Type_Traits -{ - typedef long parameter_type; -}; - -template<> -struct ACE_Type_Traits -{ - typedef unsigned long parameter_type; -}; - -template<> -struct ACE_Type_Traits -{ - typedef long long parameter_type; -}; - -template<> -struct ACE_Type_Traits -{ - typedef unsigned long long parameter_type; -}; - -template<> -struct ACE_Type_Traits -{ - typedef float parameter_type; -}; - -template<> -struct ACE_Type_Traits -{ - typedef double parameter_type; -}; - -template<> -struct ACE_Type_Traits -{ - typedef long double parameter_type; -}; - -template -struct ACE_Type_Traits -{ - typedef TYPE* parameter_type; -}; - -/** - * @class ACE_Atomic_Op_Ex - * - * @brief Transparently parameterizes synchronization into basic - * arithmetic operations. - * - * This class is described in an article in the July/August 1994 - * issue of the C++ Report magazine. It implements a - * templatized version of the Decorator pattern from the GoF book. - * - * ACE_Atomic_Op_Ex objects must be constructed with a reference - * to an existing lock. A single lock can be shared between - * multiple ACE_Atomic_Op_Ex objects. If you do not require this - * ability consider using the ACE_Atomic_Op class instead, which - * may be able to take advantage of platform-specific - * optimisations to provide atomic operations without requiring a - * lock. - */ -template -class ACE_Atomic_Op_Ex -{ -public: - - typedef typename ACE_Type_Traits::parameter_type arg_type; - - // = Initialization methods. - - /// Initialize @c value_ to 0. - ACE_Atomic_Op_Ex (ACE_LOCK & mtx); - - /// Initialize @c value_ to c. - ACE_Atomic_Op_Ex (ACE_LOCK & mtx, arg_type c); - - // = Accessors. - - /// Atomically pre-increment @c value_. - TYPE operator++ (void); - - /// Atomically post-increment @c value_. - TYPE operator++ (int); - - /// Atomically increment @c value_ by rhs. - TYPE operator+= (arg_type rhs); - - /// Atomically pre-decrement @c value_. - TYPE operator-- (void); - - /// Atomically post-decrement @c value_. - TYPE operator-- (int); - - /// Atomically decrement @c value_ by rhs. - TYPE operator-= (arg_type rhs); - - /// Atomically compare @c value_ with rhs. - bool operator== (arg_type rhs) const; - - /// Atomically compare @c value_ with rhs. - bool operator!= (arg_type rhs) const; - - /// Atomically check if @c value_ greater than or equal to rhs. - bool operator>= (arg_type rhs) const; - - /// Atomically check if @c value_ greater than rhs. - bool operator> (arg_type rhs) const; - - /// Atomically check if @c value_ less than or equal to rhs. - bool operator<= (arg_type rhs) const; - - /// Atomically check if @c value_ less than rhs. - bool operator< (arg_type rhs) const; - - /// Atomically assign rhs to @c value_. - ACE_Atomic_Op_Ex &operator= (arg_type rhs); - - /// Atomically assign to @c value_. - ACE_Atomic_Op_Ex &operator= ( - ACE_Atomic_Op_Ex const & rhs); - - /// Exchange value with @a newval. - TYPE exchange (TYPE newval); - - /// Explicitly return @c value_. - TYPE value (void) const; - - /// Dump the state of an object. - void dump (void) const; - - // ACE_ALLOC_HOOK_DECLARE; - // Declare the dynamic allocation hooks. - - /// Manage copying... - ACE_Atomic_Op_Ex (ACE_Atomic_Op_Ex const &); - - /** - * Returns a reference to the underlying ACE_LOCK. This makes it - * possible to acquire the lock explicitly, which can be useful in - * some cases if you instantiate the ACE_Atomic_Op_Ex with an - * ACE_Recursive_Mutex or ACE_Process_Mutex. - * - * @note The right name would be lock_, but HP/C++ will choke on that! - */ - ACE_LOCK & mutex (void); - - /** - * Explicitly return @c value_ (by reference). This gives the user - * full, unrestricted access to the underlying value. This method - * will usually be used in conjunction with explicit access to the - * lock. Use with care ;-) - */ - TYPE & value_i (void); - -private: - /// Type of synchronization mechanism. - ACE_LOCK & mutex_; - - /// Current object decorated by the atomic op. - TYPE value_; -}; - -/** - * @class ACE_Atomic_Op - * - * @brief Transparently parameterizes synchronization into basic - * arithmetic operations. - * - * This class is described in an article in the July/August 1994 - * issue of the C++ Report magazine. It implements a - * templatized version of the Decorator pattern from the GoF book. - * - * Certain platforms may provide a template specialization for - * ACE_Atomic_Op that provides optimized - * atomic integer operations without actually requiring a mutex. - */ -template -class ACE_Atomic_Op -{ -public: - - typedef typename ACE_Type_Traits::parameter_type arg_type; - - /// Initialize @c value_ to 0. - ACE_Atomic_Op (void); - - /// Initialize @c value_ to c. - ACE_Atomic_Op (arg_type c); - - /// Manage copying... - ACE_Atomic_Op (ACE_Atomic_Op const & c); - - /// Atomically assign @a rhs to @c value_. - ACE_Atomic_Op & operator= (arg_type rhs); - - /// Atomically assign @a rhs to @c value_. - ACE_Atomic_Op & operator= ( - ACE_Atomic_Op const & rhs); - - /// Atomically pre-increment @c value_. - TYPE operator++ (void); - - /// Atomically post-increment @c value_. - TYPE operator++ (int); - - /// Atomically increment @c value_ by rhs. - TYPE operator+= (arg_type rhs); - - /// Atomically pre-decrement @c value_. - TYPE operator-- (void); - - /// Atomically post-decrement @c value_. - TYPE operator-- (int); - - /// Atomically decrement @c value_ by @a rhs. - TYPE operator-= (arg_type rhs); - - /// Atomically compare @c value_ with @a rhs. - bool operator== (arg_type rhs) const; - - /// Atomically compare @c value_ with @a rhs. - bool operator!= (arg_type rhs) const; - - /// Atomically check if @c value_ greater than or equal to @a rhs. - bool operator>= (arg_type rhs) const; - - /// Atomically check if @c value_ greater than @a rhs. - bool operator> (arg_type rhs) const; - - /// Atomically check if @c value_ less than or equal to @a rhs. - bool operator<= (arg_type rhs) const; - - /// Atomically check if @c value_ less than @a rhs. - bool operator< (arg_type rhs) const; - - /// Exchange value with @a newval. - TYPE exchange (TYPE newval); - - /// Explicitly return @c value_. - TYPE value (void) const; - - /// Dump the state of an object. - void dump (void) const; - - /** - * Explicitly return @c value_ (by reference). This gives the user - * full, unrestricted access to the underlying value. This method - * will usually be used in conjunction with explicit access to the - * lock. Use with care ;-) - */ - TYPE & value_i (void); - -private: - /// Type of synchronization mechanism. - ACE_LOCK own_mutex_; - - /// Underlying atomic op implementation. - ACE_Atomic_Op_Ex impl_; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/Atomic_Op_T.inl" -#endif /* __ACE_INLINE__ */ - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "ace/Atomic_Op_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Atomic_Op_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ - -#include /**/ "ace/post.h" -#endif /*ACE_ATOMIC_OP_T_H*/ diff --git a/modules/worldengine/deps/acelite/ace/Atomic_Op_T.inl b/modules/worldengine/deps/acelite/ace/Atomic_Op_T.inl deleted file mode 100644 index 1b1eb988f9..0000000000 --- a/modules/worldengine/deps/acelite/ace/Atomic_Op_T.inl +++ /dev/null @@ -1,346 +0,0 @@ -// -*- C++ -*- -#include "ace/Guard_T.h" - -#include - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -// -// ACE_Atomic_Op_Ex inline functions -// - -template -ACE_INLINE TYPE -ACE_Atomic_Op_Ex::operator++ (void) -{ - // ACE_TRACE ("ACE_Atomic_Op_Ex::operator++"); - ACE_GUARD_RETURN (ACE_LOCK, ace_mon, this->mutex_, this->value_); - return ++this->value_; -} - -template -ACE_INLINE TYPE -ACE_Atomic_Op_Ex::operator+= ( - typename ACE_Atomic_Op_Ex::arg_type rhs) -{ - // ACE_TRACE ("ACE_Atomic_Op_Ex::operator+="); - ACE_GUARD_RETURN (ACE_LOCK, ace_mon, this->mutex_, this->value_); - return this->value_ += rhs; -} - -template -ACE_INLINE TYPE -ACE_Atomic_Op_Ex::operator-- (void) -{ - // ACE_TRACE ("ACE_Atomic_Op_Ex::operator--"); - ACE_GUARD_RETURN (ACE_LOCK, ace_mon, this->mutex_, this->value_); - return --this->value_; -} - -template -ACE_INLINE TYPE -ACE_Atomic_Op_Ex::operator-= ( - typename ACE_Atomic_Op_Ex::arg_type rhs) -{ - // ACE_TRACE ("ACE_Atomic_Op_Ex::operator-="); - ACE_GUARD_RETURN (ACE_LOCK, ace_mon, this->mutex_, this->value_); - return this->value_ -= rhs; -} - -template -ACE_INLINE -ACE_Atomic_Op_Ex::ACE_Atomic_Op_Ex ( - ACE_Atomic_Op_Ex const & rhs) - : mutex_ (rhs.mutex_) - , value_ (rhs.value ()) // rhs.value() returns atomically -{ - // ACE_TRACE ("ACE_Atomic_Op_Ex::ACE_Atomic_Op_Ex"); -} - -template -ACE_INLINE TYPE -ACE_Atomic_Op_Ex::operator++ (int) -{ - // ACE_TRACE ("ACE_Atomic_Op_Ex::operator++"); - ACE_GUARD_RETURN (ACE_LOCK, ace_mon, this->mutex_, this->value_); - return this->value_++; -} - -template -ACE_INLINE TYPE -ACE_Atomic_Op_Ex::operator-- (int) -{ - // ACE_TRACE ("ACE_Atomic_Op_Ex::operator--"); - ACE_GUARD_RETURN (ACE_LOCK, ace_mon, this->mutex_, this->value_); - return this->value_--; -} - -template -ACE_INLINE bool -ACE_Atomic_Op_Ex::operator== ( - typename ACE_Atomic_Op_Ex::arg_type rhs) const -{ - // ACE_TRACE ("ACE_Atomic_Op_Ex::operator=="); - ACE_GUARD_RETURN (ACE_LOCK, ace_mon, this->mutex_, false); - return this->value_ == rhs; -} - -template -ACE_INLINE bool -ACE_Atomic_Op_Ex::operator!= ( - typename ACE_Atomic_Op_Ex::arg_type rhs) const -{ - // ACE_TRACE ("ACE_Atomic_Op_Ex::operator!="); - return !(*this == rhs); -} - -template -ACE_INLINE bool -ACE_Atomic_Op_Ex::operator>= ( - typename ACE_Atomic_Op_Ex::arg_type rhs) const -{ - // ACE_TRACE ("ACE_Atomic_Op_Ex::operator>="); - ACE_GUARD_RETURN (ACE_LOCK, ace_mon, this->mutex_, false); - return this->value_ >= rhs; -} - -template -ACE_INLINE bool -ACE_Atomic_Op_Ex::operator> ( - typename ACE_Atomic_Op_Ex::arg_type rhs) const -{ - // ACE_TRACE ("ACE_Atomic_Op_Ex::operator>"); - ACE_GUARD_RETURN (ACE_LOCK, ace_mon, this->mutex_, false); - return this->value_ > rhs; -} - -template -ACE_INLINE bool -ACE_Atomic_Op_Ex::operator<= ( - typename ACE_Atomic_Op_Ex::arg_type rhs) const -{ - // ACE_TRACE ("ACE_Atomic_Op_Ex::operator<="); - ACE_GUARD_RETURN (ACE_LOCK, ace_mon, this->mutex_, false); - return this->value_ <= rhs; -} - -template -ACE_INLINE bool -ACE_Atomic_Op_Ex::operator< ( - typename ACE_Atomic_Op_Ex::arg_type rhs) const -{ - // ACE_TRACE ("ACE_Atomic_Op_Ex::operator<"); - ACE_GUARD_RETURN (ACE_LOCK, ace_mon, this->mutex_, false); - return this->value_ < rhs; -} - -template -ACE_INLINE ACE_Atomic_Op_Ex & -ACE_Atomic_Op_Ex::operator= ( - ACE_Atomic_Op_Ex const & rhs) -{ - // ACE_TRACE ("ACE_Atomic_Op_Ex::operator="); - - ACE_Atomic_Op_Ex tmp (rhs); - - ACE_GUARD_RETURN (ACE_LOCK, ace_mon, this->mutex_, *this); - std::swap (this->value_, tmp.value_); - - return *this; -} - -template -ACE_INLINE TYPE -ACE_Atomic_Op_Ex::exchange (TYPE newval) -{ - // ACE_TRACE ("ACE_Atomic_Op_Ex::exchange"); - ACE_GUARD_RETURN (ACE_LOCK, ace_mon, this->mutex_, this->value_); - std::swap (this->value_, newval); - return newval; -} - -template -ACE_INLINE TYPE -ACE_Atomic_Op_Ex::value (void) const -{ - // ACE_TRACE ("ACE_Atomic_Op_Ex::value"); - ACE_GUARD_RETURN (ACE_LOCK, ace_mon, this->mutex_, this->value_); - return this->value_; -} - -template -ACE_INLINE TYPE & -ACE_Atomic_Op_Ex::value_i (void) -{ - // Explicitly return (by reference). This gives the user - // full, unrestricted access to the underlying value. This method - // will usually be used in conjunction with explicit access to the - // lock. Use with care ;-) - return this->value_; -} - -template -ACE_INLINE ACE_Atomic_Op_Ex & -ACE_Atomic_Op_Ex::operator= ( - typename ACE_Atomic_Op_Ex::arg_type rhs) -{ - // ACE_TRACE ("ACE_Atomic_Op_Ex::operator="); - ACE_GUARD_RETURN (ACE_LOCK, ace_mon, this->mutex_, *this); - this->value_ = rhs; - return *this; -} - -// -// ACE_Atomic_Op inline functions -// - -template ACE_INLINE -ACE_Atomic_Op::ACE_Atomic_Op ( - ACE_Atomic_Op const & rhs) - : impl_ (own_mutex_, rhs.value ()) -{ - // ACE_TRACE ("ACE_Atomic_Op::ACE_Atomic_Op"); -} - - -template -ACE_INLINE ACE_Atomic_Op & -ACE_Atomic_Op::operator= ( - typename ACE_Atomic_Op::arg_type i) -{ - this->impl_ = i; - return *this; -} - -template -ACE_INLINE ACE_Atomic_Op & -ACE_Atomic_Op::operator= ( - ACE_Atomic_Op const & rhs) -{ - this->impl_ = rhs.impl_; - return *this; -} - -template -ACE_INLINE TYPE -ACE_Atomic_Op::operator++ (void) -{ - return ++this->impl_; -} - -template -ACE_INLINE TYPE -ACE_Atomic_Op::operator++ (int) -{ - return this->impl_++; -} - -template -ACE_INLINE TYPE -ACE_Atomic_Op::operator+= ( - typename ACE_Atomic_Op::arg_type rhs) -{ - return this->impl_ += rhs; -} - -template -ACE_INLINE TYPE -ACE_Atomic_Op::operator-- (void) -{ - return --this->impl_; -} - -template -ACE_INLINE TYPE -ACE_Atomic_Op::operator-- (int) -{ - return this->impl_--; -} - -template -ACE_INLINE TYPE -ACE_Atomic_Op::operator-= ( - typename ACE_Atomic_Op::arg_type rhs) -{ - return this->impl_ -= rhs; -} - -template -ACE_INLINE bool -ACE_Atomic_Op::operator== ( - typename ACE_Atomic_Op::arg_type rhs) const -{ - return this->impl_ == rhs; -} - -template -ACE_INLINE bool -ACE_Atomic_Op::operator!= ( - typename ACE_Atomic_Op::arg_type rhs) const -{ - return this->impl_ != rhs; -} - -template -ACE_INLINE bool -ACE_Atomic_Op::operator>= ( - typename ACE_Atomic_Op::arg_type rhs) const -{ - return this->impl_ >= rhs; -} - -template -ACE_INLINE bool -ACE_Atomic_Op::operator> ( - typename ACE_Atomic_Op::arg_type rhs) const -{ - return this->impl_ > rhs; -} - -template -ACE_INLINE bool -ACE_Atomic_Op::operator<= ( - typename ACE_Atomic_Op::arg_type rhs) const -{ - return this->impl_ <= rhs; -} - -template -ACE_INLINE bool -ACE_Atomic_Op::operator< ( - typename ACE_Atomic_Op::arg_type rhs) const -{ - return this->impl_ < rhs; -} - -template -ACE_INLINE TYPE -ACE_Atomic_Op::exchange (TYPE newval) -{ - return this->impl_.exchange (newval); -} - -template -ACE_INLINE TYPE -ACE_Atomic_Op::value (void) const -{ - return this->impl_.value (); -} - -template -ACE_INLINE void -ACE_Atomic_Op::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - this->impl_.dump (); -#endif /* ACE_HAS_DUMP */ - return; -} -template -ACE_INLINE TYPE & -ACE_Atomic_Op::value_i (void) -{ - return this->impl_.value_i (); -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Auto_Event.cpp b/modules/worldengine/deps/acelite/ace/Auto_Event.cpp deleted file mode 100644 index 516755c681..0000000000 --- a/modules/worldengine/deps/acelite/ace/Auto_Event.cpp +++ /dev/null @@ -1,11 +0,0 @@ -#include "ace/Auto_Event.h" - -#if !defined (__ACE_INLINE__) -//#include "ace/Auto_Event.inl" -#endif /* __ACE_INLINE__ */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - - - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Auto_Event.h b/modules/worldengine/deps/acelite/ace/Auto_Event.h deleted file mode 100644 index ec62441d27..0000000000 --- a/modules/worldengine/deps/acelite/ace/Auto_Event.h +++ /dev/null @@ -1,129 +0,0 @@ -// -*- C++ -*- - -//========================================================================== -/** - * @file Auto_Event.h - * - * Moved from Synch.h. - * - * @author Douglas C. Schmidt - */ -//========================================================================== - -#ifndef ACE_AUTO_EVENT_H -#define ACE_AUTO_EVENT_H -#include /**/ "ace/pre.h" - -#include /**/ "ace/ACE_export.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Event.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_Auto_Event - * - * @brief Auto Events. - * - * Specialization of Event mechanism which wakes up one waiting - * thread on @c signal. All platforms support process-scope locking - * support. However, only Win32 platforms support global naming and - * system-scope locking support. - */ -template -class ACE_Auto_Event_T : public ACE_Event_T -{ -public: - /// Constructor which will create auto event - ACE_Auto_Event_T (int initial_state = 0, - int type = USYNC_THREAD, - const char *name = 0, - void *arg = 0) : ACE_Event_T (0, - initial_state, - type, - ACE_TEXT_CHAR_TO_TCHAR (name), - arg) - { - } - -#if defined (ACE_HAS_WCHAR) - /// Constructor which will create auto event (wchar_t version) - ACE_Auto_Event_T (int initial_state, - int type, - const wchar_t *name, - void *arg = 0) : ACE_Event_T (0, - initial_state, - type, - ACE_TEXT_WCHAR_TO_TCHAR (name), - arg) - { - } -#endif /* ACE_HAS_WCHAR */ - - /// Default dtor. - virtual ~ACE_Auto_Event_T (void) - { - } - - /// Dump the state of an object. - void dump (void) const - { -#if defined (ACE_HAS_DUMP) - ACE_Event_T::dump (); -#endif /* ACE_HAS_DUMP */ - } - - /// Declare the dynamic allocation hooks - ACE_ALLOC_HOOK_DECLARE; -}; - -class ACE_Auto_Event : - public ACE_Auto_Event_T -{ -public: - /// Constructor which will create auto event - ACE_Auto_Event (int initial_state = 0, - int type = USYNC_THREAD, - const char *name = 0, - void *arg = 0) - : ACE_Auto_Event_T (initial_state, type, name, arg) - { - } - -#if defined (ACE_HAS_WCHAR) - /// Constructor which will create auto event (wchar_t version) - ACE_Auto_Event (int initial_state, - int type, - const wchar_t *name, - void *arg = 0) - : ACE_Auto_Event_T (initial_state, type, name, arg) - { - } -#endif /* ACE_HAS_WCHAR */ - - /// Default dtor. - virtual ~ACE_Auto_Event (void) - { - } -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/Auto_Event.inl" -#endif /* __ACE_INLINE__ */ - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "ace/Auto_Event.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Auto_Event.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ - -#include /**/ "ace/post.h" -#endif /* ACE_AUTO_EVENT_H */ diff --git a/modules/worldengine/deps/acelite/ace/Auto_Event.inl b/modules/worldengine/deps/acelite/ace/Auto_Event.inl deleted file mode 100644 index e1facac51a..0000000000 --- a/modules/worldengine/deps/acelite/ace/Auto_Event.inl +++ /dev/null @@ -1,4 +0,0 @@ -// -*- C++ -*- -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Auto_Functor.cpp b/modules/worldengine/deps/acelite/ace/Auto_Functor.cpp deleted file mode 100644 index 7310d78d34..0000000000 --- a/modules/worldengine/deps/acelite/ace/Auto_Functor.cpp +++ /dev/null @@ -1,37 +0,0 @@ -#ifndef ACE_AUTO_FUNCTOR_CPP -#define ACE_AUTO_FUNCTOR_CPP - -#include "ace/Auto_Functor.h" - -#if !defined(__ACE_INLINE__) -# include "ace/Auto_Functor.inl" -#endif /* __ACE_INLINE__ */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -template -ACE_Utils::Auto_Functor::~Auto_Functor() -{ - reset(0); -} - -template void -ACE_Utils::Auto_Functor::reset(X * p) -{ - if(p_ != 0) - { - f_(p_); - } - p_ = p; -} - -templatevoid -ACE_Utils::Auto_Functor::reset(X * p, Functor f) -{ - reset(p); - f_ = f; -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /*ACE_AUTO_FUNCTOR_CPP*/ diff --git a/modules/worldengine/deps/acelite/ace/Auto_Functor.h b/modules/worldengine/deps/acelite/ace/Auto_Functor.h deleted file mode 100644 index 7e75ae7b6a..0000000000 --- a/modules/worldengine/deps/acelite/ace/Auto_Functor.h +++ /dev/null @@ -1,118 +0,0 @@ -// -*- C++ -*- -//============================================================================= -/** - * @file Auto_Functor.h - * - * @author Carlos O'Ryan - */ -//============================================================================= -#ifndef ACE_AUTO_FUNCTOR_H -#define ACE_AUTO_FUNCTOR_H -#include /**/ "ace/pre.h" - -#include /**/ "ace/config-all.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Global_Macros.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -namespace ACE_Utils -{ -/** - * @class Auto_Functor_Ref - * - * @brief Helper class to implement assignment and copy-construction - * as expected - */ -template -struct Auto_Functor_Ref -{ - X * p_; - Functor f_; - - Auto_Functor_Ref(X * p, Functor f); -}; - -/** - * @class Auto_Functor - * - * @brief Helper template to implement auto_ptr<>-like classes, but - * executing a functor in the destructor, instead of always - * deleting things. - * - * The functor is called in the destructor, and it must implement: - * - * Functor() throw();
- * Functor(Functor const &) throw();
- * Functor & operator=(Functor const &) throw();
- * void operator()(X * p) throw();
- */ -template -class Auto_Functor -{ -public: - typedef X element_type; - typedef Functor functor_type; - - /// Constructor - explicit Auto_Functor (X * p = 0, - Functor functor = Functor()); // throw() - - Auto_Functor (Auto_Functor & rhs); // throw() - - Auto_Functor& operator= (Auto_Functor & rhs); // throw() - - template - Auto_Functor(Auto_Functor& rhs); // throw() - - template - Auto_Functor& operator= (Auto_Functor& rhs); // throw() - - ~Auto_Functor(); // throw() - - X & operator*() const; // throw() - - X * operator->() const; // throw() - - X * get(); // throw() - - X * release(); // throw() - - void reset (X * p = 0); // throw() - - void reset (X * p, Functor f); // throw() - - Functor const & functor() const; // throw() - - Auto_Functor(Auto_Functor_Ref rhs); // throw() - - Auto_Functor & operator=(Auto_Functor_Ref rhs); // throw() - - template operator Auto_Functor_Ref(); // throw() - - template operator Auto_Functor(); // throw() - -private: - X * p_; - - Functor f_; -}; - -} // namespace ACE_Utils - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined(__ACE_INLINE__) -# include "ace/Auto_Functor.inl" -#endif /* __ACE_INLINE__ */ - -#if defined(ACE_TEMPLATES_REQUIRE_SOURCE) -# include "ace/Auto_Functor.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#include /**/ "ace/post.h" -#endif /* ACE_AUTO_FUNCTOR_H*/ diff --git a/modules/worldengine/deps/acelite/ace/Auto_Functor.inl b/modules/worldengine/deps/acelite/ace/Auto_Functor.inl deleted file mode 100644 index be0c38361a..0000000000 --- a/modules/worldengine/deps/acelite/ace/Auto_Functor.inl +++ /dev/null @@ -1,117 +0,0 @@ -// -*- C++ -*- -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -template ACE_INLINE -ACE_Utils::Auto_Functor_Ref:: -Auto_Functor_Ref(X * p, Functor f) - : p_(p) - , f_(f) -{ -} - -template ACE_INLINE -ACE_Utils::Auto_Functor::Auto_Functor(X * p, Functor f) - : p_(p) - , f_(f) -{ -} - -template ACE_INLINE -ACE_Utils::Auto_Functor::Auto_Functor(Auto_Functor & rhs) - : p_(rhs.release()) - , f_(rhs.f_) -{ -} - -template -ACE_INLINE ACE_Utils::Auto_Functor& -ACE_Utils::Auto_Functor:: operator=(Auto_Functor & rhs) -{ - reset(rhs.release()); - f_ = rhs.f_; - return *this; -} - -template template ACE_INLINE -ACE_Utils::Auto_Functor::Auto_Functor(Auto_Functor& rhs) - : p_(rhs.release()) - , f_(rhs.f_) -{ -} - -template template -ACE_INLINE ACE_Utils::Auto_Functor& -ACE_Utils::Auto_Functor::operator=(Auto_Functor& rhs) -{ - reset(rhs.release()); - return *this; -} - -template ACE_INLINE X & -ACE_Utils::Auto_Functor::operator*() const -{ - return *p_; -} - -template -ACE_INLINE X * -ACE_Utils::Auto_Functor::operator->() const -{ - return p_; -} - -template -ACE_INLINE X * -ACE_Utils::Auto_Functor::get() -{ - return p_; -} - -template -ACE_INLINE X * -ACE_Utils::Auto_Functor::release() -{ - X * tmp = p_; - p_ = 0; - return tmp; -} - -template -ACE_INLINE Functor const & -ACE_Utils::Auto_Functor::functor() const -{ - return f_; -} - -template ACE_INLINE -ACE_Utils::Auto_Functor::Auto_Functor(Auto_Functor_Ref rhs) - : p_(rhs.p_) - , f_(rhs.f_) -{ -} - -template -ACE_INLINE ACE_Utils::Auto_Functor & -ACE_Utils::Auto_Functor::operator=(Auto_Functor_Ref rhs) -{ - if(rhs.p_ != p_) - { - reset(rhs.p_); - f_ = rhs.f_; - } - return *this; -} - -template template ACE_INLINE -ACE_Utils::Auto_Functor::operator ACE_Utils::Auto_Functor_Ref() -{ - return ACE_Utils::Auto_Functor_Ref(release(), f_); -} - -template template ACE_INLINE -ACE_Utils::Auto_Functor::operator ACE_Utils::Auto_Functor() -{ - return ACE_Utils::Auto_Functor(release(), f_); -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Auto_IncDec_T.cpp b/modules/worldengine/deps/acelite/ace/Auto_IncDec_T.cpp deleted file mode 100644 index 56514ef449..0000000000 --- a/modules/worldengine/deps/acelite/ace/Auto_IncDec_T.cpp +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef ACE_AUTO_INCDEC_T_CPP -#define ACE_AUTO_INCDEC_T_CPP - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Auto_IncDec_T.h" -#include "ace/Log_Category.h" - -#if !defined (__ACE_INLINE__) -#include "ace/Auto_IncDec_T.inl" -#endif /* __ACE_INLINE__ */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_ALLOC_HOOK_DEFINE(ACE_Auto_IncDec) - -template void -ACE_Auto_IncDec::dump (void) const -{ -#if defined (ACE_HAS_DUMP) -// ACE_TRACE ("ACE_Auto_IncDec::dump"); - - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_AUTO_INCDEC_T_CPP */ diff --git a/modules/worldengine/deps/acelite/ace/Auto_IncDec_T.h b/modules/worldengine/deps/acelite/ace/Auto_IncDec_T.h deleted file mode 100644 index 3e1eefa64c..0000000000 --- a/modules/worldengine/deps/acelite/ace/Auto_IncDec_T.h +++ /dev/null @@ -1,76 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Auto_IncDec_T.h - * - * @author Edan Ayal - */ -//============================================================================= - - -#ifndef ACE_AUTO_INCDEC_T_H -#define ACE_AUTO_INCDEC_T_H - -#include /**/ "ace/pre.h" - -#include /**/ "ace/config-all.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Global_Macros.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_Auto_IncDec - * - * @brief This class automatically increments and decrements a - * parameterized counter. - * - * This data structure is meant to be used within a method, - * function, or scope. The actual parameter given for the - * @c ACE_SAFELY_INCREMENTABLE_DECREMENTABLE template parameter - * must provide at least operators ++ and --. - */ -template -class ACE_Auto_IncDec -{ -public: - /// Implicitly increment the counter. - ACE_Auto_IncDec (ACE_SAFELY_INCREMENTABLE_DECREMENTABLE &counter); - - /// Implicitly decrement the counter. - ~ACE_Auto_IncDec (void); - - /// Dump the state of an object. - void dump (void) const; - -protected: - /// Reference to the @c ACE_SAFELY_INCREMENTABLE_DECREMENTABLE counter - /// we're incrementing/decrementing. - ACE_SAFELY_INCREMENTABLE_DECREMENTABLE &counter_; -private: - ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Auto_IncDec &)) - ACE_UNIMPLEMENTED_FUNC (ACE_Auto_IncDec (const ACE_Auto_IncDec &)) -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/Auto_IncDec_T.inl" -#endif /* __ACE_INLINE__ */ - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "ace/Auto_IncDec_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Auto_IncDec_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ - -#include /**/ "ace/post.h" - -#endif /* ACE_AUTO_INCDEC_T_H */ diff --git a/modules/worldengine/deps/acelite/ace/Auto_IncDec_T.inl b/modules/worldengine/deps/acelite/ace/Auto_IncDec_T.inl deleted file mode 100644 index cb21448886..0000000000 --- a/modules/worldengine/deps/acelite/ace/Auto_IncDec_T.inl +++ /dev/null @@ -1,22 +0,0 @@ -// -*- C++ -*- -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -// Implicitly and automatically increment the counter. - -template ACE_INLINE -ACE_Auto_IncDec::ACE_Auto_IncDec - (ACE_SAFELY_INCREMENTABLE_DECREMENTABLE &counter) - : counter_ (counter) -{ - ++this->counter_; -} - -// Implicitly and automatically decrement the counter. - -template ACE_INLINE -ACE_Auto_IncDec::~ACE_Auto_IncDec (void) -{ - --this->counter_; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Auto_Ptr.cpp b/modules/worldengine/deps/acelite/ace/Auto_Ptr.cpp deleted file mode 100644 index 9a23ab0383..0000000000 --- a/modules/worldengine/deps/acelite/ace/Auto_Ptr.cpp +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef ACE_AUTO_PTR_CPP -#define ACE_AUTO_PTR_CPP - -#include "ace/Auto_Ptr.h" - -#if !defined (__ACE_INLINE__) -#include "ace/Auto_Ptr.inl" -#endif /* __ACE_INLINE__ */ - - - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_ALLOC_HOOK_DEFINE(ACE_Auto_Basic_Ptr) -ACE_ALLOC_HOOK_DEFINE(ACE_Auto_Basic_Array_Ptr) - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_AUTO_PTR_CPP */ diff --git a/modules/worldengine/deps/acelite/ace/Auto_Ptr.h b/modules/worldengine/deps/acelite/ace/Auto_Ptr.h deleted file mode 100644 index e06eb21b4a..0000000000 --- a/modules/worldengine/deps/acelite/ace/Auto_Ptr.h +++ /dev/null @@ -1,226 +0,0 @@ -/* -*- C++ -*- */ - -//============================================================================= -/** - * @file Auto_Ptr.h - * - * @author Doug Schmidt - * @author Irfan Pyarali - * @author Jack Reeves - * @author Dr. Harald M. Mueller - */ -//============================================================================= - -#ifndef ACE_AUTO_PTR_H -#define ACE_AUTO_PTR_H -#include /**/ "ace/pre.h" - -#include /**/ "ace/config-all.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#if defined (_MSC_VER) -// Suppress warning e.g. "return type for -// 'ACE_Auto_Array_Pointer::operator ->' is 'type *' (i.e., not a UDT -// or reference to a UDT. Will produce errors if applied using infix -// notation)" -# pragma warning(push) -# pragma warning(disable: 4284) -#endif /* _MSC_VER */ - - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_Auto_Basic_Ptr - * - * @brief Implements the draft C++ standard auto_ptr abstraction. - * This class allows one to work on non-object (basic) types - */ -template -class ACE_Auto_Basic_Ptr -{ -public: - typedef X element_type; - - // = Initialization and termination methods - explicit ACE_Auto_Basic_Ptr (X * p = 0) : p_ (p) {} - - ACE_Auto_Basic_Ptr (ACE_Auto_Basic_Ptr & ap); - ACE_Auto_Basic_Ptr &operator= (ACE_Auto_Basic_Ptr & rhs); - ~ACE_Auto_Basic_Ptr (void); - - // = Accessor methods. - X &operator *() const; - X *get (void) const; - X *release (void); - void reset (X * p = 0); - - /// Dump the state of an object. - void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - -protected: - X *p_; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if !defined (ACE_LACKS_AUTO_PTR) && \ - defined (ACE_HAS_STANDARD_CPP_LIBRARY) && \ - (ACE_HAS_STANDARD_CPP_LIBRARY != 0) -#include -#if defined (ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB) && \ - (ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB != 0) -using std::auto_ptr; -#endif /* ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB */ -#else /* ACE_HAS_STANDARD_CPP_LIBRARY */ - -/** - * @class auto_ptr - * - * @brief Implements the draft C++ standard auto_ptr abstraction. - */ -template -class auto_ptr : public ACE_Auto_Basic_Ptr -{ -public: - typedef X element_type; - - // = Initialization and termination methods - explicit auto_ptr (X * p = 0) : ACE_Auto_Basic_Ptr (p) {} - auto_ptr (auto_ptr & ap) : ACE_Auto_Basic_Ptr (ap.release ()) {} - - X *operator-> () const; -}; - -#endif /* ACE_HAS_STANDARD_CPP_LIBRARY */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @brief Implements the draft C++ standard auto_ptr abstraction. - * This version can be used instead of auto_ptr - */ -template -class ACE_Auto_Ptr : public ACE_Auto_Basic_Ptr -{ -public: - typedef X element_type; - - // = Initialization and termination methods - explicit ACE_Auto_Ptr (X * p = 0) : ACE_Auto_Basic_Ptr (p) {} - - X *operator-> () const; -}; - -/** - * @class ACE_Auto_Basic_Array_Ptr - * - * @brief Implements an extension to the draft C++ standard auto_ptr - * abstraction. This class allows one to work on non-object - * (basic) types that must be treated as an array, e.g., - * deallocated via "delete [] foo". - */ -template -class ACE_Auto_Basic_Array_Ptr -{ -public: - typedef X element_type; - - // = Initialization and termination methods. - explicit ACE_Auto_Basic_Array_Ptr (X * p = 0) : p_ (p) {} - - ACE_Auto_Basic_Array_Ptr (ACE_Auto_Basic_Array_Ptr & ap); - ACE_Auto_Basic_Array_Ptr &operator= (ACE_Auto_Basic_Array_Ptr & rhs); - ~ACE_Auto_Basic_Array_Ptr (void); - - // = Accessor methods. - X & operator* () const; - X & operator[] (int i) const; - X * get (void) const; - X * release (void); - void reset (X * p = 0); - - /// Dump the state of an object. - void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - -protected: - X * p_; -}; - -/** - * @class ACE_Auto_Array_Ptr - * - * @brief Implements an extension to the draft C++ standard auto_ptr - * abstraction. - */ -template -class ACE_Auto_Array_Ptr : public ACE_Auto_Basic_Array_Ptr -{ -public: - typedef X element_type; - - // = Initialization and termination methods. - explicit ACE_Auto_Array_Ptr (X *p = 0) - : ACE_Auto_Basic_Array_Ptr (p) {} - - X *operator-> () const; -}; - - -/** - * @brief Reset given @c auto_ptr element to new element. - * - * Some platforms have an older version of auto_ptr support, which - * lacks reset, and cannot be disabled easily. Portability to these - * platforms requires use of this function template. This function - * template also works for the @c ACE_Auto_{Basic_}Array_Ptr class - * template, as well. - */ -template -inline void -ACE_auto_ptr_reset (AUTO_PTR_TYPE & ap, - PTR_TYPE * p) -{ -#if defined (ACE_AUTO_PTR_LACKS_RESET) - // Allow compiler to adjust pointer to potential base class pointer - // of element type found in auto_ptr. - typename AUTO_PTR_TYPE::element_type * const tp = p; - if (tp != ap.get ()) - { - ap = AUTO_PTR_TYPE (tp); - } -#else - ap.reset (p); -#endif /* ACE_AUTO_PTR_LACKS_RESET */ -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/Auto_Ptr.inl" -#endif /* __ACE_INLINE__ */ - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "ace/Auto_Ptr.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Auto_Ptr.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ - -#if defined (_MSC_VER) -// Restore the warning state to what it was before entry. -# pragma warning(pop) -#endif /* _MSC_VER */ - -#include /**/ "ace/post.h" -#endif /* ACE_AUTO_PTR_H */ diff --git a/modules/worldengine/deps/acelite/ace/Auto_Ptr.inl b/modules/worldengine/deps/acelite/ace/Auto_Ptr.inl deleted file mode 100644 index a172ea9dc0..0000000000 --- a/modules/worldengine/deps/acelite/ace/Auto_Ptr.inl +++ /dev/null @@ -1,168 +0,0 @@ -// -*- C++ -*- -#include "ace/Global_Macros.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -template ACE_INLINE void -ACE_Auto_Basic_Ptr::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_Auto_Basic_Ptr::dump"); -#endif /* ACE_HAS_DUMP */ -} - -template ACE_INLINE void -ACE_Auto_Basic_Array_Ptr::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_Auto_Basic_Array_Ptr::dump"); -#endif /* ACE_HAS_DUMP */ -} - -template ACE_INLINE -ACE_Auto_Basic_Ptr::ACE_Auto_Basic_Ptr (ACE_Auto_Basic_Ptr &rhs) - : p_ (rhs.release ()) -{ - ACE_TRACE ("ACE_Auto_Basic_Ptr::ACE_Auto_Basic_Ptr"); -} - -template ACE_INLINE X * -ACE_Auto_Basic_Ptr::get (void) const -{ - ACE_TRACE ("ACE_Auto_Basic_Ptr::get"); - return this->p_; -} - -template ACE_INLINE X * -ACE_Auto_Basic_Ptr::release (void) -{ - ACE_TRACE ("ACE_Auto_Basic_Ptr::release"); - X *old = this->p_; - this->p_ = 0; - return old; -} - -template ACE_INLINE void -ACE_Auto_Basic_Ptr::reset (X *p) -{ - ACE_TRACE ("ACE_Auto_Basic_Ptr::reset"); - if (this->get () != p) - delete this->get (); - this->p_ = p; -} - -template ACE_INLINE ACE_Auto_Basic_Ptr & -ACE_Auto_Basic_Ptr::operator= (ACE_Auto_Basic_Ptr &rhs) -{ - ACE_TRACE ("ACE_Auto_Basic_Ptr::operator="); - if (this != &rhs) - { - this->reset (rhs.release ()); - } - return *this; -} - -template ACE_INLINE -ACE_Auto_Basic_Ptr::~ACE_Auto_Basic_Ptr (void) -{ - ACE_TRACE ("ACE_Auto_Basic_Ptr::~ACE_Auto_Basic_Ptr"); - delete this->get (); -} - -template ACE_INLINE X & -ACE_Auto_Basic_Ptr::operator *() const -{ - ACE_TRACE ("ACE_Auto_Basic_Ptr::operator *()"); - return *this->get (); -} - -#if defined (ACE_LACKS_AUTO_PTR) || \ - !defined (ACE_HAS_STANDARD_CPP_LIBRARY) || \ - (ACE_HAS_STANDARD_CPP_LIBRARY == 0) - -template ACE_INLINE X * -auto_ptr::operator-> () const -{ - ACE_TRACE ("auto_ptr::operator->"); - return this->get (); -} - -#endif /* ACE_HAS_STANDARD_CPP_LIBRARY */ - -template ACE_INLINE X * -ACE_Auto_Ptr::operator-> () const -{ - ACE_TRACE ("ACE_Auto_Ptr::operator->"); - return this->get (); -} - -template ACE_INLINE X * -ACE_Auto_Basic_Array_Ptr::get (void) const -{ - ACE_TRACE ("ACE_Auto_Basic_Array_Ptr::get"); - return this->p_; -} - -template ACE_INLINE X * -ACE_Auto_Basic_Array_Ptr::release (void) -{ - ACE_TRACE ("ACE_Auto_Basic_Array_Ptr::release"); - X *old = this->p_; - this->p_ = 0; - return old; -} - -template ACE_INLINE void -ACE_Auto_Basic_Array_Ptr::reset (X *p) -{ - ACE_TRACE ("ACE_Auto_Basic_Array_Ptr::reset"); - if (this->get () != p) - delete [] this->get (); - this->p_ = p; -} - -template ACE_INLINE -ACE_Auto_Basic_Array_Ptr::ACE_Auto_Basic_Array_Ptr (ACE_Auto_Basic_Array_Ptr &rhs) - : p_ (rhs.release ()) -{ - ACE_TRACE ("ACE_Auto_Basic_Array_Ptr::ACE_Auto_Basic_Array_Ptr"); -} - -template ACE_INLINE ACE_Auto_Basic_Array_Ptr & -ACE_Auto_Basic_Array_Ptr::operator= (ACE_Auto_Basic_Array_Ptr &rhs) -{ - ACE_TRACE ("ACE_Auto_Basic_Array_Ptr::operator="); - if (this != &rhs) - { - this->reset (rhs.release ()); - } - return *this; -} - -template ACE_INLINE -ACE_Auto_Basic_Array_Ptr::~ACE_Auto_Basic_Array_Ptr (void) -{ - ACE_TRACE ("ACE_Auto_Basic_Array_Ptr::~ACE_Auto_Basic_Array_Ptr"); - delete [] this->get (); -} - -template ACE_INLINE X & -ACE_Auto_Basic_Array_Ptr::operator *() const -{ - return *this->get (); -} - -template ACE_INLINE X & -ACE_Auto_Basic_Array_Ptr::operator[](int i) const -{ - X *array = this->get (); - return array[i]; -} - -template ACE_INLINE X * -ACE_Auto_Array_Ptr::operator->() const -{ - return this->get (); -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Barrier.cpp b/modules/worldengine/deps/acelite/ace/Barrier.cpp deleted file mode 100644 index e6f33efee9..0000000000 --- a/modules/worldengine/deps/acelite/ace/Barrier.cpp +++ /dev/null @@ -1,170 +0,0 @@ -#include "ace/Barrier.h" - -#if defined (ACE_HAS_THREADS) - -#if !defined (__ACE_INLINE__) -#include "ace/Barrier.inl" -#endif /* __ACE_INLINE__ */ - -#include "ace/Guard_T.h" -#include "ace/OS_NS_errno.h" - -#if defined (ACE_HAS_DUMP) -# include "ace/Log_Category.h" -#endif /* ACE_HAS_DUMP */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_ALLOC_HOOK_DEFINE(ACE_Sub_Barrier) - -void -ACE_Sub_Barrier::dump (void) const -{ -#if defined (ACE_HAS_DUMP) -// ACE_TRACE ("ACE_Sub_Barrier::dump"); - - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - this->barrier_finished_.dump (); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("running_threads_ = %d\n"), this->running_threads_)); - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} - -ACE_Sub_Barrier::ACE_Sub_Barrier (unsigned int count, - ACE_Thread_Mutex &lock, - const ACE_TCHAR *name, - void *arg) - : barrier_finished_ (lock, name, arg), - running_threads_ (count) -{ -// ACE_TRACE ("ACE_Sub_Barrier::ACE_Sub_Barrier"); -} - -ACE_ALLOC_HOOK_DEFINE(ACE_Barrier) - -void -ACE_Barrier::dump (void) const -{ -#if defined (ACE_HAS_DUMP) -// ACE_TRACE ("ACE_Barrier::dump"); - - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - this->lock_.dump (); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("current_generation_ = %d"), this->current_generation_)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("\ncount_ = %d"), this->count_)); - this->sub_barrier_1_.dump (); - this->sub_barrier_2_.dump (); - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} - -ACE_Barrier::ACE_Barrier (unsigned int count, - const ACE_TCHAR *name, - void *arg) - : lock_ (name, (ACE_mutexattr_t *) arg), - current_generation_ (0), - count_ (count), - sub_barrier_1_ (count, lock_, name, arg), - sub_barrier_2_ (count, lock_, name, arg) -{ - ACE_TRACE ("ACE_Barrier::ACE_Barrier"); - this->sub_barrier_[0] = &this->sub_barrier_1_; - this->sub_barrier_[1] = &this->sub_barrier_2_; -} - -int -ACE_Barrier::wait (void) -{ - ACE_TRACE ("ACE_Barrier::wait"); - ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1); - - ACE_Sub_Barrier *sbp = - this->sub_barrier_[this->current_generation_]; - - // Check for shutdown... - if (sbp == 0) - { - errno = ESHUTDOWN; - return -1; - } - - int retval = 0; - - if (sbp->running_threads_ == 1) - { - // We're the last running thread, so swap generations and tell - // all the threads waiting on the barrier to continue on their - // way. - sbp->running_threads_ = this->count_; - // Swap generations. - this->current_generation_ = 1 - this->current_generation_; - sbp->barrier_finished_.broadcast (); - } - else - { - --sbp->running_threads_; - - // Block until all the other threads wait(). - while (sbp->running_threads_ != this->count_) - sbp->barrier_finished_.wait (); - - // We're awake and the count has completed. See if it completed - // because all threads hit the barrier, or because the barrier - // was shut down. - if (this->sub_barrier_[this->current_generation_] == 0) - { - errno = ESHUTDOWN; - retval = -1; - } - } - - return retval; -} - -int -ACE_Barrier::shutdown (void) -{ - ACE_TRACE ("ACE_Barrier::shutdown"); - ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, -1); - - ACE_Sub_Barrier *sbp = - this->sub_barrier_[this->current_generation_]; - - // Check for shutdown... - if (sbp == 0) - { - errno = ESHUTDOWN; - return -1; - } - - // Flag the shutdown - this->sub_barrier_[0] = 0; - this->sub_barrier_[1] = 0; - // Tell all the threads waiting on the barrier to continue on their way. - sbp->running_threads_ = this->count_; - sbp->barrier_finished_.broadcast (); - - return 0; -} - -ACE_ALLOC_HOOK_DEFINE(ACE_Thread_Barrier) - -ACE_Thread_Barrier::ACE_Thread_Barrier (unsigned int count, - const ACE_TCHAR *name) - : ACE_Barrier (count, name) -{ -// ACE_TRACE ("ACE_Thread_Barrier::ACE_Thread_Barrier"); -} - -void -ACE_Thread_Barrier::dump (void) const -{ -#if defined (ACE_HAS_DUMP) -// ACE_TRACE ("ACE_Thread_Barrier::dump"); - ACE_Barrier::dump (); -#endif /* ACE_HAS_DUMP */ -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_HAS_THREADS */ diff --git a/modules/worldengine/deps/acelite/ace/Barrier.h b/modules/worldengine/deps/acelite/ace/Barrier.h deleted file mode 100644 index b9a06ea682..0000000000 --- a/modules/worldengine/deps/acelite/ace/Barrier.h +++ /dev/null @@ -1,190 +0,0 @@ -// -*- C++ -*- - -//========================================================================== -/** - * @file Barrier.h - * - * Moved from Synch.h. - * - * @author Douglas C. Schmidt - */ -//========================================================================== - -#ifndef ACE_BARRIER_H -#define ACE_BARRIER_H -#include /**/ "ace/pre.h" - -#include /**/ "ace/ACE_export.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include /**/ "ace/config-all.h" - -// ACE platform supports some form of threading. -#if !defined (ACE_HAS_THREADS) - -#include "ace/OS_NS_errno.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_Barrier - * - * @brief This is a no-op to make ACE "syntactically consistent." - */ -class ACE_Export ACE_Barrier -{ -public: - ACE_Barrier (unsigned int, const ACE_TCHAR * = 0, void * = 0) {} - ~ACE_Barrier (void) {} - int wait (void) { ACE_NOTSUP_RETURN (-1); } - void dump (void) const {} -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#else /* ACE_HAS_THREADS */ - -#include "ace/Condition_Thread_Mutex.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -struct ACE_Export ACE_Sub_Barrier -{ - // = Initialization. - ACE_Sub_Barrier (unsigned int count, - ACE_Thread_Mutex &lock, - const ACE_TCHAR *name = 0, - void *arg = 0); - - ~ACE_Sub_Barrier (void); - - /// True if this generation of the barrier is done. - ACE_Condition_Thread_Mutex barrier_finished_; - - /// Number of threads that are still running. - int running_threads_; - - /// Dump the state of an object. - void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; -}; - -/** - * @class ACE_Barrier - * - * @brief Implements "barrier synchronization". - * - * This class allows number of threads to synchronize - * their completion of (one round of) a task, which is known as - * "barrier synchronization". After all the threads call - * on the barrier they are all atomically released and can begin a new - * round. - * - * This implementation uses a "sub-barrier generation numbering" - * scheme to avoid overhead and to ensure that all threads wait to - * leave the barrier correct. This code is based on an article from - * SunOpsis Vol. 4, No. 1 by Richard Marejka - * (Richard.Marejka@canada.sun.com). - */ -class ACE_Export ACE_Barrier -{ -public: - /// Initialize the barrier to synchronize @a count threads. - ACE_Barrier (unsigned int count, - const ACE_TCHAR *name = 0, - void *arg = 0); - - /// Default destructor. - ~ACE_Barrier (void); - - /// Block the caller until all @c count threads have called @c wait and - /// then allow all the caller threads to continue in parallel. - /// - /// @retval 0 after successfully waiting for all threads to wait. - /// @retval -1 if an error occurs or the barrier is shut - /// down (@sa shutdown ()). - int wait (void); - - /// Shut the barrier down, aborting the wait of all waiting threads. - /// Any threads waiting on the barrier when it is shut down will return with - /// value -1, errno ESHUTDOWN. - /// - /// @retval 0 for success, -1 if already shut down. - /// - /// @since ACE beta 5.4.9. - int shutdown (void); - - /// Dump the state of an object. - void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - -protected: - /// Serialize access to the barrier state. - ACE_Thread_Mutex lock_; - - /// Either 0 or 1, depending on whether we are the first generation - /// of waiters or the next generation of waiters. - int current_generation_; - - /// Total number of threads that can be waiting at any one time. - int count_; - - /** - * We keep two @c sub_barriers, one for the first "generation" of - * waiters, and one for the next "generation" of waiters. This - * efficiently solves the problem of what to do if all the first - * generation waiters don't leave the barrier before one of the - * threads calls wait() again (i.e., starts up the next generation - * barrier). - */ - ACE_Sub_Barrier sub_barrier_1_; - ACE_Sub_Barrier sub_barrier_2_; - ACE_Sub_Barrier *sub_barrier_[2]; - -private: - // = Prevent assignment and initialization. - void operator= (const ACE_Barrier &); - ACE_Barrier (const ACE_Barrier &); -}; - -/** - * @class ACE_Thread_Barrier - * - * @brief Implements "barrier synchronization" using ACE_Thread_Mutexes! - * - * This class is just a simple wrapper for ACE_Barrier that - * selects the USYNC_THREAD variant for the locks. - */ -class ACE_Export ACE_Thread_Barrier : public ACE_Barrier -{ -public: - /// Create a Thread_Barrier, passing in the optional @a name. - ACE_Thread_Barrier (unsigned int count, const ACE_TCHAR *name = 0); - - /// Default destructor. - ~ACE_Thread_Barrier (void); - - /// Dump the state of an object. - void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/Barrier.inl" -#endif /* __ACE_INLINE__ */ - -#endif /* !ACE_HAS_THREADS */ - -#include /**/ "ace/post.h" -#endif /* ACE_BARRIER_H */ diff --git a/modules/worldengine/deps/acelite/ace/Barrier.inl b/modules/worldengine/deps/acelite/ace/Barrier.inl deleted file mode 100644 index f742deeb6e..0000000000 --- a/modules/worldengine/deps/acelite/ace/Barrier.inl +++ /dev/null @@ -1,19 +0,0 @@ -// -*- C++ -*- -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_INLINE -ACE_Sub_Barrier::~ACE_Sub_Barrier (void) -{ -} - -ACE_INLINE -ACE_Barrier::~ACE_Barrier (void) -{ -} - -ACE_INLINE -ACE_Thread_Barrier::~ACE_Thread_Barrier (void) -{ -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Base_Thread_Adapter.cpp b/modules/worldengine/deps/acelite/ace/Base_Thread_Adapter.cpp deleted file mode 100644 index f965bac12a..0000000000 --- a/modules/worldengine/deps/acelite/ace/Base_Thread_Adapter.cpp +++ /dev/null @@ -1,128 +0,0 @@ -#include "ace/Base_Thread_Adapter.h" - -#if !defined (ACE_HAS_INLINED_OSCALLS) -# include "ace/Base_Thread_Adapter.inl" -#endif /* ACE_HAS_INLINED_OSCALLS */ - -#if defined (ACE_HAS_TSS_EMULATION) -# include "ace/OS_NS_Thread.h" -#endif /* ACE_HAS_TSS_EMULATION */ - -#include "ace/Service_Config.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_INIT_LOG_MSG_HOOK ACE_Base_Thread_Adapter::init_log_msg_hook_ = 0; -ACE_INHERIT_LOG_MSG_HOOK ACE_Base_Thread_Adapter::inherit_log_msg_hook_ = 0; -ACE_CLOSE_LOG_MSG_HOOK ACE_Base_Thread_Adapter::close_log_msg_hook_ = 0; -ACE_SYNC_LOG_MSG_HOOK ACE_Base_Thread_Adapter::sync_log_msg_hook_ = 0; -ACE_THR_DESC_LOG_MSG_HOOK ACE_Base_Thread_Adapter::thr_desc_log_msg_hook_ = 0; - -ACE_Base_Thread_Adapter::ACE_Base_Thread_Adapter ( - ACE_THR_FUNC user_func, - void *arg, - ACE_THR_C_FUNC entry_point, - ACE_OS_Thread_Descriptor *td -#if defined (ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS) - , ACE_SEH_EXCEPT_HANDLER selector - , ACE_SEH_EXCEPT_HANDLER handler -#endif /* ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS */ - , long cancel_flags - ) - : user_func_ (user_func) - , arg_ (arg) - , entry_point_ (entry_point) - , thr_desc_ (td) - , ctx_ (ACE_Service_Config::current()) - , flags_ (cancel_flags) -{ - ACE_OS_TRACE ("ACE_Base_Thread_Adapter::ACE_Base_Thread_Adapter"); - - if (ACE_Base_Thread_Adapter::init_log_msg_hook_ != 0) - (*ACE_Base_Thread_Adapter::init_log_msg_hook_) ( - this->log_msg_attributes_ -# if defined (ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS) - , selector - , handler -# endif /* ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS */ - ); -#ifdef ACE_USES_GPROF - getitimer (ITIMER_PROF, &itimer_); -#endif // ACE_USES_GPROF -} - -ACE_Base_Thread_Adapter::~ACE_Base_Thread_Adapter (void) -{ -} - -void -ACE_Base_Thread_Adapter::inherit_log_msg (void) -{ - if (ACE_Base_Thread_Adapter::inherit_log_msg_hook_ != 0) - (*ACE_Base_Thread_Adapter::inherit_log_msg_hook_)( - this->thr_desc_, - this->log_msg_attributes_); - - // Initialize the proper configuration context for the new thread - // Placed here since inherit_log_msg() gets called from any of our - // descendants (before self-destructing) - ACE_Service_Config::current (this->ctx_); -} - -void -ACE_Base_Thread_Adapter::close_log_msg (void) -{ - if (ACE_Base_Thread_Adapter::close_log_msg_hook_ != 0) - (*ACE_Base_Thread_Adapter::close_log_msg_hook_) (); -} - -void -ACE_Base_Thread_Adapter::sync_log_msg (const ACE_TCHAR *prg) -{ - if (ACE_Base_Thread_Adapter::sync_log_msg_hook_ != 0) - (*ACE_Base_Thread_Adapter::sync_log_msg_hook_) (prg); -} - -ACE_OS_Thread_Descriptor::~ACE_OS_Thread_Descriptor (void) -{ -} - -ACE_OS_Thread_Descriptor * -ACE_Base_Thread_Adapter::thr_desc_log_msg (void) -{ - if (ACE_Base_Thread_Adapter::thr_desc_log_msg_hook_ != 0) - return (*ACE_Base_Thread_Adapter::thr_desc_log_msg_hook_) (); - return 0; -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -// Run the thread entry point for the . This must -// be an extern "C" to make certain compilers happy... - -extern "C" ACE_THR_FUNC_RETURN -ACE_THREAD_ADAPTER_NAME (void *args) -{ - ACE_OS_TRACE ("ACE_THREAD_ADAPTER_NAME"); - -#if defined (ACE_HAS_TSS_EMULATION) - // As early as we can in the execution of the new thread, allocate - // its local TS storage. Allocate it on the stack, to save dynamic - // allocation/dealloction. - void *ts_storage[ACE_TSS_Emulation::ACE_TSS_THREAD_KEYS_MAX]; - ACE_TSS_Emulation::tss_open (ts_storage); -#endif /* ACE_HAS_TSS_EMULATION */ - - ACE_Base_Thread_Adapter * const thread_args = - static_cast (args); - -#ifdef ACE_USES_GPROF - setitimer (ITIMER_PROF, thread_args->timerval (), 0); -#endif // ACE_USES_GPROF - - // Invoke the user-supplied function with the args. - ACE_THR_FUNC_RETURN status = thread_args->invoke (); - - return status; -} - diff --git a/modules/worldengine/deps/acelite/ace/Base_Thread_Adapter.h b/modules/worldengine/deps/acelite/ace/Base_Thread_Adapter.h deleted file mode 100644 index d45ce65748..0000000000 --- a/modules/worldengine/deps/acelite/ace/Base_Thread_Adapter.h +++ /dev/null @@ -1,197 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Base_Thread_Adapter.h - * - * @author Nanbor Wang - */ -//============================================================================= - -#ifndef ACE_BASE_THREAD_ADAPTER_H -#define ACE_BASE_THREAD_ADAPTER_H -#include /**/ "ace/pre.h" - -#include "ace/OS_Log_Msg_Attributes.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include /**/ "ace/ACE_export.h" -#include "ace/OS_Log_Msg_Attributes.h" - -#ifdef ACE_USES_GPROF -#include "os_include/sys/os_time.h" -#endif // ACE_USES_GPROF - -#if (defined (ACE_HAS_VERSIONED_NAMESPACE) && ACE_HAS_VERSIONED_NAMESPACE == 1) -# define ACE_THREAD_ADAPTER_NAME ACE_PREPROC_CONCATENATE(ACE_VERSIONED_NAMESPACE_NAME, _ace_thread_adapter) -#else -# define ACE_THREAD_ADAPTER_NAME ace_thread_adapter -#endif /* ACE_HAS_VERSIONED_NAMESPACE == 1 */ - -/// Run the thread entry point for the ACE_Thread_Adapter. This must -/// be an extern "C" to make certain compilers happy... -extern "C" ACE_Export ACE_THR_FUNC_RETURN ACE_THREAD_ADAPTER_NAME (void *args); - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_OS_Thread_Descriptor - * - * @brief Parent class of all ACE_Thread_Descriptor classes. - * - * Container for ACE_Thread_Descriptor members that are - * used in ACE_OS. - */ -class ACE_Export ACE_OS_Thread_Descriptor -{ -public: - /// Get the thread creation flags. - long flags (void) const; - - virtual ~ACE_OS_Thread_Descriptor (void); - -protected: - /// For use by ACE_Thread_Descriptor. - ACE_OS_Thread_Descriptor (long flags = 0); - - /** - * Keeps track of whether this thread was created "detached" or not. - * If a thread is *not* created detached then if someone calls - * ACE_Thread_Manager::wait(), we need to join with that thread (and - * close down the handle). - */ - long flags_; -}; - -class ACE_Service_Gestalt; - -/** - * @class ACE_Base_Thread_Adapter - * - * @brief Base class for all the Thread_Adapters. - * - * Converts a C++ function into a function that can be - * called from a thread creation routine - * (e.g., pthread_create() or _beginthreadex()) that expects an - * extern "C" entry point. This class also makes it possible to - * transparently provide hooks to register a thread with an - * ACE_Thread_Manager. - * This class is used in ACE_OS::thr_create(). In general, the - * thread that creates an object of this class is different from - * the thread that calls @c invoke() on this object. Therefore, - * the @c invoke() method is responsible for deleting itself. - */ -class ACE_Export ACE_Base_Thread_Adapter -{ -public: - - virtual ~ACE_Base_Thread_Adapter (void); - - /// Virtual method invoked by the thread entry point. - virtual ACE_THR_FUNC_RETURN invoke (void) = 0; - - /// Accessor for the C entry point function to the OS thread creation - /// routine. - ACE_THR_C_FUNC entry_point (void); - -#ifdef ACE_USES_GPROF - /// Accessor to the itimer_ - /// followed http://sam.zoy.org/writings/programming/gprof.html - struct itimerval* timerval (void); -#endif // ACE_USES_PROF - - /// Invoke the close_log_msg_hook, if it is present - static void close_log_msg (void); - - /// Invoke the sync_log_msg_hook, if it is present - static void sync_log_msg (const ACE_TCHAR *prog_name); - - /// Invoke the thr_desc_log_msg_hook, if it is present - static ACE_OS_Thread_Descriptor *thr_desc_log_msg (void); - -protected: - /// Constructor. - ACE_Base_Thread_Adapter (ACE_THR_FUNC user_func, - void *arg, - ACE_THR_C_FUNC entry_point = (ACE_THR_C_FUNC) ACE_THREAD_ADAPTER_NAME, - ACE_OS_Thread_Descriptor *td = 0 -# if defined (ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS) - , ACE_SEH_EXCEPT_HANDLER selector = 0 - , ACE_SEH_EXCEPT_HANDLER handler = 0 -# endif /* ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS */ - , long cancel_flags = 0 - ); - /// Inherit the logging features if the parent thread has an - /// ACE_Log_Msg. - void inherit_log_msg (void); - -private: - /// The hooks to inherit and cleanup the Log_Msg attributes - static ACE_INIT_LOG_MSG_HOOK init_log_msg_hook_; - static ACE_INHERIT_LOG_MSG_HOOK inherit_log_msg_hook_; - static ACE_CLOSE_LOG_MSG_HOOK close_log_msg_hook_; - static ACE_SYNC_LOG_MSG_HOOK sync_log_msg_hook_; - static ACE_THR_DESC_LOG_MSG_HOOK thr_desc_log_msg_hook_; - - /// Set the Log_Msg hooks - static void set_log_msg_hooks (ACE_INIT_LOG_MSG_HOOK init_hook, - ACE_INHERIT_LOG_MSG_HOOK inherit_hook, - ACE_CLOSE_LOG_MSG_HOOK close_hook, - ACE_SYNC_LOG_MSG_HOOK sync_hook, - ACE_THR_DESC_LOG_MSG_HOOK thr_desc); - - /// Allow the ACE_Log_Msg class to set its hooks. - friend class ACE_Log_Msg; - -protected: - /// Thread startup function passed in by the user (C++ linkage). - ACE_THR_FUNC user_func_; - - /// Argument to thread startup function. - void *arg_; - - /// Entry point to the underlying OS thread creation call (C - /// linkage). - ACE_THR_C_FUNC entry_point_; - - /** - * Optional thread descriptor. Passing this pointer in will force - * the spawned thread to cache this location in Log_Msg and wait - * until Thread_Manager fills in all information in thread - * descriptor. - */ - ACE_OS_Thread_Descriptor *thr_desc_; - - /// The ACE_Log_Msg attributes. - ACE_OS_Log_Msg_Attributes log_msg_attributes_; - - /// That is useful for gprof, define itimerval -#ifdef ACE_USES_GPROF - struct itimerval itimer_; -#endif // ACE_USES_GPROF - - /// Keep a reference to the configuration context that spawns the - /// thread so the child can inherit it. - ACE_Service_Gestalt * const ctx_; - - /// Pass through the thread-creation flags that can only be acted on by - /// the spawned thread. Currently this is only the cancellation-related - /// flags. - long flags_; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -# if defined (ACE_HAS_INLINED_OSCALLS) -# if defined (ACE_INLINE) -# undef ACE_INLINE -# endif /* ACE_INLINE */ -# define ACE_INLINE inline -# include "ace/Base_Thread_Adapter.inl" -# endif /* ACE_HAS_INLINED_OSCALLS */ - -#include /**/ "ace/post.h" -#endif /* ACE_BASE_THREAD_ADAPTER_H */ diff --git a/modules/worldengine/deps/acelite/ace/Base_Thread_Adapter.inl b/modules/worldengine/deps/acelite/ace/Base_Thread_Adapter.inl deleted file mode 100644 index febce6f49c..0000000000 --- a/modules/worldengine/deps/acelite/ace/Base_Thread_Adapter.inl +++ /dev/null @@ -1,45 +0,0 @@ -// -*- C++ -*- -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_INLINE long -ACE_OS_Thread_Descriptor::flags (void) const -{ - return flags_; -} - -ACE_INLINE -ACE_OS_Thread_Descriptor::ACE_OS_Thread_Descriptor (long flags) - : flags_ (flags) -{ -} - -ACE_INLINE void -ACE_Base_Thread_Adapter::set_log_msg_hooks ( - ACE_INIT_LOG_MSG_HOOK init_hook, - ACE_INHERIT_LOG_MSG_HOOK inherit_hook, - ACE_CLOSE_LOG_MSG_HOOK close_hook, - ACE_SYNC_LOG_MSG_HOOK sync_hook, - ACE_THR_DESC_LOG_MSG_HOOK thr_desc_hook) -{ - ACE_Base_Thread_Adapter::init_log_msg_hook_ = init_hook; - ACE_Base_Thread_Adapter::inherit_log_msg_hook_ = inherit_hook; - ACE_Base_Thread_Adapter::close_log_msg_hook_ = close_hook; - ACE_Base_Thread_Adapter::sync_log_msg_hook_ = sync_hook; - ACE_Base_Thread_Adapter::thr_desc_log_msg_hook_ = thr_desc_hook; -} - -ACE_INLINE ACE_THR_C_FUNC -ACE_Base_Thread_Adapter::entry_point (void) -{ - return this->entry_point_; -} - -#ifdef ACE_USES_GPROF -ACE_INLINE itimerval* -ACE_Base_Thread_Adapter::timerval (void) -{ - return &(this->itimer_); -} -#endif // ACE_USES_GPROF - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Based_Pointer_Repository.cpp b/modules/worldengine/deps/acelite/ace/Based_Pointer_Repository.cpp deleted file mode 100644 index ef094f02e7..0000000000 --- a/modules/worldengine/deps/acelite/ace/Based_Pointer_Repository.cpp +++ /dev/null @@ -1,115 +0,0 @@ -#include "ace/Map_Manager.h" -#include "ace/Based_Pointer_Repository.h" -#include "ace/Guard_T.h" -#include "ace/Null_Mutex.h" -#include "ace/Synch_Traits.h" -#include "ace/RW_Thread_Mutex.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_Based_Pointer_Repository_Rep - * - * @brief Implementation for the ACE_Based_Pointer_Repository. - * - * Every memory pool in ACE binds it's mapping base address and - * the mapped size to this repository every time it maps/remaps a - * new chunk of memory successfully. - */ -class ACE_Based_Pointer_Repository_Rep -{ -public: - // Useful typedefs. - typedef ACE_Map_Manager MAP_MANAGER; - typedef ACE_Map_Iterator MAP_ITERATOR; - typedef ACE_Map_Entry MAP_ENTRY; - - /// Keeps track of the mapping between addresses and their associated - /// values. - MAP_MANAGER addr_map_; - - /// Synchronize concurrent access to the map. - ACE_SYNCH_MUTEX lock_; -}; - -ACE_Based_Pointer_Repository::ACE_Based_Pointer_Repository (void) -{ - ACE_TRACE ("ACE_Based_Pointer_Repository::ACE_Based_Pointer_Repository"); - ACE_NEW (this->rep_, - ACE_Based_Pointer_Repository_Rep); -} - -ACE_Based_Pointer_Repository::~ACE_Based_Pointer_Repository (void) -{ - ACE_TRACE ("ACE_Based_Pointer_Repository::~ACE_Based_Pointer_Repository"); - delete this->rep_; -} - -// Search for appropriate base address in repository - -int -ACE_Based_Pointer_Repository::find (void *addr, void *&base_addr) -{ - ACE_TRACE ("ACE_Based_Pointer_Repository::find"); - ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, mon, this->rep_->lock_, -1); - ACE_Based_Pointer_Repository_Rep::MAP_ENTRY *ce = 0; - - for (ACE_Based_Pointer_Repository_Rep::MAP_ITERATOR iter (this->rep_->addr_map_); - iter.next (ce) != 0; - iter.advance ()) - // Check to see if is within any of the regions. - if (addr >= ce->ext_id_ - && addr < ((char *)ce->ext_id_ + ce->int_id_)) - { - // Assign the base address. - base_addr = ce->ext_id_; - return 1; - } - - // Assume base address 0 (e.g., if new'ed). - base_addr = 0; - return 0; -} - -// Bind a new entry to the repository or update the size of an -// existing entry. - -int -ACE_Based_Pointer_Repository::bind (void *addr, size_t size) -{ - ACE_TRACE ("ACE_Based_Pointer_Repository::bind"); - ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, mon, this->rep_->lock_, -1); - - return this->rep_->addr_map_.rebind (addr, size); -} - -// Unbind a base from the repository. - -int -ACE_Based_Pointer_Repository::unbind (void *addr) -{ - ACE_TRACE ("ACE_Based_Pointer_Repository::unbind"); - ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, mon, this->rep_->lock_, -1); - ACE_Based_Pointer_Repository_Rep::MAP_ENTRY *ce = 0; - - // Search for service handlers that requested notification. - - for (ACE_Based_Pointer_Repository_Rep::MAP_ITERATOR iter (this->rep_->addr_map_); - iter.next (ce) != 0; - iter.advance ()) - { - // Check to see if is within any of the regions and if - // so, unbind the key from the map. - if (addr >= ce->ext_id_ - && addr < ((char *)ce->ext_id_ + ce->int_id_)) - // Unbind base address. - return this->rep_->addr_map_.unbind (ce->ext_id_); - } - - return 0; -} - -ACE_SINGLETON_TEMPLATE_INSTANTIATE(ACE_Singleton, ACE_Based_Pointer_Repository, ACE_SYNCH_RW_MUTEX); - - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Based_Pointer_Repository.h b/modules/worldengine/deps/acelite/ace/Based_Pointer_Repository.h deleted file mode 100644 index 00b6d2c4f6..0000000000 --- a/modules/worldengine/deps/acelite/ace/Based_Pointer_Repository.h +++ /dev/null @@ -1,92 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Based_Pointer_Repository.h - * - * @author Dietrich Quehl - * @author Douglas C. Schmidt - */ -//============================================================================= - -#ifndef ACE_BASED_POINTER_REPOSITORY_H -#define ACE_BASED_POINTER_REPOSITORY_H - -#include /**/ "ace/pre.h" - -#include /**/ "ace/ACE_export.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Singleton.h" -#include "ace/Synch_Traits.h" -#include "ace/os_include/os_stddef.h" - - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -// Forward decl., using the "Cheshire Cat" technique. -class ACE_Based_Pointer_Repository_Rep; - -/** - * @class ACE_Based_Pointer_Repository - * - * @brief Maps pointers to the base address of the region to which each - * pointer belongs. - */ -class ACE_Export ACE_Based_Pointer_Repository -{ -public: - // = Use ACE_Null_Mutex to allow locking while iterating. - - // = Initialization and termination methods. - ACE_Based_Pointer_Repository (void); - ~ACE_Based_Pointer_Repository (void); - - // = Search structure methods. - /** - * Return the appropriate @a base_addr region that contains @a addr. - * Returns 1 on success and 0 if the @a addr isn't contained in any - * @a base_addr region. - */ - int find (void *addr, - void *&base_addr); - - /// Bind a new entry to the repository or update the size of an - /// existing entry. Returns 0 on success and -1 on failure. - int bind (void *addr, - size_t size); - - /// Unbind from the repository the that @a addr is - /// contained within. - int unbind (void *addr); - -private: - - /// Use the "Cheshire-Cat" technique to hide the implementation in - /// order to avoid circular #include dependencies. - ACE_Based_Pointer_Repository_Rep *rep_; - -private: - ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Based_Pointer_Repository &)) - ACE_UNIMPLEMENTED_FUNC (ACE_Based_Pointer_Repository (const ACE_Based_Pointer_Repository &)) -}; - -// ---------------------------------- - -/// Declare a process wide singleton -ACE_SINGLETON_DECLARE (ACE_Singleton, - ACE_Based_Pointer_Repository, - ACE_SYNCH_RW_MUTEX) - -/// Provide a Singleton access point to the based pointer repository. -typedef ACE_Singleton - ACE_BASED_POINTER_REPOSITORY; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#include /**/ "ace/post.h" - -#endif /* ACE_BASED_POINTER_REPOSITORY_H */ diff --git a/modules/worldengine/deps/acelite/ace/Based_Pointer_T.cpp b/modules/worldengine/deps/acelite/ace/Based_Pointer_T.cpp deleted file mode 100644 index b36939aec9..0000000000 --- a/modules/worldengine/deps/acelite/ace/Based_Pointer_T.cpp +++ /dev/null @@ -1,119 +0,0 @@ -#ifndef ACE_BASED_POINTER_T_CPP -#define ACE_BASED_POINTER_T_CPP - -#include "ace/Based_Pointer_T.h" -#include "ace/Based_Pointer_Repository.h" -#include "ace/Log_Category.h" - -# define ACE_TRACEX(X) ACE_Trace ____ (ACE_TEXT (X), __LINE__, ACE_TEXT (__FILE__)) - -#if !defined (__ACE_INLINE__) -#include "ace/Based_Pointer_T.inl" -#endif /* __ACE_INLINE__ */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -template -ACE_Based_Pointer::ACE_Based_Pointer (void) -{ - ACE_TRACE ("ACE_Based_Pointer::ACE_Based_Pointer"); -} - -template void -ACE_Based_Pointer_Basic::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_Based_Pointer_Basic::dump"); - - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("\ntarget_ = %d\n"), this->target_)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("base_offset_ = %d\n"), this->base_offset_)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("computed pointer = %x\n"), - (CONCRETE *)(ACE_COMPUTE_BASED_POINTER (this)))); - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} - -template -ACE_Based_Pointer::ACE_Based_Pointer (CONCRETE *initial) - : ACE_Based_Pointer_Basic (initial) -{ - ACE_TRACE ("ACE_Based_Pointer_Basic::ACE_Based_Pointer_Basic"); -} - -template -ACE_Based_Pointer::ACE_Based_Pointer (const void* base_addr, int) - : ACE_Based_Pointer_Basic (base_addr, 0) -{ - ACE_TRACE ("ACE_Based_Pointer_Basic::ACE_Based_Pointer_Basic"); -} - -template -ACE_Based_Pointer_Basic::ACE_Based_Pointer_Basic (void) - : target_ (0), - base_offset_ (0) -{ - ACE_TRACE ("ACE_Based_Pointer_Basic::ACE_Based_Pointer_Basic"); - void *base_addr = 0; - - // Find the base address associated with our pointer. Note - // that it's ok for to return 0, which simply indicates that - // the address is not in memory-mapped virtual address space. - ACE_BASED_POINTER_REPOSITORY::instance ()->find (this, - base_addr); - this->base_offset_ = (char *) this - (char *) base_addr; -} - -template -ACE_Based_Pointer_Basic::ACE_Based_Pointer_Basic (const void *base_addr, int) - : target_ (0), - base_offset_ (0) -{ - ACE_TRACE ("ACE_Based_Pointer_Basic::ACE_Based_Pointer_Basic"); - this->base_offset_ = (char *) this - (char *) base_addr; -} - -template -ACE_Based_Pointer_Basic::ACE_Based_Pointer_Basic (CONCRETE *rhs) - : target_ (0), - base_offset_ (0) -{ - ACE_TRACE ("ACE_Based_Pointer_Basic::ACE_Based_Pointer_Basic"); - - if (rhs == 0) - // Store a value of that indicate "NULL" pointer. - this->target_ = -1; - else - { - void *base_addr = 0; - - // Find the base address associated with the pointer. - // Note that it's ok for to return 0, which simply - // indicates that the address is not in memory-mapped virtual - // address space. - ACE_BASED_POINTER_REPOSITORY::instance ()->find (this, - base_addr); - this->base_offset_ = (char *) this - (char *) base_addr; - this->target_ = ((char *) rhs - (char *) base_addr); - } -} - -template -ACE_Based_Pointer_Basic::ACE_Based_Pointer_Basic (const ACE_Based_Pointer_Basic &) -{ - ACE_TRACE ("ACE_Based_Pointer_Basic::ACE_Based_Pointer_Basic"); - - ACE_ASSERT (0); // not implemented. -} - -template -ACE_Based_Pointer::ACE_Based_Pointer (const ACE_Based_Pointer &rhs) - : ACE_Based_Pointer_Basic (rhs) -{ - ACE_TRACE ("ACE_Based_Pointer::ACE_Based_Pointer"); - ACE_ASSERT (0); // not implemented. -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_BASED_POINTER_T_CPP */ diff --git a/modules/worldengine/deps/acelite/ace/Based_Pointer_T.h b/modules/worldengine/deps/acelite/ace/Based_Pointer_T.h deleted file mode 100644 index e0211603c0..0000000000 --- a/modules/worldengine/deps/acelite/ace/Based_Pointer_T.h +++ /dev/null @@ -1,203 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Based_Pointer_T.h - * - * @author Dietrich Quehl - * @author Douglas C. Schmidt - */ -//============================================================================= - -#ifndef ACE_BASED_POINTER_T_H -#define ACE_BASED_POINTER_T_H - -#include /**/ "ace/pre.h" - -#include /**/ "ace/config-all.h" -#include "ace/Basic_Types.h" - -#if defined (_MSC_VER) -// Suppress warning e.g. "return type for -// 'ACE_Based_Pointer::operator ->' is 'long *' (i.e., not a UDT -// or reference to a UDT. Will produce errors if applied using infix -// notation)" -#pragma warning(disable: 4284) -#endif /* _MSC_VER */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_Based_Pointer_Basic - * - * @brief A proxy that keeps track of the relative offset of a "pointer" - * from its base address. - * This class makes it possible to transparently use "pointers" in - * shared memory as easily as programming with pointers to local - * memory. In particular, we don't need to ensure that the base - * addresses of all the pointers are mapped into separate - * processes at the same absolute memory base address. - */ -template -class ACE_Based_Pointer_Basic -{ -public: - /** - * This constructor initializes the by asking the - * Singleton for the base address of - * the memory region within which it is instantiated. Two results - * are possible: - * - * 1. An has stored a base address/size pair and the - * new based-pointer instance is located between the base address and - * the base address + size - 1. In this case, the repository - * returns the base address. - * - * 2. No suitable address/size pair was found. The repository - * assumes an address in the regular (not mapped) virtual address - * space of the process and returns 0. In this case, the - * based-pointer uses its address as an offset to it's base - * address 0. - */ - ACE_Based_Pointer_Basic (void); - - /** - * Initialize this object using the @a initial pointer. This - * constructor initializes the by asking the - * Singleton for the base address of - * the memory region within which it is instantiated. Three results - * are possible: - * - * 1. An has stored a base address/size pair and the - * new based-pointer instance is located between the base address and - * the base address + size - 1. In this case, the repository - * returns the base address. - * - * 2. No suitable address/size pair was found. The repository - * assumes an address in the regular (not mapped) virtual address - * space of the process and returns 0. In this case, the - * based-pointer uses its address as an offset to its base - * address 0. - * - * 3. If @a initial is 0 then set the value of to -1, which - * indicates a "NULL" pointer. - */ - ACE_Based_Pointer_Basic (CONCRETE *initial); - - /// Copy constructor. - ACE_Based_Pointer_Basic (const ACE_Based_Pointer_Basic &); - - /// Constructor for know base address. @a o is only used to - /// resolve overload ambiguity. - ACE_Based_Pointer_Basic (const void *base_addr, int o); - - /// Pseudo-assignment operator. - void operator = (CONCRETE *from); - - /// Pseudo-assignment operator. - void operator = (const ACE_Based_Pointer_Basic &); - - /// Dereference operator. - CONCRETE operator * (void) const; - - /// Less than operator. - bool operator < (const ACE_Based_Pointer_Basic &) const; - - /// Less than or equal operator. - bool operator <= (const ACE_Based_Pointer_Basic &) const; - - /// Greater than operator. - bool operator > (const ACE_Based_Pointer_Basic &) const; - - /// Greater than or equal operator. - bool operator >= (const ACE_Based_Pointer_Basic &) const; - - /// Equality operator. - bool operator == (const ACE_Based_Pointer_Basic &) const; - - /// Inequality operator. - bool operator != (const ACE_Based_Pointer_Basic &) const; - - /// Subscript operator. - CONCRETE operator [](int index) const; - - /// Increment operator. - void operator+= (int index); - - /// Returns the underlying memory address of the smart pointer. - operator CONCRETE *() const; - - /// Returns the underlying memory address of the smart pointer. - CONCRETE *addr (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - - /// Dump the state of the object. - void dump (void) const; - -protected: - ptrdiff_t target_; - - /// Keep track of our offset from the base pointer. - ptrdiff_t base_offset_; -}; - -/** - * @class ACE_Based_Pointer - * - * @brief A smart proxy that keeps track of the relative offset of a - * "pointer" from its base address. - * - * This class makes it possible to transparently use "pointers" in - * shared memory as easily as programming with pointers to local - * memory by overloading the C++ delegation operator ->(). - */ -template -class ACE_Based_Pointer : public ACE_Based_Pointer_Basic -{ -public: - // = Initialization method. - /// Constructor. See constructor for ACE_Based_Pointer_Basic for - /// details. - ACE_Based_Pointer (void); - - /// Initialize this object using the pointer. See - /// constructor for ACE_Based_Pointer_Basic for details. - ACE_Based_Pointer (CONCRETE *initial); - - /// Initialize this object with known @a base_addr. @a dummy is - /// a dummy value used to resolve overload ambiguity and it - /// otherwise ignored. - ACE_Based_Pointer (const void *base_addr, int dummy); - - /// Copy constructor (not implemented yet). - ACE_Based_Pointer (const ACE_Based_Pointer &); - - /// Assignment operator. - void operator = (const ACE_Based_Pointer &); - - /// Pseudo-assignment operator. - void operator = (CONCRETE *from); - - /// The C++ "delegation operator". - CONCRETE *operator-> (void); -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/Based_Pointer_T.inl" -#endif /* __ACE_INLINE__ */ - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "ace/Based_Pointer_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Based_Pointer_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ - -#include /**/ "ace/post.h" - -#endif /* ACE_BASED_POINTER_T_H */ diff --git a/modules/worldengine/deps/acelite/ace/Based_Pointer_T.inl b/modules/worldengine/deps/acelite/ace/Based_Pointer_T.inl deleted file mode 100644 index 04ab75831b..0000000000 --- a/modules/worldengine/deps/acelite/ace/Based_Pointer_T.inl +++ /dev/null @@ -1,136 +0,0 @@ -// -*- C++ -*- -#define ACE_COMPUTE_BASED_POINTER(P) (((char *) (P) - (P)->base_offset_) + (P)->target_) -#include "ace/Global_Macros.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -template ACE_INLINE CONCRETE * -ACE_Based_Pointer::operator->(void) -{ - ACE_TRACE ("ACE_Based_Pointer::operator->"); - return reinterpret_cast (ACE_COMPUTE_BASED_POINTER (this)); -} - -template ACE_INLINE void -ACE_Based_Pointer_Basic::operator = (CONCRETE *rhs) -{ - ACE_TRACE ("ACE_Based_Pointer_Basic::operator ="); - if (rhs == 0) - // Store a value of that indicate "NULL" pointer. - this->target_ = -1; - else - this->target_ = ((char *) rhs - - ((char *) this - this->base_offset_)); -} - -template ACE_INLINE void -ACE_Based_Pointer::operator = (CONCRETE *rhs) -{ - ACE_TRACE ("ACE_Based_Pointer::operator ="); - if (rhs == 0) - // Store a value of that indicate "NULL" pointer. - this->target_ = -1; - else - this->target_ = ((char *) rhs - - ((char *) this - this->base_offset_)); -} - -template ACE_INLINE CONCRETE -ACE_Based_Pointer_Basic::operator *(void) const -{ - ACE_TRACE ("ACE_Based_Pointer_Basic::operator *"); - return *reinterpret_cast (ACE_COMPUTE_BASED_POINTER (this)); -} - -template ACE_INLINE CONCRETE * -ACE_Based_Pointer_Basic::addr (void) const -{ - ACE_TRACE ("ACE_Based_Pointer_Basic::addr"); - - if (this->target_ == -1) - return 0; - else - return reinterpret_cast (ACE_COMPUTE_BASED_POINTER (this)); -} - -template ACE_INLINE -ACE_Based_Pointer_Basic::operator CONCRETE *() const -{ - ACE_TRACE ("ACE_Based_Pointer_Basic::operator CONCRETE *()"); - - return this->addr (); -} - -template ACE_INLINE CONCRETE -ACE_Based_Pointer_Basic::operator [] (int index) const -{ - ACE_TRACE ("ACE_Based_Pointer_Basic::operator []"); - CONCRETE *c = - reinterpret_cast (ACE_COMPUTE_BASED_POINTER (this)); - return c[index]; -} - -template ACE_INLINE void -ACE_Based_Pointer_Basic::operator += (int index) -{ - ACE_TRACE ("ACE_Based_Pointer_Basic::operator +="); - this->base_offset_ += (index * sizeof (CONCRETE)); -} - -template ACE_INLINE bool -ACE_Based_Pointer_Basic::operator == (const ACE_Based_Pointer_Basic &rhs) const -{ - ACE_TRACE ("ACE_Based_Pointer_Basic::operator =="); - return ACE_COMPUTE_BASED_POINTER (this) == ACE_COMPUTE_BASED_POINTER (&rhs); -} - -template ACE_INLINE bool -ACE_Based_Pointer_Basic::operator != (const ACE_Based_Pointer_Basic &rhs) const -{ - ACE_TRACE ("ACE_Based_Pointer_Basic::operator !="); - return !(*this == rhs); -} - -template ACE_INLINE bool -ACE_Based_Pointer_Basic::operator < (const ACE_Based_Pointer_Basic &rhs) const -{ - ACE_TRACE ("ACE_Based_Pointer_Basic::operator <"); - return ACE_COMPUTE_BASED_POINTER (this) < ACE_COMPUTE_BASED_POINTER (&rhs); -} - -template ACE_INLINE bool -ACE_Based_Pointer_Basic::operator <= (const ACE_Based_Pointer_Basic &rhs) const -{ - ACE_TRACE ("ACE_Based_Pointer_Basic::operator <="); - return ACE_COMPUTE_BASED_POINTER (this) <= ACE_COMPUTE_BASED_POINTER (&rhs); -} - -template ACE_INLINE bool -ACE_Based_Pointer_Basic::operator > (const ACE_Based_Pointer_Basic &rhs) const -{ - ACE_TRACE ("ACE_Based_Pointer_Basic::operator >"); - return ACE_COMPUTE_BASED_POINTER (this) > ACE_COMPUTE_BASED_POINTER (&rhs); -} - -template ACE_INLINE bool -ACE_Based_Pointer_Basic::operator >= (const ACE_Based_Pointer_Basic &rhs) const -{ - ACE_TRACE ("ACE_Based_Pointer_Basic::operator >="); - return ACE_COMPUTE_BASED_POINTER (this) >= ACE_COMPUTE_BASED_POINTER (&rhs); -} - -template ACE_INLINE void -ACE_Based_Pointer_Basic::operator= (const ACE_Based_Pointer_Basic &rhs) -{ - ACE_TRACE ("ACE_Based_Pointer_Basic::operator="); - *this = rhs.addr (); -} - -template ACE_INLINE void -ACE_Based_Pointer::operator= (const ACE_Based_Pointer &rhs) -{ - ACE_TRACE ("ACE_Based_Pointer::operator="); - *this = rhs.addr (); -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Basic_Stats.cpp b/modules/worldengine/deps/acelite/ace/Basic_Stats.cpp deleted file mode 100644 index 98e3193f3d..0000000000 --- a/modules/worldengine/deps/acelite/ace/Basic_Stats.cpp +++ /dev/null @@ -1,74 +0,0 @@ -#include "ace/Basic_Stats.h" -#include "ace/Log_Category.h" - -#if !defined (__ACE_INLINE__) -#include "ace/Basic_Stats.inl" -#endif /* __ACE_INLINE__ */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -void -ACE_Basic_Stats::accumulate (const ACE_Basic_Stats &rhs) -{ - if (rhs.samples_count_ == 0) - return; - - if (this->samples_count_ == 0) - { - this->min_ = rhs.min_; - this->min_at_ = rhs.min_at_; - - this->max_ = rhs.max_; - this->max_at_ = rhs.max_at_; - } - else - { - if (this->min_ > rhs.min_) - { - this->min_ = rhs.min_; - this->min_at_ = rhs.min_at_; - } - if (this->max_ < rhs.max_) - { - this->max_ = rhs.max_; - this->max_at_ = rhs.max_at_; - } - } - - this->samples_count_ += rhs.samples_count_; - this->sum_ += rhs.sum_; -} - -void -ACE_Basic_Stats::dump_results ( - const ACE_TCHAR *msg, - ACE_Basic_Stats::scale_factor_type sf) const -{ -#ifndef ACE_NLOGGING - if (this->samples_count () == 0u) - { - ACELIB_DEBUG ((LM_DEBUG, - ACE_TEXT ("%s : no data collected\n"), msg)); - return; - } - - ACE_UINT64 avg = this->sum_ / this->samples_count_; - - ACE_UINT64 l_min = this->min_ / sf; - ACE_UINT64 l_max = this->max_ / sf; - ACE_UINT64 l_avg = avg / sf; - - ACELIB_DEBUG ((LM_DEBUG, - ACE_TEXT ("%s latency : %Q[%d]/%Q/%Q[%d] (min/avg/max)\n"), - msg, - l_min, this->min_at_, - l_avg, - l_max, this->max_at_)); - -#else - ACE_UNUSED_ARG (msg); - ACE_UNUSED_ARG (sf); -#endif /* ACE_NLOGGING */ -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Basic_Stats.h b/modules/worldengine/deps/acelite/ace/Basic_Stats.h deleted file mode 100644 index 4cc4bd2d63..0000000000 --- a/modules/worldengine/deps/acelite/ace/Basic_Stats.h +++ /dev/null @@ -1,90 +0,0 @@ - -//============================================================================= -/** - * @file Basic_Stats.h - * - * @author Carlos O'Ryan - */ -//============================================================================= - -#ifndef ACE_BASIC_STATS_H -#define ACE_BASIC_STATS_H -#include /**/ "ace/pre.h" - -#include /**/ "ace/config-all.h" -#include "ace/Basic_Types.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/// Collect basic stats about a series of samples -/** - * Compute the average and standard deviation (aka jitter) for an - * arbitrary number of samples, using constant space. - * Normally used for latency statistics. - */ -class ACE_Export ACE_Basic_Stats -{ -public: -#if !defined (ACE_WIN32) - typedef ACE_UINT32 scale_factor_type; -#else - typedef ACE_UINT64 scale_factor_type; -#endif - - /// Constructor - /** - * The number of samples is pre-allocated, and cannot changes once - * the class is initialized. - */ - ACE_Basic_Stats (void); - - /// The number of samples received so far - ACE_UINT32 samples_count (void) const; - - /// Record one sample. - void sample (ACE_UINT64 value); - - /// Update the values to reflect the stats in @a rhs. - void accumulate (const ACE_Basic_Stats &rhs); - - /// Dump all the samples - /** - * Prints out the results, using @a msg as a prefix for each message and - * scaling all the numbers by @a scale_factor. The latter is useful because - * high resolution timer samples are acquired in clock ticks, but often - * presented in microseconds. - */ - void dump_results (const ACE_TCHAR *msg, - scale_factor_type scale_factor) const; - - /// The number of samples - ACE_UINT32 samples_count_; - - /// The minimum value - ACE_UINT64 min_; - - /// The number of the sample that had the minimum value - ACE_UINT32 min_at_; - - /// The maximum value - ACE_UINT64 max_; - - /// The number of the sample that had the maximum value - ACE_UINT32 max_at_; - - /// The sum of all the values - ACE_UINT64 sum_; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/Basic_Stats.inl" -#endif /* __ACE_INLINE__ */ - -#include /**/ "ace/post.h" -#endif /* ACE_BASIC_STATS_H */ diff --git a/modules/worldengine/deps/acelite/ace/Basic_Stats.inl b/modules/worldengine/deps/acelite/ace/Basic_Stats.inl deleted file mode 100644 index 185478ab7f..0000000000 --- a/modules/worldengine/deps/acelite/ace/Basic_Stats.inl +++ /dev/null @@ -1,50 +0,0 @@ -// -*- C++ -*- -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_INLINE -ACE_Basic_Stats::ACE_Basic_Stats (void) - : samples_count_ (0) - , min_ (0) - , min_at_ (0) - , max_ (0) - , max_at_ (0) - , sum_ (0) -{ -} - -ACE_INLINE ACE_UINT32 -ACE_Basic_Stats::samples_count (void) const -{ - return this->samples_count_; -} - -ACE_INLINE void -ACE_Basic_Stats::sample (ACE_UINT64 value) -{ - ++this->samples_count_; - - if (this->samples_count_ == 1u) - { - this->min_ = value; - this->min_at_ = this->samples_count_; - this->max_ = value; - this->max_at_ = this->samples_count_; - } - else - { - if (this->min_ > value) - { - this->min_ = value; - this->min_at_ = this->samples_count_; - } - if (this->max_ < value) - { - this->max_ = value; - this->max_at_ = this->samples_count_; - } - } - - this->sum_ += value; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Basic_Types.cpp b/modules/worldengine/deps/acelite/ace/Basic_Types.cpp deleted file mode 100644 index 56867684e7..0000000000 --- a/modules/worldengine/deps/acelite/ace/Basic_Types.cpp +++ /dev/null @@ -1 +0,0 @@ -#include "ace/Basic_Types.h" diff --git a/modules/worldengine/deps/acelite/ace/Basic_Types.h b/modules/worldengine/deps/acelite/ace/Basic_Types.h deleted file mode 100644 index b9feefb5ea..0000000000 --- a/modules/worldengine/deps/acelite/ace/Basic_Types.h +++ /dev/null @@ -1,676 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Basic_Types.h - * - * @author David L. Levine - * - * #defines the list of preprocessor macros below. The config.h file can - * pre-define any of these to short-cut the definitions. This is usually - * only necessary if the preprocessor does all of its math using integers. - * - * Sizes of built-in types: - * - ACE_SIZEOF_CHAR - * - ACE_SIZEOF_WCHAR - * - ACE_SIZEOF_SHORT - * - ACE_SIZEOF_INT - * - ACE_SIZEOF_LONG - * - ACE_SIZEOF_LONG_LONG - * - ACE_SIZEOF_VOID_P - * - ACE_SIZEOF_FLOAT - * - ACE_SIZEOF_DOUBLE - * - ACE_SIZEOF_LONG_DOUBLE - * - * Wrappers for built-in types of specific sizes: - * - ACE_INT8 - * - ACE_UINT8 - * - ACE_INT16 - * - ACE_UINT16 - * - ACE_INT32 - * - ACE_UINT32 - * - ACE_UINT64 - * - ACE_INT64 - * - * Byte-order (endian-ness) determination: - * ACE_BYTE_ORDER, to either ACE_BIG_ENDIAN or ACE_LITTLE_ENDIAN - */ -//============================================================================= - -#include /**/ "ace/config-lite.h" - -#ifndef ACE_BASIC_TYPES_H -# define ACE_BASIC_TYPES_H - -# include /**/ "ace/pre.h" - -# if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -# endif /* ACE_LACKS_PRAGMA_ONCE */ - -// Pull in definitions -# include "ace/os_include/os_limits.h" // Integer limits -# include "ace/os_include/os_float.h" // Floating point limits -# include "ace/os_include/os_stdlib.h" // Other types -# include "ace/os_include/os_stddef.h" // Get ptrdiff_t - see further comments below -# include "ace/os_include/arpa/os_inet.h" // For htons - -# include "ace/os_include/sys/os_types.h" - -# if !defined (ACE_LACKS_SYS_PARAM_H) -# include /**/ -# endif /* ACE_LACKS_SYS_PARAM_H */ - -# include "ace/ACE_export.h" - -# if !defined (ACE_LACKS_STDINT_H) -# include -# endif -# if !defined (ACE_LACKS_INTTYPES_H) -# include -# endif - -#ifdef ACE_LACKS_INTPTR_T -# include "ace/If_Then_Else.h" - -// This intptr_t typedef is here instead of -// since it depends on the template -// metaprogramming in . - -// We could compare ACE_SIZEOF_VOID_P against ACE_SIZEOF_LONG, etc. -// However, that depends on the ACE preprocessor symbol definitions in -// the platform-specific configuration header being correct. -// The template meta-programming approach we take below, -// i.e. determining the type at compile-time rather than at -// preprocessing-time, will work for all platforms, and does not -// depend on ACE developer-defined configuration parameters. - -typedef ACE::If_Then_Else< - (sizeof (void*) == sizeof (signed int)), - signed int, - ACE::If_Then_Else< - (sizeof (void*) == sizeof (signed long)), - signed long, - ACE::If_Then_Else< - (sizeof (void*) == sizeof (signed long long)), - signed long long, - void /* Unknown. Force an invalid type */ - >::result_type - >::result_type - >::result_type intptr_t; - -typedef ACE::If_Then_Else< - (sizeof (void*) == sizeof (unsigned int)), - unsigned int, - ACE::If_Then_Else< - (sizeof (void*) == sizeof (unsigned long)), - unsigned long, - ACE::If_Then_Else< - (sizeof (void*) == sizeof (unsigned long long)), - unsigned long long, - void /* Unknown. Force an invalid type */ - >::result_type - >::result_type - >::result_type uintptr_t; - -#endif /* ACE_LACKS_INTPTR_T */ - -// A char always has 1 byte, by definition. -# define ACE_SIZEOF_CHAR 1 - -// Unfortunately, there isn't a portable way to determine the size of a wchar. -// So we just define them on a platform basis. If the platform doesn't -// define it and it's an XPG4 system, assume wchar_t is 4 bytes. Some code -// uses ACE_SIZEOF_WCHAR in preprocessor statements, so sizeof() isn't valid. -// If the platform config doesn't set this, and this guess is wrong, -// Basic_Types_Test should catch the inconsistency. -# if defined (ACE_HAS_WCHAR) -# if !defined (ACE_SIZEOF_WCHAR) -# if defined (ACE_HAS_XPG4_MULTIBYTE_CHAR) -# define ACE_SIZEOF_WCHAR 4 -# else -// 0 so the Basic_Types test will catch this. -# define ACE_SIZEOF_WCHAR 0 -# endif /* ACE_HAS_XPG4_MULTIBYTE_CHAR */ -# endif /* !ACE_SIZEOF_WCHAR */ -# endif /* ACE_HAS_WCHAR */ - -// The number of bytes in a short. -# if !defined (ACE_SIZEOF_SHORT) -# if (USHRT_MAX) == 255U -# define ACE_SIZEOF_SHORT 1 -# elif (USHRT_MAX) == 65535U -# define ACE_SIZEOF_SHORT 2 -# elif (USHRT_MAX) == 4294967295U -# define ACE_SIZEOF_SHORT 4 -# elif (USHRT_MAX) == 18446744073709551615U -# define ACE_SIZEOF_SHORT 8 -# else -# error: unsupported short size, must be updated for this platform! -# endif /* USHRT_MAX */ -# endif /* !defined (ACE_SIZEOF_SHORT) */ - -// The number of bytes in an int. -# if !defined (ACE_SIZEOF_INT) -# if (UINT_MAX) == 65535U -# define ACE_SIZEOF_INT 2 -# elif (UINT_MAX) == 4294967295U -# define ACE_SIZEOF_INT 4 -# elif (UINT_MAX) == 18446744073709551615U -# define ACE_SIZEOF_INT 8 -# else -# error: unsupported int size, must be updated for this platform! -# endif /* UINT_MAX */ -# endif /* !defined (ACE_SIZEOF_INT) */ - -// The number of bytes in a long. -# if !defined (ACE_SIZEOF_LONG) -# if (ULONG_MAX) == 65535UL -# define ACE_SIZEOF_LONG 2 -# elif ((ULONG_MAX) == 4294967295UL) -# define ACE_SIZEOF_LONG 4 -# elif ((ULONG_MAX) == 18446744073709551615UL) -# define ACE_SIZEOF_LONG 8 -# else -# error: unsupported long size, must be updated for this platform! -# endif /* ULONG_MAX */ -# endif /* !defined (ACE_SIZEOF_LONG) */ - -// The number of bytes in a long long. -# if !defined (ACE_SIZEOF_LONG_LONG) -# if defined (ULLONG_MAX) -# if ((ULLONG_MAX) == 4294967295ULL) -# define ACE_SIZEOF_LONG_LONG 4 -# elif ((ULLONG_MAX) == 18446744073709551615ULL) -# define ACE_SIZEOF_LONG_LONG 8 -# endif -# elif defined (ULONGLONG_MAX) -# if ((ULONGLONG_MAX) == 4294967295ULL) -# define ACE_SIZEOF_LONG_LONG 4 -# elif ((ULONGLONG_MAX) == 18446744073709551615ULL) -# define ACE_SIZEOF_LONG_LONG 8 -# endif -# endif -# // If we can't determine the size of long long, assume it is 8 -# // instead of erroring out. (Either ULLONG_MAX and ULONGLONG_MAX -# // may not be supported; or an extended C/C++ dialect may need to -# // be selected. If this assumption is wrong, it can be addressed -# // in the platform-specific config header. -# if !defined (ACE_SIZEOF_LONG_LONG) -# define ACE_SIZEOF_LONG_LONG 8 -# endif -# endif /* !defined (ACE_SIZEOF_LONG_LONG) */ - - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -// The sizes of the commonly implemented types are now known. Set up -// typedefs for whatever we can. Some of these are needed for certain -// cases of ACE_UINT64, so do them before the 64-bit stuff. - -#if defined (ACE_INT8_TYPE) - typedef ACE_INT8_TYPE ACE_INT8; -#elif defined (ACE_HAS_INT8_T) - typedef int8_t ACE_INT8; -#elif !defined (ACE_LACKS_SIGNED_CHAR) - typedef signed char ACE_INT8; -#else - typedef char ACE_INT8; -#endif /* defined (ACE_INT8_TYPE) */ - -#if defined (ACE_UINT8_TYPE) - typedef ACE_UINT8_TYPE ACE_UINT8; -#elif defined (ACE_HAS_UINT8_T) - typedef uint8_t ACE_UINT8; -#else - typedef unsigned char ACE_UINT8; -#endif /* defined (ACE_UINT8_TYPE) */ - -#if defined (ACE_INT16_TYPE) - typedef ACE_INT16_TYPE ACE_INT16; -#elif defined (ACE_HAS_INT16_T) - typedef int16_t ACE_INT16; -#elif ACE_SIZEOF_SHORT == 2 - typedef short ACE_INT16; -#elif ACE_SIZEOF_INT == 2 - typedef int ACE_INT16; -#else -# error Have to add to the ACE_INT16 type setting -#endif /* defined (ACE_INT16_TYPE) */ - -#if defined (ACE_UINT16_TYPE) - typedef ACE_UINT16_TYPE ACE_UINT16; -#elif defined (ACE_HAS_UINT16_T) - typedef uint16_t ACE_UINT16; -#elif ACE_SIZEOF_SHORT == 2 - typedef unsigned short ACE_UINT16; -#elif ACE_SIZEOF_INT == 2 - typedef unsigned int ACE_UINT16; -#else -# error Have to add to the ACE_UINT16 type setting -#endif /* defined (ACE_UINT16_TYPE) */ - -#if defined (ACE_INT32_TYPE) - typedef ACE_INT32_TYPE ACE_INT32; -#elif defined (ACE_HAS_INT32_T) - typedef int32_t ACE_INT32; -#elif ACE_SIZEOF_INT == 4 - typedef int ACE_INT32; -#elif ACE_SIZEOF_LONG == 4 - typedef long ACE_INT32; -#else -# error Have to add to the ACE_INT32 type setting -#endif /* defined (ACE_INT32_TYPE) */ - -#if defined (ACE_UINT32_TYPE) - typedef ACE_UINT32_TYPE ACE_UINT32; -#elif defined (ACE_HAS_UINT32_T) - typedef uint32_t ACE_UINT32; -#elif ACE_SIZEOF_INT == 4 - typedef unsigned int ACE_UINT32; -#elif ACE_SIZEOF_LONG == 4 - typedef unsigned long ACE_UINT32; -#else -# error Have to add to the ACE_UINT32 type setting -#endif /* defined (ACE_UINT32_TYPE) */ - -#if defined (ACE_INT64_TYPE) - typedef ACE_INT64_TYPE ACE_INT64; -#elif defined (ACE_HAS_INT64_T) - typedef int64_t ACE_INT64; -#elif ACE_SIZEOF_LONG == 8 - typedef long ACE_INT64; -#elif ACE_SIZEOF_LONG_LONG == 8 -# ifdef __GNUC__ - // Silence g++ "-pedantic" warnings regarding use of "long long" - // type. - __extension__ -# endif /* __GNUC__ */ - typedef long long ACE_INT64; -#endif /* defined (ACE_INT64_TYPE) */ - -#if defined (ACE_UINT64_TYPE) - typedef ACE_UINT64_TYPE ACE_UINT64; -#elif defined (ACE_HAS_UINT64_T) - typedef uint64_t ACE_UINT64; -#elif ACE_SIZEOF_LONG == 8 - typedef unsigned long ACE_UINT64; -#elif ACE_SIZEOF_LONG_LONG == 8 -# ifdef __GNUC__ - // Silence g++ "-pedantic" warnings regarding use of "long long" - // type. - __extension__ -# endif /* __GNUC__ */ - typedef unsigned long long ACE_UINT64; -#endif /* defined (ACE_UINT64_TYPE) */ - -/// Define a generic byte for use in codecs -typedef unsigned char ACE_Byte; - -// Define a pseudo wide character type when wchar is not supported so we -// can support basic wide character string operations. - -#if defined (ACE_HAS_WCHAR) || defined (ACE_HAS_XPG4_MULTIBYTE_CHAR) -# define ACE_WINT_T wint_t -# define ACE_WCHAR_T wchar_t -#else -# define ACE_WINT_T ACE_UINT16 -# define ACE_WCHAR_T ACE_UINT16 -#endif /* ACE_HAS_WCHAR */ - -// The number of bytes in a void *. -#ifndef ACE_SIZEOF_VOID_P -# define ACE_SIZEOF_VOID_P ACE_SIZEOF_LONG -#endif /* ACE_SIZEOF_VOID_P */ - -ACE_END_VERSIONED_NAMESPACE_DECL - -// Byte-order (endian-ness) determination. -#if defined (BYTE_ORDER) -# if (BYTE_ORDER == LITTLE_ENDIAN) -# define ACE_LITTLE_ENDIAN 0x0123 -# define ACE_BYTE_ORDER ACE_LITTLE_ENDIAN -# elif (BYTE_ORDER == BIG_ENDIAN) -# define ACE_BIG_ENDIAN 0x3210 -# define ACE_BYTE_ORDER ACE_BIG_ENDIAN -# else -# error: unknown BYTE_ORDER! -# endif /* BYTE_ORDER */ -#elif defined (_BYTE_ORDER) -# if (_BYTE_ORDER == _LITTLE_ENDIAN) -# define ACE_LITTLE_ENDIAN 0x0123 -# define ACE_BYTE_ORDER ACE_LITTLE_ENDIAN -# elif (_BYTE_ORDER == _BIG_ENDIAN) -# define ACE_BIG_ENDIAN 0x3210 -# define ACE_BYTE_ORDER ACE_BIG_ENDIAN -# else -# error: unknown _BYTE_ORDER! -# endif /* _BYTE_ORDER */ -#elif defined (__BYTE_ORDER) -# if (__BYTE_ORDER == __LITTLE_ENDIAN) -# define ACE_LITTLE_ENDIAN 0x0123 -# define ACE_BYTE_ORDER ACE_LITTLE_ENDIAN -# elif (__BYTE_ORDER == __BIG_ENDIAN) -# define ACE_BIG_ENDIAN 0x3210 -# define ACE_BYTE_ORDER ACE_BIG_ENDIAN -# else -# error: unknown __BYTE_ORDER! -# endif /* __BYTE_ORDER */ -#else /* ! BYTE_ORDER && ! __BYTE_ORDER */ - // We weren't explicitly told, so we have to figure it out . . . - // Note that Itanium hardware (IA64) can run in either byte order. It's - // selected by the OS when loading; Windows runs little, HP-UX runs big. -# if defined (i386) || defined (__i386__) || defined (_M_IX86) || \ - defined (vax) || defined (__alpha) || defined (__LITTLE_ENDIAN__) || \ - defined (ARM) || defined (_M_IA64) || defined (_M_AMD64) || \ - defined (__amd64) || \ - ((defined (__ia64__) || defined (__ia64)) && !defined (__hpux)) - // We know these are little endian. -# define ACE_LITTLE_ENDIAN 0x0123 -# define ACE_BYTE_ORDER ACE_LITTLE_ENDIAN -# else - // Otherwise, we assume big endian. -# define ACE_BIG_ENDIAN 0x3210 -# define ACE_BYTE_ORDER ACE_BIG_ENDIAN -# endif -#endif /* ! BYTE_ORDER && ! __BYTE_ORDER */ - -// Byte swapping macros to deal with differences between little endian -// and big endian machines. Note that "long" here refers to 32 bit -// quantities. -# define ACE_SWAP_LONG(L) ((ACE_SWAP_WORD ((L) & 0xFFFF) << 16) \ - | ACE_SWAP_WORD(((L) >> 16) & 0xFFFF)) -# define ACE_SWAP_WORD(L) ((((L) & 0x00FF) << 8) | (((L) & 0xFF00) >> 8)) - -# define ACE_HTONL(X) htonl (X) -# define ACE_NTOHL(X) ntohl (X) - -# if defined (ACE_LITTLE_ENDIAN) -# define ACE_IDL_NCTOHL(X) (X) -# define ACE_IDL_NSTOHL(X) (X) -# else -# define ACE_IDL_NCTOHL(X) (X << 24) -# define ACE_IDL_NSTOHL(X) ((X) << 16) -# endif /* ACE_LITTLE_ENDIAN */ - -#define ACE_HTONS(x) htons(x) -#define ACE_NTOHS(x) ntohs(x) - -# define ACE_LONGLONG_TO_PTR(PTR_TYPE, L) \ - reinterpret_cast (static_cast (L)) - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -inline ACE_UINT32 -ACE_U64_TO_U32 (ACE_UINT64 n) -{ - return static_cast (n); -} - -inline ACE_UINT32 -ACE_CU64_TO_CU32 (ACE_UINT64 n) -{ - return static_cast (n); -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (ACE_WIN32) -# if defined (__MINGW32__) -# define ACE_UINT64_LITERAL(n) n ## ull -# define ACE_INT64_LITERAL(n) n ## ll -# else -# define ACE_UINT64_LITERAL(n) n ## ui64 -# define ACE_INT64_LITERAL(n) n ## i64 -# endif /* defined (__MINGW32__) */ -#elif defined (__TANDEM) -# define ACE_UINT64_LITERAL(n) n ## LL -# define ACE_INT64_LITERAL(n) n ## LL -#else /* ! ACE_WIN32 */ -# define ACE_UINT64_LITERAL(n) n ## ull -# define ACE_INT64_LITERAL(n) n ## ll -#endif /* ! ACE_WIN32*/ - -#if !defined (ACE_INT8_FORMAT_SPECIFIER_ASCII) -# if defined (PRId8) -# define ACE_INT8_FORMAT_SPECIFIER_ASCII "%" PRId8 -# else -# define ACE_INT8_FORMAT_SPECIFIER_ASCII "%d" -# endif /* defined (PRId8) */ -#endif /* ACE_INT8_FORMAT_SPECIFIER_ASCII */ - -#if !defined (ACE_INT8_FORMAT_SPECIFIER) -# if defined (PRId8) -# define ACE_INT8_FORMAT_SPECIFIER ACE_TEXT ("%") ACE_TEXT (PRId8) -# else -# define ACE_INT8_FORMAT_SPECIFIER ACE_TEXT (ACE_INT8_FORMAT_SPECIFIER_ASCII) -# endif /* defined (PRId8) */ -#endif /* ACE_INT8_FORMAT_SPECIFIER */ - -#if !defined (ACE_UINT8_FORMAT_SPECIFIER_ASCII) -# if defined (PRIu8) -# define ACE_UINT8_FORMAT_SPECIFIER_ASCII "%" PRIu8 -# else -# define ACE_UINT8_FORMAT_SPECIFIER_ASCII "%u" -# endif /* defined (PRIu8) */ -#endif /* ACE_UINT8_FORMAT_SPECIFIER */ - -#if !defined (ACE_UINT8_FORMAT_SPECIFIER) -# if defined (PRIu8) -# define ACE_UINT8_FORMAT_SPECIFIER ACE_TEXT ("%") ACE_TEXT (PRIu8) -# else -# define ACE_UINT8_FORMAT_SPECIFIER ACE_TEXT (ACE_UINT8_FORMAT_SPECIFIER_ASCII) -# endif /* defined (PRIu8) */ -#endif /* ACE_UINT8_FORMAT_SPECIFIER */ - -#if !defined (ACE_INT16_FORMAT_SPECIFIER_ASCII) -# if defined (PRId16) -# define ACE_INT16_FORMAT_SPECIFIER_ASCII "%" PRId16 -# else -# define ACE_INT16_FORMAT_SPECIFIER_ASCII "%d" -# endif /* defined (PRId16) */ -#endif /* ACE_INT16_FORMAT_SPECIFIER */ - -#if !defined (ACE_INT16_FORMAT_SPECIFIER) -# if defined (PRId16) -# define ACE_INT16_FORMAT_SPECIFIER ACE_TEXT ("%") ACE_TEXT (PRId16) -# else -# define ACE_INT16_FORMAT_SPECIFIER ACE_TEXT (ACE_INT16_FORMAT_SPECIFIER_ASCII) -# endif /* defined (PRId16) */ -#endif /* ACE_INT16_FORMAT_SPECIFIER */ - -#if !defined (ACE_UINT16_FORMAT_SPECIFIER_ASCII) -# if defined (PRIu16) -# define ACE_UINT16_FORMAT_SPECIFIER_ASCII "%" PRIu16 -# else -# define ACE_UINT16_FORMAT_SPECIFIER_ASCII "%u" -# endif /* defined (PRIu16) */ -#endif /* ACE_UINT16_FORMAT_SPECIFIER */ - -#if !defined (ACE_UINT16_FORMAT_SPECIFIER) -# if defined (PRIu16) -# define ACE_UINT16_FORMAT_SPECIFIER ACE_TEXT ("%") ACE_TEXT (PRIu16) -# else -# define ACE_UINT16_FORMAT_SPECIFIER ACE_TEXT (ACE_UINT16_FORMAT_SPECIFIER_ASCII) -# endif /* defined (PRIu16) */ -#endif /* ACE_UINT16_FORMAT_SPECIFIER */ - -#if !defined (ACE_INT32_FORMAT_SPECIFIER_ASCII) -# if defined (PRId32) -# define ACE_INT32_FORMAT_SPECIFIER_ASCII "%" PRId32 -# elif ACE_SIZEOF_INT == 4 -# define ACE_INT32_FORMAT_SPECIFIER_ASCII "%d" -# else -# define ACE_INT32_FORMAT_SPECIFIER_ASCII "%ld" -# endif /* defined (PRId32) */ -#endif /* ACE_INT32_FORMAT_SPECIFIER */ - -#if !defined (ACE_INT32_FORMAT_SPECIFIER) -# if defined (PRId32) -# define ACE_INT32_FORMAT_SPECIFIER ACE_TEXT ("%") ACE_TEXT (PRId32) -# else -# define ACE_INT32_FORMAT_SPECIFIER ACE_TEXT (ACE_INT32_FORMAT_SPECIFIER_ASCII) -# endif /* defined (PRId32) */ -#endif /* ACE_INT32_FORMAT_SPECIFIER */ - -#if !defined (ACE_UINT32_FORMAT_SPECIFIER_ASCII) -# if defined (PRIu32) -# define ACE_UINT32_FORMAT_SPECIFIER_ASCII "%" PRIu32 -# elif ACE_SIZEOF_INT == 4 -# define ACE_UINT32_FORMAT_SPECIFIER_ASCII "%u" -# else -# define ACE_UINT32_FORMAT_SPECIFIER_ASCII "%lu" -# endif /* defined (PRIu32) */ -#endif /* ACE_UINT32_FORMAT_SPECIFIER */ - -#if !defined (ACE_UINT32_FORMAT_SPECIFIER) -# if defined (PRIu32) -# define ACE_UINT32_FORMAT_SPECIFIER ACE_TEXT ("%") ACE_TEXT (PRIu32) -# else -# define ACE_UINT32_FORMAT_SPECIFIER ACE_TEXT (ACE_UINT32_FORMAT_SPECIFIER_ASCII) -# endif /* defined (PRIu32) */ -#endif /* ACE_UINT32_FORMAT_SPECIFIER */ - -#if !defined (ACE_INT64_FORMAT_SPECIFIER_ASCII) -# if defined (PRId64) -# define ACE_INT64_FORMAT_SPECIFIER_ASCII "%" PRId64 -# elif ACE_SIZEOF_LONG == 8 -# define ACE_INT64_FORMAT_SPECIFIER_ASCII "%ld" -# else -# define ACE_INT64_FORMAT_SPECIFIER_ASCII "%lld" -# endif /* defined (PRId64) */ -#endif /* ACE_INT64_FORMAT_SPECIFIER */ - -#if !defined (ACE_INT64_FORMAT_SPECIFIER) -# if defined (PRId64) -# define ACE_INT64_FORMAT_SPECIFIER ACE_TEXT ("%") ACE_TEXT (PRId64) -# else -# define ACE_INT64_FORMAT_SPECIFIER ACE_TEXT (ACE_INT64_FORMAT_SPECIFIER_ASCII) -# endif /* defined (PRId64) */ -#endif /* ACE_INT64_FORMAT_SPECIFIER */ - -#if !defined (ACE_UINT64_FORMAT_SPECIFIER_ASCII) -# if defined (PRIu64) -# define ACE_UINT64_FORMAT_SPECIFIER_ASCII "%" PRIu64 -# elif ACE_SIZEOF_LONG == 8 -# define ACE_UINT64_FORMAT_SPECIFIER_ASCII "%lu" -# else -# define ACE_UINT64_FORMAT_SPECIFIER_ASCII "%llu" -# endif /* defined (PRIu64) */ -#endif /* ACE_UINT64_FORMAT_SPECIFIER_ASCII */ - -#if !defined (ACE_UINT64_FORMAT_SPECIFIER) -# if defined (PRIu64) -# define ACE_UINT64_FORMAT_SPECIFIER ACE_TEXT ("%") ACE_TEXT (PRIu64) -# else -# define ACE_UINT64_FORMAT_SPECIFIER ACE_TEXT (ACE_UINT64_FORMAT_SPECIFIER_ASCII) -# endif /* defined (PRIu64) */ -#endif /* ACE_UINT64_FORMAT_SPECIFIER */ - -#if !defined (ACE_SSIZE_T_FORMAT_SPECIFIER_ASCII) -# if defined (ACE_WIN64) -# define ACE_SSIZE_T_FORMAT_SPECIFIER_ASCII "%I64d" -# elif defined (_WRS_CONFIG_LP64) -# define ACE_SSIZE_T_FORMAT_SPECIFIER_ASCII "%ld" -# else -# define ACE_SSIZE_T_FORMAT_SPECIFIER_ASCII "%d" -# endif /* ACE_WIN64 */ -#endif /* ACE_SSIZE_T_FORMAT_SPECIFIER */ - -#if !defined (ACE_SSIZE_T_FORMAT_SPECIFIER) -#define ACE_SSIZE_T_FORMAT_SPECIFIER ACE_TEXT (ACE_SSIZE_T_FORMAT_SPECIFIER_ASCII) -#endif /* ACE_SSIZE_T_FORMAT_SPECIFIER */ - -#if !defined (ACE_SIZE_T_FORMAT_SPECIFIER_ASCII) -# if defined (ACE_WIN64) -# define ACE_SIZE_T_FORMAT_SPECIFIER_ASCII "%I64u" -# elif defined (_WRS_CONFIG_LP64) -# define ACE_SIZE_T_FORMAT_SPECIFIER_ASCII "%lu" -# else -# define ACE_SIZE_T_FORMAT_SPECIFIER_ASCII "%u" -# endif /* ACE_WIN64 */ -#endif /* ACE_SIZE_T_FORMAT_SPECIFIER */ - -#if !defined (ACE_SIZE_T_FORMAT_SPECIFIER) -#define ACE_SIZE_T_FORMAT_SPECIFIER ACE_TEXT (ACE_SIZE_T_FORMAT_SPECIFIER_ASCII) -#endif /* ACE_SIZE_T_FORMAT_SPECIFIER */ - -// Cast from UINT64 to a double requires an intermediate cast to INT64 -// on some platforms. -#if defined (ACE_WIN32) -# define ACE_UINT64_DBLCAST_ADAPTER(n) static_cast<__int64> (n) -#else /* ! ACE_WIN32 && */ -# define ACE_UINT64_DBLCAST_ADAPTER(n) (n) -#endif /* ! ACE_WIN32 && */ - - -// The number of bytes in a float. -# ifndef ACE_SIZEOF_FLOAT -# if FLT_MAX_EXP == 128 -# define ACE_SIZEOF_FLOAT 4 -# elif FLT_MAX_EXP == 1024 -# define ACE_SIZEOF_FLOAT 8 -# else -# error: unsupported float size, must be updated for this platform! -# endif /* FLT_MAX_EXP */ -# endif /* ACE_SIZEOF_FLOAT */ - -// The number of bytes in a double. -# ifndef ACE_SIZEOF_DOUBLE -# if DBL_MAX_EXP == 128 -# define ACE_SIZEOF_DOUBLE 4 -# elif DBL_MAX_EXP == 1024 -# define ACE_SIZEOF_DOUBLE 8 -# else -# error: unsupported double size, must be updated for this platform! -# endif /* DBL_MAX_EXP */ -# endif /* ACE_SIZEOF_DOUBLE */ - -// The number of bytes in a long double. -# ifndef ACE_SIZEOF_LONG_DOUBLE -# if LDBL_MAX_EXP == 128 -# define ACE_SIZEOF_LONG_DOUBLE 4 -# elif LDBL_MAX_EXP == 1024 -# if defined (__powerpc64__) -# define ACE_SIZEOF_LONG_DOUBLE 16 -# else -# define ACE_SIZEOF_LONG_DOUBLE 8 -# endif -# elif LDBL_MAX_EXP == 16384 -# if defined (LDBL_DIG) && LDBL_DIG == 18 -# if defined (__ia64) || defined (__x86_64) -# define ACE_SIZEOF_LONG_DOUBLE 16 -# else /* ! __ia64 || __x86_64 */ -# define ACE_SIZEOF_LONG_DOUBLE 12 -# endif /* __ia64 */ -# else /* ! LDBL_DIG || LDBL_DIG != 18 */ -# define ACE_SIZEOF_LONG_DOUBLE 16 -# endif /* ! LDBL_DIG || LDBL_DIG != 18 */ -# else -# error: unsupported double size, must be updated for this platform! -# endif /* LDBL_MAX_EXP */ -# endif /* ACE_SIZEOF_LONG_DOUBLE */ - -// Max and min sizes for the ACE integer types. -#define ACE_CHAR_MAX 0x7F -#define ACE_CHAR_MIN -(ACE_CHAR_MAX)-1 -#define ACE_OCTET_MAX 0xFF -#define ACE_INT16_MAX 0x7FFF -#define ACE_INT16_MIN -(ACE_INT16_MAX)-1 -#define ACE_UINT16_MAX 0xFFFF -#define ACE_WCHAR_MAX ACE_UINT16_MAX -#define ACE_INT32_MAX 0x7FFFFFFF -#define ACE_INT32_MIN -(ACE_INT32_MAX)-1 -#define ACE_UINT32_MAX 0xFFFFFFFF -#define ACE_INT64_MAX ACE_INT64_LITERAL(0x7FFFFFFFFFFFFFFF) -#define ACE_INT64_MIN -(ACE_INT64_MAX)-1 -#define ACE_UINT64_MAX ACE_UINT64_LITERAL (0xFFFFFFFFFFFFFFFF) - -// These use ANSI/IEEE format. -#define ACE_FLT_MAX 3.402823466e+38F -#define ACE_FLT_MIN 1.175494351e-38F -#define ACE_DBL_MAX 1.7976931348623158e+308 -#define ACE_DBL_MIN 2.2250738585072014e-308 - -# include /**/ "ace/post.h" -#endif /* ACE_BASIC_TYPES_H */ diff --git a/modules/worldengine/deps/acelite/ace/Bound_Ptr.h b/modules/worldengine/deps/acelite/ace/Bound_Ptr.h deleted file mode 100644 index 5c317db6f1..0000000000 --- a/modules/worldengine/deps/acelite/ace/Bound_Ptr.h +++ /dev/null @@ -1,386 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Bound_Ptr.h - * - * @author Christopher Kohlhoff - * @author Boris Kolpackov - */ -//============================================================================= - -#ifndef ACE_BOUND_PTR_H -#define ACE_BOUND_PTR_H - -#include /**/ "ace/pre.h" - -#include /**/ "ace/config-all.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Auto_Ptr.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_Bound_Ptr_Counter - * - * @brief An ACE_Bound_Ptr_Counter object encapsulates an - * object reference count. - * - * Do not use this class directly, use ACE_Strong_Bound_Ptr or - * ACE_Weak_Bound_Ptr instead. - */ -template -class ACE_Bound_Ptr_Counter -{ -public: - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - - ACE_Bound_Ptr_Counter (long init_obj_ref_count = 0); - ~ACE_Bound_Ptr_Counter (void); - - /// Create a ACE_Bound_Ptr_Counter and initialize the - /// reference count to indicate ownership by a strong pointer. - static ACE_Bound_Ptr_Counter *create_strong (void); - - /// Increase both the object and counter reference counts and return - /// the new object reference count. A return value of -1 indicates - /// that the object has already been destroyed. - static long attach_strong (ACE_Bound_Ptr_Counter *counter); - - /// Decreases both the object and counter reference counts and - /// deletes whichever has no more references. Returns the new object - /// reference count. - static long detach_strong (ACE_Bound_Ptr_Counter *counter); - - /// Create a ACE_Bound_Ptr_Counter and initialize the - /// reference count to indicate no ownership. - static ACE_Bound_Ptr_Counter *create_weak (void); - - /// Increase the counter reference count and return argument. - static void attach_weak (ACE_Bound_Ptr_Counter *counter); - - /// Decreases the counter reference count and deletes the counter if - /// it has no more references. - static void detach_weak (ACE_Bound_Ptr_Counter *counter); - - /// Determine whether the object has been deleted. - static bool object_was_deleted (ACE_Bound_Ptr_Counter *counter); - -private: - - /// Allocate a new ACE_Bound_Ptr_Counter instance, - /// returning NULL if it cannot be created. - static ACE_Bound_Ptr_Counter *internal_create (long init_obj_ref_count); - -private: - - /// Reference count of underlying object. Is set to -1 once the - /// object has been destroyed to indicate to all weak pointers that - /// it is no longer valid. - long obj_ref_count_; - - /// Reference count of this counter. - long self_ref_count_; - - /// Mutex variable to synchronize access to the reference counts. - ACE_LOCK lock_; -}; - -// Forward decl. -template class ACE_Weak_Bound_Ptr; - -/** - * @class ACE_Strong_Bound_Ptr - * - * @brief This class implements support for a reference counted - * pointer. - * - * Assigning or copying instances of an ACE_Strong_Bound_Ptr will - * automatically increment the reference count of the underlying object. - * When the last instance of an ACE_Strong_Bound_Ptr that references a - * particular object is destroyed or overwritten, it will invoke delete - * on its underlying pointer. - */ -template -class ACE_Strong_Bound_Ptr -{ -public: - /// Constructor that initializes an ACE_Strong_Bound_Ptr to point to the - /// object \ immediately. - explicit ACE_Strong_Bound_Ptr (X *p = 0); - - /// Constructor that initializes an ACE_Strong_Bound_Ptr by stealing - /// ownership of an object from an auto_ptr. - explicit ACE_Strong_Bound_Ptr (auto_ptr p); - - /// Copy constructor binds @c this and @a r to the same object. - ACE_Strong_Bound_Ptr (const ACE_Strong_Bound_Ptr &r); - - /// Constructor binds @c this and @a r to the same object. - ACE_Strong_Bound_Ptr (const ACE_Weak_Bound_Ptr &r); - - /// Copy constructor binds @c this and @a r to the same object if - /// Y* can be implicitly converted to X*. - template - ACE_Strong_Bound_Ptr (const ACE_Strong_Bound_Ptr &r) - : counter_ (r.counter_), - ptr_ (dynamic_cast(r.ptr_)) - { - // This ctor is temporarily defined here to increase our chances - // of being accepted by broken compilers. - // - COUNTER::attach_strong (this->counter_); - } - - /// Destructor. - ~ACE_Strong_Bound_Ptr (void); - - /// Assignment operator that binds @c this and @a r to the same object. - void operator = (const ACE_Strong_Bound_Ptr &r); - - /// Assignment operator that binds @c this and @a r to the same object. - void operator = (const ACE_Weak_Bound_Ptr &r); - - /// Assignment operator that binds @c this and @a r to the same object - /// if Y* can be implicitly converted to X*. - template - ACE_Weak_Bound_Ptr& - operator= (const ACE_Strong_Bound_Ptr &r) - { - // This operator is temporarily defined here to increase our chances - // of being accepted by broken compilers. - // - - // This will work if &r == this, by first increasing the ref count - - COUNTER *new_counter = r.counter_; - X* new_ptr = dynamic_cast (r.ptr_); - COUNTER::attach_strong (new_counter); - if (COUNTER::detach_strong (this->counter_) == 0) - delete this->ptr_; - this->counter_ = new_counter; - this->ptr_ = new_ptr; - - return *this; - } - - /// Equality operator that returns @c true if both - /// ACE_Strong_Bound_Ptr instances point to the same underlying - /// object. - /** - * @note It also returns @c true if both objects have just been - * instantiated and not used yet. - */ - bool operator == (const ACE_Strong_Bound_Ptr &r) const; - - /// Equality operator that returns true if the ACE_Strong_Bound_Ptr - /// and ACE_Weak_Bound_Ptr objects point to the same underlying - /// object. - /** - * @note It also returns @c true if both objects have just been - * instantiated and not used yet. - */ - bool operator == (const ACE_Weak_Bound_Ptr &r) const; - - /// Equality operator that returns @c true if the - /// ACE_Strong_Bound_Ptr and the raw pointer point to the same - /// underlying object. - bool operator == (X *p) const; - - /// Inequality operator, which is the opposite of equality. - bool operator != (const ACE_Strong_Bound_Ptr &r) const; - - /// Inequality operator, which is the opposite of equality. - bool operator != (const ACE_Weak_Bound_Ptr &r) const; - - /// Inequality operator, which is the opposite of equality. - bool operator != (X *p) const; - - /// Redirection operator - X *operator-> (void) const; - - /// Dereference operator - X &operator * (void) const; - - /// Get the pointer value. - X *get (void) const; - - /// Resets the ACE_Strong_Bound_Ptr to refer to a different - /// underlying object. - void reset (X *p = 0); - - /// Resets the ACE_Strong_Bound_Ptr to refer to a different - /// underlying object, ownership of which is stolen from the - /// auto_ptr. - void reset (auto_ptr p); - - /// Allows us to check for NULL on all ACE_Strong_Bound_Ptr - /// objects. - bool null (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - -private: - typedef X X_t; // This indirection is for Borland C++. - - friend class ACE_Weak_Bound_Ptr; - - template - friend class ACE_Strong_Bound_Ptr; - - /// The ACE_Bound_Ptr_Counter type. - typedef ACE_Bound_Ptr_Counter COUNTER; - - /// The reference counter. - COUNTER *counter_; - - /// The underlying object. - X *ptr_; -}; - -/** - * @class ACE_Weak_Bound_Ptr - * - * @brief This class implements support for a weak pointer that complements - * ACE_Strong_Bound_Ptr. - * - * Unlike ACE_Strong_Bound_Ptr, assigning or copying instances of an - * ACE_Weak_Bound_Ptr will not automatically increment the reference - * count of the underlying object. What ACE_Weak_Bound_Ptr does is - * preserve the knowledge that the object is in fact reference - * counted, and thus provides an alternative to raw pointers where - * non-ownership associations must be maintained. When the last - * instance of an ACE_Strong_Bound_Ptr that references a particular - * object is destroyed or overwritten, the corresponding - * ACE_Weak_Bound_Ptr instances are set to NULL. - */ -template -class ACE_Weak_Bound_Ptr -{ -public: - /// Constructor that initializes an ACE_Weak_Bound_Ptr to point to - /// the object \ immediately. - explicit ACE_Weak_Bound_Ptr (X *p = 0); - - /// Copy constructor binds @c this and @a r to the same object. - ACE_Weak_Bound_Ptr (const ACE_Weak_Bound_Ptr &r); - - /// Constructor binds @c this and @a r to the same object. - ACE_Weak_Bound_Ptr (const ACE_Strong_Bound_Ptr &r); - - /// Destructor. - ~ACE_Weak_Bound_Ptr (void); - - /// Assignment operator that binds @c this and @a r to the same object. - void operator = (const ACE_Weak_Bound_Ptr &r); - - /// Assignment operator that binds @c this and @a r to the same object. - void operator = (const ACE_Strong_Bound_Ptr &r); - - /// Equality operator that returns @c true if both - /// ACE_Weak_Bound_Ptr objects point to the same underlying object. - /** - * @note It also returns @c true if both objects have just been - * instantiated and not used yet. - */ - bool operator == (const ACE_Weak_Bound_Ptr &r) const; - - /// Equality operator that returns @c true if the ACE_Weak_Bound_Ptr - /// and ACE_Strong_Bound_Ptr objects point to the same underlying - /// object. - /** - * @note It also returns @c true if both objects have just been - * instantiated and not used yet. - */ - bool operator == (const ACE_Strong_Bound_Ptr &r) const; - - /// Equality operator that returns @c true if the ACE_Weak_Bound_Ptr - /// and the raw pointer point to the same underlying object. - bool operator == (X *p) const; - - /// Inequality operator, which is the opposite of equality. - bool operator != (const ACE_Weak_Bound_Ptr &r) const; - - /// Inequality operator, which is the opposite of equality. - bool operator != (const ACE_Strong_Bound_Ptr &r) const; - - /// Inequality operator, which is the opposite of equality. - bool operator != (X *p) const; - - /// Redirection operator. - /** - * It returns a temporary strong pointer and makes use of the - * chaining properties of operator-> to ensure that the underlying - * object does not disappear while you are using it. If you are - * certain of the lifetimes of the object, and do not want to incur - * the locking overhead, then use the unsafe_get method instead. - */ - ACE_Strong_Bound_Ptr operator-> (void) const; - - /// Obtain a strong pointer corresponding to this weak pointer. This - /// function is useful to create a temporary strong pointer for - /// conversion to a reference. - ACE_Strong_Bound_Ptr strong (void) const; - - /// Get the pointer value. Warning: this does not affect the - /// reference count of the underlying object, so it may disappear on - /// you while you are using it if you are not careful. - X *unsafe_get (void) const; - - /// Resets the ACE_Weak_Bound_Ptr to refer to a different underlying - /// object. - void reset (X *p = 0); - - /// Increment the reference count on the underlying object. - /** - * Returns the new reference count on the object. This function may - * be used to integrate the bound pointers into an external - * reference counting mechanism such as those used by COM or CORBA - * servants. - */ - long add_ref (void); - - /// Decrement the reference count on the underlying object, which is deleted - /// if the count has reached zero. - /** - * Returns the new reference count on the object. This function may - * be used to integrate the bound pointers into an external - * reference counting mechanism such as those used by COM or CORBA - * servants. - */ - long remove_ref (void); - - /// Allows us to check for NULL on all ACE_Weak_Bound_Ptr objects. - bool null (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - -private: - typedef X X_t; // This indirection is for Borland C++. - - friend class ACE_Strong_Bound_Ptr; - - /// The ACE_Bound_Ptr_Counter type. - typedef ACE_Bound_Ptr_Counter COUNTER; - - /// The reference counter. - COUNTER *counter_; - - /// The underlying object. - X *ptr_; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#include "ace/Bound_Ptr.inl" - -#include /**/ "ace/post.h" - -#endif /* ACE_BOUND_PTR_H */ diff --git a/modules/worldengine/deps/acelite/ace/Bound_Ptr.inl b/modules/worldengine/deps/acelite/ace/Bound_Ptr.inl deleted file mode 100644 index fb31747a4f..0000000000 --- a/modules/worldengine/deps/acelite/ace/Bound_Ptr.inl +++ /dev/null @@ -1,492 +0,0 @@ -/* -*- C++ -*- */ -// Bound_Ptr.i - -#include "ace/Guard_T.h" -#if !defined (ACE_NEW_THROWS_EXCEPTIONS) -# include "ace/Log_Category.h" -#endif /* ACE_NEW_THROWS_EXCEPTIONS */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -template inline ACE_Bound_Ptr_Counter * -ACE_Bound_Ptr_Counter::internal_create (long init_obj_ref_count) -{ - ACE_Bound_Ptr_Counter *temp = 0; - ACE_NEW_RETURN (temp, - ACE_Bound_Ptr_Counter (init_obj_ref_count), - 0); - return temp; -} - -template inline ACE_Bound_Ptr_Counter * -ACE_Bound_Ptr_Counter::create_strong (void) -{ - // Set initial object reference count to 1. - ACE_Bound_Ptr_Counter *temp = internal_create (1); -#if defined (ACE_NEW_THROWS_EXCEPTIONS) - if (temp == 0) - ACE_throw_bad_alloc; -#else - ACE_ASSERT (temp != 0); -#endif /* ACE_NEW_THROWS_EXCEPTIONS */ - return temp; -} - - - -template inline long -ACE_Bound_Ptr_Counter::attach_strong (ACE_Bound_Ptr_Counter* counter) -{ - ACE_GUARD_RETURN (ACE_LOCK, guard, counter->lock_, -1); - - // Can't attach a strong pointer to an object that has already been deleted. - if (counter->obj_ref_count_ == -1) - return -1; - - long new_obj_ref_count = ++counter->obj_ref_count_; - ++counter->self_ref_count_; - - return new_obj_ref_count; -} - -template inline long -ACE_Bound_Ptr_Counter::detach_strong (ACE_Bound_Ptr_Counter* counter) -{ - ACE_Bound_Ptr_Counter *counter_del = 0; - long new_obj_ref_count; - - { - ACE_GUARD_RETURN (ACE_LOCK, guard, counter->lock_, -1); - - if ((new_obj_ref_count = --counter->obj_ref_count_) == 0) - // Change the object reference count to -1 to indicate that the - // object has been deleted, as opposed to a weak pointer that - // simply hasn't had any strong pointers created from it yet. - counter->obj_ref_count_ = -1; - - if (--counter->self_ref_count_ == 0) - // Since counter contains the lock held by the guard, the - // guard needs to be released before freeing the memory holding - // the lock. So save the pointer to free, then release, then - // free. - counter_del = counter; - - } // Release the lock - - delete counter_del; - - return new_obj_ref_count; -} - -template inline ACE_Bound_Ptr_Counter * -ACE_Bound_Ptr_Counter::create_weak (void) -{ - // Set initial object reference count to 0. - - ACE_Bound_Ptr_Counter *temp = internal_create (0); -#if defined (ACE_NEW_THROWS_EXCEPTIONS) - if (temp == 0) - ACE_throw_bad_alloc; -#else - ACE_ASSERT (temp != 0); -#endif /* ACE_NEW_THROWS_EXCEPTIONS */ - return temp; -} - -template inline void -ACE_Bound_Ptr_Counter::attach_weak (ACE_Bound_Ptr_Counter* counter) -{ - ACE_GUARD (ACE_LOCK, guard, counter->lock_); - - ++counter->self_ref_count_; -} - -template inline void -ACE_Bound_Ptr_Counter::detach_weak (ACE_Bound_Ptr_Counter* counter) -{ - ACE_Bound_Ptr_Counter *counter_del = 0; - - { - ACE_GUARD (ACE_LOCK, guard, counter->lock_); - - if (--counter->self_ref_count_ == 0) - // Since counter contains the lock held by the guard, the - // guard needs to be released before freeing the memory holding - // the lock. So save the pointer to free, then release, then - // free. - counter_del = counter; - - } // Release the lock - - delete counter_del; -} - -template inline bool -ACE_Bound_Ptr_Counter::object_was_deleted (ACE_Bound_Ptr_Counter *counter) -{ - ACE_GUARD_RETURN (ACE_LOCK, guard, counter->lock_, 0); - - return counter->obj_ref_count_ == -1; -} - -template inline -ACE_Bound_Ptr_Counter::ACE_Bound_Ptr_Counter (long init_obj_ref_count) - : obj_ref_count_ (init_obj_ref_count), - self_ref_count_ (1) -{ -} - -template inline -ACE_Bound_Ptr_Counter::~ACE_Bound_Ptr_Counter (void) -{ -} - -template inline -ACE_Strong_Bound_Ptr::ACE_Strong_Bound_Ptr (X *p) - : counter_ (COUNTER::create_strong ()), - ptr_ (p) -{ -} - -template inline -ACE_Strong_Bound_Ptr::ACE_Strong_Bound_Ptr (auto_ptr p) - : counter_ (COUNTER::create_strong ()), - ptr_ (p.release()) -{ -} - -template inline -ACE_Strong_Bound_Ptr::ACE_Strong_Bound_Ptr (const ACE_Strong_Bound_Ptr &r) - : counter_ (r.counter_), - ptr_ (r.ptr_) -{ - COUNTER::attach_strong (this->counter_); -} - -template inline -ACE_Strong_Bound_Ptr::ACE_Strong_Bound_Ptr (const ACE_Weak_Bound_Ptr &r) - : counter_ (r.counter_), - ptr_ (r.ptr_) -{ - // When creating a strong pointer from a weak one we can't assume that the - // underlying object still exists. Therefore we must check for a return value - // of -1, which indicates that the object has been destroyed. - if (COUNTER::attach_strong (this->counter_) == -1) - { - // Underlying object has already been deleted, so set this pointer to null. - this->counter_ = COUNTER::create_strong (); - this->ptr_ = 0; - } -} - -template inline -ACE_Strong_Bound_Ptr::~ACE_Strong_Bound_Ptr (void) -{ - if (COUNTER::detach_strong (this->counter_) == 0) - delete this->ptr_; -} - -template inline void -ACE_Strong_Bound_Ptr::operator = (const ACE_Strong_Bound_Ptr &rhs) -{ - // This will work if &r == this, by first increasing the ref count, but - // why go through all that? - if (&rhs == this) - return; - - COUNTER *new_counter = rhs.counter_; - X_t *new_ptr = rhs.ptr_; - COUNTER::attach_strong (new_counter); - if (COUNTER::detach_strong (this->counter_) == 0) - delete this->ptr_; - this->counter_ = new_counter; - this->ptr_ = new_ptr; -} - -template inline void -ACE_Strong_Bound_Ptr::operator = (const ACE_Weak_Bound_Ptr &rhs) -{ - // This will work if &r == this, by first increasing the ref count, but - // why go through all that? - if (&rhs == this) - return; - - COUNTER *new_counter = rhs.counter_; - X_t *new_ptr = rhs.ptr_; - - // When creating a strong pointer from a weak one we can't assume that the - // underlying object still exists. Therefore we must check for a return value - // of -1, which indicates that the object has been destroyed. - if (COUNTER::attach_strong (new_counter) == -1) - { - // Underlying object has already been deleted, so set this pointer to null. - new_counter = COUNTER::create_strong (); - new_ptr = 0; - } - - if (COUNTER::detach_strong (this->counter_) == 0) - delete this->ptr_; - this->counter_ = new_counter; - this->ptr_ = new_ptr; -} - -template inline bool -ACE_Strong_Bound_Ptr::operator== (const ACE_Strong_Bound_Ptr &r) const -{ - return this->ptr_ == r.ptr_; -} - -template inline bool -ACE_Strong_Bound_Ptr::operator== (const ACE_Weak_Bound_Ptr &r) const -{ - // Use the weak pointer's operator== since it will check for null. - return r == *this; -} - -template inline bool -ACE_Strong_Bound_Ptr::operator== (X *p) const -{ - return this->ptr_ == p; -} - -template inline bool -ACE_Strong_Bound_Ptr::operator!= (const ACE_Strong_Bound_Ptr &r) const -{ - return this->ptr_ != r.ptr_; -} - -template inline bool -ACE_Strong_Bound_Ptr::operator!= (const ACE_Weak_Bound_Ptr &r) const -{ - // Use the weak pointer's operator!= since it will check for null. - return r != *this; -} - -template inline bool -ACE_Strong_Bound_Ptr::operator!= (X *p) const -{ - return this->ptr_ != p; -} - -template inline X * -ACE_Strong_Bound_Ptr::operator-> (void) const -{ - return this->ptr_; -} - -template inline X & -ACE_Strong_Bound_Ptr::operator *() const -{ - return *this->ptr_; -} - -template inline X* -ACE_Strong_Bound_Ptr::get (void) const -{ - return this->ptr_; -} - -template inline bool -ACE_Strong_Bound_Ptr::null (void) const -{ - return this->ptr_ == 0; -} - -template inline void -ACE_Strong_Bound_Ptr::reset (X *p) -{ - COUNTER *old_counter = this->counter_; - X_t *old_ptr = this->ptr_; - this->counter_ = COUNTER::create_strong (); - this->ptr_ = p; - if (COUNTER::detach_strong (old_counter) == 0) - delete old_ptr; -} - -template inline void -ACE_Strong_Bound_Ptr::reset (auto_ptr p) -{ - COUNTER *old_counter = this->counter_; - X_t *old_ptr = this->ptr_; - this->counter_ = COUNTER::create_strong (); - this->ptr_ = p.release (); - if (COUNTER::detach_strong (old_counter) == 0) - delete old_ptr; -} - -template inline -ACE_Weak_Bound_Ptr::ACE_Weak_Bound_Ptr (X *p) - : counter_ (COUNTER::create_weak ()), - ptr_ (p) -{ -} - -template inline -ACE_Weak_Bound_Ptr::ACE_Weak_Bound_Ptr (const ACE_Weak_Bound_Ptr &r) - : counter_ (r.counter_), - ptr_ (r.ptr_) -{ - COUNTER::attach_weak (this->counter_); -} - -template inline -ACE_Weak_Bound_Ptr::ACE_Weak_Bound_Ptr (const ACE_Strong_Bound_Ptr &r) - : counter_ (r.counter_), - ptr_ (r.ptr_) -{ - COUNTER::attach_weak (this->counter_); -} - -template inline -ACE_Weak_Bound_Ptr::~ACE_Weak_Bound_Ptr (void) -{ - COUNTER::detach_weak (this->counter_); -} - -template inline void -ACE_Weak_Bound_Ptr::operator = (const ACE_Weak_Bound_Ptr &rhs) -{ - // This will work if &rhs == this, by first increasing the ref count - COUNTER *new_counter = rhs.counter_; - COUNTER::attach_weak (new_counter); - COUNTER::detach_weak (this->counter_); - this->counter_ = new_counter; - this->ptr_ = rhs.ptr_; -} - -template inline void -ACE_Weak_Bound_Ptr::operator = (const ACE_Strong_Bound_Ptr &rhs) -{ - // This will work if &rhs == this, by first increasing the ref count - COUNTER *new_counter = rhs.counter_; - COUNTER::attach_weak (new_counter); - COUNTER::detach_weak (this->counter_); - this->counter_ = new_counter; - this->ptr_ = rhs.ptr_; -} - -template inline bool -ACE_Weak_Bound_Ptr::operator== (const ACE_Weak_Bound_Ptr &r) const -{ - // A weak pointer must behave as though it is automatically set to null - // if the underlying object has been deleted. - if (COUNTER::object_was_deleted (this->counter_)) - return r.ptr_ == 0; - - return this->ptr_ == r.ptr_; -} - -template inline bool -ACE_Weak_Bound_Ptr::operator== (const ACE_Strong_Bound_Ptr &r) const -{ - // A weak pointer must behave as though it is automatically set to null - // if the underlying object has been deleted. - if (COUNTER::object_was_deleted (this->counter_)) - return r.ptr_ == 0; - - return this->ptr_ == r.ptr_; -} - -template inline bool -ACE_Weak_Bound_Ptr::operator== (X *p) const -{ - // A weak pointer must behave as though it is automatically set to null - // if the underlying object has been deleted. - if (COUNTER::object_was_deleted (this->counter_)) - return p == 0; - - return this->ptr_ == p; -} - -template inline bool -ACE_Weak_Bound_Ptr::operator!= (const ACE_Weak_Bound_Ptr &r) const -{ - // A weak pointer must behave as though it is automatically set to null - // if the underlying object has been deleted. - if (COUNTER::object_was_deleted (this->counter_)) - return r.ptr_ != 0; - - return this->ptr_ != r.ptr_; -} - -template inline bool -ACE_Weak_Bound_Ptr::operator!= (const ACE_Strong_Bound_Ptr &r) const -{ - // A weak pointer must behave as though it is automatically set to null - // if the underlying object has been deleted. - if (COUNTER::object_was_deleted (this->counter_)) - return r.ptr_ != 0; - - return this->ptr_ != r.ptr_; -} - -template inline bool -ACE_Weak_Bound_Ptr::operator!= (X *p) const -{ - // A weak pointer must behave as though it is automatically set to null - // if the underlying object has been deleted. - if (COUNTER::object_was_deleted (this->counter_)) - return p != 0; - - return this->ptr_ != p; -} - -template inline ACE_Strong_Bound_Ptr -ACE_Weak_Bound_Ptr::operator-> (void) const -{ - return ACE_Strong_Bound_Ptr (*this); -} - -template inline ACE_Strong_Bound_Ptr -ACE_Weak_Bound_Ptr::strong (void) const -{ - return ACE_Strong_Bound_Ptr (*this); -} - -template inline X* -ACE_Weak_Bound_Ptr::unsafe_get (void) const -{ - // We do not check if the object has been deleted, since this operation - // is defined to be unsafe! - return this->ptr_; -} - -template inline bool -ACE_Weak_Bound_Ptr::null (void) const -{ - // A weak pointer must behave as though it is automatically set to null - // if the underlying object has been deleted. - if (COUNTER::object_was_deleted (this->counter_)) - return true; - - return this->ptr_ == 0; -} - -template inline void -ACE_Weak_Bound_Ptr::reset (X *p) -{ - COUNTER *old_counter = this->counter_; - this->counter_ = COUNTER::create_weak (); - this->ptr_ = p; - COUNTER::detach_weak (old_counter); -} - -template inline long -ACE_Weak_Bound_Ptr::add_ref () -{ - return COUNTER::attach_strong (counter_); -} - -template inline long -ACE_Weak_Bound_Ptr::remove_ref () -{ - long new_obj_ref_count = COUNTER::detach_strong (counter_); - if (new_obj_ref_count == 0) - { - delete this->ptr_; - this->ptr_ = 0; - } - return new_obj_ref_count; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/CDR_Base.cpp b/modules/worldengine/deps/acelite/ace/CDR_Base.cpp deleted file mode 100644 index b2ee413e98..0000000000 --- a/modules/worldengine/deps/acelite/ace/CDR_Base.cpp +++ /dev/null @@ -1,1659 +0,0 @@ -#include "ace/CDR_Base.h" - -#if !defined (__ACE_INLINE__) -# include "ace/CDR_Base.inl" -#endif /* ! __ACE_INLINE__ */ - -#include "ace/Message_Block.h" -#include "ace/OS_Memory.h" -#include "ace/OS_NS_string.h" - -#ifdef ACE_LACKS_IOSTREAM_TOTALLY -#include "ace/OS_NS_stdio.h" -#else -#include "ace/streams.h" -#endif - -#include -#include -#include -#include - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -#if defined (NONNATIVE_LONGDOUBLE) -static const ACE_INT16 max_eleven_bit = 0x3ff; -static const ACE_INT16 max_fifteen_bit = 0x3fff; -#endif /* NONNATIVE_LONGDOUBLE */ - -// -// See comments in CDR_Base.inl about optimization cases for swap_XX_array. -// - -void -ACE_CDR::swap_2_array (char const * orig, char* target, size_t n) -{ - // ACE_ASSERT(n > 0); The caller checks that n > 0 - - // We pretend that AMD64/GNU G++ systems have a Pentium CPU to - // take advantage of the inline assembly implementation. - - // Later, we try to read in 32 or 64 bit chunks, - // so make sure we don't do that for unaligned addresses. -#if ACE_SIZEOF_LONG == 8 && \ - !((defined(__amd64__) || defined (__x86_64__)) && defined(__GNUG__)) - char const * const o8 = ACE_ptr_align_binary (orig, 8); - while (orig < o8 && n > 0) - { - ACE_CDR::swap_2 (orig, target); - orig += 2; - target += 2; - --n; - } -#else - char const * const o4 = ACE_ptr_align_binary (orig, 4); - // this is an _if_, not a _while_. The mistmatch can only be by 2. - if (orig != o4) - { - ACE_CDR::swap_2 (orig, target); - orig += 2; - target += 2; - --n; - } -#endif - if (n == 0) - return; - - // - // Loop unrolling. Here be dragons. - // - - // (n & (~3)) is the greatest multiple of 4 not bigger than n. - // In the while loop ahead, orig will move over the array by 8 byte - // increments (4 elements of 2 bytes). - // end marks our barrier for not falling outside. - char const * const end = orig + 2 * (n & (~3)); - - // See if we're aligned for writting in 64 or 32 bit chunks... -#if ACE_SIZEOF_LONG == 8 && \ - !((defined(__amd64__) || defined (__x86_64__)) && defined(__GNUG__)) - if (target == ACE_ptr_align_binary (target, 8)) -#else - if (target == ACE_ptr_align_binary (target, 4)) -#endif - { - while (orig < end) - { -#if defined (ACE_HAS_INTEL_ASSEMBLY) - unsigned int a = - * reinterpret_cast (orig); - unsigned int b = - * reinterpret_cast (orig + 4); - asm ( "bswap %1" : "=r" (a) : "0" (a) ); - asm ( "bswap %1" : "=r" (b) : "0" (b) ); - asm ( "rol $16, %1" : "=r" (a) : "0" (a) ); - asm ( "rol $16, %1" : "=r" (b) : "0" (b) ); - * reinterpret_cast (target) = a; - * reinterpret_cast (target + 4) = b; -#elif defined(ACE_HAS_PENTIUM) \ - && (defined(_MSC_VER) || defined(__BORLANDC__)) \ - && !defined(ACE_LACKS_INLINE_ASSEMBLY) - __asm mov ecx, orig; - __asm mov edx, target; - __asm mov eax, [ecx]; - __asm mov ebx, 4[ecx]; - __asm bswap eax; - __asm bswap ebx; - __asm rol eax, 16; - __asm rol ebx, 16; - __asm mov [edx], eax; - __asm mov 4[edx], ebx; -#elif ACE_SIZEOF_LONG == 8 - // 64 bit architecture. - ACE_REGISTER unsigned long a = - * reinterpret_cast (orig); - - ACE_REGISTER unsigned long a1 = (a & 0x00ff00ff00ff00ffUL) << 8; - ACE_REGISTER unsigned long a2 = (a & 0xff00ff00ff00ff00UL) >> 8; - - a = (a1 | a2); - - * reinterpret_cast (target) = a; -#else - ACE_REGISTER ACE_UINT32 a = - * reinterpret_cast (orig); - ACE_REGISTER ACE_UINT32 b = - * reinterpret_cast (orig + 4); - - ACE_REGISTER ACE_UINT32 a1 = (a & 0x00ff00ffU) << 8; - ACE_REGISTER ACE_UINT32 b1 = (b & 0x00ff00ffU) << 8; - ACE_REGISTER ACE_UINT32 a2 = (a & 0xff00ff00U) >> 8; - ACE_REGISTER ACE_UINT32 b2 = (b & 0xff00ff00U) >> 8; - - a = (a1 | a2); - b = (b1 | b2); - - * reinterpret_cast (target) = a; - * reinterpret_cast (target + 4) = b; -#endif - orig += 8; - target += 8; - } - } - else - { - // We're out of luck. We have to write in 2 byte chunks. - while (orig < end) - { -#if defined (ACE_HAS_INTEL_ASSEMBLY) - unsigned int a = - * reinterpret_cast (orig); - unsigned int b = - * reinterpret_cast (orig + 4); - asm ( "bswap %1" : "=r" (a) : "0" (a) ); - asm ( "bswap %1" : "=r" (b) : "0" (b) ); - // We're little endian. - * reinterpret_cast (target + 2) - = (unsigned short) (a & 0xffff); - * reinterpret_cast (target + 6) - = (unsigned short) (b & 0xffff); - asm ( "shrl $16, %1" : "=r" (a) : "0" (a) ); - asm ( "shrl $16, %1" : "=r" (b) : "0" (b) ); - * reinterpret_cast (target + 0) - = (unsigned short) (a & 0xffff); - * reinterpret_cast (target + 4) - = (unsigned short) (b & 0xffff); -#elif defined (ACE_HAS_PENTIUM) \ - && (defined (_MSC_VER) || defined (__BORLANDC__)) \ - && !defined (ACE_LACKS_INLINE_ASSEMBLY) - __asm mov ecx, orig; - __asm mov edx, target; - __asm mov eax, [ecx]; - __asm mov ebx, 4[ecx]; - __asm bswap eax; - __asm bswap ebx; - // We're little endian. - __asm mov 2[edx], ax; - __asm mov 6[edx], bx; - __asm shr eax, 16; - __asm shr ebx, 16; - __asm mov 0[edx], ax; - __asm mov 4[edx], bx; -#elif ACE_SIZEOF_LONG == 8 - // 64 bit architecture. - ACE_REGISTER unsigned long a = - * reinterpret_cast (orig); - - ACE_REGISTER unsigned long a1 = (a & 0x00ff00ff00ff00ffUL) << 8; - ACE_REGISTER unsigned long a2 = (a & 0xff00ff00ff00ff00UL) >> 8; - - a = (a1 | a2); - - ACE_UINT16 b1 = static_cast (a >> 48); - ACE_UINT16 b2 = static_cast ((a >> 32) & 0xffff); - ACE_UINT16 b3 = static_cast ((a >> 16) & 0xffff); - ACE_UINT16 b4 = static_cast (a & 0xffff); - -#if defined(ACE_LITTLE_ENDIAN) - * reinterpret_cast (target) = b4; - * reinterpret_cast (target + 2) = b3; - * reinterpret_cast (target + 4) = b2; - * reinterpret_cast (target + 6) = b1; -#else - * reinterpret_cast (target) = b1; - * reinterpret_cast (target + 2) = b2; - * reinterpret_cast (target + 4) = b3; - * reinterpret_cast (target + 6) = b4; -#endif -#else - ACE_REGISTER ACE_UINT32 a = - * reinterpret_cast (orig); - ACE_REGISTER ACE_UINT32 b = - * reinterpret_cast (orig + 4); - - ACE_REGISTER ACE_UINT32 a1 = (a & 0x00ff00ff) << 8; - ACE_REGISTER ACE_UINT32 b1 = (b & 0x00ff00ff) << 8; - ACE_REGISTER ACE_UINT32 a2 = (a & 0xff00ff00) >> 8; - ACE_REGISTER ACE_UINT32 b2 = (b & 0xff00ff00) >> 8; - - a = (a1 | a2); - b = (b1 | b2); - - ACE_UINT32 c1 = static_cast (a >> 16); - ACE_UINT32 c2 = static_cast (a & 0xffff); - ACE_UINT32 c3 = static_cast (b >> 16); - ACE_UINT32 c4 = static_cast (b & 0xffff); - -#if defined(ACE_LITTLE_ENDIAN) - * reinterpret_cast (target) = c2; - * reinterpret_cast (target + 2) = c1; - * reinterpret_cast (target + 4) = c4; - * reinterpret_cast (target + 6) = c3; -#else - * reinterpret_cast (target) = c1; - * reinterpret_cast (target + 2) = c2; - * reinterpret_cast (target + 4) = c3; - * reinterpret_cast (target + 6) = c4; -#endif -#endif - - orig += 8; - target += 8; - } - } - - // (n & 3) == (n % 4). - switch (n&3) { - case 3: - ACE_CDR::swap_2 (orig, target); - orig += 2; - target += 2; - case 2: - ACE_CDR::swap_2 (orig, target); - orig += 2; - target += 2; - case 1: - ACE_CDR::swap_2 (orig, target); - } -} - -void -ACE_CDR::swap_4_array (char const * orig, char* target, size_t n) -{ - // ACE_ASSERT (n > 0); The caller checks that n > 0 - -#if ACE_SIZEOF_LONG == 8 - // Later, we read from *orig in 64 bit chunks, - // so make sure we don't generate unaligned readings. - char const * const o8 = ACE_ptr_align_binary (orig, 8); - // The mismatch can only be by 4. - if (orig != o8) - { - ACE_CDR::swap_4 (orig, target); - orig += 4; - target += 4; - --n; - } -#endif /* ACE_SIZEOF_LONG == 8 */ - - if (n == 0) - return; - - // - // Loop unrolling. Here be dragons. - // - - // (n & (~3)) is the greatest multiple of 4 not bigger than n. - // In the while loop, orig will move over the array by 16 byte - // increments (4 elements of 4 bytes). - // ends marks our barrier for not falling outside. - char const * const end = orig + 4 * (n & (~3)); - -#if ACE_SIZEOF_LONG == 8 - // 64 bits architecture. - // See if we can write in 8 byte chunks. - if (target == ACE_ptr_align_binary (target, 8)) - { - while (orig < end) - { - ACE_REGISTER unsigned long a = - * reinterpret_cast (orig); - ACE_REGISTER unsigned long b = - * reinterpret_cast (orig + 8); - -#if defined(ACE_HAS_INTEL_ASSEMBLY) - asm ("bswapq %1" : "=r" (a) : "0" (a)); - asm ("bswapq %1" : "=r" (b) : "0" (b)); - asm ("rol $32, %1" : "=r" (a) : "0" (a)); - asm ("rol $32, %1" : "=r" (b) : "0" (b)); -#else - ACE_REGISTER unsigned long a84 = (a & 0x000000ff000000ffL) << 24; - ACE_REGISTER unsigned long b84 = (b & 0x000000ff000000ffL) << 24; - ACE_REGISTER unsigned long a73 = (a & 0x0000ff000000ff00L) << 8; - ACE_REGISTER unsigned long b73 = (b & 0x0000ff000000ff00L) << 8; - ACE_REGISTER unsigned long a62 = (a & 0x00ff000000ff0000L) >> 8; - ACE_REGISTER unsigned long b62 = (b & 0x00ff000000ff0000L) >> 8; - ACE_REGISTER unsigned long a51 = (a & 0xff000000ff000000L) >> 24; - ACE_REGISTER unsigned long b51 = (b & 0xff000000ff000000L) >> 24; - - a = (a84 | a73 | a62 | a51); - b = (b84 | b73 | b62 | b51); -#endif - - * reinterpret_cast (target) = a; - * reinterpret_cast (target + 8) = b; - - orig += 16; - target += 16; - } - } - else - { - // We are out of luck, we have to write in 4 byte chunks. - while (orig < end) - { - ACE_REGISTER unsigned long a = - * reinterpret_cast (orig); - ACE_REGISTER unsigned long b = - * reinterpret_cast (orig + 8); - -#if defined(ACE_HAS_INTEL_ASSEMBLY) - asm ("bswapq %1" : "=r" (a) : "0" (a)); - asm ("bswapq %1" : "=r" (b) : "0" (b)); - asm ("rol $32, %1" : "=r" (a) : "0" (a)); - asm ("rol $32, %1" : "=r" (b) : "0" (b)); -#else - ACE_REGISTER unsigned long a84 = (a & 0x000000ff000000ffL) << 24; - ACE_REGISTER unsigned long b84 = (b & 0x000000ff000000ffL) << 24; - ACE_REGISTER unsigned long a73 = (a & 0x0000ff000000ff00L) << 8; - ACE_REGISTER unsigned long b73 = (b & 0x0000ff000000ff00L) << 8; - ACE_REGISTER unsigned long a62 = (a & 0x00ff000000ff0000L) >> 8; - ACE_REGISTER unsigned long b62 = (b & 0x00ff000000ff0000L) >> 8; - ACE_REGISTER unsigned long a51 = (a & 0xff000000ff000000L) >> 24; - ACE_REGISTER unsigned long b51 = (b & 0xff000000ff000000L) >> 24; - - a = (a84 | a73 | a62 | a51); - b = (b84 | b73 | b62 | b51); -#endif - - ACE_UINT32 c1 = static_cast (a >> 32); - ACE_UINT32 c2 = static_cast (a & 0xffffffff); - ACE_UINT32 c3 = static_cast (b >> 32); - ACE_UINT32 c4 = static_cast (b & 0xffffffff); - -#if defined (ACE_LITTLE_ENDIAN) - * reinterpret_cast (target + 0) = c2; - * reinterpret_cast (target + 4) = c1; - * reinterpret_cast (target + 8) = c4; - * reinterpret_cast (target + 12) = c3; -#else - * reinterpret_cast (target + 0) = c1; - * reinterpret_cast (target + 4) = c2; - * reinterpret_cast (target + 8) = c3; - * reinterpret_cast (target + 12) = c4; -#endif - orig += 16; - target += 16; - } - } - -#else /* ACE_SIZEOF_LONG != 8 */ - - while (orig < end) - { -#if defined (ACE_HAS_PENTIUM) && defined (__GNUG__) - ACE_REGISTER unsigned int a = - *reinterpret_cast (orig); - ACE_REGISTER unsigned int b = - *reinterpret_cast (orig + 4); - ACE_REGISTER unsigned int c = - *reinterpret_cast (orig + 8); - ACE_REGISTER unsigned int d = - *reinterpret_cast (orig + 12); - - asm ("bswap %1" : "=r" (a) : "0" (a)); - asm ("bswap %1" : "=r" (b) : "0" (b)); - asm ("bswap %1" : "=r" (c) : "0" (c)); - asm ("bswap %1" : "=r" (d) : "0" (d)); - - *reinterpret_cast (target) = a; - *reinterpret_cast (target + 4) = b; - *reinterpret_cast (target + 8) = c; - *reinterpret_cast (target + 12) = d; -#elif defined (ACE_HAS_PENTIUM) \ - && (defined (_MSC_VER) || defined (__BORLANDC__)) \ - && !defined (ACE_LACKS_INLINE_ASSEMBLY) - __asm mov eax, orig - __asm mov esi, target - __asm mov edx, [eax] - __asm mov ecx, 4[eax] - __asm mov ebx, 8[eax] - __asm mov eax, 12[eax] - __asm bswap edx - __asm bswap ecx - __asm bswap ebx - __asm bswap eax - __asm mov [esi], edx - __asm mov 4[esi], ecx - __asm mov 8[esi], ebx - __asm mov 12[esi], eax -#else - ACE_REGISTER ACE_UINT32 a = - * reinterpret_cast (orig); - ACE_REGISTER ACE_UINT32 b = - * reinterpret_cast (orig + 4); - ACE_REGISTER ACE_UINT32 c = - * reinterpret_cast (orig + 8); - ACE_REGISTER ACE_UINT32 d = - * reinterpret_cast (orig + 12); - - // Expect the optimizer reordering this A LOT. - // We leave it this way for clarity. - a = (a << 24) | ((a & 0xff00) << 8) | ((a & 0xff0000) >> 8) | (a >> 24); - b = (b << 24) | ((b & 0xff00) << 8) | ((b & 0xff0000) >> 8) | (b >> 24); - c = (c << 24) | ((c & 0xff00) << 8) | ((c & 0xff0000) >> 8) | (c >> 24); - d = (d << 24) | ((d & 0xff00) << 8) | ((d & 0xff0000) >> 8) | (d >> 24); - - * reinterpret_cast (target) = a; - * reinterpret_cast (target + 4) = b; - * reinterpret_cast (target + 8) = c; - * reinterpret_cast (target + 12) = d; -#endif - - orig += 16; - target += 16; - } - -#endif /* ACE_SIZEOF_LONG == 8 */ - - // (n & 3) == (n % 4). - switch (n & 3) { - case 3: - ACE_CDR::swap_4 (orig, target); - orig += 4; - target += 4; - case 2: - ACE_CDR::swap_4 (orig, target); - orig += 4; - target += 4; - case 1: - ACE_CDR::swap_4 (orig, target); - } -} - -// -// We don't benefit from unrolling in swap_8_array and swap_16_array -// (swap_8 and swap_16 are big enough). -// -void -ACE_CDR::swap_8_array (char const * orig, char* target, size_t n) -{ - // ACE_ASSERT(n > 0); The caller checks that n > 0 - - char const * const end = orig + 8*n; - while (orig < end) - { - swap_8 (orig, target); - orig += 8; - target += 8; - } -} - -void -ACE_CDR::swap_16_array (char const * orig, char* target, size_t n) -{ - // ACE_ASSERT(n > 0); The caller checks that n > 0 - - char const * const end = orig + 16*n; - while (orig < end) - { - swap_16 (orig, target); - orig += 16; - target += 16; - } -} - -void -ACE_CDR::mb_align (ACE_Message_Block *mb) -{ -#if !defined (ACE_CDR_IGNORE_ALIGNMENT) - char * const start = ACE_ptr_align_binary (mb->base (), - ACE_CDR::MAX_ALIGNMENT); -#else - char * const start = mb->base (); -#endif /* ACE_CDR_IGNORE_ALIGNMENT */ - mb->rd_ptr (start); - mb->wr_ptr (start); -} - -int -ACE_CDR::grow (ACE_Message_Block *mb, size_t minsize) -{ - size_t newsize = - ACE_CDR::first_size (minsize + ACE_CDR::MAX_ALIGNMENT); - - if (newsize <= mb->size ()) - return 0; - - ACE_Data_Block *db = - mb->data_block ()->clone_nocopy (0, newsize); - - if (db == 0) - return -1; - - // Do the equivalent of ACE_CDR::mb_align() here to avoid having - // to allocate an ACE_Message_Block on the stack thereby avoiding - // the manipulation of the data blocks reference count - size_t mb_len = mb->length (); - char *start = ACE_ptr_align_binary (db->base (), - ACE_CDR::MAX_ALIGNMENT); - - ACE_OS::memcpy (start, mb->rd_ptr (), mb_len); - mb->data_block (db); - - // Setting the data block on the mb resets the read and write - // pointers back to the beginning. We must set the rd_ptr to the - // aligned start and adjust the write pointer to the end - mb->rd_ptr (start); - mb->wr_ptr (start + mb_len); - - // Remove the DONT_DELETE flags from mb - mb->clr_self_flags (ACE_Message_Block::DONT_DELETE); - - return 0; -} - -size_t -ACE_CDR::total_length (const ACE_Message_Block* begin, - const ACE_Message_Block* end) -{ - size_t l = 0; - // Compute the total size. - for (const ACE_Message_Block *i = begin; - i != end; - i = i->cont ()) - l += i->length (); - return l; -} - -int -ACE_CDR::consolidate (ACE_Message_Block *dst, - const ACE_Message_Block *src) -{ - if (src == 0) - return 0; - - size_t const newsize = - ACE_CDR::first_size (ACE_CDR::total_length (src, 0) - + ACE_CDR::MAX_ALIGNMENT); - - if (dst->size (newsize) == -1) - return -1; - -#if !defined (ACE_CDR_IGNORE_ALIGNMENT) - // We must copy the contents of src into the new buffer, but - // respecting the alignment. - ptrdiff_t srcalign = - ptrdiff_t(src->rd_ptr ()) % ACE_CDR::MAX_ALIGNMENT; - ptrdiff_t dstalign = - ptrdiff_t(dst->rd_ptr ()) % ACE_CDR::MAX_ALIGNMENT; - ptrdiff_t offset = srcalign - dstalign; - if (offset < 0) - offset += ACE_CDR::MAX_ALIGNMENT; - dst->rd_ptr (static_cast (offset)); - dst->wr_ptr (dst->rd_ptr ()); -#endif /* ACE_CDR_IGNORE_ALIGNMENT */ - - for (const ACE_Message_Block* i = src; - i != 0; - i = i->cont ()) - { - // If the destination and source are the same, do not - // attempt to copy the data. Just update the write pointer. - if (dst->wr_ptr () != i->rd_ptr ()) - dst->copy (i->rd_ptr (), i->length ()); - else - dst->wr_ptr (i->length ()); - } - return 0; -} - -#if defined (NONNATIVE_LONGLONG) -bool -ACE_CDR::LongLong::operator== (const ACE_CDR::LongLong &rhs) const -{ - return this->h == rhs.h && this->l == rhs.l; -} - -bool -ACE_CDR::LongLong::operator!= (const ACE_CDR::LongLong &rhs) const -{ - return this->l != rhs.l || this->h != rhs.h; -} - -#endif /* NONNATIVE_LONGLONG */ - -#if defined (NONNATIVE_LONGDOUBLE) -ACE_CDR::LongDouble& -ACE_CDR::LongDouble::assign (const ACE_CDR::LongDouble::NativeImpl& rhs) -{ - ACE_OS::memset (this->ld, 0, sizeof (this->ld)); - - if (sizeof (rhs) == 8) - { -#if defined (ACE_LITTLE_ENDIAN) - static const size_t byte_zero = 1; - static const size_t byte_one = 0; - char rhs_ptr[16]; - ACE_CDR::swap_8 (reinterpret_cast (&rhs), rhs_ptr); -#else - static const size_t byte_zero = 0; - static const size_t byte_one = 1; - const char* rhs_ptr = reinterpret_cast (&rhs); -#endif - ACE_INT16 sign = static_cast ( - static_cast (rhs_ptr[0])) & 0x8000; - ACE_INT16 exponent = ((rhs_ptr[0] & 0x7f) << 4) | - ((rhs_ptr[1] >> 4) & 0xf); - const char* exp_ptr = reinterpret_cast (&exponent); - - // Infinity and NaN have an exponent of 0x7ff in 64-bit IEEE - if (exponent == 0x7ff) - { - exponent = 0x7fff; - } - else if (exponent) // exponent 0 stays 0 in 128-bit - { - exponent = (exponent - max_eleven_bit) + max_fifteen_bit; - } - exponent |= sign; - - // Store the sign bit and exponent - this->ld[0] = exp_ptr[byte_zero]; - this->ld[1] = exp_ptr[byte_one]; - - // Store the mantissa. In an 8 byte double, it is split by - // 4 bits (because of the 12 bits for sign and exponent), so - // we have to shift and or the rhs to get the right bytes. - size_t li = 2; - bool direction = true; - for (size_t ri = 1; ri < sizeof (rhs);) - { - if (direction) - { - this->ld[li] |= ((rhs_ptr[ri] << 4) & 0xf0); - direction = false; - ++ri; - } - else - { - this->ld[li] |= ((rhs_ptr[ri] >> 4) & 0xf); - direction = true; - ++li; - } - } -#if defined (ACE_LITTLE_ENDIAN) - ACE_OS::memcpy (rhs_ptr, this->ld, sizeof (this->ld)); - ACE_CDR::swap_16 (rhs_ptr, this->ld); -#endif - } - else - { - ACE_OS::memcpy(this->ld, - reinterpret_cast (&rhs), sizeof (rhs)); - } - return *this; -} - -ACE_CDR::LongDouble& -ACE_CDR::LongDouble::assign (const ACE_CDR::LongDouble& rhs) -{ - if (this != &rhs) - *this = rhs; - return *this; -} - -bool -ACE_CDR::LongDouble::operator== (const ACE_CDR::LongDouble &rhs) const -{ - return ACE_OS::memcmp (this->ld, rhs.ld, 16) == 0; -} - -bool -ACE_CDR::LongDouble::operator!= (const ACE_CDR::LongDouble &rhs) const -{ - return ACE_OS::memcmp (this->ld, rhs.ld, 16) != 0; -} - -ACE_CDR::LongDouble::operator ACE_CDR::LongDouble::NativeImpl () const -{ - ACE_CDR::LongDouble::NativeImpl ret = 0.0; - char* lhs_ptr = reinterpret_cast (&ret); - - if (sizeof (ret) == 8) - { -#if defined (ACE_LITTLE_ENDIAN) - static const size_t byte_zero = 1; - static const size_t byte_one = 0; - char copy[16]; - ACE_CDR::swap_16 (this->ld, copy); -#else - static const size_t byte_zero = 0; - static const size_t byte_one = 1; - const char* copy = this->ld; -#endif - ACE_INT16 exponent = 0; - char* exp_ptr = reinterpret_cast (&exponent); - exp_ptr[byte_zero] = copy[0]; - exp_ptr[byte_one] = copy[1]; - - ACE_INT16 sign = (exponent & 0x8000); - exponent &= 0x7fff; - - // Infinity and NaN have an exponent of 0x7fff in 128-bit IEEE - if (exponent == 0x7fff) - { - exponent = 0x7ff; - } - else if (exponent) // exponent 0 stays 0 in 64-bit - { - exponent = (exponent - max_fifteen_bit) + max_eleven_bit; - } - exponent = (exponent << 4) | sign; - - // Store the sign and exponent - lhs_ptr[0] = exp_ptr[byte_zero]; - lhs_ptr[1] = exp_ptr[byte_one]; - - // Store the mantissa. In an 8 byte double, it is split by - // 4 bits (because of the 12 bits for sign and exponent), so - // we have to shift and or the rhs to get the right bytes. - size_t li = 1; - bool direction = true; - for (size_t ri = 2; li < sizeof (ret);) { - if (direction) - { - lhs_ptr[li] |= ((copy[ri] >> 4) & 0xf); - direction = false; - ++li; - } - else - { - lhs_ptr[li] |= ((copy[ri] & 0xf) << 4); - direction = true; - ++ri; - } - } - -#if defined (ACE_LITTLE_ENDIAN) - ACE_CDR::swap_8 (lhs_ptr, lhs_ptr); -#endif - } - else - { - ACE_OS::memcpy(lhs_ptr, this->ld, sizeof (ret)); - } - - // This bit of code is unnecessary. However, this code is - // necessary to work around a bug in the gcc 4.1.1 optimizer. - ACE_CDR::LongDouble tmp; - tmp.assign (ret); - - return ret; -} -#endif /* NONNATIVE_LONGDOUBLE */ - - -// ACE_CDR::Fixed - -ACE_CDR::Fixed ACE_CDR::Fixed::from_integer (ACE_CDR::LongLong val) -{ - Fixed f; - f.value_[15] = (val < 0) ? NEGATIVE : POSITIVE; - f.digits_ = 0; - f.scale_ = 0; - bool high = true; - int idx = 15; - while (true) - { - const int mod = static_cast (val % 10); - const unsigned int digit = (mod < 0) ? -mod : mod; - if (high) - f.value_[idx--] |= digit << 4; - else - f.value_[idx] = digit; - high = !high; - ++f.digits_; - if (val >= 10 || val <= -10) - val /= 10; - else - break; - } - - ACE_OS::memset (f.value_, 0, idx + !high); - return f; -} - -ACE_CDR::Fixed ACE_CDR::Fixed::from_integer (ACE_CDR::ULongLong val) -{ - Fixed f; - f.value_[15] = POSITIVE; - f.digits_ = 0; - f.scale_ = 0; - bool high = true; - int idx = 15; - while (true) - { - const unsigned int digit = val % 10; - if (high) - f.value_[idx--] |= digit << 4; - else - f.value_[idx] = digit; - high = !high; - ++f.digits_; - if (val >= 10) - val /= 10; - else - break; - } - - ACE_OS::memset (f.value_, 0, idx + !high); - return f; -} - -ACE_CDR::Fixed ACE_CDR::Fixed::from_floating (LongDouble val) -{ -#ifdef ACE_OPENVMS - typedef double BigFloat; -#elif defined NONNATIVE_LONGDOUBLE - typedef LongDouble::NativeImpl BigFloat; -#else - typedef LongDouble BigFloat; -#endif - - Fixed f; - f.digits_ = 0; - bool negative = false; - if (val < 0) - { - val *= -1; - negative = true; - } - - // How many digits are to the left of the decimal point? - const size_t digits_left = - static_cast (1 + ((val > 0) ? std::log10 (val) : 0)); - if (digits_left > MAX_DIGITS) - return f; - - f.digits_ = MAX_DIGITS; - f.scale_ = 0; - BigFloat int_part; - BigFloat frac_part = std::modf (val, &int_part); - - // Insert the integer part from least to most significant - int idx = (static_cast (digits_left) + 1) / 2 - 1; - bool high = digits_left % 2; - if (idx >= 0) - f.value_[idx] = 0; - for (size_t i = 0; i < digits_left; ++i, high = !high) - { - const Octet digit = static_cast (std::fmod (int_part, 10)); - if (high) - f.value_[idx--] |= digit << 4; - else - f.value_[idx] = digit; - int_part /= 10; - } - - // Insert the fractional part from most to least significant - idx = static_cast (digits_left / 2); - high = digits_left % 2 == 0; - for (size_t i = digits_left; i < MAX_DIGITS; ++i, high = !high) - { - frac_part *= 10; - const Octet digit = static_cast (frac_part); - frac_part -= digit; - if (high) - f.value_[idx] = digit << 4; - else - f.value_[idx++] |= digit; - } - - if (frac_part >= 0.5) - ++f; // scale set after here so that ++ applies to the fractional part - - f.scale_ = static_cast (MAX_DIGITS - digits_left); - f.normalize (); - f.value_[15] |= negative ? NEGATIVE : POSITIVE; - return f; -} - -void ACE_CDR::Fixed::normalize (UShort min_scale) -{ - if (this->value_[15] & 0xf0 || !this->scale_) - return; - - size_t bytes = 0; // number of bytes to shift down - while (2 * (bytes + 1) < this->scale_ - && this->scale_ - 2 * (bytes + 1) >= min_scale - && !this->value_[14 - bytes]) - ++bytes; - - const bool extra_nibble = 2 * (bytes + 1) <= this->scale_ - && this->scale_ - 2 * (bytes + 1) >= min_scale - && !(this->value_[14 - bytes] & 0xf); - const size_t nibbles = 1 /*[15].high*/ + bytes * 2 + extra_nibble; - this->digits_ -= static_cast (nibbles); - this->scale_ -= static_cast (nibbles); - - if (extra_nibble) - { - const bool sign = this->sign (); - std::memmove (this->value_ + bytes + 1, this->value_, 15 - bytes); - std::memset (this->value_, 0, bytes + 1); - this->value_[15] |= sign ? NEGATIVE : POSITIVE; - } - else - { - this->value_[15] = (this->value_[14 - bytes] & 0xf) << 4 - | (this->value_[15] & 0xf); - for (size_t i = 14; i > bytes; --i) - this->value_[i] = (this->value_[i - bytes - 1] & 0xf) << 4 - | (this->value_[i - bytes] >> 4); - this->value_[bytes] = this->value_[0] >> 4; - std::memset (this->value_, 0, bytes); - } -} - -ACE_CDR::Fixed ACE_CDR::Fixed::from_string (const char *str) -{ - const bool negative = str && *str == '-'; - if (negative || (str && *str == '+')) - ++str; - - const size_t span = ACE_OS::strspn (str, ".0123456789"); - - Fixed f; - f.value_[15] = negative ? NEGATIVE : POSITIVE; - f.digits_ = 0; - f.scale_ = 0; - - int idx = 15; - bool high = true; - for (size_t iter = span; iter && f.digits_ < MAX_DIGITS; --iter, high = !high) - { - if (str[iter - 1] == '.') - { - f.scale_ = static_cast (span - iter); - if (--iter == 0) - break; // skip '.' - } - - const unsigned int digit = str[iter - 1] - '0'; - if (high) - f.value_[idx--] |= digit << 4; - else - f.value_[idx] = digit; - ++f.digits_; - } - - if (!f.scale_ && str[span - f.digits_ - 1] == '.') - f.scale_ = f.digits_; - - if (idx >= 0) - ACE_OS::memset (f.value_, 0, idx + !high); - return f; -} - -ACE_CDR::Fixed ACE_CDR::Fixed::from_octets (const Octet *array, int len, - unsigned int scale) -{ - Fixed f; - ACE_OS::memcpy (f.value_ + 16 - len, array, len); - ACE_OS::memset (f.value_, 0, 16 - len); - f.scale_ = scale; - - f.digits_ = len * 2 - 1; - if (len > 1 && (array[0] >> 4) == 0) - --f.digits_; - - return f; -} - -ACE_CDR::Fixed::operator ACE_CDR::LongLong () const -{ - LongLong val (0); - - for (int i = this->digits_ - 1; i >= this->scale_; --i) - val = 10 * val + this->digit (i); - - if (this->sign ()) - val *= -1; - - return val; -} - -ACE_CDR::Fixed::operator ACE_CDR::LongDouble () const -{ - LongDouble val = ACE_CDR_LONG_DOUBLE_INITIALIZER; - - for (int i = this->digits_ - 1; i >= this->scale_; --i) - ACE_CDR_LONG_DOUBLE_ASSIGNMENT (val, 10 * val + this->digit (i)); - - for (int i = this->scale_ - 1; i >= 0; --i) - val += this->digit (i) * std::pow (10.0l, i - this->scale_); - - if (this->sign ()) - val *= -1; - - return val; -} - -ACE_CDR::Fixed ACE_CDR::Fixed::round (UShort scale) const -{ - Fixed f = *this; - if (scale < f.scale_) - { - for (UShort i = 0; i < f.scale_ - scale; ++i) - f.digit (i, 0); - f.normalize (scale); - const bool negative = f.sign (); - if (negative) - f.value_[15] = (f.value_[15] & 0xf0) | POSITIVE; - if (this->digit (this->scale_ - scale - 1) >= 5) - { - f.scale_ = 0; - ++f; - f.scale_ = static_cast (scale); - } - if (negative && !!f) - f.value_[15] = (f.value_[15] & 0xf0) | NEGATIVE; - } - return f; -} - -ACE_CDR::Fixed ACE_CDR::Fixed::truncate (UShort scale) const -{ - Fixed f = *this; - if (scale < f.scale_) - { - for (UShort i = 0; i < f.scale_ - scale; ++i) - f.digit (i, 0); - f.normalize (scale); - if (f.sign ()) - { - f.value_[15] = (f.value_[15] & 0xf0) | POSITIVE; - if (!!f) - f.value_[15] = (f.value_[15] & 0xf0) | NEGATIVE; - } - } - return f; -} - -namespace { - struct BufferAppender - { - BufferAppender (char *buffer, size_t buffer_size) - : buffer_ (buffer), buffer_size_ (buffer_size), idx_ (0) {} - - bool operator+= (char ch) - { - if (this->idx_ == this->buffer_size_ - 1) - return false; - this->buffer_[this->idx_++] = ch; - return true; - } - - char *const buffer_; - const size_t buffer_size_; - size_t idx_; - }; -} - -bool ACE_CDR::Fixed::to_string (char *buffer, size_t buffer_size) const -{ - if (!buffer || buffer_size < 2) - return false; - - const bool negative = this->sign (); - if (negative) - *buffer = '-'; - BufferAppender ba (buffer + negative, buffer_size - negative); - - for (int i = 15 - this->digits_ / 2; i < 16; ++i) - { - const Octet high = this->value_[i] >> 4, low = this->value_[i] & 0xf; - - if ((15 - i) * 2 != this->digits_) - { - if (this->scale_ == 1 + 2 * (15 - i)) - { - if (!ba.idx_ && !(ba += '0')) - return false; - - if (!(ba += '.')) - return false; - } - - if ((ba.idx_ || high) && !(ba += '0' + high)) - return false; - } - - if (this->scale_ && this->scale_ == 2 * (15 - i)) - { - if (!ba.idx_ && !(ba += '0')) - return false; - - if (!(ba += '.')) - return false; - } - - if (i < 15 && (ba.idx_ || low) && !(ba += '0' + low)) - return false; - } - - if (!ba.idx_ && !(ba += '0')) - return false; - - buffer[ba.idx_ + negative] = 0; - return true; -} - -const ACE_CDR::Octet *ACE_CDR::Fixed::to_octets (int &n) const -{ - n = (this->digits_ + 2) / 2; - return 16 - n + reinterpret_cast (this->value_); -} - -ACE_CDR::Fixed::ConstIterator ACE_CDR::Fixed::pre_add (const ACE_CDR::Fixed &f) -{ - ConstIterator rhs_iter = f.begin (); - if (f.scale_ > this->scale_) - { - const int scale_diff = f.scale_ - this->scale_; - rhs_iter += scale_diff - this->lshift (scale_diff); - } - - if (f.digits_ - f.scale_ > this->digits_ - this->scale_) - { - this->digits_ += f.digits_ - f.scale_ - this->digits_ + this->scale_; - if (this->digits_ > MAX_DIGITS) - { - for (size_t i = 0; i < static_cast (this->digits_ - MAX_DIGITS); ++i) - this->digit (static_cast (i), 0); - this->normalize (this->scale_ - MAX_DIGITS - this->digits_); - this->digits_ = MAX_DIGITS; - } - } - return rhs_iter; -} - -ACE_CDR::Fixed &ACE_CDR::Fixed::operator+= (const Fixed &rhs) -{ - if (!this->sign () && rhs.sign ()) - return *this -= -rhs; - - if (this->sign () && !rhs.sign ()) - { - Fixed negated = -*this; - negated -= rhs; - return *this = -negated; - } - - ConstIterator rhs_iter = this->pre_add (rhs); - - Iterator lhs_iter = this->begin (); - if (this->scale_ > rhs.scale_) - lhs_iter += this->scale_ - rhs.scale_; - - bool carry = false; - for (; rhs_iter != rhs.end (); ++lhs_iter, ++rhs_iter) - { - const Octet digit = *lhs_iter + *rhs_iter + carry; - carry = digit > 9; - *lhs_iter = digit - (carry ? 10 : 0); - } - - if (carry) - { - if (this->digits_ < MAX_DIGITS) - { - *lhs_iter = 1; - ++this->digits_; - } - else if (this->scale_) - { - this->digit (0, 0); - this->normalize (this->scale_ - 1); - this->digit (MAX_DIGITS - 1, 1); - } - } - - return *this; -} - -int ACE_CDR::Fixed::lshift (int digits) -{ - int bytes = 0; - for (; bytes < digits / 2; ++bytes) - if (this->value_[bytes]) - break; - - int shifted = 0; - if ((digits % 2) && !(this->value_[bytes] & 0xf0)) - { - for (int i = 0; i < 15 - bytes; ++i) - this->value_[i] = (this->value_[i + bytes] & 0xf) << 4 - | (this->value_[i + bytes + 1] >> 4); - std::memset (this->value_ + 15 - bytes, 0, bytes); - this->value_[15] &= 0xf; - shifted = 2 * bytes + 1; - } - else if (bytes) - { - std::memmove (this->value_, this->value_ + bytes, 16 - bytes); - this->value_[15] &= 0xf; - std::memset (this->value_ + 16 - bytes, 0, bytes - 1); - this->value_[15 - bytes] &= 0xf0; - shifted = 2 * bytes; - } - - this->digits_ += shifted; - if (this->digits_ > MAX_DIGITS) - this->digits_ = MAX_DIGITS; - - this->scale_ += shifted; - if (this->scale_ > MAX_DIGITS) - this->scale_ = MAX_DIGITS; - - return shifted; -} - -ACE_CDR::Fixed &ACE_CDR::Fixed::operator-= (const Fixed &rhs) -{ - if (!this->sign () && rhs.sign ()) - return *this += -rhs; - - if (this->sign () && !rhs.sign ()) - { - Fixed negated = -*this; - negated += rhs; - return *this = -negated; - } - - const Fixed before = *this; - ConstIterator rhs_iter = this->pre_add (rhs); - - Iterator lhs_iter = this->begin (); - if (this->scale_ > rhs.scale_) - lhs_iter += this->scale_ - rhs.scale_; - - bool borrow = false; - for (; rhs_iter != rhs.end (); ++lhs_iter, ++rhs_iter) - if (*rhs_iter + borrow <= *lhs_iter) - { - *lhs_iter -= *rhs_iter + borrow; - borrow = false; - } - else - { - *lhs_iter += 10 - *rhs_iter - borrow; - borrow = true; - } - - while (borrow && lhs_iter != this->end ()) - if (*lhs_iter) - { - --*lhs_iter; - borrow = false; - } - else - *lhs_iter = 9; - - if (borrow) - return *this = -(rhs - before); - - this->ltrim (); - return *this; -} - -ACE_CDR::Fixed &ACE_CDR::Fixed::operator*= (const Fixed &rhs) -{ - if (!this->sign () && rhs.sign ()) - this->value_[15] = (this->value_[15] & 0xf0) | NEGATIVE; - else if (this->sign () && rhs.sign ()) - this->value_[15] = (this->value_[15] & 0xf0) | POSITIVE; - - this->ltrim (); - Fixed right = rhs; - right.ltrim (); - - Octet temp[MAX_DIGITS * 2]; - int carry = 0; - - for (int col = 0; col < this->digits_ + right.digits_; ++col) - { - for (int row = (std::max) (0, col - this->digits_ + 1); - row < (std::min) (col + 1, int (right.digits_)); ++row) - carry += this->digit (col - row) * right.digit (row); - temp[col] = carry % 10; - carry /= 10; - } - - this->digits_ += right.digits_; - this->scale_ += right.scale_; - int digit_offset = 0; - - if (this->digits_ > MAX_DIGITS) - { - digit_offset = this->digits_ - MAX_DIGITS; - this->digits_ = MAX_DIGITS; - if (this->scale_ > digit_offset) - this->scale_ -= digit_offset; - } - - for (int i = 0; i < this->digits_; ++i) - this->digit (i, temp[i + digit_offset]); - - this->ltrim (); - return *this; -} - -ACE_CDR::Fixed &ACE_CDR::Fixed::operator/= (const Fixed &rhs) -{ - if (!rhs) - return *this; - - if (rhs.scale_ && rhs.scale_ <= this->scale_) - this->scale_ -= rhs.scale_; - else if (rhs.scale_) - { - const Octet shifted = this->lshift (rhs.scale_ - this->scale_); - this->scale_ -= shifted; - } - - Fixed rhs_no_scale = rhs; - rhs_no_scale.scale_ = 0; - rhs_no_scale.value_[15] = (rhs_no_scale.value_[15] & 0xf0) | POSITIVE; - rhs_no_scale.ltrim (); - - this->ltrim (); - - if (!this->sign () && rhs.sign ()) - this->value_[15] = (this->value_[15] & 0xf0) | NEGATIVE; - else if (this->sign () && rhs.sign ()) - this->value_[15] = (this->value_[15] & 0xf0) | POSITIVE; - - static const Fixed one = from_integer (LongLong (1)), - two = from_integer (LongLong (2)), - three = from_integer (LongLong (3)), - five = from_integer (LongLong (5)); - - if (rhs_no_scale == one) - return *this; - - // Most sig digit of rhs must be >= 5 - switch (rhs_no_scale.digit (rhs_no_scale.digits_ - 1)) - { - case 1: - return *this = (*this * five) / (rhs_no_scale * five); - case 2: - return *this = (*this * three) / (rhs_no_scale * three); - case 3: - case 4: - return *this = (*this * two) / (rhs_no_scale * two); - default: - break; - } - - const bool neg = this->sign (); - if (neg) - this->value_[15] = (this->value_[15] & 0xf0) | POSITIVE; - - Fixed r, q = this->div_helper2 (rhs_no_scale, r); - - if (!r) - return *this = neg ? -q : q;; - - const int shift = q.lshift (MAX_DIGITS); - if (shift) - { - const Octet scale = r.lshift (shift); - r.scale_ = 0; - Fixed r2; - r = r.div_helper2 (rhs_no_scale, r2); - r.scale_ = scale; - q += r; - } - - *this = neg ? -q : q; - this->normalize (); - return *this; -} - -ACE_CDR::Fixed ACE_CDR::Fixed::div_helper2 (const Fixed &rhs, Fixed &r) const -{ - if (this->digits_ < rhs.digits_) - r = *this; - else if (this->digits_ == rhs.digits_) - if (*this < rhs) - r = *this; - else - { - r = *this - rhs; - return from_integer (LongLong (1)); - } - else if (this->digits_ == rhs.digits_ + 1) - return this->div_helper1 (rhs, r); - else - { - const int dig = this->digits_ - rhs.digits_ - 1; - Fixed top = *this, bot = *this; // split with bot having dig digits - for (int i = 0; i < dig; ++i) - top.digit (i, 0); - for (int i = dig; i < this->digits_; ++i) - bot.digit (i, 0); - bot.digits_ = dig; - top.scale_ += dig; - top.normalize (this->scale_); - - Fixed rtop; - const Fixed qtop = top.div_helper1 (rhs, rtop); - const Fixed qbot = rtop.join (dig, bot).div_helper2 (rhs, r); - return qtop.join (dig, qbot); - } - - return from_integer (); -} - -ACE_CDR::Fixed ACE_CDR::Fixed::div_helper1 (const Fixed &rhs, Fixed &r) const -{ - static const Fixed ten = from_integer (LongLong (10)); - if (*this >= rhs * ten) - return ten + (*this - rhs * ten).div_helper1 (rhs, r); - - int q = (this->digit (this->digits_ - 1) * 10 + - this->digit (this->digits_ - 2)) / rhs.digit (rhs.digits_ - 1); - if (q > 9) - q = 9; - Fixed t = from_integer (LongLong (q)) * rhs; - for (int i = 0; i < 2 && t > *this; ++i) - { - --q; - t -= rhs; - } - - r = *this - t; - return from_integer (LongLong (q)); -} - -ACE_CDR::Fixed ACE_CDR::Fixed::join (int digits, const Fixed &bot) const -{ - Fixed res = bot; - res.digits_ = this->digits_ + digits; - for (int i = digits; i < MAX_DIGITS && i - digits < this->digits_; ++i) - res.digit (i, this->digit (i - digits)); - return res; -} - -ACE_CDR::Fixed &ACE_CDR::Fixed::operator++ () -{ - if (this->sign ()) - { - this->value_[15] = (this->value_[15] & 0xf0) | POSITIVE; - if (!!--*this) // decrement and check if result is nonzero - this->value_[15] = (this->value_[15] & 0xf0) | NEGATIVE; - } - else - { - Iterator iter = this->begin (); - iter += this->scale_; - for (; iter != this->end (); ++iter) - { - if (*iter < 9) - { - ++*iter; - return *this; - } - *iter = 0; - } - if (this->digits_ < MAX_DIGITS) - { - ++this->digits_; - *iter = 1; - } - } - return *this; -} - -ACE_CDR::Fixed &ACE_CDR::Fixed::operator-- () -{ - if (this->sign ()) - { - this->value_[15] = (this->value_[15] & 0xf0) | POSITIVE; - ++*this; - this->value_[15] = (this->value_[15] & 0xf0) | NEGATIVE; - } - else - { - Fixed before = *this; - Iterator iter = this->begin (); - iter += this->scale_; - for (; iter != this->end (); ++iter) - { - if (*iter) - { - --*iter; - return *this; - } - *iter = 9; - } - *this = before - from_integer (ULongLong (1)); - } - return *this; -} - -bool ACE_CDR::Fixed::operator! () const -{ - static const Octet ZERO[] = {0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, POSITIVE}; - return 0 == ACE_OS::memcmp (this->value_, ZERO, sizeof ZERO); -} - -ACE_OSTREAM_TYPE &operator<< (ACE_OSTREAM_TYPE &lhs, const ACE_CDR::Fixed &rhs) -{ - char digits[ACE_CDR::Fixed::MAX_STRING_SIZE]; - rhs.to_string (digits, sizeof digits); - -#ifdef ACE_LACKS_IOSTREAM_TOTALLY - ACE_OS::fputs (digits, &lhs); -#else - lhs << digits; -#endif - return lhs; -} - -#ifndef ACE_LACKS_IOSTREAM_TOTALLY -std::istream &operator>> (std::istream &lhs, ACE_CDR::Fixed &rhs) -{ - double num; - lhs >> num; - ACE_CDR::LongDouble ld; - ACE_CDR_LONG_DOUBLE_ASSIGNMENT (ld, num); - rhs = ACE_CDR::Fixed::from_floating (ld); - return lhs; -} -#endif - -bool ACE_CDR::Fixed::less (const ACE_CDR::Fixed &rhs) const -{ - const Fixed &lhs = *this; - if (lhs.sign () != rhs.sign ()) - return lhs.sign (); - - // signs of lhs and rhs are the same so lhs < rhs reduces to: - // if positive, |lhs| < |rhs| - // if negative, |rhs| < |lhs| - // 'a' will refer to the value left of < and 'b' to the value to the right - const ACE_CDR::Fixed &a = lhs.sign () ? rhs : lhs, - &b = lhs.sign () ? lhs : rhs; - - if (a.scale_ == b.scale_) - return ACE_OS::memcmp (a.value_, b.value_, sizeof a.value_) < 0; - - const int a_int_dig = a.digits_ - a.scale_, b_int_dig = b.digits_ - b.scale_; - - if (a_int_dig > b_int_dig) - { - for (int i = 1; i <= a_int_dig - b_int_dig; ++i) - if (a.digit (a.digits_ - i)) - return false; - } - else if (a_int_dig < b_int_dig) - { - for (int i = 1; i <= b_int_dig - a_int_dig; ++i) - if (b.digit (b.digits_ - i)) - return true; - } - - const int common_frac = (std::min) (a.scale_, b.scale_), - common_dig = (std::min) (a_int_dig, b_int_dig) + common_frac, - a_off = a.scale_ - common_frac, // a's offset (more scale than b) - b_off = b.scale_ - common_frac; // b's offset (more scale than a) - - for (int i = 1; i <= common_dig; ++i) - if (a.digit (a_off + common_dig - i) < b.digit (b_off + common_dig - i)) - return true; - - for (int i = 1; i <= a_off; ++i) - if (a.digit (a_off - i)) - return false; - - for (int i = 1; i <= b_off; ++i) - if (b.digit (b_off - i)) - return true; - - return false; -} - -bool ACE_CDR::Fixed::equal (const ACE_CDR::Fixed &rhs) const -{ - const Fixed &lhs = *this; - if (lhs.sign () != rhs.sign ()) - return false; - - if (lhs.scale_ == rhs.scale_) - return 0 == ACE_OS::memcmp (lhs.value_, rhs.value_, sizeof lhs.value_); - - const ACE_CDR::Fixed &more = (lhs.scale_ > rhs.scale_) ? lhs : rhs, - &fewer = (lhs.scale_ > rhs.scale_) ? rhs : lhs; - - const ACE_CDR::Octet scale_diff = more.scale_ - fewer.scale_; - - ACE_CDR::Fixed::ConstIterator more_iter = more.begin (), - more_end = more.end (); - - for (ACE_CDR::Octet i = 0; i < scale_diff; ++i) - if (more_iter == more_end || *more_iter++) - return false; // digits in more that are missing in fewer must be 0 - - ACE_CDR::Fixed::ConstIterator fewer_iter = fewer.begin (), - fewer_end = fewer.end (); - - while (more_iter != more_end && fewer_iter != fewer_end) - if (*more_iter++ != *fewer_iter++) - return false; // digits in common must match - - while (more_iter != more_end) - if (*more_iter++) - return false; // extra (more significant) digits in more must be 0 - - while (fewer_iter != fewer_end) - if (*fewer_iter++) - return false; // extra (more significant) digits in fewer must be 0 - - return true; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/CDR_Base.h b/modules/worldengine/deps/acelite/ace/CDR_Base.h deleted file mode 100644 index 22dd8adf97..0000000000 --- a/modules/worldengine/deps/acelite/ace/CDR_Base.h +++ /dev/null @@ -1,580 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file CDR_Base.h - * - * ACE Common Data Representation (CDR) basic types. - * - * The current implementation assumes that the host has 1-byte, - * 2-byte and 4-byte integral types, and that it has single - * precision and double precision IEEE floats. - * Those assumptions are pretty good these days, with Crays being - * the only known exception. - * - * @author TAO version by - * @author Aniruddha Gokhale - * @author Carlos O'Ryan - * @author ACE version by - * @author Jeff Parsons - * @author Istvan Buki - */ -//============================================================================= - - -#ifndef ACE_CDR_BASE_H -#define ACE_CDR_BASE_H - -#include /**/ "ace/pre.h" - -#include /**/ "ace/config-all.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Basic_Types.h" -#include "ace/Default_Constants.h" -#include "ace/Global_Macros.h" -#include "ace/iosfwd.h" - -#include - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -// Stuff used by the ACE CDR classes. Watch these values... they're also used -// in the ACE_CDR Byte_Order enum below. -#if defined ACE_LITTLE_ENDIAN -# define ACE_CDR_BYTE_ORDER 1 -// little endian encapsulation byte order has value = 1 -#else /* ! ACE_LITTLE_ENDIAN */ -# define ACE_CDR_BYTE_ORDER 0 -// big endian encapsulation byte order has value = 0 -#endif /* ! ACE_LITTLE_ENDIAN */ - -class ACE_Message_Block; - -/** - * @class ACE_CDR - * - * @brief Keep constants and some routines common to both Output and - * Input CDR streams. - */ -class ACE_Export ACE_CDR -{ -public: - // = Constants defined by the CDR protocol. - // By defining as many of these constants as possible as enums we - // ensure they get inlined and avoid pointless static memory - // allocations. - - enum - { - // Note that some of these get reused as part of the standard - // binary format: unsigned is the same size as its signed cousin, - // float is LONG_SIZE, and double is LONGLONG_SIZE. - - OCTET_SIZE = 1, - SHORT_SIZE = 2, - LONG_SIZE = 4, - LONGLONG_SIZE = 8, - LONGDOUBLE_SIZE = 16, - - OCTET_ALIGN = 1, - SHORT_ALIGN = 2, - LONG_ALIGN = 4, - LONGLONG_ALIGN = 8, - /// @note the CORBA LongDouble alignment requirements do not - /// match its size... - LONGDOUBLE_ALIGN = 8, - - /// Maximal CDR 1.1 alignment: "quad precision" FP (i.e. "CDR::Long - /// double", size as above). - MAX_ALIGNMENT = 8, - - /// The default buffer size. - /** - * @todo We want to add options to control this - * default value, so this constant should be read as the default - * default value ;-) - */ - DEFAULT_BUFSIZE = ACE_DEFAULT_CDR_BUFSIZE, - - /// The buffer size grows exponentially until it reaches this size; - /// afterwards it grows linearly using the next constant - EXP_GROWTH_MAX = ACE_DEFAULT_CDR_EXP_GROWTH_MAX, - - /// Once exponential growth is ruled out the buffer size increases - /// in chunks of this size, note that this constants have the same - /// value right now, but it does not need to be so. - LINEAR_GROWTH_CHUNK = ACE_DEFAULT_CDR_LINEAR_GROWTH_CHUNK - }; - - /** - * @enum Byte_Order - * - * Defines values for the byte_order argument to ACE_OutputCDR and - * ACE_InputCDR. - */ - enum Byte_Order - { - /// Use big-endian order (also known as network byte order). - BYTE_ORDER_BIG_ENDIAN = 0, - /// Use little-endian order. - BYTE_ORDER_LITTLE_ENDIAN = 1, - /// Use whichever byte order is native to this machine. - BYTE_ORDER_NATIVE = ACE_CDR_BYTE_ORDER - }; - - /** - * Do byte swapping for each basic IDL type size. There exist only - * routines to put byte, halfword (2 bytes), word (4 bytes), - * doubleword (8 bytes) and quadword (16 byte); because those are - * the IDL basic type sizes. - */ - static void swap_2 (char const *orig, char *target); - static void swap_4 (char const *orig, char *target); - static void swap_8 (char const *orig, char *target); - static void swap_16 (char const *orig, char *target); - static void swap_2_array (char const *orig, - char *target, - size_t length); - static void swap_4_array (char const *orig, - char *target, - size_t length); - static void swap_8_array (char const *orig, - char *target, - size_t length); - static void swap_16_array (char const *orig, - char *target, - size_t length); - - /// Align the message block to ACE_CDR::MAX_ALIGNMENT, - /// set by the CORBA spec at 8 bytes. - static void mb_align (ACE_Message_Block *mb); - - /** - * Compute the size of the smallest buffer that can contain at least - * @a minsize bytes. - * To understand how a "best fit" is computed look at the - * algorithm in the code. - * Basically the buffers grow exponentially, up to a certain point, - * then the buffer size grows linearly. - * The advantage of this algorithm is that is rapidly grows to a - * large value, but does not explode at the end. - */ - static size_t first_size (size_t minsize); - - /// Compute not the smallest, but the second smallest buffer that - /// will fir @a minsize bytes. - static size_t next_size (size_t minsize); - - /** - * Increase the capacity of mb to contain at least @a minsize bytes. - * If @a minsize is zero the size is increased by an amount at least - * large enough to contain any of the basic IDL types. - * @retval -1 Failure - * @retval 0 Success. - */ - static int grow (ACE_Message_Block *mb, size_t minsize); - - /** - * Copy a message block chain into a single message block, - * preserving the alignment of the first message block of the - * original stream, not the following message blocks. - * @retval -1 Failure - * @retval 0 Success. - */ - static int consolidate (ACE_Message_Block *dst, - const ACE_Message_Block *src); - - static size_t total_length (const ACE_Message_Block *begin, - const ACE_Message_Block *end); - - /** - * @name Basic OMG IDL Types - * - * These types are for use in the CDR classes. The cleanest way to - * avoid complaints from all compilers is to define them all. - */ - //@{ - typedef bool Boolean; - typedef unsigned char Octet; - typedef char Char; - typedef ACE_WCHAR_T WChar; - typedef ACE_INT16 Short; - typedef ACE_UINT16 UShort; - typedef ACE_INT32 Long; - typedef ACE_UINT32 ULong; - typedef ACE_UINT64 ULongLong; - -# if (defined (_MSC_VER)) || (defined (__BORLANDC__)) - typedef __int64 LongLong; -# elif ACE_SIZEOF_LONG == 8 - typedef long LongLong; -# elif defined(__TANDEM) - typedef long long LongLong; -# elif ACE_SIZEOF_LONG_LONG == 8 -# if defined (sun) && !defined (ACE_LACKS_U_LONGLONG_T) - // sun #defines u_longlong_t, maybe other platforms do also. - // Use it, at least with g++, so that its -pedantic doesn't - // complain about no ANSI C++ long long. - typedef longlong_t LongLong; -# else - typedef long long LongLong; -# endif /* sun */ -# else /* no native 64 bit integer type */ -# define NONNATIVE_LONGLONG - struct ACE_Export LongLong - { -# if defined (ACE_BIG_ENDIAN) - ACE_CDR::Long h; - ACE_CDR::Long l; -# else - ACE_CDR::Long l; - ACE_CDR::Long h; -# endif /* ! ACE_BIG_ENDIAN */ - - /** - * @name Overloaded Relation Operators. - * - * The canonical comparison operators. - */ - //@{ - bool operator== (const LongLong &rhs) const; - bool operator!= (const LongLong &rhs) const; - //@} - }; -# endif /* no native 64 bit integer type */ - -# if defined (NONNATIVE_LONGLONG) -# define ACE_CDR_LONGLONG_INITIALIZER {0,0} -# else -# define ACE_CDR_LONGLONG_INITIALIZER 0 -# endif /* NONNATIVE_LONGLONG */ - -# if ACE_SIZEOF_FLOAT == 4 - typedef float Float; -# else /* ACE_SIZEOF_FLOAT != 4 */ - struct Float - { -# if ACE_SIZEOF_INT == 4 - // Use unsigned int to get word alignment. - unsigned int f; -# else /* ACE_SIZEOF_INT != 4 */ - // Applications will probably have trouble with this. - char f[4]; -# endif /* ACE_SIZEOF_INT != 4 */ - }; -# endif /* ACE_SIZEOF_FLOAT != 4 */ - -# if ACE_SIZEOF_DOUBLE == 8 - typedef double Double; -# else /* ACE_SIZEOF_DOUBLE != 8 */ - struct Double - { -# if ACE_SIZEOF_LONG == 8 - // Use u long to get word alignment. - unsigned long f; -# else /* ACE_SIZEOF_INT != 8 */ - // Applications will probably have trouble with this. - char f[8]; -# endif /* ACE_SIZEOF_INT != 8 */ - }; -# endif /* ACE_SIZEOF_DOUBLE != 8 */ - - // 94-9-32 Appendix A defines a 128 bit floating point "long - // double" data type, with greatly extended precision and four - // more bits of exponent (compared to "double"). This is an IDL - // extension, not yet standard. - -# if ACE_SIZEOF_LONG_DOUBLE == 16 - typedef long double LongDouble; -# define ACE_CDR_LONG_DOUBLE_INITIALIZER 0 -# define ACE_CDR_LONG_DOUBLE_ASSIGNMENT(LHS, RHS) LHS = RHS -# else -# define NONNATIVE_LONGDOUBLE -# define ACE_CDR_LONG_DOUBLE_INITIALIZER {{0}} -# define ACE_CDR_LONG_DOUBLE_ASSIGNMENT(LHS, RHS) LHS.assign (RHS) - struct ACE_Export LongDouble - { - // VxWorks' compiler (gcc 2.96) gets confused by the operator long - // double, so we avoid using long double as the NativeImpl. - // Linux's x86 long double format (12 or 16 bytes) is incompatible - // with Windows, Solaris, AIX, MacOS X and HP-UX (and probably others) - // long double format (8 or 16 bytes). If you need 32-bit Linux to - // inter-operate with 64-bit Linux you will want to define this - // macro to 0 so that "long double" is used. Otherwise, do not define - // this macro. -# if defined (ACE_CDR_IMPLEMENT_WITH_NATIVE_DOUBLE) && \ - (ACE_CDR_IMPLEMENT_WITH_NATIVE_DOUBLE == 1) - typedef double NativeImpl; -# else - typedef long double NativeImpl; -# endif /* ACE_CDR_IMPLEMENT_WITH_NATIVE_DOUBLE==1 */ - - char ld[16]; - - LongDouble& assign (const NativeImpl& rhs); - LongDouble& assign (const LongDouble& rhs); - - bool operator== (const LongDouble &rhs) const; - bool operator!= (const LongDouble &rhs) const; - - LongDouble& operator*= (const NativeImpl rhs) { - return this->assign (static_cast (*this) * rhs); - } - LongDouble& operator/= (const NativeImpl rhs) { - return this->assign (static_cast (*this) / rhs); - } - LongDouble& operator+= (const NativeImpl rhs) { - return this->assign (static_cast (*this) + rhs); - } - LongDouble& operator-= (const NativeImpl rhs) { - return this->assign (static_cast (*this) - rhs); - } - LongDouble& operator++ () { - return this->assign (static_cast (*this) + 1); - } - LongDouble& operator-- () { - return this->assign (static_cast (*this) - 1); - } - LongDouble operator++ (int) { - LongDouble ldv = *this; - this->assign (static_cast (*this) + 1); - return ldv; - } - LongDouble operator-- (int) { - LongDouble ldv = *this; - this->assign (static_cast (*this) - 1); - return ldv; - } - - operator NativeImpl () const; - }; -# endif /* ACE_SIZEOF_LONG_DOUBLE != 16 */ - -#define ACE_HAS_CDR_FIXED - /// Fixed-point data type: up to 31 decimal digits and a sign bit - /// - /// See OMG 2011-11-01 CORBA Interfaces v3.2 sections 7.10, 7.11.3.4 - /// See OMG 2011-11-02 CORBA Interoperability v3.2 section 9.3.2.8 - /// See OMG 2012-07-02 IDL-to-C++ Mapping v1.3 section 5.13 - /// This class doesn't exactly match the IDL-to-C++ mapping because - /// it is meant for use inside a union in the IDL compiler and therefore - /// has no constructors. Standards-based middlware libraries such as - /// ORBs and DDSs can wrap this class in a class of their own to provide - /// the exact interface described by the mapping specification. - class ACE_Export Fixed - { - public: - enum - { - MAX_DIGITS = 31, - MAX_STRING_SIZE = 4 + MAX_DIGITS, // includes -, 0, ., terminator - POSITIVE = 0xc, - NEGATIVE = 0xd - }; - - static Fixed from_integer (LongLong val = 0); - static Fixed from_integer (ULongLong val); - static Fixed from_floating (LongDouble val); - static Fixed from_string (const char *str); - static Fixed from_octets (const Octet *array, int len, - unsigned int scale = 0); - - operator LongLong () const; - operator LongDouble () const; - - Fixed round (UShort scale) const; - Fixed truncate (UShort scale) const; - - bool to_string (char *buffer, size_t buffer_size) const; - const Octet *to_octets (int &n) const; - - Fixed &operator+= (const Fixed &rhs); - Fixed &operator-= (const Fixed &rhs); - Fixed &operator*= (const Fixed &rhs); - Fixed &operator/= (const Fixed &rhs); - - Fixed &operator++ (); - Fixed operator++ (int); - Fixed &operator-- (); - Fixed operator-- (int); - - Fixed operator+ () const; - Fixed operator- () const; - bool operator! () const; - - UShort fixed_digits () const; - UShort fixed_scale () const; - - bool sign () const; - Octet digit (int n) const; - void digit (int n, int value); - - bool less (const Fixed &rhs) const; - bool equal (const Fixed &rhs) const; - - class Proxy - { - bool high_nibble_; - Octet &element_; - public: - Proxy (bool high_nibble, Octet &element); - Proxy &operator= (Octet val); - Proxy &operator+= (int rhs); - Proxy &operator-= (int rhs); - Proxy &operator++ (); - Proxy &operator-- (); - operator Octet () const; - }; - - class IteratorBase - { - protected: - explicit IteratorBase (int digit); - bool high_nibble () const; - Octet &storage (Fixed *outer) const; - Octet storage (const Fixed *outer) const; - bool compare (const IteratorBase &rhs) const; - int digit_; - }; - - class Iterator - : public std::iterator - , private IteratorBase - { - public: - explicit Iterator (Fixed *outer, int digit = 0); - Proxy operator* (); - Iterator &operator+= (std::ptrdiff_t n); - Iterator &operator++ (); - Iterator operator++ (int); - Iterator &operator-- (); - Iterator operator-- (int); - bool operator== (const Iterator &rhs) const; - bool operator!= (const Iterator &rhs) const; - private: - Fixed *outer_; - }; - - class ConstIterator - : public std::iterator - , private IteratorBase - { - public: - explicit ConstIterator (const Fixed *outer, int digit = 0); - Octet operator* (); - ConstIterator &operator+= (std::ptrdiff_t n); - ConstIterator &operator++ (); - ConstIterator operator++ (int); - ConstIterator &operator-- (); - ConstIterator operator-- (int); - bool operator== (const ConstIterator &rhs) const; - bool operator!= (const ConstIterator &rhs) const; - private: - const Fixed *outer_; - }; - - Iterator begin (); - ConstIterator begin () const; - ConstIterator cbegin () const; - Iterator end (); - ConstIterator end () const; - ConstIterator cend () const; - - private: - /// CDR wire format for Fixed: marshaled as an octet array with - /// index 0 as the most significant octet and index n the least - /// significant. Each octet contains two decimal digits except for - /// the last octet (least sig) which has one decimal digit in - /// the high nibble and the sign indicator in the low nibble. - Octet value_[16]; - - /// digits_ is not marshaled, the receiver needs to know it - /// from the type information (for example, IDL). The value of - /// digits_ determines how many octets of value_ are masharled. - Octet digits_; - - /// scale_ is not marshaled, the receiver needs to know it - /// from the type information (for example, IDL). - Octet scale_; - - /// remove trailing zeros, shift down and reduce digits and scale - void normalize (UShort min_scale = 0); - - /// Add up to 'digits' of additional scale by shifting left without - /// removing significant digits. Returns number of digits shifted. - int lshift (int digits); - - /// Prepare to add (or subtract) f by changing the digits and scale - /// of *this, returnins an iterator to the least significant - /// digit of f that will influence the sum (or difference). - ConstIterator pre_add (const Fixed &f); - - Fixed div_helper2 (const Fixed &rhs, Fixed &r) const; - Fixed div_helper1 (const Fixed &rhs, Fixed &r) const; - Fixed join (int digits, const Fixed &bottom) const; - void ltrim (); - }; - - //@} - -#if !defined (ACE_CDR_GIOP_MAJOR_VERSION) -# define ACE_CDR_GIOP_MAJOR_VERSION 1 -#endif /*ACE_CDR_GIOP_MAJOR_VERSION */ - -#if !defined (ACE_CDR_GIOP_MINOR_VERSION) -# define ACE_CDR_GIOP_MINOR_VERSION 2 -#endif /* ACE_CDR_GIOP_MINOR_VERSION */ -}; - -ACE_Export -ACE_OSTREAM_TYPE &operator<< (ACE_OSTREAM_TYPE &lhs, const ACE_CDR::Fixed &rhs); - -#ifndef ACE_LACKS_IOSTREAM_TOTALLY -ACE_Export -std::istream &operator>> (std::istream &lhs, ACE_CDR::Fixed &rhs); -#endif - -ACE_Export -bool operator< (const ACE_CDR::Fixed &lhs, const ACE_CDR::Fixed &rhs); - -ACE_Export -bool operator> (const ACE_CDR::Fixed &lhs, const ACE_CDR::Fixed &rhs); - -ACE_Export -bool operator>= (const ACE_CDR::Fixed &lhs, const ACE_CDR::Fixed &rhs); - -ACE_Export -bool operator<= (const ACE_CDR::Fixed &lhs, const ACE_CDR::Fixed &rhs); - -ACE_Export -bool operator== (const ACE_CDR::Fixed &lhs, const ACE_CDR::Fixed &rhs); - -ACE_Export -bool operator!= (const ACE_CDR::Fixed &lhs, const ACE_CDR::Fixed &rhs); - -ACE_Export -ACE_CDR::Fixed operator+ (const ACE_CDR::Fixed &lhs, const ACE_CDR::Fixed &rhs); - -ACE_Export -ACE_CDR::Fixed operator- (const ACE_CDR::Fixed &lhs, const ACE_CDR::Fixed &rhs); - -ACE_Export -ACE_CDR::Fixed operator* (const ACE_CDR::Fixed &lhs, const ACE_CDR::Fixed &rhs); - -ACE_Export -ACE_CDR::Fixed operator/ (const ACE_CDR::Fixed &lhs, const ACE_CDR::Fixed &rhs); - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -# include "ace/CDR_Base.inl" -#endif /* __ACE_INLINE__ */ - - -#include /**/ "ace/post.h" - -#endif /* ACE_CDR_BASE_H */ diff --git a/modules/worldengine/deps/acelite/ace/CDR_Base.inl b/modules/worldengine/deps/acelite/ace/CDR_Base.inl deleted file mode 100644 index 2a93c82b63..0000000000 --- a/modules/worldengine/deps/acelite/ace/CDR_Base.inl +++ /dev/null @@ -1,625 +0,0 @@ -// -*- C++ -*- -#if defined (ACE_HAS_INTRINSIC_BYTESWAP) -// Take advantage of MSVC++ byte swapping compiler intrinsics (found -// in ). -# pragma intrinsic (_byteswap_ushort, _byteswap_ulong, _byteswap_uint64) -#endif /* ACE_HAS_INTRINSIC_BYTESWAP */ - -#if defined (ACE_HAS_BSWAP_16) || defined (ACE_HAS_BSWAP_32) || defined (ACE_HAS_BSWAP_64) -# include "ace/os_include/os_byteswap.h" -#endif - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -// -// The ACE_CDR::swap_X and ACE_CDR::swap_X_array routines are broken -// in 5 cases for optimization: -// -// * MSVC++ 7.1 or better -// => Compiler intrinsics -// -// * AMD64 CPU + gnu g++ -// => gcc amd64 inline assembly. -// -// * x86 Pentium CPU + gnu g++ -// (ACE_HAS_PENTIUM && __GNUG__) -// => gcc x86 inline assembly. -// -// * x86 Pentium CPU and (_MSC_VER) or BORLAND C++) -// (ACE_HAS_PENTIUM && ( _MSC_VER || __BORLANDC__ ) -// => MSC x86 inline assembly. -// -// * 64 bit architecture -// (ACE_SIZEOF_LONG == 8) -// => shift/masks using 64bit words. -// -// * default -// (none of the above) -// => shift/masks using 32bit words. -// -// Some things you could find useful to know if you intend to mess -// with this optimizations for swaps: -// -// * MSVC++ don't assume register values are conserved between -// statements. So you can clobber any register you want, -// whenever you want (well not *anyone* really, see manual). -// The MSVC++ optimizer will try to pick different registers -// for the C++ statements sorrounding your asm block, and if -// it's not possible will use the stack. -// -// * If you clobber registers with asm statements in gcc, you -// better do it in an asm-only function, or save/restore them -// before/after in the stack. If not, sorrounding C statements -// could end using the same registers and big-badda-bum (been -// there, done that...). The big-badda-bum could happen *even -// if you specify the clobbered register in your asm's*. -// Even better, use gcc asm syntax for detecting the register -// asigned to a certain variable so you don't have to clobber any -// register directly. -// - -ACE_INLINE void -ACE_CDR::swap_2 (const char *orig, char* target) -{ -#if defined (ACE_HAS_INTRINSIC_BYTESWAP) - // Take advantage of MSVC++ compiler intrinsic byte swapping - // function. - *reinterpret_cast (target) = - _byteswap_ushort (*reinterpret_cast (orig)); -#elif defined (ACE_HAS_BSWAP16) - *reinterpret_cast (target) = - bswap16 (*reinterpret_cast (orig)); -#elif defined (ACE_HAS_BSWAP_16) - *reinterpret_cast (target) = - bswap_16 (*reinterpret_cast (orig)); -#elif defined(ACE_HAS_INTEL_ASSEMBLY) - unsigned short a = - *reinterpret_cast (orig); - asm( "rolw $8, %0" : "=r" (a) : "0" (a) ); - *reinterpret_cast (target) = a; -#elif defined (ACE_HAS_PENTIUM) \ - && (defined(_MSC_VER) || defined(__BORLANDC__)) \ - && !defined(ACE_LACKS_INLINE_ASSEMBLY) - __asm mov ebx, orig; - __asm mov ecx, target; - __asm mov ax, [ebx]; - __asm rol ax, 8; - __asm mov [ecx], ax; -#else - ACE_REGISTER ACE_UINT16 usrc = * reinterpret_cast (orig); - ACE_REGISTER ACE_UINT16* udst = reinterpret_cast (target); - *udst = (usrc << 8) | (usrc >> 8); -#endif /* ACE_HAS_PENTIUM */ -} - -ACE_INLINE void -ACE_CDR::swap_4 (const char* orig, char* target) -{ -#if defined (ACE_HAS_INTRINSIC_BYTESWAP) - // Take advantage of MSVC++ compiler intrinsic byte swapping - // function. - *reinterpret_cast (target) = - _byteswap_ulong (*reinterpret_cast (orig)); -#elif defined (ACE_HAS_BSWAP32) - *reinterpret_cast (target) = - bswap32 (*reinterpret_cast (orig)); -#elif defined (ACE_HAS_BSWAP_32) - *reinterpret_cast (target) = - bswap_32 (*reinterpret_cast (orig)); -#elif defined(ACE_HAS_INTEL_ASSEMBLY) - // We have ACE_HAS_PENTIUM, so we know the sizeof's. - ACE_REGISTER unsigned int j = - *reinterpret_cast (orig); - asm ("bswap %1" : "=r" (j) : "0" (j)); - *reinterpret_cast (target) = j; -#elif defined(ACE_HAS_PENTIUM) \ - && (defined(_MSC_VER) || defined(__BORLANDC__)) \ - && !defined(ACE_LACKS_INLINE_ASSEMBLY) - __asm mov ebx, orig; - __asm mov ecx, target; - __asm mov eax, [ebx]; - __asm bswap eax; - __asm mov [ecx], eax; -#else - ACE_REGISTER ACE_UINT32 x = * reinterpret_cast (orig); - x = (x << 24) | ((x & 0xff00) << 8) | ((x & 0xff0000) >> 8) | (x >> 24); - * reinterpret_cast (target) = x; -#endif /* ACE_HAS_INTRINSIC_BYTESWAP */ -} - -ACE_INLINE void -ACE_CDR::swap_8 (const char* orig, char* target) -{ -#if defined (ACE_HAS_INTRINSIC_BYTESWAP) - // Take advantage of MSVC++ compiler intrinsic byte swapping - // function. - *reinterpret_cast (target) = - _byteswap_uint64 (*reinterpret_cast (orig)); -#elif defined (ACE_HAS_BSWAP64) - *reinterpret_cast (target) = - bswap64 (*reinterpret_cast (orig)); -#elif defined (ACE_HAS_BSWAP_64) - *reinterpret_cast (target) = - bswap_64 (*reinterpret_cast (orig)); -#elif (defined (__amd64__) || defined (__x86_64__)) && defined(__GNUG__) \ - && !defined(ACE_LACKS_INLINE_ASSEMBLY) - ACE_REGISTER unsigned long x = - * reinterpret_cast (orig); - asm ("bswapq %1" : "=r" (x) : "0" (x)); - *reinterpret_cast (target) = x; -#elif defined(ACE_HAS_PENTIUM) && defined(__GNUG__) \ - && !defined(ACE_LACKS_INLINE_ASSEMBLY) - ACE_REGISTER unsigned int i = - *reinterpret_cast (orig); - ACE_REGISTER unsigned int j = - *reinterpret_cast (orig + 4); - asm ("bswap %1" : "=r" (i) : "0" (i)); - asm ("bswap %1" : "=r" (j) : "0" (j)); - *reinterpret_cast (target + 4) = i; - *reinterpret_cast (target) = j; -#elif defined(ACE_HAS_PENTIUM) \ - && (defined(_MSC_VER) || defined(__BORLANDC__)) \ - && !defined(ACE_LACKS_INLINE_ASSEMBLY) - __asm mov ecx, orig; - __asm mov edx, target; - __asm mov eax, [ecx]; - __asm mov ebx, 4[ecx]; - __asm bswap eax; - __asm bswap ebx; - __asm mov 4[edx], eax; - __asm mov [edx], ebx; -#elif ACE_SIZEOF_LONG == 8 - // 64 bit architecture. - ACE_REGISTER unsigned long x = - * reinterpret_cast (orig); - ACE_REGISTER unsigned long x84 = (x & 0x000000ff000000ffUL) << 24; - ACE_REGISTER unsigned long x73 = (x & 0x0000ff000000ff00UL) << 8; - ACE_REGISTER unsigned long x62 = (x & 0x00ff000000ff0000UL) >> 8; - ACE_REGISTER unsigned long x51 = (x & 0xff000000ff000000UL) >> 24; - x = (x84 | x73 | x62 | x51); - x = (x << 32) | (x >> 32); - *reinterpret_cast (target) = x; -#else - ACE_REGISTER ACE_UINT32 x = - * reinterpret_cast (orig); - ACE_REGISTER ACE_UINT32 y = - * reinterpret_cast (orig + 4); - x = (x << 24) | ((x & 0xff00) << 8) | ((x & 0xff0000) >> 8) | (x >> 24); - y = (y << 24) | ((y & 0xff00) << 8) | ((y & 0xff0000) >> 8) | (y >> 24); - * reinterpret_cast (target) = y; - * reinterpret_cast (target + 4) = x; -#endif /* ACE_HAS_INTRINSIC_BYTESWAP */ -} - -ACE_INLINE void -ACE_CDR::swap_16 (const char* orig, char* target) -{ - swap_8 (orig + 8, target); - swap_8 (orig, target + 8); -} - -ACE_INLINE size_t -ACE_CDR::first_size (size_t minsize) -{ - if (minsize == 0) - return ACE_CDR::DEFAULT_BUFSIZE; - - size_t newsize = ACE_CDR::DEFAULT_BUFSIZE; - while (newsize < minsize) - { - if (newsize < ACE_CDR::EXP_GROWTH_MAX) - { - // We grow exponentially at the beginning, this is fast and - // reduces the number of allocations. - - // Quickly multiply by two using a bit shift. This is - // guaranteed to work since the variable is an unsigned - // integer. - newsize <<= 1; - } - else - { - // but continuing with exponential growth can result in over - // allocations and easily yield an allocation failure. - // So we grow linearly when the buffer is too big. - newsize += ACE_CDR::LINEAR_GROWTH_CHUNK; - } - } - return newsize; -} - -ACE_INLINE size_t -ACE_CDR::next_size (size_t minsize) -{ - size_t newsize = ACE_CDR::first_size (minsize); - - if (newsize == minsize) - { - // If necessary increment the size - if (newsize < ACE_CDR::EXP_GROWTH_MAX) - // Quickly multiply by two using a bit shift. This is - // guaranteed to work since the variable is an unsigned - // integer. - newsize <<= 1; - else - newsize += ACE_CDR::LINEAR_GROWTH_CHUNK; - } - - return newsize; -} - -ACE_INLINE ACE_CDR::UShort -ACE_CDR::Fixed::fixed_digits () const -{ - return this->digits_; -} - -ACE_INLINE ACE_CDR::UShort -ACE_CDR::Fixed::fixed_scale () const -{ - return this->scale_; -} - -ACE_INLINE bool -ACE_CDR::Fixed::sign () const -{ - return (this->value_[15] & 0xf) == NEGATIVE; -} - -ACE_INLINE ACE_CDR::Octet -ACE_CDR::Fixed::digit (int n) const -{ - const Octet x = this->value_[15 - (n + 1) / 2]; - return (n % 2) ? x & 0xf : (x >> 4); -} - -ACE_INLINE void -ACE_CDR::Fixed::digit (int n, int val) -{ - const int idx = 15 - (n + 1) / 2; - this->value_[idx] = (n % 2) ? (this->value_[idx] & 0xf0) | val - : ((val << 4) | (this->value_[idx] & 0xf)); -} - -ACE_INLINE -ACE_CDR::Fixed::Proxy::Proxy (bool high_nibble, Octet &element) - : high_nibble_ (high_nibble), element_ (element) {} - -ACE_INLINE ACE_CDR::Fixed::Proxy & -ACE_CDR::Fixed::Proxy::operator= (Octet val) -{ - this->element_ = this->high_nibble_ - ? (val << 4) | (this->element_ & 0xf) - : ((this->element_ & 0xf0) | val); - return *this; -} - -ACE_INLINE ACE_CDR::Fixed::Proxy & -ACE_CDR::Fixed::Proxy::operator+= (int rhs) -{ - const Octet val = static_cast (*this + rhs); - return *this = val; -} - -ACE_INLINE ACE_CDR::Fixed::Proxy & -ACE_CDR::Fixed::Proxy::operator-= (int rhs) -{ - const Octet val = static_cast (*this - rhs); - return *this = val; -} - -ACE_INLINE ACE_CDR::Fixed::Proxy & -ACE_CDR::Fixed::Proxy::operator++ () -{ - const Octet val = static_cast (*this) + 1; - return *this = val; -} - -ACE_INLINE ACE_CDR::Fixed::Proxy & -ACE_CDR::Fixed::Proxy::operator-- () -{ - const Octet val = static_cast(*this) - 1; - return *this = val; -} - -ACE_INLINE -ACE_CDR::Fixed::Proxy::operator ACE_CDR::Octet () const -{ - return this->high_nibble_ ? this->element_ >> 4 : (this->element_ & 0xf); -} - -ACE_INLINE -ACE_CDR::Fixed::IteratorBase::IteratorBase (int digit) - : digit_ (digit) {} - -ACE_INLINE bool -ACE_CDR::Fixed::IteratorBase::high_nibble () const -{ - return this->digit_ % 2 == 0; -} - -ACE_INLINE ACE_CDR::Octet & -ACE_CDR::Fixed::IteratorBase::storage (Fixed *outer) const -{ - return outer->value_[15 - (this->digit_ + 1) / 2]; -} - -ACE_INLINE ACE_CDR::Octet -ACE_CDR::Fixed::IteratorBase::storage (const Fixed *outer) const -{ - return outer->value_[15 - (this->digit_ + 1) / 2]; -} - -ACE_INLINE bool -ACE_CDR::Fixed::IteratorBase::compare (const IteratorBase &rhs) const -{ - return this->digit_ == rhs.digit_; -} - -ACE_INLINE -ACE_CDR::Fixed::Iterator::Iterator (Fixed *outer, int digit) - : IteratorBase (digit), outer_ (outer) {} - -ACE_INLINE ACE_CDR::Fixed::Proxy -ACE_CDR::Fixed::Iterator::operator* () -{ - return Proxy (this->high_nibble (), this->storage (this->outer_)); -} - -ACE_INLINE ACE_CDR::Fixed::Iterator & -ACE_CDR::Fixed::Iterator::operator+= (std::ptrdiff_t n) -{ - this->digit_ += static_cast (n); - return *this; -} - -ACE_INLINE ACE_CDR::Fixed::Iterator & -ACE_CDR::Fixed::Iterator::operator++ () -{ - ++this->digit_; - return *this; -} - -ACE_INLINE ACE_CDR::Fixed::Iterator -ACE_CDR::Fixed::Iterator::operator++ (int) -{ - const Iterator cpy (*this); - ++this->digit_; - return cpy; -} - -ACE_INLINE ACE_CDR::Fixed::Iterator & -ACE_CDR::Fixed::Iterator::operator-- () -{ - --this->digit_; - return *this; -} - -ACE_INLINE ACE_CDR::Fixed::Iterator -ACE_CDR::Fixed::Iterator::operator-- (int) -{ - const Iterator cpy (*this); - --this->digit_; - return cpy; -} - -ACE_INLINE bool -ACE_CDR::Fixed::Iterator::operator== (const Iterator &rhs) const -{ - return this->compare (rhs); -} - -ACE_INLINE bool -ACE_CDR::Fixed::Iterator::operator!= (const Iterator &rhs) const -{ - return !(*this == rhs); -} - -ACE_INLINE -ACE_CDR::Fixed::ConstIterator::ConstIterator (const Fixed *outer, int digit) - : IteratorBase (digit), outer_ (outer) {} - -ACE_INLINE ACE_CDR::Octet -ACE_CDR::Fixed::ConstIterator::operator* () -{ - const Octet storage = this->storage (this->outer_); - return this->high_nibble () ? storage >> 4 : (storage & 0xf); -} - -ACE_INLINE ACE_CDR::Fixed::ConstIterator & -ACE_CDR::Fixed::ConstIterator::operator+= (std::ptrdiff_t n) -{ - this->digit_ += static_cast (n); - return *this; -} - -ACE_INLINE ACE_CDR::Fixed::ConstIterator & -ACE_CDR::Fixed::ConstIterator::operator++ () -{ - ++this->digit_; - return *this; -} - -ACE_INLINE ACE_CDR::Fixed::ConstIterator -ACE_CDR::Fixed::ConstIterator::operator++ (int) -{ - const ConstIterator cpy (*this); - ++this->digit_; - return cpy; -} - -ACE_INLINE ACE_CDR::Fixed::ConstIterator & -ACE_CDR::Fixed::ConstIterator::operator-- () -{ - --this->digit_; - return *this; -} - -ACE_INLINE ACE_CDR::Fixed::ConstIterator -ACE_CDR::Fixed::ConstIterator::operator-- (int) -{ - const ConstIterator cpy (*this); - --this->digit_; - return cpy; -} - -ACE_INLINE bool -ACE_CDR::Fixed::ConstIterator::operator== (const ConstIterator &rhs) const -{ - return this->compare (rhs); -} - -ACE_INLINE bool -ACE_CDR::Fixed::ConstIterator::operator!= (const ConstIterator &rhs) const -{ - return !(*this == rhs); -} - -ACE_INLINE ACE_CDR::Fixed::Iterator -ACE_CDR::Fixed::begin () -{ - return Iterator (this); -} - -ACE_INLINE ACE_CDR::Fixed::ConstIterator -ACE_CDR::Fixed::begin () const -{ - return ConstIterator (this); -} - -ACE_INLINE ACE_CDR::Fixed::ConstIterator -ACE_CDR::Fixed::cbegin () const -{ - return ConstIterator (this); -} - -ACE_INLINE ACE_CDR::Fixed::Iterator -ACE_CDR::Fixed::end () -{ - return Iterator (this, this->digits_); -} - -ACE_INLINE ACE_CDR::Fixed::ConstIterator -ACE_CDR::Fixed::end () const -{ - return ConstIterator (this, this->digits_); -} - -ACE_INLINE ACE_CDR::Fixed::ConstIterator -ACE_CDR::Fixed::cend () const -{ - return ConstIterator (this, this->digits_); -} - -ACE_INLINE ACE_CDR::Fixed -ACE_CDR::Fixed::operator++ (int) -{ - const Fixed cpy (*this); - ++*this; - return cpy; -} - -ACE_INLINE ACE_CDR::Fixed -ACE_CDR::Fixed::operator-- (int) -{ - const Fixed cpy (*this); - --*this; - return cpy; -} - -ACE_INLINE ACE_CDR::Fixed -ACE_CDR::Fixed::operator+ () const -{ - return *this; -} - -ACE_INLINE ACE_CDR::Fixed -ACE_CDR::Fixed::operator- () const -{ - Fixed f = *this; - f.value_[15] = (f.value_[15] & 0xf0) | (f.sign () ? POSITIVE : NEGATIVE); - return f; -} - -ACE_INLINE void -ACE_CDR::Fixed::ltrim () -{ - for (int i = this->digits_ - 1; i >= this->scale_ && i > 0; --i) - if (this->digit (i) == 0) - --this->digits_; - else - break; -} - -ACE_INLINE ACE_CDR::Fixed -operator+ (const ACE_CDR::Fixed &lhs, const ACE_CDR::Fixed &rhs) -{ - ACE_CDR::Fixed f = lhs; - f += rhs; - return f; -} - -ACE_INLINE ACE_CDR::Fixed -operator- (const ACE_CDR::Fixed &lhs, const ACE_CDR::Fixed &rhs) -{ - ACE_CDR::Fixed f = lhs; - f -= rhs; - return f; -} - -ACE_INLINE ACE_CDR::Fixed -operator* (const ACE_CDR::Fixed &lhs, const ACE_CDR::Fixed &rhs) -{ - ACE_CDR::Fixed f = lhs; - f *= rhs; - return f; -} - -ACE_INLINE ACE_CDR::Fixed -operator/ (const ACE_CDR::Fixed &lhs, const ACE_CDR::Fixed &rhs) -{ - ACE_CDR::Fixed f = lhs; - f /= rhs; - return f; -} - -ACE_INLINE bool -operator< (const ACE_CDR::Fixed &lhs, const ACE_CDR::Fixed &rhs) -{ - return lhs.less (rhs); -} - -ACE_INLINE bool -operator> (const ACE_CDR::Fixed &lhs, const ACE_CDR::Fixed &rhs) -{ - return rhs < lhs; -} - -ACE_INLINE bool -operator>= (const ACE_CDR::Fixed &lhs, const ACE_CDR::Fixed &rhs) -{ - return !(lhs < rhs); -} - -ACE_INLINE bool -operator<= (const ACE_CDR::Fixed &lhs, const ACE_CDR::Fixed &rhs) -{ - return !(rhs < lhs); -} - -ACE_INLINE bool -operator== (const ACE_CDR::Fixed &lhs, const ACE_CDR::Fixed &rhs) -{ - return lhs.equal (rhs); -} - -ACE_INLINE bool -operator!= (const ACE_CDR::Fixed &lhs, const ACE_CDR::Fixed &rhs) -{ - return !(lhs == rhs); -} - - -ACE_END_VERSIONED_NAMESPACE_DECL - -// **************************************************************** diff --git a/modules/worldengine/deps/acelite/ace/CDR_Size.cpp b/modules/worldengine/deps/acelite/ace/CDR_Size.cpp deleted file mode 100644 index 4263532eb5..0000000000 --- a/modules/worldengine/deps/acelite/ace/CDR_Size.cpp +++ /dev/null @@ -1,258 +0,0 @@ -#include "ace/CDR_Size.h" -#include "ace/SString.h" -#include "ace/OS_Memory.h" -#include "ace/Truncate.h" - -#if !defined (__ACE_INLINE__) -# include "ace/CDR_Size.inl" -#endif /* ! __ACE_INLINE__ */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_CDR::Boolean -ACE_SizeCDR::write_wchar (ACE_CDR::WChar x) -{ - // Note: translator framework is not supported. - // - if (ACE_OutputCDR::wchar_maxbytes () == 0) - { - errno = EACCES; - return (this->good_bit_ = false); - } - - if (static_cast (major_version_) == 1 - && static_cast (minor_version_) == 2) - { - ACE_CDR::Octet len = - static_cast (ACE_OutputCDR::wchar_maxbytes ()); - - if (this->write_1 (&len)) - { - if (ACE_OutputCDR::wchar_maxbytes () == sizeof(ACE_CDR::WChar)) - { - return - this->write_octet_array ( - reinterpret_cast (&x), - static_cast (len)); - } - else - { - if (ACE_OutputCDR::wchar_maxbytes () == 2) - { - ACE_CDR::Short sx = static_cast (x); - return - this->write_octet_array ( - reinterpret_cast (&sx), - static_cast (len)); - } - else - { - ACE_CDR::Octet ox = static_cast (x); - return - this->write_octet_array ( - reinterpret_cast (&ox), - static_cast (len)); - } - } - } - } - else if (static_cast (minor_version_) == 0) - { // wchar is not allowed with GIOP 1.0. - errno = EINVAL; - return (this->good_bit_ = false); - } - - if (ACE_OutputCDR::wchar_maxbytes () == sizeof (ACE_CDR::WChar)) - { - const void *temp = &x; - return this->write_4 (reinterpret_cast (temp)); - } - else if (ACE_OutputCDR::wchar_maxbytes () == 2) - { - ACE_CDR::Short sx = static_cast (x); - return this->write_2 (reinterpret_cast (&sx)); - } - - ACE_CDR::Octet ox = static_cast (x); - return this->write_1 (reinterpret_cast (&ox)); -} - -ACE_CDR::Boolean -ACE_SizeCDR::write_string (ACE_CDR::ULong len, - const ACE_CDR::Char *x) -{ - // Note: translator framework is not supported. - // - if (len != 0) - { - if (this->write_ulong (len + 1)) - return this->write_char_array (x, len + 1); - } - else - { - // Be nice to programmers: treat nulls as empty strings not - // errors. (OMG-IDL supports languages that don't use the C/C++ - // notion of null v. empty strings; nulls aren't part of the OMG-IDL - // string model.) - if (this->write_ulong (1)) - return this->write_char (0); - } - - return (this->good_bit_ = false); -} - -ACE_CDR::Boolean -ACE_SizeCDR::write_string (const ACE_CString &x) -{ - // @@ Leave this method in here, not the `.i' file so that we don't - // have to unnecessarily pull in the `ace/SString.h' header. - return this->write_string (static_cast (x.length ()), - x.c_str()); -} - -ACE_CDR::Boolean -ACE_SizeCDR::write_wstring (ACE_CDR::ULong len, - const ACE_CDR::WChar *x) -{ - // Note: translator framework is not supported. - // - if (ACE_OutputCDR::wchar_maxbytes () == 0) - { - errno = EACCES; - return (this->good_bit_ = false); - } - - if (static_cast (this->major_version_) == 1 - && static_cast (this->minor_version_) == 2) - { - if (x != 0) - { - //In GIOP 1.2 the length field contains the number of bytes - //the wstring occupies rather than number of wchars - //Taking sizeof might not be a good way! This is a temporary fix. - ACE_CDR::Boolean good_ulong = - this->write_ulong ( - ACE_Utils::truncate_cast ( - ACE_OutputCDR::wchar_maxbytes () * len)); - - if (good_ulong) - { - return this->write_wchar_array (x, len); - } - } - else - { - //In GIOP 1.2 zero length wstrings are legal - return this->write_ulong (0); - } - } - - else - if (x != 0) - { - if (this->write_ulong (len + 1)) - return this->write_wchar_array (x, len + 1); - } - else if (this->write_ulong (1)) - return this->write_wchar (0); - return (this->good_bit_ = false); -} - -ACE_CDR::Boolean -ACE_SizeCDR::write_1 (const ACE_CDR::Octet *) -{ - this->adjust (1); - return true; -} - -ACE_CDR::Boolean -ACE_SizeCDR::write_2 (const ACE_CDR::UShort *) -{ - this->adjust (ACE_CDR::SHORT_SIZE); - return true; -} - -ACE_CDR::Boolean -ACE_SizeCDR::write_4 (const ACE_CDR::ULong *) -{ - this->adjust (ACE_CDR::LONG_SIZE); - return true; -} - -ACE_CDR::Boolean -ACE_SizeCDR::write_8 (const ACE_CDR::ULongLong *) -{ - this->adjust (ACE_CDR::LONGLONG_SIZE); - return true; -} - -ACE_CDR::Boolean -ACE_SizeCDR::write_16 (const ACE_CDR::LongDouble *) -{ - this->adjust (ACE_CDR::LONGDOUBLE_SIZE, - ACE_CDR::LONGDOUBLE_ALIGN); - return true; -} - -ACE_CDR::Boolean -ACE_SizeCDR::write_wchar_array_i (const ACE_CDR::WChar *, - ACE_CDR::ULong length) -{ - if (length == 0) - return true; - - size_t const align = (ACE_OutputCDR::wchar_maxbytes () == 2) ? - ACE_CDR::SHORT_ALIGN : - ACE_CDR::OCTET_ALIGN; - - this->adjust (ACE_OutputCDR::wchar_maxbytes () * length, align); - return true; -} - - -ACE_CDR::Boolean -ACE_SizeCDR::write_array (const void *, - size_t size, - size_t align, - ACE_CDR::ULong length) -{ - if (length == 0) - return true; - - this->adjust (size * length, align); - return true; -} - -ACE_CDR::Boolean -ACE_SizeCDR::write_boolean_array (const ACE_CDR::Boolean*, - ACE_CDR::ULong length) -{ - this->adjust (length, 1); - return true; -} - -void -ACE_SizeCDR::adjust (size_t size) -{ - adjust (size, size); -} - -void -ACE_SizeCDR::adjust (size_t size, - size_t align) -{ -#if !defined (ACE_LACKS_CDR_ALIGNMENT) - const size_t offset = ACE_align_binary (size_, align) - size_; - size_ += offset; -#endif /* ACE_LACKS_CDR_ALIGNMENT */ - size_ += size; -} - -ACE_CDR::Boolean -operator<< (ACE_SizeCDR &ss, const ACE_CString &x) -{ - ss.write_string (x); - return ss.good_bit (); -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/CDR_Size.h b/modules/worldengine/deps/acelite/ace/CDR_Size.h deleted file mode 100644 index ad229bca38..0000000000 --- a/modules/worldengine/deps/acelite/ace/CDR_Size.h +++ /dev/null @@ -1,234 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file CDR_Size.h - * - * ACE Common Data Representation (CDR) size-calculating stream. - * - * The current implementation assumes that the host has 1-byte, - * 2-byte and 4-byte integral types, and that it has single - * precision and double precision IEEE floats. - * Those assumptions are pretty good these days, with Crays being - * the only known exception. - * - * @author Boris Kolpackov - */ -//============================================================================= - -#ifndef ACE_CDR_SIZE_H -#define ACE_CDR_SIZE_H - -#include /**/ "ace/pre.h" - -#include "ace/CDR_Base.h" -#include "ace/CDR_Stream.h" // for ACE_OutputCDR::from_* - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/SStringfwd.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_SizeCDR - * - * @brief A CDR stream for calculating size of the representation. - */ -class ACE_Export ACE_SizeCDR -{ -public: - /// Default constructor. - ACE_SizeCDR (ACE_CDR::Octet major_version = ACE_CDR_GIOP_MAJOR_VERSION, - ACE_CDR::Octet minor_version = ACE_CDR_GIOP_MINOR_VERSION); - - /// Returns @c false if an error has ocurred. - bool good_bit (void) const; - - /// Reset current size. - void reset (void); - - /// Return current size. - size_t total_length (void) const; - - // Return 0 on failure and 1 on success. - //@{ @name Size-calculating pseudo-write operations - ACE_CDR::Boolean write_boolean (ACE_CDR::Boolean x); - ACE_CDR::Boolean write_char (ACE_CDR::Char x); - ACE_CDR::Boolean write_wchar (ACE_CDR::WChar x); - ACE_CDR::Boolean write_octet (ACE_CDR::Octet x); - ACE_CDR::Boolean write_short (ACE_CDR::Short x); - ACE_CDR::Boolean write_ushort (ACE_CDR::UShort x); - ACE_CDR::Boolean write_long (ACE_CDR::Long x); - ACE_CDR::Boolean write_ulong (ACE_CDR::ULong x); - ACE_CDR::Boolean write_longlong (const ACE_CDR::LongLong &x); - ACE_CDR::Boolean write_ulonglong (const ACE_CDR::ULongLong &x); - ACE_CDR::Boolean write_float (ACE_CDR::Float x); - ACE_CDR::Boolean write_double (const ACE_CDR::Double &x); - ACE_CDR::Boolean write_longdouble (const ACE_CDR::LongDouble &x); - ACE_CDR::Boolean write_fixed (const ACE_CDR::Fixed &x); - - /// For string we offer methods that accept a precomputed length. - ACE_CDR::Boolean write_string (const ACE_CDR::Char *x); - ACE_CDR::Boolean write_string (ACE_CDR::ULong len, - const ACE_CDR::Char *x); - ACE_CDR::Boolean write_string (const ACE_CString &x); - ACE_CDR::Boolean write_wstring (const ACE_CDR::WChar *x); - ACE_CDR::Boolean write_wstring (ACE_CDR::ULong length, - const ACE_CDR::WChar *x); - //@} - - /// @note the portion written starts at and ends - /// at . - /// The length is *NOT* stored into the CDR stream. - //@{ @name Array write operations - ACE_CDR::Boolean write_boolean_array (const ACE_CDR::Boolean *x, - ACE_CDR::ULong length); - ACE_CDR::Boolean write_char_array (const ACE_CDR::Char *x, - ACE_CDR::ULong length); - ACE_CDR::Boolean write_wchar_array (const ACE_CDR::WChar* x, - ACE_CDR::ULong length); - ACE_CDR::Boolean write_octet_array (const ACE_CDR::Octet* x, - ACE_CDR::ULong length); - ACE_CDR::Boolean write_short_array (const ACE_CDR::Short *x, - ACE_CDR::ULong length); - ACE_CDR::Boolean write_ushort_array (const ACE_CDR::UShort *x, - ACE_CDR::ULong length); - ACE_CDR::Boolean write_long_array (const ACE_CDR::Long *x, - ACE_CDR::ULong length); - ACE_CDR::Boolean write_ulong_array (const ACE_CDR::ULong *x, - ACE_CDR::ULong length); - ACE_CDR::Boolean write_longlong_array (const ACE_CDR::LongLong* x, - ACE_CDR::ULong length); - ACE_CDR::Boolean write_ulonglong_array (const ACE_CDR::ULongLong *x, - ACE_CDR::ULong length); - ACE_CDR::Boolean write_float_array (const ACE_CDR::Float *x, - ACE_CDR::ULong length); - ACE_CDR::Boolean write_double_array (const ACE_CDR::Double *x, - ACE_CDR::ULong length); - ACE_CDR::Boolean write_longdouble_array (const ACE_CDR::LongDouble* x, - ACE_CDR::ULong length); - - /// - /// Adjust to @a size and count octets. - void adjust (size_t size); - - /// As above, but now the size and alignment requirements may be - /// different. - void adjust (size_t size, - size_t align); - -private: - /// disallow copying... - ACE_SizeCDR (const ACE_SizeCDR& rhs); - ACE_SizeCDR& operator= (const ACE_SizeCDR& rhs); - - ACE_CDR::Boolean write_1 (const ACE_CDR::Octet *x); - ACE_CDR::Boolean write_2 (const ACE_CDR::UShort *x); - ACE_CDR::Boolean write_4 (const ACE_CDR::ULong *x); - ACE_CDR::Boolean write_8 (const ACE_CDR::ULongLong *x); - ACE_CDR::Boolean write_16 (const ACE_CDR::LongDouble *x); - - /** - * write an array of @a length elements, each of @a size bytes and the - * start aligned at a multiple of . The elements are assumed - * to be packed with the right alignment restrictions. It is mostly - * designed for buffers of the basic types. - * - * This operation uses ; as explained above it is expected - * that using assignment is faster that for one element, - * but for several elements should be more efficient, it - * could be interesting to find the break even point and optimize - * for that case, but that would be too platform dependent. - */ - ACE_CDR::Boolean write_array (const void *x, - size_t size, - size_t align, - ACE_CDR::ULong length); - - - ACE_CDR::Boolean write_wchar_array_i (const ACE_CDR::WChar* x, - ACE_CDR::ULong length); - -private: - /// Set to false when an error ocurrs. - bool good_bit_; - - /// Current size. - size_t size_; - -protected: - /// GIOP version information - ACE_CDR::Octet major_version_; - ACE_CDR::Octet minor_version_; -}; - -// @@ This operator should not be inlined since they force SString.h -// to be included in this header. -extern ACE_Export ACE_CDR::Boolean operator<< (ACE_SizeCDR &ss, - const ACE_CString &x); - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -# include "ace/CDR_Size.inl" -#else /* __ACE_INLINE__ */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -// Not used by CORBA or TAO -extern ACE_Export ACE_CDR::Boolean operator<< (ACE_SizeCDR &ss, - ACE_CDR::Char x); - -// CDR size-calculating output operators for primitive types - -extern ACE_Export ACE_CDR::Boolean operator<< (ACE_SizeCDR &ss, - ACE_CDR::Short x); -extern ACE_Export ACE_CDR::Boolean operator<< (ACE_SizeCDR &ss, - ACE_CDR::UShort x); -extern ACE_Export ACE_CDR::Boolean operator<< (ACE_SizeCDR &ss, - ACE_CDR::Long x); -extern ACE_Export ACE_CDR::Boolean operator<< (ACE_SizeCDR &ss, - ACE_CDR::ULong x); -extern ACE_Export ACE_CDR::Boolean operator<< (ACE_SizeCDR &ss, - ACE_CDR::LongLong x); -extern ACE_Export ACE_CDR::Boolean operator<< (ACE_SizeCDR &ss, - ACE_CDR::ULongLong x); -extern ACE_Export ACE_CDR::Boolean operator<< (ACE_SizeCDR& ss, - ACE_CDR::LongDouble x); -extern ACE_Export ACE_CDR::Boolean operator<< (ACE_SizeCDR &ss, - ACE_CDR::Float x); -extern ACE_Export ACE_CDR::Boolean operator<< (ACE_SizeCDR &ss, - ACE_CDR::Double x); -extern ACE_Export ACE_CDR::Boolean operator<< (ACE_SizeCDR &ss, - const ACE_CDR::Fixed &x); - -// CDR size-calculating output operator from helper classes - -extern ACE_Export ACE_CDR::Boolean operator<< (ACE_SizeCDR &ss, - ACE_OutputCDR::from_boolean x); -extern ACE_Export ACE_CDR::Boolean operator<< (ACE_SizeCDR &ss, - ACE_OutputCDR::from_char x); -extern ACE_Export ACE_CDR::Boolean operator<< (ACE_SizeCDR &ss, - ACE_OutputCDR::from_wchar x); -extern ACE_Export ACE_CDR::Boolean operator<< (ACE_SizeCDR &ss, - ACE_OutputCDR::from_octet x); -extern ACE_Export ACE_CDR::Boolean operator<< (ACE_SizeCDR &ss, - ACE_OutputCDR::from_string x); -extern ACE_Export ACE_CDR::Boolean operator<< (ACE_SizeCDR &ss, - ACE_OutputCDR::from_wstring x); -extern ACE_Export ACE_CDR::Boolean operator<< (ACE_SizeCDR &ss, - const ACE_CDR::Char* x); -extern ACE_Export ACE_CDR::Boolean operator<< (ACE_SizeCDR &ss, - const ACE_CDR::WChar* x); - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* __ACE_INLINE__ */ - - -#include /**/ "ace/post.h" - -#endif /* ACE_CDR_SIZE_H */ diff --git a/modules/worldengine/deps/acelite/ace/CDR_Size.inl b/modules/worldengine/deps/acelite/ace/CDR_Size.inl deleted file mode 100644 index 9b83b6f72e..0000000000 --- a/modules/worldengine/deps/acelite/ace/CDR_Size.inl +++ /dev/null @@ -1,435 +0,0 @@ -// -*- C++ -*- -#include "ace/OS_NS_string.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_INLINE -ACE_SizeCDR::ACE_SizeCDR (ACE_CDR::Octet major_version, - ACE_CDR::Octet minor_version) - : good_bit_ (true), - size_ (0), - major_version_ (major_version), - minor_version_ (minor_version) -{ -} - -ACE_INLINE bool -ACE_SizeCDR::good_bit (void) const -{ - return this->good_bit_; -} - -ACE_INLINE void -ACE_SizeCDR::reset (void) -{ - this->size_ = 0; -} - -ACE_INLINE size_t -ACE_SizeCDR::total_length (void) const -{ - return this->size_; -} - - -// Encode the CDR stream. - -ACE_INLINE ACE_CDR::Boolean -ACE_SizeCDR::write_octet (ACE_CDR::Octet x) -{ - return this->write_1 (reinterpret_cast (&x)); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_SizeCDR::write_boolean (ACE_CDR::Boolean x) -{ - return (ACE_CDR::Boolean) this->write_octet (x ? (ACE_CDR::Octet) 1 : (ACE_CDR::Octet) 0); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_SizeCDR::write_char (ACE_CDR::Char x) -{ - // Note: translator framework is not supported. - // - return this->write_1 (reinterpret_cast (&x)); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_SizeCDR::write_short (ACE_CDR::Short x) -{ - return this->write_2 (reinterpret_cast (&x)); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_SizeCDR::write_ushort (ACE_CDR::UShort x) -{ - return this->write_2 (reinterpret_cast (&x)); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_SizeCDR::write_long (ACE_CDR::Long x) -{ - return this->write_4 (reinterpret_cast (&x)); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_SizeCDR::write_ulong (ACE_CDR::ULong x) -{ - return this->write_4 (reinterpret_cast (&x)); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_SizeCDR::write_longlong (const ACE_CDR::LongLong &x) -{ - return this->write_8 (reinterpret_cast (&x)); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_SizeCDR::write_ulonglong (const ACE_CDR::ULongLong &x) -{ - const void *temp = &x; - return this->write_8 (reinterpret_cast (temp)); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_SizeCDR::write_float (ACE_CDR::Float x) -{ - const void *temp = &x; - return this->write_4 (reinterpret_cast (temp)); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_SizeCDR::write_double (const ACE_CDR::Double &x) -{ - const void *temp = &x; - return this->write_8 (reinterpret_cast (temp)); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_SizeCDR::write_longdouble (const ACE_CDR::LongDouble &x) -{ - const void *temp = &x; - return this->write_16 (reinterpret_cast (temp)); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_SizeCDR::write_fixed (const ACE_CDR::Fixed &x) -{ - return this->write_array (&x, ACE_CDR::OCTET_SIZE, ACE_CDR::OCTET_ALIGN, - (x.fixed_digits () + 2) / 2); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_SizeCDR::write_string (const ACE_CDR::Char *x) -{ - if (x != 0) - { - const ACE_CDR::ULong len = - static_cast (ACE_OS::strlen (x)); - return this->write_string (len, x); - } - return this->write_string (0, 0); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_SizeCDR::write_wstring (const ACE_CDR::WChar *x) -{ - if (x != 0) - { - ACE_CDR::ULong len = - static_cast (ACE_OS::strlen (x)); - return this->write_wstring (len, x); - } - return this->write_wstring (0, 0); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_SizeCDR::write_char_array (const ACE_CDR::Char *x, - ACE_CDR::ULong length) -{ - // Note: translator framework is not supported. - // - return this->write_array (x, - ACE_CDR::OCTET_SIZE, - ACE_CDR::OCTET_ALIGN, - length); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_SizeCDR::write_wchar_array (const ACE_CDR::WChar* x, - ACE_CDR::ULong length) -{ - // Note: translator framework is not supported. - // - if (ACE_OutputCDR::wchar_maxbytes () == 0) - { - errno = EACCES; - return (ACE_CDR::Boolean) (this->good_bit_ = false); - } - if (ACE_OutputCDR::wchar_maxbytes () == sizeof (ACE_CDR::WChar)) - return this->write_array (x, - sizeof (ACE_CDR::WChar), - sizeof (ACE_CDR::WChar) == 2 - ? ACE_CDR::SHORT_ALIGN - : ACE_CDR::LONG_ALIGN, - length); - return this->write_wchar_array_i (x,length); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_SizeCDR::write_octet_array (const ACE_CDR::Octet* x, - ACE_CDR::ULong length) -{ - return this->write_array (x, - ACE_CDR::OCTET_SIZE, - ACE_CDR::OCTET_ALIGN, - length); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_SizeCDR::write_short_array (const ACE_CDR::Short *x, - ACE_CDR::ULong length) -{ - return this->write_array (x, - ACE_CDR::SHORT_SIZE, - ACE_CDR::SHORT_ALIGN, - length); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_SizeCDR::write_ushort_array (const ACE_CDR::UShort *x, - ACE_CDR::ULong length) -{ - return this->write_array (x, - ACE_CDR::SHORT_SIZE, - ACE_CDR::SHORT_ALIGN, - length); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_SizeCDR::write_long_array (const ACE_CDR::Long *x, - ACE_CDR::ULong length) -{ - return this->write_array (x, - ACE_CDR::LONG_SIZE, - ACE_CDR::LONG_ALIGN, - length); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_SizeCDR::write_ulong_array (const ACE_CDR::ULong *x, - ACE_CDR::ULong length) -{ - return this->write_array (x, - ACE_CDR::LONG_SIZE, - ACE_CDR::LONG_ALIGN, - length); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_SizeCDR::write_longlong_array (const ACE_CDR::LongLong *x, - ACE_CDR::ULong length) -{ - return this->write_array (x, - ACE_CDR::LONGLONG_SIZE, - ACE_CDR::LONGLONG_ALIGN, - length); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_SizeCDR::write_ulonglong_array (const ACE_CDR::ULongLong *x, - ACE_CDR::ULong length) -{ - return this->write_array (x, - ACE_CDR::LONGLONG_SIZE, - ACE_CDR::LONGLONG_ALIGN, - length); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_SizeCDR::write_float_array (const ACE_CDR::Float *x, - ACE_CDR::ULong length) -{ - return this->write_array (x, - ACE_CDR::LONG_SIZE, - ACE_CDR::LONG_ALIGN, - length); -} - - -ACE_INLINE ACE_CDR::Boolean -ACE_SizeCDR::write_double_array (const ACE_CDR::Double *x, - ACE_CDR::ULong length) -{ - return this->write_array (x, - ACE_CDR::LONGLONG_SIZE, - ACE_CDR::LONGLONG_ALIGN, - length); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_SizeCDR::write_longdouble_array (const ACE_CDR::LongDouble* x, - ACE_CDR::ULong length) -{ - return this->write_array (x, - ACE_CDR::LONGDOUBLE_SIZE, - ACE_CDR::LONGDOUBLE_ALIGN, - length); -} - - -// **************************************************************** - - -ACE_INLINE ACE_CDR::Boolean -operator<< (ACE_SizeCDR &ss, ACE_CDR::Char x) -{ - ss.write_char (x); - return (ACE_CDR::Boolean) ss.good_bit (); -} - -ACE_INLINE ACE_CDR::Boolean -operator<< (ACE_SizeCDR &ss, ACE_CDR::Short x) -{ - ss.write_short (x); - return (ACE_CDR::Boolean) ss.good_bit (); -} - -ACE_INLINE ACE_CDR::Boolean -operator<< (ACE_SizeCDR &ss, ACE_CDR::UShort x) -{ - ss.write_ushort (x); - return (ACE_CDR::Boolean) ss.good_bit (); -} - -ACE_INLINE ACE_CDR::Boolean -operator<< (ACE_SizeCDR &ss, ACE_CDR::Long x) -{ - ss.write_long (x); - return (ACE_CDR::Boolean) ss.good_bit (); -} - -ACE_INLINE ACE_CDR::Boolean -operator<< (ACE_SizeCDR &ss, ACE_CDR::ULong x) -{ - ss.write_ulong (x); - return (ACE_CDR::Boolean) ss.good_bit (); -} - -ACE_INLINE ACE_CDR::Boolean -operator<< (ACE_SizeCDR &ss, ACE_CDR::LongLong x) -{ - ss.write_longlong (x); - return (ACE_CDR::Boolean) ss.good_bit (); -} - -ACE_INLINE ACE_CDR::Boolean -operator<< (ACE_SizeCDR &ss, ACE_CDR::ULongLong x) -{ - ss.write_ulonglong (x); - return (ACE_CDR::Boolean) ss.good_bit (); -} - -ACE_INLINE ACE_CDR::Boolean -operator<< (ACE_SizeCDR &ss, ACE_CDR::LongDouble x) -{ - ss.write_longdouble (x); - return (ACE_CDR::Boolean) ss.good_bit (); -} - -ACE_INLINE ACE_CDR::Boolean -operator<< (ACE_SizeCDR &ss, ACE_CDR::Float x) -{ - ss.write_float (x); - return (ACE_CDR::Boolean) ss.good_bit (); -} - -ACE_INLINE ACE_CDR::Boolean -operator<< (ACE_SizeCDR &ss, ACE_CDR::Double x) -{ - ss.write_double (x); - return (ACE_CDR::Boolean) ss.good_bit (); -} - -ACE_INLINE ACE_CDR::Boolean -operator<< (ACE_SizeCDR &ss, const ACE_CDR::Fixed &x) -{ - ss.write_fixed (x); - return (ACE_CDR::Boolean) ss.good_bit (); -} - -ACE_INLINE ACE_CDR::Boolean -operator<< (ACE_SizeCDR &ss, const ACE_CDR::Char *x) -{ - ss.write_string (x); - return (ACE_CDR::Boolean) ss.good_bit (); -} - -ACE_INLINE ACE_CDR::Boolean -operator<< (ACE_SizeCDR &ss, const ACE_CDR::WChar *x) -{ - ss.write_wstring (x); - return (ACE_CDR::Boolean) ss.good_bit (); -} - -// The following use the helper classes -ACE_INLINE ACE_CDR::Boolean -operator<< (ACE_SizeCDR &ss, ACE_OutputCDR::from_boolean x) -{ - ss.write_boolean (x.val_); - return (ACE_CDR::Boolean) ss.good_bit (); -} - -ACE_INLINE ACE_CDR::Boolean -operator<< (ACE_SizeCDR &ss, ACE_OutputCDR::from_char x) -{ - ss.write_char (x.val_); - return (ACE_CDR::Boolean) ss.good_bit (); -} - -ACE_INLINE ACE_CDR::Boolean -operator<< (ACE_SizeCDR &ss, ACE_OutputCDR::from_wchar x) -{ - ss.write_wchar (x.val_); - return (ACE_CDR::Boolean) ss.good_bit (); -} - -ACE_INLINE ACE_CDR::Boolean -operator<< (ACE_SizeCDR &ss, ACE_OutputCDR::from_octet x) -{ - ss.write_octet (x.val_); - return (ACE_CDR::Boolean) ss.good_bit (); -} - -ACE_INLINE ACE_CDR::Boolean -operator<< (ACE_SizeCDR &ss, ACE_OutputCDR::from_string x) -{ - ACE_CDR::ULong len = 0; - - if (x.val_ != 0) - { - len = static_cast (ACE_OS::strlen (x.val_)); - } - - ss.write_string (len, x.val_); - return - (ACE_CDR::Boolean) (ss.good_bit () && (!x.bound_ || len <= x.bound_)); -} - -ACE_INLINE ACE_CDR::Boolean -operator<< (ACE_SizeCDR &ss, ACE_OutputCDR::from_wstring x) -{ - ACE_CDR::ULong len = 0; - - if (x.val_ != 0) - { - len = static_cast (ACE_OS::strlen (x.val_)); - } - - ss.write_wstring (len, x.val_); - return - (ACE_CDR::Boolean) (ss.good_bit () && (!x.bound_ || len <= x.bound_)); -} - - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/CDR_Stream.cpp b/modules/worldengine/deps/acelite/ace/CDR_Stream.cpp deleted file mode 100644 index bf99178977..0000000000 --- a/modules/worldengine/deps/acelite/ace/CDR_Stream.cpp +++ /dev/null @@ -1,2256 +0,0 @@ -#include "ace/CDR_Stream.h" -#include "ace/SString.h" -#include "ace/Auto_Ptr.h" -#include "ace/Truncate.h" - -#if !defined (__ACE_INLINE__) -# include "ace/CDR_Stream.inl" -#endif /* ! __ACE_INLINE__ */ - -// **************************************************************** - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -size_t ACE_OutputCDR::wchar_maxbytes_ = sizeof (ACE_CDR::WChar); - -ACE_OutputCDR::ACE_OutputCDR (size_t size, - int byte_order, - ACE_Allocator *buffer_allocator, - ACE_Allocator *data_block_allocator, - ACE_Allocator *message_block_allocator, - size_t memcpy_tradeoff, - ACE_CDR::Octet major_version, - ACE_CDR::Octet minor_version) - : start_ ((size ? size : (size_t) ACE_CDR::DEFAULT_BUFSIZE) + ACE_CDR::MAX_ALIGNMENT, - ACE_Message_Block::MB_DATA, - 0, - 0, - buffer_allocator, - 0, - 0, - ACE_Time_Value::zero, - ACE_Time_Value::max_time, - data_block_allocator, - message_block_allocator), -#if !defined (ACE_LACKS_CDR_ALIGNMENT) - current_alignment_ (0), -#endif /* ACE_LACKS_CDR_ALIGNMENT */ - current_is_writable_ (true), - do_byte_swap_ (byte_order != ACE_CDR_BYTE_ORDER), - good_bit_ (true), - memcpy_tradeoff_ (memcpy_tradeoff), - major_version_ (major_version), - minor_version_ (minor_version), - char_translator_ (0), - wchar_translator_ (0) - -{ - ACE_CDR::mb_align (&this->start_); - this->current_ = &this->start_; - -#if defined (ACE_HAS_MONITOR_POINTS) && (ACE_HAS_MONITOR_POINTS == 1) - ACE_NEW (this->monitor_, - ACE::Monitor_Control::Size_Monitor); - this->monitor_->receive (this->total_length ()); -#endif /* ACE_HAS_MONITOR_POINTS==1 */ -} - -ACE_OutputCDR::ACE_OutputCDR (char *data, - size_t size, - int byte_order, - ACE_Allocator *buffer_allocator, - ACE_Allocator *data_block_allocator, - ACE_Allocator *message_block_allocator, - size_t memcpy_tradeoff, - ACE_CDR::Octet major_version, - ACE_CDR::Octet minor_version) - : start_ (size, - ACE_Message_Block::MB_DATA, - 0, - data, - buffer_allocator, - 0, - 0, - ACE_Time_Value::zero, - ACE_Time_Value::max_time, - data_block_allocator, - message_block_allocator), -#if !defined (ACE_LACKS_CDR_ALIGNMENT) - current_alignment_ (0), -#endif /* ACE_LACKS_CDR_ALIGNMENT */ - current_is_writable_ (true), - do_byte_swap_ (byte_order != ACE_CDR_BYTE_ORDER), - good_bit_ (true), - memcpy_tradeoff_ (memcpy_tradeoff), - major_version_ (major_version), - minor_version_ (minor_version), - char_translator_ (0), - wchar_translator_ (0) -{ - // We cannot trust the buffer to be properly aligned - ACE_CDR::mb_align (&this->start_); - this->current_ = &this->start_; - -#if defined (ACE_HAS_MONITOR_POINTS) && (ACE_HAS_MONITOR_POINTS == 1) - ACE_NEW (this->monitor_, - ACE::Monitor_Control::Size_Monitor); - this->monitor_->receive (this->total_length ()); -#endif /* ACE_HAS_MONITOR_POINTS==1 */ -} - -ACE_OutputCDR::ACE_OutputCDR (ACE_Data_Block *data_block, - int byte_order, - ACE_Allocator *message_block_allocator, - size_t memcpy_tradeoff, - ACE_CDR::Octet major_version, - ACE_CDR::Octet minor_version) - : start_ (data_block, - ACE_Message_Block::DONT_DELETE, - message_block_allocator), -#if !defined (ACE_LACKS_CDR_ALIGNMENT) - current_alignment_ (0), -#endif /* ACE_LACKS_CDR_ALIGNMENT */ - current_is_writable_ (true), - do_byte_swap_ (byte_order != ACE_CDR_BYTE_ORDER), - good_bit_ (true), - memcpy_tradeoff_ (memcpy_tradeoff), - major_version_ (major_version), - minor_version_ (minor_version), - char_translator_ (0), - wchar_translator_ (0) -{ - // We cannot trust the buffer to be properly aligned - ACE_CDR::mb_align (&this->start_); - this->current_ = &this->start_; - -#if defined (ACE_HAS_MONITOR_POINTS) && (ACE_HAS_MONITOR_POINTS == 1) - ACE_NEW (this->monitor_, - ACE::Monitor_Control::Size_Monitor); - this->monitor_->receive (this->total_length ()); -#endif /* ACE_HAS_MONITOR_POINTS==1 */ -} - -ACE_OutputCDR::ACE_OutputCDR (ACE_Message_Block *data, - int byte_order, - size_t memcpy_tradeoff, - ACE_CDR::Octet major_version, - ACE_CDR::Octet minor_version) - : start_ (data->data_block ()->duplicate ()), -#if !defined (ACE_LACKS_CDR_ALIGNMENT) - current_alignment_ (0), -#endif /* ACE_LACKS_CDR_ALIGNMENT */ - current_is_writable_ (true), - do_byte_swap_ (byte_order != ACE_CDR_BYTE_ORDER), - good_bit_ (true), - memcpy_tradeoff_ (memcpy_tradeoff), - major_version_ (major_version), - minor_version_ (minor_version), - char_translator_ (0), - wchar_translator_ (0) -{ - // We cannot trust the buffer to be properly aligned - ACE_CDR::mb_align (&this->start_); - this->current_ = &this->start_; - -#if defined (ACE_HAS_MONITOR_POINTS) && (ACE_HAS_MONITOR_POINTS == 1) - ACE_NEW (this->monitor_, - ACE::Monitor_Control::Size_Monitor); - this->monitor_->receive (this->total_length ()); -#endif /* ACE_HAS_MONITOR_POINTS==1 */ -} - -/*static*/ void -ACE_OutputCDR::wchar_maxbytes (size_t maxbytes) -{ - ACE_OutputCDR::wchar_maxbytes_ = maxbytes; -} - -/*static*/ size_t -ACE_OutputCDR::wchar_maxbytes () -{ - return ACE_OutputCDR::wchar_maxbytes_; -} - -int -ACE_OutputCDR::grow_and_adjust (size_t size, - size_t align, - char*& buf) -{ - if (!this->current_is_writable_ - || this->current_->cont () == 0 - || this->current_->cont ()->size () < size + ACE_CDR::MAX_ALIGNMENT) - { - // Calculate the new buffer's length; if growing for encode, we - // don't grow in "small" chunks because of the cost. - size_t cursize = this->current_->size (); - if (this->current_->cont () != 0) - cursize = this->current_->cont ()->size (); - size_t minsize = size; - -#if !defined (ACE_LACKS_CDR_ALIGNMENT) - minsize += ACE_CDR::MAX_ALIGNMENT; -#endif /* ACE_LACKS_CDR_ALIGNMENT */ - - // Make sure that there is enough room for bytes, but - // also make it bigger than whatever our current size is. - if (minsize < cursize) - minsize = cursize; - - size_t const newsize = ACE_CDR::next_size (minsize); - - this->good_bit_ = false; - ACE_Message_Block* tmp = 0; - ACE_NEW_RETURN (tmp, - ACE_Message_Block (newsize, - ACE_Message_Block::MB_DATA, - 0, - 0, - this->current_->data_block ()->allocator_strategy (), - 0, - 0, - ACE_Time_Value::zero, - ACE_Time_Value::max_time, - this->current_->data_block ()->data_block_allocator ()), - -1); - - // Message block initialization may fail while the construction - // succeds. Since as a matter of policy, ACE may throw no - // exceptions, we have to do a separate check like this. - if (tmp != 0 && tmp->size () < newsize) - { - delete tmp; - errno = ENOMEM; - return -1; - } - - this->good_bit_ = true; - -#if !defined (ACE_LACKS_CDR_ALIGNMENT) - // The new block must start with the same alignment as the - // previous block finished. - ptrdiff_t const tmpalign = - reinterpret_cast (tmp->rd_ptr ()) % ACE_CDR::MAX_ALIGNMENT; - ptrdiff_t const curalign = - static_cast (this->current_alignment_) % ACE_CDR::MAX_ALIGNMENT; - ptrdiff_t offset = curalign - tmpalign; - if (offset < 0) - offset += ACE_CDR::MAX_ALIGNMENT; - tmp->rd_ptr (static_cast (offset)); - tmp->wr_ptr (tmp->rd_ptr ()); -#endif /* ACE_LACKS_CDR_ALIGNMENT */ - - // grow the chain and set the current block. - tmp->cont (this->current_->cont ()); - this->current_->cont (tmp); - } - this->current_ = this->current_->cont (); - this->current_is_writable_ = true; - - return this->adjust (size, align, buf); -} - -ACE_CDR::Boolean -ACE_OutputCDR::write_wchar (ACE_CDR::WChar x) -{ - if (this->wchar_translator_ != 0) - return (this->good_bit_ = this->wchar_translator_->write_wchar (*this, x)); - if (ACE_OutputCDR::wchar_maxbytes_ == 0) - { - errno = EACCES; - return (this->good_bit_ = false); - } - if (static_cast (major_version_) == 1 - && static_cast (minor_version_) == 2) - { - ACE_CDR::Octet len = - static_cast (ACE_OutputCDR::wchar_maxbytes_); - if (this->write_1 (&len)) - { - if (ACE_OutputCDR::wchar_maxbytes_ == sizeof(ACE_CDR::WChar)) - return - this->write_octet_array ( - reinterpret_cast (&x), - static_cast (len)); - else - if (ACE_OutputCDR::wchar_maxbytes_ == 2) - { - ACE_CDR::Short sx = static_cast (x); - return - this->write_octet_array ( - reinterpret_cast (&sx), - static_cast (len)); - } - else - { - ACE_CDR::Octet ox = static_cast (x); - return - this->write_octet_array ( - reinterpret_cast (&ox), - static_cast (len)); - } - } - } - else if (static_cast (minor_version_) == 0) - { // wchar is not allowed with GIOP 1.0. - errno = EINVAL; - return (this->good_bit_ = false); - } - if (ACE_OutputCDR::wchar_maxbytes_ == sizeof (ACE_CDR::WChar)) - { - void const * const temp = &x; - return - this->write_4 (reinterpret_cast (temp)); - } - else if (ACE_OutputCDR::wchar_maxbytes_ == 2) - { - ACE_CDR::Short sx = static_cast (x); - return this->write_2 (reinterpret_cast (&sx)); - } - ACE_CDR::Octet ox = static_cast (x); - return this->write_1 (reinterpret_cast (&ox)); -} - -ACE_CDR::Boolean -ACE_OutputCDR::write_string (ACE_CDR::ULong len, - const ACE_CDR::Char *x) -{ - // @@ This is a slight violation of "Optimize for the common case", - // i.e. normally the translator will be 0, but OTOH the code is - // smaller and should be better for the cache ;-) ;-) - if (this->char_translator_ != 0) - return this->char_translator_->write_string (*this, len, x); - - if (len != 0) - { - if (this->write_ulong (len + 1)) - return this->write_char_array (x, len + 1); - } - else - { - // Be nice to programmers: treat nulls as empty strings not - // errors. (OMG-IDL supports languages that don't use the C/C++ - // notion of null v. empty strings; nulls aren't part of the OMG-IDL - // string model.) - if (this->write_ulong (1)) - return this->write_char (0); - } - - return (this->good_bit_ = false); -} - -ACE_CDR::Boolean -ACE_OutputCDR::write_string (const ACE_CString &x) -{ - // @@ Leave this method in here, not the `.i' file so that we don't - // have to unnecessarily pull in the `ace/SString.h' header. - return this->write_string (static_cast (x.length ()), - x.c_str()); -} - -ACE_CDR::Boolean -ACE_OutputCDR::write_wstring (ACE_CDR::ULong len, - const ACE_CDR::WChar *x) -{ - // @@ This is a slight violation of "Optimize for the common case", - // i.e. normally the translator will be 0, but OTOH the code is - // smaller and should be better for the cache ;-) ;-) - // What do we do for GIOP 1.2??? - if (this->wchar_translator_ != 0) - return this->wchar_translator_->write_wstring (*this, len, x); - if (ACE_OutputCDR::wchar_maxbytes_ == 0) - { - errno = EACCES; - return (this->good_bit_ = false); - } - - if (static_cast (this->major_version_) == 1 - && static_cast (this->minor_version_) == 2) - { - if (x != 0) - { - //In GIOP 1.2 the length field contains the number of bytes - //the wstring occupies rather than number of wchars - //Taking sizeof might not be a good way! This is a temporary fix. - ACE_CDR::Boolean good_ulong = - this->write_ulong ( - ACE_Utils::truncate_cast ( - ACE_OutputCDR::wchar_maxbytes_ * len)); - - if (good_ulong) - { - return this->write_wchar_array (x, len); - } - } - else - { - //In GIOP 1.2 zero length wstrings are legal - return this->write_ulong (0); - } - } - - else - if (x != 0) - { - if (this->write_ulong (len + 1)) - return this->write_wchar_array (x, len + 1); - } - else if (this->write_ulong (1)) - return this->write_wchar (0); - return (this->good_bit_ = false); -} - -ACE_CDR::Boolean -ACE_OutputCDR::write_octet_array_mb (const ACE_Message_Block* mb) -{ - // If the buffer is small and it fits in the current message - // block it is be cheaper just to copy the buffer. - for (const ACE_Message_Block* i = mb; - i != 0; - i = i->cont ()) - { - size_t const length = i->length (); - - // If the mb does not own its data we are forced to make a copy. - if (ACE_BIT_ENABLED (i->flags (), - ACE_Message_Block::DONT_DELETE)) - { - if (! this->write_array (i->rd_ptr (), - ACE_CDR::OCTET_SIZE, - ACE_CDR::OCTET_ALIGN, - static_cast (length))) - return (this->good_bit_ = false); - continue; - } - - if (length < this->memcpy_tradeoff_ - && this->current_->wr_ptr () + length < this->current_->end ()) - { - if (! this->write_array (i->rd_ptr (), - ACE_CDR::OCTET_SIZE, - ACE_CDR::OCTET_ALIGN, - static_cast (length))) - return (this->good_bit_ = false); - continue; - } - - ACE_Message_Block* cont = 0; - this->good_bit_ = false; - ACE_NEW_RETURN (cont, - ACE_Message_Block (i->data_block ()->duplicate ()), - false); - this->good_bit_ = true; - - if (this->current_->cont () != 0) - ACE_Message_Block::release (this->current_->cont ()); - cont->rd_ptr (i->rd_ptr ()); - cont->wr_ptr (i->wr_ptr ()); - - this->current_->cont (cont); - this->current_ = cont; - this->current_is_writable_ = false; -#if !defined (ACE_LACKS_CDR_ALIGNMENT) - this->current_alignment_ = - (this->current_alignment_ + cont->length ()) % ACE_CDR::MAX_ALIGNMENT; -#endif /* ACE_LACKS_CDR_ALIGNMENT */ - } - - return true; -} - -ACE_CDR::Boolean -ACE_OutputCDR::write_1 (const ACE_CDR::Octet *x) -{ - char *buf = 0; - if (this->adjust (1, buf) == 0) - { - *reinterpret_cast (buf) = *x; - return true; - } - - return false; -} - -ACE_CDR::Boolean -ACE_OutputCDR::write_2 (const ACE_CDR::UShort *x) -{ - char *buf = 0; - if (this->adjust (ACE_CDR::SHORT_SIZE, buf) == 0) - { -#if !defined (ACE_ENABLE_SWAP_ON_WRITE) - *reinterpret_cast (buf) = *x; - return true; -#else - if (!this->do_byte_swap_) - { - *reinterpret_cast (buf) = *x; - return true; - } - else - { - ACE_CDR::swap_2 (reinterpret_cast (x), buf); - return true; - } -#endif /* ACE_ENABLE_SWAP_ON_WRITE */ - } - - return false; -} - -ACE_CDR::Boolean -ACE_OutputCDR::write_4 (const ACE_CDR::ULong *x) -{ - char *buf = 0; - if (this->adjust (ACE_CDR::LONG_SIZE, buf) == 0) - { -#if !defined (ACE_ENABLE_SWAP_ON_WRITE) - *reinterpret_cast (buf) = *x; - return true; -#else - if (!this->do_byte_swap_) - { - *reinterpret_cast (buf) = *x; - return true; - } - else - { - ACE_CDR::swap_4 (reinterpret_cast (x), buf); - return true; - } -#endif /* ACE_ENABLE_SWAP_ON_WRITE */ - } - - return false; -} - -ACE_CDR::Boolean -ACE_OutputCDR::write_8 (const ACE_CDR::ULongLong *x) -{ - char *buf = 0; - - if (this->adjust (ACE_CDR::LONGLONG_SIZE, buf) == 0) - { -#if !defined (ACE_ENABLE_SWAP_ON_WRITE) - *reinterpret_cast (buf) = *x; - return true; -#else - if (!this->do_byte_swap_) - { - *reinterpret_cast (buf) = *x; - return true; - } - else - { - ACE_CDR::swap_8 (reinterpret_cast (x), buf); - return true; - } -#endif /* ACE_ENABLE_SWAP_ON_WRITE */ - } - - return false; -} - -ACE_CDR::Boolean -ACE_OutputCDR::write_16 (const ACE_CDR::LongDouble *x) -{ - char* buf = 0; - if (this->adjust (ACE_CDR::LONGDOUBLE_SIZE, - ACE_CDR::LONGDOUBLE_ALIGN, - buf) == 0) - { -#if !defined (ACE_ENABLE_SWAP_ON_WRITE) - *reinterpret_cast (buf) = *x; - return 1; -#else - if (!this->do_byte_swap_) - { - *reinterpret_cast (buf) = *x; - return true; - } - else - { - ACE_CDR::swap_16 (reinterpret_cast (x), buf); - return true; - } -#endif /* ACE_ENABLE_SWAP_ON_WRITE */ - } - - return false; -} - -ACE_CDR::Boolean -ACE_OutputCDR::write_wchar_array_i (const ACE_CDR::WChar *x, - ACE_CDR::ULong length) -{ - if (length == 0) - return true; - char* buf = 0; - size_t const align = (ACE_OutputCDR::wchar_maxbytes_ == 2) ? - ACE_CDR::SHORT_ALIGN : - ACE_CDR::OCTET_ALIGN; - - if (this->adjust (ACE_OutputCDR::wchar_maxbytes_ * length, align, buf) == 0) - { - if (ACE_OutputCDR::wchar_maxbytes_ == 2) - { - ACE_CDR::UShort *sb = reinterpret_cast (buf); - for (size_t i = 0; i < length; ++i) -#if !defined (ACE_ENABLE_SWAP_ON_WRITE) - sb[i] = static_cast (x[i]); -#else - if (!this->do_byte_swap_) - sb[i] = static_cast (x[i]); - else - { - ACE_CDR::UShort sx = static_cast (x[i]); - ACE_CDR::swap_2 (reinterpret_cast (&sx), &buf[i * 2]); - } -#endif /* ACE_ENABLE_SWAP_ON_WRITE */ - } - else - { - for (size_t i = 0; i < length; ++i) - buf[i] = static_cast (x[i]); - } - return this->good_bit_; - } - return false; -} - - -ACE_CDR::Boolean -ACE_OutputCDR::write_array (const void *x, - size_t size, - size_t align, - ACE_CDR::ULong length) -{ - if (length == 0) - return true; - char *buf = 0; - if (this->adjust (size * length, align, buf) == 0) - { -#if !defined (ACE_ENABLE_SWAP_ON_WRITE) - ACE_OS::memcpy (buf, x, size*length); - return true; -#else - if (!this->do_byte_swap_ || size == 1) - { - ACE_OS::memcpy (buf, x, size*length); - return true; - } - else - { - const char *source = reinterpret_cast (x); - switch (size) - { - case 2: - ACE_CDR::swap_2_array (source, buf, length); - return true; - case 4: - ACE_CDR::swap_4_array (source, buf, length); - return true; - case 8: - ACE_CDR::swap_8_array (source, buf, length); - return true; - case 16: - ACE_CDR::swap_16_array (source, buf, length); - return true; - default: - // TODO: print something? - this->good_bit_ = false; - return false; - } - } -#endif /* ACE_ENABLE_SWAP_ON_WRITE */ - } - this->good_bit_ = false; - return false; -} - - -ACE_CDR::Boolean -ACE_OutputCDR::write_boolean_array (const ACE_CDR::Boolean* x, - ACE_CDR::ULong length) -{ - // It is hard to optimize this, the spec requires that on the wire - // booleans be represented as a byte with value 0 or 1, but in - // memory it is possible (though very unlikely) that a boolean has - // a non-zero value (different from 1). - // We resort to a simple loop. - ACE_CDR::Boolean const * const end = x + length; - - for (ACE_CDR::Boolean const * i = x; - i != end && this->good_bit (); - ++i) - (void) this->write_boolean (*i); - - return this->good_bit (); -} - -char * -ACE_OutputCDR::write_long_placeholder (void) -{ - char *buf = 0; - if (this->adjust (ACE_CDR::LONG_SIZE, buf) == 0) - *reinterpret_cast (buf) = 0; - else - buf = 0; - return buf; -} - -char * -ACE_OutputCDR::write_short_placeholder (void) -{ - char *buf = 0; - if (this->adjust (ACE_CDR::SHORT_SIZE, buf) == 0) - *reinterpret_cast (buf) = 0; - else - buf = 0; - return buf; -} - -char * -ACE_OutputCDR::write_boolean_placeholder (void) -{ - char *buf = 0; - if (this->adjust (ACE_CDR::OCTET_SIZE, buf) == 0) - *reinterpret_cast (buf) = 0; - else - buf = 0; - return buf; -} - -char * -ACE_OutputCDR::write_char_placeholder (void) -{ - char *buf = 0; - if (this->adjust (ACE_CDR::OCTET_SIZE, buf) == 0) - *reinterpret_cast (buf) = 0; - else - buf = 0; - return buf; -} - -char * -ACE_OutputCDR::write_octet_placeholder (void) -{ - char *buf = 0; - if (this->adjust (ACE_CDR::OCTET_SIZE, buf) == 0) - *reinterpret_cast (buf) = 0; - else - buf = 0; - return buf; -} - -char * -ACE_OutputCDR::write_longlong_placeholder (void) -{ - char *buf = 0; - if (this->adjust (ACE_CDR::LONGLONG_SIZE, buf) == 0) - *reinterpret_cast (buf) = 0; - else - buf = 0; - return buf; -} - -char * -ACE_OutputCDR::write_float_placeholder (void) -{ - char *buf = 0; - if (this->adjust (ACE_CDR::LONG_SIZE, buf) == 0) - *reinterpret_cast (buf) = 0; - else - buf = 0; - return buf; -} - -char * -ACE_OutputCDR::write_double_placeholder (void) -{ - char *buf = 0; - if (this->adjust (ACE_CDR::LONGLONG_SIZE, buf) == 0) - *reinterpret_cast (buf) = 0; - else - buf = 0; - return buf; -} - -ACE_CDR::Boolean -ACE_OutputCDR::replace (ACE_CDR::Long x, char* loc) -{ - if (this->find (loc) == 0) - return false; - -#if !defined (ACE_ENABLE_SWAP_ON_WRITE) - *reinterpret_cast (loc) = x; -#else - if (!this->do_byte_swap_) - { - *reinterpret_cast (loc) = x; - } - else - { - ACE_CDR::swap_4 (reinterpret_cast (&x), loc); - } -#endif /* ACE_ENABLE_SWAP_ON_WRITE */ - - return true; -} - -ACE_CDR::Boolean -ACE_OutputCDR::replace (ACE_CDR::ULong x, char* loc) -{ - if (this->find (loc) == 0) - return false; - -#if !defined (ACE_ENABLE_SWAP_ON_WRITE) - *reinterpret_cast (loc) = x; -#else - if (!this->do_byte_swap_) - { - *reinterpret_cast (loc) = x; - } - else - { - ACE_CDR::swap_4 (reinterpret_cast (&x), loc); - } -#endif /* ACE_ENABLE_SWAP_ON_WRITE */ - - return true; -} - -ACE_CDR::Boolean -ACE_OutputCDR::replace (ACE_CDR::Short x, char* loc) -{ - if (this->find (loc) == 0) - return false; - -#if !defined (ACE_ENABLE_SWAP_ON_WRITE) - *reinterpret_cast (loc) = x; -#else - if (!this->do_byte_swap_) - { - *reinterpret_cast (loc) = x; - } - else - { - ACE_CDR::swap_2 (reinterpret_cast (&x), loc); - } -#endif /* ACE_ENABLE_SWAP_ON_WRITE */ - - return true; -} - -ACE_CDR::Boolean -ACE_OutputCDR::replace (ACE_CDR::UShort x, char* loc) -{ - if (this->find (loc) == 0) - return false; - -#if !defined (ACE_ENABLE_SWAP_ON_WRITE) - *reinterpret_cast (loc) = x; -#else - if (!this->do_byte_swap_) - { - *reinterpret_cast (loc) = x; - } - else - { - ACE_CDR::swap_2 (reinterpret_cast (&x), loc); - } -#endif /* ACE_ENABLE_SWAP_ON_WRITE */ - - return true; -} - -ACE_CDR::Boolean -ACE_OutputCDR::replace (ACE_CDR::Boolean x, char* loc) -{ - if (this->find (loc) == 0) - return false; - - *reinterpret_cast (loc) = x; - - return true; -} - -ACE_CDR::Boolean -ACE_OutputCDR::replace (ACE_CDR::Char x, char* loc) -{ - if (this->find (loc) == 0) - return false; - - *reinterpret_cast (loc) = x; - - return true; -} - -ACE_CDR::Boolean -ACE_OutputCDR::replace (ACE_CDR::Octet x, char* loc) -{ - if (this->find (loc) == 0) - return false; - - *reinterpret_cast (loc) = x; - - return true; -} - -ACE_CDR::Boolean -ACE_OutputCDR::replace (ACE_CDR::LongLong x, char* loc) -{ - if (this->find (loc) == 0) - return false; - -#if !defined (ACE_ENABLE_SWAP_ON_WRITE) - *reinterpret_cast (loc) = x; -#else - if (!this->do_byte_swap_) - { - *reinterpret_cast (loc) = x; - } - else - { - ACE_CDR::swap_8 (reinterpret_cast (&x), loc); - } -#endif /* ACE_ENABLE_SWAP_ON_WRITE */ - - return true; -} - -ACE_CDR::Boolean -ACE_OutputCDR::replace (ACE_CDR::ULongLong x, char* loc) -{ - if (this->find (loc) == 0) - return false; - -#if !defined (ACE_ENABLE_SWAP_ON_WRITE) - *reinterpret_cast (loc) = x; -#else - if (!this->do_byte_swap_) - { - *reinterpret_cast (loc) = x; - } - else - { - ACE_CDR::swap_8 (reinterpret_cast (&x), loc); - } -#endif /* ACE_ENABLE_SWAP_ON_WRITE */ - - return true; -} - -ACE_CDR::Boolean -ACE_OutputCDR::replace (ACE_CDR::Float x, char* loc) -{ - if (this->find (loc) == 0) - return false; - -#if !defined (ACE_ENABLE_SWAP_ON_WRITE) - *reinterpret_cast (loc) = x; -#else - if (!this->do_byte_swap_) - { - *reinterpret_cast (loc) = x; - } - else - { - ACE_CDR::swap_4 (reinterpret_cast (&x), loc); - } -#endif /* ACE_ENABLE_SWAP_ON_WRITE */ - - return true; -} - -ACE_CDR::Boolean -ACE_OutputCDR::replace (ACE_CDR::Double x, char* loc) -{ - if (this->find (loc) == 0) - return false; - -#if !defined (ACE_ENABLE_SWAP_ON_WRITE) - *reinterpret_cast (loc) = x; -#else - if (!this->do_byte_swap_) - { - *reinterpret_cast (loc) = x; - } - else - { - ACE_CDR::swap_8 (reinterpret_cast (&x), loc); - } -#endif /* ACE_ENABLE_SWAP_ON_WRITE */ - - return true; -} - -int -ACE_OutputCDR::consolidate (void) -{ - // Optimize by only doing something if we need to - if (this->current_ != &this->start_) - { - // Set the number of bytes in the top-level block, reallocating - // if necessary. The rd_ptr and wr_ptr remain at the original offsets - // into the buffer, even if it is reallocated. - // Return an error if the allocation failed. - size_t const newsize = - ACE_CDR::first_size (this->total_length () - + ACE_CDR::MAX_ALIGNMENT); - if (this->start_.size (newsize) < 0) - { - return -1; - } - - // Consolidate the chain into the first block. NOTE that - // ACE_CDR::consolidate can not be used since we don't want to - // overwrite what is already in the first block. We just append it since - // the read and write pointers weren't affected by the resizing above. - // We also don't have to worry about alignment since the start block is - // already aligned. - // NOTE also we know there is a continuation since we checked for it - // above. There is therefore no reason to check for a 0 continuation - // field here. - ACE_Message_Block *cont = this->start_.cont (); - for (const ACE_Message_Block* i = cont; i != 0; i = i->cont ()) - { - this->start_.copy (i->rd_ptr (), i->length ()); - } - - // Release the old blocks that were consolidated and reset the - // current_ and current_is_writable_ to reflect the single used block. - ACE_Message_Block::release (cont); - this->start_.cont (0); - this->current_ = &this->start_; - this->current_is_writable_ = true; - } - - return 0; -} - - -ACE_Message_Block* -ACE_OutputCDR::find (char* loc) -{ - ACE_Message_Block* mb = 0; - for (mb = &this->start_; mb != 0; mb = mb->cont ()) - { - if (loc <= mb->wr_ptr () && loc >= mb->rd_ptr ()) - { - break; - } - } - - return mb; -} - -#if defined (ACE_HAS_MONITOR_POINTS) && (ACE_HAS_MONITOR_POINTS == 1) - -void -ACE_OutputCDR::register_monitor (const char *id) -{ - this->monitor_->name (id); - this->monitor_->add_to_registry (); -} - -void -ACE_OutputCDR::unregister_monitor (void) -{ - this->monitor_->remove_from_registry (); -} - -#endif /* ACE_HAS_MONITOR_POINTS==1 */ - -// **************************************************************** - -ACE_InputCDR::ACE_InputCDR (const char *buf, - size_t bufsiz, - int byte_order, - ACE_CDR::Octet major_version, - ACE_CDR::Octet minor_version) - : start_ (buf, bufsiz), - do_byte_swap_ (byte_order != ACE_CDR_BYTE_ORDER), - good_bit_ (true), - major_version_ (major_version), - minor_version_ (minor_version), - char_translator_ (0), - wchar_translator_ (0) -{ - this->start_.wr_ptr (bufsiz); - -#if defined (ACE_HAS_MONITOR_POINTS) && (ACE_HAS_MONITOR_POINTS == 1) - ACE_NEW (this->monitor_, - ACE::Monitor_Control::Size_Monitor); - this->monitor_->receive (bufsiz); -#endif /* ACE_HAS_MONITOR_POINTS==1 */ -} - -ACE_InputCDR::ACE_InputCDR (size_t bufsiz, - int byte_order, - ACE_CDR::Octet major_version, - ACE_CDR::Octet minor_version) - : start_ (bufsiz), - do_byte_swap_ (byte_order != ACE_CDR_BYTE_ORDER), - good_bit_ (true), - major_version_ (major_version), - minor_version_ (minor_version), - char_translator_ (0), - wchar_translator_ (0) -{ -#if defined (ACE_HAS_MONITOR_POINTS) && (ACE_HAS_MONITOR_POINTS == 1) - ACE_NEW (this->monitor_, - ACE::Monitor_Control::Size_Monitor); - this->monitor_->receive (bufsiz); -#endif /* ACE_HAS_MONITOR_POINTS==1 */ -} - -ACE_InputCDR::ACE_InputCDR (const ACE_Message_Block *data, - int byte_order, - ACE_CDR::Octet major_version, - ACE_CDR::Octet minor_version, - ACE_Lock* lock) - : start_ (0, ACE_Message_Block::MB_DATA, 0, 0, 0, lock), - good_bit_ (true), - major_version_ (major_version), - minor_version_ (minor_version), - char_translator_ (0), - wchar_translator_ (0) -{ -#if defined (ACE_HAS_MONITOR_POINTS) && (ACE_HAS_MONITOR_POINTS == 1) - ACE_NEW (this->monitor_, - ACE::Monitor_Control::Size_Monitor); - this->monitor_->receive (this->start_.total_size ()); -#endif /* ACE_HAS_MONITOR_POINTS==1 */ - - this->reset (data, byte_order); -} - -ACE_InputCDR::ACE_InputCDR (ACE_Data_Block *data, - ACE_Message_Block::Message_Flags flag, - int byte_order, - ACE_CDR::Octet major_version, - ACE_CDR::Octet minor_version) - : start_ (data, flag), - do_byte_swap_ (byte_order != ACE_CDR_BYTE_ORDER), - good_bit_ (true), - major_version_ (major_version), - minor_version_ (minor_version), - char_translator_ (0), - wchar_translator_ (0) -{ -#if defined (ACE_HAS_MONITOR_POINTS) && (ACE_HAS_MONITOR_POINTS == 1) - ACE_NEW (this->monitor_, - ACE::Monitor_Control::Size_Monitor); - this->monitor_->receive (data->size ()); -#endif /* ACE_HAS_MONITOR_POINTS==1 */ -} - -ACE_InputCDR::ACE_InputCDR (ACE_Data_Block *data, - ACE_Message_Block::Message_Flags flag, - size_t rd_pos, - size_t wr_pos, - int byte_order, - ACE_CDR::Octet major_version, - ACE_CDR::Octet minor_version) - : start_ (data, flag), - do_byte_swap_ (byte_order != ACE_CDR_BYTE_ORDER), - good_bit_ (true), - major_version_ (major_version), - minor_version_ (minor_version), - char_translator_ (0), - wchar_translator_ (0) -{ - // Set the read pointer - this->start_.rd_ptr (rd_pos); - - // Set the write pointer after doing a sanity check. - char* wrpos = this->start_.base () + wr_pos; - - if (this->start_.end () >= wrpos) - { - this->start_.wr_ptr (wr_pos); - } - -#if defined (ACE_HAS_MONITOR_POINTS) && (ACE_HAS_MONITOR_POINTS == 1) - ACE_NEW (this->monitor_, - ACE::Monitor_Control::Size_Monitor); - this->monitor_->receive (data->size ()); -#endif /* ACE_HAS_MONITOR_POINTS==1 */ -} - -ACE_InputCDR::ACE_InputCDR (const ACE_InputCDR& rhs, - size_t size, - ACE_CDR::Long offset) - : start_ (rhs.start_, - ACE_CDR::MAX_ALIGNMENT), - do_byte_swap_ (rhs.do_byte_swap_), - good_bit_ (true), - major_version_ (rhs.major_version_), - minor_version_ (rhs.minor_version_), - char_translator_ (rhs.char_translator_), - wchar_translator_ (rhs.wchar_translator_) -{ -#if !defined (ACE_LACKS_CDR_ALIGNMENT) - // Align the base pointer assuming that the incoming stream is also - // aligned the way we are aligned - char *incoming_start = ACE_ptr_align_binary (rhs.start_.base (), - ACE_CDR::MAX_ALIGNMENT); -#else - char *incoming_start = rhs.start_.base (); -#endif /* ACE_LACKS_CDR_ALIGNMENT */ - - const size_t newpos = - (rhs.start_.rd_ptr() - incoming_start) + offset; - - if (newpos <= this->start_.space () - && newpos + size <= this->start_.space ()) - { - this->start_.rd_ptr (newpos); - this->start_.wr_ptr (newpos + size); - } - else - { - this->good_bit_ = false; - } - -#if defined (ACE_HAS_MONITOR_POINTS) && (ACE_HAS_MONITOR_POINTS == 1) - ACE_NEW (this->monitor_, - ACE::Monitor_Control::Size_Monitor); - this->monitor_->receive (this->start_.total_size ()); -#endif /* ACE_HAS_MONITOR_POINTS==1 */ -} - -ACE_InputCDR::ACE_InputCDR (const ACE_InputCDR& rhs, - size_t size) - : start_ (rhs.start_, - ACE_CDR::MAX_ALIGNMENT), - do_byte_swap_ (rhs.do_byte_swap_), - good_bit_ (true), - major_version_ (rhs.major_version_), - minor_version_ (rhs.minor_version_), - char_translator_ (rhs.char_translator_), - wchar_translator_ (rhs.wchar_translator_) -{ -#if !defined (ACE_LACKS_CDR_ALIGNMENT) - // Align the base pointer assuming that the incoming stream is also - // aligned the way we are aligned - char *incoming_start = ACE_ptr_align_binary (rhs.start_.base (), - ACE_CDR::MAX_ALIGNMENT); -#else - char *incoming_start = rhs.start_.base (); -#endif /* ACE_LACKS_CDR_ALIGNMENT */ - - const size_t newpos = - rhs.start_.rd_ptr() - incoming_start; - - if (newpos <= this->start_.space () - && newpos + size <= this->start_.space ()) - { - // Notice that ACE_Message_Block::duplicate may leave the - // wr_ptr() with a higher value than what we actually want. - this->start_.rd_ptr (newpos); - this->start_.wr_ptr (newpos + size); - - ACE_CDR::Octet byte_order = 0; - (void) this->read_octet (byte_order); - this->do_byte_swap_ = (byte_order != ACE_CDR_BYTE_ORDER); - } - else - { - this->good_bit_ = false; - } - -#if defined (ACE_HAS_MONITOR_POINTS) && (ACE_HAS_MONITOR_POINTS == 1) - ACE_NEW (this->monitor_, - ACE::Monitor_Control::Size_Monitor); - this->monitor_->receive (this->start_.total_size ()); -#endif /* ACE_HAS_MONITOR_POINTS==1 */ -} - -ACE_InputCDR::ACE_InputCDR (const ACE_InputCDR& rhs) - : start_ (rhs.start_, - ACE_CDR::MAX_ALIGNMENT), - do_byte_swap_ (rhs.do_byte_swap_), - good_bit_ (true), - major_version_ (rhs.major_version_), - minor_version_ (rhs.minor_version_), - char_translator_ (rhs.char_translator_), - wchar_translator_ (rhs.wchar_translator_) -{ -#if !defined (ACE_LACKS_CDR_ALIGNMENT) - char *buf = ACE_ptr_align_binary (rhs.start_.base (), - ACE_CDR::MAX_ALIGNMENT); -#else - char *buf = rhs.start_.base (); -#endif /* ACE_LACKS_CDR_ALIGNMENT */ - - size_t rd_offset = rhs.start_.rd_ptr () - buf; - size_t wr_offset = rhs.start_.wr_ptr () - buf; - this->start_.rd_ptr (rd_offset); - this->start_.wr_ptr (wr_offset); - -#if defined (ACE_HAS_MONITOR_POINTS) && (ACE_HAS_MONITOR_POINTS == 1) - ACE_NEW (this->monitor_, - ACE::Monitor_Control::Size_Monitor); - this->monitor_->receive (this->start_.total_size ()); -#endif /* ACE_HAS_MONITOR_POINTS==1 */ -} - -ACE_InputCDR::ACE_InputCDR (ACE_InputCDR::Transfer_Contents x) - : start_ (x.rhs_.start_.data_block ()), - do_byte_swap_ (x.rhs_.do_byte_swap_), - good_bit_ (true), - major_version_ (x.rhs_.major_version_), - minor_version_ (x.rhs_.minor_version_), - char_translator_ (x.rhs_.char_translator_), - wchar_translator_ (x.rhs_.wchar_translator_) -{ - this->start_.rd_ptr (x.rhs_.start_.rd_ptr ()); - this->start_.wr_ptr (x.rhs_.start_.wr_ptr ()); - - ACE_Data_Block* db = this->start_.data_block ()->clone_nocopy (); - (void) x.rhs_.start_.replace_data_block (db); - -#if defined (ACE_HAS_MONITOR_POINTS) && (ACE_HAS_MONITOR_POINTS == 1) - ACE_NEW (this->monitor_, - ACE::Monitor_Control::Size_Monitor); - this->monitor_->receive (this->start_.total_size ()); -#endif /* ACE_HAS_MONITOR_POINTS==1 */ -} - -ACE_InputCDR& -ACE_InputCDR::operator= (const ACE_InputCDR& rhs) -{ - if (this != &rhs) - { - this->start_.data_block (rhs.start_.data_block ()->duplicate ()); - this->start_.rd_ptr (rhs.start_.rd_ptr ()); - this->start_.wr_ptr (rhs.start_.wr_ptr ()); - this->do_byte_swap_ = rhs.do_byte_swap_; - this->good_bit_ = true; - this->char_translator_ = rhs.char_translator_; - this->major_version_ = rhs.major_version_; - this->minor_version_ = rhs.minor_version_; - } - -#if defined (ACE_HAS_MONITOR_POINTS) && (ACE_HAS_MONITOR_POINTS == 1) - this->monitor_->receive (this->start_.total_size ()); -#endif /* ACE_HAS_MONITOR_POINTS==1 */ - - return *this; -} - -ACE_InputCDR::ACE_InputCDR (const ACE_OutputCDR& rhs, - ACE_Allocator* buffer_allocator, - ACE_Allocator* data_block_allocator, - ACE_Allocator* message_block_allocator) - : start_ (rhs.total_length () + ACE_CDR::MAX_ALIGNMENT, - ACE_Message_Block::MB_DATA, - 0, - 0, - buffer_allocator, - 0, - 0, - ACE_Time_Value::zero, - ACE_Time_Value::max_time, - data_block_allocator, - message_block_allocator), - do_byte_swap_ (rhs.do_byte_swap_), - good_bit_ (true), - major_version_ (rhs.major_version_), - minor_version_ (rhs.minor_version_), - char_translator_ (rhs.char_translator_), - wchar_translator_ (rhs.wchar_translator_) -{ - ACE_CDR::mb_align (&this->start_); - for (const ACE_Message_Block *i = rhs.begin (); - i != rhs.end (); - i = i->cont ()) - { - this->start_.copy (i->rd_ptr (), i->length ()); - } - -#if defined (ACE_HAS_MONITOR_POINTS) && (ACE_HAS_MONITOR_POINTS == 1) - ACE_NEW (this->monitor_, - ACE::Monitor_Control::Size_Monitor); - this->monitor_->receive (this->start_.total_size ()); -#endif /* ACE_HAS_MONITOR_POINTS==1 */ -} - -ACE_CDR::Boolean -ACE_InputCDR::skip_wchar (void) -{ - if (static_cast (major_version_) == 1 - && static_cast (minor_version_) == 2) - { - ACE_CDR::Octet len; - if (this->read_1 (&len)) - return this->skip_bytes (static_cast (len)); - } - else - { - ACE_CDR::WChar x; - void * const temp = &x; - if (ACE_OutputCDR::wchar_maxbytes_ == 2) - return this->read_2 (reinterpret_cast (temp)); - else - return this->read_4 (reinterpret_cast (temp)); - } - - return (this->good_bit_ = false); -} - -ACE_CDR::Boolean -ACE_InputCDR::read_wchar (ACE_CDR::WChar& x) -{ - if (this->wchar_translator_ != 0) - { - this->good_bit_ = this->wchar_translator_->read_wchar (*this,x); - return this->good_bit_; - } - if (ACE_OutputCDR::wchar_maxbytes_ == 0) - { - errno = EACCES; - return (this->good_bit_ = false); - } - - if (ACE_OutputCDR::wchar_maxbytes_ == sizeof (ACE_CDR::WChar)) - { - if (static_cast (major_version_) == 1 - && static_cast (minor_version_) == 2) - { - ACE_CDR::Octet len; - - if (this->read_1 (&len)) - return this->read_array - (reinterpret_cast (&x), - static_cast (len), - ACE_CDR::OCTET_ALIGN, - 1); - - else - return (this->good_bit_ = false); - } - - void * const temp = &x; - if (sizeof (ACE_CDR::WChar) == 2) - return this->read_2 (reinterpret_cast (temp)); - else - return this->read_4 (reinterpret_cast (temp)); - } - - if (static_cast (major_version_) == 1 - && static_cast (minor_version_) == 2) - { - ACE_CDR::Octet len; - - if (this->read_1 (&len)) - { - if (len == 2) - { - ACE_CDR::Short sx; - if (this->read_array - (reinterpret_cast (&sx), - static_cast (len), - ACE_CDR::OCTET_ALIGN, - 1)) - { - x = static_cast (sx); - return true; - } - } - else - { - ACE_CDR::Octet ox; - if (this->read_array - (reinterpret_cast (&ox), - static_cast (len), - ACE_CDR::OCTET_ALIGN, - 1)) - { - x = static_cast (ox); - return true; - } - } - } - } - else - { - if (ACE_OutputCDR::wchar_maxbytes_ == 2) - { - ACE_CDR::UShort sx; - if (this->read_2 (reinterpret_cast (&sx))) - { - x = static_cast (sx); - return true; - } - } - else - { - ACE_CDR::Octet ox; - if (this->read_1 (&ox)) - { - x = static_cast (ox); - return true; - } - - } - } - return (this->good_bit_ = false); -} - -ACE_CDR::Boolean -ACE_InputCDR::read_string (ACE_CDR::Char *&x) -{ - // @@ This is a slight violation of "Optimize for the common case", - // i.e. normally the translator will be 0, but OTOH the code is - // smaller and should be better for the cache ;-) ;-) - if (this->char_translator_ != 0) - { - this->good_bit_ = this->char_translator_->read_string (*this, x); - return this->good_bit_; - } - - ACE_CDR::ULong len = 0; - - if (!this->read_ulong (len)) - return false; - - // A check for the length being too great is done later in the - // call to read_char_array but we want to have it done before - // the memory is allocated. - if (len > 0 && len <= this->length()) - { - ACE_NEW_RETURN (x, - ACE_CDR::Char[len], - 0); - - ACE_Auto_Basic_Array_Ptr safe_data (x); - - if (this->read_char_array (x, len)) - { - (void) safe_data.release (); - return true; - } - } - else if (len == 0) - { - // Convert any null strings to empty strings since empty - // strings can cause crashes. (See bug 58.) - ACE_NEW_RETURN (x, - ACE_CDR::Char[1], - 0); - ACE_OS::strcpy (const_cast (x), ""); - return true; - } - - x = 0; - return (this->good_bit_ = false); -} - -ACE_CDR::Boolean -ACE_InputCDR::read_string (ACE_CString &x) -{ - ACE_CDR::Char * data = 0; - if (this->read_string (data)) - { - ACE_Auto_Basic_Array_Ptr safe_data (data); - x = data; - return true; - } - - x = ""; - return (this->good_bit_ = false); -} - -ACE_CDR::Boolean -ACE_InputCDR::read_wstring (ACE_CDR::WChar*& x) -{ - // @@ This is a slight violation of "Optimize for the common case", - // i.e. normally the translator will be 0, but OTOH the code is - // smaller and should be better for the cache ;-) ;-) - if (this->wchar_translator_ != 0) - { - this->good_bit_ = this->wchar_translator_->read_wstring (*this, x); - return this->good_bit_; - } - if (ACE_OutputCDR::wchar_maxbytes_ == 0) - { - errno = EACCES; - return (this->good_bit_ = false); - } - - ACE_CDR::ULong len = 0; - - if (!this->read_ulong (len)) - { - return false; - } - - // A check for the length being too great is done later in the - // call to read_char_array but we want to have it done before - // the memory is allocated. - if (len > 0 && len <= this->length ()) - { - ACE_Auto_Basic_Array_Ptr safe_data; - - if (static_cast (this->major_version_) == 1 - && static_cast (this->minor_version_) == 2) - { - len /= - ACE_Utils::truncate_cast ( - ACE_OutputCDR::wchar_maxbytes_); - - //allocating one extra for the null character needed by applications - ACE_NEW_RETURN (x, - ACE_CDR::WChar [len + 1], - false); - - ACE_auto_ptr_reset (safe_data, x); - - if (this->read_wchar_array (x, len)) - { - - //Null character used by applications to find the end of - //the wstring - //Is this okay with the GIOP 1.2 spec?? - x[len] = '\x00'; - - (void) safe_data.release (); - - return true; - } - } - else - { - ACE_NEW_RETURN (x, - ACE_CDR::WChar [len], - false); - - ACE_auto_ptr_reset (safe_data, x); - - if (this->read_wchar_array (x, len)) - { - (void) safe_data.release (); - - return true; - } - } - } - else if (len == 0) - { - // Convert any null strings to empty strings since empty - // strings can cause crashes. (See bug 58.) - ACE_NEW_RETURN (x, - ACE_CDR::WChar[1], - false); - x[0] = '\x00'; - return true; - } - - this->good_bit_ = false; - x = 0; - return false; -} - -ACE_CDR::Boolean -ACE_InputCDR::read_array (void* x, - size_t size, - size_t align, - ACE_CDR::ULong length) -{ - if (length == 0) - return true; - char* buf = 0; - - if (this->adjust (size * length, align, buf) == 0) - { -#if defined (ACE_DISABLE_SWAP_ON_READ) - ACE_OS::memcpy (x, buf, size*length); -#else - if (!this->do_byte_swap_ || size == 1) - ACE_OS::memcpy (x, buf, size*length); - else - { - char *target = reinterpret_cast (x); - switch (size) - { - case 2: - ACE_CDR::swap_2_array (buf, target, length); - break; - case 4: - ACE_CDR::swap_4_array (buf, target, length); - break; - case 8: - ACE_CDR::swap_8_array (buf, target, length); - break; - case 16: - ACE_CDR::swap_16_array (buf, target, length); - break; - default: - // TODO: print something? - this->good_bit_ = false; - return false; - } - } -#endif /* ACE_DISABLE_SWAP_ON_READ */ - return this->good_bit_; - } - return false; -} - -ACE_CDR::Boolean -ACE_InputCDR::read_wchar_array_i (ACE_CDR::WChar* x, - ACE_CDR::ULong length) -{ - if (length == 0) - return true; - char* buf = 0; - size_t const align = (ACE_OutputCDR::wchar_maxbytes_ == 2) ? - ACE_CDR::SHORT_ALIGN : - ACE_CDR::OCTET_ALIGN; - - if (this->adjust (ACE_OutputCDR::wchar_maxbytes_ * length, align, buf) == 0) - { - if (ACE_OutputCDR::wchar_maxbytes_ == 2) - { - ACE_CDR::UShort *sb = reinterpret_cast (buf); - for (size_t i = 0; i < length; ++i) -#if defined (ACE_DISABLE_SWAP_ON_READ) - x[i] = static_cast (sb[i]); -#else - if (!this->do_byte_swap_) - x[i] = static_cast (sb[i]); - else - { - ACE_CDR::UShort sx; - ACE_CDR::swap_2 (&buf[i * 2], reinterpret_cast (&sx)); - x[i] = static_cast (sx); - } -#endif /* ACE_DISABLE_SWAP_ON_READ */ - } - else - { - for (size_t i = 0; i < length; ++i) - x[i] = static_cast (buf[i]); - } - return this->good_bit_; - } - return false; -} - - -ACE_CDR::Boolean -ACE_InputCDR::read_boolean_array (ACE_CDR::Boolean *x, - ACE_CDR::ULong length) -{ - // Make sure the length of the array isn't greater than the length of - // the stream. - if (length > this->length ()) - { - this->good_bit_ = false; - return false; - } - - // It is hard to optimize this, the spec requires that on the wire - // booleans be represented as a byte with value 0 or 1, but in - // memory it is possible (though very unlikely) that a boolean has - // a non-zero value (different from 1). - // We resort to a simple loop. - for (ACE_CDR::ULong i = 0; i != length && this->good_bit_; ++i) - (void) this->read_boolean (x[i]); - - return this->good_bit_; -} - -ACE_CDR::Boolean -ACE_InputCDR::read_1 (ACE_CDR::Octet *x) -{ - if (this->rd_ptr () < this->wr_ptr ()) - { - *x = *reinterpret_cast (this->rd_ptr ()); - this->start_.rd_ptr (1); - return true; - } - - this->good_bit_ = false; - return false; -} - -ACE_CDR::Boolean -ACE_InputCDR::read_2 (ACE_CDR::UShort *x) -{ - char *buf = 0; - if (this->adjust (ACE_CDR::SHORT_SIZE, buf) == 0) - { -#if !defined (ACE_DISABLE_SWAP_ON_READ) - if (!this->do_byte_swap_) - *x = *reinterpret_cast (buf); - else - ACE_CDR::swap_2 (buf, reinterpret_cast (x)); -#else - *x = *reinterpret_cast (buf); -#endif /* ACE_DISABLE_SWAP_ON_READ */ - return true; - } - this->good_bit_ = false; - return false; -} - -ACE_CDR::Boolean -ACE_InputCDR::read_4 (ACE_CDR::ULong *x) -{ - char *buf = 0; - if (this->adjust (ACE_CDR::LONG_SIZE, buf) == 0) - { -#if !defined (ACE_DISABLE_SWAP_ON_READ) - if (!this->do_byte_swap_) - *x = *reinterpret_cast (buf); - else - ACE_CDR::swap_4 (buf, reinterpret_cast (x)); -#else - *x = *reinterpret_cast (buf); -#endif /* ACE_DISABLE_SWAP_ON_READ */ - return true; - } - this->good_bit_ = false; - return false; -} - -ACE_CDR::Boolean -ACE_InputCDR::read_8 (ACE_CDR::ULongLong *x) -{ - char *buf = 0; - - if (this->adjust (ACE_CDR::LONGLONG_SIZE, buf) == 0) - { -#if !defined (ACE_DISABLE_SWAP_ON_READ) - if (!this->do_byte_swap_) - *x = *reinterpret_cast (buf); - else - ACE_CDR::swap_8 (buf, reinterpret_cast (x)); -#else - *x = *reinterpret_cast (buf); -#endif /* ACE_DISABLE_SWAP_ON_READ */ - return true; - } - - this->good_bit_ = false; - return false; -} - -ACE_CDR::Boolean -ACE_InputCDR::read_16 (ACE_CDR::LongDouble *x) -{ - char *buf = 0; - if (this->adjust (ACE_CDR::LONGDOUBLE_SIZE, - ACE_CDR::LONGDOUBLE_ALIGN, - buf) == 0) - { -#if !defined (ACE_DISABLE_SWAP_ON_READ) - if (!this->do_byte_swap_) - *x = *reinterpret_cast (buf); - else - ACE_CDR::swap_16 (buf, reinterpret_cast (x)); -#else - *x = *reinterpret_cast (buf); -#endif /* ACE_DISABLE_SWAP_ON_READ */ - return true; - } - - this->good_bit_ = false; - return false; -} - -ACE_CDR::Boolean -ACE_InputCDR::skip_string (void) -{ - ACE_CDR::ULong len = 0; - if (this->read_ulong (len)) - { - if (static_cast (~0u) == len) - { - // Indirection, next Long in stream is signed offset to actual - // string location (backwards in same stream from here). - ACE_CDR::Long offset = 0; - if (this->read_long (offset)) - { - return true; - } - } - else if (this->rd_ptr () + len <= this->wr_ptr ()) - { - this->rd_ptr (len); - return true; - } - this->good_bit_ = false; - } - return false; -} - -ACE_CDR::Boolean -ACE_InputCDR::skip_wstring (void) -{ - ACE_CDR::ULong len = 0; - ACE_CDR::Boolean continue_skipping = read_ulong (len); - - if (continue_skipping && len != 0) - { - if (static_cast (this->major_version_) == 1 - && static_cast (this->minor_version_) == 2) - continue_skipping = this->skip_bytes ((size_t)len); - else - while (continue_skipping && len--) - continue_skipping = this->skip_wchar (); - } - return continue_skipping; -} - -ACE_CDR::Boolean -ACE_InputCDR::skip_bytes (size_t len) -{ - if (this->rd_ptr () + len <= this->wr_ptr ()) - { - this->rd_ptr (len); - return true; - } - this->good_bit_ = false; - return false; -} - -int -ACE_InputCDR::grow (size_t newsize) -{ - if (ACE_CDR::grow (&this->start_, newsize) == -1) - return -1; - - ACE_CDR::mb_align (&this->start_); - this->start_.wr_ptr (newsize); - -#if defined (ACE_HAS_MONITOR_POINTS) && (ACE_HAS_MONITOR_POINTS == 1) - if (newsize > this->start_.total_size ()) - { - this->monitor_->receive (newsize); - } -#endif /* ACE_HAS_MONITOR_POINTS==1 */ - - return 0; -} - -void -ACE_InputCDR::reset (const ACE_Message_Block* data, - int byte_order) -{ - this->reset_byte_order (byte_order); - ACE_CDR::consolidate (&this->start_, data); - -#if defined (ACE_HAS_MONITOR_POINTS) && (ACE_HAS_MONITOR_POINTS == 1) - this->monitor_->receive (this->start_.total_size ()); -#endif /* ACE_HAS_MONITOR_POINTS==1 */ -} - -void -ACE_InputCDR::steal_from (ACE_InputCDR &cdr) -{ - this->do_byte_swap_ = cdr.do_byte_swap_; - this->start_.data_block (cdr.start_.data_block ()->duplicate ()); - - // If the message block had a DONT_DELETE flags, just clear it off.. - this->start_.clr_self_flags (ACE_Message_Block::DONT_DELETE); - this->start_.rd_ptr (cdr.start_.rd_ptr ()); - - this->start_.wr_ptr (cdr.start_.wr_ptr ()); - this->major_version_ = cdr.major_version_; - this->minor_version_ = cdr.minor_version_; - cdr.reset_contents (); - -#if defined (ACE_HAS_MONITOR_POINTS) && (ACE_HAS_MONITOR_POINTS == 1) - this->monitor_->receive (this->start_.total_size ()); -#endif /* ACE_HAS_MONITOR_POINTS==1 */ -} - -void -ACE_InputCDR::exchange_data_blocks (ACE_InputCDR &cdr) -{ - // Exchange byte orders - int const byte_order = cdr.do_byte_swap_; - cdr.do_byte_swap_ = this->do_byte_swap_; - this->do_byte_swap_ = byte_order; - - // Get the destination read and write pointers - size_t const drd_pos = - cdr.start_.rd_ptr () - cdr.start_.base (); - size_t const dwr_pos = - cdr.start_.wr_ptr () - cdr.start_.base (); - - // Get the source read & write pointers - size_t const srd_pos = - this->start_.rd_ptr () - this->start_.base (); - size_t const swr_pos = - this->start_.wr_ptr () - this->start_.base (); - - // Exchange data_blocks. Dont release any of the data blocks. - ACE_Data_Block *dnb = - this->start_.replace_data_block (cdr.start_.data_block ()); - cdr.start_.replace_data_block (dnb); - - // Exchange the flags information.. - ACE_Message_Block::Message_Flags df = cdr.start_.self_flags (); - ACE_Message_Block::Message_Flags sf = this->start_.self_flags (); - - cdr.start_.clr_self_flags (df); - this->start_.clr_self_flags (sf); - - cdr.start_.set_self_flags (sf); - this->start_.set_self_flags (df); - - // Reset the pointers to zero before it is set again. - cdr.start_.reset (); - this->start_.reset (); - - // Set the read and write pointers. - if (cdr.start_.size () >= srd_pos) - { - cdr.start_.rd_ptr (srd_pos); - } - - if (cdr.start_.size () >= swr_pos) - { - cdr.start_.wr_ptr (swr_pos); - } - - if (this->start_.size () >= drd_pos) - { - this->start_.rd_ptr (drd_pos); - } - - if (this->start_.size () >= dwr_pos) - { - this->start_.wr_ptr (dwr_pos); - } - - ACE_CDR::Octet const dmajor = cdr.major_version_; - ACE_CDR::Octet const dminor = cdr.minor_version_; - - // Exchange the GIOP version info - cdr.major_version_ = this->major_version_; - cdr.minor_version_ = this->minor_version_; - - this->major_version_ = dmajor; - this->minor_version_ = dminor; - -#if defined (ACE_HAS_MONITOR_POINTS) && (ACE_HAS_MONITOR_POINTS == 1) - this->monitor_->receive (this->start_.total_size ()); -#endif /* ACE_HAS_MONITOR_POINTS==1 */ -} - -ACE_Data_Block * -ACE_InputCDR::clone_from (ACE_InputCDR &cdr) -{ - this->do_byte_swap_ = cdr.do_byte_swap_; - - // Get the read & write pointer positions in the incoming CDR - // streams - char *rd_ptr = cdr.start_.rd_ptr (); - char *wr_ptr = cdr.start_.wr_ptr (); - - // Now reset the incoming CDR stream - cdr.start_.reset (); - - // As we have reset the stream, try to align the underlying message - // block in the incoming stream - ACE_CDR::mb_align (&cdr.start_); - - // Get the read & write pointer positions again - char *nrd_ptr = cdr.start_.rd_ptr (); - char *nwr_ptr = cdr.start_.wr_ptr (); - - // Actual length of the stream is.. - // @todo: This will look idiotic, but we dont seem to have much of a - // choice. How do we calculate the length of the incoming stream? - // Calling the method before calling reset () would give us the - // wrong length of the stream that needs copying. So we do the - // calulation like this - // (1) We get the and positions of the incoming - // stream. - // (2) Then we reset the stream and then align it. - // (3) We get the and positions again. (Points #1 - // thru #3 has been done already) - // (4) The difference in the and positions gives - // us the following, the actual bytes traversed by the and - // . - // (5) The bytes traversed by the is the actual length of - // the stream. - - // Actual bytes traversed - size_t rd_bytes = rd_ptr - nrd_ptr; - size_t wr_bytes = wr_ptr - nwr_ptr; - - ACE_CDR::mb_align (&this->start_); - - ACE_Data_Block *db = this->start_.data_block (); - - // If the size of the data that needs to be copied are higher than - // what is available, then do a reallocation. - if (wr_bytes > (this->start_.size () - ACE_CDR::MAX_ALIGNMENT)) - { - // @@NOTE: We need to probably add another method to the message - // block interface to simplify this - db = cdr.start_.data_block ()->clone_nocopy (); - - if (db == 0 || db->size ((wr_bytes) + - ACE_CDR::MAX_ALIGNMENT) == -1) - return 0; - - // Replace our data block by using the incoming CDR stream. - db = this->start_.replace_data_block (db); - - // Align the start_ message block. - ACE_CDR::mb_align (&this->start_); - - // Clear the DONT_DELETE flag if it has been set - this->start_.clr_self_flags (ACE_Message_Block::DONT_DELETE); - } - - // Now do the copy - (void) ACE_OS::memcpy (this->start_.wr_ptr (), - cdr.start_.rd_ptr (), - wr_bytes); - - // Set the read pointer position to the same point as that was in - // cdr. - this->start_.rd_ptr (rd_bytes); - this->start_.wr_ptr (wr_bytes); - - // We have changed the read & write pointers for the incoming - // stream. Set them back to the positions that they were before.. - cdr.start_.rd_ptr (rd_bytes); - cdr.start_.wr_ptr (wr_bytes); - - this->major_version_ = cdr.major_version_; - this->minor_version_ = cdr.minor_version_; - - // Copy the char/wchar translators - this->char_translator_ = cdr.char_translator_; - this->wchar_translator_ = cdr.wchar_translator_; - -#if defined (ACE_HAS_MONITOR_POINTS) && (ACE_HAS_MONITOR_POINTS == 1) - this->monitor_->receive (this->start_.total_size ()); -#endif /* ACE_HAS_MONITOR_POINTS==1 */ - - return db; -} - -ACE_Message_Block* -ACE_InputCDR::steal_contents (void) -{ - ACE_Message_Block* block = this->start_.clone (); - this->start_.data_block (block->data_block ()->clone ()); - - // If at all our message had a DONT_DELETE flag set, just clear it - // off. - this->start_.clr_self_flags (ACE_Message_Block::DONT_DELETE); - - ACE_CDR::mb_align (&this->start_); - -#if defined (ACE_HAS_MONITOR_POINTS) && (ACE_HAS_MONITOR_POINTS == 1) - this->monitor_->receive (this->start_.total_size ()); -#endif /* ACE_HAS_MONITOR_POINTS==1 */ - - return block; -} - -void -ACE_InputCDR::reset_contents (void) -{ - this->start_.data_block (this->start_.data_block ()->clone_nocopy ()); - - // Reset the flags... - this->start_.clr_self_flags (ACE_Message_Block::DONT_DELETE); - -#if defined (ACE_HAS_MONITOR_POINTS) && (ACE_HAS_MONITOR_POINTS == 1) - this->monitor_->receive (this->start_.total_size ()); -#endif /* ACE_HAS_MONITOR_POINTS==1 */ -} - -#if defined (ACE_HAS_MONITOR_POINTS) && (ACE_HAS_MONITOR_POINTS == 1) - -void -ACE_InputCDR::register_monitor (const char *id) -{ - this->monitor_->name (id); - this->monitor_->add_to_registry (); -} - -void -ACE_InputCDR::unregister_monitor (void) -{ - this->monitor_->remove_from_registry (); -} - -#endif /* ACE_HAS_MONITOR_POINTS==1 */ - -// -------------------------------------------------------------- - -ACE_Char_Codeset_Translator::~ACE_Char_Codeset_Translator (void) -{ -} - -// -------------------------------------------------------------- - -ACE_WChar_Codeset_Translator::~ACE_WChar_Codeset_Translator (void) -{ -} - -// -------------------------------------------------------------- - -ACE_CDR::Boolean -operator<< (ACE_OutputCDR &os, const ACE_CString &x) -{ - os.write_string (x); - return os.good_bit (); -} - -ACE_CDR::Boolean -operator>> (ACE_InputCDR &is, ACE_CString &x) -{ - is.read_string (x); - return is.good_bit (); -} - -#if defined (GEN_OSTREAM_OPS) - -std::ostream& -operator<< (std::ostream &os, ACE_OutputCDR::from_boolean x) -{ - return (x.val_ ? os << "true" : os << "false"); -} - -std::ostream& -operator<< (std::ostream &os, ACE_OutputCDR::from_char x) -{ - return os << '\'' << x.val_ << '\''; -} - -std::ostream& -operator<< (std::ostream &os, ACE_OutputCDR::from_wchar x) -{ - os.setf (ios_base::showbase); - os.setf (ios_base::hex, ios_base::basefield); - os << x.val_; - os.unsetf (ios_base::showbase); - os.setf (ios_base::dec, ios_base::basefield); - return os; -} - -std::ostream& -operator<< (std::ostream &os, ACE_OutputCDR::from_octet x) -{ - // Same format (hex) and no risk of overflow. - ACE_CDR::WChar w = static_cast (x.val_); - ACE_OutputCDR::from_wchar tmp (w); - return os << tmp; -} - -#endif /* GEN_OSTREAM_OPS */ - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/CDR_Stream.h b/modules/worldengine/deps/acelite/ace/CDR_Stream.h deleted file mode 100644 index 8197b0f4be..0000000000 --- a/modules/worldengine/deps/acelite/ace/CDR_Stream.h +++ /dev/null @@ -1,1423 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file CDR_Stream.h - * - * ACE Common Data Representation (CDR) marshaling and demarshaling - * classes. - * - * This implementation was inspired in the CDR class in SunSoft's - * IIOP engine, but has a completely different implementation and a - * different interface too. - * - * The current implementation assumes that the host has 1-byte, - * 2-byte and 4-byte integral types, and that it has single - * precision and double precision IEEE floats. - * Those assumptions are pretty good these days, with Crays being - * the only known exception. - * - * Optimizations - * ------------- - * ACE_LACKS_CDR_ALIGNMENT - * @author Arvind S. Krishna - * - * CDR stream ignores alignment when marshaling data. Use this option - * only when ACE_DISABLE_SWAP_ON_READ can be enabled. This option requires - * ACE CDR engine to do both marshaling and demarshaling. - * - * @author TAO version by Aniruddha Gokhale - * @author Carlos O'Ryan - * @author ACE version by Jeff Parsons - * @author Istvan Buki - * @author Codeset translation by Jim Rogers - */ -//============================================================================= - -#ifndef ACE_CDR_STREAM_H -#define ACE_CDR_STREAM_H - -#include /**/ "ace/pre.h" - -#include "ace/CDR_Base.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/SStringfwd.h" -#include "ace/Message_Block.h" - -#if defined (GEN_OSTREAM_OPS) -#include "ace/streams.h" -#endif /* GEN_OSTREAM_OPS */ - -#if defined (ACE_HAS_MONITOR_POINTS) && (ACE_HAS_MONITOR_POINTS == 1) -#include "Monitor_Size.h" -#endif /* ACE_HAS_MONITOR_POINTS==1 */ - - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -class ACE_Char_Codeset_Translator; -class ACE_WChar_Codeset_Translator; - -class ACE_InputCDR; - -/** - * @class ACE_OutputCDR - * - * @brief A CDR stream for marshalling data, most often for transmission to - * another system which may or may not have the same byte order. - * - * This class is based on the the CORBA spec for Java (98-02-29), - * java class omg.org.CORBA.portable.OutputStream. It diverts in - * a few ways: - * @li Operations taking arrays don't have offsets, because in C++ - * it is easier to describe an array starting from x+offset. - * @li Operations return an error status, because exceptions are - * not widely available in C++ (yet). - */ -class ACE_Export ACE_OutputCDR -{ -public: - /** - * The Codeset translators need access to some private members to - * efficiently marshal arrays - * For reading from an output CDR stream. - */ - friend class ACE_Char_Codeset_Translator; - friend class ACE_WChar_Codeset_Translator; - friend class ACE_InputCDR; - - /** - * Default constructor; allows one to set byte ordering, allocators, and - * tuning information. - * - * @param size Causes constructor to preallocate @a size bytes; if - * @a size is 0 it allocates the default size. - * - * @param byte_order The byte order that data will have within this - * object. Unless otherwise specified, the byte order - * will be the order native to the hardware this is - * executed on. To force the marshalled data to have - * a specific order, specify one of the values defined - * in ACE_CDR::Byte_Order. - * @note The @c ACE_ENABLE_SWAP_ON_WRITE config macro - * must be set for any local byte swapping to occur - * as data is inserted into an ACE_OutputCDR object. - */ - ACE_OutputCDR (size_t size = 0, - int byte_order = ACE_CDR::BYTE_ORDER_NATIVE, - ACE_Allocator* buffer_allocator = 0, - ACE_Allocator* data_block_allocator = 0, - ACE_Allocator* message_block_allocator = 0, - size_t memcpy_tradeoff = ACE_DEFAULT_CDR_MEMCPY_TRADEOFF, - ACE_CDR::Octet major_version = ACE_CDR_GIOP_MAJOR_VERSION, - ACE_CDR::Octet minor_version = ACE_CDR_GIOP_MINOR_VERSION); - - /// Build a CDR stream with an initial buffer, it will *not* remove - /// @a data, since it did not allocated it. It's important to be careful - /// with the alignment of @a data. - /** - * Create an output stream from an arbitrary buffer, care must be - * exercised with alignment, because this contructor will align if - * needed. In this case @a data will not point to the start of the - * output stream. @c begin()->rd_ptr() points to the start of the - * output stream. See @c ACE_ptr_align_binary() to properly align a - * pointer and use ACE_CDR::MAX_ALIGNMENT for the correct alignment. - */ - ACE_OutputCDR (char *data, - size_t size, - int byte_order = ACE_CDR::BYTE_ORDER_NATIVE, - ACE_Allocator* buffer_allocator = 0, - ACE_Allocator* data_block_allocator = 0, - ACE_Allocator* message_block_allocator = 0, - size_t memcpy_tradeoff = ACE_DEFAULT_CDR_MEMCPY_TRADEOFF, - ACE_CDR::Octet giop_major_version = ACE_CDR_GIOP_MAJOR_VERSION, - ACE_CDR::Octet giop_minor_version = ACE_CDR_GIOP_MINOR_VERSION); - - /// Build a CDR stream with an initial data block, it will *not* remove - /// , since it did not allocated it. It's important to be - // careful with the alignment of . - /** - * Create an output stream from an arbitrary data block, care must be - * exercised with alignment, because this contructor will align if - * needed. In this case @a data_block will not point to the - * start of the output stream. begin()->rd_ptr() points to the start - * off the output stream. See ACE_ptr_align_binary() to properly align a - * pointer and use ACE_CDR::MAX_ALIGNMENT for the correct alignment. - */ - ACE_OutputCDR (ACE_Data_Block *data_block, - int byte_order = ACE_CDR::BYTE_ORDER_NATIVE, - ACE_Allocator* message_block_allocator = 0, - size_t memcpy_tradeoff = ACE_DEFAULT_CDR_MEMCPY_TRADEOFF, - ACE_CDR::Octet giop_major_version = ACE_CDR_GIOP_MAJOR_VERSION, - ACE_CDR::Octet giop_minor_version = ACE_CDR_GIOP_MINOR_VERSION); - - /// Build a CDR stream with an initial Message_Block chain, it will - /// *not* remove @a data, since it did not allocate it. - ACE_OutputCDR (ACE_Message_Block *data, - int byte_order = ACE_CDR::BYTE_ORDER_NATIVE, - size_t memcpy_tradeoff = ACE_DEFAULT_CDR_MEMCPY_TRADEOFF, - ACE_CDR::Octet giop_major_version = ACE_CDR_GIOP_MAJOR_VERSION, - ACE_CDR::Octet giop_minor_version = ACE_CDR_GIOP_MINOR_VERSION); - - /// destructor - ~ACE_OutputCDR (void); - - /** - * Disambiguate overload when inserting booleans, octets, chars, and - * bounded strings. - */ - //@{ @name Helper classes - - struct ACE_Export from_boolean - { - explicit from_boolean (ACE_CDR::Boolean b); - ACE_CDR::Boolean val_; - }; - - struct ACE_Export from_octet - { - explicit from_octet (ACE_CDR::Octet o); - ACE_CDR::Octet val_; - }; - - struct ACE_Export from_char - { - explicit from_char (ACE_CDR::Char c); - ACE_CDR::Char val_; - }; - - struct ACE_Export from_wchar - { - explicit from_wchar (ACE_CDR::WChar wc); - ACE_CDR::WChar val_; - }; - - struct ACE_Export from_string - { - from_string (ACE_CDR::Char* s, - ACE_CDR::ULong b, - ACE_CDR::Boolean nocopy = 0); - from_string (const ACE_CDR::Char* s, - ACE_CDR::ULong b, - ACE_CDR::Boolean nocopy = 0); - ACE_CDR::Char *val_; - ACE_CDR::ULong bound_; - ACE_CDR::Boolean nocopy_; - }; - - struct ACE_Export from_wstring - { - from_wstring (ACE_CDR::WChar* ws, - ACE_CDR::ULong b, - ACE_CDR::Boolean nocopy = 0); - from_wstring (const ACE_CDR::WChar* ws, - ACE_CDR::ULong b, - ACE_CDR::Boolean nocopy = 0); - ACE_CDR::WChar *val_; - ACE_CDR::ULong bound_; - ACE_CDR::Boolean nocopy_; - }; - //@} - - /** - * @{ @name Write operations - * Return 0 on failure and 1 on success. - */ - ACE_CDR::Boolean write_boolean (ACE_CDR::Boolean x); - ACE_CDR::Boolean write_char (ACE_CDR::Char x); - ACE_CDR::Boolean write_wchar (ACE_CDR::WChar x); - ACE_CDR::Boolean write_octet (ACE_CDR::Octet x); - ACE_CDR::Boolean write_short (ACE_CDR::Short x); - ACE_CDR::Boolean write_ushort (ACE_CDR::UShort x); - ACE_CDR::Boolean write_long (ACE_CDR::Long x); - ACE_CDR::Boolean write_ulong (ACE_CDR::ULong x); - ACE_CDR::Boolean write_longlong (const ACE_CDR::LongLong &x); - ACE_CDR::Boolean write_ulonglong (const ACE_CDR::ULongLong &x); - ACE_CDR::Boolean write_float (ACE_CDR::Float x); - ACE_CDR::Boolean write_double (const ACE_CDR::Double &x); - ACE_CDR::Boolean write_longdouble (const ACE_CDR::LongDouble &x); - ACE_CDR::Boolean write_fixed (const ACE_CDR::Fixed &x); - - /// For string we offer methods that accept a precomputed length. - ACE_CDR::Boolean write_string (const ACE_CDR::Char *x); - ACE_CDR::Boolean write_string (ACE_CDR::ULong len, - const ACE_CDR::Char *x); - ACE_CDR::Boolean write_string (const ACE_CString &x); - ACE_CDR::Boolean write_wstring (const ACE_CDR::WChar *x); - ACE_CDR::Boolean write_wstring (ACE_CDR::ULong length, - const ACE_CDR::WChar *x); - //@} - - /// @note the portion written starts at @a x and ends - /// at @a x + @a length. - /// The length is *NOT* stored into the CDR stream. - //@{ @name Array write operations - ACE_CDR::Boolean write_boolean_array (const ACE_CDR::Boolean *x, - ACE_CDR::ULong length); - ACE_CDR::Boolean write_char_array (const ACE_CDR::Char *x, - ACE_CDR::ULong length); - ACE_CDR::Boolean write_wchar_array (const ACE_CDR::WChar* x, - ACE_CDR::ULong length); - ACE_CDR::Boolean write_octet_array (const ACE_CDR::Octet* x, - ACE_CDR::ULong length); - ACE_CDR::Boolean write_short_array (const ACE_CDR::Short *x, - ACE_CDR::ULong length); - ACE_CDR::Boolean write_ushort_array (const ACE_CDR::UShort *x, - ACE_CDR::ULong length); - ACE_CDR::Boolean write_long_array (const ACE_CDR::Long *x, - ACE_CDR::ULong length); - ACE_CDR::Boolean write_ulong_array (const ACE_CDR::ULong *x, - ACE_CDR::ULong length); - ACE_CDR::Boolean write_longlong_array (const ACE_CDR::LongLong* x, - ACE_CDR::ULong length); - ACE_CDR::Boolean write_ulonglong_array (const ACE_CDR::ULongLong *x, - ACE_CDR::ULong length); - ACE_CDR::Boolean write_float_array (const ACE_CDR::Float *x, - ACE_CDR::ULong length); - ACE_CDR::Boolean write_double_array (const ACE_CDR::Double *x, - ACE_CDR::ULong length); - ACE_CDR::Boolean write_longdouble_array (const ACE_CDR::LongDouble* x, - ACE_CDR::ULong length); - - /// Write an octet array contained inside a MB, this can be optimized - /// to minimize copies. - ACE_CDR::Boolean write_octet_array_mb (const ACE_Message_Block* mb); - //@} - - /** - * @{ @name Placeholder/replace operations - * Facilitates writing a placeholder into a CDR stream to be replaced - * later with a different value. - * - * @note An example use for this facility is: - * @code - ACE_OutputCDR strm; - ... // insert values... - char *pos = strm.write_long_placeholder (); - ... // insert more values - ACE_CDR::Long real_val; // Somehow assign the "correct" value - strm.replace (real_val, pos); // Replace earlier placeholder - @endcode - */ - - /** - * Write a placeholder into the stream. The placeholder's pointer - * is returned so it may later be passed as the @a loc argument to - * replace (). - * These methods align the stream's write pointer properly prior to - * writing the placeholder. - * - * @retval Pointer to the placeholder; 0 if there is not enough space - * in the stream and memory could not be allocated. - */ - char* write_long_placeholder (void); - char* write_short_placeholder (void); - char* write_boolean_placeholder (void); - char* write_char_placeholder (void); - char* write_longlong_placeholder (void); - char* write_octet_placeholder (void); - char* write_float_placeholder (void); - char* write_double_placeholder (void); - - /** - * Writes a new value into a specific location. This is commonly - * used to update a prior "placeholder" location in the stream. - * The specified location is assumed to have proper CDR alignment for the - * type to insert. This requirement is satisfied by using one of the - * placeholder-writing methods to align the stream for the anticipated - * value and obtain the correct location. - * Treatment of @a x with repect to byte swapping is the same as for when - * any value is inserted. - * - * @param x The value to insert into the specified location. - * @param loc The location at which to insert @a x. @a loc must be a valid - * position within the stream's current set of message blocks. - * - * @sa write_long_placeholder(), write_short_placeholder () - */ - ACE_CDR::Boolean replace (ACE_CDR::Long x, char* loc); - ACE_CDR::Boolean replace (ACE_CDR::ULong x, char* loc); - ACE_CDR::Boolean replace (ACE_CDR::Short x, char* loc); - ACE_CDR::Boolean replace (ACE_CDR::UShort x, char* loc); - ACE_CDR::Boolean replace (ACE_CDR::Boolean x, char* loc); - ACE_CDR::Boolean replace (ACE_CDR::Char x, char* loc); - ACE_CDR::Boolean replace (ACE_CDR::LongLong x, char* loc); - ACE_CDR::Boolean replace (ACE_CDR::ULongLong x, char* loc); - ACE_CDR::Boolean replace (ACE_CDR::Octet x, char* loc); - ACE_CDR::Boolean replace (ACE_CDR::Float x, char* loc); - ACE_CDR::Boolean replace (ACE_CDR::Double x, char* loc); - //@} - - /** - * Return 0 on failure and 1 on success. - */ - //@{ @name Append contents of own CDR stream to another - ACE_CDR::Boolean append_boolean (ACE_InputCDR &); - ACE_CDR::Boolean append_char (ACE_InputCDR &); - ACE_CDR::Boolean append_wchar (ACE_InputCDR &); - ACE_CDR::Boolean append_octet (ACE_InputCDR &); - ACE_CDR::Boolean append_short (ACE_InputCDR &); - ACE_CDR::Boolean append_ushort (ACE_InputCDR &); - ACE_CDR::Boolean append_long (ACE_InputCDR &); - ACE_CDR::Boolean append_ulong (ACE_InputCDR &); - ACE_CDR::Boolean append_longlong (ACE_InputCDR &); - ACE_CDR::Boolean append_ulonglong (ACE_InputCDR &); - ACE_CDR::Boolean append_float (ACE_InputCDR &); - ACE_CDR::Boolean append_double (ACE_InputCDR &); - ACE_CDR::Boolean append_longdouble (ACE_InputCDR &); - ACE_CDR::Boolean append_fixed (ACE_InputCDR &); - - ACE_CDR::Boolean append_wstring (ACE_InputCDR &); - ACE_CDR::Boolean append_string (ACE_InputCDR &); - //@} - - /// Returns @c false if an error has ocurred. - /** - * @note The only expected error is to run out of memory. - */ - bool good_bit (void) const; - - /// Reuse the CDR stream to write on the old buffer. - void reset (void); - - /// Add the length of each message block in the chain. - size_t total_length (void) const; - - /** - * Return the start of the message block chain for this CDR stream. - * @note The complete CDR stream is represented by a chain of - * message blocks. - */ - const ACE_Message_Block *begin (void) const; - - /// Return the last message in the chain that is is use. - const ACE_Message_Block *end (void) const; - - /// Return the message block in chain. - const ACE_Message_Block *current (void) const; - - /// Replace the message block chain with a single message block. - /** - * Upon successful completion, there will be a single message block - * containing the data from the complete message block chain. - * - * @note The only expected error is to run out of memory. - */ - int consolidate (void); - - /** - * Access the underlying buffer (read only). @note This - * method only returns a pointer to the first block in the - * chain. - */ - const char *buffer (void) const; - - /** - * Return the size of first message block in the block chain. @note This - * method only returns information about the first block in the - * chain. - */ - size_t length (void) const; - - /** - * Utility function to allow the user more flexibility. - * Pads the stream up to the nearest @a alignment byte boundary. - * Argument MUST be a power of 2. - * Returns 0 on success and -1 on failure. - */ - int align_write_ptr (size_t alignment); - - /// Access the codeset translators. They can be null! - ACE_Char_Codeset_Translator *char_translator (void) const; - ACE_WChar_Codeset_Translator *wchar_translator (void) const; - - /// Set the char codeset translator. - void char_translator (ACE_Char_Codeset_Translator *); - /// Set the wchar codeset translator. - void wchar_translator (ACE_WChar_Codeset_Translator *); - - /// set the global size of serialized wchars. This may be different - /// than the size of a wchar_t. - static void wchar_maxbytes (size_t max_bytes); - - /// access the serialized size of wchars. - static size_t wchar_maxbytes (void); - - /** - * Return alignment of the wr_ptr(), with respect to the start of - * the CDR stream. This is not the same as the alignment of - * current->wr_ptr()! - */ - size_t current_alignment (void) const; - - void current_alignment (size_t current_alignment); - - /** - * Returns (in @a buf) the next position in the buffer aligned to - * @a size, it advances the Message_Block wr_ptr past the data - * (i.e., @a buf + @a size). If necessary it grows the Message_Block - * buffer. Sets the good_bit to false and returns a -1 on failure. - */ - int adjust (size_t size, - char *&buf); - - /// As above, but now the size and alignment requirements may be - /// different. - int adjust (size_t size, - size_t align, - char *&buf); - - /// Returns true if this stream is writing in non-native byte order - /// and false otherwise. For example, it would be true if either - /// ACE_ENABLE_SWAP_ON_WRITE is defined or a specific byte order was - /// specified for this stream. - bool do_byte_swap (void) const; - - /// Returns the byte order this stream is marshaling data in. Will be one - /// of the values in ACE_CDR::Byte_Order. - int byte_order (void) const; - - /// For use by a gateway, which creates the output stream for the - /// reply to the client in its native byte order, but which must - /// send the reply in the byte order of the target's reply to the - /// gateway. - void reset_byte_order (int byte_order); - - /// Set GIOP version info - void set_version (ACE_CDR::Octet major, ACE_CDR::Octet minor); - - /// Set the underlying GIOP version.. - void get_version (ACE_CDR::Octet &major, ACE_CDR::Octet &minor); - -#if defined (ACE_HAS_MONITOR_POINTS) && (ACE_HAS_MONITOR_POINTS == 1) - /// Register and unregister our buffer size monitor. - void register_monitor (const char* id); - void unregister_monitor (void); -#endif /* ACE_HAS_MONITOR_POINTS==1 */ - -private: - - // Find the message block in the chain of message blocks - // that the provide location locates. - ACE_Message_Block* find (char* loc); - - /// disallow copying... - ACE_OutputCDR (const ACE_OutputCDR& rhs); - ACE_OutputCDR& operator= (const ACE_OutputCDR& rhs); - - ACE_CDR::Boolean write_1 (const ACE_CDR::Octet *x); - ACE_CDR::Boolean write_2 (const ACE_CDR::UShort *x); - ACE_CDR::Boolean write_4 (const ACE_CDR::ULong *x); - ACE_CDR::Boolean write_8 (const ACE_CDR::ULongLong *x); - ACE_CDR::Boolean write_16 (const ACE_CDR::LongDouble *x); - - /** - * write an array of @a length elements, each of @a size bytes and the - * start aligned at a multiple of @a align. The elements are assumed - * to be packed with the right alignment restrictions. It is mostly - * designed for buffers of the basic types. - * - * This operation uses @c memcpy; as explained above it is expected - * that using assignment is faster that @c memcpy for one element, - * but for several elements @c memcpy should be more efficient, it - * could be interesting to find the break even point and optimize - * for that case, but that would be too platform dependent. - */ - ACE_CDR::Boolean write_array (const void *x, - size_t size, - size_t align, - ACE_CDR::ULong length); - - - ACE_CDR::Boolean write_wchar_array_i (const ACE_CDR::WChar* x, - ACE_CDR::ULong length); - - - /** - * Grow the CDR stream. When it returns @a buf contains a pointer to - * memory in the CDR stream, with at least @a size bytes ahead of it - * and aligned to an @a align boundary. It moved the to . - */ - int grow_and_adjust (size_t size, - size_t align, - char *&buf); - -private: - /// The start of the chain of message blocks. - ACE_Message_Block start_; - - /// The current block in the chain where we are writing. - ACE_Message_Block *current_; - -#if !defined (ACE_LACKS_CDR_ALIGNMENT) - /** - * The current alignment as measured from the start of the buffer. - * Usually this coincides with the alignment of the buffer in - * memory, but, when we chain another buffer this "quasi invariant" - * is broken. - * The current_alignment is used to readjust the buffer following - * the stolen message block. - */ - size_t current_alignment_; -#endif /* ACE_LACKS_CDR_ALIGNMENT */ - - /** - * Is the current block writable. When we steal a buffer from the - * user and just chain it into the message block we are not supposed - * to write on it, even if it is past the start and end of the - * buffer. - */ - bool current_is_writable_; - - /** - * If not zero swap bytes at writing so the created CDR stream byte - * order does *not* match the machine byte order. The motivation - * for such a beast is that in some setting a few (fast) machines - * can be serving hundreds of slow machines with the opposite byte - * order, so it makes sense (as a load balancing device) to put the - * responsibility in the writers. - * - * @warning THIS IS NOT A STANDARD IN CORBA, USE AT YOUR OWN RISK - */ - bool do_byte_swap_; - - /// Set to false when an error ocurrs. - bool good_bit_; - - /// Break-even point for copying. - size_t const memcpy_tradeoff_; - -#if defined (ACE_HAS_MONITOR_POINTS) && (ACE_HAS_MONITOR_POINTS == 1) - ACE::Monitor_Control::Size_Monitor *monitor_; -#endif /* ACE_HAS_MONITOR_POINTS==1 */ - -protected: - /// GIOP version information - ACE_CDR::Octet major_version_; - ACE_CDR::Octet minor_version_; - - /// If not nil, invoke for translation of character and string data. - ACE_Char_Codeset_Translator *char_translator_; - ACE_WChar_Codeset_Translator *wchar_translator_; - - /** - * Some wide char codesets may be defined with a maximum number - * of bytes that is smaller than the size of a wchar_t. This means - * that the CDR cannot simply memcpy a block of wchars to and from - * the stream, but must instead realign the bytes appropriately. - * In cases when wchar i/o is not allowed, such as with GIOP 1.0, - * or not having a native wchar codeset defined, the maxbytes is - * set to zero, indicating no wchar data is allowed. - */ - static size_t wchar_maxbytes_; -}; - - -// **************************************************************** - -/** - * @class ACE_InputCDR - * - * @brief A CDR stream for demarshalling CDR-encoded data. - * - * This class is based on the the CORBA spec for Java (98-02-29), - * java class omg.org.CORBA.portable.InputStream. It diverts in a - * few ways: - * @li Operations to retrieve basic types take parameters by - * reference. - * @li Operations taking arrays don't have offsets, because in C++ - * it is easier to describe an array starting from x+offset. - * @li Operations return an error status, because exceptions are - * not widely available in C++ (yet). - */ -class ACE_Export ACE_InputCDR -{ -public: - // The translators need privileged access to efficiently demarshal - // arrays and such. - friend class ACE_Char_Codeset_Translator; - friend class ACE_WChar_Codeset_Translator; - - /** - * Create an input stream from an arbitrary buffer. The buffer must - * be properly aligned because this contructor will *not* work if - * the buffer is aligned unproperly.See ACE_ptr_align_binary() for - * instructions on how to align a pointer properly and use - * ACE_CDR::MAX_ALIGNMENT for the correct alignment. - */ - ACE_InputCDR (const char *buf, - size_t bufsiz, - int byte_order = ACE_CDR::BYTE_ORDER_NATIVE, - ACE_CDR::Octet major_version = ACE_CDR_GIOP_MAJOR_VERSION, - ACE_CDR::Octet minor_version = ACE_CDR_GIOP_MINOR_VERSION); - - /// Create an empty input stream. The caller is responsible for - /// putting the right data and providing the right alignment. - ACE_InputCDR (size_t bufsiz, - int byte_order = ACE_CDR::BYTE_ORDER_NATIVE, - ACE_CDR::Octet major_version = ACE_CDR_GIOP_MAJOR_VERSION, - ACE_CDR::Octet minor_version = ACE_CDR_GIOP_MINOR_VERSION); - - /// Create an input stream from an ACE_Message_Block - /** - * The alignment of the @a data block is carried into the new - * ACE_InputCDR object. This constructor either increments the - * @a data reference count, or copies the data (if it's a compound - * message block) so the caller can release the block immediately - * upon return. - */ - ACE_InputCDR (const ACE_Message_Block *data, - int byte_order = ACE_CDR::BYTE_ORDER_NATIVE, - ACE_CDR::Octet major_version = ACE_CDR_GIOP_MAJOR_VERSION, - ACE_CDR::Octet minor_version = ACE_CDR_GIOP_MINOR_VERSION, - ACE_Lock* lock = 0); - - /// Create an input stream from an ACE_Data_Block. The - /// indicates whether the @a data can be deleted by the CDR stream - /// or not - ACE_InputCDR (ACE_Data_Block *data, - ACE_Message_Block::Message_Flags flag = 0, - int byte_order = ACE_CDR::BYTE_ORDER_NATIVE, - ACE_CDR::Octet major_version = ACE_CDR_GIOP_MAJOR_VERSION, - ACE_CDR::Octet minor_version = ACE_CDR_GIOP_MINOR_VERSION); - - /// Create an input stream from an ACE_Data_Block. It also sets the - /// read and write pointers at the desired positions. This would be - /// helpful if the applications desires to create a new CDR stream - /// from a semi-processed datablock. - ACE_InputCDR (ACE_Data_Block *data, - ACE_Message_Block::Message_Flags flag, - size_t read_pointer_position, - size_t write_pointer_position, - int byte_order = ACE_CDR::BYTE_ORDER_NATIVE, - ACE_CDR::Octet major_version = ACE_CDR_GIOP_MAJOR_VERSION, - ACE_CDR::Octet minor_version = ACE_CDR_GIOP_MINOR_VERSION); - - /** - * These make a copy of the current stream state, but do not copy - * the internal buffer, so the same stream can be read multiple - * times efficiently. - */ - ACE_InputCDR (const ACE_InputCDR& rhs); - - ACE_InputCDR& operator= (const ACE_InputCDR& rhs); - - /// When interpreting indirected TypeCodes it is useful to make a - /// "copy" of the stream starting in the new position. - ACE_InputCDR (const ACE_InputCDR& rhs, - size_t size, - ACE_CDR::Long offset); - - /// This creates an encapsulated stream, the first byte must be (per - /// the spec) the byte order of the encapsulation. - ACE_InputCDR (const ACE_InputCDR& rhs, - size_t size); - - /// Create an input CDR from an output CDR. - ACE_InputCDR (const ACE_OutputCDR& rhs, - ACE_Allocator* buffer_allocator = 0, - ACE_Allocator* data_block_allocator = 0, - ACE_Allocator* message_block_allocator = 0); - - /// Helper class to transfer the contents from one input CDR to - /// another without requiring any extra memory allocations, data - /// copies or too many temporaries. - struct ACE_Export Transfer_Contents - { - Transfer_Contents (ACE_InputCDR &rhs); - - ACE_InputCDR &rhs_; - }; - /// Transfer the contents from to a new CDR - ACE_InputCDR (Transfer_Contents rhs); - - /// Destructor - virtual ~ACE_InputCDR (void); - - /// Disambiguate overloading when extracting octets, chars, - /// booleans, and bounded strings - //@{ @name Helper classes - - struct ACE_Export to_boolean - { - explicit to_boolean (ACE_CDR::Boolean &b); - ACE_CDR::Boolean &ref_; - }; - - struct ACE_Export to_char - { - explicit to_char (ACE_CDR::Char &c); - ACE_CDR::Char &ref_; - }; - - struct ACE_Export to_wchar - { - explicit to_wchar (ACE_CDR::WChar &wc); - ACE_CDR::WChar &ref_; - }; - - struct ACE_Export to_octet - { - explicit to_octet (ACE_CDR::Octet &o); - ACE_CDR::Octet &ref_; - }; - - struct ACE_Export to_string - { - /** - * @deprecated The constructor taking a non-const string is now - * deprecated (C++ mapping 00-01-02), but we keep it - * around for backward compatibility. - */ - to_string (ACE_CDR::Char *&s, - ACE_CDR::ULong b); - to_string (const ACE_CDR::Char *&s, - ACE_CDR::ULong b); - const ACE_CDR::Char *&val_; - ACE_CDR::ULong bound_; - }; - - struct ACE_Export to_wstring - { - /// The constructor taking a non-const wstring is - /// now deprecated (C++ mapping 00-01-02), but we - /// keep it around for backward compatibility. - to_wstring (ACE_CDR::WChar *&ws, - ACE_CDR::ULong b); - to_wstring (const ACE_CDR::WChar *&ws, - ACE_CDR::ULong b); - const ACE_CDR::WChar *&val_; - ACE_CDR::ULong bound_; - }; - //@} - - /** - * Return @c false on failure and @c true on success. - */ - //@{ @name Read basic IDL types - ACE_CDR::Boolean read_boolean (ACE_CDR::Boolean& x); - ACE_CDR::Boolean read_char (ACE_CDR::Char &x); - ACE_CDR::Boolean read_wchar (ACE_CDR::WChar& x); - ACE_CDR::Boolean read_octet (ACE_CDR::Octet& x); - ACE_CDR::Boolean read_short (ACE_CDR::Short &x); - ACE_CDR::Boolean read_ushort (ACE_CDR::UShort &x); - ACE_CDR::Boolean read_long (ACE_CDR::Long &x); - ACE_CDR::Boolean read_ulong (ACE_CDR::ULong &x); - ACE_CDR::Boolean read_longlong (ACE_CDR::LongLong& x); - ACE_CDR::Boolean read_ulonglong (ACE_CDR::ULongLong& x); - ACE_CDR::Boolean read_float (ACE_CDR::Float &x); - ACE_CDR::Boolean read_double (ACE_CDR::Double &x); - ACE_CDR::Boolean read_longdouble (ACE_CDR::LongDouble &x); - ACE_CDR::Boolean read_fixed (ACE_CDR::Fixed &x); - - ACE_CDR::Boolean read_string (ACE_CDR::Char *&x); - ACE_CDR::Boolean read_string (ACE_CString &x); - ACE_CDR::Boolean read_wstring (ACE_CDR::WChar*& x); - //@} - - /** - * The buffer @a x must be large enough to contain @a length - * elements. - * Return @c false on failure and @c true on success. - */ - //@{ @name Read basic IDL types arrays - ACE_CDR::Boolean read_boolean_array (ACE_CDR::Boolean* x, - ACE_CDR::ULong length); - ACE_CDR::Boolean read_char_array (ACE_CDR::Char *x, - ACE_CDR::ULong length); - ACE_CDR::Boolean read_wchar_array (ACE_CDR::WChar* x, - ACE_CDR::ULong length); - ACE_CDR::Boolean read_octet_array (ACE_CDR::Octet* x, - ACE_CDR::ULong length); - ACE_CDR::Boolean read_short_array (ACE_CDR::Short *x, - ACE_CDR::ULong length); - ACE_CDR::Boolean read_ushort_array (ACE_CDR::UShort *x, - ACE_CDR::ULong length); - ACE_CDR::Boolean read_long_array (ACE_CDR::Long *x, - ACE_CDR::ULong length); - ACE_CDR::Boolean read_ulong_array (ACE_CDR::ULong *x, - ACE_CDR::ULong length); - ACE_CDR::Boolean read_longlong_array (ACE_CDR::LongLong* x, - ACE_CDR::ULong length); - ACE_CDR::Boolean read_ulonglong_array (ACE_CDR::ULongLong* x, - ACE_CDR::ULong length); - ACE_CDR::Boolean read_float_array (ACE_CDR::Float *x, - ACE_CDR::ULong length); - ACE_CDR::Boolean read_double_array (ACE_CDR::Double *x, - ACE_CDR::ULong length); - ACE_CDR::Boolean read_longdouble_array (ACE_CDR::LongDouble* x, - ACE_CDR::ULong length); - //@} - - /** - * Return @c false on failure and @c true on success. - */ - //@{ @name Skip elements - ACE_CDR::Boolean skip_boolean (void); - ACE_CDR::Boolean skip_char (void); - ACE_CDR::Boolean skip_wchar (void); - ACE_CDR::Boolean skip_octet (void); - ACE_CDR::Boolean skip_short (void); - ACE_CDR::Boolean skip_ushort (void); - ACE_CDR::Boolean skip_long (void); - ACE_CDR::Boolean skip_ulong (void); - ACE_CDR::Boolean skip_longlong (void); - ACE_CDR::Boolean skip_ulonglong (void); - ACE_CDR::Boolean skip_float (void); - ACE_CDR::Boolean skip_double (void); - ACE_CDR::Boolean skip_longdouble (void); - ACE_CDR::Boolean skip_fixed (void); - //@} - - /** - * The next field must be a string, this method skips it. It is - * useful in parsing a TypeCode. - * @return @c false on failure and @c true on success. - */ - ACE_CDR::Boolean skip_wstring (void); - ACE_CDR::Boolean skip_string (void); - - /// Skip @a n bytes in the CDR stream. - /** - * @return @c false on failure and @c true on success. - */ - ACE_CDR::Boolean skip_bytes (size_t n); - - /// returns @c false if a problem has been detected. - bool good_bit (void) const; - - /** - * @return The start of the message block chain for this CDR - * stream. - * - * @note In the current implementation the chain has length 1, but - * we are planning to change that. - */ - const ACE_Message_Block* start (void) const; - - // = The following functions are useful to read the contents of the - // CDR stream from a socket or file. - - /** - * Grow the internal buffer, reset @c rd_ptr to the first byte in - * the new buffer that is properly aligned, and set @c wr_ptr to @c - * rd_ptr @c + @c newsize - */ - int grow (size_t newsize); - - /** - * After reading and partially parsing the contents the user can - * detect a change in the byte order, this method will let him/her - * change it. - */ - void reset_byte_order (int byte_order); - - /// Re-initialize the CDR stream, copying the contents of the chain - /// of message_blocks starting from @a data. - void reset (const ACE_Message_Block *data, - int byte_order); - - /// Steal the contents from the current CDR. - ACE_Message_Block *steal_contents (void); - - /// Steal the contents of @a cdr and make a shallow copy into this - /// stream. - void steal_from (ACE_InputCDR &cdr); - - /// Exchange data blocks with the caller of this method. The read - /// and write pointers are also exchanged. - /** - * @note We now do only with the start_ message block. - */ - void exchange_data_blocks (ACE_InputCDR &cdr); - - /// Copy the data portion from the @a cdr to this cdr and return the - /// data content (ie. the ACE_Data_Block) from this CDR to the - /// caller. - /** - * @note The caller is responsible for managing the memory of the - * returned ACE_Data_Block. - */ - ACE_Data_Block* clone_from (ACE_InputCDR &cdr); - - /// Re-initialize the CDR stream, forgetting about the old contents - /// of the stream and allocating a new buffer (from the allocators). - void reset_contents (void); - - /// Returns the current position for the @c rd_ptr. - char* rd_ptr (void); - - /// Returns the current position for the @c wr_ptr. - char* wr_ptr (void); - - /// Return how many bytes are left in the stream. - size_t length (void) const; - - /** - * Utility function to allow the user more flexibility. - * Skips up to the nearest @a alignment-byte boundary. - * Argument MUST be a power of 2. - * - * @return 0 on success and -1 on failure. - */ - int align_read_ptr (size_t alignment); - - /// If @c true then this stream is writing in non-native byte order. - /// This is only meaningful if ACE_ENABLE_SWAP_ON_WRITE is defined. - bool do_byte_swap (void) const; - - /// If @c do_byte_swap() returns @c false, this returns - /// ACE_CDR_BYTE_ORDER else it returns !ACE_CDR_BYTE_ORDER. - int byte_order (void) const; - - /// Access the codeset translators. They can be nil! - ACE_Char_Codeset_Translator *char_translator (void) const; - ACE_WChar_Codeset_Translator *wchar_translator (void) const; - - /// Set the codeset translators. - void char_translator (ACE_Char_Codeset_Translator *); - void wchar_translator (ACE_WChar_Codeset_Translator *); - - /** - * Returns (in @a buf) the next position in the buffer aligned to - * @a size. It advances the Message_Block @c rd_ptr past the data - * (i.e., @c buf @c + @c size). Sets the good_bit to @c false and - * returns a -1 on failure. - */ - int adjust (size_t size, - char *&buf); - - /// As above, but now the size and alignment requirements may be - /// different. - int adjust (size_t size, - size_t align, - char *&buf); - - /// Set the underlying GIOP version.. - void set_version (ACE_CDR::Octet major, ACE_CDR::Octet minor); - - /// Set the underlying GIOP version.. - void get_version (ACE_CDR::Octet &major, ACE_CDR::Octet &minor); - -#if defined (ACE_HAS_MONITOR_POINTS) && (ACE_HAS_MONITOR_POINTS == 1) - /// Register and unregister our buffer size monitor. - void register_monitor (const char* id); - void unregister_monitor (void); -#endif /* ACE_HAS_MONITOR_POINTS==1 */ - -protected: - - /// The start of the chain of message blocks, even though in the - /// current version the chain always has length 1. - ACE_Message_Block start_; - - /// The CDR stream byte order does not match the one on the machine, - /// swapping is needed while reading. - bool do_byte_swap_; - - /// set to @c false when an error occurs. - bool good_bit_; - - /// The GIOP versions for this stream - ACE_CDR::Octet major_version_; - ACE_CDR::Octet minor_version_; - - /// If not nil, invoke for translation of character and string data. - ACE_Char_Codeset_Translator *char_translator_; - ACE_WChar_Codeset_Translator *wchar_translator_; - -#if defined (ACE_HAS_MONITOR_POINTS) && (ACE_HAS_MONITOR_POINTS == 1) - ACE::Monitor_Control::Size_Monitor *monitor_; -#endif /* ACE_HAS_MONITOR_POINTS==1 */ - -private: - - ACE_CDR::Boolean read_1 (ACE_CDR::Octet *x); - ACE_CDR::Boolean read_2 (ACE_CDR::UShort *x); - ACE_CDR::Boolean read_4 (ACE_CDR::ULong *x); - ACE_CDR::Boolean read_8 (ACE_CDR::ULongLong *x); - ACE_CDR::Boolean read_16 (ACE_CDR::LongDouble *x); - - // Several types can be read using the same routines, since TAO - // tries to use native types with known size for each CORBA type. - // We could use void* or char* to make the interface more - // consistent, but using native types let us exploit the strict - // alignment requirements of CDR streams and implement the - // operations using asignment. - - /** - * Read an array of @a length elements, each of @a size bytes and the - * start aligned at a multiple of @a align. The elements are assumed - * to be packed with the right alignment restrictions. It is mostly - * designed for buffers of the basic types. - * - * This operation uses @c memcpy; as explained above it is expected - * that using assignment is faster that @c memcpy for one element, - * but for several elements @c memcpy should be more efficient, it - * could be interesting to find the break even point and optimize - * for that case, but that would be too platform dependent. - */ - ACE_CDR::Boolean read_array (void* x, - size_t size, - size_t align, - ACE_CDR::ULong length); - - /** - * On those occasions when the native codeset for wchar is smaller than - * the size of a wchar_t, such as using UTF-16 with a 4-byte wchar_t, a - * special form of reading the array is needed. Actually, this should be - * a default translator. - */ - ACE_CDR::Boolean read_wchar_array_i (ACE_CDR::WChar * x, - ACE_CDR::ULong length); - - /// Move the rd_ptr ahead by @a offset bytes. - void rd_ptr (size_t offset); - - /// Points to the continuation field of the current message block. - char* end (void); -}; - -// **************************************************************** - -/** - * @class ACE_Char_Codeset_Translator - * - * @brief Codeset translation routines common to both Output and Input - * CDR streams. - * - * This class is a base class for defining codeset translation - * routines to handle the character set translations required by - * both CDR Input streams and CDR Output streams. - * - * Translators are reference counted. This allows for stateful as well - * as stateless translators. Stateless translators will be allocated - * once whereas CDR Streams own their own copy of a stateful translator. - */ -class ACE_Export ACE_Char_Codeset_Translator -{ -public: - virtual ~ACE_Char_Codeset_Translator (); - - /// Read a single character from the stream, converting from the - /// stream codeset to the native codeset - virtual ACE_CDR::Boolean read_char (ACE_InputCDR&, - ACE_CDR::Char&) = 0; - - /// Read a string from the stream, including the length, converting - /// the characters from the stream codeset to the native codeset - virtual ACE_CDR::Boolean read_string (ACE_InputCDR&, - ACE_CDR::Char *&) = 0; - - /// Read an array of characters from the stream, converting the - /// characters from the stream codeset to the native codeset. - virtual ACE_CDR::Boolean read_char_array (ACE_InputCDR&, - ACE_CDR::Char*, - ACE_CDR::ULong) = 0; - - /// Write a single character to the stream, converting from the - /// native codeset to the stream codeset - virtual ACE_CDR::Boolean write_char (ACE_OutputCDR&, - ACE_CDR::Char) = 0; - - /// Write a string to the stream, including the length, converting - /// from the native codeset to the stream codeset - virtual ACE_CDR::Boolean write_string (ACE_OutputCDR&, - ACE_CDR::ULong, - const ACE_CDR::Char*) = 0; - - /// Write an array of characters to the stream, converting from the - /// native codeset to the stream codeset - virtual ACE_CDR::Boolean write_char_array (ACE_OutputCDR&, - const ACE_CDR::Char*, - ACE_CDR::ULong) = 0; - - virtual ACE_CDR::ULong ncs () = 0; - virtual ACE_CDR::ULong tcs () = 0; -protected: - /// Children have access to low-level routines because they cannot - /// use read_char or something similar (it would recurse). - ACE_CDR::Boolean read_1 (ACE_InputCDR& input, - ACE_CDR::Octet *x); - ACE_CDR::Boolean write_1 (ACE_OutputCDR& output, - const ACE_CDR::Octet *x); - - /// Efficiently read @a length elements of size @a size each from - /// @a input into @a x; the data must be aligned to @a align. - ACE_CDR::Boolean read_array (ACE_InputCDR& input, - void* x, - size_t size, - size_t align, - ACE_CDR::ULong length); - - /** - * Efficiently write @a length elements of size @a size from into - * . Before inserting the elements enough padding is added - * to ensure that the elements will be aligned to in the - * stream. - */ - ACE_CDR::Boolean write_array (ACE_OutputCDR& output, - const void *x, - size_t size, - size_t align, - ACE_CDR::ULong length); - - /** - * Exposes the stream implementation of , this is useful in - * many cases to minimize memory allocations during marshaling. - * On success @a buf will contain a contiguous area in the CDR stream - * that can hold @a size bytes aligned to @a align. - * Results - */ - int adjust (ACE_OutputCDR& out, - size_t size, - size_t align, - char *&buf); - - /// Used by derived classes to set errors in the CDR stream. - void good_bit (ACE_OutputCDR& out, bool bit); - - /// Obtain the CDR Stream's major & minor version values. - ACE_CDR::Octet major_version (ACE_InputCDR& input); - ACE_CDR::Octet minor_version (ACE_InputCDR& input); - ACE_CDR::Octet major_version (ACE_OutputCDR& output); - ACE_CDR::Octet minor_version (ACE_OutputCDR& output); -}; - -// **************************************************************** - -/** - * @class ACE_WChar_Codeset_Translator - * - * @brief Codeset translation routines common to both Output and Input - * CDR streams. - * - * This class is a base class for defining codeset translation - * routines to handle the character set translations required by - * both CDR Input streams and CDR Output streams. - */ -class ACE_Export ACE_WChar_Codeset_Translator -{ -public: - virtual ~ACE_WChar_Codeset_Translator (); - - virtual ACE_CDR::Boolean read_wchar (ACE_InputCDR&, - ACE_CDR::WChar&) = 0; - virtual ACE_CDR::Boolean read_wstring (ACE_InputCDR&, - ACE_CDR::WChar *&) = 0; - virtual ACE_CDR::Boolean read_wchar_array (ACE_InputCDR&, - ACE_CDR::WChar*, - ACE_CDR::ULong) = 0; - virtual ACE_CDR::Boolean write_wchar (ACE_OutputCDR&, - ACE_CDR::WChar) = 0; - virtual ACE_CDR::Boolean write_wstring (ACE_OutputCDR&, - ACE_CDR::ULong, - const ACE_CDR::WChar*) = 0; - virtual ACE_CDR::Boolean write_wchar_array (ACE_OutputCDR&, - const ACE_CDR::WChar*, - ACE_CDR::ULong) = 0; - - virtual ACE_CDR::ULong ncs () = 0; - virtual ACE_CDR::ULong tcs () = 0; -protected: - /// Children have access to low-level routines because they cannot - /// use read_char or something similar (it would recurse). - ACE_CDR::Boolean read_1 (ACE_InputCDR& input, - ACE_CDR::Octet *x); - ACE_CDR::Boolean read_2 (ACE_InputCDR& input, - ACE_CDR::UShort *x); - ACE_CDR::Boolean read_4 (ACE_InputCDR& input, - ACE_CDR::ULong *x); - ACE_CDR::Boolean write_1 (ACE_OutputCDR& output, - const ACE_CDR::Octet *x); - ACE_CDR::Boolean write_2 (ACE_OutputCDR& output, - const ACE_CDR::UShort *x); - ACE_CDR::Boolean write_4 (ACE_OutputCDR& output, - const ACE_CDR::ULong *x); - - /// Efficiently read @a length elements of size @a size each from - /// @a input into @a x; the data must be aligned to @a align. - ACE_CDR::Boolean read_array (ACE_InputCDR& input, - void* x, - size_t size, - size_t align, - ACE_CDR::ULong length); - - /** - * Efficiently write @a length elements of size @a size from @a x into - * @a output. Before inserting the elements enough padding is added - * to ensure that the elements will be aligned to @a align in the - * stream. - */ - ACE_CDR::Boolean write_array (ACE_OutputCDR& output, - const void *x, - size_t size, - size_t align, - ACE_CDR::ULong length); - - /** - * Exposes the stream implementation of @a adjust, this is useful in - * many cases to minimize memory allocations during marshaling. - * On success @a buf will contain a contiguous area in the CDR stream - * that can hold @a size bytes aligned to @a align. - * Results - */ - int adjust (ACE_OutputCDR& out, - size_t size, - size_t align, - char *&buf); - - /// Used by derived classes to set errors in the CDR stream. - void good_bit (ACE_OutputCDR& out, bool bit); - - /// Obtain the CDR Stream's major & minor version values. - ACE_CDR::Octet major_version (ACE_InputCDR& input); - ACE_CDR::Octet minor_version (ACE_InputCDR& input); - ACE_CDR::Octet major_version (ACE_OutputCDR& output); - ACE_CDR::Octet minor_version (ACE_OutputCDR& output); - -}; - -// @@ These operators should not be inlined since they force SString.h -// to be included in this header. -extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR &os, - const ACE_CString &x); - -extern ACE_Export ACE_CDR::Boolean operator>> (ACE_InputCDR &is, - ACE_CString &x); - - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -# include "ace/CDR_Stream.inl" -#else /* __ACE_INLINE__ */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -// Not used by CORBA or TAO -extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR &os, - ACE_CDR::Char x); -// CDR output operators for primitive types - -extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR &os, - ACE_CDR::Short x); -extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR &os, - ACE_CDR::UShort x); -extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR &os, - ACE_CDR::Long x); -extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR &os, - ACE_CDR::ULong x); -extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR &os, - ACE_CDR::LongLong x); -extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR &os, - ACE_CDR::ULongLong x); -extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR& os, - ACE_CDR::LongDouble x); -extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR &os, - ACE_CDR::Float x); -extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR &os, - ACE_CDR::Double x); -extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR &os, - const ACE_CDR::Fixed &x); - -// CDR output operator from helper classes - -extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR &os, - ACE_OutputCDR::from_boolean x); -extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR &os, - ACE_OutputCDR::from_char x); -extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR &os, - ACE_OutputCDR::from_wchar x); -extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR &os, - ACE_OutputCDR::from_octet x); -extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR &os, - ACE_OutputCDR::from_string x); -extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR &os, - ACE_OutputCDR::from_wstring x); -extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR &os, - const ACE_CDR::Char* x); -extern ACE_Export ACE_CDR::Boolean operator<< (ACE_OutputCDR &os, - const ACE_CDR::WChar* x); - -// Not used by CORBA or TAO -extern ACE_Export ACE_CDR::Boolean operator>> (ACE_InputCDR &is, - ACE_CDR::Char &x); -// CDR input operators for primitive types - -extern ACE_Export ACE_CDR::Boolean operator>> (ACE_InputCDR &is, - ACE_CDR::Short &x); -extern ACE_Export ACE_CDR::Boolean operator>> (ACE_InputCDR &is, - ACE_CDR::UShort &x); -extern ACE_Export ACE_CDR::Boolean operator>> (ACE_InputCDR &is, - ACE_CDR::Long &x); -extern ACE_Export ACE_CDR::Boolean operator>> (ACE_InputCDR &is, - ACE_CDR::ULong &x); -extern ACE_Export ACE_CDR::Boolean operator>> (ACE_InputCDR &is, - ACE_CDR::LongLong &x); -extern ACE_Export ACE_CDR::Boolean operator>> (ACE_InputCDR &is, - ACE_CDR::ULongLong &x); -extern ACE_Export ACE_CDR::Boolean operator>> (ACE_InputCDR &is, - ACE_CDR::LongDouble &x); -extern ACE_Export ACE_CDR::Boolean operator>> (ACE_InputCDR &is, - ACE_CDR::Float &x); -extern ACE_Export ACE_CDR::Boolean operator>> (ACE_InputCDR &is, - ACE_CDR::Double &x); -extern ACE_Export ACE_CDR::Boolean operator>> (ACE_InputCDR &is, - ACE_CDR::Fixed &x); - -// CDR input operator from helper classes - -extern ACE_Export ACE_CDR::Boolean operator>> (ACE_InputCDR &is, - ACE_InputCDR::to_boolean x); -extern ACE_Export ACE_CDR::Boolean operator>> (ACE_InputCDR &is, - ACE_InputCDR::to_char x); -extern ACE_Export ACE_CDR::Boolean operator>> (ACE_InputCDR &is, - ACE_InputCDR::to_wchar x); -extern ACE_Export ACE_CDR::Boolean operator>> (ACE_InputCDR &is, - ACE_InputCDR::to_octet x); -extern ACE_Export ACE_CDR::Boolean operator>> (ACE_InputCDR &is, - ACE_InputCDR::to_string x); -extern ACE_Export ACE_CDR::Boolean operator>> (ACE_InputCDR &is, - ACE_InputCDR::to_wstring x); -extern ACE_Export ACE_CDR::Boolean operator>> (ACE_InputCDR &is, - ACE_CDR::Char*& x); -extern ACE_Export ACE_CDR::Boolean operator>> (ACE_InputCDR &is, - ACE_CDR::WChar*& x); - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* __ACE_INLINE__ */ - -#if defined (GEN_OSTREAM_OPS) - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -// ostream insertion operators for debugging code generated from IDL. All -// but these below are either in generated code itself or are unambiguous -// primitive types. - -ACE_Export std::ostream& operator<< (std::ostream &os, - ACE_OutputCDR::from_boolean x); - -ACE_Export std::ostream& operator<< (std::ostream &os, - ACE_OutputCDR::from_char x); - -ACE_Export std::ostream& operator<< (std::ostream &os, - ACE_OutputCDR::from_wchar x); - -ACE_Export std::ostream& operator<< (std::ostream &os, - ACE_OutputCDR::from_octet x); - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* GEN_OSTREAM_OPS */ - -#include /**/ "ace/post.h" - -#endif /* ACE_CDR_STREAM_H */ diff --git a/modules/worldengine/deps/acelite/ace/CDR_Stream.inl b/modules/worldengine/deps/acelite/ace/CDR_Stream.inl deleted file mode 100644 index 0103d27922..0000000000 --- a/modules/worldengine/deps/acelite/ace/CDR_Stream.inl +++ /dev/null @@ -1,1787 +0,0 @@ -// -*- C++ -*- -#include "ace/OS_NS_string.h" -#include "ace/OS_Memory.h" - -// **************************************************************** - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -// implementing the special types -ACE_INLINE -ACE_OutputCDR::from_boolean::from_boolean (ACE_CDR::Boolean b) - : val_ (b) -{ -} - -ACE_INLINE -ACE_InputCDR::to_boolean::to_boolean (ACE_CDR::Boolean &b) - : ref_ (b) -{ -} - -ACE_INLINE -ACE_OutputCDR::from_octet::from_octet (ACE_CDR::Octet o) - : val_ (o) -{ -} - -ACE_INLINE -ACE_InputCDR::to_octet::to_octet (ACE_CDR::Octet &o) - : ref_ (o) -{ -} - -ACE_INLINE -ACE_OutputCDR::from_char::from_char (ACE_CDR::Char c) - : val_ (c) -{ -} - -ACE_INLINE -ACE_InputCDR::to_char::to_char (ACE_CDR::Char &c) - : ref_ (c) -{ -} - -ACE_INLINE -ACE_OutputCDR::from_wchar::from_wchar (ACE_CDR::WChar wc) - : val_ (wc) -{ -} - -ACE_INLINE -ACE_InputCDR::to_wchar::to_wchar (ACE_CDR::WChar &wc) - : ref_ (wc) -{ -} - -ACE_INLINE -ACE_OutputCDR::from_string::from_string (ACE_CDR::Char *s, - ACE_CDR::ULong b, - ACE_CDR::Boolean nocopy) - : val_ (s), - bound_ (b), - nocopy_ (nocopy) -{ -} - -ACE_INLINE -ACE_OutputCDR::from_string::from_string (const ACE_CDR::Char *s, - ACE_CDR::ULong b, - ACE_CDR::Boolean nocopy) - : val_ (const_cast (s)), - bound_ (b), - nocopy_ (nocopy) -{ -} - -ACE_INLINE -ACE_InputCDR::to_string::to_string (ACE_CDR::Char *&s, - ACE_CDR::ULong b) - : val_ (const_cast (s)), - bound_ (b) -{ -} - -ACE_INLINE -ACE_InputCDR::to_string::to_string (const ACE_CDR::Char *&s, - ACE_CDR::ULong b) - : val_ (s), - bound_ (b) -{ -} - -ACE_INLINE -ACE_OutputCDR::from_wstring::from_wstring (ACE_CDR::WChar *ws, - ACE_CDR::ULong b, - ACE_CDR::Boolean nocopy) - : val_ (ws), - bound_ (b), - nocopy_ (nocopy) -{ -} - -ACE_INLINE -ACE_OutputCDR::from_wstring::from_wstring (const ACE_CDR::WChar *ws, - ACE_CDR::ULong b, - ACE_CDR::Boolean nocopy) - : val_ (const_cast (ws)), - bound_ (b), - nocopy_ (nocopy) -{ -} - -ACE_INLINE -ACE_InputCDR::to_wstring::to_wstring (ACE_CDR::WChar *&ws, - ACE_CDR::ULong b) - : val_ (const_cast (ws)), - bound_ (b) -{ -} - -ACE_INLINE -ACE_InputCDR::to_wstring::to_wstring (const ACE_CDR::WChar *&ws, - ACE_CDR::ULong b) - : val_ (ws), - bound_ (b) -{ -} - -ACE_INLINE -ACE_InputCDR::Transfer_Contents::Transfer_Contents (ACE_InputCDR &rhs) - : rhs_ (rhs) -{ -} - -// **************************************************************** - -ACE_INLINE -ACE_OutputCDR::~ACE_OutputCDR (void) -{ - if (this->start_.cont () != 0) - { - ACE_Message_Block::release (this->start_.cont ()); - this->start_.cont (0); - } - - this->current_ = 0; - -#if defined (ACE_HAS_MONITOR_POINTS) && (ACE_HAS_MONITOR_POINTS == 1) - this->monitor_->remove_ref (); -#endif /* ACE_HAS_MONITOR_POINTS==1 */ -} - -ACE_INLINE void -ACE_OutputCDR::reset (void) -{ - this->current_ = &this->start_; - this->current_is_writable_ = true; - ACE_CDR::mb_align (&this->start_); - -#if !defined (ACE_LACKS_CDR_ALIGNMENT) - this->current_alignment_ = 0; -#endif /* ACE_LACKS_CDR_ALIGNMENT */ - - // It is tempting not to remove the memory, but we need to do so to - // release any potential user buffers chained in the continuation - // field. - - ACE_Message_Block * const cont = this->start_.cont (); - if (cont) - { - ACE_Message_Block::release (cont); - this->start_.cont (0); - } - -#if defined (ACE_HAS_MONITOR_POINTS) && (ACE_HAS_MONITOR_POINTS == 1) - this->monitor_->receive (this->start_.total_size ()); -#endif /* ACE_HAS_MONITOR_POINTS==1 */ -} - -// Encode the CDR stream. - -ACE_INLINE ACE_CDR::Boolean -ACE_OutputCDR::write_octet (ACE_CDR::Octet x) -{ - return this->write_1 (&x); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_OutputCDR::write_boolean (ACE_CDR::Boolean x) -{ - return - static_cast ( - this->write_octet ( - x - ? static_cast (1) - : static_cast (0))); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_OutputCDR::write_char (ACE_CDR::Char x) -{ - if (this->char_translator_ == 0) - { - ACE_CDR::Octet temp = static_cast (x); - return this->write_1 (&temp); - } - return this->char_translator_->write_char (*this, x); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_OutputCDR::write_short (ACE_CDR::Short x) -{ - ACE_CDR::UShort temp = static_cast (x); - return this->write_2 (&temp); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_OutputCDR::write_ushort (ACE_CDR::UShort x) -{ - return this->write_2 (&x); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_OutputCDR::write_long (ACE_CDR::Long x) -{ - ACE_CDR::ULong temp = static_cast (x); - return this->write_4 (&temp); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_OutputCDR::write_ulong (ACE_CDR::ULong x) -{ - return this->write_4 (&x); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_OutputCDR::write_longlong (const ACE_CDR::LongLong &x) -{ - void const * const temp = &x; - return this->write_8 (reinterpret_cast (temp)); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_OutputCDR::write_ulonglong (const ACE_CDR::ULongLong &x) -{ - return this->write_8 (&x); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_OutputCDR::write_float (ACE_CDR::Float x) -{ - void const * const temp = &x; - return this->write_4 (reinterpret_cast (temp)); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_OutputCDR::write_double (const ACE_CDR::Double &x) -{ - void const * const temp = &x; - return this->write_8 (reinterpret_cast (temp)); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_OutputCDR::write_longdouble (const ACE_CDR::LongDouble &x) -{ - return this->write_16 (&x); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_OutputCDR::write_fixed (const ACE_CDR::Fixed &x) -{ - int n; - const ACE_CDR::Octet *arr = x.to_octets (n); - return this->write_array (arr, ACE_CDR::OCTET_SIZE, ACE_CDR::OCTET_ALIGN, n); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_OutputCDR::write_string (const ACE_CDR::Char *x) -{ - if (x) - { - ACE_CDR::ULong const len = - static_cast (ACE_OS::strlen (x)); - return this->write_string (len, x); - } - - return this->write_string (0, 0); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_OutputCDR::write_wstring (const ACE_CDR::WChar *x) -{ - if (x) - { - ACE_CDR::ULong const len = - static_cast (ACE_OS::strlen (x)); - return this->write_wstring (len, x); - } - - return this->write_wstring (0, 0); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_OutputCDR::write_char_array (const ACE_CDR::Char *x, - ACE_CDR::ULong length) -{ - if (this->char_translator_ == 0) - return this->write_array (x, - ACE_CDR::OCTET_SIZE, - ACE_CDR::OCTET_ALIGN, - length); - return this->char_translator_->write_char_array (*this, x, length); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_OutputCDR::write_wchar_array (const ACE_CDR::WChar* x, - ACE_CDR::ULong length) -{ - if (this->wchar_translator_) - return this->wchar_translator_->write_wchar_array (*this, x, length); - - if (ACE_OutputCDR::wchar_maxbytes_ == 0) - { - errno = EACCES; - return (ACE_CDR::Boolean) (this->good_bit_ = false); - } - - if (ACE_OutputCDR::wchar_maxbytes_ == sizeof (ACE_CDR::WChar)) - return this->write_array (x, - sizeof (ACE_CDR::WChar), - sizeof (ACE_CDR::WChar) == 2 - ? ACE_CDR::SHORT_ALIGN - : ACE_CDR::LONG_ALIGN, - length); - return this->write_wchar_array_i (x,length); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_OutputCDR::write_octet_array (const ACE_CDR::Octet* x, - ACE_CDR::ULong length) -{ - return this->write_array (x, - ACE_CDR::OCTET_SIZE, - ACE_CDR::OCTET_ALIGN, - length); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_OutputCDR::write_short_array (const ACE_CDR::Short *x, - ACE_CDR::ULong length) -{ - return this->write_array (x, - ACE_CDR::SHORT_SIZE, - ACE_CDR::SHORT_ALIGN, - length); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_OutputCDR::write_ushort_array (const ACE_CDR::UShort *x, - ACE_CDR::ULong length) -{ - return this->write_array (x, - ACE_CDR::SHORT_SIZE, - ACE_CDR::SHORT_ALIGN, - length); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_OutputCDR::write_long_array (const ACE_CDR::Long *x, - ACE_CDR::ULong length) -{ - return this->write_array (x, - ACE_CDR::LONG_SIZE, - ACE_CDR::LONG_ALIGN, - length); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_OutputCDR::write_ulong_array (const ACE_CDR::ULong *x, - ACE_CDR::ULong length) -{ - return this->write_array (x, - ACE_CDR::LONG_SIZE, - ACE_CDR::LONG_ALIGN, - length); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_OutputCDR::write_longlong_array (const ACE_CDR::LongLong *x, - ACE_CDR::ULong length) -{ - return this->write_array (x, - ACE_CDR::LONGLONG_SIZE, - ACE_CDR::LONGLONG_ALIGN, - length); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_OutputCDR::write_ulonglong_array (const ACE_CDR::ULongLong *x, - ACE_CDR::ULong length) -{ - return this->write_array (x, - ACE_CDR::LONGLONG_SIZE, - ACE_CDR::LONGLONG_ALIGN, - length); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_OutputCDR::write_float_array (const ACE_CDR::Float *x, - ACE_CDR::ULong length) -{ - return this->write_array (x, - ACE_CDR::LONG_SIZE, - ACE_CDR::LONG_ALIGN, - length); -} - - -ACE_INLINE ACE_CDR::Boolean -ACE_OutputCDR::write_double_array (const ACE_CDR::Double *x, - ACE_CDR::ULong length) -{ - return this->write_array (x, - ACE_CDR::LONGLONG_SIZE, - ACE_CDR::LONGLONG_ALIGN, - length); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_OutputCDR::write_longdouble_array (const ACE_CDR::LongDouble* x, - ACE_CDR::ULong length) -{ - return this->write_array (x, - ACE_CDR::LONGDOUBLE_SIZE, - ACE_CDR::LONGDOUBLE_ALIGN, - length); -} - -ACE_INLINE bool -ACE_OutputCDR::good_bit (void) const -{ - return this->good_bit_; -} - -ACE_INLINE int -ACE_OutputCDR::adjust (size_t size, - size_t align, - char*& buf) -{ - if (!this->current_is_writable_) - return this->grow_and_adjust (size, align, buf); - -#if !defined (ACE_LACKS_CDR_ALIGNMENT) - size_t const offset = - ACE_align_binary (this->current_alignment_, align) - - this->current_alignment_; - - buf = this->current_->wr_ptr () + offset; -#else - buf = this->current_->wr_ptr (); -#endif /* ACE_LACKS_CDR_ALIGNMENT */ - - char * const end = buf + size; - - if (end <= this->current_->end () && - end >= buf) - { -#if !defined (ACE_LACKS_CDR_ALIGNMENT) - this->current_alignment_ += offset + size; -#endif /* ACE_LACKS_CDR_ALIGNMENT */ - this->current_->wr_ptr (end); - -#if defined (ACE_HAS_MONITOR_POINTS) && (ACE_HAS_MONITOR_POINTS == 1) - this->monitor_->receive (this->total_length ()); -#endif /* ACE_HAS_MONITOR_POINTS==1 */ - - return 0; - } - - return this->grow_and_adjust (size, align, buf); -} - -ACE_INLINE int -ACE_OutputCDR::adjust (size_t size, char*& buf) -{ - return this->adjust (size, size, buf); -} - -ACE_INLINE void -ACE_OutputCDR::set_version (ACE_CDR::Octet major, ACE_CDR::Octet minor) -{ - this->major_version_ = major; - this->minor_version_ = minor; -} - -ACE_INLINE void -ACE_OutputCDR::get_version (ACE_CDR::Octet &major, ACE_CDR::Octet &minor) -{ - major = this->major_version_; - minor = this->minor_version_; -} - - -ACE_INLINE const ACE_Message_Block* -ACE_OutputCDR::begin (void) const -{ - return &this->start_; -} - -ACE_INLINE const ACE_Message_Block* -ACE_OutputCDR::end (void) const -{ - return this->current_->cont (); -} - -ACE_INLINE const ACE_Message_Block* -ACE_OutputCDR::current (void) const -{ - return this->current_; -} - -ACE_INLINE size_t -ACE_OutputCDR::total_length (void) const -{ - return ACE_CDR::total_length (this->begin (), this->end ()); -} - -ACE_INLINE const char* -ACE_OutputCDR::buffer (void) const -{ - return this->start_.rd_ptr (); -} - -ACE_INLINE size_t -ACE_OutputCDR::length (void) const -{ - return this->start_.length (); -} - -ACE_INLINE bool -ACE_OutputCDR::do_byte_swap (void) const -{ - return this->do_byte_swap_; -} - -ACE_INLINE int -ACE_OutputCDR::byte_order (void) const -{ - if (this->do_byte_swap ()) - return !ACE_CDR_BYTE_ORDER; - else - return ACE_CDR_BYTE_ORDER; -} - -ACE_INLINE void -ACE_OutputCDR::reset_byte_order (int byte_order) -{ - this->do_byte_swap_ = (byte_order != ACE_CDR_BYTE_ORDER); -} - -ACE_INLINE size_t -ACE_OutputCDR::current_alignment (void) const -{ -#if !defined (ACE_LACKS_CDR_ALIGNMENT) - return this->current_alignment_; -#else - // Default value set to 0 - return 0; -#endif /* ACE_LACKS_CDR_ALIGNMENT */ -} - -ACE_INLINE void -ACE_OutputCDR::current_alignment (size_t current_alignment) -{ -#if !defined (ACE_LACKS_CDR_ALIGNMENT) - this->current_alignment_ = current_alignment; -#else - ACE_UNUSED_ARG (current_alignment); -#endif /* ACE_LACKS_CDR_ALIGNMENT */ -} - -ACE_INLINE int -ACE_OutputCDR::align_write_ptr (size_t alignment) -{ -#if !defined (ACE_LACKS_CDR_ALIGNMENT) - char *dummy; - return this->adjust (0, alignment, dummy); -#else - ACE_UNUSED_ARG (alignment); - // A return value of -1 from this function is used - // to indicate failure, returning 0 - return 0; -#endif /* ACE_LACKS_CDR_ALIGNMENT */ -} - -ACE_INLINE ACE_Char_Codeset_Translator * -ACE_OutputCDR::char_translator (void) const -{ - return this->char_translator_; -} - -ACE_INLINE ACE_WChar_Codeset_Translator * -ACE_OutputCDR::wchar_translator (void) const -{ - return this->wchar_translator_; -} - -ACE_INLINE void -ACE_OutputCDR::char_translator (ACE_Char_Codeset_Translator * ctran) -{ - this->char_translator_ = ctran; -} - -ACE_INLINE void -ACE_OutputCDR::wchar_translator (ACE_WChar_Codeset_Translator * wctran) -{ - this->wchar_translator_ = wctran; -} - -// **************************************************************** - -ACE_INLINE -ACE_InputCDR::~ACE_InputCDR (void) -{ -#if defined (ACE_HAS_MONITOR_POINTS) && (ACE_HAS_MONITOR_POINTS == 1) - this->monitor_->remove_ref (); -#endif /* ACE_HAS_MONITOR_POINTS==1 */ -} - -ACE_INLINE ACE_CDR::Boolean -ACE_InputCDR::read_octet (ACE_CDR::Octet& x) -{ - return this->read_1 (&x); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_InputCDR::read_boolean (ACE_CDR::Boolean& x) -{ - ACE_CDR::Octet tmp = 0; - (void) this->read_octet (tmp); - x = tmp ? true : false; - return (ACE_CDR::Boolean) this->good_bit_; -} - -ACE_INLINE ACE_CDR::Boolean -ACE_InputCDR::read_char (ACE_CDR::Char &x) -{ - if (this->char_translator_ == 0) - { - void *temp = &x; - return this->read_1 (reinterpret_cast (temp)); - } - return this->char_translator_->read_char (*this, x); -} - - -ACE_INLINE ACE_CDR::Boolean -ACE_InputCDR::read_short (ACE_CDR::Short &x) -{ - void *temp = &x; - return this->read_2 (reinterpret_cast (temp)); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_InputCDR::read_ushort (ACE_CDR::UShort &x) -{ - return this->read_2 (&x); -} - - -ACE_INLINE ACE_CDR::Boolean -ACE_InputCDR::read_long (ACE_CDR::Long &x) -{ - void *temp = &x; - return this->read_4 (reinterpret_cast (temp)); -} - - -ACE_INLINE ACE_CDR::Boolean -ACE_InputCDR::read_ulong (ACE_CDR::ULong &x) -{ - return this->read_4 (&x); -} - - -ACE_INLINE ACE_CDR::Boolean -ACE_InputCDR::read_longlong (ACE_CDR::LongLong &x) -{ - void *temp = &x; - return this->read_8 (reinterpret_cast (temp)); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_InputCDR::read_ulonglong (ACE_CDR::ULongLong &x) -{ - return this->read_8 (&x); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_InputCDR::read_float (ACE_CDR::Float &x) -{ - void *temp = &x; - return this->read_4 (reinterpret_cast (temp)); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_InputCDR::read_double (ACE_CDR::Double &x) -{ - void *temp = &x; - return this->read_8 (reinterpret_cast (temp)); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_InputCDR::read_longdouble (ACE_CDR::LongDouble &x) -{ - return this->read_16 (&x); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_InputCDR::read_fixed (ACE_CDR::Fixed &x) -{ - ACE_CDR::Octet a[16]; - for (int i = 0; i < 16; ++i) - { - if (!this->read_1 (a + i)) - return false; - const unsigned low = a[i] & 0xf; - if (low == ACE_CDR::Fixed::POSITIVE || - low == ACE_CDR::Fixed::NEGATIVE) - { - x = ACE_CDR::Fixed::from_octets (a, i + 1); - return true; - } - } - - return false; -} - -ACE_INLINE size_t -ACE_InputCDR::length (void) const -{ - return this->start_.length (); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_InputCDR::read_char_array (ACE_CDR::Char* x, - ACE_CDR::ULong length) -{ - // Make sure the length of the array isn't greater than the length of - // the stream. - if (length > this->length ()) - { - this->good_bit_ = false; - return false; - } - - if (this->char_translator_ == 0) - return this->read_array (x, - ACE_CDR::OCTET_SIZE, - ACE_CDR::OCTET_ALIGN, - length); - return this->char_translator_->read_char_array (*this, x, length); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_InputCDR::read_wchar_array (ACE_CDR::WChar* x, - ACE_CDR::ULong length) -{ - // Make sure the length of the array isn't greater than the length of - // the stream. - if (length * ACE_OutputCDR::wchar_maxbytes_ > this->length ()) - { - this->good_bit_ = false; - return false; - } - - if (this->wchar_translator_ != 0) - return this->wchar_translator_->read_wchar_array (*this, x, length); - if (ACE_OutputCDR::wchar_maxbytes_ != sizeof (ACE_CDR::WChar)) - return this->read_wchar_array_i (x, length); - return this->read_array (x, - sizeof (ACE_CDR::WChar), - sizeof (ACE_CDR::WChar) == 2 - ? ACE_CDR::SHORT_ALIGN - : ACE_CDR::LONG_ALIGN, - length); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_InputCDR::read_octet_array (ACE_CDR::Octet* x, - ACE_CDR::ULong length) -{ - // Make sure the length of the array isn't greater than the length of - // the stream. - if (length * ACE_CDR::OCTET_SIZE > this->length ()) - { - this->good_bit_ = false; - return false; - } - - return this->read_array (x, - ACE_CDR::OCTET_SIZE, - ACE_CDR::OCTET_ALIGN, - length); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_InputCDR::read_short_array (ACE_CDR::Short *x, - ACE_CDR::ULong length) -{ - // Make sure the length of the array isn't greater than the length of - // the stream. - if (length * ACE_CDR::SHORT_SIZE > this->length ()) - { - this->good_bit_ = false; - return false; - } - - return this->read_array (x, - ACE_CDR::SHORT_SIZE, - ACE_CDR::SHORT_ALIGN, - length); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_InputCDR::read_ushort_array (ACE_CDR::UShort *x, - ACE_CDR::ULong length) -{ - // Make sure the length of the array isn't greater than the length of - // the stream. - if (length * ACE_CDR::SHORT_SIZE > this->length ()) - { - this->good_bit_ = false; - return false; - } - - return this->read_array (x, - ACE_CDR::SHORT_SIZE, - ACE_CDR::SHORT_ALIGN, - length); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_InputCDR::read_long_array (ACE_CDR::Long *x, - ACE_CDR::ULong length) -{ - // Make sure the length of the array isn't greater than the length of - // the stream. - if (length * ACE_CDR::LONG_SIZE > this->length ()) - { - this->good_bit_ = false; - return false; - } - - return this->read_array (x, - ACE_CDR::LONG_SIZE, - ACE_CDR::LONG_ALIGN, - length); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_InputCDR::read_ulong_array (ACE_CDR::ULong *x, - ACE_CDR::ULong length) -{ - // Make sure the length of the array isn't greater than the length of - // the stream. - if (length * ACE_CDR::LONG_SIZE > this->length ()) - { - this->good_bit_ = false; - return false; - } - - return this->read_array (x, - ACE_CDR::LONG_SIZE, - ACE_CDR::LONG_ALIGN, - length); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_InputCDR::read_longlong_array (ACE_CDR::LongLong *x, - ACE_CDR::ULong length) -{ - // Make sure the length of the array isn't greater than the length of - // the stream. - if (length * ACE_CDR::LONGLONG_SIZE > this->length ()) - { - this->good_bit_ = false; - return false; - } - - return this->read_array (x, - ACE_CDR::LONGLONG_SIZE, - ACE_CDR::LONGLONG_ALIGN, - length); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_InputCDR::read_ulonglong_array (ACE_CDR::ULongLong *x, - ACE_CDR::ULong length) -{ - // Make sure the length of the array isn't greater than the length of - // the stream. - if (length * ACE_CDR::LONGLONG_SIZE > this->length ()) - { - this->good_bit_ = false; - return false; - } - - return this->read_array (x, - ACE_CDR::LONGLONG_SIZE, - ACE_CDR::LONGLONG_ALIGN, - length); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_InputCDR::read_float_array (ACE_CDR::Float *x, - ACE_CDR::ULong length) -{ - // Make sure the length of the array isn't greater than the length of - // the stream. - if (length * ACE_CDR::LONG_SIZE > this->length ()) - { - this->good_bit_ = false; - return false; - } - - return this->read_array (x, - ACE_CDR::LONG_SIZE, - ACE_CDR::LONG_ALIGN, - length); -} - - -ACE_INLINE ACE_CDR::Boolean -ACE_InputCDR::read_double_array (ACE_CDR::Double *x, - ACE_CDR::ULong length) -{ - // Make sure the length of the array isn't greater than the length of - // the stream. - if (length * ACE_CDR::LONGLONG_SIZE > this->length ()) - { - this->good_bit_ = false; - return false; - } - - return this->read_array (x, - ACE_CDR::LONGLONG_SIZE, - ACE_CDR::LONGLONG_ALIGN, - length); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_InputCDR::read_longdouble_array (ACE_CDR::LongDouble* x, - ACE_CDR::ULong length) -{ - // Make sure the length of the array isn't greater than the length of - // the stream. - if (length * ACE_CDR::LONGDOUBLE_SIZE > this->length ()) - { - this->good_bit_ = false; - return false; - } - return this->read_array (x, - ACE_CDR::LONGDOUBLE_SIZE, - ACE_CDR::LONGDOUBLE_ALIGN, - length); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_InputCDR::skip_octet (void) -{ - ACE_CDR::Octet x; - return this->read_1 (&x); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_InputCDR::skip_char (void) -{ - return this->skip_octet (); // sizeof (Char) == sizeof (Octet) -} - -ACE_INLINE ACE_CDR::Boolean -ACE_InputCDR::skip_boolean (void) -{ - return this->skip_octet () && this->good_bit_; -} - -ACE_INLINE ACE_CDR::Boolean -ACE_InputCDR::skip_ushort (void) -{ - ACE_CDR::UShort x; - return this->read_2 (&x); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_InputCDR::skip_short (void) -{ - return this->skip_ushort (); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_InputCDR::skip_ulong (void) -{ - ACE_CDR::ULong x; - return this->read_4 (&x); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_InputCDR::skip_long (void) -{ - return this->skip_ulong (); // sizeof (Long) == sizeof (ULong) -} - -ACE_INLINE ACE_CDR::Boolean -ACE_InputCDR::skip_ulonglong (void) -{ - ACE_CDR::ULongLong x; - return this->read_8 (&x); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_InputCDR::skip_longlong (void) -{ - return this->skip_ulonglong (); // sizeof (LongLong) == sizeof (ULongLong) -} - -ACE_INLINE ACE_CDR::Boolean -ACE_InputCDR::skip_float (void) -{ - return this->skip_ulong (); // sizeof(Float) == sizeof (ULong) -} - -ACE_INLINE ACE_CDR::Boolean -ACE_InputCDR::skip_double (void) -{ - return this->skip_ulonglong (); // sizeof(Double) == sizeof (ULongLong) -} - -ACE_INLINE ACE_CDR::Boolean -ACE_InputCDR::skip_longdouble (void) -{ - ACE_CDR::LongDouble x; - return this->read_16 (&x); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_InputCDR::skip_fixed (void) -{ - for (int i = 0; i < 16; ++i) - { - ACE_CDR::Octet x; - if (!this->read_1 (&x)) - return false; - const unsigned low = x & 0xf; - if (low == 0xc || low == 0xd) - return true; - } - return false; -} - -ACE_INLINE char* -ACE_InputCDR::end (void) -{ - return this->start_.end (); -} - -ACE_INLINE void -ACE_InputCDR::rd_ptr (size_t offset) -{ - this->start_.rd_ptr (offset); -} - -ACE_INLINE char* -ACE_InputCDR::rd_ptr (void) -{ - return this->start_.rd_ptr (); -} - -ACE_INLINE char* -ACE_InputCDR::wr_ptr (void) -{ - return this->start_.wr_ptr (); -} - -ACE_INLINE int -ACE_InputCDR::adjust (size_t size, - size_t align, - char*& buf) -{ -#if !defined (ACE_LACKS_CDR_ALIGNMENT) - buf = ACE_ptr_align_binary (this->rd_ptr (), align); -#else - buf = this->rd_ptr (); -#endif /* ACE_LACKS_CDR_ALIGNMENT */ - - char * const end = buf + size; - if (end <= this->wr_ptr ()) - { - this->start_.rd_ptr (end); - return 0; - } - - this->good_bit_ = false; - return -1; -#if defined (ACE_LACKS_CDR_ALIGNMENT) - ACE_UNUSED_ARG (align); -#endif /* ACE_LACKS_CDR_ALIGNMENT */ -} - -ACE_INLINE int -ACE_InputCDR::adjust (size_t size, - char*& buf) -{ - return this->adjust (size, size, buf); -} - -ACE_INLINE const ACE_Message_Block* -ACE_InputCDR::start (void) const -{ - return &this->start_; -} - -ACE_INLINE bool -ACE_InputCDR::good_bit (void) const -{ - return this->good_bit_; -} - -// **************************************************************** - -ACE_INLINE ACE_CDR::Boolean -operator<< (ACE_OutputCDR &os, ACE_CDR::Char x) -{ - os.write_char (x); - return (ACE_CDR::Boolean) os.good_bit (); -} - -ACE_INLINE ACE_CDR::Boolean -operator<< (ACE_OutputCDR &os, ACE_CDR::Short x) -{ - os.write_short (x); - return (ACE_CDR::Boolean) os.good_bit (); -} - -ACE_INLINE ACE_CDR::Boolean -operator<< (ACE_OutputCDR &os, ACE_CDR::UShort x) -{ - os.write_ushort (x); - return (ACE_CDR::Boolean) os.good_bit (); -} - -ACE_INLINE ACE_CDR::Boolean -operator<< (ACE_OutputCDR &os, ACE_CDR::Long x) -{ - os.write_long (x); - return (ACE_CDR::Boolean) os.good_bit (); -} - -ACE_INLINE ACE_CDR::Boolean -operator<< (ACE_OutputCDR &os, ACE_CDR::ULong x) -{ - os.write_ulong (x); - return (ACE_CDR::Boolean) os.good_bit (); -} - -ACE_INLINE ACE_CDR::Boolean -operator<< (ACE_OutputCDR &os, ACE_CDR::LongLong x) -{ - os.write_longlong (x); - return (ACE_CDR::Boolean) os.good_bit (); -} - -ACE_INLINE ACE_CDR::Boolean -operator<< (ACE_OutputCDR &os, ACE_CDR::ULongLong x) -{ - os.write_ulonglong (x); - return (ACE_CDR::Boolean) os.good_bit (); -} - -ACE_INLINE ACE_CDR::Boolean -operator<< (ACE_OutputCDR &os, ACE_CDR::LongDouble x) -{ - os.write_longdouble (x); - return (ACE_CDR::Boolean) os.good_bit (); -} - -ACE_INLINE ACE_CDR::Boolean -operator<< (ACE_OutputCDR &os, ACE_CDR::Float x) -{ - os.write_float (x); - return (ACE_CDR::Boolean) os.good_bit (); -} - -ACE_INLINE ACE_CDR::Boolean -operator<< (ACE_OutputCDR &os, ACE_CDR::Double x) -{ - os.write_double (x); - return (ACE_CDR::Boolean) os.good_bit (); -} - -ACE_INLINE ACE_CDR::Boolean -operator<< (ACE_OutputCDR &os, const ACE_CDR::Fixed &x) -{ - os.write_fixed (x); - return (ACE_CDR::Boolean) os.good_bit (); -} - -ACE_INLINE ACE_CDR::Boolean -operator<< (ACE_OutputCDR &os, const ACE_CDR::Char *x) -{ - os.write_string (x); - return (ACE_CDR::Boolean) os.good_bit (); -} - -ACE_INLINE ACE_CDR::Boolean -operator<< (ACE_OutputCDR &os, const ACE_CDR::WChar *x) -{ - os.write_wstring (x); - return (ACE_CDR::Boolean) os.good_bit (); -} - -// The following use the helper classes -ACE_INLINE ACE_CDR::Boolean -operator<< (ACE_OutputCDR &os, ACE_OutputCDR::from_boolean x) -{ - (void) os.write_boolean (x.val_); - return (ACE_CDR::Boolean) os.good_bit (); -} - -ACE_INLINE ACE_CDR::Boolean -operator<< (ACE_OutputCDR &os, ACE_OutputCDR::from_char x) -{ - os.write_char (x.val_); - return (ACE_CDR::Boolean) os.good_bit (); -} - -ACE_INLINE ACE_CDR::Boolean -operator<< (ACE_OutputCDR &os, ACE_OutputCDR::from_wchar x) -{ - os.write_wchar (x.val_); - return (ACE_CDR::Boolean) os.good_bit (); -} - -ACE_INLINE ACE_CDR::Boolean -operator<< (ACE_OutputCDR &os, ACE_OutputCDR::from_octet x) -{ - os.write_octet (x.val_); - return (ACE_CDR::Boolean) os.good_bit (); -} - -ACE_INLINE ACE_CDR::Boolean -operator<< (ACE_OutputCDR &os, ACE_OutputCDR::from_string x) -{ - ACE_CDR::ULong len = 0; - - if (x.val_ != 0) - { - len = static_cast (ACE_OS::strlen (x.val_)); - } - - os.write_string (len, x.val_); - return - (ACE_CDR::Boolean) (os.good_bit () && (!x.bound_ || len <= x.bound_)); -} - -ACE_INLINE ACE_CDR::Boolean -operator<< (ACE_OutputCDR &os, ACE_OutputCDR::from_wstring x) -{ - ACE_CDR::ULong len = 0; - - if (x.val_ != 0) - { - len = static_cast (ACE_OS::strlen (x.val_)); - } - - os.write_wstring (len, x.val_); - return - (ACE_CDR::Boolean) (os.good_bit () && (!x.bound_ || len <= x.bound_)); -} - -// **************************************************************** - -ACE_INLINE ACE_CDR::Boolean -operator>> (ACE_InputCDR &is, ACE_CDR::Char &x) -{ - return is.read_char (x) && is.good_bit (); -} - -ACE_INLINE ACE_CDR::Boolean -operator>> (ACE_InputCDR &is, ACE_CDR::Short &x) -{ - return is.read_short (x) && is.good_bit (); -} - -ACE_INLINE ACE_CDR::Boolean -operator>> (ACE_InputCDR &is, ACE_CDR::UShort &x) -{ - return is.read_ushort (x) && is.good_bit (); -} - -ACE_INLINE ACE_CDR::Boolean -operator>>(ACE_InputCDR &is, ACE_CDR::Long &x) -{ - return is.read_long (x) && is.good_bit (); -} - -ACE_INLINE ACE_CDR::Boolean -operator>> (ACE_InputCDR &is, ACE_CDR::ULong &x) -{ - return is.read_ulong (x) && is.good_bit (); -} - -ACE_INLINE ACE_CDR::Boolean -operator>> (ACE_InputCDR& is, ACE_CDR::LongLong &x) -{ - return is.read_longlong (x) && is.good_bit (); -} - -ACE_INLINE ACE_CDR::Boolean -operator>> (ACE_InputCDR& is, ACE_CDR::ULongLong &x) -{ - return is.read_ulonglong (x) && is.good_bit (); -} - -ACE_INLINE ACE_CDR::Boolean -operator>> (ACE_InputCDR& is, ACE_CDR::LongDouble &x) -{ - return is.read_longdouble (x) && is.good_bit (); -} - -ACE_INLINE ACE_CDR::Boolean -operator>> (ACE_InputCDR &is, ACE_CDR::Float &x) -{ - return is.read_float (x) && is.good_bit (); -} - -ACE_INLINE ACE_CDR::Boolean -operator>> (ACE_InputCDR &is, ACE_CDR::Double &x) -{ - return is.read_double (x) && is.good_bit (); -} - -ACE_INLINE ACE_CDR::Boolean -operator>> (ACE_InputCDR &is, ACE_CDR::Fixed &x) -{ - return is.read_fixed (x) && is.good_bit (); -} - -ACE_INLINE ACE_CDR::Boolean -operator>> (ACE_InputCDR &is, ACE_CDR::Char *&x) -{ - return is.read_string (x) && is.good_bit (); -} - -ACE_INLINE ACE_CDR::Boolean -operator>> (ACE_InputCDR &is, ACE_CDR::WChar *&x) -{ - return is.read_wstring (x) && is.good_bit (); -} - -// The following use the helper classes -ACE_INLINE ACE_CDR::Boolean -operator>> (ACE_InputCDR &is, ACE_InputCDR::to_boolean x) -{ - return is.read_boolean (x.ref_); -} - -ACE_INLINE ACE_CDR::Boolean -operator>> (ACE_InputCDR &is, ACE_InputCDR::to_char x) -{ - return is.read_char (x.ref_) && is.good_bit (); -} - -ACE_INLINE ACE_CDR::Boolean -operator>> (ACE_InputCDR &is, ACE_InputCDR::to_wchar x) -{ - return is.read_wchar (x.ref_) && is.good_bit (); -} - -ACE_INLINE ACE_CDR::Boolean -operator>> (ACE_InputCDR &is, ACE_InputCDR::to_octet x) -{ - return is.read_octet (x.ref_) && is.good_bit (); -} - -ACE_INLINE ACE_CDR::Boolean -operator>> (ACE_InputCDR &is, ACE_InputCDR::to_string x) -{ - // check if the bounds are satisfied - return - (is.read_string (const_cast (x.val_)) - && is.good_bit () - && (!x.bound_ - || ACE_OS::strlen (x.val_) <= x.bound_)); -} - -ACE_INLINE ACE_CDR::Boolean -operator>> (ACE_InputCDR &is, ACE_InputCDR::to_wstring x) -{ - // check if the bounds are satisfied - return - (is.read_wstring (const_cast (x.val_)) - && is.good_bit () - && (!x.bound_ - || ACE_OS::strlen (x.val_) <= x.bound_)); -} - -// *************************************************************************** -// We must define these methods here because they use the "read_*" inlined -// methods of the ACE_InputCDR class -// *************************************************************************** - -ACE_INLINE ACE_CDR::Boolean -ACE_OutputCDR::append_boolean (ACE_InputCDR &stream) -{ - ACE_CDR::Boolean x; - return stream.read_boolean (x) ? this->write_boolean (x) : false; -} - -ACE_INLINE ACE_CDR::Boolean -ACE_OutputCDR::append_char (ACE_InputCDR &stream) -{ - ACE_CDR::Char x; - return stream.read_char (x) ? this->write_char (x) : false; -} - -ACE_INLINE ACE_CDR::Boolean -ACE_OutputCDR::append_wchar (ACE_InputCDR &stream) -{ - ACE_CDR::WChar x; - return stream.read_wchar (x) ? this->write_wchar (x) : false; -} - -ACE_INLINE ACE_CDR::Boolean -ACE_OutputCDR::append_octet (ACE_InputCDR &stream) -{ - ACE_CDR::Octet x; - return stream.read_octet (x) ? this->write_octet (x) : false; -} - -ACE_INLINE ACE_CDR::Boolean -ACE_OutputCDR::append_short (ACE_InputCDR &stream) -{ - ACE_CDR::Short x; - return stream.read_short (x) ? this->write_short (x) : false; -} - -ACE_INLINE ACE_CDR::Boolean -ACE_OutputCDR::append_ushort (ACE_InputCDR &stream) -{ - ACE_CDR::UShort x; - return stream.read_ushort (x) ? this->write_ushort (x) : false; -} - -ACE_INLINE ACE_CDR::Boolean -ACE_OutputCDR::append_long (ACE_InputCDR &stream) -{ - ACE_CDR::Long x; - return stream.read_long (x) ? this->write_long (x) : false; -} - -ACE_INLINE ACE_CDR::Boolean -ACE_OutputCDR::append_ulong (ACE_InputCDR &stream) -{ - ACE_CDR::ULong x; - return stream.read_ulong (x) ? this->write_ulong (x) : false; -} - -ACE_INLINE ACE_CDR::Boolean -ACE_OutputCDR::append_longlong (ACE_InputCDR &stream) -{ - ACE_CDR::LongLong x; - return stream.read_longlong (x) ? this->write_longlong (x) : false; -} - -ACE_INLINE ACE_CDR::Boolean -ACE_OutputCDR::append_ulonglong (ACE_InputCDR &stream) -{ - ACE_CDR::ULongLong x; - return stream.read_ulonglong (x) ? this->write_ulonglong (x) : false; -} - -ACE_INLINE ACE_CDR::Boolean -ACE_OutputCDR::append_float (ACE_InputCDR &stream) -{ - ACE_CDR::Float x; - return stream.read_float (x) ? this->write_float (x) : false; -} - -ACE_INLINE ACE_CDR::Boolean -ACE_OutputCDR::append_double (ACE_InputCDR &stream) -{ - ACE_CDR::Double x; - return stream.read_double (x) ? this->write_double (x) : false; -} - -ACE_INLINE ACE_CDR::Boolean -ACE_OutputCDR::append_longdouble (ACE_InputCDR &stream) -{ - ACE_CDR::LongDouble x; - return stream.read_longdouble (x) ? this->write_longdouble (x) : false; -} - -ACE_INLINE ACE_CDR::Boolean -ACE_OutputCDR::append_fixed (ACE_InputCDR &stream) -{ - ACE_CDR::Fixed x; - return stream.read_fixed (x) ? this->write_fixed (x) : false; -} - -ACE_INLINE ACE_CDR::Boolean -ACE_OutputCDR::append_string (ACE_InputCDR &stream) -{ - ACE_CDR::Char *x = 0; - ACE_CDR::Boolean const flag = - (stream.read_string (x) ? this->write_string (x) : false); - delete [] x; - return flag; -} - -ACE_INLINE ACE_CDR::Boolean -ACE_OutputCDR::append_wstring (ACE_InputCDR &stream) -{ - ACE_CDR::WChar *x = 0; - ACE_CDR::Boolean const flag = - (stream.read_wstring (x) ? this->write_wstring (x) : false); - delete [] x; - return flag; -} - -ACE_INLINE void -ACE_InputCDR::reset_byte_order (int byte_order) -{ - this->do_byte_swap_ = (byte_order != ACE_CDR_BYTE_ORDER); -} - -ACE_INLINE bool -ACE_InputCDR::do_byte_swap (void) const -{ - return this->do_byte_swap_; -} - -ACE_INLINE int -ACE_InputCDR::byte_order (void) const -{ - return this->do_byte_swap () ? !ACE_CDR_BYTE_ORDER : ACE_CDR_BYTE_ORDER; -} - -ACE_INLINE int -ACE_InputCDR::align_read_ptr (size_t alignment) -{ -#if !defined (ACE_LACKS_CDR_ALIGNMENT) - char *buf = ACE_ptr_align_binary (this->rd_ptr (), - alignment); -#else - char *buf = this->rd_ptr (); -#endif /* ACE_LACKS_CDR_ALIGNMENT */ - - if (buf <= this->wr_ptr ()) - { - this->start_.rd_ptr (buf); - return 0; - } - - this->good_bit_ = false; - return -1; -} - -ACE_INLINE void -ACE_InputCDR::set_version (ACE_CDR::Octet major, ACE_CDR::Octet minor) -{ - this->major_version_ = major; - this->minor_version_ = minor; -} - -ACE_INLINE void -ACE_InputCDR::get_version (ACE_CDR::Octet &major, ACE_CDR::Octet &minor) -{ - major = this->major_version_; - minor = this->minor_version_; -} - -ACE_INLINE ACE_Char_Codeset_Translator * -ACE_InputCDR::char_translator (void) const -{ - return this->char_translator_; -} - -ACE_INLINE ACE_WChar_Codeset_Translator * -ACE_InputCDR::wchar_translator (void) const -{ - return this->wchar_translator_; -} - - -ACE_INLINE void -ACE_InputCDR::char_translator (ACE_Char_Codeset_Translator * ctran) -{ - this->char_translator_ = ctran; -} - -ACE_INLINE void -ACE_InputCDR::wchar_translator (ACE_WChar_Codeset_Translator * wctran) -{ - this->wchar_translator_ = wctran; -} - -// **************************************************************** - -ACE_INLINE ACE_CDR::Boolean -ACE_Char_Codeset_Translator::read_1 (ACE_InputCDR& input, - ACE_CDR::Octet *x) -{ - return input.read_1 (x); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_Char_Codeset_Translator::write_1 (ACE_OutputCDR& output, - const ACE_CDR::Octet *x) -{ - return output.write_1 (x); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_Char_Codeset_Translator::read_array (ACE_InputCDR& in, - void* x, - size_t size, - size_t align, - ACE_CDR::ULong length) -{ - return in.read_array (x, size, align, length); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_Char_Codeset_Translator::write_array (ACE_OutputCDR& out, - const void *x, - size_t size, - size_t align, - ACE_CDR::ULong length) -{ - return out.write_array(x, size, align, length); -} - -ACE_INLINE int -ACE_Char_Codeset_Translator::adjust (ACE_OutputCDR& out, - size_t size, - size_t align, - char *&buf) -{ - return out.adjust(size, align, buf); -} - -ACE_INLINE void -ACE_Char_Codeset_Translator::good_bit (ACE_OutputCDR& out, bool bit) -{ - out.good_bit_ = bit; -} - -ACE_INLINE ACE_CDR::Octet -ACE_Char_Codeset_Translator::major_version (ACE_InputCDR& input) -{ - return input.major_version_; -} - -ACE_INLINE ACE_CDR::Octet -ACE_Char_Codeset_Translator::minor_version (ACE_InputCDR& input) -{ - return input.minor_version_; -} - -ACE_INLINE ACE_CDR::Octet -ACE_Char_Codeset_Translator::major_version (ACE_OutputCDR& output) -{ - return output.major_version_; -} - -ACE_INLINE ACE_CDR::Octet -ACE_Char_Codeset_Translator::minor_version (ACE_OutputCDR& output) -{ - return output.minor_version_; -} - -// **************************************************************** - -ACE_INLINE ACE_CDR::Boolean -ACE_WChar_Codeset_Translator::read_1 (ACE_InputCDR& input, - ACE_CDR::Octet *x) -{ - return input.read_1 (x); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_WChar_Codeset_Translator::read_2 (ACE_InputCDR& input, - ACE_CDR::UShort *x) -{ - return input.read_2 (x); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_WChar_Codeset_Translator::read_4 (ACE_InputCDR& input, - ACE_CDR::ULong *x) -{ - return input.read_4 (x); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_WChar_Codeset_Translator::write_1 (ACE_OutputCDR& output, - const ACE_CDR::Octet *x) -{ - return output.write_1 (x); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_WChar_Codeset_Translator::write_2 (ACE_OutputCDR& output, - const ACE_CDR::UShort *x) -{ - return output.write_2 (x); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_WChar_Codeset_Translator::write_4 (ACE_OutputCDR& output, - const ACE_CDR::ULong *x) -{ - return output.write_4 (x); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_WChar_Codeset_Translator::read_array (ACE_InputCDR& in, - void* x, - size_t size, - size_t align, - ACE_CDR::ULong length) -{ - return in.read_array (x, size, align, length); -} - -ACE_INLINE ACE_CDR::Boolean -ACE_WChar_Codeset_Translator::write_array (ACE_OutputCDR& out, - const void *x, - size_t size, - size_t align, - ACE_CDR::ULong length) -{ - return out.write_array(x, size, align, length); -} - -ACE_INLINE int -ACE_WChar_Codeset_Translator::adjust (ACE_OutputCDR& out, - size_t size, - size_t align, - char *&buf) -{ - return out.adjust(size, align, buf); -} - -ACE_INLINE void -ACE_WChar_Codeset_Translator::good_bit (ACE_OutputCDR& out, bool bit) -{ - out.good_bit_ = bit; -} - -ACE_INLINE ACE_CDR::Octet -ACE_WChar_Codeset_Translator::major_version (ACE_InputCDR& input) -{ - return input.major_version_; -} - -ACE_INLINE ACE_CDR::Octet -ACE_WChar_Codeset_Translator::minor_version (ACE_InputCDR& input) -{ - return input.minor_version_; -} - -ACE_INLINE ACE_CDR::Octet -ACE_WChar_Codeset_Translator::major_version (ACE_OutputCDR& output) -{ - return output.major_version_; -} - -ACE_INLINE ACE_CDR::Octet -ACE_WChar_Codeset_Translator::minor_version (ACE_OutputCDR& output) -{ - return output.minor_version_; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/CE_Screen_Output.cpp b/modules/worldengine/deps/acelite/ace/CE_Screen_Output.cpp deleted file mode 100644 index 8711f1e57c..0000000000 --- a/modules/worldengine/deps/acelite/ace/CE_Screen_Output.cpp +++ /dev/null @@ -1,156 +0,0 @@ -#include "ace/CE_Screen_Output.h" -#if defined (ACE_HAS_WINCE) - -#include "ace/Log_Category.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_CE_Screen_Output::ACE_CE_Screen_Output(HWND hEdit) -: handler_(hEdit) -, pFile_(0) -{ -} - -ACE_CE_Screen_Output::ACE_CE_Screen_Output() -: handler_(0) -, pFile_(0) -{ -} - -ACE_CE_Screen_Output::~ACE_CE_Screen_Output() -{ - if (pFile_ != 0) { - fclose(pFile_); - } -} - -void ACE_CE_Screen_Output::log(ACE_Log_Record &log_record) -{ - ACE_TCHAR verbose_msg[ACE_Log_Record::MAXVERBOSELOGMSGLEN]; - int result = log_record.format_msg (ACE_TEXT("WindozeCE"), // host name - 0, // verbose flag - verbose_msg); - - if (result == 0) - { - verbose_msg[ ACE_OS::strlen(verbose_msg) - 1 ] = 0; // CE does not like '\n' by itself. - *this << verbose_msg << endl; - } -} - -void ACE_CE_Screen_Output::SetOutputWindow(HWND hEdit) -{ - handler_ = hEdit; -} - -void ACE_CE_Screen_Output::clear() -{ - SetWindowText(handler_, 0); -} - -ACE_CE_Screen_Output& ACE_CE_Screen_Output::operator << (ACE_TCHAR* output) -{ - int length = GetWindowTextLength(handler_); - SendMessage(handler_, EM_SETSEL, length, length); - SendMessage(handler_, EM_REPLACESEL, 0, (LPARAM)output); - - if (pFile_ != 0) - { - fwprintf(pFile_, L"%s", output); - } - - return *this; -} - -ACE_CE_Screen_Output& ACE_CE_Screen_Output::operator << (const ACE_TCHAR* output) -{ - ACE_TCHAR* buffer = ACE_OS::strdup(output); - if (buffer != 0) - { - *this << buffer; - delete buffer; - } - return *this; -} - -ACE_CE_Screen_Output& ACE_CE_Screen_Output::operator << (ACE_ANTI_TCHAR* output) -{ - *this << ACE_TEXT_CHAR_TO_TCHAR(output); - return *this; -} - -ACE_CE_Screen_Output& ACE_CE_Screen_Output::operator << (const ACE_ANTI_TCHAR* output) -{ - *this << ACE_TEXT_CHAR_TO_TCHAR(output); - return *this; -} - -ACE_CE_Screen_Output& ACE_CE_Screen_Output::operator << (char output) -{ - *this << (int)output; - return *this; -} - -ACE_CE_Screen_Output& ACE_CE_Screen_Output::operator << (unsigned char output) -{ - *this << (int)output; - return *this; -} - -ACE_CE_Screen_Output& ACE_CE_Screen_Output::operator << (unsigned short output) -{ - ACE_TCHAR buffer[20]; - wsprintf(buffer, ACE_TEXT("%u"), output); - *this << buffer; - return *this; -} - -ACE_CE_Screen_Output& ACE_CE_Screen_Output::operator << (int output) -{ - ACE_TCHAR buffer[20]; - wsprintf(buffer, ACE_TEXT("%d"), output); - *this << buffer; - return *this; -} - -ACE_CE_Screen_Output& ACE_CE_Screen_Output::operator << (unsigned int output) -{ - ACE_TCHAR buffer[20]; - wsprintf(buffer, ACE_TEXT("%du"), output); - *this << buffer; - return *this; -} - -ACE_CE_Screen_Output& ACE_CE_Screen_Output::operator << (float output) -{ - ACE_TCHAR buffer[20]; - swprintf(buffer, ACE_TEXT("%f"), output); - *this << buffer; - return *this; -} - -ACE_CE_Screen_Output& ACE_CE_Screen_Output::operator << (long output) -{ - ACE_TCHAR buffer[20]; - wsprintf(buffer, ACE_TEXT("%l"), output); - *this << buffer; - return *this; -} - -ACE_CE_Screen_Output& ACE_CE_Screen_Output::operator << (unsigned long output) -{ - ACE_TCHAR buffer[20]; - wsprintf(buffer, ACE_TEXT("%lu"), output); - *this << buffer; - return *this; -} - -ACE_CE_Screen_Output& ACE_CE_Screen_Output::operator << (FILE* pFile) -{ - pFile_ = pFile; - return *this; -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif // ACE_HAS_WINCE diff --git a/modules/worldengine/deps/acelite/ace/CE_Screen_Output.h b/modules/worldengine/deps/acelite/ace/CE_Screen_Output.h deleted file mode 100644 index 65c697daa4..0000000000 --- a/modules/worldengine/deps/acelite/ace/CE_Screen_Output.h +++ /dev/null @@ -1,107 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file CE_Screen_Output.h - * - * @author Si Mong Park - */ -//============================================================================= - -#ifndef ACE_CE_SCREEN_OUTPUT_H -#define ACE_CE_SCREEN_OUTPUT_H - -#include /**/ "ace/config-all.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -#pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#if defined (ACE_HAS_WINCE) - -#include "ace/Log_Msg_Callback.h" -#include "ace/Log_Record.h" - -namespace -{ - const ACE_TCHAR endl[] = ACE_TEXT("\r\n"); - const ACE_TCHAR tab[] = ACE_TEXT("\t"); -} - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_CE_Screen_Output - * - * @brief Replacement of text output for Windows CE. - * - * This class allows standard text output to be displayed on - * text window for Windows CE. Generally, all ACE output will - * go through under CE if and only if user uses Windows CE - * implementation by using main_ce instead of main. - * Also, for the easier debugging purpose, object pointer of - * this class can be gotten from ACE_Log_Msg::msg_callback() - * and then can be used directly by user just like cout stream. - */ -class ACE_Export ACE_CE_Screen_Output : public ACE_Log_Msg_Callback -{ -public: - - ACE_CE_Screen_Output (HWND hEdit); - - ACE_CE_Screen_Output (void); - - virtual ~ACE_CE_Screen_Output(); - - /// Implementation of pure virtual function from ACE_Log_Msg_Callback. - virtual void log (ACE_Log_Record &log_record); - - /// Interface to specify active window handle. - void SetOutputWindow (HWND hWnd); - - void clear (void); - - /// Stream insertion operator that performs actual print out. - /** - * @note This is the only one operator that performs output. All - * other perators convert the type and use this operator - * underneath. - */ - ACE_CE_Screen_Output& operator << (ACE_TCHAR*); - ACE_CE_Screen_Output& operator << (const ACE_TCHAR*); - - ACE_CE_Screen_Output& operator << (ACE_ANTI_TCHAR* output); - ACE_CE_Screen_Output& operator << (const ACE_ANTI_TCHAR* output); - - ACE_CE_Screen_Output& operator << (char output); - ACE_CE_Screen_Output& operator << (unsigned char output); - - ACE_CE_Screen_Output& operator << (unsigned short output); - - ACE_CE_Screen_Output& operator << (int output); - ACE_CE_Screen_Output& operator << (unsigned int output); - - ACE_CE_Screen_Output& operator << (float output); - - ACE_CE_Screen_Output& operator << (long output); - ACE_CE_Screen_Output& operator << (unsigned long output); - - ACE_CE_Screen_Output& operator << (FILE* pFile); - -private: - - ACE_CE_Screen_Output (ACE_CE_Screen_Output&); - -private: - - HWND handler_; - - /// FILE pointer that used to save output to file. This class does - /// not own the file handler pointer. - FILE* pFile_; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif // ACE_HAS_WINCE -#endif // ACE_CE_SCREEN_OUTPUT_H diff --git a/modules/worldengine/deps/acelite/ace/CMakeLists.txt b/modules/worldengine/deps/acelite/ace/CMakeLists.txt deleted file mode 100644 index b90158b157..0000000000 --- a/modules/worldengine/deps/acelite/ace/CMakeLists.txt +++ /dev/null @@ -1,355 +0,0 @@ -# Copyright (C) -# -# This file is free software; as a special exception the author gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# NOTE: Do not use glob here, it would include files we don't want -set(ace_STAT_SRCS - ACE.cpp - ACE_crc32.cpp - ACE_crc_ccitt.cpp - ace_wchar.cpp - Activation_Queue.cpp - Active_Map_Manager.cpp - Addr.cpp - Argv_Type_Converter.cpp - Assert.cpp - Asynch_IO.cpp - Asynch_IO_Impl.cpp - Asynch_Pseudo_Task.cpp - ATM_Acceptor.cpp - ATM_Addr.cpp - ATM_Connector.cpp - ATM_Params.cpp - ATM_QoS.cpp - ATM_Stream.cpp - Atomic_Op.cpp - Atomic_Op_Sparc.c - Auto_Event.cpp - Barrier.cpp - Base_Thread_Adapter.cpp - Based_Pointer_Repository.cpp - Basic_Stats.cpp - Basic_Types.cpp - Capabilities.cpp - CDR_Base.cpp - CDR_Size.cpp - CDR_Stream.cpp - Cleanup.cpp - Codecs.cpp - Codeset_IBM1047.cpp - Codeset_Registry.cpp - Codeset_Registry_db.cpp - Condition_Attributes.cpp - Condition_Recursive_Thread_Mutex.cpp - Condition_Thread_Mutex.cpp - Configuration.cpp - Configuration_Import_Export.cpp - Connection_Recycling_Strategy.cpp - Containers.cpp - Copy_Disabled.cpp - Date_Time.cpp - DEV.cpp - DEV_Addr.cpp - DEV_Connector.cpp - DEV_IO.cpp - Dev_Poll_Reactor.cpp - Dirent.cpp - Dirent_Selector.cpp - DLL.cpp - DLL_Manager.cpp - Dump.cpp - Dynamic.cpp - Dynamic_Message_Strategy.cpp - Dynamic_Service_Base.cpp - Dynamic_Service_Dependency.cpp - Encoding_Converter.cpp - Encoding_Converter_Factory.cpp - Event.cpp - Event_Handler.cpp - Event_Handler_Handle_Timeout_Upcall.cpp - Event_Base.cpp - FIFO.cpp - FIFO_Recv.cpp - FIFO_Recv_Msg.cpp - FIFO_Send.cpp - FIFO_Send_Msg.cpp - FILE.cpp - FILE_Addr.cpp - FILE_Connector.cpp - FILE_IO.cpp - File_Lock.cpp - Filecache.cpp - Flag_Manip.cpp - Framework_Component.cpp - Functor.cpp - Functor_String.cpp - Get_Opt.cpp - Handle_Ops.cpp - Handle_Set.cpp - Hashable.cpp - High_Res_Timer.cpp - ICMP_Socket.cpp - INET_Addr.cpp - Init_ACE.cpp - IO_Cntl_Msg.cpp - IO_SAP.cpp - IOStream.cpp - IPC_SAP.cpp - Lib_Find.cpp - Local_Memory_Pool.cpp - Local_Name_Space.cpp - Local_Tokens.cpp - Lock.cpp - Log_Category.cpp - Log_Msg.cpp - Log_Msg_Backend.cpp - Log_Msg_Callback.cpp - Log_Msg_IPC.cpp - Log_Msg_NT_Event_Log.cpp - Log_Msg_UNIX_Syslog.cpp - Log_Record.cpp - Logging_Strategy.cpp - LSOCK.cpp - LSOCK_Acceptor.cpp - LSOCK_CODgram.cpp - LSOCK_Connector.cpp - LSOCK_Dgram.cpp - LSOCK_Stream.cpp - Malloc.cpp - Malloc_Allocator.cpp - Manual_Event.cpp - MEM_Acceptor.cpp - MEM_Addr.cpp - MEM_Connector.cpp - MEM_IO.cpp - Mem_Map.cpp - MEM_SAP.cpp - MEM_Stream.cpp - Message_Block.cpp - Message_Queue.cpp - Message_Queue_NT.cpp - Message_Queue_Vx.cpp - Method_Request.cpp - MMAP_Memory_Pool.cpp - Monitor_Admin.cpp - Monitor_Admin_Manager.cpp - Monitor_Base.cpp - Monitor_Control_Action.cpp - Monitor_Control_Types.cpp - Monitor_Point_Registry.cpp - Monitor_Size.cpp - Msg_WFMO_Reactor.cpp - Multihomed_INET_Addr.cpp - Mutex.cpp - Name_Proxy.cpp - Name_Request_Reply.cpp - Name_Space.cpp - Naming_Context.cpp - Netlink_Addr.cpp - Notification_Queue.cpp - Notification_Strategy.cpp - NT_Service.cpp - Obchunk.cpp - Object_Manager.cpp - Object_Manager_Base.cpp - Obstack.cpp - OS_Errno.cpp - OS_Log_Msg_Attributes.cpp - OS_main.cpp - OS_NS_arpa_inet.cpp - OS_NS_ctype.cpp - OS_NS_dirent.cpp - OS_NS_dlfcn.cpp - OS_NS_errno.cpp - OS_NS_fcntl.cpp - OS_NS_math.cpp - OS_NS_netdb.cpp - OS_NS_poll.cpp - OS_NS_pwd.cpp - OS_NS_regex.cpp - OS_NS_signal.cpp - OS_NS_stdio.cpp - OS_NS_stdlib.cpp - OS_NS_string.cpp - OS_NS_strings.cpp - OS_NS_stropts.cpp - OS_NS_sys_mman.cpp - OS_NS_sys_msg.cpp - OS_NS_sys_resource.cpp - OS_NS_sys_select.cpp - OS_NS_sys_sendfile.cpp - OS_NS_sys_shm.cpp - OS_NS_sys_socket.cpp - OS_NS_sys_stat.cpp - OS_NS_sys_time.cpp - OS_NS_sys_uio.cpp - OS_NS_sys_utsname.cpp - OS_NS_sys_wait.cpp - OS_NS_Thread.cpp - OS_NS_time.cpp - OS_NS_unistd.cpp - OS_NS_wchar.cpp - OS_QoS.cpp - OS_Thread_Adapter.cpp - OS_TLI.cpp - Pagefile_Memory_Pool.cpp - Parse_Node.cpp - PI_Malloc.cpp - Ping_Socket.cpp - Pipe.cpp - POSIX_Asynch_IO.cpp - POSIX_CB_Proactor.cpp - POSIX_Proactor.cpp - Priority_Reactor.cpp - Proactor.cpp - Proactor_Impl.cpp - Process.cpp - Process_Manager.cpp - Process_Mutex.cpp - Process_Semaphore.cpp - Profile_Timer.cpp - Reactor.cpp - Reactor_Impl.cpp - Reactor_Notification_Strategy.cpp - Reactor_Timer_Interface.cpp - Read_Buffer.cpp - Recursive_Thread_Mutex.cpp - Recyclable.cpp - Registry.cpp - Registry_Name_Space.cpp - Remote_Name_Space.cpp - Remote_Tokens.cpp - Rtems_init.c - RW_Mutex.cpp - RW_Process_Mutex.cpp - RW_Thread_Mutex.cpp - Sample_History.cpp - Sbrk_Memory_Pool.cpp - Sched_Params.cpp - Select_Reactor_Base.cpp - Semaphore.cpp - Service_Config.cpp - Service_Gestalt.cpp - Service_Manager.cpp - Service_Object.cpp - Service_Repository.cpp - Service_Types.cpp - Shared_Memory.cpp - Shared_Memory_MM.cpp - Shared_Memory_Pool.cpp - Shared_Memory_SV.cpp - Shared_Object.cpp - Sig_Adapter.cpp - Sig_Handler.cpp - Signal.cpp - SOCK.cpp - SOCK_Acceptor.cpp - SOCK_CODgram.cpp - Sock_Connect.cpp - SOCK_Connector.cpp - SOCK_Dgram.cpp - SOCK_Dgram_Bcast.cpp - SOCK_Dgram_Mcast.cpp - SOCK_IO.cpp - SOCK_Netlink.cpp - SOCK_SEQPACK_Acceptor.cpp - SOCK_SEQPACK_Association.cpp - SOCK_SEQPACK_Connector.cpp - SOCK_Stream.cpp - SPIPE.cpp - SPIPE_Acceptor.cpp - SPIPE_Addr.cpp - SPIPE_Connector.cpp - SPIPE_Stream.cpp - SString.cpp - Stack_Trace.cpp - Stats.cpp - String_Base_Const.cpp - SUN_Proactor.cpp - SV_Message.cpp - SV_Message_Queue.cpp - SV_Semaphore_Complex.cpp - SV_Semaphore_Simple.cpp - SV_Shared_Memory.cpp - Svc_Conf_Lexer.cpp - Svc_Conf_y.cpp - Synch_Options.cpp - System_Time.cpp - Task.cpp - Thread.cpp - Thread_Adapter.cpp - Thread_Control.cpp - Thread_Exit.cpp - Thread_Hook.cpp - Thread_Manager.cpp - Thread_Mutex.cpp - Thread_Semaphore.cpp - Throughput_Stats.cpp - Time_Policy.cpp - Time_Value.cpp - Timeprobe.cpp - TLI.cpp - TLI_Acceptor.cpp - TLI_Connector.cpp - TLI_Stream.cpp - Token.cpp - Token_Collection.cpp - Token_Invariants.cpp - Token_Manager.cpp - Token_Request_Reply.cpp - TP_Reactor.cpp - Trace.cpp - TSS_Adapter.cpp - TTY_IO.cpp - UNIX_Addr.cpp - UPIPE_Acceptor.cpp - UPIPE_Connector.cpp - UPIPE_Stream.cpp - UTF16_Encoding_Converter.cpp - UTF32_Encoding_Converter.cpp - UTF8_Encoding_Converter.cpp - UUID.cpp - WFMO_Reactor.cpp - WIN32_Asynch_IO.cpp - WIN32_Proactor.cpp - XML_Svc_Conf.cpp - XTI_ATM_Mcast.cpp -) - -if (USE_COREPCH) - set(ace_PCH_HDR PrecompiledHeaders/WinAcePCH.h) - set(ace_PCH_SRC PrecompiledHeaders/WinAcePCH.cpp) -endif() - -include_directories( - ${CMAKE_SOURCE_DIR}/modules/worldengine/deps/acelite - ${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders - ${CMAKE_SOURCE_DIR}/modules/worldengine/deps/zlib -) - -# Needed for PCH support -set_source_files_properties(Atomic_Op_Sparc.c Rtems_init.c PROPERTIES LANGUAGE CXX) - -add_definitions(-DACE_BUILD_DLL) - -add_library(ace SHARED - ${ace_STAT_SRCS} - ${ace_PCH_SRC} -) - -if (MINGW) # GCC ignores "#prama comment" - target_link_libraries(ace ws2_32 iphlpapi netapi32 mswsock) -endif() - -# Generate precompiled header -if( USE_COREPCH ) - add_cxx_pch(ace ${ace_PCH_HDR} ${ace_PCH_SRC}) -endif() - -install(TARGETS ace RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}") diff --git a/modules/worldengine/deps/acelite/ace/CORBA_macros.h b/modules/worldengine/deps/acelite/ace/CORBA_macros.h deleted file mode 100644 index 9cd55e26d1..0000000000 --- a/modules/worldengine/deps/acelite/ace/CORBA_macros.h +++ /dev/null @@ -1,88 +0,0 @@ -// -*- C++ -*- - -// ============================================================================ -/** - * @file CORBA_macros.h - * - * Writing code that is portable between platforms with or without - * native C++ exceptions is hard. The following macros offer some - * help on this task, mostly oriented to making the ORB code and the - * IDL generated code portable. - * - * @author Nanbor Wang - * @author Aniruddha Gokhale - * @author Carlos O'Ryan , et al. - */ -// ============================================================================ - -// Macros for handling CORBA exceptions. - -#ifndef ACE_CORBA_MACROS_H -#define ACE_CORBA_MACROS_H - -#include /**/ "ace/pre.h" - -#include /**/ "ace/config-all.h" - -# if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -# endif /* ACE_LACKS_PRAGMA_ONCE */ - -// The Windows MFC exception mechanism requires that a caught CException -// (including the CMemoryException in use here) be freed using its Delete() -// method. Thus, when MFC is in use and we're catching exceptions as a result -// of new(), the exception's Delete() method has to be called. No other -// platform imposes this sort of restriction/requirement. The Windows -// config stuff (at least for MSVC/MFC) defines a ACE_del_bad_alloc macro -// that works with its ACE_bad_alloc macro to implement this cleanup -// requirement. Since no other platform requires this, define it as -// empty here. -#if !defined (ACE_del_bad_alloc) -# define ACE_del_bad_alloc -#endif - -// ACE_HAS_EXCEPTIONS is not the same as ACE_NEW_THROWS_EXCEPTIONS. -#if defined(ACE_NEW_THROWS_EXCEPTIONS) - -# if defined (ACE_HAS_NEW_NOTHROW) - -# define ACE_NEW_THROW_EX(POINTER,CONSTRUCTOR,EXCEPTION) \ - do { POINTER = new (ACE_nothrow) CONSTRUCTOR; \ - if (POINTER == 0) { throw EXCEPTION; } \ - } while (0) - -# else - -# define ACE_NEW_THROW_EX(POINTER,CONSTRUCTOR,EXCEPTION) \ - do { try { POINTER = new CONSTRUCTOR; } \ - catch (ACE_bad_alloc) { ACE_del_bad_alloc throw EXCEPTION; } \ - } while (0) - -# endif /* ACE_HAS_NEW_NOTHROW */ - -#else /* ! ACE_NEW_THROWS_EXCEPTIONS */ - -# define ACE_NEW_THROW_EX(POINTER,CONSTRUCTOR,EXCEPTION) \ - do { POINTER = new CONSTRUCTOR; \ - if (POINTER == 0) { throw EXCEPTION; } \ - } while (0) - -#endif /* ACE_NEW_THROWS_EXCEPTIONS */ - -// FUZZ: disable check_for_ACE_Guard -# define ACE_GUARD_THROW_EX(MUTEX,OBJ,LOCK,EXCEPTION) \ - ACE_Guard< MUTEX > OBJ (LOCK); \ - if (OBJ.locked () == 0) throw EXCEPTION; - -# define ACE_READ_GUARD_THROW_EX(MUTEX,OBJ,LOCK,EXCEPTION) \ - ACE_Read_Guard< MUTEX > OBJ (LOCK); \ - if (OBJ.locked () == 0) throw EXCEPTION; - -# define ACE_WRITE_GUARD_THROW_EX(MUTEX,OBJ,LOCK,EXCEPTION) \ - ACE_Write_Guard< MUTEX > OBJ (LOCK); \ - if (OBJ.locked () == 0) throw EXCEPTION; -// FUZZ: enable check_for_ACE_Guard - -#include /**/ "ace/post.h" - -#endif /* ACE_CORBA_MACROS_H */ diff --git a/modules/worldengine/deps/acelite/ace/Cache_Map_Manager_T.cpp b/modules/worldengine/deps/acelite/ace/Cache_Map_Manager_T.cpp deleted file mode 100644 index c6a6d9d399..0000000000 --- a/modules/worldengine/deps/acelite/ace/Cache_Map_Manager_T.cpp +++ /dev/null @@ -1,412 +0,0 @@ -#ifndef ACE_CACHE_MAP_MANAGER_T_CPP -#define ACE_CACHE_MAP_MANAGER_T_CPP - -#include "ace/Cache_Map_Manager_T.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -#pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Log_Category.h" -#include "ace/Malloc_Base.h" - -#if !defined (__ACE_INLINE__) -#include "ace/Cache_Map_Manager_T.inl" -#endif /* __ACE_INLINE__ */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_ALLOC_HOOK_DEFINE(ACE_Cache_Map_Manager) - -ACE_ALLOC_HOOK_DEFINE(ACE_Cache_Map_Iterator) - -ACE_ALLOC_HOOK_DEFINE(ACE_Cache_Map_Reverse_Iterator) - -template -ACE_Cache_Map_Manager::ACE_Cache_Map_Manager (CACHING_STRATEGY &caching_s, - size_t size, - ACE_Allocator *alloc) - : caching_strategy_ (caching_s) -{ - if (this->open (size, alloc) == -1) - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("%p\n"), - ACE_TEXT ("ACE_Cache_Map_Manager::ACE_Cache_Map_Manager"))); - -} - -template -ACE_Cache_Map_Manager::~ACE_Cache_Map_Manager (void) -{ - this->close (); -} - -template int -ACE_Cache_Map_Manager::open (size_t length, - ACE_Allocator *alloc) -{ - return this->map_.open (length, - alloc); -} - -template int -ACE_Cache_Map_Manager::close (void) -{ - return this->map_.close (); -} - -template int -ACE_Cache_Map_Manager::bind (const KEY &key, - const VALUE &value) -{ - // Insert an entry which has the and the which - // is the combination of the and the attributes of the - // caching strategy. - CACHE_VALUE cache_value (value, - this->caching_strategy_.attributes ()); - - int bind_result = this->map_.bind (key, - cache_value); - - if (bind_result != -1) - { - - int result = this->caching_strategy_.notify_bind (bind_result, - cache_value.second); - - if (result == -1) - { - - this->map_.unbind (key); - - // Unless the notification goes thru the bind operation is - // not complete. - bind_result = -1; - - } - - } - - return bind_result; -} - - -template int -ACE_Cache_Map_Manager::rebind (const KEY &key, - const VALUE &value) -{ - CACHE_VALUE cache_value (value, - this->caching_strategy_.attributes ()); - - int rebind_result = this->map_.rebind (key, - cache_value); - - if (rebind_result != -1) - { - - int result = this->caching_strategy_.notify_rebind (rebind_result, - cache_value.second ()); - - if (result == -1) - { - - // Make sure the unbind operation is done only when the - // notification fails after a bind which is denoted by - // rebind_result = 0 - if (rebind_result == 0) - this->map_.unbind (key); - - // Unless the notification goes thru the rebind operation is - // not complete. - rebind_result = -1; - - } - - } - - return rebind_result; -} - - -template int -ACE_Cache_Map_Manager::rebind (const KEY &key, - const VALUE &value, - VALUE &old_value) -{ - CACHE_VALUE cache_value (value, - this->caching_strategy_.attributes ()); - - CACHE_VALUE old_cache_value (old_value, - this->caching_strategy_.attributes ()); - - int rebind_result = this->map_.rebind (key, - cache_value, - old_cache_value); - - if (rebind_result != -1) - { - - int result = this->caching_strategy_.notify_rebind (rebind_result, - cache_value.second ()); - - if (result == -1) - { - - // Make sure the unbind operation is done only when the - // notification fails after a bind which is denoted by - // rebind_result = 0 - if (rebind_result == 0) - this->map_.unbind (key); - - // Unless the notification goes thru the rebind operation is - // not complete. - rebind_result = -1; - - } - else - { - - old_value = old_cache_value.first (); - - } - - } - - return rebind_result; -} - -template int -ACE_Cache_Map_Manager::rebind (const KEY &key, - const VALUE &value, - KEY &old_key, - VALUE &old_value) -{ - CACHE_VALUE cache_value (value, - this->caching_strategy_.attributes ()); - - CACHE_VALUE old_cache_value (old_value, - this->caching_strategy_.attributes ()); - - int rebind_result = this->map_.rebind (key, - cache_value, - old_key, - old_cache_value); - - if (rebind_result != -1) - { - - int result = this->caching_strategy_.notify_rebind (rebind_result, - cache_value.second ()); - - if (result == -1) - { - - // Make sure the unbind operation is done only when the - // notification fails after a bind which is denoted by - // rebind_result = 0 - if (rebind_result == 0) - this->map_.unbind (key); - - // Unless the notification goes thru the rebind operation is - // not complete. - rebind_result = -1; - - } - else - { - - old_value = old_cache_value.first (); - - } - - } - - return rebind_result; -} - -template int -ACE_Cache_Map_Manager::trybind (const KEY &key, - VALUE &value) -{ - CACHE_VALUE cache_value (value, - this->caching_strategy_.attributes ()); - - int trybind_result = this->map_.trybind (key, - cache_value); - - if (trybind_result != -1) - { - - int result = this->caching_strategy_.notify_trybind (trybind_result, - cache_value.second ()); - - if (result == -1) - { - - // If the entry has got inserted into the map, it is removed - // due to failure. - if (trybind_result == 0) - this->map_.unbind (key); - - trybind_result = -1; - - } - else - { - - // If an attempt is made to bind an existing entry the value - // is overwritten with the value from the map. - if (trybind_result == 1) - value = cache_value.first (); - - } - - } - - return trybind_result; -} - -template int -ACE_Cache_Map_Manager::find (const KEY &key, - VALUE &value) -{ - // Lookup the key and populate the . - CACHE_VALUE cache_value; - - int find_result = this->map_.find (key, - cache_value); - - if (find_result != -1) - { - - int result = this->caching_strategy_.notify_find (find_result, - cache_value.second); - - // Unless the find and notification operations go thru, this - // method is not successful. - if (result == -1) - find_result = -1; - else - { - - // Since the has now changed after the - // notification, we need to bind to the map again. - int rebind_result = this->map_.rebind (key, - cache_value); - if (rebind_result == -1) - find_result = -1; - else - value = cache_value.first; - - } - - } - - return find_result; -} - -template int -ACE_Cache_Map_Manager::find (const KEY &key) -{ - // Lookup the key and populate the . - CACHE_VALUE cache_value; - - int find_result = this->map_.find (key, - cache_value); - - if (find_result != -1) - { - - int result = this->caching_strategy_.notify_find (find_result, - cache_value.second); - - // Unless the find and notification operations go thru, this - // method is not successful. - if (result == -1) - find_result = -1; - else - { - - // Since the has now changed after the - // notification, we need to bind to the map again. - int rebind_result = this->map_.rebind (key, - cache_value); - - if (rebind_result == -1) - find_result = -1; - - } - - } - - return find_result; -} - - -template int -ACE_Cache_Map_Manager::unbind (const KEY &key) -{ - // Remove the entry from the cache. - CACHE_VALUE cache_value; - - int unbind_result = this->map_.unbind (key, - cache_value); - - if (unbind_result != -1) - { - - int result = this->caching_strategy_.notify_unbind (unbind_result, - cache_value.second); - - if (result == -1) - unbind_result = -1; - - } - - return unbind_result; -} - -template int -ACE_Cache_Map_Manager::unbind (const KEY &key, - VALUE &value) -{ - // Remove the entry from the cache. - CACHE_VALUE cache_value; - - int unbind_result = this->map_.unbind (key, - cache_value); - - if (unbind_result != -1) - { - - int result = this->caching_strategy_.notify_unbind (unbind_result, - cache_value.second ()); - - if (result == -1) - unbind_result = -1; - else - value = cache_value.first (); - - } - - return unbind_result; -} - -template void -ACE_Cache_Map_Manager::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - this->map_.dump (); - - this->caching_strategy_.dump (); -#endif /* ACE_HAS_DUMP */ -} - -template -ACE_Cache_Map_Iterator::~ACE_Cache_Map_Iterator (void) -{ -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_CACHE_MAP_MANAGER_T_CPP */ diff --git a/modules/worldengine/deps/acelite/ace/Cache_Map_Manager_T.h b/modules/worldengine/deps/acelite/ace/Cache_Map_Manager_T.h deleted file mode 100644 index 3e1d90a08e..0000000000 --- a/modules/worldengine/deps/acelite/ace/Cache_Map_Manager_T.h +++ /dev/null @@ -1,403 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Cache_Map_Manager_T.h - * - * @author Kirthika Parameswaran - */ -//============================================================================= - -#ifndef ACE_CACHE_MAP_MANAGER_T_H -#define ACE_CACHE_MAP_MANAGER_T_H - -#include /**/ "ace/pre.h" - -#include /**/ "ace/config-all.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Default_Constants.h" -#include "ace/Global_Macros.h" -#include "ace/Pair_T.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -// Forward declaration. -class ACE_Allocator; - -#define ACE_Cache_Map_Iterator ACMI -#define ACE_Cache_Map_Reverse_Iterator ACMRI - -template -class ACE_Cache_Map_Iterator; - -template -class ACE_Cache_Map_Reverse_Iterator; - -// For linkers that cant grok long names. -#define ACE_Cache_Map_Manager ACMM - -/** - * @class ACE_Cache_Map_Manager - * - * @brief Defines a abstraction that will purge entries from a map. - * - * The will manage the map it contains - * and provide purging on demand from the map. The strategy for - * caching is decided by the user and provided to the Cache - * Manager. The Cache Manager acts as a agent and communicates - * between the Map and the Strategy for purging entries from the - * map. - * No locking mechanism provided since locking at this level - * isn't efficient. Locking has to be provided by the - * application. - */ -template -class ACE_Cache_Map_Manager -{ -public: - - // = Traits. - typedef KEY key_type; - typedef VALUE mapped_type; - typedef CMAP_TYPE map_type; - typedef CACHING_STRATEGY caching_strategy_type; - - typedef ITERATOR_IMPL ITERATOR_IMPLEMENTATION; - typedef REVERSE_ITERATOR_IMPL REVERSE_ITERATOR_IMPLEMENTATION; - - friend class ACE_Cache_Map_Iterator; - friend class ACE_Cache_Map_Reverse_Iterator; - - // = ACE-style iterator typedefs. - typedef ACE_Cache_Map_Iterator - ITERATOR; - typedef ACE_Cache_Map_Reverse_Iterator - REVERSE_ITERATOR; - - // = STL-style iterator typedefs. - typedef ITERATOR - iterator; - typedef REVERSE_ITERATOR - reverse_iterator; - - /** - * The actual value mapped to the key in the map. The - * are used by the strategy and is transparent to the user of this - * class. - */ - typedef std::pair CACHE_VALUE; - - // = Initialization and termination methods. - - /// Initialize a with and - /// @a size entries. - ACE_Cache_Map_Manager (CACHING_STRATEGY &caching_strategy, - size_t size = ACE_DEFAULT_MAP_SIZE, - ACE_Allocator *alloc = 0); - - /// Close down a and release dynamically allocated - /// resources. - virtual ~ACE_Cache_Map_Manager (void); - - /// Initialize a cache with size @a length. - int open (size_t length = ACE_DEFAULT_MAP_SIZE, - ACE_Allocator *alloc = 0); - - /// Close down a cache and release dynamically allocated resources. - int close (void); - - /** - * Associate @a key with @a value. If @a key is already in the CMAP_TYPE - * then the ENTRY is not changed. Returns 0 if a new entry is bound - * successfully, returns 1 if an attempt is made to bind an existing - * entry, and returns -1 if failures occur. - */ - int bind (const KEY &key, - const VALUE &value); - - /** - * Lookup entry in the cache. If it is not found, returns -1. - * If the @a key is located in the CMAP_TYPE object, the CACHING_STRATEGY is - * notified of it via notify_find (int result, ATTRIBUTES &attribute). - * If notify_find also returns 0 (success), then this function returns - * 0 (success) and sets the cached value in @a value. - */ - int find (const KEY &key, - VALUE &value); - - /** - * Lookup entry in the cache. If it is not found, returns -1. - * If the @a key is located in the CMAP_TYPE object, the CACHING_STRATEGY is - * notified of it via notify_find (int result, ATTRIBUTES &attribute). - * If notify_find also returns 0 (success), then this function returns - * 0 (success). - */ - int find (const KEY &key); - - /** - * Reassociate the @a key with @a value. If the @a key already exists - * in the cache then returns 1, on a new bind returns 0 and returns - * -1 in case of any failures. - */ - int rebind (const KEY &key, - const VALUE &value); - - /** - * Reassociate @a key with @a value, storing the old value into the - * "out" parameter @a old_value. The function fails if @a key is not - * in the cache for caches that do not allow user specified keys. - * However, for caches that allow user specified keys, if the key is - * not in the cache, a new @a key / @a value association is created. - */ - int rebind (const KEY &key, - const VALUE &value, - VALUE &old_value); - - /** - * Reassociate @a key with @a value, storing the old key and value - * into the "out" parameters @a old_key and @a old_value. The - * function fails if @a key is not in the cache for caches that do - * not allow user specified keys. However, for caches that allow - * user specified keys, if the key is not in the cache, a new - * @a key / @a value association is created. - */ - int rebind (const KEY &key, - const VALUE &value, - KEY &old_key, - VALUE &old_value); - - /** - * Associate @a key with @a value if and only if @a key is not in the - * cache. If @a key is already in the cache, then the @a value - * parameter is overwritten with the existing value in the - * cache. Returns 0 if a new @a key / @a value association is created. - * Returns 1 if an attempt is made to bind an existing entry. This - * function fails for maps that do not allow user specified keys. - */ - int trybind (const KEY &key, - VALUE &value); - - /// Remove @a key from the cache. - int unbind (const KEY &key); - - /// Remove @a key from the cache, and return the @a value associated with - /// @a key. - int unbind (const KEY &key, - VALUE &value); - - /// Remove entries from the cache depending upon the strategy. - int purge (void); - - /// Return the current size of the cache. - size_t current_size (void) const; - - /// Return the total size of the cache. - size_t total_size (void) const; - - /// Dumps the state of the object. - void dump (void) const; - - // = STL styled iterator factory functions. - - /// Return forward iterator. - ITERATOR begin (void); - ITERATOR end (void); - - /// Return reverse iterator. - REVERSE_ITERATOR rbegin (void); - REVERSE_ITERATOR rend (void); - - /// The map managed by the Cache_Map_Manager. - CMAP_TYPE &map (void); - - /// The caching strategy used on the cache. - CACHING_STRATEGY &caching_strategy (void); - -protected: - - /// The underlying map which needs to be cached. - CMAP_TYPE map_; - - /// The strategy to be followed for caching entries in the map. - CACHING_STRATEGY &caching_strategy_; - -private: - - // = Disallow these operations. - ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Cache_Map_Manager &)) - ACE_UNIMPLEMENTED_FUNC (ACE_Cache_Map_Manager (const ACE_Cache_Map_Manager &)) - -}; - -/** - * @class ACE_Cache_Map_Iterator - * - * @brief Defines a iterator for the Cache_Map_Manager. - * - * Implementation to be provided by the iterator of the map - * managed by the ACE_Cache_Map_Manager. - */ -template -class ACE_Cache_Map_Iterator -{ - -public: - - // = Traits. - /// The actual value mapped to the key in the cache. The - /// are used by the strategy and is transparent to the cache user. - typedef ACE_Reference_Pair - value_type; - typedef std::pair - CACHE_VALUE; - - // = Initialisation and termination methods. - - ACE_Cache_Map_Iterator (const IMPLEMENTATION &iterator_impl); - - /// Copy constructor. - ACE_Cache_Map_Iterator (const ACE_Cache_Map_Iterator &rhs); - - virtual ~ACE_Cache_Map_Iterator (void); - - // = Iteration methods. - - /// assignment operator. - ACE_Cache_Map_Iterator &operator= - (const ACE_Cache_Map_Iterator &rhs); - - /// Comparison operators. - bool operator== (const ACE_Cache_Map_Iterator &rhs) const; - bool operator!= (const ACE_Cache_Map_Iterator &rhs) const; - - /// Returns a reference to the internal element @c this is pointing - /// to. - ACE_Reference_Pair operator* (void) const; - - // = STL styled iteration, compare, and reference functions. - - /// Prefix advance - ACE_Cache_Map_Iterator &operator++ (void); - - /// Postfix advance. - ACE_Cache_Map_Iterator operator++ (int); - - /// Prefix reverse. - ACE_Cache_Map_Iterator &operator-- (void); - - /// Postfix reverse. - ACE_Cache_Map_Iterator operator-- (int); - - /// Returns the iterator of the internal map in the custody of the - /// Cache_Map_Manager. - IMPLEMENTATION &iterator_implementation (void); - - /// Dump the state of an object. - void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - -protected: - /// The actual iterator which iterates internally on the map - /// belonging to the Cache_Map_Manager. - IMPLEMENTATION iterator_implementation_; -}; - -/** - * @class ACE_Cache_Map_Reverse_Iterator - * - * @brief Defines a reverse iterator for the Cache_Map_Manager. - * - * Implementation to be provided by the reverse iterator of the map - * managed by thr Cache_Map_manager. - */ -template -class ACE_Cache_Map_Reverse_Iterator -{ -public: - - // = Traits. - /// The actual value mapped to the key in the cache. The - /// are used by the strategy and is transparent to the cache user. - typedef ACE_Reference_Pair value_type; - typedef std::pair CACHE_VALUE; - - // = Initialisation and termination methods. - - ACE_Cache_Map_Reverse_Iterator (const REVERSE_IMPLEMENTATION &iterator_impl); - - /// Copy constructor. - ACE_Cache_Map_Reverse_Iterator (const ACE_Cache_Map_Reverse_Iterator &rhs); - - ~ACE_Cache_Map_Reverse_Iterator (void); - - // = Iteration methods. - - /// Assignment operator. - ACE_Cache_Map_Reverse_Iterator &operator= - (const ACE_Cache_Map_Reverse_Iterator &rhs); - - /// Comparison operators. - bool operator== (const ACE_Cache_Map_Reverse_Iterator &rhs) const; - bool operator!= (const ACE_Cache_Map_Reverse_Iterator &rhs) const; - - /// Returns a reference to the internal element @c this is pointing - /// to. - ACE_Reference_Pair operator* (void) const; - - // = STL styled iteration, compare, and reference functions. - - /// Prefix advance - ACE_Cache_Map_Reverse_Iterator &operator++ (void); - - /// Postfix advance. - ACE_Cache_Map_Reverse_Iterator operator++ (int); - - /// Prefix reverse. - ACE_Cache_Map_Reverse_Iterator &operator-- (void); - - /// Postfix reverse. - ACE_Cache_Map_Reverse_Iterator operator-- (int); - - /// Returns the iterator of the internal map in the custody of the - /// Cache_Map_Manager. - REVERSE_IMPLEMENTATION &iterator_implementation (void); - - /// Dump the state of an object. - void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - -protected: - /// The actual iterator which iterates internally on the map - /// belonging to the Cache_Map_Manager. - REVERSE_IMPLEMENTATION reverse_iterator_implementation_; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/Cache_Map_Manager_T.inl" -#endif /* __ACE_INLINE__ */ - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "ace/Cache_Map_Manager_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Cache_Map_Manager_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ - -#include /**/ "ace/post.h" - -#endif /* ACE_CACHE_MAP_MANAGER_T_H */ diff --git a/modules/worldengine/deps/acelite/ace/Cache_Map_Manager_T.inl b/modules/worldengine/deps/acelite/ace/Cache_Map_Manager_T.inl deleted file mode 100644 index dc2a42ef0f..0000000000 --- a/modules/worldengine/deps/acelite/ace/Cache_Map_Manager_T.inl +++ /dev/null @@ -1,243 +0,0 @@ -// -*- C++ -*- -// -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -template ACE_INLINE int -ACE_Cache_Map_Manager::purge (void) -{ - return this->caching_strategy ().caching_utility ().clear_cache (this->map_, - this->caching_strategy ().purge_percent ()); -} - -template ACE_INLINE size_t -ACE_Cache_Map_Manager::current_size (void) const -{ - return this->map_.current_size (); -} - -template ACE_INLINE size_t -ACE_Cache_Map_Manager::total_size (void) const -{ - return this->map_.total_size (); -} - -template ACE_INLINE CMAP_TYPE & -ACE_Cache_Map_Manager::map (void) -{ - return this->map_; -} - -template ACE_INLINE CACHING_STRATEGY & -ACE_Cache_Map_Manager::caching_strategy (void) -{ - return this->caching_strategy_; -} - -template ACE_INLINE ACE_Cache_Map_Iterator -ACE_Cache_Map_Manager::begin (void) -{ - return ITERATOR (this->map_.begin ()); -} - -template ACE_INLINE ACE_Cache_Map_Iterator -ACE_Cache_Map_Manager::end (void) -{ - return ITERATOR (this->map_.end ()); -} - -template ACE_INLINE ACE_Cache_Map_Reverse_Iterator -ACE_Cache_Map_Manager::rbegin (void) -{ - return REVERSE_ITERATOR (this->map_.rbegin ()); -} -template ACE_INLINE ACE_Cache_Map_Reverse_Iterator -ACE_Cache_Map_Manager::rend (void) -{ - return REVERSE_ITERATOR (this->map_.rend ()); -} - -//////////////////////////////////////////////////////////////////////////////// - -template ACE_INLINE -ACE_Cache_Map_Iterator::ACE_Cache_Map_Iterator (const ACE_Cache_Map_Iterator &rhs) - : iterator_implementation_ (rhs.iterator_implementation_) -{ -} - -template ACE_INLINE ACE_Cache_Map_Iterator & -ACE_Cache_Map_Iterator::operator= (const ACE_Cache_Map_Iterator &rhs) -{ - this->iterator_implementation_ = rhs.iterator_implementation_; - return *this; -} - -template ACE_INLINE bool -ACE_Cache_Map_Iterator::operator== (const ACE_Cache_Map_Iterator &rhs) const -{ - return this->iterator_implementation_ == rhs.iterator_implementation_; -} - -template ACE_INLINE bool -ACE_Cache_Map_Iterator::operator!= (const ACE_Cache_Map_Iterator &rhs) const -{ - return this->iterator_implementation_ != rhs.iterator_implementation_; -} - -template ACE_INLINE ACE_Reference_Pair -ACE_Cache_Map_Iterator::operator* (void) const -{ - value_type retn ((*this->iterator_implementation_).ext_id_, - (*this->iterator_implementation_).int_id_.first); - return retn; -} - -template ACE_INLINE -ACE_Cache_Map_Iterator & -ACE_Cache_Map_Iterator::operator++ (void) -{ - ++this->iterator_implementation_; - return *this; -} - -template ACE_INLINE -ACE_Cache_Map_Iterator -ACE_Cache_Map_Iterator::operator++ (int) -{ - ACE_Cache_Map_Iterator retn = *this; - ++this->iterator_implementation_; - return retn; -} - -template ACE_INLINE -ACE_Cache_Map_Iterator & -ACE_Cache_Map_Iterator::operator-- (void) -{ - --this->iterator_implementation_; - return *this; -} - -template ACE_INLINE -ACE_Cache_Map_Iterator -ACE_Cache_Map_Iterator::operator-- (int) -{ - ACE_Cache_Map_Iterator retn = *this; - --this->iterator_implementation_; - return retn; -} - -template ACE_INLINE void -ACE_Cache_Map_Iterator::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - this->iterator_implementation_.dump (); -#endif /* ACE_HAS_DUMP */ -} - -template ACE_INLINE -ACE_Cache_Map_Iterator::ACE_Cache_Map_Iterator (const IMPLEMENTATION &iterator_impl) - : iterator_implementation_ (iterator_impl) -{ -} - -template ACE_INLINE IMPLEMENTATION & -ACE_Cache_Map_Iterator::iterator_implementation (void) -{ - return this->iterator_implementation_; -} - -//////////////////////////////////////////////////////////////////////////////// - -template ACE_INLINE -ACE_Cache_Map_Reverse_Iterator::ACE_Cache_Map_Reverse_Iterator (const ACE_Cache_Map_Reverse_Iterator &rhs) - : reverse_iterator_implementation_ (rhs.reverse_iterator_implementation_) -{ -} - -template ACE_INLINE -ACE_Cache_Map_Reverse_Iterator::~ACE_Cache_Map_Reverse_Iterator (void) -{ -} - -template ACE_INLINE ACE_Cache_Map_Reverse_Iterator & -ACE_Cache_Map_Reverse_Iterator::operator= (const ACE_Cache_Map_Reverse_Iterator &rhs) -{ - this->reverse_iterator_implementation_ = rhs.reverse_iterator_implementation_; - return *this; -} - -template ACE_INLINE bool -ACE_Cache_Map_Reverse_Iterator::operator== (const ACE_Cache_Map_Reverse_Iterator &rhs) const -{ - return this->reverse_iterator_implementation_ == rhs.reverse_iterator_implementation_; -} - -template ACE_INLINE bool -ACE_Cache_Map_Reverse_Iterator::operator!= (const ACE_Cache_Map_Reverse_Iterator &rhs) const -{ - return this->reverse_iterator_implementation_ != rhs.reverse_iterator_implementation_; -} - -template ACE_INLINE ACE_Reference_Pair -ACE_Cache_Map_Reverse_Iterator::operator* (void) const -{ - value_type retv ((*this->reverse_iterator_implementation_).ext_id_, - (*this->reverse_iterator_implementation_).int_id_.first); - return retv; -} - -template ACE_INLINE -ACE_Cache_Map_Reverse_Iterator & -ACE_Cache_Map_Reverse_Iterator::operator++ (void) -{ - ++this->reverse_iterator_implementation_; - return *this; -} - -template ACE_INLINE -ACE_Cache_Map_Reverse_Iterator -ACE_Cache_Map_Reverse_Iterator::operator++ (int) -{ - ACE_Cache_Map_Reverse_Iterator retn = *this; - ++this->reverse_iterator_implementation_; - return retn; -} - -template ACE_INLINE -ACE_Cache_Map_Reverse_Iterator & -ACE_Cache_Map_Reverse_Iterator::operator-- (void) -{ - --this->reverse_iterator_implementation_; - return *this; -} - -template ACE_INLINE -ACE_Cache_Map_Reverse_Iterator -ACE_Cache_Map_Reverse_Iterator::operator-- (int) -{ - ACE_Cache_Map_Reverse_Iterator retn = *this; - --this->reverse_iterator_implementation_; - return retn; -} - - -template ACE_INLINE void -ACE_Cache_Map_Reverse_Iterator::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - this->reverse_iterator_implementation_.dump (); -#endif /* ACE_HAS_DUMP */ -} - -template ACE_INLINE -ACE_Cache_Map_Reverse_Iterator::ACE_Cache_Map_Reverse_Iterator (const REVERSE_IMPLEMENTATION &iterator_impl) - : reverse_iterator_implementation_(iterator_impl) -{ -} - -template ACE_INLINE REVERSE_IMPLEMENTATION & -ACE_Cache_Map_Reverse_Iterator::iterator_implementation (void) -{ - return this->reverse_iterator_implementation_; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Cached_Connect_Strategy_T.cpp b/modules/worldengine/deps/acelite/ace/Cached_Connect_Strategy_T.cpp deleted file mode 100644 index 7af6626069..0000000000 --- a/modules/worldengine/deps/acelite/ace/Cached_Connect_Strategy_T.cpp +++ /dev/null @@ -1,728 +0,0 @@ -#ifndef ACE_CACHED_CONNECT_STRATEGY_T_CPP -#define ACE_CACHED_CONNECT_STRATEGY_T_CPP - -#include "ace/Cached_Connect_Strategy_T.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -#pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/ACE.h" -#include "ace/Service_Repository.h" -#include "ace/Service_Types.h" -#include "ace/Thread_Manager.h" -#include "ace/WFMO_Reactor.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -template -ACE_Cached_Connect_Strategy_Ex::ACE_Cached_Connect_Strategy_Ex -(CACHING_STRATEGY &caching_s, - ACE_Creation_Strategy *cre_s, - ACE_Concurrency_Strategy *con_s, - ACE_Recycling_Strategy *rec_s, - MUTEX *lock, - int delete_lock) - : CCSBASE (cre_s, con_s, rec_s, lock, delete_lock), - connection_cache_ (caching_s) -{ - if (this->open (cre_s, con_s, rec_s) == -1) - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("%p\n"), - ACE_TEXT ("ACE_Cached_Connect_Strategy_Ex\n"))); -} - -template -ACE_Cached_Connect_Strategy_Ex::~ACE_Cached_Connect_Strategy_Ex (void) -{ - cleanup (); -} - - -template int -ACE_Cached_Connect_Strategy_Ex::check_hint_i -(SVC_HANDLER *&sh, - const ACE_PEER_CONNECTOR_ADDR &remote_addr, - ACE_Time_Value *timeout, - const ACE_PEER_CONNECTOR_ADDR &local_addr, - bool reuse_addr, - int flags, - int perms, - ACE_Hash_Map_Entry, std::pair > *&entry, - int &found) -{ - ACE_UNUSED_ARG (remote_addr); - ACE_UNUSED_ARG (timeout); - ACE_UNUSED_ARG (local_addr); - ACE_UNUSED_ARG (reuse_addr); - ACE_UNUSED_ARG (flags); - ACE_UNUSED_ARG (perms); - - found = 0; - - // Get the recycling act for the svc_handler - CONNECTION_CACHE_ENTRY *possible_entry = - (CONNECTION_CACHE_ENTRY *) sh->recycling_act (); - - // Check to see if the hint svc_handler has been closed down - if (possible_entry->ext_id_.recycle_state () == ACE_RECYCLABLE_CLOSED) - { - // If close, decrement refcount - if (possible_entry->ext_id_.decrement () == 0) - { - // If refcount goes to zero, close down the svc_handler - possible_entry->int_id_.first->recycler (0, 0); - possible_entry->int_id_.first->close (); - this->purge_i (possible_entry); - } - - // Hint not successful - found = 0; - - // Reset hint - sh = 0; - } - - // If hint is not closed, see if it is connected to the correct - // address and is recyclable - else if ((possible_entry->ext_id_.recycle_state () == ACE_RECYCLABLE_IDLE_AND_PURGABLE || - possible_entry->ext_id_.recycle_state () == ACE_RECYCLABLE_IDLE_BUT_NOT_PURGABLE) && - possible_entry->ext_id_.subject () == remote_addr) - { - // Hint successful - found = 1; - - // Tell the that it should prepare itself for - // being recycled. - this->prepare_for_recycling (sh); - - // - // Update the caching attributes directly since we don't do a - // find() on the cache map. - // - - // Indicates successful find. - int find_result = 0; - - int result = this->caching_strategy ().notify_find (find_result, - possible_entry->int_id_.second); - - if (result == -1) - return result; - } - else - { - // This hint will not be used. - possible_entry->ext_id_.decrement (); - - // Hint not successful - found = 0; - - // If is not connected to the correct address or is busy, - // we will not use it. - sh = 0; - } - - if (found) - entry = possible_entry; - - return 0; -} - -template int -ACE_Cached_Connect_Strategy_Ex::find_or_create_svc_handler_i -(SVC_HANDLER *&sh, - const ACE_PEER_CONNECTOR_ADDR &remote_addr, - ACE_Time_Value *timeout, - const ACE_PEER_CONNECTOR_ADDR &local_addr, - bool reuse_addr, - int flags, - int perms, - ACE_Hash_Map_Entry, std::pair > *&entry, - int &found) -{ - REFCOUNTED_HASH_RECYCLABLE_ADDRESS search_addr (remote_addr); - - // Try to find the address in the cache. Only if we don't find it - // do we create a new and connect it with the server. - while (this->find (search_addr, entry) != -1) - { - // We found a cached svc_handler. - // Get the cached - sh = entry->int_id_.first; - - // Is the connection clean? - int state_result = - ACE::handle_ready (sh->peer ().get_handle (), - &ACE_Time_Value::zero, - 1, // read ready - 0, // write ready - 1);// exception ready - - if (state_result == 1) - { - - if (sh->close () == -1) - return -1; - - sh = 0; - - // Cycle it once again.. - } - else if ((state_result == -1) && (errno == ETIME)) - { - // Found!!! - // Set the flag - found = 1; - - // Tell the that it should prepare itself for - // being recycled. - if (this->prepare_for_recycling (sh) == -1) - return -1; - - return 0; - } - else - { - return -1; - } - } - - // Not found... - - // Set the flag - found = 0; - - // We need to use a temporary variable here since we are not - // allowed to change because other threads may use this - // when we let go of the lock during the OS level connect. - // - // Note that making a new svc_handler, connecting remotely, - // binding to the map, and assigning of the hint and recycler - // should be atomic to the outside world. - SVC_HANDLER *potential_handler = 0; - - // Create a new svc_handler - if (this->make_svc_handler (potential_handler) == -1) - return -1; - - // Connect using the svc_handler. - if (this->cached_connect (potential_handler, - remote_addr, - timeout, - local_addr, - reuse_addr, - flags, - perms) == -1) - { - // Close the svc handler. - potential_handler->close (0); - - return -1; - } - else - { - // Insert the new SVC_HANDLER instance into the cache. - if (this->connection_cache_.bind (search_addr, - potential_handler, - entry) == -1) - { - // Close the svc handler and reset . - potential_handler->close (0); - - return -1; - } - - // Everything succeeded as planned. Assign to - // . - sh = potential_handler; - - // Set the recycler and the recycling act - - this->assign_recycler (sh, this, entry); - } - - return 0; -} - -template int -ACE_Cached_Connect_Strategy_Ex::cached_connect (SVC_HANDLER *&sh, - const ACE_PEER_CONNECTOR_ADDR &remote_addr, - ACE_Time_Value *timeout, - const ACE_PEER_CONNECTOR_ADDR &local_addr, - bool reuse_addr, - int flags, - int perms) -{ - // Actively establish the connection. This is a timed blocking - // connect. - if (this->new_connection (sh, - remote_addr, - timeout, - local_addr, - reuse_addr, - flags, - perms) == -1) - { - // If connect() failed because of timeouts, we have to reject - // the connection entirely. This is necessary since currently - // there is no way for the non-blocking connects to complete and - // for the to notify the cache of the completion of - // connect(). - - if (errno == EWOULDBLOCK || errno == ETIMEDOUT) - errno = ENOTSUP; - else if (ACE::out_of_handles (errno) || errno == EADDRINUSE) - { - // If the connect failed due to the process running out of - // file descriptors then, auto_purging of some connections - // are done from the CONNECTION_CACHE. This frees the - // descriptors which get used in the connect process and - // hence the same method is called again! - if (this->purge_connections () == -1) - return -1; - - // Try connecting again. - if (this->new_connection (sh, - remote_addr, - timeout, - local_addr, - reuse_addr, - flags, - perms) == -1) - { - if (errno == EWOULDBLOCK || errno == ETIMEDOUT) - errno = ENOTSUP; - return -1; - } - } - else - { - return -1; - } - } - - return 0; - -} - - -template int -ACE_Cached_Connect_Strategy_Ex::connect_svc_handler_i -(SVC_HANDLER *&sh, - const ACE_PEER_CONNECTOR_ADDR &remote_addr, - ACE_Time_Value *timeout, - const ACE_PEER_CONNECTOR_ADDR &local_addr, - bool reuse_addr, - int flags, - int perms, - int& found) -{ - CONNECTION_CACHE_ENTRY *entry = 0; - - // Check if the user passed a hint svc_handler - if (sh != 0) - { - int result = this->check_hint_i (sh, - remote_addr, - timeout, - local_addr, - reuse_addr, - flags, - perms, - entry, - found); - if (result != 0) - return result; - } - - // If not found - if (!found) - { - int result = this->find_or_create_svc_handler_i (sh, - remote_addr, - timeout, - local_addr, - reuse_addr, - flags, - perms, - entry, - found); - - if (result != 0) - return result; - - // Increment the refcount - entry->ext_id_.increment (); - } - - if (entry) - { - // For all successful cases: mark the in the cache - // as being . Therefore recyclable is BUSY. - entry->ext_id_.recycle_state (ACE_RECYCLABLE_BUSY); - } - - return 0; -} - - -template int -ACE_Cached_Connect_Strategy_Ex::cache_i (const void *recycling_act) -{ - // The wonders and perils of ACT - CONNECTION_CACHE_ENTRY *entry = (CONNECTION_CACHE_ENTRY *) recycling_act; - - // Mark the in the cache as not being . - // Therefore recyclable is IDLE. - entry->ext_id_.recycle_state (ACE_RECYCLABLE_IDLE_AND_PURGABLE); - - return 0; -} - -template int -ACE_Cached_Connect_Strategy_Ex::recycle_state_i (const void *recycling_act, - ACE_Recyclable_State new_state) -{ - // The wonders and perils of ACT - CONNECTION_CACHE_ENTRY *entry = (CONNECTION_CACHE_ENTRY *) recycling_act; - - // Mark the in the cache as not being . - // Therefore recyclable is IDLE. - entry->ext_id_.recycle_state (new_state); - - return 0; -} - -template ACE_Recyclable_State -ACE_Cached_Connect_Strategy_Ex::recycle_state_i (const void *recycling_act) const -{ - // The wonders and perils of ACT - CONNECTION_CACHE_ENTRY *entry = (CONNECTION_CACHE_ENTRY *) recycling_act; - - // Mark the in the cache as not being . - // Therefore recyclable is IDLE. - return entry->ext_id_.recycle_state (); -} - -template int -ACE_Cached_Connect_Strategy_Ex::purge_i (const void *recycling_act) -{ - // The wonders and perils of ACT - CONNECTION_CACHE_ENTRY *entry = (CONNECTION_CACHE_ENTRY *) recycling_act; - - return this->connection_cache_.unbind (entry); -} - - -template int -ACE_Cached_Connect_Strategy_Ex::mark_as_closed_i (const void *recycling_act) -{ - // The wonders and perils of ACT - CONNECTION_CACHE_ENTRY *entry = (CONNECTION_CACHE_ENTRY *) recycling_act; - - // Mark the in the cache as CLOSED. - entry->ext_id_.recycle_state (ACE_RECYCLABLE_CLOSED); - - return 0; -} - -template int -ACE_Cached_Connect_Strategy_Ex::cleanup_hint_i (const void *recycling_act, - void **act_holder) -{ - // Reset the <*act_holder> in the confines and protection of the - // lock. - if (act_holder) - *act_holder = 0; - - // The wonders and perils of ACT - CONNECTION_CACHE_ENTRY *entry = (CONNECTION_CACHE_ENTRY *) recycling_act; - - // Decrement the refcount on the . - int refcount = entry->ext_id_.decrement (); - - // If the svc_handler state is closed and the refcount == 0, call - // close() on svc_handler. - if (entry->ext_id_.recycle_state () == ACE_RECYCLABLE_CLOSED && - refcount == 0) - { - entry->int_id_.first->recycler (0, 0); - entry->int_id_.first->close (); - this->purge_i (entry); - } - - return 0; -} - -template int -ACE_Cached_Connect_Strategy_Ex::purge_connections (void) -{ - return this->connection_cache_.purge (); -} - -template CACHING_STRATEGY & -ACE_Cached_Connect_Strategy_Ex::caching_strategy (void) -{ - return this->connection_cache_.caching_strategy (); -} - -template int -ACE_Cached_Connect_Strategy_Ex::find (ACE_Refcounted_Hash_Recyclable &search_addr, - ACE_Hash_Map_Entry, std::pair > *&entry) -{ - typedef ACE_Hash_Map_Bucket_Iterator, - ACE_Hash, - ACE_Equal_To, - ACE_Null_Mutex> - CONNECTION_CACHE_BUCKET_ITERATOR; - - CONNECTION_CACHE_BUCKET_ITERATOR iterator (this->connection_cache_.map (), - search_addr); - - CONNECTION_CACHE_BUCKET_ITERATOR end (this->connection_cache_.map (), - search_addr, - 1); - - for (; - iterator != end; - ++iterator) - { - REFCOUNTED_HASH_RECYCLABLE_ADDRESS &addr = (*iterator).ext_id_; - - if (addr.recycle_state () != ACE_RECYCLABLE_IDLE_AND_PURGABLE && - addr.recycle_state () != ACE_RECYCLABLE_IDLE_BUT_NOT_PURGABLE) - continue; - - if (addr.subject () != search_addr.subject ()) - continue; - - entry = &(*iterator); - - // - // Update the caching attributes directly since we don't do a - // find() on the cache map. - // - - // Indicates successful find. - int find_result = 0; - - int result = this->caching_strategy ().notify_find (find_result, - entry->int_id_.second); - - if (result == -1) - return result; - - return 0; - } - - return -1; -} - -template void -ACE_Cached_Connect_Strategy_Ex::cleanup (void) -{ - // Excluded other threads from changing the cache while we cleanup - ACE_GUARD (MUTEX, ace_mon, *this->lock_); - - // Close down all cached service handlers. - typename CONNECTION_CACHE::ITERATOR iter = this->connection_cache_.begin (); - while (iter != this->connection_cache_.end ()) - { - if ((*iter).second () != 0) - { - // save entry for future use - CONNECTION_CACHE_ENTRY *entry = (CONNECTION_CACHE_ENTRY *) - (*iter).second ()->recycling_act (); - - // close handler - (*iter).second ()->recycler (0, 0); - (*iter).second ()->close (); - - // remember next iter - typename CONNECTION_CACHE::ITERATOR next_iter = iter; - ++next_iter; - - // purge the item from the hash - this->purge_i (entry); - - // assign next iter - iter = next_iter; - } - else - ++iter; - } -} - -ACE_ALLOC_HOOK_DEFINE(ACE_Cached_Connect_Strategy_Ex) -///////////////////////////////////////////////////////////////////////// - -template -ACE_Bounded_Cached_Connect_Strategy::ACE_Bounded_Cached_Connect_Strategy -(size_t max_size, - CACHING_STRATEGY &caching_s, - ACE_Creation_Strategy *cre_s, - ACE_Concurrency_Strategy *con_s, - ACE_Recycling_Strategy *rec_s, - MUTEX *lock, - int delete_lock) - : CCSEBASE (caching_s, cre_s, con_s, rec_s, lock, delete_lock), - max_size_ (max_size) -{ -} - -template -ACE_Bounded_Cached_Connect_Strategy::~ACE_Bounded_Cached_Connect_Strategy(void) -{ -} - -template -int -ACE_Bounded_Cached_Connect_Strategy::find_or_create_svc_handler_i -(SVC_HANDLER *&sh, - const ACE_PEER_CONNECTOR_ADDR &remote_addr, - ACE_Time_Value *timeout, - const ACE_PEER_CONNECTOR_ADDR &local_addr, - bool reuse_addr, - int flags, - int perms, - ACE_Hash_Map_Entry, - std::pair > *&entry, - int &found) -{ - - REFCOUNTED_HASH_RECYCLABLE_ADDRESS search_addr (remote_addr); - - // Try to find the address in the cache. Only if we don't find it - // do we create a new and connect it with the server. - while (this->find (search_addr, entry) != -1) - { - // We found a cached svc_handler. - // Get the cached - sh = entry->int_id_.first (); - - // Is the connection clean? - int state_result= ACE::handle_ready (sh->peer ().get_handle (), - &ACE_Time_Value::zero, - 1, // read ready - 0, // write ready - 1);// exception ready - - if (state_result == 1) - { - // The connection was disconnected during idle. - // close the svc_handler down. - if (sh->close () == -1) - { - ACE_ASSERT (0); - return -1; - } - sh = 0; - // and rotate once more... - } - else if ((state_result == -1) && (errno == ETIME)) - { - // Found!!! - // Set the flag - found = 1; - - // Tell the that it should prepare itself for - // being recycled. - if (this->prepare_for_recycling (sh) == -1) - { - ACE_ASSERT (0); - return -1; - } - - return 0; - } - else // some other return value or error... - { - ACE_ASSERT (0); // just to see it coming - - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("(%t)ACE_Bounded_Cached_Connect_Strategy<>::") - ACE_TEXT ("find_or_create_svc_handler_i - ") - ACE_TEXT ("error polling server socket state.\n"))); - - return -1; - } - } - - // Not found... - - // Set the flag - found = 0; - - // Check the limit of handlers... - if ((this->max_size_ > 0) && - (this->connection_cache_.current_size () >= this->max_size_)) - { - // Try to purge idle connections - if (this->purge_connections () == -1) - return -1; - - // Check limit again. - if (this->connection_cache_.current_size () >= this->max_size_) - // still too much! - return -1; - - // OK, we have room now... - } - - // We need to use a temporary variable here since we are not - // allowed to change because other threads may use this - // when we let go of the lock during the OS level connect. - // - // Note that making a new svc_handler, connecting remotely, - // binding to the map, and assigning of the hint and recycler - // should be atomic to the outside world. - SVC_HANDLER *potential_handler = 0; - - // Create a new svc_handler - if (this->make_svc_handler (potential_handler) == -1) - return -1; - - // Connect using the svc_handler. - if (this->cached_connect (potential_handler, - remote_addr, - timeout, - local_addr, - reuse_addr, - flags, - perms) == -1) - { - // Close the svc handler. - potential_handler->close (0); - return -1; - } - else - { - // Insert the new SVC_HANDLER instance into the cache. - if (this->connection_cache_.bind (search_addr, - potential_handler, - entry) == -1) - { - // Close the svc handler and reset . - potential_handler->close (0); - - return -1; - } - - // Everything succeeded as planned. Assign to - // . - sh = potential_handler; - - // Set the recycler and the recycling act - this->assign_recycler (sh, this, entry); - } - - return 0; -} - -ACE_ALLOC_HOOK_DEFINE(ACE_Bounded_Cached_Connect_Strategy) - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_CACHED_CONNECT_STRATEGY_T_CPP */ diff --git a/modules/worldengine/deps/acelite/ace/Cached_Connect_Strategy_T.h b/modules/worldengine/deps/acelite/ace/Cached_Connect_Strategy_T.h deleted file mode 100644 index 396152ea79..0000000000 --- a/modules/worldengine/deps/acelite/ace/Cached_Connect_Strategy_T.h +++ /dev/null @@ -1,261 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Cached_Connect_Strategy_T.h - * - * @author Kirthika Parameswaran - */ -//============================================================================= - -#ifndef CACHED_CONNECT_STRATEGY_T_H -#define CACHED_CONNECT_STRATEGY_T_H - -#include /**/ "ace/pre.h" - -#include /**/ "ace/config-all.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Strategies_T.h" -#include "ace/Hash_Cache_Map_Manager_T.h" -#include "ace/Caching_Strategies_T.h" -#include "ace/Functor_T.h" -#include "ace/Pair_T.h" - -// For linkers which cant grok long names... -#define ACE_Cached_Connect_Strategy_Ex ACCSE - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_Cached_Connect_Strategy_Ex - * - * @brief A connection strategy which caches connections to peers - * (represented by SVC_HANDLER instances), thereby allowing - * subsequent re-use of unused, but available, connections. - * - * is intended to be used as a - * plug-in connection strategy for ACE_Strategy_Connector. - * It's added value is re-use of established connections and - * tweaking the role of the cache as per the caching strategy. - */ -template -class ACE_Cached_Connect_Strategy_Ex - : public ACE_Cached_Connect_Strategy -{ -public: - /// Constructor - ACE_Cached_Connect_Strategy_Ex ( - CACHING_STRATEGY &caching_s, - ACE_Creation_Strategy *cre_s = 0, - ACE_Concurrency_Strategy *con_s = 0, - ACE_Recycling_Strategy *rec_s = 0, - MUTEX *lock = 0, - int delete_lock = 0); - - /// Destructor - virtual ~ACE_Cached_Connect_Strategy_Ex (void); - - /// Explicit purging of connection entries from the connection cache. - virtual int purge_connections (void); - - /// Mark as closed (non-locking version). This is used during the cleanup of the - /// connections purged. - virtual int mark_as_closed_i (const void *recycling_act); - - /** - * Since g++ version < 2.8 arent happy with templates, this special - * method had to be devised to avoid memory leaks and perform - * cleanup of the . - */ - void cleanup (void); - - // = Typedefs for managing the map - typedef ACE_Refcounted_Hash_Recyclable - REFCOUNTED_HASH_RECYCLABLE_ADDRESS; - typedef ACE_Hash_Cache_Map_Manager, - ACE_Equal_To, - CACHING_STRATEGY, - ATTRIBUTES> - CONNECTION_CACHE; - typedef typename CONNECTION_CACHE::CACHE_ENTRY CONNECTION_CACHE_ENTRY; - typedef typename CONNECTION_CACHE::key_type KEY; - typedef typename CONNECTION_CACHE::mapped_type VALUE; - - typedef ACE_Recyclable_Handler_Cleanup_Strategy, - ACE_Hash_Map_Manager_Ex, - ACE_Hash, - ACE_Equal_To, - MUTEX> > - CLEANUP_STRATEGY; - - typedef ACE_Cached_Connect_Strategy - CCSBASE; - - // = Accessor. - CACHING_STRATEGY &caching_strategy (void); - -protected: - - /// Find an idle handle. - int find (ACE_Refcounted_Hash_Recyclable &search_addr, - ACE_Hash_Map_Entry, std::pair > *&entry); - - /// Remove from cache (non-locking version). - virtual int purge_i (const void *recycling_act); - - /// Add to cache (non-locking version). - virtual int cache_i (const void *recycling_act); - - /// Get/Set recycle_state (non-locking version). - virtual int recycle_state_i (const void *recycling_act, - ACE_Recyclable_State new_state); - virtual ACE_Recyclable_State recycle_state_i (const void *recycling_act) const; - - /// Cleanup hint and reset @c *act_holder to zero if @a act_holder != 0. - virtual int cleanup_hint_i (const void *recycling_act, - void **act_holder); - - // = Helpers - int check_hint_i (SVC_HANDLER *&sh, - const ACE_PEER_CONNECTOR_ADDR &remote_addr, - ACE_Time_Value *timeout, - const ACE_PEER_CONNECTOR_ADDR &local_addr, - bool reuse_addr, - int flags, - int perms, - ACE_Hash_Map_Entry, std::pair > *&entry, - int &found); - - virtual int find_or_create_svc_handler_i (SVC_HANDLER *&sh, - const ACE_PEER_CONNECTOR_ADDR &remote_addr, - ACE_Time_Value *timeout, - const ACE_PEER_CONNECTOR_ADDR &local_addr, - bool reuse_addr, - int flags, - int perms, - ACE_Hash_Map_Entry, std::pair > *&entry, - int &found); - - virtual int connect_svc_handler_i (SVC_HANDLER *&sh, - const ACE_PEER_CONNECTOR_ADDR &remote_addr, - ACE_Time_Value *timeout, - const ACE_PEER_CONNECTOR_ADDR &local_addr, - bool reuse_addr, - int flags, - int perms, - int &found); - - /** - * Connection of the svc_handler with the remote host. This method - * also encapsulates the connection done with auto_purging under the - * hood. If the connect failed due to the process running out of - * file descriptors then, auto_purging of some connections are done - * from the CONNECTION_CACHE. This frees the descriptors which get - * used in the connect process and hence the connect operation can - * succeed. - */ - virtual int cached_connect (SVC_HANDLER *&sh, - const ACE_PEER_CONNECTOR_ADDR &remote_addr, - ACE_Time_Value *timeout, - const ACE_PEER_CONNECTOR_ADDR &local_addr, - bool reuse_addr, - int flags, - int perms); - - /// Table that maintains the cache of connected SVC_HANDLERs. - CONNECTION_CACHE connection_cache_; -}; - -///////////////////////////////////////////////////////////////////////////// - -// For linkers which cant grok long names... -#define ACE_Bounded_Cached_Connect_Strategy ABCCS - -/** - * @class ACE_Bounded_Cached_Connect_Strategy - * - * @brief - * A connection strategy which caches connections to peers - * (represented by SVC_HANDLER instances), thereby allowing - * subsequent re-use of unused, but available, connections. - * This strategy should be used when the cache is bounded by - * maximum size. - * - * Bounded_Cached_Connect_Strategy is intended to be used as a - * plug-in connection strategy for ACE_Strategy_Connector. - * It's added value is re-use of established connections and - * tweaking the role of the cache as per the caching strategy. - * Thanks to Edan Ayal for contributing this - * class and Susan Liebeskind for - * brainstorming about it. - */ -template -class ACE_Bounded_Cached_Connect_Strategy - : public ACE_Cached_Connect_Strategy_Ex -{ - - typedef ACE_Cached_Connect_Strategy_Ex - CCSEBASE; - - // = Typedefs for managing the map - typedef ACE_Refcounted_Hash_Recyclable - REFCOUNTED_HASH_RECYCLABLE_ADDRESS; - -public: - - /// Constructor - ACE_Bounded_Cached_Connect_Strategy (size_t max_size, - CACHING_STRATEGY &caching_s, - ACE_Creation_Strategy *cre_s = 0, - ACE_Concurrency_Strategy *con_s = 0, - ACE_Recycling_Strategy *rec_s = 0, - MUTEX *lock = 0, - int delete_lock = 0); - - /// Destructor - virtual ~ACE_Bounded_Cached_Connect_Strategy (void); - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - -protected: - - virtual int find_or_create_svc_handler_i (SVC_HANDLER *&sh, - const ACE_PEER_CONNECTOR_ADDR &remote_addr, - ACE_Time_Value *timeout, - const ACE_PEER_CONNECTOR_ADDR &local_addr, - bool reuse_addr, - int flags, - int perms, - ACE_Hash_Map_Entry, - std::pair > *&entry, - int &found); - -protected: - - /// Max items in the cache, used as a bound for the creation of svc_handlers. - size_t max_size_; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "ace/Cached_Connect_Strategy_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Cached_Connect_Strategy_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ - -#include /**/ "ace/post.h" -#endif /* CACHED_CONNECT_STRATEGY_T_H */ diff --git a/modules/worldengine/deps/acelite/ace/Caching_Strategies_T.cpp b/modules/worldengine/deps/acelite/ace/Caching_Strategies_T.cpp deleted file mode 100644 index 9db1902e73..0000000000 --- a/modules/worldengine/deps/acelite/ace/Caching_Strategies_T.cpp +++ /dev/null @@ -1,57 +0,0 @@ -#ifndef ACE_CACHING_STRATEGIES_T_CPP -#define ACE_CACHING_STRATEGIES_T_CPP - -#include "ace/Caching_Strategies_T.h" -#include "ace/Log_Category.h" - -#if !defined (__ACE_INLINE__) -#include "ace/Caching_Strategies_T.inl" -#endif /* __ACE_INLINE__ */ - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -#pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -template -ACE_Caching_Strategy::~ACE_Caching_Strategy (void) -{ -} - -////////////////////////////////////////////////////////////////////////////////// - -template -ACE_LRU_Caching_Strategy::ACE_LRU_Caching_Strategy (void) - : timer_ (0), - purge_percent_ (10) -{ -} - -//////////////////////////////////////////////////////////////////////////////////////////////// - -template -ACE_LFU_Caching_Strategy::ACE_LFU_Caching_Strategy (void) - : purge_percent_ (10) -{ -} - -//////////////////////////////////////////////////////////////////////////////////////////////// - -template -ACE_FIFO_Caching_Strategy::ACE_FIFO_Caching_Strategy (void) - : order_ (0), - purge_percent_ (10) -{ -} - -//////////////////////////////////////////////////////////////////////////////////////////////// - -ACE_ALLOC_HOOK_DEFINE(ACE_LRU_Caching_Strategy) -ACE_ALLOC_HOOK_DEFINE(ACE_LFU_Caching_Strategy) -ACE_ALLOC_HOOK_DEFINE(ACE_FIFO_Caching_Strategy) -ACE_ALLOC_HOOK_DEFINE(ACE_Null_Caching_Strategy) - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_CACHING_STRATEGIES_T_CPP */ diff --git a/modules/worldengine/deps/acelite/ace/Caching_Strategies_T.h b/modules/worldengine/deps/acelite/ace/Caching_Strategies_T.h deleted file mode 100644 index 864b7c21d4..0000000000 --- a/modules/worldengine/deps/acelite/ace/Caching_Strategies_T.h +++ /dev/null @@ -1,550 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Caching_Strategies_T.h - * - * @author Kirthika Parameswaran - */ -//============================================================================= - -#ifndef ACE_CACHING_STRATEGIES_H -#define ACE_CACHING_STRATEGIES_H - -#include /**/ "ace/pre.h" - -#include /**/ "ace/config-all.h" -#include "ace/Caching_Utility_T.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#if defined(_MSC_VER) -#pragma warning(disable:4503) -#endif /* _MSC_VER */ - -// For linkers that cant grok long names. -#define ACE_Caching_Strategy ACS - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_Caching_Strategy - * - * @brief This class is an abstract base class for a caching strategy. - * - * This class consists of all the interfaces a caching strategy should - * have and is used in association with the - * ACE_Caching_Strategy_Adaptor. - */ -template -class ACE_Caching_Strategy -{ -public: - /// Destructor. - virtual ~ACE_Caching_Strategy (void); - - /// Accessor method for the timer attributes. - virtual ATTRIBUTES attributes (void) = 0; - - /// Get the percentage of entries to purge. - virtual double purge_percent (void) = 0; - - /// Set the percentage of entries to purge. - virtual void purge_percent (double percentage) = 0; - - // = Strategy related Operations - - /// This method acts as a notification about the CONTAINERs bind - /// method call. - virtual int notify_bind (int result, - const ATTRIBUTES &attr) = 0; - - /// This method acts as a notification about the CONTAINERs find - /// method call - virtual int notify_find (int result, - ATTRIBUTES &attr) = 0; - - /// This method acts as a notification about the CONTAINERs unbind - /// method call - virtual int notify_unbind (int result, - const ATTRIBUTES &attr) = 0; - - /// This method acts as a notification about the CONTAINERs trybind - /// method call - virtual int notify_trybind (int result, - ATTRIBUTES &attr) = 0; - - /// This method acts as a notification about the CONTAINERs rebind - /// method call - virtual int notify_rebind (int result, - const ATTRIBUTES &attr) = 0; - - /// Purge the cache. - virtual CACHING_UTILITY &caching_utility (void) = 0; - - /// Dumps the state of the object. - virtual void dump (void) const = 0; -}; - -////////////////////////////////////////////////////////////////////////// - -#define ACE_Caching_Strategy_Adapter ACSA - -/** - * @class ACE_Caching_Strategy_Adapter - * - * @brief This class follows the Adaptor pattern and is used to provide - * External Polymorphism by deriving from ACE_Caching_Strategy. - * - * This class simply delegates all requests to the - * IMPLEMNETATION object within. This class should be passed in - * place of the the abstract base ACE_Caching_Strategy class as - * part of the External Polymorphism pattern. - */ -template -class ACE_Caching_Strategy_Adapter - : public ACE_Caching_Strategy -{ - -public: - - /// Constructor. - ACE_Caching_Strategy_Adapter (IMPLEMENTATION *implementation = 0, - bool delete_implementation = false); - - /// Destructor. - ~ACE_Caching_Strategy_Adapter (void); - - /// Accessor method for the timer attributes. - ATTRIBUTES attributes (void); - - /// Get the percentage of entries to purge. - double purge_percent (void); - - /// Set the percentage of entries to purge. - void purge_percent (double percentage); - - // = Strategy related Operations - - /// This method acts as a notification about the CONTAINERs bind - /// method call. - int notify_bind (int result, - const ATTRIBUTES &attr); - - /// This method acts as a notification about the CONTAINERs find - /// method call - int notify_find (int result, - ATTRIBUTES &attr); - - /// This method acts as a notification about the CONTAINERs unbind - /// method call - int notify_unbind (int result, - const ATTRIBUTES &attr); - - /// This method acts as a notification about the CONTAINERs trybind - /// method call - int notify_trybind (int result, - ATTRIBUTES &attr); - - /// This method acts as a notification about the CONTAINERs rebind - /// method call - int notify_rebind (int result, - const ATTRIBUTES &attr); - - /// Accessor to the implementation. - IMPLEMENTATION &implementation (void); - - /// Purge the cache. - CACHING_UTILITY &caching_utility (void); - - /// Dumps the state of the object. - void dump (void) const; - -private: - - /// Implementation class. - IMPLEMENTATION *implementation_; - - /// Do we need to delete the implementation? - bool delete_implementation_; -}; - -////////////////////////////////////////////////////////////////////////// -#define ACE_LRU_Caching_Strategy ALRU - -/** - * @class ACE_LRU_Caching_Strategy - * - * @brief Defines a Least Recently Used strategy which will decide on - * the item to be removed from the cache. - * - * This is a strategy which makes use of a virtual timer which - * is updated whenever an item is inserted or looked up in the - * container. When the need of purging entries arises, the items - * with the lowest timer values are removed. - * Explanation of the template parameter list: - * CONTAINER is any map with entries of type . - * The ATTRIBUTES are the deciding factor for purging of entries - * and should logically be included with the VALUE. Some ways of - * doing this are: As being a member of the VALUE or VALUE being - * std::pair. The CACHING_UTILITY is the - * class which can be plugged in and which decides the entries - * to purge. - */ -template -class ACE_LRU_Caching_Strategy -{ -public: - - // Traits. - typedef ATTRIBUTES CACHING_ATTRIBUTES; - - // = Initialisation and termination. - - /** - * The is the map in which the entries reside. The - * timer attribute is initialed to zero in this constructor. And - * the field denotes the percentage of the entries - * in the cache which can be purged automagically and by default is - * set to 10%. - */ - ACE_LRU_Caching_Strategy (void); - - // = Operations of the strategy. - - /// Accessor method for the timer attributes. - ATTRIBUTES attributes (void); - - /// Get the percentage of entries to purge. - double purge_percent (void); - - /// Set the percentage of entries to purge. - void purge_percent (double percentage); - - // = Strategy related Operations - - /// This method acts as a notification about the CONTAINERs bind - /// method call. - int notify_bind (int result, - const ATTRIBUTES &attr); - - /// This method acts as a notification about the CONTAINERs find - /// method call - int notify_find (int result, - ATTRIBUTES &attr); - - /// This method acts as a notification about the CONTAINERs unbind - /// method call - int notify_unbind (int result, - const ATTRIBUTES &attr); - - - /// This method acts as a notification about the CONTAINERs trybind - /// method call - int notify_trybind (int result, - ATTRIBUTES &attr); - - /// This method acts as a notification about the CONTAINERs rebind - /// method call - int notify_rebind (int result, - const ATTRIBUTES &attr); - - /// Purge the cache. - CACHING_UTILITY &caching_utility (void); - - /// Dumps the state of the object. - void dump (void) const; - -private: - - /// This element is the one which is the deciding factor for purging - /// of an ITEM. - ATTRIBUTES timer_; - - /// The level about which the purging will happen automagically. - double purge_percent_; - - /// This is the helper class which will decide and expunge entries - /// from the cache. - CACHING_UTILITY caching_utility_; -}; - -////////////////////////////////////////////////////////////////////////// -#define ACE_LFU_Caching_Strategy ALFU - -/** - * @class ACE_LFU_Caching_Strategy - * - * @brief Defines a Least Frequently Used strategy for which will decide on - * the item to be removed from the cache. - * - * A attribute is tagged to each item which increments whenever - * the item is bound or looked up in the cache. Thus it denotes - * the frequency of use. According to the value of the attribute - * the item is removed from the CONTAINER i.e cache. - * Explanation of the template parameter list: - * CONTAINER is any map with entries of type . - * The ATTRIBUTES are the deciding factor for purging of entries - * and should logically be included with the VALUE. Some ways of - * doing this are: As being a member of the VALUE or VALUE being - * std::pair. The CACHING_UTILITY is the - * class which can be plugged in and which decides the entries - * to purge. - */ -template -class ACE_LFU_Caching_Strategy -{ - -public: - - // Traits. - typedef ATTRIBUTES CACHING_ATTRIBUTES; - - // = Initialisation and termination methods. - - /** - * The is the map in which the entries reside. The - * timer attribute is initialed to zero in this constructor. And - * the field denotes the percentage of the entries - * in the cache which can be purged automagically and by default is - * set to 10%. - */ - ACE_LFU_Caching_Strategy (void); - - // = Strategy methods. - - /// Access the attributes. - ATTRIBUTES attributes (void); - - /// Get the percentage of entries to purge. - double purge_percent (void); - - /// Set the percentage of entries to purge. - void purge_percent (double percentage); - - // = Strategy related Operations - - /// This method acts as a notification about the CONTAINERs bind - /// method call. - int notify_bind (int result, - const ATTRIBUTES &attr); - - /// Lookup notification. - int notify_find (int result, - ATTRIBUTES &attr); - - /// This method acts as a notification about the CONTAINERs unbind - /// method call - int notify_unbind (int result, - const ATTRIBUTES &attr); - - /// This method acts as a notification about the CONTAINERs trybind - /// method call - int notify_trybind (int result, - ATTRIBUTES &attr); - - /// This method acts as a notification about the CONTAINERs rebind - /// method call - int notify_rebind (int result, - const ATTRIBUTES &attr); - - /// Purge the cache. - CACHING_UTILITY &caching_utility (void); - - /// Dumps the state of the object. - void dump (void) const; - -private: - - /// The level about which the purging will happen automagically. - double purge_percent_; - - /// This is the helper class which will decide and expunge entries - /// from the cache. - CACHING_UTILITY caching_utility_; -}; - -///////////////////////////////////////////////////////////// -#define ACE_FIFO_Caching_Strategy AFIFO - -/** - * @class ACE_FIFO_Caching_Strategy - * - * @brief The First In First Out strategy is implemented wherein each - * item is ordered. - * - * The order tag of each item is used to decide the item to be - * removed from the cache. The items with least order are removed. - * Explanation of the template parameter list: - * CONTAINER is any map with entries of type . - * The ATTRIBUTES are the deciding factor for purging of entries - * and should logically be included with the VALUE. Some ways of - * doing this are: As being a member of the VALUE or VALUE being - * std::pair. The CACHING_UTILITY is the - * class which can be plugged in and which decides the entries - * to purge. - */ -template -class ACE_FIFO_Caching_Strategy -{ - -public: - - typedef ATTRIBUTES CACHING_ATTRIBUTES; - - // = Initialisation and termination. - - /** - * The is the map in which the entries reside. The - * timer attribute is initialed to zero in this constructor. And - * the field denotes the percentage of the entries - * in the cache which can be purged automagically and by default is - * set to 10%. - */ - ACE_FIFO_Caching_Strategy (void); - - // = Strategy methods. - - /// Accessor method. - ATTRIBUTES attributes (void); - - /// Get the percentage of entries to purge. - double purge_percent (void); - - /// Set the percentage of entries to purge. - void purge_percent (double percentage); - - // = Strategy related Operations - - /// Notification for an item getting bound into the cache. - int notify_bind (int result, - const ATTRIBUTES &attr); - - /// This method acts as a notification about the CONTAINERs find - /// method call - int notify_find (int result, - ATTRIBUTES &attr); - - /// This method acts as a notification about the CONTAINERs unbind - /// method call - int notify_unbind (int result, - const ATTRIBUTES &attr); - - /// This method acts as a notification about the CONTAINERs trybind - /// method call - int notify_trybind (int result, - ATTRIBUTES &attr); - - /// Notification for an item getting bound again into the cache. - int notify_rebind (int result, - const ATTRIBUTES &attr); - - /// Purge the cache. - CACHING_UTILITY &caching_utility (void); - - /// Dumps the state of the object. - void dump (void) const; - -private: - - /// The order is the deciding factor for the item to be removed from - /// the cache. - ATTRIBUTES order_; - - /// The level about which the purging will happen automagically. - double purge_percent_; - - /// This is the helper class which will decide and expunge entries - /// from the cache. - CACHING_UTILITY caching_utility_; -}; - -////////////////////////////////////////////////////////////////////// -#define ACE_Null_Caching_Strategy ANULL - -/** - * @class ACE_Null_Caching_Strategy - * - * @brief The is a special caching strategy which doesnt have the purging - * feature. - * - * No purging provided. To be used when purging might be too expensive - * an operation. - */ -template -class ACE_Null_Caching_Strategy -{ - -public: - - // = Traits. - typedef ATTRIBUTES CACHING_ATTRIBUTES; - - // = Strategy methods. All are NO_OP methods!!! - - /// Accessor method. - ATTRIBUTES attributes (void); - - /// Get the percentage of entries to purge. - double purge_percent (void); - - /// Set the percentage of entries to purge. - void purge_percent (double percentage); - - // = Strategy related Operations - - /// Notification for an item getting bound into the cache. - int notify_bind (int result, - const ATTRIBUTES &attr); - - /// This method acts as a notification about the CONTAINERs find - /// method call - int notify_find (int result, - ATTRIBUTES &attr); - - /// This method acts as a notification about the CONTAINERs unbind - /// method call - int notify_unbind (int result, - const ATTRIBUTES &attr); - - /// This method acts as a notification about the CONTAINERs trybind - /// method call - int notify_trybind (int result, - ATTRIBUTES &attr); - - /// Notification for an item getting bound again into the cache. - int notify_rebind (int result, - const ATTRIBUTES &attr); - - /// Purge the cache. - CACHING_UTILITY &caching_utility (void); - - /// Dumps the state of the object. - void dump (void) const; - -private: - - /// This is the helper class which will decide and expunge entries - /// from the cache. - CACHING_UTILITY caching_utility_; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/Caching_Strategies_T.inl" -#endif /* __ACE_INLINE__ */ - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "ace/Caching_Strategies_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Caching_Strategies_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ - -#include /**/ "ace/post.h" - -#endif /* ACE_CACHING_STRATEGIES_H */ diff --git a/modules/worldengine/deps/acelite/ace/Caching_Strategies_T.inl b/modules/worldengine/deps/acelite/ace/Caching_Strategies_T.inl deleted file mode 100644 index dd9c985132..0000000000 --- a/modules/worldengine/deps/acelite/ace/Caching_Strategies_T.inl +++ /dev/null @@ -1,454 +0,0 @@ -// -*-C++-*- -// -////////////////////////////////////////////////////////////////////////////////// - -#include "ace/OS_Memory.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -template ACE_INLINE -ACE_Caching_Strategy_Adapter::ACE_Caching_Strategy_Adapter (IMPLEMENTATION *implementation, - bool delete_implementation) - : implementation_ (implementation), - delete_implementation_ (delete_implementation) -{ - if (this->implementation_ == 0) - { - ACE_NEW (this->implementation_, - IMPLEMENTATION); - this->delete_implementation_ = true; - } -} - -template ACE_INLINE -ACE_Caching_Strategy_Adapter::~ACE_Caching_Strategy_Adapter (void) -{ - if (this->delete_implementation_) - { - delete this->implementation_; - this->delete_implementation_ = false; - this->implementation_ = 0; - } -} - -template ACE_INLINE ATTRIBUTES -ACE_Caching_Strategy_Adapter::attributes (void) -{ - return this->implementation_->attributes (); -} - -template ACE_INLINE double -ACE_Caching_Strategy_Adapter::purge_percent (void) -{ - return this->implementation_->purge_percent (); -} - -template ACE_INLINE void -ACE_Caching_Strategy_Adapter::purge_percent (double percentage) -{ - this->implementation_->purge_percent (percentage); -} - -template ACE_INLINE int -ACE_Caching_Strategy_Adapter::notify_bind (int result, - const ATTRIBUTES &attr) -{ - return this->implementation_->notify_bind (result, - attr); -} - -template ACE_INLINE int -ACE_Caching_Strategy_Adapter::notify_find (int result, - ATTRIBUTES &attr) -{ - return this->implementation_->notify_find (result, - attr); -} - -template ACE_INLINE int -ACE_Caching_Strategy_Adapter::notify_unbind (int result, - const ATTRIBUTES &attr) -{ - return this->implementation_->notify_unbind (result, - attr); -} - -template ACE_INLINE int -ACE_Caching_Strategy_Adapter::notify_trybind (int result, - ATTRIBUTES &attr) -{ - return this->implementation_->notify_trybind (result, - attr); -} - -template ACE_INLINE int -ACE_Caching_Strategy_Adapter::notify_rebind (int result, - const ATTRIBUTES &attr) -{ - return this->implementation_->notify_rebind (result, - attr); -} - -template ACE_INLINE IMPLEMENTATION & -ACE_Caching_Strategy_Adapter::implementation (void) -{ - return *this->implementation_; -} - -template ACE_INLINE CACHING_UTILITY & -ACE_Caching_Strategy_Adapter::caching_utility (void) -{ - return this->implementation_->caching_utility (); -} - -template ACE_INLINE void -ACE_Caching_Strategy_Adapter::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_Caching_Strategy_Adapter::dump"); - - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} - -////////////////////////////////////////////////////////////////////////////////// - -template ACE_INLINE ATTRIBUTES -ACE_LRU_Caching_Strategy::attributes (void) -{ - return this->timer_; -} - -template ACE_INLINE double -ACE_LRU_Caching_Strategy::purge_percent (void) -{ - return this->purge_percent_; -} - -template ACE_INLINE void -ACE_LRU_Caching_Strategy::purge_percent (double percentage) -{ - this->purge_percent_ = percentage; -} - -template ACE_INLINE int -ACE_LRU_Caching_Strategy::notify_bind ( - int result, - const ATTRIBUTES & /* attr */) -{ - if (result == 0) - ++this->timer_; - - return result; -} - -template ACE_INLINE int -ACE_LRU_Caching_Strategy::notify_find ( - int result, - ATTRIBUTES &attr) -{ - if (result == 0) - { - attr = this->timer_; - ++this->timer_; - } - - return result; -} - -template ACE_INLINE int -ACE_LRU_Caching_Strategy::notify_unbind ( - int result, - const ATTRIBUTES & /* attr */) -{ - return result; -} - -template ACE_INLINE int -ACE_LRU_Caching_Strategy::notify_trybind ( - int result, - ATTRIBUTES & /* attr */) -{ - return result; -} - -template ACE_INLINE int -ACE_LRU_Caching_Strategy::notify_rebind ( - int result, - const ATTRIBUTES & /* attr */) -{ - if (result == 0) - ++this->timer_; - - return result; -} - -template ACE_INLINE CACHING_UTILITY & -ACE_LRU_Caching_Strategy::caching_utility (void) -{ - return this->caching_utility_; -} - -template ACE_INLINE void -ACE_LRU_Caching_Strategy::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_LRU_Caching_Strategy::dump"); - - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("timer_ = %d "), this->timer_)); - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} - -////////////////////////////////////////////////////////////////////////////////// - -template ACE_INLINE ATTRIBUTES -ACE_LFU_Caching_Strategy::attributes (void) -{ - return 0; -} - -template ACE_INLINE double -ACE_LFU_Caching_Strategy::purge_percent (void) -{ - return this->purge_percent_; -} - -template ACE_INLINE void -ACE_LFU_Caching_Strategy::purge_percent (double percentage) -{ - this->purge_percent_ = percentage; -} - -template ACE_INLINE int -ACE_LFU_Caching_Strategy::notify_bind (int result, - const ATTRIBUTES & /* attr */) -{ - - return result; -} - -template ACE_INLINE int -ACE_LFU_Caching_Strategy::notify_find (int result, - ATTRIBUTES &attr) -{ - if (result == 0) - ++attr; - - return result; -} - -template ACE_INLINE int -ACE_LFU_Caching_Strategy::notify_trybind (int result, - ATTRIBUTES & /* attr */) -{ - return result; -} - -template ACE_INLINE int -ACE_LFU_Caching_Strategy::notify_rebind (int result, - const ATTRIBUTES & /* attr */) -{ - return result; -} - -template ACE_INLINE int -ACE_LFU_Caching_Strategy::notify_unbind (int result, - const ATTRIBUTES & /* attr */) -{ - return result; -} - -template ACE_INLINE CACHING_UTILITY & -ACE_LFU_Caching_Strategy::caching_utility (void) -{ - return this->caching_utility_; -} - -template ACE_INLINE void -ACE_LFU_Caching_Strategy::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_LFU_Caching_Strategy::dump"); - - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} - -////////////////////////////////////////////////////////////////////////////////////// - -template ACE_INLINE ATTRIBUTES -ACE_FIFO_Caching_Strategy::attributes (void) -{ - return this->order_; -} - -template ACE_INLINE double -ACE_FIFO_Caching_Strategy::purge_percent (void) -{ - return this->purge_percent_; -} - -template ACE_INLINE void -ACE_FIFO_Caching_Strategy::purge_percent (double percentage) -{ - this->purge_percent_ = percentage; -} - -template ACE_INLINE int -ACE_FIFO_Caching_Strategy::notify_bind (int result, - const ATTRIBUTES &attr) -{ - ACE_UNUSED_ARG (attr); - - if (result == 0) - ++this->order_; - - return result; -} - -template ACE_INLINE int -ACE_FIFO_Caching_Strategy::notify_find (int result, - ATTRIBUTES &attr) -{ - ACE_UNUSED_ARG (attr); - - return result; -} - -template ACE_INLINE int -ACE_FIFO_Caching_Strategy::notify_unbind (int result, - const ATTRIBUTES &attr) -{ - ACE_UNUSED_ARG (attr); - - return result; -} - -template ACE_INLINE int -ACE_FIFO_Caching_Strategy::notify_trybind (int result, - ATTRIBUTES &attr) -{ - ACE_UNUSED_ARG (attr); - - return result; -} - -template ACE_INLINE int -ACE_FIFO_Caching_Strategy::notify_rebind (int result, - const ATTRIBUTES &attr) -{ - ACE_UNUSED_ARG (attr); - - if (result == 0) - ++this->order_; - - return result; -} - -template ACE_INLINE CACHING_UTILITY & -ACE_FIFO_Caching_Strategy::caching_utility (void) -{ - return this->caching_utility_; -} - -template ACE_INLINE void -ACE_FIFO_Caching_Strategy::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_FIFO_Caching_Strategy::dump"); - - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("order_ = %d "), this->order_)); - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} - -////////////////////////////////////////////////////////////////////////////////// - -template ACE_INLINE ATTRIBUTES -ACE_Null_Caching_Strategy::attributes (void) -{ - return 0; -} - -template ACE_INLINE double -ACE_Null_Caching_Strategy::purge_percent (void) -{ - return 0; -} - -template ACE_INLINE void -ACE_Null_Caching_Strategy::purge_percent (double percentage) -{ - ACE_UNUSED_ARG (percentage); -} - -template ACE_INLINE int -ACE_Null_Caching_Strategy::notify_bind (int result, - const ATTRIBUTES &attr) -{ - ACE_UNUSED_ARG (attr); - - return result; -} - -template ACE_INLINE int -ACE_Null_Caching_Strategy::notify_find (int result, - ATTRIBUTES &attr) -{ - ACE_UNUSED_ARG (attr); - - return result; -} - -template ACE_INLINE int -ACE_Null_Caching_Strategy::notify_unbind (int result, - const ATTRIBUTES &attr) -{ - ACE_UNUSED_ARG (attr); - - return result; -} - -template ACE_INLINE int -ACE_Null_Caching_Strategy::notify_trybind (int result, - ATTRIBUTES &attr) -{ - ACE_UNUSED_ARG (attr); - - return result; -} - -template ACE_INLINE int -ACE_Null_Caching_Strategy::notify_rebind (int result, - const ATTRIBUTES &attr) -{ - ACE_UNUSED_ARG (attr); - - return result; -} - -template ACE_INLINE CACHING_UTILITY & -ACE_Null_Caching_Strategy::caching_utility (void) -{ - return this->caching_utility_; -} - -template ACE_INLINE void -ACE_Null_Caching_Strategy::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_Null_Caching_Strategy::dump"); - - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -////////////////////////////////////////////////////////////////////////////////// diff --git a/modules/worldengine/deps/acelite/ace/Caching_Utility_T.cpp b/modules/worldengine/deps/acelite/ace/Caching_Utility_T.cpp deleted file mode 100644 index aa344562d8..0000000000 --- a/modules/worldengine/deps/acelite/ace/Caching_Utility_T.cpp +++ /dev/null @@ -1,498 +0,0 @@ -#ifndef ACE_CACHING_UTILITY_T_CPP -#define ACE_CACHING_UTILITY_T_CPP - -#include "ace/Caching_Utility_T.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -#pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/ACE.h" -#include "ace/Min_Max.h" -#include "ace/OS_Memory.h" -#include "ace/Recyclable.h" - -////////////////////////////////////////////////////////////////////////////// - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -template -ACE_Pair_Caching_Utility::ACE_Pair_Caching_Utility (ACE_Cleanup_Strategy *cleanup_strategy, - bool delete_cleanup_strategy) - : cleanup_strategy_ (cleanup_strategy), - delete_cleanup_strategy_ (delete_cleanup_strategy) -{ - if (cleanup_strategy == 0) - { - ACE_NEW (this->cleanup_strategy_, - CLEANUP_STRATEGY); - this->delete_cleanup_strategy_ = true; - } -} - -template -ACE_Pair_Caching_Utility::~ACE_Pair_Caching_Utility (void) -{ - if (this->delete_cleanup_strategy_) - delete this->cleanup_strategy_; -} - -template int -ACE_Pair_Caching_Utility::clear_cache (CONTAINER &container, - double purge_percent) -{ - // Check that the purge_percent is non-zero. - if (ACE::is_equal (purge_percent, 0.0)) - return 0; - - // Get the number of entries in the container. - size_t current_map_size = container.current_size (); - - // Also whether the number of entries in the cache! - // Oops! then there is no way out but exiting. So return an error. - if (current_map_size == 0) - return 0; - - // Calculate the no of entries to remove from the cache depending - // upon the . - size_t const entries_to_remove - = ACE_MAX (static_cast (1), - static_cast (static_cast (purge_percent) - / 100 * current_map_size)); - KEY *key_to_remove = 0; - VALUE *value_to_remove = 0; - - for (size_t i = 0; i < entries_to_remove ; ++i) - { - this->minimum (container, - key_to_remove, - value_to_remove); - - // Simply verifying that the key is non-zero. - // This is important for strategies where the minimum - // entry cant be found due to constraints on the type of entry - // to remove. - if (key_to_remove == 0) - return 0; - - if (this->cleanup_strategy_->cleanup (container, - key_to_remove, - value_to_remove) == -1) - return -1; - - } - - return 0; -} - -template void -ACE_Pair_Caching_Utility::minimum (CONTAINER &container, - KEY *&key_to_remove, - VALUE *&value_to_remove) -{ - // Starting values. - ITERATOR iter = container.begin (); - ITERATOR end = container.end (); - ATTRIBUTES min = (*iter).int_id_.second; - key_to_remove = &(*iter).ext_id_; - value_to_remove = &(*iter).int_id_; - - // The iterator moves thru the container searching for the entry - // with the lowest ATTRIBUTES. - for (++iter; - iter != end; - ++iter) - { - if (min > (*iter).int_id_.second) - { - // Ah! an item with lower ATTTRIBUTES... - min = (*iter).int_id_.second; - key_to_remove = &(*iter).ext_id_; - value_to_remove = &(*iter).int_id_; - } - } -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////// - -template -ACE_Recyclable_Handler_Caching_Utility::ACE_Recyclable_Handler_Caching_Utility (ACE_Cleanup_Strategy *cleanup_strategy, - bool delete_cleanup_strategy) - : cleanup_strategy_ (cleanup_strategy), - delete_cleanup_strategy_ (delete_cleanup_strategy) -{ - if (cleanup_strategy == 0) - { - ACE_NEW (this->cleanup_strategy_, - CLEANUP_STRATEGY); - this->delete_cleanup_strategy_ = true; - } -} - -template -ACE_Recyclable_Handler_Caching_Utility::~ACE_Recyclable_Handler_Caching_Utility (void) -{ - if (this->delete_cleanup_strategy_) - delete this->cleanup_strategy_; -} - -template int -ACE_Recyclable_Handler_Caching_Utility::clear_cache (CONTAINER &container, - double purge_percent) -{ - // Check that the purge_percent is non-zero. - if (ACE::is_equal (purge_percent, 0.0)) - return 0; - - // Get the number of entries in the container. - size_t current_map_size = container.current_size (); - - // Also whether the number of entries in the cache is just one! - // Oops! then there is no way out but exiting. So return an error. - // if (current_map_size <= 1) - if (current_map_size == 0) - return 0; - - // Calculate the no of entries to remove from the cache depending - // upon the . - size_t const entries_to_remove - = ACE_MAX (static_cast (1), - static_cast (static_cast (purge_percent) - / 100 * current_map_size)); - - KEY *key_to_remove = 0; - VALUE *value_to_remove = 0; - - for (size_t i = 0; i < entries_to_remove ; ++i) - { - this->minimum (container, - key_to_remove, - value_to_remove); - - // Simply verifying that the key is non-zero. - // This is important for strategies where the minimum - // entry cant be found due to constraints on the type of entry - // to remove. - if (key_to_remove == 0) - return 0; - - if (this->cleanup_strategy_->cleanup (container, - key_to_remove, - value_to_remove) == -1) - return -1; - } - - return 0; -} - -template void -ACE_Recyclable_Handler_Caching_Utility::minimum (CONTAINER &container, - KEY *&key_to_remove, - VALUE *&value_to_remove) -{ - // Starting values. - ITERATOR end = container.end (); - ITERATOR iter = container.begin (); - ATTRIBUTES min = (*iter).int_id_.second; - key_to_remove = 0; - value_to_remove = 0; - // Found the minimum entry to be purged? - int found = 0; - - // The iterator moves thru the container searching for the entry - // with the lowest ATTRIBUTES. - for (; - iter != end; - ++iter) - { - // If the entry isnt IDLE_AND_PURGABLE continue until you reach - // the first entry which can be purged. This is the minimum with - // which you will compare the rest of the purgable entries. - if ((*iter).ext_id_.recycle_state () == ACE_RECYCLABLE_IDLE_AND_PURGABLE || - (*iter).ext_id_.recycle_state () == ACE_RECYCLABLE_PURGABLE_BUT_NOT_IDLE) - { - if (found == 0) - { - min = (*iter).int_id_.second; - key_to_remove = &(*iter).ext_id_; - value_to_remove = &(*iter).int_id_; - found = 1; - } - else - { - // Ah! an entry with lower ATTTRIBUTES... - if (min > (*iter).int_id_.second) - { - min = (*iter).int_id_.second; - key_to_remove = &(*iter).ext_id_; - value_to_remove = &(*iter).int_id_; - } - } - } - } -} - -//////////////////////////////////////////////////////////////////////////////// - -template -ACE_Refcounted_Recyclable_Handler_Caching_Utility::ACE_Refcounted_Recyclable_Handler_Caching_Utility (ACE_Cleanup_Strategy *cleanup_strategy, - bool delete_cleanup_strategy) - : cleanup_strategy_ (cleanup_strategy), - delete_cleanup_strategy_ (delete_cleanup_strategy), - marked_as_closed_entries_ (0) -{ - if (cleanup_strategy == 0) - { - ACE_NEW (this->cleanup_strategy_, - CLEANUP_STRATEGY); - this->delete_cleanup_strategy_ = true; - } -} - -template -ACE_Refcounted_Recyclable_Handler_Caching_Utility::~ACE_Refcounted_Recyclable_Handler_Caching_Utility (void) -{ - if (this->delete_cleanup_strategy_) - delete this->cleanup_strategy_; -} - -template int -ACE_Refcounted_Recyclable_Handler_Caching_Utility::clear_cache (CONTAINER &container, - double purge_percent) -{ - // Check that the purge_percent is non-zero. - if (ACE::is_equal (purge_percent, 0.0)) - return 0; - - // Get the number of entries in the container which can be considered for purging. - size_t const available_entries = - container.current_size () - this->marked_as_closed_entries_; - - // Also whether the number of entries in the cache zero. - // Oops! then there is no way out but exiting. - if (available_entries <= 0) - return 0; - - // Calculate the no of entries to remove from the cache depending - // upon the . - size_t entries_to_remove - = ACE_MAX (static_cast (1), - static_cast (static_cast (purge_percent) - / 100 * available_entries)); - - if (entries_to_remove >= available_entries || entries_to_remove == 0) - entries_to_remove = available_entries - 1; - - KEY *key_to_remove = 0; - VALUE *value_to_remove = 0; - - for (size_t i = 0; i < entries_to_remove ; ++i) - { - this->minimum (container, - key_to_remove, - value_to_remove); - - // Simply verifying that the key is non-zero. - // This is important for strategies where the minimum - // entry cant be found due to constraints on the type of entry - // to remove. - if (key_to_remove == 0) - return 0; - - if (this->cleanup_strategy_->cleanup (container, - key_to_remove, - value_to_remove) == -1) - return -1; - - ++this->marked_as_closed_entries_; - } - - return 0; -} - -template void -ACE_Refcounted_Recyclable_Handler_Caching_Utility::minimum (CONTAINER &container, - KEY *&key_to_remove, - VALUE *&value_to_remove) -{ - // Starting values. - ITERATOR end = container.end (); - ITERATOR iter = container.begin (); - ATTRIBUTES min = (*iter).int_id_.second (); - key_to_remove = 0; - value_to_remove = 0; - // Found the minimum entry to be purged? - int found = 0; - - // The iterator moves thru the container searching for the entry - // with the lowest ATTRIBUTES. - for (; - iter != end; - ++iter) - { - // If the entry isnt IDLE_AND_PURGABLE continue until you reach - // the first entry which can be purged. This is the minimum with - // which you will compare the rest of the purgable entries. - if ((*iter).ext_id_.recycle_state () == ACE_RECYCLABLE_IDLE_AND_PURGABLE || - (*iter).ext_id_.recycle_state () == ACE_RECYCLABLE_PURGABLE_BUT_NOT_IDLE) - { - if (found == 0) - { - min = (*iter).int_id_.second (); - key_to_remove = &(*iter).ext_id_; - value_to_remove = &(*iter).int_id_; - found = 1; - } - else - { - // Ah! an entry with lower ATTTRIBUTES... - if (min > (*iter).int_id_.second ()) - { - min = (*iter).int_id_.second (); - key_to_remove = &(*iter).ext_id_; - value_to_remove = &(*iter).int_id_; - } - } - } - } -} - -//////////////////////////////////////////////////////////////////////////////// - -template -ACE_Handler_Caching_Utility::ACE_Handler_Caching_Utility (ACE_Cleanup_Strategy *cleanup_strategy, - bool delete_cleanup_strategy) - : cleanup_strategy_ (cleanup_strategy), - delete_cleanup_strategy_ (delete_cleanup_strategy) -{ - if (cleanup_strategy == 0) - { - ACE_NEW (this->cleanup_strategy_, - CLEANUP_STRATEGY); - this->delete_cleanup_strategy_ = true; - } -} - -template -ACE_Handler_Caching_Utility::~ACE_Handler_Caching_Utility (void) -{ - if (this->delete_cleanup_strategy_) - delete this->cleanup_strategy_; -} - -template int -ACE_Handler_Caching_Utility::clear_cache (CONTAINER &container, - double purge_percent) -{ - // Check that the purge_percent is non-zero. - if (ACE::is_equal (purge_percent, 0.0)) - return 0; - - // Get the number of entries in the container. - size_t current_map_size = container.current_size (); - - // Also whether the number of entries in the cache is just one! - // Oops! then there is no way out but exiting. So return an error. - if (current_map_size == 0) - return 0; - - // Calculate the no of entries to remove from the cache depending - // upon the . - size_t entries_to_remove - = ACE_MAX (static_cast (1), - static_cast (static_cast (purge_percent) - / 100 * current_map_size)); - - KEY *key_to_remove = 0; - VALUE *value_to_remove = 0; - - for (size_t i = 0; i < entries_to_remove ; ++i) - { - this->minimum (container, - key_to_remove, - value_to_remove); - - if (this->cleanup_strategy_->cleanup (container, - key_to_remove, - value_to_remove) == -1) - return -1; - } - - return 0; -} - -template void -ACE_Handler_Caching_Utility::minimum (CONTAINER &container, - KEY *&key_to_remove, - VALUE *&value_to_remove) -{ - // Starting values. - ITERATOR iter = container.begin (); - ITERATOR end = container.end (); - ATTRIBUTES min = (*iter).int_id_->caching_attributes (); - key_to_remove = &(*iter).ext_id_; - value_to_remove = &(*iter).int_id_; - - // The iterator moves thru the container searching for the entry - // with the lowest ATTRIBUTES. - for (++iter; - iter != end; - ++iter) - { - if (min > (*iter).int_id_->caching_attributes () && - (*iter).int_id_->active () != 1) - { - // Ah! an item with lower ATTTRIBUTES... - min = (*iter).int_id_->caching_attributes (); - key_to_remove = &(*iter).ext_id_; - value_to_remove = &(*iter).int_id_; - } - } -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////// - -template -ACE_Null_Caching_Utility::ACE_Null_Caching_Utility (ACE_Cleanup_Strategy *cleanup_strategy, - bool delete_cleanup_strategy) - : cleanup_strategy_ (cleanup_strategy), - delete_cleanup_strategy_ (delete_cleanup_strategy) -{ - if (cleanup_strategy == 0) - { - ACE_NEW (this->cleanup_strategy_, - CLEANUP_STRATEGY); - this->delete_cleanup_strategy_ = true; - } -} - -template -ACE_Null_Caching_Utility::~ACE_Null_Caching_Utility (void) -{ - if (this->delete_cleanup_strategy_) - delete this->cleanup_strategy_; -} - -template int -ACE_Null_Caching_Utility::clear_cache (CONTAINER &container, - double purge_percent) -{ - ACE_UNUSED_ARG (container); - ACE_UNUSED_ARG (purge_percent); - - return 0; -} - -template void -ACE_Null_Caching_Utility::minimum (CONTAINER &container, - KEY *&key_to_remove, - VALUE *&value_to_remove) -{ - ACE_UNUSED_ARG (container); - ACE_UNUSED_ARG (key_to_remove); - ACE_UNUSED_ARG (value_to_remove); -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_CACHING_UTILITY_T_CPP */ diff --git a/modules/worldengine/deps/acelite/ace/Caching_Utility_T.h b/modules/worldengine/deps/acelite/ace/Caching_Utility_T.h deleted file mode 100644 index bdeb165fb6..0000000000 --- a/modules/worldengine/deps/acelite/ace/Caching_Utility_T.h +++ /dev/null @@ -1,311 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Caching_Utility_T.h - * - * @author Kirthika Parameswaran - */ -//============================================================================= - -#ifndef ACE_CACHING_UTILITY_H -#define ACE_CACHING_UTILITY_H - -#include /**/ "ace/pre.h" - -#include /**/ "ace/config-all.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Global_Macros.h" -#include "ace/Cleanup_Strategies_T.h" -#include "ace/Copy_Disabled.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_Pair_Caching_Utility - * - * @brief Defines a helper class for the Caching Strategies. - * - * This class defines the methods commonly used by the different - * caching strategies. For instance: clear_cache() method which - * decides and purges the entry from the container. @note This - * class helps in the caching_strategies using a container - * containing entries of > - * kind. The attributes helps in deciding the entries to be - * purged. The Cleanup_Strategy is the callback class to which the - * entries to be cleaned up will be delegated. - */ -template -class ACE_Pair_Caching_Utility : private ACE_Copy_Disabled -{ -public: - - typedef ACE_Cleanup_Strategy CLEANUP_STRATEGY; - - /// Constructor. - ACE_Pair_Caching_Utility (ACE_Cleanup_Strategy *cleanup_strategy = 0, - bool delete_cleanup_strategy = false); - - /// Destructor. - ~ACE_Pair_Caching_Utility (void); - - /** - * Purge entries from the @a container. The Cleanup_Strategy will do the - * actual job of cleanup once the entries to be cleaned up are decided. - */ - int clear_cache (CONTAINER &container, double purge_percent); - -protected: - - /// Find the entry with minimum caching attributes. - void minimum (CONTAINER &container, - KEY *&key_to_remove, - VALUE *&value_to_remove); - - /// The cleanup strategy which can be used to destroy the entries of - /// the container. - CLEANUP_STRATEGY *cleanup_strategy_; - - /// Whether the cleanup_strategy should be destroyed or not. - bool delete_cleanup_strategy_; -}; - -/** - * @class ACE_Recyclable_Handler_Caching_Utility - * - * @brief Defines a helper class for the Caching Strategies. - * - * This class defines the methods commonly used by the different - * caching strategies. For instance: clear_cache() method which - * decides and purges the entry from the container. @note This - * class helps in the caching_strategies using a container - * containing entries of kind. The attributes - * helps in deciding the entries to be purged. The - * Cleanup_Strategy is the callback class to which the entries to - * be cleaned up will be delegated. - */ -template -class ACE_Recyclable_Handler_Caching_Utility : private ACE_Copy_Disabled -{ - -public: - - typedef ACE_Recyclable_Handler_Cleanup_Strategy CLEANUP_STRATEGY; - typedef ACE_Cleanup_Strategy CLEANUP_STRATEGY_BASE; - - /// Constructor. - ACE_Recyclable_Handler_Caching_Utility (ACE_Cleanup_Strategy *cleanup_strategy = 0, - bool delete_cleanup_strategy = false); - - /// Destructor. - ~ACE_Recyclable_Handler_Caching_Utility (void); - - /** - * Purge entries from the @a container. The Cleanup_Strategy will do - * the actual job of cleanup once the entries to be cleaned up are - * decided. - */ - int clear_cache (CONTAINER &container, - double purge_percent); - -protected: - - /// Find the entry with minimum caching attributes. - void minimum (CONTAINER &container, - KEY *&key_to_remove, - VALUE *&value_to_remove); - - /// This is the default Cleanup Strategy for this utility. - CLEANUP_STRATEGY_BASE *cleanup_strategy_; - - /// Whether the cleanup_strategy should be destroyed or not. - bool delete_cleanup_strategy_; -}; - -/** - * @class ACE_Refcounted_Recyclable_Handler_Caching_Utility - * - * @brief Defines a helper class for the Caching Strategies. - * - * This class defines the methods commonly used by the different - * caching strategies. For instance: clear_cache () method which - * decides and purges the entry from the container. @note This - * class helps in the caching_strategies using a container - * containing entries of kind. The attributes helps in - * deciding the entries to be purged. The Cleanup_Strategy is the - * callback class to which the entries to be cleaned up will be - * delegated. - */ -template -class ACE_Refcounted_Recyclable_Handler_Caching_Utility : private ACE_Copy_Disabled -{ -public: - typedef ACE_Refcounted_Recyclable_Handler_Cleanup_Strategy CLEANUP_STRATEGY; - typedef ACE_Cleanup_Strategy CLEANUP_STRATEGY_BASE; - - /// Constructor. - ACE_Refcounted_Recyclable_Handler_Caching_Utility (ACE_Cleanup_Strategy *cleanup_strategy = 0, - bool delete_cleanup_strategy = false); - - /// Destructor. - ~ACE_Refcounted_Recyclable_Handler_Caching_Utility (void); - - /** - * Purge entries from the @a container. The Cleanup_Strategy will do - * the actual job of cleanup once the entries to be cleaned up are - * decided. - */ - int clear_cache (CONTAINER &container, - double purge_percent); - -protected: - - /// Find the entry with minimum caching attributes. - void minimum (CONTAINER &container, - KEY *&key_to_remove, - VALUE *&value_to_remove); - - /// This is the default Cleanup Strategy for this utility. - CLEANUP_STRATEGY_BASE *cleanup_strategy_; - - /// Whether the cleanup_strategy should be destroyed or not. - bool delete_cleanup_strategy_; - - /** - * This figure denotes the number of entries are there in the - * container which have been marked as closed already but might - * not have been unbound from the container. - */ - size_t marked_as_closed_entries_; -}; - -/** - * @class ACE_Handler_Caching_Utility - * - * @brief Defines a helper class for the Caching Strategies. - * - * This class defines the methods commonly used by the different - * caching strategies. For instance: clear_cache() method which - * decides and purges the entry from the container. @note This - * class helps in the caching_strategies using a container - * containing entries of kind where the HANDLER - * contains the caching attributes which help in deciding the - * entries to be purged. The Cleanup_Strategy is the callback - * class to which the entries to be cleaned up will be delegated. - */ -template -class ACE_Handler_Caching_Utility : private ACE_Copy_Disabled -{ -public: - - typedef ACE_Handler_Cleanup_Strategy CLEANUP_STRATEGY; - typedef ACE_Cleanup_Strategy CLEANUP_STRATEGY_BASE; - - /// Constructor. - ACE_Handler_Caching_Utility (ACE_Cleanup_Strategy *cleanup_strategy = 0, - bool delete_cleanup_strategy = false); - - /// Destructor. - ~ACE_Handler_Caching_Utility (void); - - /** - * Purge entries from the @a container. The Cleanup_Strategy will do - * the actual job of cleanup once the entries to be cleaned up are - * decided. - */ - int clear_cache (CONTAINER &container, - double purge_percent); - -protected: - - /** - * Find the entry with minimum caching attributes. This is handler - * specific since this utility is to be used very specifically for - * handler who have caching_attributes for server side acched - * connection management. - */ - void minimum (CONTAINER &container, - KEY *&key_to_remove, - VALUE *&value_to_remove); - - /// The cleanup strategy which can be used to destroy the entries of - /// the container. - CLEANUP_STRATEGY_BASE *cleanup_strategy_; - - /// Whether the cleanup_strategy should be destroyed or not. - bool delete_cleanup_strategy_; -}; - -/** - * @class ACE_Null_Caching_Utility - * - * @brief Defines a dummy helper class for the Caching Strategies. - * - * This class defines the methods commonly used by the different - * caching strategies. For instance: clear_cache() method which - * decides and purges the entry from the container. @note This - * class is be used with the Null_Caching_Strategy. The - * Cleanup_Strategy is the callback class to which the entries to - * be cleaned up will be delegated. - */ -template -class ACE_Null_Caching_Utility : private ACE_Copy_Disabled -{ -public: - - typedef ACE_Null_Cleanup_Strategy CLEANUP_STRATEGY; - typedef ACE_Cleanup_Strategy CLEANUP_STRATEGY_BASE; - - /// Constructor. - ACE_Null_Caching_Utility (ACE_Cleanup_Strategy *cleanup_strategy = 0, - bool delete_cleanup_strategy = false); - - /// Destructor. - ~ACE_Null_Caching_Utility (void); - - /** - * Purge entries from the @a container. The Cleanup_Strategy will do - * the actual job of cleanup once the entries to be cleaned up are - * decided. @note Here it is a no-op. - */ - int clear_cache (CONTAINER &container, - double purge_percent); - -protected: - - /** - * Find the entry with minimum caching attributes. This is handler - * specific since this utility is to be used very specifically for - * handler who have caching_attributes for server side acched - * connection management.@note Here it is a no-op. - */ - void minimum (CONTAINER &container, - KEY *&key_to_remove, - VALUE *&value_to_remove); - - /// The cleanup strategy which can be used to destroy the entries of - /// the container. - CLEANUP_STRATEGY_BASE *cleanup_strategy_; - - /// Whether the cleanup_strategy should be destroyed or not. - bool delete_cleanup_strategy_; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "ace/Caching_Utility_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Caching_Utility_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ - -#include /**/ "ace/post.h" - -#endif /* ACE_CACHING_UTILITY_H */ diff --git a/modules/worldengine/deps/acelite/ace/Capabilities.cpp b/modules/worldengine/deps/acelite/ace/Capabilities.cpp deleted file mode 100644 index b6b9bd0f6d..0000000000 --- a/modules/worldengine/deps/acelite/ace/Capabilities.cpp +++ /dev/null @@ -1,350 +0,0 @@ -#include "ace/Capabilities.h" -#include "ace/OS_NS_ctype.h" -#include "ace/OS_Memory.h" -#include "ace/OS_NS_string.h" - -#if !defined (__ACE_INLINE__) -#include "ace/Capabilities.inl" -#endif /* !__ACE_INLINE__ */ - -#include "ace/OS_NS_stdio.h" - -#define ACE_ESC ((ACE_TCHAR)0x1b) - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_CapEntry::~ACE_CapEntry (void) -{ -} - -ACE_Capabilities::ACE_Capabilities (void) - : caps_ () -{ -} - -ACE_Capabilities::~ACE_Capabilities (void) -{ - this->resetcaps (); -} - -const ACE_TCHAR * -ACE_Capabilities::parse (const ACE_TCHAR *buf, ACE_TString &cap) -{ - while (*buf != ACE_TEXT ('\0') && *buf != ACE_TEXT (',')) - { - if (*buf == ACE_TEXT ('\\')) - { - ++buf; - if (*buf == ACE_TEXT ('E') || *buf == ACE_TEXT ('e')) - { - cap += ACE_ESC; - ++buf; - continue; - } - else if (*buf == ACE_TEXT ('r')) - { - cap += ACE_TEXT ('\r'); - ++buf; - continue; - } - else if (*buf == ACE_TEXT ('n')) - { - cap += ACE_TEXT ('\n'); - ++buf; - continue; - } - else if (*buf == ACE_TEXT ('t')) - { - cap += ACE_TEXT ('\t'); - ++buf; - continue; - } - else if (*buf == ACE_TEXT ('\\')) - { - cap += *buf++; - continue; - } - if (ACE_OS::ace_isdigit(*buf)) - { - // @@ UNICODE Does this work with unicode? - int oc = 0; - for (int i = 0; - i < 3 && *buf && ACE_OS::ace_isdigit (*buf); - i++) - oc = oc * 8 + (*buf++ - ACE_TEXT ('0')); - - cap += (ACE_TCHAR) oc; - continue; - } - } - cap += *buf++; - } - return buf; -} - -const ACE_TCHAR * -ACE_Capabilities::parse (const ACE_TCHAR *buf, int &cap) -{ - int n = 0; - - while (*buf && ACE_OS::ace_isdigit (*buf)) - n = n * 10 + (*buf++ - ACE_TEXT ('0')); - - cap = n; - - return buf; -} - -void -ACE_Capabilities::resetcaps (void) -{ - for (CAPABILITIES_MAP::ITERATOR iter (this->caps_); - !iter.done (); - iter.advance ()) - { - CAPABILITIES_MAP::ENTRY *entry = 0; - iter.next (entry); - delete entry->int_id_; - } - - this->caps_.close (); - this->caps_.open (); -} - -int -ACE_Capabilities::fillent (const ACE_TCHAR *buf) -{ - this->resetcaps (); - while (*buf) - { - ACE_TString s; - int n; - ACE_TString name; - ACE_CapEntry *ce; - - // Skip blanks - while (*buf && ACE_OS::ace_isspace(*buf)) buf++; - // If we get end of line return - - if (*buf == ACE_TEXT ('\0')) - break; - - if (*buf == ACE_TEXT ('#')) - { - while (*buf && *buf != ACE_TEXT ('\n')) - buf++; - if (*buf == ACE_TEXT ('\n')) - buf++; - continue; - } - while(*buf && *buf != ACE_TEXT ('=') - && *buf!= ACE_TEXT ('#') - && *buf != ACE_TEXT (',')) - name += *buf++; - - // If name is null. - switch (*buf) - { - case ACE_TEXT ('='): - // String property - buf = this->parse (buf + 1, s); - ACE_NEW_RETURN (ce, - ACE_StringCapEntry (s), - -1); - if (this->caps_.bind (name, ce) == -1) - { - delete ce; - return -1; - } - break; - case ACE_TEXT ('#'): - // Integer property - buf = this->parse (buf + 1, n); - ACE_NEW_RETURN (ce, - ACE_IntCapEntry (n), - -1); - if (this->caps_.bind (name, ce) == -1) - { - delete ce; - return -1; - } - break; - case ACE_TEXT (','): - // Boolean - ACE_NEW_RETURN (ce, - ACE_BoolCapEntry (1), - -1); - if (this->caps_.bind (name, ce) == -1) - { - delete ce; - return -1; - } - break; - default: - return 0; - } - - if (*buf++ != ACE_TEXT (',')) - return -1; - } - - return 0; -} - -int -ACE_Capabilities::is_entry (const ACE_TCHAR *name, const ACE_TCHAR *line) -{ - for (;;) - { - // Skip blanks or irrelevant characters - while (*line && ACE_OS::ace_isspace(*line)) - ++line; - - // End of line reached - if (*line == ACE_TEXT ('\0')) - break; - - // Build the entry name - ACE_TString nextname; - while (*line && *line != ACE_TEXT ('|') && *line != ACE_TEXT (',')) - nextname += *line++; - - // We have found the required entry? - if (ACE_OS::strcmp (nextname.c_str (), name) == 0) - return 1; - - // Skip puntuaction char if neccesary. - if (*line == ACE_TEXT ('|') || *line == ACE_TEXT (',')) - ++line; - else - { - ACELIB_DEBUG ((LM_DEBUG, - ACE_TEXT ("Invalid entry\n"))); - break; - } - } - return 0; -} - -int -ACE_Capabilities::getline (FILE *fp, ACE_TString &line) -{ - int ch; - - line.set (0, 0); - - while ((ch = ACE_OS::fgetc (fp)) != EOF && ch != ACE_TEXT ('\n')) - line += (ACE_TCHAR) ch; - - if (ch == EOF && line.length () == 0) - return -1; - else - return 0; -} - -int -ACE_Capabilities::getval (const ACE_TCHAR *keyname, ACE_TString &val) -{ - ACE_CapEntry* cap = 0; - if (this->caps_.find (keyname, cap) == -1) - return -1; - - ACE_StringCapEntry *scap = - dynamic_cast (cap); - if (scap == 0) - return -1; - - val = scap->getval (); - return 0; -} - -int -ACE_Capabilities::getval (const ACE_TCHAR *keyname, int &val) -{ - ACE_CapEntry *cap = 0; - if (this->caps_.find (keyname, cap) == -1) - return -1; - - ACE_IntCapEntry *icap = - dynamic_cast (cap); - if (icap != 0) - { - val = icap->getval (); - return 0; - } - - ACE_BoolCapEntry *bcap = - dynamic_cast (cap); - - if (bcap == 0) - return -1; - - val = bcap->getval (); - return 0; -} - -#if !defined (ACE_IS_SPLITTING) -static int -is_empty (const ACE_TCHAR *line) -{ - while (*line && ACE_OS::ace_isspace (*line)) - ++line; - - return *line == ACE_TEXT ('\0') || *line == ACE_TEXT ('#'); -} - -static int -is_line (const ACE_TCHAR *line) -{ - while (*line && ACE_OS::ace_isspace (*line)) - ++line; - - return *line != ACE_TEXT ('\0'); -} -#endif /* !ACE_IS_SPLITTING */ - -int -ACE_Capabilities::getent (const ACE_TCHAR *fname, const ACE_TCHAR *name) -{ - FILE *fp = ACE_OS::fopen (fname, ACE_TEXT ("r")); - - if (fp == 0) - ACELIB_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("Can't open %s file\n"), - fname), - -1); - - int done; - ACE_TString line; - - while (0 == (done = (this->getline (fp, line) == -1)) - && is_empty (line.c_str ())) - continue; - - while (!done) - { - ACE_TString newline; - ACE_TString description; - - while (0 == (done = (this->getline (fp, newline) == -1))) - if (is_line (newline.c_str ())) - description += newline; - else - break; - - if (this->is_entry (name, line.c_str())) - { - ACE_OS::fclose (fp); - return this->fillent (description.c_str ()); - } - - line = newline; - while (!done && is_empty (line.c_str ())) - done = this->getline (fp, line) == -1; - } - - ACE_OS::fclose (fp); - return -1; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Capabilities.h b/modules/worldengine/deps/acelite/ace/Capabilities.h deleted file mode 100644 index 16776ed442..0000000000 --- a/modules/worldengine/deps/acelite/ace/Capabilities.h +++ /dev/null @@ -1,219 +0,0 @@ -/* -*- C++ -*- */ - -//============================================================================= -/** - * @file Capabilities.h - * - * @author Arturo Montes - */ -//============================================================================= - - -#ifndef ACE_CAPABILITIES_H -#define ACE_CAPABILITIES_H -#include /**/ "ace/pre.h" - -#include /**/ "ace/config-all.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Null_Mutex.h" -#include "ace/Hash_Map_Manager_T.h" -#include "ace/Containers.h" -#include "ace/SString.h" -#include "ace/Functor_String.h" - -#if defined (ACE_IS_SPLITTING) -# include "ace/OS_NS_ctype.h" -#endif /* ACE_IS_SPLITTING */ - - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_CapEntry - * - * @brief This class is the base class for all ACE Capabilities entry - * subclasses. - * - * This class is not instantiable and does not provide accessors - * or methods. If you want to add a new kind of attribute subclass - * this class and dynamic_cast to proper subclass. - */ -class ACE_Export ACE_CapEntry -{ -public: - - virtual ~ACE_CapEntry (void); - -protected: - - enum - { - ACE_INTCAP = 0, - ACE_STRINGCAP = 1, - ACE_BOOLCAP = 2 - }; - - ACE_CapEntry (int captype); - -protected: - - int captype_; - -}; - -/** - * @class ACE_IntCapEntry - * - * @brief This class implement the ACE Integer Capability subclass. - * - * This is a container class for ACE Capabilities integer container - * values. - */ -class ACE_Export ACE_IntCapEntry : public ACE_CapEntry -{ -public: - ACE_IntCapEntry (int val); - int getval (void) const; - -protected: - int val_; -}; - -/** - * @class ACE_StringCapEntry - * - * @brief This class implement the ACE String Capability subclass. - * - * This is a container class for ACE Capabilities String container - * values. - */ -class ACE_Export ACE_StringCapEntry : public ACE_CapEntry -{ -public: - ACE_StringCapEntry (const ACE_TString &val); - ACE_TString getval (void) const; - -protected: - ACE_TString val_; -}; - -/** - * @class ACE_BoolCapEntry - * - * @brief This class implement the ACE Bool Capability subclass. - * - * This is a container class for ACE Capabilities bool container - * values. - */ -class ACE_Export ACE_BoolCapEntry : public ACE_CapEntry -{ -public: - ACE_BoolCapEntry (int val); - int getval (void) const; - -protected: - int val_; -}; - -/** - * @class ACE_Capabilities - * - * @brief - * This class implement the ACE Capabilities. - * - * This is a container class for ACE Capabilities - * values. Currently exist three different capability values: - * ACE_IntCapEntry (integer), ACE_BoolCapEntry (bool) and - * ACE_StringCapEntry (String). An ACE_Capabilities is a - * unordered set of pair = (String, ACE_CapEntry *). Where - * the first component is the name of capability and the second - * component is a pointer to the capability value container. A - * FILE is a container for ACE_Capabilities, the - * ACE_Capabilities has a name in the file, as a termcap file. - */ -class ACE_Export ACE_Capabilities -{ -public: - - typedef ACE_Hash_Map_Manager_Ex, ACE_Equal_To, ACE_Null_Mutex> CAPABILITIES_MAP; - - /// The Constructor - ACE_Capabilities (void); - - /// The Destructor - ~ACE_Capabilities(void); - -public: - - /// Get a string entry. - int getval (const ACE_TCHAR *ent, ACE_TString &val); - - /// Get an integer entry. - int getval (const ACE_TCHAR *ent, int &val); - - /// Get the ACE_Capabilities name from FILE fname and load the - /// associated capabitily entries in map. - int getent (const ACE_TCHAR *fname, const ACE_TCHAR *name); - -protected: - - /// Parse an integer property - const ACE_TCHAR *parse (const ACE_TCHAR *buf, int &cap); - - /// Parse a string property - const ACE_TCHAR *parse (const ACE_TCHAR *buf, ACE_TString &cap); - - /// Fill the ACE_Capabilities with description in ent. - int fillent(const ACE_TCHAR *ent); - - /// Parse a cap entry - int parseent (const ACE_TCHAR *name, ACE_TCHAR *line); - - /// Get a line from FILE input stream - int getline (FILE* fp, - ACE_TString &line); - - /// Is a valid entry - int is_entry (const ACE_TCHAR *name, const ACE_TCHAR *line); - - /// Reset the set of capabilities - void resetcaps (void); - -private: - - /// This is the set of ACE_CapEntry. - CAPABILITIES_MAP caps_; -}; - -#if defined (ACE_IS_SPLITTING) -int -is_empty (const ACE_TCHAR *line) -{ - while (*line && ACE_OS::ace_isspace (*line)) - ++line; - - return *line == ACE_TEXT ('\0') || *line == ACE_TEXT ('#'); -} - -int -is_line (const ACE_TCHAR *line) -{ - while (*line && ACE_OS::ace_isspace (*line)) - ++line; - - return *line != ACE_TEXT ('\0'); -} -#endif /* ACE_IS_SPLITTING */ - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/Capabilities.inl" -#endif /* __ACE_INLINE__ */ - -#include /**/ "ace/post.h" -#endif /* __ACE_CAPABILITIES_H__ */ diff --git a/modules/worldengine/deps/acelite/ace/Capabilities.inl b/modules/worldengine/deps/acelite/ace/Capabilities.inl deleted file mode 100644 index 0579ae6cd9..0000000000 --- a/modules/worldengine/deps/acelite/ace/Capabilities.inl +++ /dev/null @@ -1,49 +0,0 @@ -// -*- C++ -*- -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_INLINE -ACE_CapEntry::ACE_CapEntry (int captype) - : captype_ (captype) -{ -} - -ACE_INLINE -ACE_IntCapEntry::ACE_IntCapEntry (int val) - : ACE_CapEntry (ACE_INTCAP), - val_ (val) -{ -} - -ACE_INLINE int -ACE_IntCapEntry::getval (void) const -{ - return val_; -} - -ACE_INLINE -ACE_StringCapEntry::ACE_StringCapEntry (const ACE_TString &val) - : ACE_CapEntry (ACE_STRINGCAP), - val_ (val) -{ -} - -ACE_INLINE ACE_TString -ACE_StringCapEntry::getval (void) const -{ - return val_; -} - -ACE_INLINE -ACE_BoolCapEntry::ACE_BoolCapEntry (int val) - : ACE_CapEntry (ACE_BOOLCAP), - val_(val) -{ -} - -ACE_INLINE int -ACE_BoolCapEntry::getval (void) const -{ - return val_; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Cleanup.cpp b/modules/worldengine/deps/acelite/ace/Cleanup.cpp deleted file mode 100644 index d83022c858..0000000000 --- a/modules/worldengine/deps/acelite/ace/Cleanup.cpp +++ /dev/null @@ -1,175 +0,0 @@ -#include "ace/Cleanup.h" - -#if !defined (ACE_HAS_INLINED_OSCALLS) -# include "ace/Cleanup.inl" -#endif /* ACE_HAS_INLINED_OSCALLS */ - -#include "ace/OS_Memory.h" -#include "ace/OS_NS_string.h" -#include "ace/os_include/os_typeinfo.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -void -ACE_Cleanup::cleanup (void *) -{ - delete this; -} - -ACE_Cleanup::~ACE_Cleanup (void) -{ -} - -/*****************************************************************************/ - -extern "C" void -ACE_CLEANUP_DESTROYER_NAME (ACE_Cleanup *object, void *param) -{ - object->cleanup (param); -} - -/*****************************************************************************/ - -ACE_Cleanup_Info_Node::ACE_Cleanup_Info_Node (void) - : object_ (0), - cleanup_hook_ (0), - param_ (0), - name_ (0) -{ -} - -ACE_Cleanup_Info_Node::ACE_Cleanup_Info_Node (void *object, - ACE_CLEANUP_FUNC cleanup_hook, - void *param, - const char *name) - : object_ (object), - cleanup_hook_ (cleanup_hook), - param_ (param), - name_ (name ? ACE_OS::strdup (name) : 0) -{ -} - -ACE_Cleanup_Info_Node::~ACE_Cleanup_Info_Node (void) -{ - if (this->name_) - ACE_OS::free ((void *) name_); -} - -bool -ACE_Cleanup_Info_Node::operator== (const ACE_Cleanup_Info_Node &o) const -{ - return o.object_ == this->object_ - && o.cleanup_hook_ == this->cleanup_hook_ - && o.param_ == this->param_; -} - -bool -ACE_Cleanup_Info_Node::operator!= (const ACE_Cleanup_Info_Node &o) const -{ - return !(*this == o); -} - - -/*****************************************************************************/ - -ACE_OS_Exit_Info::ACE_OS_Exit_Info (void) -{ -} - -ACE_OS_Exit_Info::~ACE_OS_Exit_Info (void) -{ -} - -int -ACE_OS_Exit_Info::at_exit_i (void *object, - ACE_CLEANUP_FUNC cleanup_hook, - void *param, - const char* name) -{ - // Return -1 and sets errno if unable to allocate storage. Enqueue - // at the head and dequeue from the head to get LIFO ordering. - ACE_Cleanup_Info_Node *new_node = 0; - - ACE_NEW_RETURN (new_node, - ACE_Cleanup_Info_Node (object, cleanup_hook, param, name), - -1); - - registered_objects_.push_front (new_node); - - return 0; -} - -bool -ACE_OS_Exit_Info::find (void *object) -{ - for (ACE_Cleanup_Info_Node *iter = registered_objects_.head (); - iter != 0; - iter = iter->next ()) - { - if (iter->object () == object) - { - // The object has already been registered. - return true; - } - } - - return false; -} - -bool -ACE_OS_Exit_Info::remove (void *object) -{ - ACE_Cleanup_Info_Node *node = 0; - for (ACE_Cleanup_Info_Node *iter = registered_objects_.head (); - iter != 0; - iter = iter->next ()) - { - if (iter->object () == object) - { - node = iter; - break; - } - } - - if (node) - { - registered_objects_.remove (node); - delete node; - return true; - } - - return false; -} - - -void -ACE_OS_Exit_Info::call_hooks (void) -{ - // Call all registered cleanup hooks, in reverse order of - // registration. - for (ACE_Cleanup_Info_Node *iter = registered_objects_.pop_front (); - iter != 0; - iter = registered_objects_.pop_front ()) - { - if (iter->cleanup_hook () == reinterpret_cast ( - ACE_CLEANUP_DESTROYER_NAME)) - { - // The object is an ACE_Cleanup. - ACE_CLEANUP_DESTROYER_NAME ( - reinterpret_cast (iter->object ()), - iter->param ()); - } - else if (iter->object () == &ace_exit_hook_marker) - { - // The hook is an ACE_EXIT_HOOK. - (* reinterpret_cast (iter->cleanup_hook ())) (); - } - else - { - (*iter->cleanup_hook ()) (iter->object (), iter->param ()); - } - delete iter; - } -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Cleanup.h b/modules/worldengine/deps/acelite/ace/Cleanup.h deleted file mode 100644 index 33d944630d..0000000000 --- a/modules/worldengine/deps/acelite/ace/Cleanup.h +++ /dev/null @@ -1,158 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Cleanup.h - * - * @author Douglas C. Schmidt - * @author Jesper S. M|ller - * @author and a cast of thousands... - * - * Originally in OS.h. - */ -//============================================================================= - -#ifndef ACE_CLEANUP_H -# define ACE_CLEANUP_H - -# include /**/ "ace/pre.h" - -# include "ace/config-lite.h" - -# if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -# endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include /**/ "ace/ACE_export.h" - -# include "ace/Intrusive_List.h" -# include "ace/Intrusive_List_Node.h" - -#if (defined (ACE_HAS_VERSIONED_NAMESPACE) && ACE_HAS_VERSIONED_NAMESPACE == 1) -# include "ace/Global_Macros.h" -# define ACE_CLEANUP_DESTROYER_NAME ACE_PREPROC_CONCATENATE(ACE_VERSIONED_NAMESPACE_NAME, _ace_cleanup_destroyer) -#else -# define ACE_CLEANUP_DESTROYER_NAME ace_cleanup_destroyer -#endif /* ACE_HAS_VERSIONED_NAMESPACE == 1 */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_Cleanup - * - * @brief Base class for objects that are cleaned by ACE_Object_Manager. - */ -class ACE_Export ACE_Cleanup -{ -public: - /// No-op constructor. - ACE_Cleanup (void); - - /// Destructor. - virtual ~ACE_Cleanup (void); - - /// Cleanup method that, by default, simply deletes itself. - virtual void cleanup (void *param = 0); -}; - -/// Adapter for cleanup, used by ACE_Object_Manager. -extern "C" ACE_Export -void ACE_CLEANUP_DESTROYER_NAME (ACE_Cleanup *, void *param = 0); - -/** - * @class ACE_Cleanup_Info_Node - * - * @brief For maintaining a list of ACE_Cleanup_Info items. - * - * For internal use by ACE_Object_Manager. - */ -class ACE_Cleanup_Info_Node : public ACE_Intrusive_List_Node -{ -public: - ACE_Cleanup_Info_Node (void); - ACE_Cleanup_Info_Node (void *object, - ACE_CLEANUP_FUNC cleanup_hook, - void *param, - const char *name); - ~ACE_Cleanup_Info_Node (void); - - /// Equality operator. - bool operator== (const ACE_Cleanup_Info_Node &o) const; - - /// Inequality operator. - bool operator!= (const ACE_Cleanup_Info_Node &o) const; - - void* object(void); - - ACE_CLEANUP_FUNC cleanup_hook (void); - - void *param (void); -private: - /// Point to object that gets passed into the . - void *object_; - - /// Cleanup hook that gets called back. - ACE_CLEANUP_FUNC cleanup_hook_; - - /// Parameter passed to the . - void *param_; - - /// Name of the cleanup object - const char *name_; -}; - -typedef ACE_Intrusive_List ACE_Cleanup_Info_Node_List; - -/** - * @class ACE_OS_Exit_Info - * - * @brief Hold Object Manager cleanup (exit) information. - * - * @internal - * - * For internal use by the ACE library, only. - */ -class ACE_Export ACE_OS_Exit_Info -{ -public: - /// Default constructor. - ACE_OS_Exit_Info (void); - - /// Destructor. - ~ACE_OS_Exit_Info (void); - - /// Use to register a cleanup hook. - int at_exit_i (void *object, ACE_CLEANUP_FUNC cleanup_hook, void *param, const char* name = 0); - - /// Look for a registered cleanup hook object. Returns true if already - /// registered, false if not. - bool find (void *object); - - /// Remove a registered cleanup hook object. Returns true if removed - /// false if not. - bool remove (void *object); - - /// Call all registered cleanup hooks, in reverse order of - /// registration. - void call_hooks (); - -private: - /** - * Keeps track of all registered objects. - */ - ACE_Cleanup_Info_Node_List registered_objects_; -}; - - -ACE_END_VERSIONED_NAMESPACE_DECL - -# if defined (ACE_HAS_INLINED_OSCALLS) -# if defined (ACE_INLINE) -# undef ACE_INLINE -# endif /* ACE_INLINE */ -# define ACE_INLINE inline -# include "ace/Cleanup.inl" -# endif /* ACE_HAS_INLINED_OSCALLS */ - -# include /**/ "ace/post.h" -#endif /* ACE_CLEANUP_H */ diff --git a/modules/worldengine/deps/acelite/ace/Cleanup.inl b/modules/worldengine/deps/acelite/ace/Cleanup.inl deleted file mode 100644 index fdae3412f6..0000000000 --- a/modules/worldengine/deps/acelite/ace/Cleanup.inl +++ /dev/null @@ -1,27 +0,0 @@ -// -*- C++ -*- -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_INLINE -ACE_Cleanup::ACE_Cleanup (void) -{ -} - -ACE_INLINE void* -ACE_Cleanup_Info_Node::object(void) -{ - return this->object_; -} - -ACE_INLINE ACE_CLEANUP_FUNC -ACE_Cleanup_Info_Node::cleanup_hook (void) -{ - return this->cleanup_hook_; -} - -ACE_INLINE void * -ACE_Cleanup_Info_Node::param (void) -{ - return this->param_; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Cleanup_Strategies_T.cpp b/modules/worldengine/deps/acelite/ace/Cleanup_Strategies_T.cpp deleted file mode 100644 index 53cf0b876a..0000000000 --- a/modules/worldengine/deps/acelite/ace/Cleanup_Strategies_T.cpp +++ /dev/null @@ -1,93 +0,0 @@ -#ifndef ACE_CLEANUP_STRATEGIES_T_CPP -#define ACE_CLEANUP_STRATEGIES_T_CPP - -#include "ace/Cleanup_Strategies_T.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -#pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -//////////////////////////////////////////////////////////////////////////// - -template -ACE_Cleanup_Strategy::~ACE_Cleanup_Strategy (void) -{ -} - -template int -ACE_Cleanup_Strategy::cleanup (CONTAINER &container, - KEY *key, - VALUE *) -{ - return container.unbind (*key); -} - -//////////////////////////////////////////////////////////////////////////// - -template int -ACE_Recyclable_Handler_Cleanup_Strategy::cleanup ( - CONTAINER &container, - KEY *key, - VALUE *) -{ - VALUE value; - - if (container.unbind (*key, value) == -1) - return -1; - - value.first->recycler (0, 0); - - value.first->close (); - - return 0; -} - -///////////////////////////////////////////////////////////////////////////// - -template int -ACE_Refcounted_Recyclable_Handler_Cleanup_Strategy::cleanup ( - CONTAINER &, - KEY *, - VALUE *value) -{ - return value->first ()->handle_close_i (); -} - -//////////////////////////////////////////////////////////////////////////// - -template int -ACE_Handler_Cleanup_Strategy::cleanup ( - CONTAINER &container, - KEY *key, - VALUE *value) -{ - // Remove the item from cache only if the handler isnt in use. - if ((*value)->active () == 0) - { - (*value)->close (); - - if (container.unbind (*key) == -1) - return -1; - - } - - return 0; -} - -//////////////////////////////////////////////////////////////////////////// - -template int -ACE_Null_Cleanup_Strategy::cleanup (CONTAINER &, - KEY *, - VALUE *) -{ - return 0; -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_CLEANUP_STRATEGIES_T_CPP */ diff --git a/modules/worldengine/deps/acelite/ace/Cleanup_Strategies_T.h b/modules/worldengine/deps/acelite/ace/Cleanup_Strategies_T.h deleted file mode 100644 index 96900418a0..0000000000 --- a/modules/worldengine/deps/acelite/ace/Cleanup_Strategies_T.h +++ /dev/null @@ -1,147 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Cleanup_Strategies_T.h - * - * @author Kirthika Parameswaran - */ -//============================================================================= - - -#ifndef CLEANUP_STRATEGIES_H -#define CLEANUP_STRATEGIES_H -#include /**/ "ace/pre.h" - -#include /**/ "ace/config-all.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -// For linkers that cant grok long names. -#define ACE_Cleanup_Strategy ACLE - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_Cleanup_Strategy - * - * @brief Defines a default strategy to be followed for cleaning up - * entries from a map which is the container. - * - * By default the entry to be cleaned up is removed from the - * container. - */ -template -class ACE_Cleanup_Strategy -{ - -public: - - /// Destructor. - virtual ~ACE_Cleanup_Strategy (void); - - /// The method which will do the cleanup of the entry in the container. - virtual int cleanup (CONTAINER &container, KEY *key, VALUE *value); -}; - -////////////////////////////////////////////////////////////////////// -#define ACE_Recyclable_Handler_Cleanup_Strategy ARHCLE - -/** - * @class ACE_Recyclable_Handler_Cleanup_Strategy - * - * @brief Defines a strategy to be followed for cleaning up - * entries which are svc_handlers from a container. - * - * The entry to be cleaned up is removed from the container. - * Here, since we are dealing with svc_handlers specifically, we - * perform a couple of extra operations. @note To be used when - * the handler is recyclable. - */ -template -class ACE_Recyclable_Handler_Cleanup_Strategy : public ACE_Cleanup_Strategy -{ - -public: - - /// The method which will do the cleanup of the entry in the container. - virtual int cleanup (CONTAINER &container, KEY *key, VALUE *value); -}; - -////////////////////////////////////////////////////////////////////// -#define ACE_Refcounted_Recyclable_Handler_Cleanup_Strategy ARRHCLE - -/** - * @class ACE_Refcounted_Recyclable_Handler_Cleanup_Strategy - * - * @brief Defines a strategy to be followed for cleaning up - * entries which are svc_handlers from a container. - * - * The entry to be cleaned up is removed from the container. - * Here, since we are dealing with recyclable svc_handlers with - * addresses which are refcountable specifically, we perform a - * couple of extra operations and do so without any locking. - */ -template -class ACE_Refcounted_Recyclable_Handler_Cleanup_Strategy : public ACE_Cleanup_Strategy -{ -public: - /// The method which will do the cleanup of the entry in the container. - virtual int cleanup (CONTAINER &container, KEY *key, VALUE *value); -}; - -////////////////////////////////////////////////////////////////////// - -/** - * @class ACE_Handler_Cleanup_Strategy - * - * @brief Defines a strategy to be followed for cleaning up - * entries which are svc_handlers from a container. - * - * The entry to be cleaned up is removed from the container. - * Here, since we are dealing with svc_handlers specifically, we - * perform a couple of extra operations. @note This cleanup strategy - * should be used in the case when the handler has the caching - * attributes. - */ -template -class ACE_Handler_Cleanup_Strategy : public ACE_Cleanup_Strategy -{ -public: - /// The method which will do the cleanup of the entry in the container. - virtual int cleanup (CONTAINER &container, KEY *key, VALUE *value); -}; - -////////////////////////////////////////////////////////////////////// -#define ACE_Null_Cleanup_Strategy ANCLE - -/** - * @class ACE_Null_Cleanup_Strategy - * - * @brief Defines a do-nothing implementation of the cleanup strategy. - * - * This class simply does nothing at all! Can be used to nullify - * the effect of the Cleanup Strategy. - */ -template -class ACE_Null_Cleanup_Strategy : public ACE_Cleanup_Strategy -{ -public: - /// The dummy cleanup method. - virtual int cleanup (CONTAINER &container, KEY *key, VALUE *value); -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "ace/Cleanup_Strategies_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Cleanup_Strategies_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ - -#include /**/ "ace/post.h" -#endif /* CLEANUP_STRATEGIES_H */ diff --git a/modules/worldengine/deps/acelite/ace/Codecs.cpp b/modules/worldengine/deps/acelite/ace/Codecs.cpp deleted file mode 100644 index eafc05973c..0000000000 --- a/modules/worldengine/deps/acelite/ace/Codecs.cpp +++ /dev/null @@ -1,230 +0,0 @@ -#include "ace/Codecs.h" -#include "ace/Log_Category.h" -#include "ace/OS_Memory.h" -#include "ace/OS_NS_ctype.h" - -namespace -{ - // Just in case ... -#undef alphabet -#undef pad -#undef max_columns - - // Symbols which form the Base64 alphabet (Defined as per RFC 2045) - ACE_Byte const alphabet[] = - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; - - // The padding character used in the encoding - ACE_Byte const pad = '='; - - // Number of columns per line of encoded output (Can have a maximum - // value of 76). - int const max_columns = 72; -} - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -bool ACE_Base64::init_ = false; - -ACE_Byte ACE_Base64::decoder_[256]; - -ACE_Byte ACE_Base64::member_[256]; - -ACE_Byte* -ACE_Base64::encode (const ACE_Byte* input, - const size_t input_len, - size_t* output_len, - bool is_chunked) -{ - if (!ACE_Base64::init_) - ACE_Base64::init(); - - if (!input) - return 0; - - ACE_Byte* result = 0; - - size_t length = ((input_len + 2) / 3) * 4; - size_t num_lines = length / max_columns + 1; - length += num_lines + 1; - ACE_NEW_RETURN (result, ACE_Byte[length], 0); - - int char_count = 0; - int bits = 0; - size_t pos = 0; - int cols = 0; - - for (size_t i = 0; i < input_len; ++i) - { - bits += input[i]; - ++char_count; - - if (char_count == 3) - { - result[pos++] = alphabet[bits >> 18]; - result[pos++] = alphabet[(bits >> 12) & 0x3f]; - result[pos++] = alphabet[(bits >> 6) & 0x3f]; - result[pos++] = alphabet[bits & 0x3f]; - cols += 4; - if (cols == max_columns) { - if (is_chunked) - result[pos++] = '\n'; - cols = 0; - } - bits = 0; - char_count = 0; - } - else - { - bits <<= 8; - } - } - - if (char_count != 0) - { - bits <<= (16 - (8 * char_count)); - result[pos++] = alphabet[bits >> 18]; - result[pos++] = alphabet[(bits >> 12) & 0x3f]; - cols += 2; - if (char_count == 1) - { - result[pos++] = pad; - result[pos++] = pad; - cols += 2; - } - else - { - result[pos++] = alphabet[(bits >> 6) & 0x3f]; - result[pos++] = pad; - cols += 2; - } - } - - if (cols > 0 && is_chunked) - result[pos++] = '\n'; - - result[pos] = 0; - *output_len = pos; - return result; -} - -size_t -ACE_Base64::length (const ACE_Byte* input) -{ - if (!ACE_Base64::init_) - ACE_Base64::init(); - - ACE_Byte* ptr = const_cast (input); - while (*ptr != 0 && - (member_[*(ptr)] == 1 || *ptr == pad - || ACE_OS::ace_isspace (*ptr))) - ++ptr; - size_t len = ptr - input; - len = ((len + 3) / 4) * 3 + 1 ; - return len; -} - -ACE_Byte* -ACE_Base64::decode (const ACE_Byte* input, size_t* output_len) -{ - if (!ACE_Base64::init_) - ACE_Base64::init(); - - if (!input) - return 0; - - size_t result_len = ACE_Base64::length (input); - ACE_Byte* result = 0; - ACE_NEW_RETURN (result, ACE_Byte[result_len], 0); - - ACE_Byte* ptr = const_cast (input); - while (*ptr != 0 && - (member_[*(ptr)] == 1 || *ptr == pad - || ACE_OS::ace_isspace (*ptr))) - ++ptr; - size_t input_len = ptr - input; - - int char_count = 0; - int bits = 0; - size_t pos = 0; - - size_t i = 0; - for (; i < input_len; ++i) - { - if (input[i] == pad) - break; - if (!ACE_Base64::member_[input[i]]) - continue; - bits += decoder_[input[i]]; - ++char_count; - - if (char_count == 4) - { - result[pos++] = static_cast (bits >> 16); - result[pos++] = static_cast ((bits >> 8) & 0xff); - result[pos++] = static_cast (bits & 0xff); - bits = 0; - char_count = 0; - } - else - { - bits <<= 6; - } - } - - int errors = 0; - if ( i == input_len) - { - if (char_count) - { - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("Decoding incomplete: atleast %d bits truncated\n"), - (4 - char_count) * 6)); - ++errors; - } - } - else - { - switch (char_count) - { - case 1: - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("Decoding incomplete: atleast 2 bits missing\n"))); - ++errors; - break; - case 2: - result[pos++] = static_cast (bits >> 10); - break; - case 3: - result[pos++] = static_cast (bits >> 16); - result[pos++] = static_cast ((bits >> 8) & 0xff); - break; - } - } - - if (errors) - { - delete[] result; - return 0; - } - result[pos] = 0; - *output_len = pos; - return result; -} - -void -ACE_Base64::init () -{ - if (!ACE_Base64::init_) - { - for (ACE_Byte i = 0; i < sizeof (alphabet); ++i) - { - ACE_Base64::decoder_[alphabet[i]] = i; - ACE_Base64::member_ [alphabet[i]] = 1; - } - ACE_Base64::init_ = true; - } - return; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Codecs.h b/modules/worldengine/deps/acelite/ace/Codecs.h deleted file mode 100644 index 1f0ee3a9a8..0000000000 --- a/modules/worldengine/deps/acelite/ace/Codecs.h +++ /dev/null @@ -1,117 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Codecs.h - * - * @author Krishnakumar B - * - * Codecs is a generic wrapper for various encoding and decoding - * mechanisms. Currently it includes Base64 content transfer-encoding as - * specified by RFC 2045, Multipurpose Internet Mail Extensions (MIME) Part - * One: Format of Internet Message Bodies. - */ -//============================================================================= - -#ifndef ACE_CODECS_H -#define ACE_CODECS_H - -#include /**/ "ace/pre.h" - -#include /**/ "ace/ACE_export.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Basic_Types.h" -#include "ace/Global_Macros.h" - - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_Base64 - * - * @brief Encode/Decode a stream of bytes according to Base64 encoding. - * - * This class provides methods to encode or decode a stream of bytes - * to/from Base64 encoding. It doesn't convert the input stream to a - * canonical form before encoding. - */ -class ACE_Export ACE_Base64 -{ -public: - - //@{ - - /** - * Encodes a stream of bytes to Base64 data - * - * @param input Binary data in byte stream. - * @param input_len Length of the byte stream. - * @param output_len Length of the encoded Base64 byte stream. - * @param is_chunked If true, terminate 72 character blocks with newline - * @return Encoded Base64 data in byte stream or NULL if input data cannot - * be encoded. - */ - - static ACE_Byte* encode (const ACE_Byte* input, - const size_t input_len, - size_t* output_len, - bool is_chunked = true); - /** - * Decodes a stream of Base64 to bytes data - * - * @param input Encoded Base64 data in byte stream. - * @param output_len Length of the binary byte stream. - * @return Binary data in byte stream or NULL if input data cannot - * be encoded. - */ - static ACE_Byte* decode (const ACE_Byte* input, - size_t* output_len); - - /** - * Return the length of the encoded input data - * - * @param input Encoded Base64 data in byte stream. - * @return Length of the encoded Base64 data. - * - */ - static size_t length (const ACE_Byte* input); - - //@} - -protected: - - // Prevent default construction. - ACE_Base64 (void) {} - -private: - - // Preventing copying and assignment. - ACE_Base64 (ACE_Base64 const &); - ACE_Base64 & operator= (ACE_Base64 const &); - - /// Initialize the tables for encoding/decoding. - static void init (void); - -private: - - /// Alphabet used for decoding i.e decoder_[alphabet_[i = 0..63]] = i - static ACE_Byte decoder_[]; - - /// Alphabet used to check valid range of encoded input i.e - /// member_[alphabet_[0..63]] = 1 - static ACE_Byte member_[]; - - /// Boolean to denote whether initialization is complete - static bool init_; - -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#include /**/ "ace/post.h" - -#endif /* ACE_CODECS_H */ diff --git a/modules/worldengine/deps/acelite/ace/Codeset_IBM1047.cpp b/modules/worldengine/deps/acelite/ace/Codeset_IBM1047.cpp deleted file mode 100644 index ba8d1eb9cd..0000000000 --- a/modules/worldengine/deps/acelite/ace/Codeset_IBM1047.cpp +++ /dev/null @@ -1,302 +0,0 @@ - -//============================================================================= -/** - * @file Codeset_IBM1047.cpp - * - * Defines the arrays required to convert between ISO8859 (aka - * Latin/1) and IBM1047 (aka EBCDIC). - * - * @author Jim Rogers (jrogers@viasoft.com) - */ -//============================================================================= - - -#include "ace/Codeset_IBM1047.h" - -#if defined (ACE_HAS_EBCDIC) - -#include "ace/OS_Memory.h" -#include "ace/OS_NS_string.h" - -namespace -{ - char const to_IBM1047[] = - { - "\x00\x01\x02\x03\x37\x2D\x2E\x2F\x16\x05\x25\x0B\x0C\x0D\x0E\x0F" // 00-0F - "\x10\x11\x12\x13\x3C\x3D\x32\x26\x18\x19\x3F\x27\x22\x1D\x35\x1F" // 10-1F - "\x40\x5A\x7F\x7B\x5B\x6C\x50\x7D\x4D\x5D\x5C\x4E\x6B\x60\x4B\x61" // 20-2F - "\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\x7A\x5E\x4C\x7E\x6E\x6F" // 30-3F - "\x7C\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xD1\xD2\xD3\xD4\xD5\xD6" // 40-4F - "\xD7\xD8\xD9\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xAD\xE0\xBD\x5F\x6D" // 50-5F - "\x79\x81\x82\x83\x84\x85\x86\x87\x88\x89\x91\x92\x93\x94\x95\x96" // 60-6F - "\x97\x98\x99\xA2\xA3\xA4\xA5\xA6\xA7\xA8\xA9\xC0\x4F\xD0\xA1\x07" // 70-7F - "\x43\x20\x21\x1C\x23\xEB\x24\x9B\x71\x28\x38\x49\x90\xBA\xEC\xDF" // 80-8F - "\x45\x29\x2A\x9D\x72\x2B\x8A\x9A\x67\x56\x64\x4A\x53\x68\x59\x46" // 90-9F - "\xEA\xDA\x2C\xDE\x8B\x55\x41\xFE\x58\x51\x52\x48\x69\xDB\x8E\x8D" // A0-AF - "\x73\x74\x75\xFA\x15\xB0\xB1\xB3\xB4\xB5\x6A\xB7\xB8\xB9\xCC\xBC" // B0-BF - "\xAB\x3E\x3B\x0A\xBF\x8F\x3A\x14\xA0\x17\xCB\xCA\x1A\x1B\x9C\x04" // C0-CF - "\x34\xEF\x1E\x06\x08\x09\x77\x70\xBE\xBB\xAC\x54\x63\x65\x66\x62" // D0-DF - "\x30\x42\x47\x57\xEE\x33\xB6\xE1\xCD\xED\x36\x44\xCE\xCF\x31\xAA" // E0-EF - "\xFC\x9E\xAE\x8C\xDD\xDC\x39\xFB\x80\xAF\xFD\x78\x76\xB2\x9F\xFF" // F0-FF -}; - - char const from_IBM1047[] = - { - "\x00\x01\x02\x03\xCF\x09\xD3\x7F\xD4\xD5\xC3\x0B\x0C\x0D\x0E\x0F" // 00-0F - "\x10\x11\x12\x13\xC7\xB4\x08\xC9\x18\x19\xCC\xCD\x83\x1D\xD2\x1F" // 10-1F - "\x81\x82\x1C\x84\x86\x0A\x17\x1B\x89\x91\x92\x95\xA2\x05\x06\x07" // 20-2F - "\x20\xEE\x16\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\xC1\x1A" // 30-3F - "\x20\xA6\xE1\x80\xEB\x90\x9F\xE2\xAB\x8B\x9B\x2E\x3C\x28\x2B\x7C" // 40-4F - "\x26\xA9\xAA\x9C\xDB\xA5\x99\xE3\xA8\x9E\x21\x24\x2A\x29\x3B\x5E" // 50-5F - "\x2D\x2F\xDF\xDC\x9A\xDD\xDE\x98\x9D\xAC\xBA\x2C\x25\x5F\x3E\x3F" // 60-6F - "\xD7\x88\x94\xB0\xB1\xB2\xFC\xD6\xFB\x60\x3A\x23\x40\x27\x3D\x22" // 70-7F - "\xF8\x61\x62\x63\x64\x65\x66\x67\x68\x69\x96\xA4\xF3\xAF\xAE\xC5" // 80-8F - "\x8C\x6A\x6B\x6C\x6D\x6E\x6F\x70\x71\x72\x97\x87\xCE\x93\xF1\xFE" // 90-9F - "\xC8\x7E\x73\x74\x75\x76\x77\x78\x79\x7A\xEF\xC0\xDA\x5B\xF2\xF9" // A0-AF - "\xB5\xB6\xFD\xB7\xB8\xB9\xE6\xBB\xBC\xBD\x8D\xD9\xBF\x5D\xD8\xC4" // B0-BF - "\x7B\x41\x42\x43\x44\x45\x46\x47\x48\x49\xCB\xCA\xBE\xE8\xEC\xED" // C0-CF - "\x7D\x4A\x4B\x4C\x4D\x4E\x4F\x50\x51\x52\xA1\xAD\xF5\xF4\xA3\x8F" // D0-DF - "\x5C\xE7\x53\x54\x55\x56\x57\x58\x59\x5A\xA0\x85\x8E\xE9\xE4\xD1" // E0-EF - "\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\xB3\xF7\xF0\xFA\xA7\xFF" // F0-FF - }; -} - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_IBM1047_ISO8859::ACE_IBM1047_ISO8859 (void) -{ -} - -ACE_IBM1047_ISO8859::~ACE_IBM1047_ISO8859 (void) -{ -} - -ACE_CDR::ULong -ACE_IBM1047_ISO8859::ncs () -{ - return 0x10020417; -} - -ACE_CDR::ULong -ACE_IBM1047_ISO8859::tcs () -{ - return 0x00010001; -} - -ACE_CDR::Boolean -ACE_IBM1047_ISO8859::read_char (ACE_InputCDR &in, - ACE_CDR::Char &x) -{ - if (this->read_1 (in, reinterpret_cast (&x))) - { - x = to_IBM1047[x]; - return 1; - } - return 0; -} - -ACE_CDR::Boolean -ACE_IBM1047_ISO8859::read_string (ACE_InputCDR& in, - ACE_CDR::Char *& x) -{ - ACE_CDR::ULong len; - - in.read_ulong (len); - - if (len > 0) - { - ACE_NEW_RETURN (x, - ACE_CDR::Char[len], - 0); - - if (this->read_char_array (in, x, len)) - return 1; - - delete [] x; - } - - x = 0; - return 0; -} - -ACE_CDR::Boolean -ACE_IBM1047_ISO8859::read_char_array (ACE_InputCDR& in, - ACE_CDR::Char* x, - ACE_CDR::ULong len) -{ - if (this->read_array (in, - x, - ACE_CDR::OCTET_SIZE, - ACE_CDR::OCTET_ALIGN, - len)) - { - for (ACE_CDR::ULong i = 0; i != len; ++i) - x[i] = to_IBM1047[x[i]]; - - return 1; - } - - return 0; -} - -ACE_CDR::Boolean -ACE_IBM1047_ISO8859::write_char (ACE_OutputCDR& out, - ACE_CDR::Char x) -{ - return - this->write_1 (out, - reinterpret_cast (&from_IBM1047[x])); -} - -ACE_CDR::Boolean -ACE_IBM1047_ISO8859::write_string (ACE_OutputCDR& out, - ACE_CDR::ULong len, - const ACE_CDR::Char* x) -{ - if (out.write_ulong (len + 1)) - return this->write_char_array (out, x, len + 1); - return 0; -} - -ACE_CDR::Boolean -ACE_IBM1047_ISO8859::write_char_array (ACE_OutputCDR& out, - const ACE_CDR::Char* x, - ACE_CDR::ULong len) -{ - char *buf = 0; - if (this->adjust (out, len, 1, buf) == 0) - { - ACE_OS::memcpy (buf, x, len); - - for (ACE_CDR::ULong i = 0; i != len; ++i) - buf[i] = from_IBM1047[buf[i]]; - - return 1; - } - - this->good_bit(out, 0); - return 0; -} - -// **************************************************************** - -ACE_ISO8859_IBM1047::ACE_ISO8859_IBM1047 (void) -{ -} - -ACE_ISO8859_IBM1047::~ACE_ISO8859_IBM1047 (void) -{ -} - -ACE_CDR::ULong -ACE_ISO8859_IBM1047::ncs () -{ - return 0x00010001; -} - -ACE_CDR::ULong -ACE_ISO8859_IBM1047::tcs () -{ - return 0x10020417; -} - -ACE_CDR::Boolean -ACE_ISO8859_IBM1047::read_char (ACE_InputCDR& in, - ACE_CDR::Char& x) -{ - if (this->read_1 (in, reinterpret_cast (&x))) - { - x = from_IBM1047[x]; - return 1; - } - return 0; -} - -ACE_CDR::Boolean -ACE_ISO8859_IBM1047::read_string (ACE_InputCDR &in, - ACE_CDR::Char *&x) -{ - ACE_CDR::ULong len; - - in.read_ulong (len); - - if (len > 0) - { - ACE_NEW_RETURN (x, - ACE_CDR::Char[len], - 0); - - if (this->read_char_array (in, x, len)) - return 1; - - delete [] x; - } - - x = 0; - return 0; -} - -ACE_CDR::Boolean -ACE_ISO8859_IBM1047::read_char_array (ACE_InputCDR &in, - ACE_CDR::Char *x, - ACE_CDR::ULong len) -{ - if (this->read_array (in, - x, - ACE_CDR::OCTET_SIZE, - ACE_CDR::OCTET_ALIGN, - len)) - { - for (ACE_CDR::ULong i = 0; i != len; ++i) - x[i] = from_IBM1047[x[i]]; - - return 1; - } - - return 0; -} - -ACE_CDR::Boolean -ACE_ISO8859_IBM1047::write_char (ACE_OutputCDR &out, - ACE_CDR::Char x) -{ - return - this->write_1 (out, - reinterpret_cast (&to_IBM1047[x])); -} - -ACE_CDR::Boolean -ACE_ISO8859_IBM1047::write_string (ACE_OutputCDR& out, - ACE_CDR::ULong len, - const ACE_CDR::Char* x) -{ - if (out.write_ulong (len + 1)) - return this->write_char_array (out, x, len + 1); - else - return 0; -} - -ACE_CDR::Boolean -ACE_ISO8859_IBM1047::write_char_array (ACE_OutputCDR &out, - const ACE_CDR::Char *x, - ACE_CDR::ULong len) -{ - char *buf = 0; - - if (this->adjust (out, len, 1, buf) == 0) - { - ACE_OS::memcpy (buf, x, len); - - for (ACE_CDR::ULong i = 0; i != len; ++i) - buf[i] = to_IBM1047[buf[i]]; - - return 1; - } - - this->good_bit (out, 0); - return 0; -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_HAS_EBCDIC */ diff --git a/modules/worldengine/deps/acelite/ace/Codeset_IBM1047.h b/modules/worldengine/deps/acelite/ace/Codeset_IBM1047.h deleted file mode 100644 index d04b5997b3..0000000000 --- a/modules/worldengine/deps/acelite/ace/Codeset_IBM1047.h +++ /dev/null @@ -1,125 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Codeset_IBM1047.h - * - * Declares the arrays required to convert between ISO8859 (aka - * Latin/1) and IBM1047 (aka EBCDIC). - * - * @author Jim Rogers (jrogers@viasoft.com) - */ -//============================================================================= - - -#ifndef ACE_CODESET_IMB1047_H -#define ACE_CODESET_IMB1047_H -#include /**/ "ace/pre.h" - -#include /**/ "ace/config-all.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#if defined (ACE_HAS_EBCDIC) - -#include "ace/CDR_Stream.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -// **************************************************************** - -/** - * @class ACE_IBM1047_ISO8859 - * - * @brief Codeset translation specialization. - * - * This class performs the codeset translation: - * - Native: IBM_1047 (i.e. EBCDIC) - * - Stream: ISO-8859 (i.e. Latin/1) - */ -class ACE_Export ACE_IBM1047_ISO8859 : public ACE_Char_Codeset_Translator -{ -public: - /// A do nothing constructor. - ACE_IBM1047_ISO8859 (void); - - /// Virtual destruction - virtual ~ACE_IBM1047_ISO8859 (void); - - // = Documented in $ACE_ROOT/ace/CDR_Stream.h - virtual ACE_CDR::Boolean read_char (ACE_InputCDR &, - ACE_CDR::Char &); - virtual ACE_CDR::Boolean read_string (ACE_InputCDR &, - ACE_CDR::Char *&); - virtual ACE_CDR::Boolean read_char_array (ACE_InputCDR &, - ACE_CDR::Char *, - ACE_CDR::ULong); - virtual ACE_CDR::Boolean write_char (ACE_OutputCDR &, - ACE_CDR::Char); - virtual ACE_CDR::Boolean write_string (ACE_OutputCDR &, - ACE_CDR::ULong, - const ACE_CDR::Char *); - virtual ACE_CDR::Boolean write_char_array (ACE_OutputCDR &, - const ACE_CDR::Char *, - ACE_CDR::ULong); - - /// Return the native codeset ID as defined in the OSF code and character - /// set registry, 0x10020417 - virtual ACE_CDR::ULong ncs (); - /// Return the translated codeset ID as defined in the OSF code and character - /// set registry, 0x00010001 - virtual ACE_CDR::ULong tcs (); -}; - -/** - * @class ACE_ISO8859_IBM1047 - * - * @brief Codeset translation specialization. - * - * This class performs the codeset translation: - * - Native: ISO-8859 (i.e. Latin/1) - * - Stream: IBM-1047 (i.e. EBCDIC) - */ -class ACE_Export ACE_ISO8859_IBM1047 : public ACE_Char_Codeset_Translator -{ -public: - /// A do nothing constructor. - ACE_ISO8859_IBM1047 (void); - - /// Virtual destruction - virtual ~ACE_ISO8859_IBM1047 (void); - - // = Documented in $ACE_ROOT/ace/CDR_Stream.h - virtual ACE_CDR::Boolean read_char (ACE_InputCDR &, - ACE_CDR::Char &); - virtual ACE_CDR::Boolean read_string (ACE_InputCDR &, - ACE_CDR::Char *&); - virtual ACE_CDR::Boolean read_char_array (ACE_InputCDR &, - ACE_CDR::Char *, - ACE_CDR::ULong); - virtual ACE_CDR::Boolean write_char (ACE_OutputCDR &, - ACE_CDR::Char); - virtual ACE_CDR::Boolean write_string (ACE_OutputCDR &, - ACE_CDR::ULong, - const ACE_CDR::Char *); - virtual ACE_CDR::Boolean write_char_array (ACE_OutputCDR &, - const ACE_CDR::Char *, - ACE_CDR::ULong); - - /// Return the native codeset ID as defined in the OSF code and character - /// set registry, 0x00010001 - virtual ACE_CDR::ULong ncs (); - /// Return the translated codeset ID as defined in the OSF code and character - /// set registry, 0x10020417 - virtual ACE_CDR::ULong tcs (); -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_EBCDIC */ - -#include /**/ "ace/post.h" - -#endif /* ACE_CODESET_IMB1047_H */ diff --git a/modules/worldengine/deps/acelite/ace/Codeset_Registry.cpp b/modules/worldengine/deps/acelite/ace/Codeset_Registry.cpp deleted file mode 100644 index 3a0610741f..0000000000 --- a/modules/worldengine/deps/acelite/ace/Codeset_Registry.cpp +++ /dev/null @@ -1,102 +0,0 @@ -//============================================================================= -/** - * @file Codeset_Registry.cpp - * - * emulated codset regstry functions - * - * @author Phil Mesnier - */ -//============================================================================= - -#include "ace/Codeset_Registry.h" -#include "ace/OS_Memory.h" -#include "ace/OS_NS_string.h" - -#if !defined (__ACE_INLINE__) -#include "ace/Codeset_Registry.inl" -#endif /* __ACE_INLINE__ */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -int -ACE_Codeset_Registry::locale_to_registry_i (const ACE_CString &locale, - ACE_CDR::ULong &codeset_id, - ACE_CDR::UShort *num_sets, - ACE_CDR::UShort **char_sets) -{ - registry_entry const *element = 0; - for (size_t i = 0; element == 0 && i < num_registry_entries_; i++) - if (ACE_OS::strcmp (registry_db_[i].loc_name_, locale.c_str ()) == 0) - element = ®istry_db_[i]; - if (element == 0) - return 0; - codeset_id = element->codeset_id_; - if (num_sets != 0) - *num_sets = element->num_sets_; - if (char_sets != 0) - { - ACE_NEW_RETURN (*char_sets,ACE_CDR::UShort[element->num_sets_],0); - ACE_OS::memcpy (*char_sets, element->char_sets_, - element->num_sets_ * sizeof (ACE_CDR::UShort)); - } - return 1; -} - -int -ACE_Codeset_Registry::registry_to_locale_i (ACE_CDR::ULong codeset_id, - ACE_CString &locale, - ACE_CDR::UShort *num_sets, - ACE_CDR::UShort **char_sets) -{ - registry_entry const *element = 0; - for (size_t i = 0; element == 0 && i < num_registry_entries_; i++) - if (codeset_id == registry_db_[i].codeset_id_) - element = ®istry_db_[i]; - if (element == 0) - return 0; - locale.set (element->loc_name_); - if (num_sets != 0) - *num_sets = element->num_sets_; - if (char_sets != 0) - { - ACE_NEW_RETURN (*char_sets,ACE_CDR::UShort[element->num_sets_],0); - ACE_OS::memcpy (*char_sets, element->char_sets_, - element->num_sets_ * sizeof (ACE_CDR::UShort)); - } - return 1; -} - -int -ACE_Codeset_Registry::is_compatible_i (ACE_CDR::ULong codeset_id, - ACE_CDR::ULong other) -{ - registry_entry const *lhs = 0; - registry_entry const *rhs = 0; - for (size_t i = 0; (lhs == 0 || rhs == 0) && i < num_registry_entries_; i++) - { - if (codeset_id == registry_db_[i].codeset_id_) - lhs = ®istry_db_[i]; - if (other == registry_db_[i].codeset_id_) - rhs = ®istry_db_[i]; - } - - if (lhs == 0 || rhs == 0) - return 0; - - for (ACE_CDR::UShort l = 0; l < lhs->num_sets_; l++) - for (ACE_CDR::UShort r = 0; r < rhs->num_sets_; r++) - if (rhs->char_sets_[r] == lhs->char_sets_[l]) - return 1; - return 0; -} - -ACE_CDR::Short -ACE_Codeset_Registry::get_max_bytes_i (ACE_CDR::ULong codeset_id) -{ - for (size_t i = 0; i < num_registry_entries_; i++) - if (codeset_id == registry_db_[i].codeset_id_) - return registry_db_[i].max_bytes_; - return 0; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Codeset_Registry.h b/modules/worldengine/deps/acelite/ace/Codeset_Registry.h deleted file mode 100644 index 86599663ff..0000000000 --- a/modules/worldengine/deps/acelite/ace/Codeset_Registry.h +++ /dev/null @@ -1,98 +0,0 @@ -// -*- C++ -*- -//============================================================================= -/** - * @file Codeset_Registry.h - * - * ACE wrapper around access functions for the OSF's DCE codeset registry - * access functions - * - * For environments that intrinsicly support the DCE defined access functions, - * the methods in this class are simply wrappers. On other platforms, emulation - * is provided. The motivation for this class is to support interoperability - * via translators and the CDR streams, primarily in TAO, but this capability - * is not restricted to CORBA. - * - * The emulated functionality supports Open Group RFC #40, currently RFC 40.2, - * www.opengroup.org/tech/rfc/rfc40.2.html - * - * @author Phil Mesnier - */ -//============================================================================= - -#ifndef ACE_CODESET_REGISTRY_H -#define ACE_CODESET_REGISTRY_H - -#include /**/ "ace/pre.h" -#include "ace/SString.h" -#include "ace/CDR_Base.h" -#include "ace/Codeset_Symbols.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -class ACE_Export ACE_Codeset_Registry -{ -public: - - /// Based on a locale string, find the registry value and optional codeset - /// collection. This wraps the dce_cs_loc_to_rgy function, or emulates it. - static int locale_to_registry (const ACE_CString &locale, - ACE_CDR::ULong &codeset_id, - ACE_CDR::UShort * = 0, - ACE_CDR::UShort ** = 0); - - /// Based on a registry value, find the locale string and optional codeset - /// collection. This wraps the dce_cs_rgy_to_loc function, or emulates it. - static int registry_to_locale (ACE_CDR::ULong codeset_id, - ACE_CString &locale, - ACE_CDR::UShort * = 0, - ACE_CDR::UShort ** = 0); - - /// Tell if two codesets are compatible. This wraps the - /// rpc_cs_char_set_compat_check function. - static int is_compatible (ACE_CDR::ULong codeset_id, - ACE_CDR::ULong other); - - /// Return the max number of bytes required to represent a single character. - /// This wraps the rpc_rgy_get_max_bytes function. - static ACE_CDR::Short get_max_bytes (ACE_CDR::ULong codeset_id); - - enum {max_charsets_ = 5}; -protected: - typedef struct { - const char * desc_; - const char * loc_name_; - ACE_CDR::ULong codeset_id_; - ACE_CDR::UShort num_sets_; - ACE_CDR::UShort char_sets_[max_charsets_]; - ACE_CDR::UShort max_bytes_; - } registry_entry; - -private: - static size_t const num_registry_entries_; - static registry_entry const registry_db_[]; - - static int locale_to_registry_i (const ACE_CString &locale, - ACE_CDR::ULong &codeset_id, - ACE_CDR::UShort * = 0, - ACE_CDR::UShort ** = 0); - static int registry_to_locale_i (ACE_CDR::ULong codeset_id, - ACE_CString &locale, - ACE_CDR::UShort * = 0, - ACE_CDR::UShort ** = 0); - static int is_compatible_i (ACE_CDR::ULong codeset_id, - ACE_CDR::ULong other); - static ACE_CDR::Short get_max_bytes_i (ACE_CDR::ULong codeset_id); -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/Codeset_Registry.inl" -#endif /* __ACE_INLINE__ */ - -#include /**/ "ace/post.h" -#endif /* ACE_CODESET_REGISTRY_H */ diff --git a/modules/worldengine/deps/acelite/ace/Codeset_Registry.inl b/modules/worldengine/deps/acelite/ace/Codeset_Registry.inl deleted file mode 100644 index f459d4d83a..0000000000 --- a/modules/worldengine/deps/acelite/ace/Codeset_Registry.inl +++ /dev/null @@ -1,63 +0,0 @@ -// -*- C++ -*- -//============================================================================= -/** - * @file Codeset_Registry.inl - * - * ACE wrapper around access functions for the OSF's DCE codeset registry - * access functions - the inline functions either call the system supplied - * DCE based codeset regsitry function, or calls the emulation - * - * @author Phil Mesnier - */ -//============================================================================= - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_INLINE -int -ACE_Codeset_Registry::locale_to_registry(const ACE_CString &locale, - ACE_CDR::ULong &codeset_id, - ACE_CDR::UShort *num_sets, - ACE_CDR::UShort **char_sets) -{ - return ACE_Codeset_Registry::locale_to_registry_i (locale, - codeset_id, - num_sets, - char_sets); -} - -// based on a registry value, find the locale string and optional codeset -// collection. This wraps the dce_cs_rgy_to_loc function, or emulates it. -ACE_INLINE -int -ACE_Codeset_Registry::registry_to_locale(ACE_CDR::ULong codeset_id, - ACE_CString &locale, - ACE_CDR::UShort *num_sets, - ACE_CDR::UShort **char_sets) -{ - return ACE_Codeset_Registry::registry_to_locale_i (codeset_id, - locale, - num_sets, - char_sets); -} - -// Tell if two codesets are compatible. This wraps the -// rpc_cs_char_set_compat_check function. -ACE_INLINE -int -ACE_Codeset_Registry::is_compatible (ACE_CDR::ULong codeset_id, - ACE_CDR::ULong other) -{ - return ACE_Codeset_Registry::is_compatible_i (codeset_id,other); -} - -// Return the max number of bytes required to represent a single character. -// This wraps the rpc_rgy_get_max_bytes function. -ACE_INLINE -ACE_CDR::Short -ACE_Codeset_Registry::get_max_bytes (ACE_CDR::ULong codeset_id) -{ - return ACE_Codeset_Registry::get_max_bytes_i (codeset_id); -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Codeset_Registry_db.cpp b/modules/worldengine/deps/acelite/ace/Codeset_Registry_db.cpp deleted file mode 100644 index 53b719d87c..0000000000 --- a/modules/worldengine/deps/acelite/ace/Codeset_Registry_db.cpp +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Codeset registry DB, generated Fri Feb 28 21:01:30 2003 - * source: code_set_registry1.2g.txt - * - * To populate the registry_db, construct a codeset registry text file based - * on the OSF's Character and Code Set Registry. See DCE RFC 40.1 for details - * on obtaining the full text for the current registry. Once you have composed - * a text file containing all the desired codeset information, build and run - * mkcsregdb. The source is in $ACE_ROOT/apps/mkcsregdb. It will generate a new - * copy of this file, with the registry_db_ array properly initialized. - */ - -#include "ace/Codeset_Registry.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_Codeset_Registry::registry_entry const -ACE_Codeset_Registry::registry_db_[] = -{ - {"ISO/IEC 10646-1:1993; UCS-2, Level 1","UCS-2",0x00010100,1,{0x1000},2}, - {"ISO 8859-1:1987; Latin Alphabet No. 1","ISO8859_1",0x00010001,1,{0x0011},1}, - {"IBM-1047 (CCSID 01047); Latin-1 Open System","EBCDIC",0x10020417,1,{0x0011},1}, - {"ISO/IEC 10646-1:1993; UCS-4, Level 1","UCS-4",0x00010104,1,{0x1000},4}, - {"ISO/IEC 10646-1:1993; UTF-16, UCS Transformation Format 16-bit form","UTF-16",0x00010109,1,{0x1000},2}, - {"X/Open UTF-8; UCS Transformation Format 8 (UTF-8)","UTF-8",0x05010001,1,{0x1000},6}, - {"ISO/IEC 8859-5:1988; Latin-Cyrillic Alphabet","ISO-8859-5",0x00010005,1,{0x0015},1}, - {"IBM-1251 (CCSID 01251); MS Windows Cyrillic","CP1251",0x100204e3,1,{0x0015},1}, - {"IBM-855 (CCSID 04951); Cyrillic Personal Computer","CP855",0x10021357,1,{0x0015},1} -}; - -size_t const ACE_Codeset_Registry::num_registry_entries_ = 9; - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Codeset_Symbols.h b/modules/worldengine/deps/acelite/ace/Codeset_Symbols.h deleted file mode 100644 index f57935f8c3..0000000000 --- a/modules/worldengine/deps/acelite/ace/Codeset_Symbols.h +++ /dev/null @@ -1,218 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Codeset_Symbols.h - * - * Symbolic names for codeset ids. - * - * @author Dale Wilson (wilson_d@ociweb.com) - */ -//============================================================================= -#ifndef CODESET_SYMBOLS_H -#define CODESET_SYMBOLS_H - -// These numbers are assigned by the OpenGroup, a database is -// available at -// -// ftp://ftp.opengroup.org/pub/code_set_registry/ -// -// Alas, the database is in a semi-regular text file -- difficult to use. -// The following C/C++-friendly version of the codeset ids was captured -// from Version 1.2g of the registry. -// -#define ACE_CODESET_ID_ISO_8859_1 0x00010001U -#define ACE_CODESET_ID_ISO_8859_2 0x00010002U -#define ACE_CODESET_ID_ISO_8859_3 0x00010003U -#define ACE_CODESET_ID_ISO_8859_4 0x00010004U -#define ACE_CODESET_ID_ISO_8859_5 0x00010005U -#define ACE_CODESET_ID_ISO_8859_6 0x00010006U -#define ACE_CODESET_ID_ISO_8859_7 0x00010007U -#define ACE_CODESET_ID_ISO_8859_8 0x00010008U -#define ACE_CODESET_ID_ISO_8859_9 0x00010009U -#define ACE_CODESET_ID_ISO_8859_10 0x0001000AU -#define ACE_CODESET_ID_ISO_8859_15 0x0001000FU -#define ACE_CODESET_ID_ISO_646 0x00010020U -#define ACE_CODESET_ID_ISO_UCS_2_LEVEL_1 0x00010100U -#define ACE_CODESET_ID_ISO_UCS_2_LEVEL_2 0x00010101U -#define ACE_CODESET_ID_ISO_UCS_2_LEVEL_3 0x00010102U -#define ACE_CODESET_ID_ISO_UCS_4_LEVEL_1 0x00010104U -#define ACE_CODESET_ID_ISO_UCS_4_LEVEL_2 0x00010105U -#define ACE_CODESET_ID_ISO_UCS_4_LEVEL_3 0x00010106U -#define ACE_CODESET_ID_ISO_UTF_8 0x00010108U -#define ACE_CODESET_ID_ISO_UTF_16 0x00010109U -#define ACE_CODESET_ID_JIS_X0201 0x00030001U -#define ACE_CODESET_ID_JIS_X0208_1978 0x00030004U -#define ACE_CODESET_ID_JIS_X0208_1983 0x00030005U -#define ACE_CODESET_ID_JIS_X0208_1990 0x00030006U -#define ACE_CODESET_ID_JIS_X0212 0x0003000AU -#define ACE_CODESET_ID_JIS_EUCJP 0x00030010U -#define ACE_CODESET_ID_KS_C5601 0x00040001U -#define ACE_CODESET_ID_KS_C5657 0x00040002U -#define ACE_CODESET_ID_KS_EUCKR 0x0004000AU -#define ACE_CODESET_ID_CNS_11643_1986 0x00050001U -#define ACE_CODESET_ID_CNS_11643_1992 0x00050002U -#define ACE_CODESET_ID_CNS_EUCTW_1991 0x0005000AU -#define ACE_CODESET_ID_CNS_EUCTW_1993 0x00050010U -#define ACE_CODESET_ID_TIS_620_25290X000B0001U -#define ACE_CODESET_ID_TTB_CCDC 0x000D0001U -#define ACE_CODESET_ID_OSF_JAPANESE_UJIS 0x05000010U -#define ACE_CODESET_ID_OSF_JAPANESE_SJIS_1 0x05000011U -#define ACE_CODESET_ID_OSF_JAPANESE_SJIS_2 0x05000012U -#define ACE_CODESET_ID_XOPEN_UTF_8 0x05010001U -#define ACE_CODESET_ID_JVC_EUCJP 0x05020001U -#define ACE_CODESET_ID_JVC_SJIS 0x05020002U -#define ACE_CODESET_ID_DEC_KANJI 0x10000001U -#define ACE_CODESET_ID_SUPER_DEC_KANJI 0x10000002U -#define ACE_CODESET_ID_DEC_SHIFT_JIS 0x10000003U -#define ACE_CODESET_ID_HP_ROMAN8 0x10010001U -#define ACE_CODESET_ID_HP_KANA8 0x10010002U -#define ACE_CODESET_ID_HP_ARABIC8 0x10010003U -#define ACE_CODESET_ID_HP_GREEK8 0x10010004U -#define ACE_CODESET_ID_HP_HEBREW8 0x10010005U -#define ACE_CODESET_ID_HP_TURKISH8 0x10010006U -#define ACE_CODESET_ID_HP15CN 0x10010007U -#define ACE_CODESET_ID_HP_BIG5 0x10010008U -#define ACE_CODESET_ID_HP_JAPANESE15__SJIS_ 0x10010009U -#define ACE_CODESET_ID_HP_SJISHI 0x1001000AU -#define ACE_CODESET_ID_HP_SJISPC 0x1001000BU -#define ACE_CODESET_ID_HP_UJIS 0x1001000CU -#define ACE_CODESET_ID_IBM_037 0x10020025U -#define ACE_CODESET_ID_IBM_273 0x10020111U -#define ACE_CODESET_ID_IBM_277 0x10020115U -#define ACE_CODESET_ID_IBM_278 0x10020116U -#define ACE_CODESET_ID_IBM_280 0x10020118U -#define ACE_CODESET_ID_IBM_282 0x1002011AU -#define ACE_CODESET_ID_IBM_284 0x1002011CU -#define ACE_CODESET_ID_IBM_285 0x1002011DU -#define ACE_CODESET_ID_IBM_290 0x10020122U -#define ACE_CODESET_ID_IBM_297 0x10020129U -#define ACE_CODESET_ID_IBM_300 0x1002012CU -#define ACE_CODESET_ID_IBM_301 0x1002012DU -#define ACE_CODESET_ID_IBM_420 0x100201A4U -#define ACE_CODESET_ID_IBM_424 0x100201A8U -#define ACE_CODESET_ID_IBM_437 0x100201B5U -#define ACE_CODESET_ID_IBM_500 0x100201F4U -#define ACE_CODESET_ID_IBM_833 0x10020341U -#define ACE_CODESET_ID_IBM_834 0x10020342U -#define ACE_CODESET_ID_IBM_835 0x10020343U -#define ACE_CODESET_ID_IBM_836 0x10020344U -#define ACE_CODESET_ID_IBM_837 0x10020345U -#define ACE_CODESET_ID_IBM_838 0x10020346U -#define ACE_CODESET_ID_IBM_839 0x10020347U -#define ACE_CODESET_ID_IBM_850 0x10020352U -#define ACE_CODESET_ID_IBM_852 0x10020354U -#define ACE_CODESET_ID_IBM_855 0x10020357U -#define ACE_CODESET_ID_IBM_856 0x10020358U -#define ACE_CODESET_ID_IBM_857 0x10020359U -#define ACE_CODESET_ID_IBM_861 0x1002035DU -#define ACE_CODESET_ID_IBM_862 0x1002035EU -#define ACE_CODESET_ID_IBM_863 0x1002035FU -#define ACE_CODESET_ID_IBM_864 0x10020360U -#define ACE_CODESET_ID_IBM_866 0x10020362U -#define ACE_CODESET_ID_IBM_868 0x10020364U -#define ACE_CODESET_ID_IBM_869 0x10020365U -#define ACE_CODESET_ID_IBM_870 0x10020366U -#define ACE_CODESET_ID_IBM_871 0x10020367U -#define ACE_CODESET_ID_IBM_874 0x1002036AU -#define ACE_CODESET_ID_IBM_875 0x1002036BU -#define ACE_CODESET_ID_IBM_880 0x10020370U -#define ACE_CODESET_ID_IBM_891 0x1002037BU -#define ACE_CODESET_ID_IBM_896 0x10020380U -#define ACE_CODESET_ID_IBM_897 0x10020381U -#define ACE_CODESET_ID_IBM_903 0x10020387U -#define ACE_CODESET_ID_IBM_904 0x10020388U -#define ACE_CODESET_ID_IBM_918 0x10020396U -#define ACE_CODESET_ID_IBM_921 0x10020399U -#define ACE_CODESET_ID_IBM_922 0x1002039AU -#define ACE_CODESET_ID_IBM_926 0x1002039EU -#define ACE_CODESET_ID_IBM_927 0x1002039FU -#define ACE_CODESET_ID_IBM_928 0x100203A0U -#define ACE_CODESET_ID_IBM_929 0x100203A1U -#define ACE_CODESET_ID_IBM_930 0x100203A2U -#define ACE_CODESET_ID_IBM_932 0x100203A4U -#define ACE_CODESET_ID_IBM_933 0x100203A5U -#define ACE_CODESET_ID_IBM_934 0x100203A6U -#define ACE_CODESET_ID_IBM_935 0x100203A7U -#define ACE_CODESET_ID_IBM_936 0x100203A8U -#define ACE_CODESET_ID_IBM_937 0x100203A9U -#define ACE_CODESET_ID_IBM_938 0x100203AAU -#define ACE_CODESET_ID_IBM_939 0x100203ABU -#define ACE_CODESET_ID_IBM_941 0x100203ADU -#define ACE_CODESET_ID_IBM_942 0x100203AEU -#define ACE_CODESET_ID_IBM_943 0x100203AFU -#define ACE_CODESET_ID_IBM_946 0x100203B2U -#define ACE_CODESET_ID_IBM_947 0x100203B3U -#define ACE_CODESET_ID_IBM_948 0x100203B4U -#define ACE_CODESET_ID_IBM_949 0x100203B5U -#define ACE_CODESET_ID_IBM_950 0x100203B6U -#define ACE_CODESET_ID_IBM_951 0x100203B7U -#define ACE_CODESET_ID_IBM_955 0x100203BBU -#define ACE_CODESET_ID_IBM_964 0x100203C4U -#define ACE_CODESET_ID_IBM_970 0x100203CAU -#define ACE_CODESET_ID_IBM_1006 0x100203EEU -#define ACE_CODESET_ID_IBM_1025 0x10020401U -#define ACE_CODESET_ID_IBM_1026 0x10020402U -#define ACE_CODESET_ID_IBM_1027 0x10020403U -#define ACE_CODESET_ID_IBM_1040 0x10020410U -#define ACE_CODESET_ID_IBM_1041 0x10020411U -#define ACE_CODESET_ID_IBM_1043 0x10020413U -#define ACE_CODESET_ID_IBM_1046 0x10020416U -#define ACE_CODESET_ID_IBM_1047 0x10020417U -#define ACE_CODESET_ID_IBM_1088 0x10020440U -#define ACE_CODESET_ID_IBM_1097 0x10020449U -#define ACE_CODESET_ID_IBM_1098 0x1002044AU -#define ACE_CODESET_ID_IBM_1112 0x10020458U -#define ACE_CODESET_ID_IBM_1114 0x1002045AU -#define ACE_CODESET_ID_IBM_1115 0x1002045BU -#define ACE_CODESET_ID_IBM_1122 0x10020462U -#define ACE_CODESET_ID_IBM_1250 0x100204E2U -#define ACE_CODESET_ID_IBM_1251 0x100204E3U -#define ACE_CODESET_ID_IBM_1252 0x100204E4U -#define ACE_CODESET_ID_IBM_1253 0x100204E5U -#define ACE_CODESET_ID_IBM_1254 0x100204E6U -#define ACE_CODESET_ID_IBM_1255 0x100204E7U -#define ACE_CODESET_ID_IBM_1256 0x100204E8U -#define ACE_CODESET_ID_IBM_1257 0x100204E9U -#define ACE_CODESET_ID_IBM_1380 0x10020564U -#define ACE_CODESET_ID_IBM_1381 0x10020565U -#define ACE_CODESET_ID_IBM_1383 0x10020567U -#define ACE_CODESET_ID_IBM_4396 0x1002112CU -#define ACE_CODESET_ID_IBM_4946 0x10021352U -#define ACE_CODESET_ID_IBM_4948 0x10021354U -#define ACE_CODESET_ID_IBM_4951 0x10021357U -#define ACE_CODESET_ID_IBM_4952 0x10021358U -#define ACE_CODESET_ID_IBM_4953 0x10021359U -#define ACE_CODESET_ID_IBM_4960 0x10021360U -#define ACE_CODESET_ID_IBM_4964 0x10021364U -#define ACE_CODESET_ID_IBM_4965 0x10021365U -#define ACE_CODESET_ID_IBM_5026 0x100213A2U -#define ACE_CODESET_ID_IBM_5031 0x100213A7U -#define ACE_CODESET_ID_IBM_5035 0x100213ABU -#define ACE_CODESET_ID_IBM_5048 0x100213B8U -#define ACE_CODESET_ID_IBM_5049 0x100213B9U -#define ACE_CODESET_ID_IBM_5067 0x100213CBU -#define ACE_CODESET_ID_IBM_8612 0x100221A4U -#define ACE_CODESET_ID_IBM_9025 0x10022341U -#define ACE_CODESET_ID_IBM_9026 0x10022342U -#define ACE_CODESET_ID_IBM_9030 0x10022346U -#define ACE_CODESET_ID_IBM_9056 0x10022360U -#define ACE_CODESET_ID_IBM_9066 0x1002236AU -#define ACE_CODESET_ID_IBM_9125 0x100223A5U -#define ACE_CODESET_ID_IBM_25426 0x10026352U -#define ACE_CODESET_ID_IBM_25432 0x10026358U -#define ACE_CODESET_ID_IBM_1042 0x10026412U -#define ACE_CODESET_ID_IBM_28709 0x10027025U -#define ACE_CODESET_ID_IBM_33624 0x10028358U -#define ACE_CODESET_ID_IBM_33722 0x100283BAU -#define ACE_CODESET_ID_HTCSJIS 0x10030001U -#define ACE_CODESET_ID_HTCUJIS 0x10030002U -#define ACE_CODESET_ID_FUJITSU_U90 0x10040001U -#define ACE_CODESET_ID_FUJITSU_S90 0x10040002U -#define ACE_CODESET_ID_FUJITSU_R90 0x10040003U -#define ACE_CODESET_ID_EBCDIC_ASCII_AND_JEF 0x10040004U -#define ACE_CODESET_ID_EBCDIC_KATAKANA_AND_JEF 0x10040005U -#define ACE_CODESET_ID_EBCDIC_JAPANESE_ENGLISH_AND_JEF 0x10040006U - -#define ACE_CODESET_ID_TAO_BACKWARD_COMPATIBLE 0xf54414F0U -#endif // CODESET_SYMBOLS_H diff --git a/modules/worldengine/deps/acelite/ace/Compression/ACE_Compression.mpc b/modules/worldengine/deps/acelite/ace/Compression/ACE_Compression.mpc deleted file mode 100644 index e9bd69aecd..0000000000 --- a/modules/worldengine/deps/acelite/ace/Compression/ACE_Compression.mpc +++ /dev/null @@ -1,24 +0,0 @@ -// -*- MPC -*- -project(ACE_Compression) : acelib, install, ace_output { - sharedname = * - dynamicflags += ACE_COMPRESSION_BUILD_DLL - - //prebuild = perl $(ACE_ROOT)/bin/generate_export_file.pl ACE_Compression > ACE_Compression_export.h - - Source_Files { - Compressor.cpp - } - - Header_Files { - Compressor.h - ACE_Compression_export.h - } - - Inline_Files { - Compressor.inl - } - - specific { - install_dir = ace/Compression - } -} diff --git a/modules/worldengine/deps/acelite/ace/Compression/ACE_Compression_export.h b/modules/worldengine/deps/acelite/ace/Compression/ACE_Compression_export.h deleted file mode 100644 index 2b07d8e279..0000000000 --- a/modules/worldengine/deps/acelite/ace/Compression/ACE_Compression_export.h +++ /dev/null @@ -1,57 +0,0 @@ - -// -*- C++ -*- -// Definition for Win32 Export directives. -// This file is generated automatically by generate_export_file.pl ACE_Compression -// ------------------------------ -#ifndef ACE_COMPRESSION_EXPORT_H -#define ACE_COMPRESSION_EXPORT_H - -#include "ace/config-all.h" - -#if defined (ACE_AS_STATIC_LIBS) && !defined (ACE_COMPRESSION_HAS_DLL) -# define ACE_COMPRESSION_HAS_DLL 0 -#endif /* ACE_AS_STATIC_LIBS && ACE_COMPRESSION_HAS_DLL */ - -#if !defined (ACE_COMPRESSION_HAS_DLL) -# define ACE_COMPRESSION_HAS_DLL 1 -#endif /* ! ACE_COMPRESSION_HAS_DLL */ - -#if defined (ACE_COMPRESSION_HAS_DLL) && (ACE_COMPRESSION_HAS_DLL == 1) -# if defined (ACE_COMPRESSION_BUILD_DLL) -# define ACE_Compression_Export ACE_Proper_Export_Flag -# define ACE_COMPRESSION_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) -# define ACE_COMPRESSION_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# else /* ACE_COMPRESSION_BUILD_DLL */ -# define ACE_Compression_Export ACE_Proper_Import_Flag -# define ACE_COMPRESSION_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) -# define ACE_COMPRESSION_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# endif /* ACE_COMPRESSION_BUILD_DLL */ -#else /* ACE_COMPRESSION_HAS_DLL == 1 */ -# define ACE_Compression_Export -# define ACE_COMPRESSION_SINGLETON_DECLARATION(T) -# define ACE_COMPRESSION_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -#endif /* ACE_COMPRESSION_HAS_DLL == 1 */ - -// Set ACE_COMPRESSION_NTRACE = 0 to turn on library specific tracing even if -// tracing is turned off for ACE. -#if !defined (ACE_COMPRESSION_NTRACE) -# if (ACE_NTRACE == 1) -# define ACE_COMPRESSION_NTRACE 1 -# else /* (ACE_NTRACE == 1) */ -# define ACE_COMPRESSION_NTRACE 0 -# endif /* (ACE_NTRACE == 1) */ -#endif /* !ACE_COMPRESSION_NTRACE */ - -#if (ACE_COMPRESSION_NTRACE == 1) -# define ACE_COMPRESSION_TRACE(X) -#else /* (ACE_COMPRESSION_NTRACE == 1) */ -# if !defined (ACE_HAS_TRACE) -# define ACE_HAS_TRACE -# endif /* ACE_HAS_TRACE */ -# define ACE_COMPRESSION_TRACE(X) ACE_TRACE_IMPL(X) -# include "ace/Trace.h" -#endif /* (ACE_COMPRESSION_NTRACE == 1) */ - -#endif /* ACE_COMPRESSION_EXPORT_H */ - -// End of auto generated file. diff --git a/modules/worldengine/deps/acelite/ace/Compression/Compressor.cpp b/modules/worldengine/deps/acelite/ace/Compression/Compressor.cpp deleted file mode 100644 index 191bc839a4..0000000000 --- a/modules/worldengine/deps/acelite/ace/Compression/Compressor.cpp +++ /dev/null @@ -1,61 +0,0 @@ -#include "Compressor.h" - -#if !defined (__ACE_INLINE__) -#include "Compressor.inl" -#endif /* __ACE_INLINE__ */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_Compressor::ACE_Compressor( ACE_CompressorId compressor_id, - ACE_UINT32 compression_level ) - : compressor_id_ (compressor_id) - , compression_level_ (compression_level) - , compressed_bytes_ (0) - , uncompressed_bytes_ (0) -{} - -ACE_Compressor::~ACE_Compressor () -{ -} - -ACE_UINT64 -ACE_Compressor::compressed_bytes(void) const -{ - ACE_GUARD_RETURN( ACE_SYNCH_MUTEX, ace_mon, this->mutex_, 0 ); - return this->compressed_bytes_; -} - -ACE_UINT64 -ACE_Compressor::uncompressed_bytes(void) const -{ - ACE_GUARD_RETURN( ACE_SYNCH_MUTEX, ace_mon, this->mutex_, 0 ); - return this->uncompressed_bytes_; -} - -void -ACE_Compressor::reset_stats(void) -{ - ACE_GUARD( ACE_SYNCH_MUTEX, ace_mon, this->mutex_ ); - this->compressed_bytes_ = 0; - this->uncompressed_bytes_ = 0; -} - -void -ACE_Compressor::update_stats(ACE_UINT64 uncompressed_bytes, ACE_UINT64 compressed_bytes) -{ - ACE_GUARD( ACE_SYNCH_MUTEX, ace_mon, this->mutex_ ); - this->compressed_bytes_ += compressed_bytes; - this->uncompressed_bytes_ += uncompressed_bytes; -} - -float -ACE_Compressor::compression_ratio(void) const -{ - ACE_GUARD_RETURN( ACE_SYNCH_MUTEX, ace_mon, this->mutex_, 0.0f ); - if (this->uncompressed_bytes_ > 0) { - return static_cast(this->compressed_bytes_) / this->uncompressed_bytes_; - } - return 0.0f; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Compression/Compressor.h b/modules/worldengine/deps/acelite/ace/Compression/Compressor.h deleted file mode 100644 index 315104bbde..0000000000 --- a/modules/worldengine/deps/acelite/ace/Compression/Compressor.h +++ /dev/null @@ -1,138 +0,0 @@ -// -*- C++ -*- -//============================================================================= -/** - * @file Compressor.h - * - * @author ACE version by - * @author Derek Dominish - */ -//============================================================================= - -#ifndef ACE_COMPRESSOR_H -#define ACE_COMPRESSOR_H - -#include /**/ "ace/pre.h" - -#include /**/ "ACE_Compression_export.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Guard_T.h" -#include "ace/Thread_Mutex.h" -#include "ace/Synch_Traits.h" -#include "ace/Copy_Disabled.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * CompressorId from OMG Compression::CompressorId - * see $(TAO_ROOT)/tao/Compression.pidl - */ -enum ACE_CompressorId -{ - ACE_COMPRESSORID_NONE = 0, - ACE_COMPRESSORID_GZIP = 1, - ACE_COMPRESSORID_PKZIP = 2, - ACE_COMPRESSORID_BZIP2 = 3, - ACE_COMPRESSORID_ZLIB = 4, - ACE_COMPRESSORID_LZMA = 5, - ACE_COMPRESSORID_LZO = 6, - ACE_COMPRESSORID_RZIP = 7, - ACE_COMPRESSORID_7X = 8, - ACE_COMPRESSORID_XAR = 9, - ACE_COMPRESSORID_RLE = 10 -}; - -class ACE_Compression_Export ACE_Compressor -{ -public: - - ACE_CompressorId get_compressor_id(void) const; - - ACE_UINT32 get_compression_level(void) const; - - /** - * Compress the @a in_ptr buffer for @a in_len into the - * @a dest_ptr buffer with a maximum @a max_out_len. If the - * @a max_out_len is exhausted through the compress process - * then a value of -1 will be returned from the function, - * otherwise the return value will indicate the resultant - * @a out_ptr compressed buffer length. - * - * NOTE: it is advisable that the @max_out_len be slightly - * larger of the input @a in_len (i.e. x 1.1F) to cater - * for the possibility that a reduced compressed length - * is not possible. - */ - virtual ACE_UINT64 compress( const void *in_ptr, - ACE_UINT64 in_len, - void *out_ptr, - ACE_UINT64 max_out_len ) = 0; - - /** - * DeCompress the @a in_ptr buffer for @a in_len into the - * @a out_ptr buffer with a maximum @a max_out_len. If the - * @a max_out_len is exhausted during decompression - * then a value of -1 will be returned from the function, - * otherwise the return value will indicate the resultant - * @a out_ptr decompressed buffer length. - */ - virtual ACE_UINT64 decompress( const void *in_ptr, - ACE_UINT64 in_len, - void *out_ptr, - ACE_UINT64 max_out_len ) = 0; - - /** - * Return the current compressed bytes statistics counter. - */ - virtual ACE_UINT64 compressed_bytes(void) const; - - /** - * Return the current uncompressed bytes statistics counter. - */ - virtual ACE_UINT64 uncompressed_bytes(void) const; - - /** - * Return the current compression ratio statistics. - */ - virtual float compression_ratio(void) const; - - /** - * Reset the statistics to zero. - */ - virtual void reset_stats(void); - - virtual ~ACE_Compressor (void); - -protected: - ACE_Compressor(ACE_CompressorId compressor_id, - ACE_UINT32 compression_level = 0); // Must be inherited. - - virtual void update_stats( ACE_UINT64 uncompressed_bytes, - ACE_UINT64 compressed_bytes ); - -private: - ACE_CompressorId compressor_id_; - ACE_UINT32 compression_level_; - - // Ensure we can lock with imutability (i.e. const) - mutable ACE_SYNCH_MUTEX mutex_; - - ACE_UINT64 compressed_bytes_; - ACE_UINT64 uncompressed_bytes_; - - ACE_UNIMPLEMENTED_FUNC (ACE_Compressor (const ACE_Compressor&)) - ACE_UNIMPLEMENTED_FUNC (ACE_Compressor& operator= (const ACE_Compressor&)) -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "Compressor.inl" -#endif /* __ACE_INLINE__ */ - -#include /**/ "ace/post.h" - -#endif // ACE_COMPRESSOR_H diff --git a/modules/worldengine/deps/acelite/ace/Compression/Compressor.inl b/modules/worldengine/deps/acelite/ace/Compression/Compressor.inl deleted file mode 100644 index 5f9a10af74..0000000000 --- a/modules/worldengine/deps/acelite/ace/Compression/Compressor.inl +++ /dev/null @@ -1,16 +0,0 @@ -// -*- C++ -*- -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_INLINE ACE_CompressorId -ACE_Compressor::get_compressor_id(void) const -{ - return this->compressor_id_; -} - -ACE_INLINE ACE_UINT32 -ACE_Compressor::get_compression_level(void) const -{ - return this->compression_level_; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Compression/rle/ACE_RLECompression.mpc b/modules/worldengine/deps/acelite/ace/Compression/rle/ACE_RLECompression.mpc deleted file mode 100644 index 40c3bc0d91..0000000000 --- a/modules/worldengine/deps/acelite/ace/Compression/rle/ACE_RLECompression.mpc +++ /dev/null @@ -1,18 +0,0 @@ -// -*- MPC -*- -project(ACE_RLECompression) : ace_compressionlib, install, ace_output { - sharedname = * - dynamicflags += ACE_RLECOMPRESSION_BUILD_DLL - - Source_Files { - RLECompressor.cpp - } - - Header_Files { - RLECompressor.h - ACE_RLECompression_export.h - } - - specific { - install_dir = ace/Compression/rle - } -} diff --git a/modules/worldengine/deps/acelite/ace/Compression/rle/ACE_RLECompression_export.h b/modules/worldengine/deps/acelite/ace/Compression/rle/ACE_RLECompression_export.h deleted file mode 100644 index 7850212d69..0000000000 --- a/modules/worldengine/deps/acelite/ace/Compression/rle/ACE_RLECompression_export.h +++ /dev/null @@ -1,56 +0,0 @@ -// -*- C++ -*- -// Definition for Win32 Export directives. -// This file is generated automatically by generate_export_file.pl ACE_RLECompression -// ------------------------------ -#ifndef ACE_RLECOMPRESSION_EXPORT_H -#define ACE_RLECOMPRESSION_EXPORT_H - -#include "ace/config-all.h" - -#if defined (ACE_AS_STATIC_LIBS) && !defined (ACE_RLECOMPRESSION_HAS_DLL) -# define ACE_RLECOMPRESSION_HAS_DLL 0 -#endif /* ACE_AS_STATIC_LIBS && ACE_RLECOMPRESSION_HAS_DLL */ - -#if !defined (ACE_RLECOMPRESSION_HAS_DLL) -# define ACE_RLECOMPRESSION_HAS_DLL 1 -#endif /* ! ACE_RLECOMPRESSION_HAS_DLL */ - -#if defined (ACE_RLECOMPRESSION_HAS_DLL) && (ACE_RLECOMPRESSION_HAS_DLL == 1) -# if defined (ACE_RLECOMPRESSION_BUILD_DLL) -# define ACE_RLECompression_Export ACE_Proper_Export_Flag -# define ACE_RLECOMPRESSION_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) -# define ACE_RLECOMPRESSION_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# else /* ACE_RLECOMPRESSION_BUILD_DLL */ -# define ACE_RLECompression_Export ACE_Proper_Import_Flag -# define ACE_RLECOMPRESSION_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) -# define ACE_RLECOMPRESSION_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# endif /* ACE_RLECOMPRESSION_BUILD_DLL */ -#else /* ACE_RLECOMPRESSION_HAS_DLL == 1 */ -# define ACE_RLECompression_Export -# define ACE_RLECOMPRESSION_SINGLETON_DECLARATION(T) -# define ACE_RLECOMPRESSION_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -#endif /* ACE_RLECOMPRESSION_HAS_DLL == 1 */ - -// Set ACE_RLECOMPRESSION_NTRACE = 0 to turn on library specific tracing even if -// tracing is turned off for ACE. -#if !defined (ACE_RLECOMPRESSION_NTRACE) -# if (ACE_NTRACE == 1) -# define ACE_RLECOMPRESSION_NTRACE 1 -# else /* (ACE_NTRACE == 1) */ -# define ACE_RLECOMPRESSION_NTRACE 0 -# endif /* (ACE_NTRACE == 1) */ -#endif /* !ACE_RLECOMPRESSION_NTRACE */ - -#if (ACE_RLECOMPRESSION_NTRACE == 1) -# define ACE_RLECOMPRESSION_TRACE(X) -#else /* (ACE_RLECOMPRESSION_NTRACE == 1) */ -# if !defined (ACE_HAS_TRACE) -# define ACE_HAS_TRACE -# endif /* ACE_HAS_TRACE */ -# define ACE_RLECOMPRESSION_TRACE(X) ACE_TRACE_IMPL(X) -# include "ace/Trace.h" -#endif /* (ACE_RLECOMPRESSION_NTRACE == 1) */ - -#endif /* ACE_RLECOMPRESSION_EXPORT_H */ - -// End of auto generated file. diff --git a/modules/worldengine/deps/acelite/ace/Compression/rle/RLECompressor.cpp b/modules/worldengine/deps/acelite/ace/Compression/rle/RLECompressor.cpp deleted file mode 100644 index f027b5667c..0000000000 --- a/modules/worldengine/deps/acelite/ace/Compression/rle/RLECompressor.cpp +++ /dev/null @@ -1,145 +0,0 @@ -#include "RLECompressor.h" -#include "ace/OS_NS_string.h" - -#if defined (__BORLANDC__) && (__BORLANDC__ >= 0x660) && (__BORLANDC__ <= 0x680) -# pragma option push -w-8072 -#endif - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_RLECompressor::ACE_RLECompressor(void) - : ACE_Compressor(ACE_COMPRESSORID_RLE) -{ -} - -ACE_RLECompressor::~ACE_RLECompressor(void) -{ -} - -// Compress using Run Length Encoding (RLE) -ACE_UINT64 -ACE_RLECompressor::compress( const void *in_ptr, - ACE_UINT64 in_len, - void *out_ptr, - ACE_UINT64 max_out_len ) -{ - const ACE_Byte *in_p = static_cast(in_ptr); - ACE_Byte *out_p = static_cast(out_ptr); - - ACE_UINT64 src_len = in_len; // Save for stats - ACE_UINT64 out_index = 0; - ACE_UINT64 out_base = 0; - size_t run_count = 0; - bool run_code = false; - - if (in_p && out_p && in_len) { - - while (in_len-- > 0) { - - ACE_Byte cur_byte = *in_p++; - - switch (out_index ? run_count : 128U) { // BootStrap to 128 - - case 128: - - if ((out_base = out_index++) >= max_out_len) { - return ACE_UINT64(-1); // Output Exhausted - } - run_code = false; - run_count = 0; // Switch off compressing - - // Fall Through - - default: - - // Fix problem where input exhaused but maybe compressing - if (in_len ? cur_byte == *in_p : run_code) { - - if (run_code) { // In Compression? - out_p[out_base] = ACE_Byte(run_count++ | 0x80); - continue; // Stay in Compression - } else if (run_count) { // Xfering to Compression - if ((out_base = out_index++) >= max_out_len) { - return ACE_UINT64(-1); // Output Exhausted - } - run_count = 0; - } - run_code = true; // We Are Now Compressing - - } else if (run_code) { // Are we in Compression? - // Finalise the Compression Run Length - out_p[out_base] = ACE_Byte(run_count | 0x80); - // Reset for Uncmpressed - if (in_len && (out_base = out_index++) >= max_out_len) { - return ACE_UINT64(-1); // Output Exhausted - } - run_code = false; - run_count = 0; - continue; // Now restart Uncompressed - } - - break; - } - - out_p[out_base] = ACE_Byte(run_count++ | (run_code ? 0x80 : 0)); - - if (out_index >= max_out_len) { - return ACE_UINT64(-1); // Output Exhausted - } - out_p[out_index++] = cur_byte; - } - this->update_stats(src_len, out_index); - } - - return out_index; // return as our output length -} - -// Decompress using Run Length Encoding (RLE) -ACE_UINT64 -ACE_RLECompressor::decompress( const void *in_ptr, - ACE_UINT64 in_len, - void *out_ptr, - ACE_UINT64 max_out_len ) -{ - ACE_UINT64 out_len = 0; - - const ACE_Byte *in_p = static_cast(in_ptr); - ACE_Byte *out_p = static_cast(out_ptr); - - if (in_p && out_p) while(in_len-- > 0) { - - ACE_Byte cur_byte = *in_p++; - ACE_UINT32 cpy_len = ACE_UINT32((cur_byte & ACE_CHAR_MAX) + 1); - - if (cpy_len > max_out_len) { - return ACE_UINT64(-1); // Output Exhausted - } else if ((cur_byte & 0x80) != 0) { // compressed - if (in_len-- > 0) { - ACE_OS::memset(out_p, *in_p++, cpy_len); - } else { - return ACE_UINT64(-1); // Output Exhausted - } - } else if (in_len >= cpy_len) { - ACE_OS::memcpy(out_p, in_p, cpy_len); - in_p += cpy_len; - in_len -= cpy_len; - } else { - return ACE_UINT64(-1); // Output Exhausted - } - - out_p += cpy_len; - max_out_len -= cpy_len; - out_len += cpy_len; - } - - return out_len; -} - -ACE_SINGLETON_TEMPLATE_INSTANTIATE(ACE_Singleton, ACE_RLECompressor, ACE_SYNCH_MUTEX); - -// Close versioned namespace, if enabled by the user. -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__BORLANDC__) && (__BORLANDC__ >= 0x660) && (__BORLANDC__ <= 0x680) -# pragma option pop -#endif diff --git a/modules/worldengine/deps/acelite/ace/Compression/rle/RLECompressor.h b/modules/worldengine/deps/acelite/ace/Compression/rle/RLECompressor.h deleted file mode 100644 index 8164015539..0000000000 --- a/modules/worldengine/deps/acelite/ace/Compression/rle/RLECompressor.h +++ /dev/null @@ -1,106 +0,0 @@ -// -*- C++ -*- -//============================================================================= -/** - * @file RLECompressor.h - * - * @author TAO version by - * @author Derek Dominish - * @author ACE version by - * @author Derek Dominish - * - * Run-length encoding (RLE) is a very simple form of data compression - * in which runs of data (that is, sequences in which the same data value - * occurs in many consecutive data elements) are stored as a single data - * value and count, rather than as the original run. This is most useful - * on data that contains many such runs: for example, simple graphic - * images such as icons, line drawings, and animations. It is not useful - * with files that don't have many runs as it could slightly increase the - * output size. - * ALGORITHM: This algorithm is an optimized version of the traditional - * RLE algorithm in that it behaves better with very few runs. - * - * With a run of a character where that run is >= 3 this is - * replaced with the repeat indicator 0X80 and then the repeat count OR'd - * over this ident. This repeat count is therefore has a maximum value - * of 127 (0x7F) which is to be interpreted as the next character repeated - * another 'repeat count' times (i.e. a maximum of 128 characters can be - * represented in any single dupal). if the repeat ident is not present - * then the count is to be interpreted as a copy of the next repeat count - * characters + 1. - * - * EXAMPLE: the following arbitary string of 67 bytes:- - * WWWWWWWWWWWWBWWWWWWWWWWWWBBBWWWWWWWWWWWWWWWWWWWWWWWWBWWWWWWWWWWWWWW - * will produce (as a HEXDUMP) of 14 bytes - * 8B 57 00 42 8B 57 82 42 97 57 00 42 8D 57 .W.B.W.B.W.B.W - */ -//============================================================================= - -#ifndef ACE_RLECOMPRESSOR_H -#define ACE_RLECOMPRESSOR_H - -#include /**/ "ace/pre.h" - -#include "ACE_RLECompression_export.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Compression/Compressor.h" -#include "ace/Singleton.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -class ACE_RLECompression_Export ACE_RLECompressor : public ACE_Compressor -{ -public: - /** - * Default constructor. Should use instance() to get global instance. - */ - ACE_RLECompressor(void); - - virtual ~ACE_RLECompressor(void); - - /** - * Compress the @a in_ptr buffer for @a in_len into the - * @a dest_ptr buffer with a maximum @a max_out_len using - * the Run Length Ecoding (RLE) algorithm. If the - * @a max_out_len is exhausted through the compress process - * then a value of -1 will be returned from the function, - * otherwise the return value will indicate the resultant - * @a out_ptr compressed buffer length. - * - * @note It is advisable that the @max_out_len be slightly - * larger of the input @a in_len (i.e. x 1.1F) to cater - * for the possibility that a reduced compressed length - * is not possible. - */ - virtual ACE_UINT64 compress( const void *in_ptr, - ACE_UINT64 in_len, - void *out_ptr, - ACE_UINT64 max_out_len ); - - /** - * DeCompress the @a in_ptr buffer for @a in_len into the - * @a out_ptr buffer with a maximum @a max_out_len using - * the Run Length Ecoding (RLE) algorithm. If the - * @a max_out_len is exhausted during decompression - * then a value of -1 will be returned from the function, - * otherwise the return value will indicate the resultant - * @a out_ptr decompressed buffer length. - */ - virtual ACE_UINT64 decompress( const void *in_ptr, - ACE_UINT64 in_len, - void *out_ptr, - ACE_UINT64 max_out_len ); -}; - -ACE_RLECOMPRESSION_SINGLETON_DECLARE(ACE_Singleton, ACE_RLECompressor, ACE_SYNCH_MUTEX); - -typedef class ACE_Singleton ACE_RLECompression; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#include /**/ "ace/post.h" - -#endif // ACE_RLECOMPRESSOR_H diff --git a/modules/worldengine/deps/acelite/ace/Condition_Attributes.cpp b/modules/worldengine/deps/acelite/ace/Condition_Attributes.cpp deleted file mode 100644 index 044dfacc50..0000000000 --- a/modules/worldengine/deps/acelite/ace/Condition_Attributes.cpp +++ /dev/null @@ -1,15 +0,0 @@ -/* -*- C++ -*- */ -/** - * @file Condition_Attributes.cpp - * - * Originally in Synch.cpp - * - * @author Douglas C. Schmidt - */ - -#include "ace/Condition_Thread_Mutex.h" -#include "ace/Condition_Attributes.h" - -#if !defined (__ACE_INLINE__) -#include "ace/Condition_Attributes.inl" -#endif /* __ACE_INLINE__ */ diff --git a/modules/worldengine/deps/acelite/ace/Condition_Attributes.h b/modules/worldengine/deps/acelite/ace/Condition_Attributes.h deleted file mode 100644 index 13c1b8abf7..0000000000 --- a/modules/worldengine/deps/acelite/ace/Condition_Attributes.h +++ /dev/null @@ -1,93 +0,0 @@ -// -*- C++ -*- - -//========================================================================== -/** - * @file Condition_Attributes.h - * - * Moved from Synch.h. - * - * @author Douglas C. Schmidt - */ -//========================================================================== - -#ifndef ACE_CONDITION_ATTRIBUTES_H -#define ACE_CONDITION_ATTRIBUTES_H -#include /**/ "ace/pre.h" - -#include /**/ "ace/ACE_export.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/OS_NS_Thread.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -class ACE_Export ACE_Condition_Attributes -{ -public: - /// Constructor - ACE_Condition_Attributes (int type = ACE_DEFAULT_SYNCH_TYPE); - - /// Destructor - ~ACE_Condition_Attributes (void); - - /// Accessor for retrieving the current attributes - const ACE_condattr_t& attributes (void) const; - -protected: - /// The attributes - ACE_condattr_t attributes_; - -private: - // = Prevent assignment and initialization. - void operator= (const ACE_Condition_Attributes &); - ACE_Condition_Attributes (const ACE_Condition_Attributes &); -}; - -template -class ACE_Condition_Attributes_T : public ACE_Condition_Attributes -{ -public: - /// Constructor - ACE_Condition_Attributes_T (int type = ACE_DEFAULT_SYNCH_TYPE) - : ACE_Condition_Attributes (type) - {} - - /// Destructor - ~ACE_Condition_Attributes_T (void) {} - -private: - // = Prevent assignment and initialization. - void operator= (const ACE_Condition_Attributes_T &); - ACE_Condition_Attributes_T (const ACE_Condition_Attributes_T &); -}; - -class ACE_Monotonic_Time_Policy; - -template <> -class ACE_Export ACE_Condition_Attributes_T - : public ACE_Condition_Attributes -{ -public: - /// Constructor - ACE_Condition_Attributes_T (int type = ACE_DEFAULT_SYNCH_TYPE); - - /// Destructor - ~ACE_Condition_Attributes_T (void); - -private: - // = Prevent assignment and initialization. - void operator= (const ACE_Condition_Attributes_T &); - ACE_Condition_Attributes_T (const ACE_Condition_Attributes_T &); -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/Condition_Attributes.inl" -#endif /* __ACE_INLINE__ */ - -#include /**/ "ace/post.h" -#endif /* ACE_CONDITION_ATTRIBUTES_H */ diff --git a/modules/worldengine/deps/acelite/ace/Condition_Attributes.inl b/modules/worldengine/deps/acelite/ace/Condition_Attributes.inl deleted file mode 100644 index 7fecc4aafd..0000000000 --- a/modules/worldengine/deps/acelite/ace/Condition_Attributes.inl +++ /dev/null @@ -1,37 +0,0 @@ -// -*- C++ -*- -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_INLINE -ACE_Condition_Attributes::ACE_Condition_Attributes (int type) -{ - (void) ACE_OS::condattr_init (this->attributes_, type); -} - -ACE_INLINE -ACE_Condition_Attributes::~ACE_Condition_Attributes (void) -{ - ACE_OS::condattr_destroy (this->attributes_); -} - -ACE_INLINE -const ACE_condattr_t& -ACE_Condition_Attributes::attributes (void) const -{ - return this->attributes_; -} - -ACE_INLINE -ACE_Condition_Attributes_T::ACE_Condition_Attributes_T (int type) - : ACE_Condition_Attributes (type) -{ -#if (defined (_POSIX_MONOTONIC_CLOCK) && !defined (ACE_LACKS_MONOTONIC_TIME)) || defined (ACE_HAS_CLOCK_GETTIME_MONOTONIC) - (void) ACE_OS::condattr_setclock (this->attributes_, CLOCK_MONOTONIC); -#endif -} - -ACE_INLINE -ACE_Condition_Attributes_T::~ACE_Condition_Attributes_T (void) -{ -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Condition_Recursive_Thread_Mutex.cpp b/modules/worldengine/deps/acelite/ace/Condition_Recursive_Thread_Mutex.cpp deleted file mode 100644 index 2f68f8c8b3..0000000000 --- a/modules/worldengine/deps/acelite/ace/Condition_Recursive_Thread_Mutex.cpp +++ /dev/null @@ -1,131 +0,0 @@ -// -*- C++ -*- - -/** - * @file Condition_Recursive_Thread_Mutex.cpp - * - * Originally in Synch.cpp - * - * @author Douglas C. Schmidt - */ - -#include "ace/Condition_Recursive_Thread_Mutex.h" - -#if defined (ACE_HAS_THREADS) - -#include "ace/Log_Category.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -int -ACE_Condition::remove (void) -{ - return ACE_OS::cond_destroy (&this->cond_); -} - -void -ACE_Condition::dump (void) const -{ -#if defined (ACE_HAS_DUMP) -// ACE_TRACE ("ACE_Condition::dump"); - - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - // No dump method for ACE_cond_t even in emulated mode. - // cond_.dump (); - this->mutex_.dump (); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("\n"))); - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} - -ACE_Condition::~ACE_Condition (void) -{ - this->remove (); -} - -ACE_Condition::ACE_Condition (ACE_Recursive_Thread_Mutex &m) - : mutex_ (m) -{ - if (ACE_OS::cond_init (&this->cond_) != 0) - ACELIB_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), - ACE_TEXT ("ACE_Condition::ACE_Condition"))); -} - -ACE_Condition::ACE_Condition (ACE_Recursive_Thread_Mutex &m, - const ACE_Condition_Attributes &attributes) - : mutex_ (m) -{ - if (ACE_OS::cond_init (&this->cond_, - const_cast (attributes.attributes ())) != 0) - ACELIB_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), - ACE_TEXT ("ACE_Condition::ACE_Condition"))); -} - -int -ACE_Condition::wait (const ACE_Time_Value *abstime) -{ - return this->wait (this->mutex_, abstime); -} - -int -ACE_Condition::wait (ACE_Recursive_Thread_Mutex &mutex, - const ACE_Time_Value *abstime) -{ - ACE_recursive_mutex_state mutex_state_holder; - ACE_recursive_thread_mutex_t &recursive_mutex = mutex.lock (); - - if (ACE_OS::recursive_mutex_cond_unlock (&recursive_mutex, - mutex_state_holder) == -1) - return -1; - - // We wait on the condition, specifying the nesting mutex. For platforms - // with ACE_HAS_RECURSIVE_MUTEXES, this is the recursive mutex itself, - // and is the same as recursive_mutex, above. The caller should have been - // holding the lock on entry to this method, and it is still held. - // For other platforms, this is the nesting mutex that guards the - // ACE_recursive_mutex_t internals, and recursive_mutex_cond_unlock() - // returned with the lock held, but waiters primed and waiting to be - // released. At cond_wait below, the mutex will be released. - // On return, it will be reacquired. - int const result = abstime == 0 - ? ACE_OS::cond_wait (&this->cond_, - &mutex.get_nesting_mutex ()) - : ACE_OS::cond_timedwait (&this->cond_, - &mutex.get_nesting_mutex (), - const_cast (abstime)); - // We are holding the mutex, whether the wait succeeded or failed. - // Stash errno (in case it failed) and then we need to reset the - // recursive mutex state to what it was on entry to this method. - // Resetting it may require a wait for another thread to release - // the ACE_recursive_thread_mutex_t if this is a platform without - // ACE_HAS_RECURSIVE_MUTEXES, and recursive_mutex_cond_relock() takes - // care of that. - { - ACE_Errno_Guard error (errno); - ACE_OS::recursive_mutex_cond_relock (&recursive_mutex, - mutex_state_holder); - } - - return result; -} - -int -ACE_Condition::signal (void) -{ - return ACE_OS::cond_signal (&this->cond_); -} - -int -ACE_Condition::broadcast (void) -{ - return ACE_OS::cond_broadcast (&this->cond_); -} - -ACE_Recursive_Thread_Mutex & -ACE_Condition::mutex (void) -{ - return this->mutex_; -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_HAS_THREADS */ diff --git a/modules/worldengine/deps/acelite/ace/Condition_Recursive_Thread_Mutex.h b/modules/worldengine/deps/acelite/ace/Condition_Recursive_Thread_Mutex.h deleted file mode 100644 index a7ce9944cc..0000000000 --- a/modules/worldengine/deps/acelite/ace/Condition_Recursive_Thread_Mutex.h +++ /dev/null @@ -1,112 +0,0 @@ -// -*- C++ -*- - -//========================================================================== -/** - * @file Condition_Recursive_Thread_Mutex.h - * - * Moved from Synch.h. - * - * @author Douglas C. Schmidt - */ -//========================================================================== - -#ifndef ACE_CONDITION_RECURSIVE_THREAD_MUTEX_H -#define ACE_CONDITION_RECURSIVE_THREAD_MUTEX_H -#include /**/ "ace/pre.h" - -#include /**/ "ace/ACE_export.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#if !defined (ACE_HAS_THREADS) -# include "ace/Null_Condition.h" -#else /* ACE_HAS_THREADS */ -#include "ace/Recursive_Thread_Mutex.h" -#include "ace/Condition_Attributes.h" -#include "ace/Condition_T.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @brief ACE_Condition template specialization written using - * @a ACE_Recursive_Thread_Mutex. This allows threads to block until - * shared data changes state using recursive mutexes. - */ -template<> -class ACE_Export ACE_Condition -{ -public: - /// Initialize the condition variable with a recursive mutex. - ACE_Condition (ACE_Recursive_Thread_Mutex &m); - - /// Initialize the condition variable. - ACE_Condition (ACE_Recursive_Thread_Mutex &m, - const ACE_Condition_Attributes &attributes); - - /// Implicitly destroy the condition variable. - ~ACE_Condition (void); - - /** - * Explicitly destroy the condition variable. Note that only one - * thread should call this method since it doesn't protect against - * race conditions. - */ - int remove (void); - - /** - * Block on condition, or until absolute time-of-day has passed. If - * abstime == 0 use "blocking" semantics. Else, if @a abstime - * != 0 and the call times out before the condition is signaled - * returns -1 and sets errno to ETIME. - */ - int wait (const ACE_Time_Value *abstime = 0); - - /** - * Block on condition or until absolute time-of-day has passed. If - * abstime == 0 use "blocking" wait() semantics on the recursive @a mutex - * passed as a parameter (this is useful if you need to store the - * in shared memory). Else, if @a abstime != 0 and the - * call times out before the condition is signaled returns -1 - * and sets errno to ETIME. - */ - int wait (ACE_Recursive_Thread_Mutex &mutex, - const ACE_Time_Value *abstime = 0); - - /// Signal one waiting thread. - int signal (void); - - /// Signal *all* waiting threads. - int broadcast (void); - - /// Returns a reference to the underlying mutex; - ACE_Recursive_Thread_Mutex &mutex (void); - - /// Dump the state of an object. - void dump (void) const; - -private: - - // = Prevent assignment and copying. - void operator= (const ACE_Condition &); - ACE_Condition (const ACE_Condition &); - -private: - - /// A normal (i.e., non-recursive) condition variable. - ACE_cond_t cond_; - - /// Reference to the recursive mutex. - ACE_Recursive_Thread_Mutex &mutex_; - -}; - -typedef ACE_Condition ACE_Condition_Recursive_Thread_Mutex; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* !ACE_HAS_THREADS */ - -#include /**/ "ace/post.h" -#endif /* ACE_CONDITION_RECURSIVE_THREAD_MUTEX_H */ diff --git a/modules/worldengine/deps/acelite/ace/Condition_T.cpp b/modules/worldengine/deps/acelite/ace/Condition_T.cpp deleted file mode 100644 index 2657822edd..0000000000 --- a/modules/worldengine/deps/acelite/ace/Condition_T.cpp +++ /dev/null @@ -1,142 +0,0 @@ -#ifndef ACE_CONDITION_T_CPP -#define ACE_CONDITION_T_CPP - -#include "ace/Condition_T.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#if defined (ACE_HAS_THREADS) - -#include "ace/Log_Category.h" - -#if !defined (__ACE_INLINE__) -#include "ace/Condition_T.inl" -#include "ace/Time_Value.h" -#endif /* __ACE_INLINE__ */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_ALLOC_HOOK_DEFINE(ACE_Condition) - -template void -ACE_Condition::dump (void) const -{ -#if defined (ACE_HAS_DUMP) -// ACE_TRACE ("ACE_Condition::dump"); - - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("\n"))); - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} - -template -ACE_Thread_Condition::ACE_Thread_Condition (MUTEX &m, - const ACE_TCHAR *name, - void *arg) - : ACE_Condition (m, USYNC_THREAD, name, arg) -{ -// ACE_TRACE ("ACE_Thread_Condition::ACE_Thread_Condition"); -} - -template void -ACE_Thread_Condition::dump (void) const -{ -#if defined (ACE_HAS_DUMP) -// ACE_TRACE ("ACE_Thread_Condition::dump"); - - ACE_Condition::dump (); -#endif /* ACE_HAS_DUMP */ -} - -template -ACE_Condition::ACE_Condition (MUTEX &m, - int type, - const ACE_TCHAR *name, - void *arg) - : - mutex_ (m) -{ - // ACE_TRACE ("ACE_Condition::ACE_Condition"); - - if (ACE_OS::cond_init (&this->cond_, - (short) type, - name, - arg) != 0) - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("%p\n"), - ACE_TEXT ("ACE_Condition::ACE_Condition"))); -} - -template -ACE_Condition::ACE_Condition (MUTEX &m, - const ACE_Condition_Attributes &attributes, - const ACE_TCHAR *name, - void *arg) - : mutex_ (m) -{ -// ACE_TRACE ("ACE_Condition::ACE_Condition"); - if (ACE_OS::cond_init (&this->cond_, - const_cast (attributes.attributes ()), - name, arg) != 0) - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("%p\n"), - ACE_TEXT ("ACE_Condition::ACE_Condition"))); -} - -template -ACE_Condition::~ACE_Condition (void) -{ - // ACE_TRACE ("ACE_Condition::~ACE_Condition"); - - if (this->remove () == -1) - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("%p\n"), - ACE_TEXT ("ACE_Condition::~ACE_Condition"))); -} - -template int -ACE_Condition::wait (void) -{ - // ACE_TRACE ("ACE_Condition::wait"); - return ACE_OS::cond_wait (&this->cond_, - &this->mutex_.lock ()); -} - -template int -ACE_Condition::wait (MUTEX &mutex, - const ACE_Time_Value *abstime) -{ -// ACE_TRACE ("ACE_Condition::wait"); - if (abstime == 0) - { - return ACE_OS::cond_wait (&this->cond_, - &mutex.lock ()); - } - else - { - ACE_Time_Value tv = *abstime; - return ACE_OS::cond_timedwait (&this->cond_, - &mutex.lock (), - &tv); - } -} - -// Peform an "alertable" timed wait. If the argument ABSTIME == 0 -// then we do a regular cond_wait(), else we do a timed wait for up to -// ABSTIME using the Solaris cond_timedwait() function. - -template int -ACE_Condition::wait (const ACE_Time_Value *abstime) -{ -// ACE_TRACE ("ACE_Condition::wait"); - return this->wait (this->mutex_, abstime); -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_HAS_THREADS */ - -#endif /* ACE_CONDITION_T_CPP */ diff --git a/modules/worldengine/deps/acelite/ace/Condition_T.h b/modules/worldengine/deps/acelite/ace/Condition_T.h deleted file mode 100644 index a42b02ade5..0000000000 --- a/modules/worldengine/deps/acelite/ace/Condition_T.h +++ /dev/null @@ -1,170 +0,0 @@ -// -*- C++ -*- - -//========================================================================== -/** - * @file Condition_T.h - * - * Moved from Synch.h. - * - * @author Douglas C. Schmidt - */ -//========================================================================== - -#ifndef ACE_CONDITION_T_H -#define ACE_CONDITION_T_H - -#include /**/ "ace/pre.h" - -#include "ace/OS_NS_Thread.h" -#include "ace/Condition_Attributes.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#if defined (ACE_HAS_THREADS) /* ACE platform supports some form of threading. */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -class ACE_Time_Value; - -/** - * @class ACE_Condition - * - * @brief ACE_Condition variable wrapper, which allows threads to block - * until shared data changes state. - * - * A condition variable enables threads to atomically block and - * test the condition under the protection of a mutual exclusion - * lock (mutex) until the condition is satisfied. That is, - * the mutex must have been held by the thread before calling - * wait or signal on the condition. If the condition is false, - * a thread blocks on a condition variable and atomically - * releases the mutex that is waiting for the condition to - * change. If another thread changes the condition, it may wake - * up waiting threads by signaling the associated condition - * variable. The waiting threads, upon awakening, reacquire the - * mutex and re-evaluate the condition. - * Note, you can only parameterize with - * @a ACE_Thread_Mutex, @a ACE_Recursive_Thread_Mutex, or @a ACE_Null_Mutex. - */ -template -class ACE_Condition -{ -public: - /// Initialize the condition variable. - ACE_Condition (MUTEX &m, int type = USYNC_THREAD, - const ACE_TCHAR *name = 0, void *arg = 0); - - /// Initialize the condition variable. - ACE_Condition (MUTEX &m, - const ACE_Condition_Attributes &attributes, - const ACE_TCHAR *name = 0, - void *arg = 0); - - /// Implicitly destroy the condition variable. - ~ACE_Condition (void); - - // = Lock accessors. - /** - * Block on condition, or until absolute time-of-day has passed. If - * @a abstime == 0 use "blocking" semantics. Else, if @a abstime - * != 0 and the call times out before the condition is signaled - * wait() returns -1 and sets errno to ETIME. - */ - int wait (const ACE_Time_Value *abstime); - - /// Block on condition. - int wait (void); - - /** - * Block on condition or until absolute time-of-day has passed. If - * @a abstime == 0 use "blocking" wait() semantics on the @a mutex - * passed as a parameter (this is useful if you need to store the - * in shared memory). Else, if @a abstime != 0 and the - * call times out before the condition is signaled wait() returns -1 - * and sets errno to ETIME. - */ - int wait (MUTEX &mutex, const ACE_Time_Value *abstime = 0); - - /// Signal one waiting thread. - int signal (void); - - /// Signal *all* waiting threads. - int broadcast (void); - - // = Utility methods. - /// Explicitly destroy the condition variable. - int remove (void); - - /// Returns a reference to the underlying mutex_; - MUTEX &mutex (void); - - /// Dump the state of an object. - void dump (void) const; - - // ACE_ALLOC_HOOK_DECLARE; - // Declare the dynamic allocation hooks. - -protected: - /// Condition variable. - ACE_cond_t cond_; - - /// Reference to mutex lock. - MUTEX &mutex_; - -private: - // = Prevent assignment and initialization. - ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Condition &)) - ACE_UNIMPLEMENTED_FUNC (ACE_Condition (const ACE_Condition &)) -}; - -/** - * @class ACE_Thread_Condition - * - * @brief ACE_Condition variable wrapper that works within processes. - * - * A condition variable enables threads to atomically block and - * test the condition under the protection of a mutual exclu- - * sion lock (mutex) until the condition is satisfied. That is, - * the mutex must have been held by the thread before calling - * wait or signal on the condition. If the condition is false, - * a thread blocks on a condition variable and atomically - * releases the mutex that is waiting for the condition to - * change. If another thread changes the condition, it may wake - * up waiting threads by signaling the associated condition - * variable. The waiting threads, upon awakening, reacquire the - * mutex and re-evaluate the condition. - */ -template -class ACE_Thread_Condition : public ACE_Condition -{ -public: - // = Initialization method. - ACE_Thread_Condition (MUTEX &m, const ACE_TCHAR *name = 0, void *arg = 0); - - /// Dump the state of an object. - void dump (void) const; - - // ACE_ALLOC_HOOK_DECLARE; - // Declare the dynamic allocation hooks. -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/Condition_T.inl" -#endif /* __ACE_INLINE__ */ - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "ace/Condition_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Condition_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ - -#endif /* ACE_HAS_THREADS */ - -#include /**/ "ace/post.h" -#endif /* ACE_CONDITION_T_H */ diff --git a/modules/worldengine/deps/acelite/ace/Condition_T.inl b/modules/worldengine/deps/acelite/ace/Condition_T.inl deleted file mode 100644 index dc42662298..0000000000 --- a/modules/worldengine/deps/acelite/ace/Condition_T.inl +++ /dev/null @@ -1,48 +0,0 @@ -// -*- C++ -*- -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -template ACE_INLINE int -ACE_Condition::remove (void) -{ - // ACE_TRACE ("ACE_Condition::remove"); - - // cond_destroy() is called in a loop if the condition variable is - // BUSY. This avoids a condition where a condition is signaled and - // because of some timing problem, the thread that is to be signaled - // has called the cond_wait routine after the signal call. Since - // the condition signal is not queued in any way, deadlock occurs. - - int result = 0; - - while ((result = ACE_OS::cond_destroy (&this->cond_)) == -1 - && errno == EBUSY) - { - ACE_OS::cond_broadcast (&this->cond_); - ACE_OS::thr_yield (); - } - - return result; -} - -template ACE_INLINE MUTEX & -ACE_Condition::mutex (void) -{ - // ACE_TRACE ("ACE_Condition::mutex"); - return this->mutex_; -} - -template ACE_INLINE int -ACE_Condition::signal (void) -{ -// ACE_TRACE ("ACE_Condition::signal"); - return ACE_OS::cond_signal (&this->cond_); -} - -template ACE_INLINE int -ACE_Condition::broadcast (void) -{ -// ACE_TRACE ("ACE_Condition::broadcast"); - return ACE_OS::cond_broadcast (&this->cond_); -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Condition_Thread_Mutex.cpp b/modules/worldengine/deps/acelite/ace/Condition_Thread_Mutex.cpp deleted file mode 100644 index d012e1a7d1..0000000000 --- a/modules/worldengine/deps/acelite/ace/Condition_Thread_Mutex.cpp +++ /dev/null @@ -1,122 +0,0 @@ -/* -*- C++ -*- */ -/** - * @file Condition_Thread_Mutex.cpp - * - * Originally in Synch.cpp - * - * @author Douglas C. Schmidt - */ - -#include "ace/Condition_Thread_Mutex.h" - -#if defined (ACE_HAS_THREADS) - -#if !defined (__ACE_INLINE__) -#include "ace/Condition_Thread_Mutex.inl" -#endif /* __ACE_INLINE__ */ - -#include "ace/Log_Category.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_ALLOC_HOOK_DEFINE(ACE_Condition) - -void -ACE_Condition::dump (void) const -{ -#if defined (ACE_HAS_DUMP) -// ACE_TRACE ("ACE_Condition::dump"); - - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("\n"))); -#if defined (ACE_WIN32) - ACELIB_DEBUG ((LM_DEBUG, - ACE_TEXT ("waiters = %d\n"), - this->cond_.waiters ())); -#endif /* ACE_WIN32 */ - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} - -ACE_Condition::ACE_Condition (ACE_Thread_Mutex &m, - const ACE_TCHAR *name, - void *arg) - : mutex_ (m), - removed_ (false) -{ -// ACE_TRACE ("ACE_Condition::ACE_Condition"); - if (ACE_OS::cond_init (&this->cond_, - (short) USYNC_THREAD, - name, - arg) != 0) - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("%p\n"), - ACE_TEXT ("ACE_Condition::ACE_Condition"))); -} - -ACE_Condition::ACE_Condition (ACE_Thread_Mutex &m, - const ACE_Condition_Attributes &attributes, - const ACE_TCHAR *name, - void *arg) - : mutex_ (m), - removed_ (false) -{ -// ACE_TRACE ("ACE_Condition::ACE_Condition"); - if (ACE_OS::cond_init (&this->cond_, - const_cast (attributes.attributes ()), - name, arg) != 0) - ACELIB_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), - ACE_TEXT ("ACE_Condition::ACE_Condition"))); -} - -ACE_Condition::~ACE_Condition (void) -{ -// ACE_TRACE ("ACE_Condition::~ACE_Condition"); - this->remove (); -} - -// Peform an "alertable" timed wait. If the argument == 0 -// then we do a regular , else we do a timed wait for up to -// using the function. - -int -ACE_Condition::wait (void) -{ -// ACE_TRACE ("ACE_Condition::wait"); - return ACE_OS::cond_wait (&this->cond_, &this->mutex_.lock ()); -} - -int -ACE_Condition::wait (ACE_Thread_Mutex &mutex, - const ACE_Time_Value *abstime) -{ -// ACE_TRACE ("ACE_Condition::wait"); - return ACE_OS::cond_timedwait (&this->cond_, - &mutex.lock (), - const_cast (abstime)); -} - -int -ACE_Condition::wait (const ACE_Time_Value *abstime) -{ -// ACE_TRACE ("ACE_Condition::wait"); - return this->wait (this->mutex_, abstime); -} - -int -ACE_Condition::signal (void) -{ -// ACE_TRACE ("ACE_Condition::signal"); - return ACE_OS::cond_signal (&this->cond_); -} - -int -ACE_Condition::broadcast (void) -{ -// ACE_TRACE ("ACE_Condition::broadcast"); - return ACE_OS::cond_broadcast (&this->cond_); -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_HAS_THREADS */ diff --git a/modules/worldengine/deps/acelite/ace/Condition_Thread_Mutex.h b/modules/worldengine/deps/acelite/ace/Condition_Thread_Mutex.h deleted file mode 100644 index 6ba91871e1..0000000000 --- a/modules/worldengine/deps/acelite/ace/Condition_Thread_Mutex.h +++ /dev/null @@ -1,144 +0,0 @@ -// -*- C++ -*- - -//========================================================================== -/** - * @file Condition_Thread_Mutex.h - * - * Moved from Synch.h. - * - * @author Douglas C. Schmidt - */ -//========================================================================== - -#ifndef ACE_CONDITION_THREAD_MUTEX_H -#define ACE_CONDITION_THREAD_MUTEX_H -#include /**/ "ace/pre.h" - -#include /**/ "ace/ACE_export.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#if !defined (ACE_HAS_THREADS) -# include "ace/Null_Condition.h" -#else /* ACE_HAS_THREADS */ -// ACE platform supports some form of threading. - -#include "ace/Thread_Mutex.h" -#include "ace/Condition_Attributes.h" -#include "ace/Condition_T.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -class ACE_Time_Value; - -/** - * @brief ACE_Condition template specialization written using - * ACE_Mutexes. This allows threads to block until shared data - * changes state. - * A condition variable enables threads to atomically block and - * test the condition under the protection of a mutual exclu- - * sion lock (mutex) until the condition is satisfied. That is, - * the mutex must have been held by the thread before calling - * wait or signal on the condition. If the condition is false, - * a thread blocks on a condition variable and atomically - * releases the mutex that is waiting for the condition to - * change. If another thread changes the condition, it may wake - * up waiting threads by signaling the associated condition - * variable. The waiting threads, upon awakening, reacquire the - * mutex and re-evaluate the condition. - */ -template <> -class ACE_Export ACE_Condition -{ -public: - /// Initialize the condition variable. - ACE_Condition (ACE_Thread_Mutex &m, - const ACE_TCHAR *name = 0, - void *arg = 0); - - /// Initialize the condition variable. - ACE_Condition (ACE_Thread_Mutex &m, - const ACE_Condition_Attributes &attributes, - const ACE_TCHAR *name = 0, - void *arg = 0); - - /// Implicitly destroy the condition variable. - ~ACE_Condition (void); - - /** - * Explicitly destroy the condition variable. Note that only one - * thread should call this method since it doesn't protect against - * race conditions. - */ - int remove (void); - - /** - * Block on condition, or until absolute time-of-day has passed. If - * abstime == 0 use "blocking" semantics. Else, if @a abstime - * != 0 and the call times out before the condition is signaled - * returns -1 and sets errno to ETIME. - */ - int wait (const ACE_Time_Value *abstime); - - /// Block on condition. - int wait (void); - - /** - * Block on condition or until absolute time-of-day has passed. If - * abstime == 0 use "blocking" wait() semantics on the @a mutex - * passed as a parameter (this is useful if you need to store the - * in shared memory). Else, if @a abstime != 0 and the - * call times out before the condition is signaled returns -1 - * and sets errno to ETIME. - */ - int wait (ACE_Thread_Mutex &mutex, const ACE_Time_Value *abstime = 0); - - /// Signal one waiting thread. - int signal (void); - - /// Signal *all* waiting threads. - int broadcast (void); - - /// Returns a reference to the underlying mutex; - ACE_Thread_Mutex &mutex (void); - - /// Dump the state of an object. - void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - -protected: - /// Condition variable. - ACE_cond_t cond_; - - /// Reference to mutex lock. - ACE_Thread_Mutex &mutex_; - - /// Keeps track of whether has been called yet to avoid - /// multiple calls, e.g., explicitly and implicitly in the - /// destructor. This flag isn't protected by a lock, so make sure - /// that you don't have multiple threads simultaneously calling - /// on the same object, which is a bad idea anyway... - bool removed_; - -private: - // = Prevent assignment and initialization. - void operator= (const ACE_Condition &); - ACE_Condition (const ACE_Condition &); -}; - -typedef ACE_Condition ACE_Condition_Thread_Mutex; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/Condition_Thread_Mutex.inl" -#endif /* __ACE_INLINE__ */ - -#endif /* !ACE_HAS_THREADS */ - -#include /**/ "ace/post.h" -#endif /* ACE_CONDITION_THREAD_MUTEX_H */ diff --git a/modules/worldengine/deps/acelite/ace/Condition_Thread_Mutex.inl b/modules/worldengine/deps/acelite/ace/Condition_Thread_Mutex.inl deleted file mode 100644 index 5db2808d1a..0000000000 --- a/modules/worldengine/deps/acelite/ace/Condition_Thread_Mutex.inl +++ /dev/null @@ -1,38 +0,0 @@ -// -*- C++ -*- -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_INLINE int -ACE_Condition::remove (void) -{ -// ACE_TRACE ("ACE_Condition::remove"); - - // is called in a loop if the condition variable is - // BUSY. This avoids a condition where a condition is signaled and - // because of some timing problem, the thread that is to be signaled - // has called the cond_wait routine after the signal call. Since - // the condition signal is not queued in any way, deadlock occurs. - - int result = 0; - - if (!this->removed_) - { - this->removed_ = true; - - while ((result = ACE_OS::cond_destroy (&this->cond_)) == -1 - && errno == EBUSY) - { - ACE_OS::cond_broadcast (&this->cond_); - ACE_OS::thr_yield (); - } - } - return result; -} - -ACE_INLINE ACE_Thread_Mutex & -ACE_Condition::mutex (void) -{ -// ACE_TRACE ("ACE_Condition::mutex"); - return this->mutex_; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Configuration.cpp b/modules/worldengine/deps/acelite/ace/Configuration.cpp deleted file mode 100644 index 5050f8a81b..0000000000 --- a/modules/worldengine/deps/acelite/ace/Configuration.cpp +++ /dev/null @@ -1,2131 +0,0 @@ -#include "ace/Configuration.h" -#include "ace/Auto_Ptr.h" -#include "ace/SString.h" -#include "ace/OS_NS_string.h" -#include "ace/OS_NS_strings.h" -#include "ace/Tokenizer_T.h" - -#if !defined (ACE_LACKS_ACCESS) -# include "ace/OS_NS_unistd.h" -#endif /* ACE_LACKS_ACCESS */ - -#if !defined (__ACE_INLINE__) -#include "ace/Configuration.inl" -#endif /* __ACE_INLINE__ */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_Section_Key_Internal::ACE_Section_Key_Internal (void) - : ref_count_ (0) -{ -} - -ACE_Section_Key_Internal::~ACE_Section_Key_Internal (void) -{ -} - -int -ACE_Section_Key_Internal::add_ref (void) -{ - ++ref_count_; - return 0; -} - -int -ACE_Section_Key_Internal::dec_ref (void) -{ - if (!--ref_count_) - delete this; - return 0; -} - -ACE_Configuration_Section_Key::ACE_Configuration_Section_Key (void) - : key_ (0) -{ -} - -ACE_Configuration_Section_Key::~ACE_Configuration_Section_Key (void) -{ - if (key_) - key_->dec_ref (); -} - -ACE_Configuration_Section_Key::ACE_Configuration_Section_Key (ACE_Section_Key_Internal* key) - : key_ (key) -{ - if (key_) - key_->add_ref (); -} - -ACE_Configuration_Section_Key::ACE_Configuration_Section_Key (const ACE_Configuration_Section_Key& rhs) - : key_ (rhs.key_) -{ - if (key_) - key_->add_ref (); -} - -ACE_Configuration_Section_Key& -ACE_Configuration_Section_Key::operator= (const ACE_Configuration_Section_Key& rhs) -{ - if (this != &rhs) - { - if (key_) - key_->dec_ref (); - - key_ = rhs.key_; - - if (key_) - key_->add_ref (); - } - return *this; -} - -////////////////////////////////////////////////////////////////////////////// - -ACE_TCHAR ACE_Configuration::NULL_String_ = '\0'; - -ACE_Configuration::ACE_Configuration (void) - : root_ () -{ -} - -ACE_Configuration::~ACE_Configuration (void) -{ -} - -ACE_Section_Key_Internal* -ACE_Configuration::get_internal_key (const ACE_Configuration_Section_Key& key) -{ - return key.key_; -} - -int -ACE_Configuration::expand_path (const ACE_Configuration_Section_Key& key, - const ACE_TString& path_in, - ACE_Configuration_Section_Key& key_out, - int create) -{ - // Make a copy of key - ACE_Configuration_Section_Key current_section = key; - ACE_Auto_Basic_Array_Ptr pData (path_in.rep ()); - ACE_Tokenizer parser (pData.get ()); - parser.delimiter_replace ('\\', '\0'); - parser.delimiter_replace ('/', '\0'); - - for (ACE_TCHAR *temp = parser.next (); - temp != 0; - temp = parser.next ()) - { - // Open the section - if (open_section (current_section, - temp, - create, - key_out)) - return -1; - - current_section = key_out; - } - - return 0; - -} - -int -ACE_Configuration::validate_name (const ACE_TCHAR* name, int allow_path) -{ - // Invalid character set - const ACE_TCHAR* reject = - allow_path ? ACE_TEXT ("][") : ACE_TEXT ("\\]["); - - // Position of the first invalid character or terminating null. - size_t const pos = ACE_OS::strcspn (name, reject); - - // Check if it is an invalid character. - if (name[pos] != ACE_TEXT ('\0')) - { - errno = EINVAL; - return -1; - } - - // The first character can never be a path separator. - if (name[0] == ACE_TEXT ('\\')) - { - errno = EINVAL; - return -1; - } - - // Validate length. - if (pos == 0 || pos > 255) - { - errno = ENAMETOOLONG; - return -1; - } - - return 0; -} - -int -ACE_Configuration::validate_value_name (const ACE_TCHAR* name) -{ - if (name == 0 || *name == this->NULL_String_) - return 0; - - return this->validate_name (name); -} - -const ACE_Configuration_Section_Key& -ACE_Configuration::root_section (void) const -{ - return root_; -} - -/** - * Determine if the contents of this object is the same as the - * contents of the object on the right hand side. - * Returns 1 (True) if they are equal and 0 (False) if they are not equal - */ -bool -ACE_Configuration::operator== (const ACE_Configuration& rhs) const -{ - bool rc = true; - int sectionIndex = 0; - ACE_TString sectionName; - ACE_Configuration *nonconst_this = const_cast (this); - ACE_Configuration &nonconst_rhs = const_cast (rhs); - - const ACE_Configuration_Section_Key& rhsRoot = rhs.root_section (); - ACE_Configuration_Section_Key rhsSection; - ACE_Configuration_Section_Key thisSection; - - // loop through each section in this object - while ((rc) && (nonconst_this->enumerate_sections (this->root_, - sectionIndex, - sectionName) == 0)) - { - // find that section in the rhs object - if (nonconst_rhs.open_section (rhsRoot, - sectionName.c_str (), - 0, - rhsSection) != 0) - { - // If the rhs object does not contain the section then we are - // not equal. - rc = false; - } - else if (nonconst_this->open_section (this->root_, - sectionName.c_str (), - 0, - thisSection) != 0) - { - // if there is some error opening the section in this object - rc = false; - } - else - { - // Well the sections match - int valueIndex = 0; - ACE_TString valueName; - VALUETYPE valueType; - VALUETYPE rhsType; - - // Enumerate each value in this section - while ((rc) && nonconst_this->enumerate_values (thisSection, - valueIndex, - valueName, - valueType) == 0) - { - // look for the same value in the rhs section - if (nonconst_rhs.find_value (rhsSection, - valueName.c_str (), - rhsType) != 0) - { - // We're not equal if the same value cannot - // be found in the rhs object. - rc = false; - } - else if (valueType != rhsType) - { - // we're not equal if the types do not match. - rc = false; - } - else - { - // finally compare values. - if (valueType == STRING) - { - ACE_TString thisString, rhsString; - if (nonconst_this->get_string_value (thisSection, - valueName.c_str (), - thisString) != 0) - { - // we're not equal if we cannot get this string - rc = false; - } - else if (nonconst_rhs.get_string_value ( - rhsSection, - valueName.c_str (), - rhsString) != 0) - { - // we're not equal if we cannot get rhs string - rc = false; - } - rc = (thisString == rhsString); - } - else if (valueType == INTEGER) - { - u_int thisInt = 0; - u_int rhsInt = 0; - if (nonconst_this->get_integer_value ( - thisSection, - valueName.c_str (), - thisInt) != 0) - { - // we're not equal if we cannot get this int - rc = false; - } - else if (nonconst_rhs.get_integer_value ( - rhsSection, - valueName.c_str (), - rhsInt) != 0) - { - // we're not equal if we cannot get rhs int - rc = false; - } - rc = (thisInt == rhsInt); - } - else if (valueType == BINARY) - { - void* thisData = 0; - void* rhsData = 0; - size_t thisLength = 0; - size_t rhsLength = 0; - if (nonconst_this->get_binary_value (thisSection, - valueName.c_str (), - thisData, - thisLength) != 0) - { - // we're not equal if we cannot get this data - rc = false; - } - else if (nonconst_rhs.get_binary_value ( - rhsSection, - valueName.c_str (), - rhsData, - rhsLength) != 0) - { - // we're not equal if we cannot get this data - rc = false; - } - - rc = (thisLength == rhsLength); - // are the length's the same? - - if (rc) - { - unsigned char* thisCharData = - (unsigned char*)thisData; - unsigned char* rhsCharData = (unsigned char*)rhsData; - // yes, then check each element - for (size_t count = 0; - (rc) && (count < thisLength); - count++) - { - rc = (* (thisCharData + count) == * (rhsCharData + count)); - } - - delete [] thisCharData; - delete [] rhsCharData; - }// end if the length's match - } - // We should never have valueTypes of INVALID, therefore - // we're not comparing them. How would we since we have - // no get operation for invalid types. - // So, if we have them, we guess they are equal. - - }// end else if values match. - - ++valueIndex; - - }// end value while loop - - // look in the rhs for values not in this - valueIndex = 0; - while ((rc) && (nonconst_rhs.enumerate_values (rhsSection, - valueIndex, - valueName, - rhsType) == 0)) - { - // look for the same value in this section - if (nonconst_this->find_value (thisSection, - valueName.c_str (), - valueType) != 0) - { - // We're not equal if the same value cannot - // be found in the rhs object. - rc = false; - } - ++valueIndex; - }// end while for rhs values not in this. - - }// end else if sections match. - - ++sectionIndex; - - }// end section while loop - - // Finally, make sure that there are no sections in rhs that do not - // exist in this - sectionIndex = 0; - while ((rc) - && (nonconst_rhs.enumerate_sections (rhsRoot, - sectionIndex, - sectionName) == 0)) - { - // find the section in this - if (nonconst_this->open_section (this->root_, - sectionName.c_str (), - 0, - thisSection) != 0) - { - // if there is some error opening the section in this object - rc = false; - } - else if (nonconst_rhs.open_section (rhsRoot, - sectionName.c_str (), - 0, - rhsSection) != 0) - { - // If the rhs object does not contain the section then we - // are not equal. - rc = false; - } - ++sectionIndex; - } - return rc; -} - -bool -ACE_Configuration::operator!= (const ACE_Configuration& rhs) const -{ - return !(*this == rhs); -} - -////////////////////////////////////////////////////////////////////////////// - -#if defined (ACE_WIN32) && !defined (ACE_LACKS_WIN32_REGISTRY) - -static const int ACE_DEFAULT_BUFSIZE = 256; - -static const ACE_TCHAR *temp_name (const ACE_TCHAR *name) -{ - if (name && *name == ACE_Configuration::NULL_String_) - return 0; - return name; -} - -ACE_Section_Key_Win32::ACE_Section_Key_Win32 (HKEY hKey) - : hKey_ (hKey) -{ -} - -ACE_Section_Key_Win32::~ACE_Section_Key_Win32 (void) -{ - ::RegCloseKey (hKey_); -} - -////////////////////////////////////////////////////////////////////////////// - -bool -ACE_Configuration_Win32Registry::operator== (const ACE_Configuration_Win32Registry &rhs) const -{ - ACE_UNUSED_ARG (rhs); - return true; -} - -bool -ACE_Configuration_Win32Registry::operator!= (const ACE_Configuration_Win32Registry &rhs) const -{ - ACE_UNUSED_ARG (rhs); - return true; -} - -ACE_Configuration_Win32Registry::ACE_Configuration_Win32Registry (HKEY hKey) -{ - ACE_Section_Key_Win32 *temp = 0; - - ACE_NEW (temp, ACE_Section_Key_Win32 (hKey)); - - root_ = ACE_Configuration_Section_Key (temp); -} - - -ACE_Configuration_Win32Registry::~ACE_Configuration_Win32Registry (void) -{ -} - -int -ACE_Configuration_Win32Registry::open_section (const ACE_Configuration_Section_Key& base, - const ACE_TCHAR* sub_section, - int create, - ACE_Configuration_Section_Key& result) -{ - if (validate_name (sub_section, 1)) - return -1; - - HKEY base_key; - if (load_key (base, base_key)) - return -1; - - int errnum; - HKEY result_key; - if ((errnum = ACE_TEXT_RegOpenKeyEx (base_key, - sub_section, - 0, - KEY_ALL_ACCESS, - &result_key)) != ERROR_SUCCESS) - { - if (!create) - { - errno = errnum; - return -1; - } - - if ((errnum = ACE_TEXT_RegCreateKeyEx (base_key, - sub_section, - 0, - 0, - REG_OPTION_NON_VOLATILE, - KEY_ALL_ACCESS, - 0, - &result_key, - (PDWORD) 0 - )) != ERROR_SUCCESS) - { - errno = errnum; - return -1; - } - } - - ACE_Section_Key_Win32 *temp; - - ACE_NEW_RETURN (temp, ACE_Section_Key_Win32 (result_key), -1); - result = ACE_Configuration_Section_Key (temp); - return 0; -} - -int -ACE_Configuration_Win32Registry::remove_section (const ACE_Configuration_Section_Key& key, - const ACE_TCHAR* sub_section, - bool recursive) -{ - if (validate_name (sub_section)) - return -1; - - HKEY base_key; - if (load_key (key, base_key)) - return -1; - - if (recursive) - { - ACE_Configuration_Section_Key section; - if (open_section (key, sub_section, 0, section)) - return -1; - - HKEY sub_key; - if (load_key (section, sub_key)) - return -1; - - ACE_TCHAR name_buffer[ACE_DEFAULT_BUFSIZE]; - DWORD buffer_size = ACE_DEFAULT_BUFSIZE; - // Note we don't increment the index because the - // enumeration becomes invalid if we change the - // subkey, which we do when we delete it. By leaving - // it 0, we always delete the top entry - while (ACE_TEXT_RegEnumKeyEx (sub_key, - 0, - name_buffer, - &buffer_size, - 0, - 0, - 0, - 0) == ERROR_SUCCESS) - { - remove_section (section, name_buffer, true); - buffer_size = ACE_DEFAULT_BUFSIZE; - } - } - - int const errnum = ACE_TEXT_RegDeleteKey (base_key, sub_section); - if (errnum != ERROR_SUCCESS) - { - errno = errnum; - return -1; - } - - return 0; -} - -int -ACE_Configuration_Win32Registry::enumerate_values (const ACE_Configuration_Section_Key& key, - int index, - ACE_TString& name, - VALUETYPE& type) -{ - HKEY base_key; - if (load_key (key, base_key)) - return -1; - - ACE_TCHAR name_buffer[ACE_DEFAULT_BUFSIZE]; - DWORD buffer_size = ACE_DEFAULT_BUFSIZE; - DWORD value_type; - - int rc = ACE_TEXT_RegEnumValue (base_key, - index, - name_buffer, - &buffer_size, - 0, - &value_type, - 0, - 0); - if (rc == ERROR_NO_MORE_ITEMS) - return 1; - else if (rc != ERROR_SUCCESS) - { - errno = rc; - return -1; - } - - name = name_buffer; - - switch (value_type) - { - case REG_BINARY: - type = BINARY; - break; - case REG_SZ: - type = STRING; - break; - case REG_DWORD: - type = INTEGER; - break; - default: - type = INVALID; - } - - return 0; -} - -int -ACE_Configuration_Win32Registry::enumerate_sections (const ACE_Configuration_Section_Key& key, - int index, - ACE_TString& name) -{ - HKEY base_key; - if (load_key (key, base_key)) - return -1; - - ACE_TCHAR name_buffer[ACE_DEFAULT_BUFSIZE]; - DWORD buffer_size = ACE_DEFAULT_BUFSIZE; - int rc = ACE_TEXT_RegEnumKeyEx (base_key, - index, - name_buffer, - &buffer_size, - 0, - 0, - 0, - 0); - if (rc == ERROR_NO_MORE_ITEMS) - return 1; - else if (rc != ERROR_MORE_DATA && rc != ERROR_SUCCESS) - { - errno = rc; - return -1; - } - - name = name_buffer; - - return 0; -} - -int -ACE_Configuration_Win32Registry::set_string_value (const ACE_Configuration_Section_Key& key, - const ACE_TCHAR* name, - const ACE_TString& value) -{ - const ACE_TCHAR *t_name = temp_name (name); - if (validate_value_name (t_name)) - return -1; - - HKEY base_key; - if (load_key (key, base_key)) - return -1; - - int errnum; - DWORD len = static_cast (value.length () + 1); - len *= sizeof (ACE_TCHAR); - if ((errnum = ACE_TEXT_RegSetValueEx (base_key, - t_name, - 0, - REG_SZ, - (BYTE *) value.fast_rep (), - len)) - != ERROR_SUCCESS) - { - errno = errnum; - return -1; - } - - return 0; -} - -int -ACE_Configuration_Win32Registry::set_integer_value (const ACE_Configuration_Section_Key& key, - const ACE_TCHAR* name, - u_int value) -{ - const ACE_TCHAR *t_name = temp_name (name); - if (validate_value_name (t_name)) - return -1; - - HKEY base_key; - if (load_key (key, base_key)) - return -1; - - int errnum; - if ((errnum = ACE_TEXT_RegSetValueEx (base_key, - t_name, - 0, - REG_DWORD, - (BYTE *) &value, - sizeof (value))) != ERROR_SUCCESS) - { - errno = errnum; - return -1; - } - - return 0; -} - -int -ACE_Configuration_Win32Registry::set_binary_value (const ACE_Configuration_Section_Key& key, - const ACE_TCHAR* name, - const void* data, - size_t length) -{ - const ACE_TCHAR *t_name = temp_name (name); - if (validate_value_name (t_name)) - return -1; - - HKEY base_key; - if (load_key (key, base_key)) - return -1; - - int errnum; - if ((errnum = ACE_TEXT_RegSetValueEx (base_key, - t_name, - 0, - REG_BINARY, - (BYTE *) data, - static_cast (length))) - != ERROR_SUCCESS) - { - errno = errnum; - return -1; - } - - return 0; -} - -int -ACE_Configuration_Win32Registry::get_string_value (const ACE_Configuration_Section_Key& key, - const ACE_TCHAR* name, - ACE_TString& value) -{ - const ACE_TCHAR *t_name = temp_name (name); - if (validate_value_name (t_name)) - return -1; - - HKEY base_key; - if (load_key (key, base_key)) - return -1; - - // Get the size of the binary data from windows - int errnum; - DWORD buffer_length = 0; - DWORD type; - if ((errnum = ACE_TEXT_RegQueryValueEx (base_key, - t_name, - 0, - &type, - (BYTE *) 0, - &buffer_length)) != ERROR_SUCCESS) - { - errno = errnum; - return -1; - } - - if (type != REG_SZ) - { - errno = ERROR_INVALID_DATATYPE; - return -1; - } - - ACE_TCHAR *temp = 0; - ACE_NEW_RETURN (temp, - ACE_TCHAR[buffer_length], - -1); - - ACE_Auto_Basic_Array_Ptr buffer (temp); - - if ((errnum = ACE_TEXT_RegQueryValueEx (base_key, - t_name, - 0, - &type, - (BYTE *) buffer.get (), - &buffer_length)) != ERROR_SUCCESS) - { - errno = errnum; - return -1; - } - - value = buffer.get (); - return 0; -} - -int -ACE_Configuration_Win32Registry::get_integer_value (const ACE_Configuration_Section_Key& key, - const ACE_TCHAR* name, - u_int& value) -{ - const ACE_TCHAR *t_name = temp_name (name); - if (validate_value_name (t_name)) - return -1; - - HKEY base_key; - if (load_key (key, base_key)) - return -1; - - int errnum; - DWORD length = sizeof (value); - DWORD type; - if ((errnum = ACE_TEXT_RegQueryValueEx (base_key, - t_name, - 0, - &type, - (BYTE *) &value, - &length)) != ERROR_SUCCESS) - { - errno = errnum; - return -1; - } - - if (type != REG_DWORD) - { - errno = ERROR_INVALID_DATATYPE; - return -1; - } - - return 0; -} - -int -ACE_Configuration_Win32Registry::get_binary_value ( - const ACE_Configuration_Section_Key &key, - const ACE_TCHAR *name, - void *&data, - size_t &length) -{ - const ACE_TCHAR *t_name = temp_name (name); - if (validate_value_name (t_name)) - return -1; - - HKEY base_key; - if (load_key (key, base_key)) - return -1; - - // Get the size of the binary data from windows - int errnum; - DWORD buffer_length = 0; - DWORD type; - if ((errnum = ACE_TEXT_RegQueryValueEx (base_key, - t_name, - 0, - &type, - (BYTE *) 0, - &buffer_length)) != ERROR_SUCCESS) - { - errno = errnum; - return -1; - } - - if (type != REG_BINARY) - { - errno = ERROR_INVALID_DATATYPE; - return -1; - } - - length = buffer_length; - - BYTE * the_data = 0; - ACE_NEW_RETURN (the_data, BYTE[length], -1); - ACE_Auto_Basic_Array_Ptr safe_data (the_data); - - if ((errnum = ACE_TEXT_RegQueryValueEx (base_key, - t_name, - 0, - &type, - the_data, - &buffer_length)) != ERROR_SUCCESS) - { - data = 0; - errno = errnum; - return -1; - } - - data = safe_data.release (); - - return 0; -} - -int -ACE_Configuration_Win32Registry::find_value (const ACE_Configuration_Section_Key& key, - const ACE_TCHAR* name, - VALUETYPE& type_out) -{ - const ACE_TCHAR *t_name = temp_name (name); - if (validate_value_name (t_name)) - return -1; - - HKEY base_key; - if (load_key (key, base_key)) - return -1; - - DWORD buffer_length=0; - DWORD type; - int result=ACE_TEXT_RegQueryValueEx (base_key, - t_name, - 0, - &type, - 0, - &buffer_length); - if (result != ERROR_SUCCESS) - { - errno = result; - return -1; - } - - switch (type) - { - case REG_SZ: - type_out = STRING; - break; - case REG_DWORD: - type_out = INTEGER; - break; - case REG_BINARY: - type_out = BINARY; - break; - default: - return -1; // unknown type - } - - return 0; -} - -int -ACE_Configuration_Win32Registry::remove_value (const ACE_Configuration_Section_Key& key, - const ACE_TCHAR* name) -{ - const ACE_TCHAR *t_name = temp_name (name); - if (validate_value_name (t_name)) - return -1; - - HKEY base_key; - if (load_key (key, base_key)) - return -1; - - int errnum; - if ((errnum = ACE_TEXT_RegDeleteValue (base_key, t_name)) != ERROR_SUCCESS) - { - errno = errnum; - return -1; - } - - return 0; -} - - -int -ACE_Configuration_Win32Registry::load_key (const ACE_Configuration_Section_Key& key, - HKEY& hKey) -{ - ACE_Section_Key_Win32* pKey = dynamic_cast (get_internal_key (key)); - if (!pKey) - return -1; - - hKey = pKey->hKey_; - return 0; -} - -HKEY -ACE_Configuration_Win32Registry::resolve_key (HKEY hKey, - const ACE_TCHAR* path, - int create) -{ - HKEY result = 0; - // Make a copy of hKey - int errnum; -#if defined (ACE_HAS_WINCE) - if ((errnum = RegOpenKeyEx (hKey, 0, 0, 0, &result)) != ERROR_SUCCESS) -#else - if ((errnum = RegOpenKey (hKey, 0, &result)) != ERROR_SUCCESS) -#endif // ACE_HAS_WINCE - { - errno = errnum; - return 0; - } - - // recurse through the path - ACE_TCHAR *temp_path = 0; - ACE_NEW_RETURN (temp_path, - ACE_TCHAR[ACE_OS::strlen (path) + 1], - 0); - ACE_Auto_Basic_Array_Ptr pData (temp_path); - ACE_OS::strcpy (pData.get (), path); - ACE_Tokenizer parser (pData.get ()); - parser.delimiter_replace ('\\', '\0'); - parser.delimiter_replace ('/', '\0'); - - for (ACE_TCHAR *temp = parser.next (); - temp != 0; - temp = parser.next ()) - { - // Open the key - HKEY subkey; - -#if defined (ACE_HAS_WINCE) - if ((errnum = ACE_TEXT_RegOpenKeyEx (result, - temp, - 0, - 0, - &subkey)) != ERROR_SUCCESS) -#else - if ((errnum = ACE_TEXT_RegOpenKey (result, - temp, - &subkey)) != ERROR_SUCCESS) -#endif // ACE_HAS_WINCE - { - // try creating it - if (!create || (errnum = ACE_TEXT_RegCreateKeyEx (result, - temp, - 0, - 0, - 0, - KEY_ALL_ACCESS, - 0, - &subkey, - (PDWORD) 0 - )) !=ERROR_SUCCESS) - { - errno = errnum; - // error - ::RegCloseKey (result); - return 0; - } - } - // release our open key handle - ::RegCloseKey (result); - result = subkey; - } - - return result; -} - -#endif /* ACE_WIN32 && !ACE_LACKS_WIN32_REGISTRY */ - -/////////////////////////////////////////////////////////////// - -ACE_Configuration_Value_IntId::ACE_Configuration_Value_IntId (void) - : type_ (ACE_Configuration::INVALID), - length_ (0) -{ - this->data_.ptr_ = 0; -} - -ACE_Configuration_Value_IntId::ACE_Configuration_Value_IntId (ACE_TCHAR* string) - : type_ (ACE_Configuration::STRING), - length_ (0) -{ - this->data_.ptr_ = string; -} - -ACE_Configuration_Value_IntId::ACE_Configuration_Value_IntId (u_int integer) - : type_ (ACE_Configuration::INTEGER), - length_ (0) -{ - this->data_.int_ = integer; -} - -ACE_Configuration_Value_IntId::ACE_Configuration_Value_IntId (void* data, size_t length) - : type_ (ACE_Configuration::BINARY), - length_ (length) -{ - this->data_.ptr_ = data; -} - -ACE_Configuration_Value_IntId::ACE_Configuration_Value_IntId (const ACE_Configuration_Value_IntId& rhs) - : type_ (rhs.type_), - data_ (rhs.data_), - length_ (rhs.length_) -{ -} - -ACE_Configuration_Value_IntId::~ACE_Configuration_Value_IntId (void) -{ -} - -ACE_Configuration_Value_IntId& ACE_Configuration_Value_IntId::operator= (const ACE_Configuration_Value_IntId& rhs) -{ - if (this != &rhs) - { - type_ = rhs.type_; - data_ = rhs.data_; - length_ = rhs.length_; - } - return *this; -} - -void -ACE_Configuration_Value_IntId::free (ACE_Allocator *alloc) -{ - if (this->type_ == ACE_Configuration::STRING - || this->type_ == ACE_Configuration::BINARY) - alloc->free (data_.ptr_); - // Do nothing in other cases... -} - -ACE_Configuration_ExtId::ACE_Configuration_ExtId (void) - : name_ (0) -{ -} - -ACE_Configuration_ExtId::ACE_Configuration_ExtId (const ACE_TCHAR* name) - : name_ (name) -{ -} - -ACE_Configuration_ExtId::ACE_Configuration_ExtId (const ACE_Configuration_ExtId& rhs) - : name_ (rhs.name_) -{ -} - -ACE_Configuration_ExtId::~ACE_Configuration_ExtId (void) -{ -} - -ACE_Configuration_ExtId& ACE_Configuration_ExtId::operator= (const ACE_Configuration_ExtId& rhs) -{ - if (this != &rhs) - name_ = rhs.name_; - - return *this; -} - -bool -ACE_Configuration_ExtId::operator== (const ACE_Configuration_ExtId& rhs) const -{ - return (ACE_OS::strcasecmp (name_, rhs.name_) == 0); -} - -bool -ACE_Configuration_ExtId::operator!= (const ACE_Configuration_ExtId& rhs) const -{ - return !this->operator== (rhs); -} - -u_long -ACE_Configuration_ExtId::hash (void) const -{ - ACE_TString temp (name_, 0, false); - return temp.hash (); -} - -void -ACE_Configuration_ExtId::free (ACE_Allocator *alloc) -{ - alloc->free ((void *) (name_)); -} - -/////////////////////////////////////////////////////////////////////// - -ACE_Configuration_Section_IntId::ACE_Configuration_Section_IntId (void) - : value_hash_map_ (0), - section_hash_map_ (0) -{ -} - -ACE_Configuration_Section_IntId::ACE_Configuration_Section_IntId (VALUE_MAP* value_hash_map, SUBSECTION_MAP* section_hash_map) - : value_hash_map_ (value_hash_map), - section_hash_map_ (section_hash_map) -{ -} - -ACE_Configuration_Section_IntId::ACE_Configuration_Section_IntId (const ACE_Configuration_Section_IntId& rhs) - : value_hash_map_ (rhs.value_hash_map_), - section_hash_map_ (rhs.section_hash_map_) -{ - -} - -ACE_Configuration_Section_IntId::~ACE_Configuration_Section_IntId () -{ -} - -ACE_Configuration_Section_IntId& -ACE_Configuration_Section_IntId::operator= (const ACE_Configuration_Section_IntId& rhs) -{ - if (this != &rhs) - { - value_hash_map_ = rhs.value_hash_map_; - section_hash_map_ = rhs.section_hash_map_; - } - return *this; -} - -void -ACE_Configuration_Section_IntId::free (ACE_Allocator *alloc) -{ - alloc->free ((void *) (value_hash_map_)); - alloc->free ((void *) (section_hash_map_)); -} - -ACE_Configuration_Section_Key_Heap::ACE_Configuration_Section_Key_Heap (const ACE_TCHAR* path) - : path_ (0), - value_iter_ (0), - section_iter_ (0) -{ - path_ = ACE_OS::strdup (path); -} - -ACE_Configuration_Section_Key_Heap::~ACE_Configuration_Section_Key_Heap () -{ - delete value_iter_; - delete section_iter_; - ACE_OS::free (path_); -} - -////////////////////////////////////////////////////////////////////////////// - -ACE_Configuration_Heap::ACE_Configuration_Heap (void) - : allocator_ (0), - index_ (0), - default_map_size_ (0) -{ - ACE_Configuration_Section_Key_Heap *temp = 0; - - ACE_NEW (temp, ACE_Configuration_Section_Key_Heap (ACE_TEXT (""))); - root_ = ACE_Configuration_Section_Key (temp); -} - -ACE_Configuration_Heap::~ACE_Configuration_Heap (void) -{ - if (allocator_) - allocator_->sync (); - - delete allocator_; -} - -int -ACE_Configuration_Heap::open (size_t default_map_size) -{ - if (this->allocator_ != 0) - { - errno = EBUSY; - return -1; - } - - default_map_size_ = default_map_size; - // Create the allocator with the appropriate options. - // The name used for the lock is the same as one used - // for the file. - ACE_NEW_RETURN (this->allocator_, - HEAP_ALLOCATOR (), - -1); - return create_index (); -} - - -int -ACE_Configuration_Heap::open (const ACE_TCHAR* file_name, - void* base_address, - size_t default_map_size) -{ - if (this->allocator_ != 0) - { - errno = EBUSY; - return -1; - } - - default_map_size_ = default_map_size; - - // Make sure that the file name is of the legal length. - if (ACE_OS::strlen (file_name) >= MAXNAMELEN + MAXPATHLEN) - { - errno = ENAMETOOLONG; - return -1; - } - - ACE_MMAP_Memory_Pool::OPTIONS options (base_address); - - // Create the allocator with the appropriate options. The name used - // for the lock is the same as one used for the file. - ACE_NEW_RETURN (this->allocator_, - PERSISTENT_ALLOCATOR (file_name, - file_name, - &options), - -1); - -#if !defined (ACE_LACKS_ACCESS) - // Now check if the backing store has been created successfully. - if (ACE_OS::access (file_name, F_OK) != 0) - ACELIB_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("create_index\n")), - -1); -#endif /* ACE_LACKS_ACCESS */ - - return create_index (); -} - -int -ACE_Configuration_Heap::create_index (void) -{ - void *section_index = 0; - - // This is the easy case since if we find hash table in the - // memory-mapped file we know it's already initialized. - if (this->allocator_->find (ACE_CONFIG_SECTION_INDEX, section_index) == 0) - this->index_ = (SECTION_MAP *) section_index; - - // Create a new (because we've just created a new - // memory-mapped file). - else - { - size_t index_size = sizeof (SECTION_MAP); - section_index = this->allocator_->malloc (index_size); - - if (section_index == 0 - || create_index_helper (section_index) == -1 - || this->allocator_->bind (ACE_CONFIG_SECTION_INDEX, - section_index) == -1) - { - // Attempt to clean up. - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("create_index failed\n"))); - this->allocator_->remove (); - return -1; - } - // Add the root section - return new_section (ACE_TEXT (""), root_); - } - return 0; -} - -int -ACE_Configuration_Heap::create_index_helper (void *buffer) -{ - ACE_ASSERT (this->allocator_); - this->index_ = new (buffer) SECTION_MAP (this->allocator_); - return 0; -} - -int -ACE_Configuration_Heap::load_key (const ACE_Configuration_Section_Key& key, - ACE_TString& name) -{ - ACE_ASSERT (this->allocator_); - ACE_Configuration_Section_Key_Heap* pKey = - dynamic_cast (get_internal_key (key)); - - if (!pKey) - { - return -1; - } - - ACE_TString temp (pKey->path_, 0, false); - name.assign_nocopy (temp); - return 0; -} - - -int -ACE_Configuration_Heap::add_section (const ACE_Configuration_Section_Key& base, - const ACE_TCHAR* sub_section, - ACE_Configuration_Section_Key& result) -{ - ACE_ASSERT (this->allocator_); - ACE_TString section; - if (load_key (base, section)) - return -1; - - // Find the base section - ACE_Configuration_ExtId ExtId (section.fast_rep ()); - ACE_Configuration_Section_IntId IntId; - if (index_->find (ExtId, IntId, allocator_)) - return -1; - - // See if this section already exists - ACE_Configuration_ExtId SubSectionExtId (sub_section); - int ignored = 0; - - if (!IntId.section_hash_map_->find (SubSectionExtId, ignored, allocator_)) - { - // already exists! - errno = EEXIST; - return -1; - } - - // Create the new section name - // only prepend a separater if were not at the root - if (section.length ()) - section += ACE_TEXT ("\\"); - - section += sub_section; - - // Add it to the base section - ACE_TCHAR* pers_name = (ACE_TCHAR *) allocator_->malloc ((ACE_OS::strlen (sub_section) + 1) * sizeof (ACE_TCHAR)); - ACE_OS::strcpy (pers_name, sub_section); - ACE_Configuration_ExtId SSExtId (pers_name); - if (IntId.section_hash_map_->bind (SSExtId, ignored, allocator_)) - { - allocator_->free (pers_name); - return -1; - } - return (new_section (section, result)); -} - -int -ACE_Configuration_Heap::new_section (const ACE_TString& section, - ACE_Configuration_Section_Key& result) -{ - ACE_ASSERT (this->allocator_); - // Create a new section and add it to the global list - - // Allocate memory for items to be stored in the table. - size_t section_len = section.length () + 1; - ACE_TCHAR *ptr = (ACE_TCHAR*) this->allocator_->malloc (section_len * sizeof (ACE_TCHAR)); - - int return_value = -1; - - if (ptr == 0) - return -1; - else - { - // Populate memory with data. - ACE_OS::strcpy (ptr, section.fast_rep ()); - - void *value_hash_map = 0; - size_t map_size = sizeof (VALUE_MAP); - value_hash_map = this->allocator_->malloc (map_size); - - // If allocation failed ... - if (value_hash_map == 0) - return -1; - - // Initialize allocated hash map through placement new. - if (value_open_helper (default_map_size_, value_hash_map ) == -1) - { - this->allocator_->free (value_hash_map ); - return -1; - } - - // create the section map - void* section_hash_map = 0; - map_size = sizeof (SUBSECTION_MAP); - section_hash_map = this->allocator_->malloc (map_size); - - // If allocation failed - if (section_hash_map == 0) - return -1; - - // initialize allocated hash map through placement new - if (section_open_helper (default_map_size_, section_hash_map) == -1) - { - this->allocator_->free (value_hash_map ); - this->allocator_->free (section_hash_map); - return -1; - } - - ACE_Configuration_ExtId name (ptr); - ACE_Configuration_Section_IntId entry ((VALUE_MAP*) value_hash_map, - (SUBSECTION_MAP*) section_hash_map); - - // Do a normal bind. This will fail if there's already an - // entry with the same name. - return_value = this->index_->bind (name, entry, this->allocator_); - - if (return_value == 1 /* Entry already existed so bind failed. */ - || return_value == -1 /* Unable to bind for other reasons. */) - { - // Free our dynamically allocated memory. - this->allocator_->free (static_cast (ptr)); - return return_value; - } - - // If bind () succeed, it will automatically sync - // up the map manager entry. However, we must sync up our - // name/value memory. - this->allocator_->sync (ptr, section_len); - } - - // set the result - ACE_Configuration_Section_Key_Heap *temp; - ACE_NEW_RETURN (temp, - ACE_Configuration_Section_Key_Heap (ptr), - -1); - result = ACE_Configuration_Section_Key (temp); - return return_value; -} - -int -ACE_Configuration_Heap::value_open_helper (size_t hash_table_size, - void *buffer) -{ - ACE_ASSERT (this->allocator_); - new (buffer) VALUE_MAP (hash_table_size, this->allocator_); - return 0; -} - -int -ACE_Configuration_Heap::section_open_helper (size_t hash_table_size, - void *buffer) -{ - ACE_ASSERT (this->allocator_); - new (buffer) SUBSECTION_MAP (hash_table_size, this->allocator_); - return 0; -} - -int -ACE_Configuration_Heap::open_section (const ACE_Configuration_Section_Key& base, - const ACE_TCHAR* sub_section, - int create, - ACE_Configuration_Section_Key& result) -{ - ACE_ASSERT (this->allocator_); - if (validate_name (sub_section, 1)) // 1 == allow_path - return -1; - - result = base; - - for (const ACE_TCHAR* separator; - (separator = ACE_OS::strchr (sub_section, ACE_TEXT ('\\'))) != 0; - ) - { - ACE_TString simple_section (sub_section, separator - sub_section); - int ret_val = - open_simple_section (result, simple_section.c_str (), create, result); - if (ret_val) - return ret_val; - sub_section = separator + 1; - } - - return open_simple_section (result, sub_section, create, result); -} - -int -ACE_Configuration_Heap::open_simple_section (const ACE_Configuration_Section_Key& base, - const ACE_TCHAR* sub_section, - int create, - ACE_Configuration_Section_Key& result) -{ - ACE_TString section (0, 0, false); - - if (load_key (base, section)) - { - return -1; - } - - // Only add the \\ if were not at the root - if (section.length ()) - { - section += ACE_TEXT ("\\"); - } - - section += sub_section; - - // resolve the section - ACE_Configuration_ExtId ExtId (section.fast_rep ()); - ACE_Configuration_Section_IntId IntId; - - if (index_->find (ExtId, IntId, allocator_)) - { - if (!create) - { - errno = ENOENT; - return -1; - } - - return add_section (base, sub_section, result); - } - - ACE_Configuration_Section_Key_Heap *temp; - ACE_NEW_RETURN (temp, - ACE_Configuration_Section_Key_Heap (section.fast_rep ()), - -1); - result = ACE_Configuration_Section_Key (temp); - return 0; -} - -int -ACE_Configuration_Heap::remove_section (const ACE_Configuration_Section_Key& key, - const ACE_TCHAR* sub_section, - bool recursive) -{ - ACE_ASSERT (this->allocator_); - if (validate_name (sub_section)) - return -1; - - ACE_TString section; - if (load_key (key, section)) - return -1; - - // Find this key - ACE_Configuration_ExtId ParentExtId (section.fast_rep ()); - ACE_Configuration_Section_IntId ParentIntId; - if (index_->find (ParentExtId, ParentIntId, allocator_)) - return -1;// no parent key - - // Find this subkey - if (section.length ()) - section += ACE_TEXT ("\\"); - - section += sub_section; - ACE_Configuration_ExtId SectionExtId (section.fast_rep ()); - SECTION_HASH::ENTRY* section_entry = 0; - SECTION_HASH* hashmap = index_; - if (hashmap->find (SectionExtId, section_entry)) - return -1; - - if (recursive) - { - ACE_Configuration_Section_Key recursive_section; - if (open_section (key, sub_section, 0, recursive_section)) - return -1; - - int index = 0; - ACE_TString name; - while (!enumerate_sections (recursive_section, index, name)) - { - if (remove_section (recursive_section, name.fast_rep (), true)) - return -1; - - ++index; - } - } - - // Now make sure we dont have any subkeys - if (section_entry->int_id_.section_hash_map_->current_size ()) - { - errno = ENOTEMPTY; - return -1; - } - - // Now remove subkey from parent key - ACE_Configuration_ExtId SubSExtId (sub_section); - SUBSECTION_HASH::ENTRY* subsection_entry = 0; - if (((SUBSECTION_HASH*)ParentIntId.section_hash_map_)-> - find (SubSExtId, subsection_entry)) - return -1; - - if (ParentIntId.section_hash_map_->unbind (SubSExtId, allocator_)) - return -1; - - subsection_entry->ext_id_.free (allocator_); - - // Remember the pointers so we can free them after we unbind - ACE_Configuration_ExtId ExtIdToFree (section_entry->ext_id_); - ACE_Configuration_Section_IntId IntIdToFree (section_entry->int_id_); - - // iterate over all values and free memory - VALUE_HASH* value_hash_map = section_entry->int_id_.value_hash_map_; - VALUE_HASH::ITERATOR value_iter = value_hash_map->begin (); - while (!value_iter.done ()) - { - VALUE_HASH::ENTRY* value_entry = 0; - if (!value_iter.next (value_entry)) - return 1; - - value_entry->ext_id_.free (allocator_); - value_entry->int_id_.free (allocator_); - - value_iter.advance (); - } - - // remove it - if (index_->unbind (SectionExtId, allocator_)) - return -1; - - value_hash_map->close (); - section_entry->int_id_.section_hash_map_->close (allocator_); - - // Free the memory - ExtIdToFree.free (allocator_); - IntIdToFree.free (allocator_); - - return 0; -} - -int -ACE_Configuration_Heap::enumerate_values (const ACE_Configuration_Section_Key& key, - int index, - ACE_TString& name, - VALUETYPE& type) -{ - ACE_ASSERT (this->allocator_); - ACE_Configuration_Section_Key_Heap* pKey = - dynamic_cast (get_internal_key (key)); - if (!pKey) - return -1; - - name = pKey->path_; - - // resolve the section - ACE_Configuration_ExtId ExtId (pKey->path_); - ACE_Configuration_Section_IntId IntId; - if (index_->find (ExtId, IntId, allocator_)) - return -1; - - // Handle iterator resets - if (index == 0) - { - ACE_Hash_Map_Manager_Ex, - ACE_Equal_To, - ACE_Null_Mutex>* hash_map = IntId.value_hash_map_; - delete pKey->value_iter_; - - ACE_NEW_RETURN (pKey->value_iter_, - VALUE_HASH::ITERATOR (hash_map->begin ()), - -1); - } - - // Get the next entry - ACE_Hash_Map_Entry* entry = 0; - - if (!pKey->value_iter_->next (entry)) - return 1; - - // Return the value of the iterator and advance it - name = entry->ext_id_.name_; - type = entry->int_id_.type_; - pKey->value_iter_->advance (); - - return 0; -} - -int -ACE_Configuration_Heap::enumerate_sections (const ACE_Configuration_Section_Key& key, - int index, - ACE_TString& name) -{ - ACE_ASSERT (this->allocator_); - // cast to a heap section key - ACE_Configuration_Section_Key_Heap* pKey = - dynamic_cast (get_internal_key (key)); - if (!pKey) - return -1; // not a heap key! - - // resolve the section - ACE_Configuration_ExtId ExtId (pKey->path_); - ACE_Configuration_Section_IntId IntId; - if (index_->find (ExtId, IntId, allocator_)) - return -1; // unknown section - - // Handle iterator resets - if (index == 0) - { - if (pKey->section_iter_) - delete pKey->section_iter_; - - ACE_NEW_RETURN (pKey->section_iter_, - SUBSECTION_HASH::ITERATOR (IntId.section_hash_map_->begin ()), - -1); - } - - // Get the next entry - ACE_Hash_Map_Entry* entry = 0; - if (!pKey->section_iter_->next (entry)) - return 1; - - // Return the value of the iterator and advance it - pKey->section_iter_->advance (); - name = entry->ext_id_.name_; - - return 0; -} - -int -ACE_Configuration_Heap::set_string_value (const ACE_Configuration_Section_Key& key, - const ACE_TCHAR* name, - const ACE_TString& value) -{ - ACE_ASSERT (this->allocator_); - const ACE_TCHAR *t_name = name ? name : &this->NULL_String_; - if (validate_value_name (t_name)) - return -1; - - ACE_TString section; - if (load_key (key, section)) - return -1; - - ACE_Configuration_ExtId section_ext (section.fast_rep ()); - ACE_Configuration_Section_IntId section_int; - if (index_->find (section_ext, section_int, allocator_)) - return -1; - - // Get the entry for this item (if it exists) - VALUE_HASH::ENTRY* entry = 0; - ACE_Configuration_ExtId item_name (t_name); - if (section_int.value_hash_map_->VALUE_HASH::find (item_name, entry) == 0) - { - // found item, replace it - // Free the old value - entry->int_id_.free (allocator_); - // Allocate the new value in this heap - ACE_TCHAR* pers_value = - (ACE_TCHAR *) allocator_->malloc ((value.length () + 1) * sizeof (ACE_TCHAR)); - ACE_OS::strcpy (pers_value, value.fast_rep ()); - ACE_Configuration_Value_IntId new_value_int (pers_value); - entry->int_id_ = new_value_int; - } - else - { - // it doesn't exist, bind it - ACE_TCHAR* pers_name = - (ACE_TCHAR *) allocator_->malloc ((ACE_OS::strlen (t_name) + 1) * sizeof (ACE_TCHAR)); - ACE_OS::strcpy (pers_name, t_name); - ACE_TCHAR* pers_value = - (ACE_TCHAR *) allocator_->malloc ((value.length () + 1) * sizeof (ACE_TCHAR)); - ACE_OS::strcpy (pers_value, value.fast_rep ()); - ACE_Configuration_ExtId new_item_name (pers_name); - ACE_Configuration_Value_IntId item_value (pers_value); - if (section_int.value_hash_map_->bind (new_item_name, item_value, allocator_)) - { - allocator_->free (pers_value); - allocator_->free (pers_name); - return -1; - } - return 0; - } - - return 0; -} - -int -ACE_Configuration_Heap::set_integer_value (const ACE_Configuration_Section_Key& key, - const ACE_TCHAR* name, - u_int value) -{ - ACE_ASSERT (this->allocator_); - const ACE_TCHAR *t_name = name ? name : &this->NULL_String_; - if (validate_value_name (t_name)) - return -1; - - // Get the section name from the key - ACE_TString section; - if (load_key (key, section)) - return -1; - - // Find this section - ACE_Configuration_ExtId section_ext (section.fast_rep ()); - ACE_Configuration_Section_IntId section_int; - if (index_->find (section_ext, section_int, allocator_)) - return -1; // section does not exist - - // Get the entry for this item (if it exists) - VALUE_HASH::ENTRY* entry = 0; - ACE_Configuration_ExtId item_name (t_name); - if (section_int.value_hash_map_->VALUE_HASH::find (item_name, entry) == 0) - { - // found item, replace it - ACE_Configuration_Value_IntId new_value_int (value); - entry->int_id_ = new_value_int; - } - else - { - // it doesn't exist, bind it - ACE_TCHAR* pers_name = - (ACE_TCHAR *) allocator_->malloc ((ACE_OS::strlen (t_name) + 1) * sizeof (ACE_TCHAR)); - ACE_OS::strcpy (pers_name, t_name); - ACE_Configuration_ExtId item_name (pers_name); - ACE_Configuration_Value_IntId item_value (value); - if (section_int.value_hash_map_->bind (item_name, item_value, allocator_)) - { - allocator_->free (pers_name); - return -1; - } - return 0; - } - - return 0; -} - -int -ACE_Configuration_Heap::set_binary_value (const ACE_Configuration_Section_Key& key, - const ACE_TCHAR* name, - const void* data, - size_t length) -{ - ACE_ASSERT (this->allocator_); - const ACE_TCHAR *t_name = name ? name : &this->NULL_String_; - if (validate_value_name (t_name)) - return -1; - - // Get the section name from the key - ACE_TString section; - if (load_key (key, section)) - return -1; - - // Find this section - ACE_Configuration_ExtId section_ext (section.fast_rep ()); - ACE_Configuration_Section_IntId section_int; - if (index_->find (section_ext, section_int, allocator_)) - return -1; // section does not exist - - // Get the entry for this item (if it exists) - VALUE_HASH::ENTRY* entry = 0; - ACE_Configuration_ExtId item_name (t_name); - if (section_int.value_hash_map_->VALUE_HASH::find (item_name, entry) == 0) - { - // found item, replace it - // Free the old value - entry->int_id_.free (allocator_); - // Allocate the new value in this heap - ACE_TCHAR* pers_value = (ACE_TCHAR *) allocator_->malloc (length); - ACE_OS::memcpy (pers_value, data, length); - ACE_Configuration_Value_IntId new_value_int (pers_value, length); - entry->int_id_ = new_value_int; - } - else - { - // it doesn't exist, bind it - ACE_TCHAR* pers_name = - (ACE_TCHAR *) allocator_->malloc ((ACE_OS::strlen (t_name) + 1) * sizeof (ACE_TCHAR)); - ACE_OS::strcpy (pers_name, t_name); - ACE_TCHAR* pers_value = (ACE_TCHAR *) allocator_->malloc (length); - ACE_OS::memcpy (pers_value, data, length); - ACE_Configuration_ExtId item_name (pers_name); - ACE_Configuration_Value_IntId item_value (pers_value, length); - if (section_int.value_hash_map_->bind (item_name, item_value, allocator_)) - { - allocator_->free (pers_value); - allocator_->free (pers_name); - return -1; - } - return 0; - } - - return 0; -} - -int -ACE_Configuration_Heap::get_string_value (const ACE_Configuration_Section_Key& key, - const ACE_TCHAR* name, - ACE_TString& value) -{ - ACE_ASSERT (this->allocator_); - const ACE_TCHAR *t_name = name ? name : &this->NULL_String_; - if (validate_value_name (t_name)) - return -1; - - // Get the section name from the key - ACE_TString section; - if (load_key (key, section)) - return -1; - - // Find this section - ACE_Configuration_ExtId ExtId (section.fast_rep ()); - ACE_Configuration_Section_IntId IntId; - if (index_->find (ExtId, IntId, allocator_)) - return -1; // section does not exist - - // See if it exists first - ACE_Configuration_ExtId VExtId (t_name); - ACE_Configuration_Value_IntId VIntId; - if (IntId.value_hash_map_->find (VExtId, VIntId, allocator_)) - return -1; // unknown value - - // Check type - if (VIntId.type_ != ACE_Configuration::STRING) - { - errno = ENOENT; - return -1; - } - - // everythings ok, return the data - value = static_cast (VIntId.data_.ptr_); - return 0; -} - -int -ACE_Configuration_Heap::get_integer_value (const ACE_Configuration_Section_Key& key, - const ACE_TCHAR* name, - u_int& value) -{ - ACE_ASSERT (this->allocator_); - - const ACE_TCHAR *t_name = name ? name : &this->NULL_String_; - if (validate_value_name (t_name)) - return -1; - - // Get the section name from the key - ACE_TString section (0, 0, false); - - if (this->load_key (key, section) != 0) - { - return -1; - } - - // Find this section - ACE_Configuration_ExtId ExtId (section.fast_rep ()); - ACE_Configuration_Section_IntId IntId; - - if (index_->find (ExtId, IntId, allocator_) != 0) - { - return -1; // section does not exist - } - - - // See if it exists first - ACE_Configuration_ExtId VExtId (t_name); - ACE_Configuration_Value_IntId VIntId; - - if (IntId.value_hash_map_->find (VExtId, VIntId, allocator_) != 0) - { - return -1; // unknown value - } - - // Check type - if (VIntId.type_ != ACE_Configuration::INTEGER) - { - errno = ENOENT; - return -1; - } - - // Everythings ok, return the data - value = VIntId.data_.int_; - return 0; -} - -int -ACE_Configuration_Heap::get_binary_value ( - const ACE_Configuration_Section_Key& key, - const ACE_TCHAR* name, - void*& data, - size_t& length) -{ - ACE_ASSERT (this->allocator_); - const ACE_TCHAR *t_name = name ? name : &this->NULL_String_; - if (validate_value_name (t_name)) - return -1; - - // Get the section name from the key - ACE_TString section; - if (load_key (key, section)) - return -1; - - // Find this section - ACE_Configuration_ExtId ExtId (section.fast_rep ()); - ACE_Configuration_Section_IntId IntId; - if (index_->find (ExtId, IntId, allocator_)) - return -1; // section does not exist - - ACE_Configuration_ExtId VExtId (t_name); - ACE_Configuration_Value_IntId VIntId; - // See if it exists first - if (IntId.value_hash_map_->find (VExtId, VIntId, allocator_)) - return -1; // unknown value - - // Check type - if (VIntId.type_ != ACE_Configuration::BINARY) - { - errno = ENOENT; - return -1; - } - - // Make a copy - ACE_NEW_RETURN (data, char[VIntId.length_], -1); - ACE_OS::memcpy (data, VIntId.data_.ptr_, VIntId.length_); - length = VIntId.length_; - return 0; -} - -int -ACE_Configuration_Heap::find_value (const ACE_Configuration_Section_Key& key, - const ACE_TCHAR* name, - VALUETYPE& type_out) -{ - ACE_ASSERT (this->allocator_); - const ACE_TCHAR *t_name = name ? name : &this->NULL_String_; - if (validate_value_name (t_name)) - return -1; - - // Get the section name from the key - ACE_TString section; - if (load_key (key, section)) - return -1; - - // Find this section - ACE_Configuration_ExtId ExtId (section.fast_rep ()); - ACE_Configuration_Section_IntId IntId; - if (index_->find (ExtId, IntId, allocator_)) - return -1; // section does not exist - - // Find it - ACE_Configuration_ExtId ValueExtId (t_name); - VALUE_HASH::ENTRY* value_entry = 0; - if (((VALUE_HASH *) IntId.value_hash_map_)->find (ValueExtId, value_entry)) - return -1; // value does not exist - - type_out = value_entry->int_id_.type_; - return 0; -} - -int -ACE_Configuration_Heap::remove_value (const ACE_Configuration_Section_Key& key, - const ACE_TCHAR* name) -{ - ACE_ASSERT (this->allocator_); - const ACE_TCHAR *t_name = name ? name : &this->NULL_String_; - if (validate_value_name (t_name)) - return -1; - - // Get the section name from the key - ACE_TString section; - if (load_key (key, section)) - return -1; - - // Find this section - ACE_Configuration_ExtId ExtId (section.fast_rep ()); - ACE_Configuration_Section_IntId IntId; - if (index_->find (ExtId, IntId, allocator_)) - return -1; // section does not exist - - // Find it - ACE_Configuration_ExtId ValueExtId (t_name); - VALUE_HASH::ENTRY* value_entry = 0; - if (((VALUE_HASH *) IntId.value_hash_map_)->find (ValueExtId, value_entry)) - return -1; - - // free it - value_entry->ext_id_.free (allocator_); - value_entry->int_id_.free (allocator_); - - // Unbind it - if (IntId.value_hash_map_->unbind (ValueExtId, allocator_)) - return -1; - - return 0; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Configuration.h b/modules/worldengine/deps/acelite/ace/Configuration.h deleted file mode 100644 index fc96cacc51..0000000000 --- a/modules/worldengine/deps/acelite/ace/Configuration.h +++ /dev/null @@ -1,898 +0,0 @@ -/* -*- C++ -*- */ - -//============================================================================= -/** - * @file Configuration.h - * - * @author Chris Hafey - * - * The ACE configuration API provides a portable abstraction for - * program configuration similar to the Microsoft Windows registry. - * The API supports a tree based hierarchy of configuration sections. Each - * section contains other sections or values. Values may contain string, - * unsigned integer and binary data. - * - * @note These classes are not thread safe, if multiple threads use these - * classes, you are responsible for serializing access. - * - * For examples of using this class, see: - * -# The test code in ACE_wrappers/test - * -# wxConfigViewer, a Windows like Registry Editor for ACE_Configuration - * -# TAO's IFR, it makes extensive use of ACE_Configuration - * - * @todo Templatize this class with an ACE_LOCK to provide thread safety - */ -//============================================================================= - -#ifndef ACE_CONFIGURATION_H -#define ACE_CONFIGURATION_H -#include /**/ "ace/pre.h" - -#include "ace/SStringfwd.h" -#include "ace/Hash_Map_With_Allocator_T.h" -#include "ace/Malloc_T.h" -#include "ace/MMAP_Memory_Pool.h" -#include "ace/Local_Memory_Pool.h" -#include "ace/Synch_Traits.h" - - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -// configurable parameters - -#if !defined (ACE_CONFIG_SECTION_INDEX) -# define ACE_CONFIG_SECTION_INDEX "Config_Section_Index" -#endif /* ! ACE_CONFIG_SECTION_INDEX */ - -#if !defined (ACE_DEFAULT_CONFIG_SECTION_SIZE) -#define ACE_DEFAULT_CONFIG_SECTION_SIZE 16 -#endif /* ACE_DEFAULT_CONFIG_SECTION_SIZE */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_Section_Key_Internal - * - * @internal - * - * @brief A base class for internal handles to section keys for - * configuration implementations - * - * Implementations subclass this base class to represent a - * section key. - */ -class ACE_Export ACE_Section_Key_Internal -{ -public: - /// Virtual destructor, make sure descendants are virtual! - virtual ~ACE_Section_Key_Internal (void); - - /// Increment reference count - virtual int add_ref (void); - - /// Decrement reference count. Will delete this if count gets to 0 - virtual int dec_ref (void); -protected: - ACE_Section_Key_Internal (void); - ACE_Section_Key_Internal (const ACE_Section_Key_Internal& rhs); - ACE_Section_Key_Internal& operator= (ACE_Section_Key_Internal& rhs); - - u_int ref_count_; -}; - -/** - * @class ACE_Configuration_Section_Key - * - * @brief Reference counted wrapper for ACE_Section_Key_Internal. - * - * Reference counted wrapper class for the abstract internal - * section key. A user gets one of these to represent a section - * in the configuration database. - */ -class ACE_Export ACE_Configuration_Section_Key -{ - friend class ACE_Configuration; -public: - /// Default constructor. - ACE_Configuration_Section_Key (void); - - /// Constructor that initializes to a pointer to a concrete internal key. - /** - * @param key The section key to reference. Calls add_ref() with @a key. - */ - explicit ACE_Configuration_Section_Key (ACE_Section_Key_Internal *key); - - /// Copy constructor, increments the reference count on the key. - ACE_Configuration_Section_Key (const ACE_Configuration_Section_Key &rhs); - - /// Destructor, decrements reference count on the referenced key. - ~ACE_Configuration_Section_Key (void); - - /// Assignment operator, increments reference count for this object - /// and decrements it on @a rhs. - ACE_Configuration_Section_Key & - operator= (const ACE_Configuration_Section_Key &rhs); -private: - ACE_Section_Key_Internal *key_; -}; - -/** - * @class ACE_Configuration - * - * @internal - * - * @brief Base class for configuration databases - * - * This class provides an interface for configuration databases. A concrete - * class is required that implements the interface. - * - * @sa ACE_Configuration_Heap - * @sa ACE_Configuration_Win32Registry - */ -class ACE_Export ACE_Configuration -{ -public: - /// Enumeration for the various types of values we can store. - enum VALUETYPE - { - STRING, - INTEGER, - BINARY, - INVALID - }; - - /// Destructor - virtual ~ACE_Configuration (void); - - /// Obtain a reference to the root section of this configuration. - /* - * @return Reference to the configuration's root section. Note that - * it is a const reference. - */ - virtual const ACE_Configuration_Section_Key& root_section (void) const; - - /** - * Opens a named section in an existing section. - * - * @param base Existing section in which to open the named section. - * @param sub_section Name of the section to open. - * @param create If zero, the named section must exist. If non-zero, - * the named section will be created if it does not exist. - * @param result Reference; receives the section key for the new - * section. - * - * @retval 0 for success. - * @retval -1 for error; ACE_OS::last_error() retrieves error code. - */ - virtual int open_section (const ACE_Configuration_Section_Key &base, - const ACE_TCHAR *sub_section, - int create, - ACE_Configuration_Section_Key& result) = 0; - - /// Removes a named section. - /** - * @param key Section key to remove the named section from. - * @param sub_section Name of the section to remove. - * @param recursive If true, any subkeys below @a sub_section are - * removed as well. - * - * @retval 0 for success. - * @retval -1 for error; ACE_OS::last_error() retrieves error code. - */ - virtual int remove_section (const ACE_Configuration_Section_Key &key, - const ACE_TCHAR *sub_section, - bool recursive) = 0; - - /** - * Enumerates through the values in a section. - * - * @param key Section key to iterate through. - * @param index Iteration position. Must be zero on the first call to - * iterate through @a key. Increment @a index by one on each - * successive call to this method. - * @param name Receives the value's name. - * @param type Receives the value's data type. - * - * @note You may not delete or add values while enumerating. If the - * section is modified during enumeration, results are undefined; - * you must restart the enumeration from index 0. - * - * @retval 0 for success, @a name and @a type are valid. - * @retval 1 there are no more values in the section. - * @retval -1 for error; ACE_OS::last_error() retrieves error code. - */ - virtual int enumerate_values (const ACE_Configuration_Section_Key& key, - int index, - ACE_TString& name, - VALUETYPE& type) = 0; - - /** - * Enumerates through the subsections in a section. - * - * @param key Section key to iterate through. - * @param index Iteration position. Must be zero on the first call to - * iterate through @a key. Increment @a index by one on each - * successive call to this method. - * @param name Receives the subsection's name. - * - * @note You may not modify the @a key section while enumerating. If the - * section is modified during enumeration, results are undefined; - * you must restart the enumeration from index 0. - * - * @retval 0 for success, @a name has a valid name. - * @retval 1 there are no more subsections in the section. - * @retval -1 for error; ACE_OS::last_error() retrieves error code. - */ - virtual int enumerate_sections (const ACE_Configuration_Section_Key& key, - int index, ACE_TString& name) = 0; - - /// Sets a string-typed value. - /** - * @param key Configuration section to set the value in. - * @param name Name of the configuration value to set. If a value with - * the specified name exists, it is replaced. - * @param value The string to set the configuration value to. - * - * @retval 0 for success. - * @retval -1 for error; ACE_OS::last_error() retrieves error code. - */ - virtual int set_string_value (const ACE_Configuration_Section_Key& key, - const ACE_TCHAR* name, - const ACE_TString& value) = 0; - - /// Sets a integer-typed value. - /** - * @param key Configuration section to set the value in. - * @param name Name of the configuration value to set. If a value with - * the specified name exists, it is replaced. - * @param value The integer to set the configuration value to. - * - * @retval 0 for success. - * @retval -1 for error; ACE_OS::last_error() retrieves error code. - */ - virtual int set_integer_value (const ACE_Configuration_Section_Key& key, - const ACE_TCHAR* name, - u_int value) = 0; - - /// Sets a binary-typed value. - /** - * @param key Configuration section to set the value in. - * @param name Name of the configuration value to set. If a value with - * the specified name exists, it is replaced. - * @param data Pointer to the binary data for the value. - * @param length Number of bytes for the new value. - * - * @retval 0 for success. - * @retval -1 for error; ACE_OS::last_error() retrieves error code. - */ - virtual int set_binary_value (const ACE_Configuration_Section_Key& key, - const ACE_TCHAR* name, - const void* data, - size_t length) = 0; - - /// Gets a string-typed value. - /** - * @param key Configuration section to get the value from. - * @param name Name of the configuration value to get. - * @param value Receives the configuration value if it exists and - * has type STRING. - * - * @retval 0 for success. - * @retval -1 for error; ACE_OS::last_error() retrieves error code. - */ - virtual int get_string_value (const ACE_Configuration_Section_Key& key, - const ACE_TCHAR* name, - ACE_TString& value) = 0; - - /// Gets an integer-typed value. - /** - * @param key Configuration section to get the value from. - * @param name Name of the configuration value to get. - * @param value Receives the configuration value if it exists and - * has type INTEGER. - * - * @retval 0 for success. - * @retval -1 for error; ACE_OS::last_error() retrieves error code. - */ - virtual int get_integer_value (const ACE_Configuration_Section_Key& key, - const ACE_TCHAR* name, - u_int& value) = 0; - - /// Gets a binary-typed value. - /** - * @param key Configuration section to get the value from. - * @param name Name of the configuration value to get. - * @param data Receives a pointer to memory holding the binary data - * for the value. This method allocates the memory pointed - * to using operator new[]. The caller is responsible for - * freeing the memory using operator delete[]. - * @param length Receives the number of bytes in the value. - * - * @retval 0 for success; caller is responsible for freeing the - * returned memory. - * @retval -1 for error; ACE_OS::last_error() retrieves error code. - */ - virtual int get_binary_value (const ACE_Configuration_Section_Key& key, - const ACE_TCHAR* name, - void*& data, - size_t& length) = 0; - - /** - * Retrieves the type of a named configuration value. - * - * @param key Configuration section to look up the name in. - * @param name Name of the configuration value to get the type of. - * @param type Receives the data type of the named value, if it exists. - * - * @retval 0 for success. - * @retval -1 for error; ACE_OS::last_error() retrieves error code. - */ - virtual int find_value(const ACE_Configuration_Section_Key& key, - const ACE_TCHAR* name, - VALUETYPE& type) = 0; - - /// Removes a named value. - /** - * @param key Configuration section to remove the named value from. - * @param name Name of the configuration value to remove. - * - * @retval 0 for success. - * @retval -1 for error; ACE_OS::last_error() retrieves error code. - */ - virtual int remove_value (const ACE_Configuration_Section_Key& key, - const ACE_TCHAR* name) = 0; - - /** - * Expands @a path_in to @a key_out from @a key. If create is true, - * the subsections are created. Returns 0 on success, non zero on - * error The path consists of sections separated by the backslash - * '\' or forward slash '/'. - * Returns 0 on success, -1 if - virtual ~ACE_Section_Key_Win32 (void); - - // Not used - ACE_Section_Key_Win32 (const ACE_Section_Key_Win32& rhs); - ACE_Section_Key_Win32& operator= (const ACE_Section_Key_Win32& rhs); -}; - -/** - * @class ACE_Configuration_Win32Registry - * - * @brief The win32 registry implementation of a configuration database - * - * The win32 implementation basically makes calls through to the - * registry functions. The API is very similar so very little - * work must be done - */ -class ACE_Export ACE_Configuration_Win32Registry : public ACE_Configuration -{ -public: - - /** - * Constructor for registry configuration database. hKey is the - * base registry key to attach to. This class takes ownership of - * hKey, it will invoke on it upon destruction. - */ - explicit ACE_Configuration_Win32Registry (HKEY hKey); - - /// Destructor - virtual ~ACE_Configuration_Win32Registry (void); - - virtual int open_section (const ACE_Configuration_Section_Key& base, - const ACE_TCHAR* sub_section, - int create, - ACE_Configuration_Section_Key& result); - - virtual int remove_section (const ACE_Configuration_Section_Key& key, - const ACE_TCHAR* sub_section, - bool recursive); - - virtual int enumerate_values (const ACE_Configuration_Section_Key& key, - int index, - ACE_TString& name, - VALUETYPE& type); - - virtual int enumerate_sections (const ACE_Configuration_Section_Key& key, - int index, - ACE_TString& name); - - virtual int set_string_value (const ACE_Configuration_Section_Key& key, - const ACE_TCHAR* name, - const ACE_TString& value); - - virtual int set_integer_value (const ACE_Configuration_Section_Key& key, - const ACE_TCHAR* name, - u_int value); - - virtual int set_binary_value (const ACE_Configuration_Section_Key& key, - const ACE_TCHAR* name, - const void* data, - size_t length); - - virtual int get_string_value (const ACE_Configuration_Section_Key& key, - const ACE_TCHAR* name, - ACE_TString& value); - - virtual int get_integer_value (const ACE_Configuration_Section_Key& key, - const ACE_TCHAR* name, - u_int& value); - - virtual int get_binary_value (const ACE_Configuration_Section_Key& key, - const ACE_TCHAR* name, - void*& data, - size_t& length); - - virtual int find_value(const ACE_Configuration_Section_Key& key, - const ACE_TCHAR* name, - VALUETYPE& type); - - /// Removes the the value @a name from @a key. returns non zero on error - virtual int remove_value (const ACE_Configuration_Section_Key& key, - const ACE_TCHAR* name); - - /** - * This method traverses through . It is useful when - * you want the HKEY for a specific registry key, especially when - * initializing this implementation. Caller is responsible for - * closeing this key when it is no longer used. If create is 1 - * (default) the keys are create if they don't already exist. - * Returns 0 on error - */ - static HKEY resolve_key (HKEY hKey, - const ACE_TCHAR* path, - int create = 1); - virtual bool operator== (const ACE_Configuration_Win32Registry &rhs) const; - virtual bool operator!= (const ACE_Configuration_Win32Registry &rhs) const; - -protected: - - /// Gets the HKEY for a configuration section - int load_key (const ACE_Configuration_Section_Key& key, HKEY& hKey); - - // Not used - ACE_Configuration_Win32Registry (void); - ACE_Configuration_Win32Registry (const ACE_Configuration_Win32Registry& rhs); - ACE_Configuration_Win32Registry& operator= (const ACE_Configuration_Win32Registry& rhs); -}; -#endif /* ACE_WIN32 && !ACE_LACKS_WIN32_REGISTRY */ - -// ACE_Allocator version - -typedef ACE_Allocator_Adapter > - PERSISTENT_ALLOCATOR; -typedef ACE_Allocator_Adapter > - HEAP_ALLOCATOR; - -/** - * @class ACE_Configuration_ExtId - * - * @brief External ID for the section and value hash - * - * Contains a pointer to the section or value name. - */ -class ACE_Export ACE_Configuration_ExtId -{ -public: - /// Defeault ctor - ACE_Configuration_ExtId (void); - - /// Named constructor - explicit ACE_Configuration_ExtId (const ACE_TCHAR* name); - - /// Copy ctor - ACE_Configuration_ExtId (const ACE_Configuration_ExtId& rhs); - - /// destructor - ~ACE_Configuration_ExtId (void); - - /// Assignment operator - ACE_Configuration_ExtId& operator= (const ACE_Configuration_ExtId& rhs); - - /// Equality comparison operator (must match name_). - bool operator== (const ACE_Configuration_ExtId &rhs) const; - - /// Inequality comparison operator. - bool operator!= (const ACE_Configuration_ExtId &rhs) const; - - /// Frees the name of the value. needed since we don't know the - /// allocator name_ was created in - void free (ACE_Allocator *alloc); - - /// hash function is required in order for this class to be usable by - /// ACE_Hash_Map_Manager. - u_long hash (void) const; - - // = Data members. - - const ACE_TCHAR * name_; - - // Accessors - const ACE_TCHAR *name (void); -}; - -typedef ACE_Hash_Map_With_Allocator - SUBSECTION_MAP; -typedef ACE_Hash_Map_Manager_Ex, - ACE_Equal_To, - ACE_Null_Mutex> - SUBSECTION_HASH; - -/** - * @class ACE_Configuration_Value_IntId - * - * @brief The section hash table internal value class - * - * This class is present as the internal portion of a section's - * value hash table It may store string, integer or binary data. - */ -class ACE_Export ACE_Configuration_Value_IntId -{ -public: - /// Default constructor - ACE_Configuration_Value_IntId (void); - - /// String constructor, takes ownership of string - explicit ACE_Configuration_Value_IntId (ACE_TCHAR* string); - - /// Integer constructor - explicit ACE_Configuration_Value_IntId (u_int integer); - - /// Binary constructor, takes ownership of data - ACE_Configuration_Value_IntId (void* data, size_t length); - - /// Copy ctor - ACE_Configuration_Value_IntId (const ACE_Configuration_Value_IntId& rhs); - - /// Destructor - ~ACE_Configuration_Value_IntId (void); - - /// Assignment operator - ACE_Configuration_Value_IntId& operator= ( - const ACE_Configuration_Value_IntId& rhs); - - void free (ACE_Allocator *alloc); - - // = Data members. - - /** - * Points to the string value or binary data or IS the integer - * Length is only used when type_ == BINARY - */ - ACE_Configuration::VALUETYPE type_; - union { - void * ptr_; - u_int int_; - } data_; - size_t length_; -}; - -typedef ACE_Hash_Map_With_Allocator - VALUE_MAP; -typedef ACE_Hash_Map_Manager_Ex, - ACE_Equal_To, - ACE_Null_Mutex> - VALUE_HASH; - -// Deprecated typedef. Use the VALUE_HASH::ENTRY trait instead. -typedef VALUE_HASH::ENTRY VALUE_ENTRY; - -/** - * @class ACE_Configuration_Section_IntId - * - * @brief The internal ID for a section hash table - * - * Contains a hash table containing value name/values - */ -class ACE_Export ACE_Configuration_Section_IntId -{ -public: - /// Default ctor - ACE_Configuration_Section_IntId (void); - - /// Named ctor - ACE_Configuration_Section_IntId (VALUE_MAP* value_hash_map, - SUBSECTION_MAP* section_hash_map); - - /// Copy ctor - ACE_Configuration_Section_IntId (const ACE_Configuration_Section_IntId& rhs); - - /// Destructor - ~ACE_Configuration_Section_IntId (void); - - /// Assignment operator - ACE_Configuration_Section_IntId& operator= ( - const ACE_Configuration_Section_IntId& rhs); - - /// Frees the hash table and all its values - void free (ACE_Allocator *alloc); - - // = Data Members. - VALUE_MAP* value_hash_map_; - - SUBSECTION_MAP* section_hash_map_; -}; - -typedef ACE_Hash_Map_With_Allocator - SECTION_MAP; -typedef ACE_Hash_Map_Manager_Ex, - ACE_Equal_To, - ACE_Null_Mutex> - SECTION_HASH; - -// Deprecated typedef. Use the SECTION_HASH::ENTRY trait instead. -typedef SECTION_HASH::ENTRY SECTION_ENTRY; - -/** - * @class ACE_Configuration_Section_Key_Heap - * - * @brief Internal section key class for heap based configuration - * database. - * - * Contains a value iterator and full path name of section. - */ -class ACE_Export ACE_Configuration_Section_Key_Heap - : public ACE_Section_Key_Internal -{ -public: - /// Constructor based on the full path of the section - ACE_Configuration_Section_Key_Heap (const ACE_TCHAR* path); - - /// The path itself - ACE_TCHAR* path_; - - /// The value iterator - VALUE_HASH::ITERATOR* value_iter_; - - /// The sub section iterator - SUBSECTION_HASH::ITERATOR* section_iter_; -protected: - /// Destructor - will delete the iterators - virtual ~ACE_Configuration_Section_Key_Heap (void); - - // Not used - ACE_Configuration_Section_Key_Heap (const ACE_Configuration_Section_Key_Heap& rhs); - ACE_Configuration_Section_Key_Heap& operator= (const ACE_Configuration_Section_Key_Heap& rhs); -}; - -/** - * @class ACE_Configuration_Heap - * - * @brief The concrete implementation of a allocator based - * configuration database - * - * This class uses ACE's Allocators to manage a memory - * representation of a configuration database. A persistent heap - * may be used to store configurations persistently - * - * @note Before using this class you must call one of the open methods. - * - * @todo - * - Need to investigate what happens if memory mapped file gets mapped to - * a location different than it was created with. - */ -class ACE_Export ACE_Configuration_Heap : public ACE_Configuration -{ -public: - - /// Default ctor - ACE_Configuration_Heap (void); - - /// Destructor - virtual ~ACE_Configuration_Heap (void); - - /** - * Opens a configuration that allocates its memory from a memory-mapped file. - * This makes it possible to persist a configuration to permanent storage. - * This is not the same as exporting the configuration to a file; the - * memory-mapped file is not likely to be very readable by humans. - * - * @param file_name Name of the file to map into memory. - * - * @param base_address Address to map the base of @a file_name to. - * - * @param default_map_size Starting size for the internal hash tables that - * contain configuration information. - * - * @retval 0 for success. - * @retval -1 for error, with errno set to indicate the cause. If open() - * is called multiple times, errno will be @c EBUSY. - */ - int open (const ACE_TCHAR* file_name, - void* base_address = ACE_DEFAULT_BASE_ADDR, - size_t default_map_size = ACE_DEFAULT_CONFIG_SECTION_SIZE); - - /** - * Opens a configuration that allocates memory from the heap. - * - * @param default_map_size Starting size for the internal hash tables that - * contain configuration information. - * - * @retval 0 for success. - * @retval -1 for error, with errno set to indicate the cause. If open() - * is called multiple times, errno will be @c EBUSY. - */ - int open (size_t default_map_size = ACE_DEFAULT_CONFIG_SECTION_SIZE); - - virtual int open_section (const ACE_Configuration_Section_Key& base, - const ACE_TCHAR* sub_section, - int create, ACE_Configuration_Section_Key& result); - - virtual int remove_section (const ACE_Configuration_Section_Key& key, - const ACE_TCHAR* sub_section, - bool recursive); - - virtual int enumerate_values (const ACE_Configuration_Section_Key& key, - int index, - ACE_TString& name, - VALUETYPE& type); - - virtual int enumerate_sections (const ACE_Configuration_Section_Key& key, - int index, - ACE_TString& name); - - virtual int set_string_value (const ACE_Configuration_Section_Key& key, - const ACE_TCHAR* name, - const ACE_TString& value); - - virtual int set_integer_value (const ACE_Configuration_Section_Key& key, - const ACE_TCHAR* name, - u_int value); - - virtual int set_binary_value (const ACE_Configuration_Section_Key& key, - const ACE_TCHAR* name, - const void* data, - size_t length); - - virtual int get_string_value (const ACE_Configuration_Section_Key& key, - const ACE_TCHAR* name, - ACE_TString& value); - - virtual int get_integer_value (const ACE_Configuration_Section_Key& key, - const ACE_TCHAR* name, - u_int& value); - - virtual int get_binary_value (const ACE_Configuration_Section_Key& key, - const ACE_TCHAR* name, - void* &data, - size_t &length); - - virtual int find_value(const ACE_Configuration_Section_Key& key, - const ACE_TCHAR* name, - VALUETYPE& type); - - /// Removes the the value @a name from @a key. returns non zero on error - virtual int remove_value (const ACE_Configuration_Section_Key& key, - const ACE_TCHAR* name); - -private: - /// @a sub_section may not contain path separators - int open_simple_section (const ACE_Configuration_Section_Key &base, - const ACE_TCHAR *sub_section, - int create, ACE_Configuration_Section_Key &result); - /// Adds a new section - int add_section (const ACE_Configuration_Section_Key &base, - const ACE_TCHAR *sub_section, - ACE_Configuration_Section_Key &result); - - /// Helper for the method. - int create_index (void); - - /// Helper for create_index() method: places hash table into an - /// allocated space. - int create_index_helper (void *buffer); - - int value_open_helper (size_t hash_table_size, void *buffer); - - int section_open_helper (size_t hash_table_size, void *buffer); - - int load_key (const ACE_Configuration_Section_Key& key, ACE_TString& name); - - int new_section (const ACE_TString& section, - ACE_Configuration_Section_Key& result); - - ACE_Configuration_Heap (const ACE_Configuration_Heap& rhs); - ACE_Configuration_Heap& operator= (const ACE_Configuration_Heap& rhs); - - ACE_Allocator *allocator_; - SECTION_MAP *index_; - size_t default_map_size_; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/Configuration.inl" -#endif /* __ACE_INLINE__ */ - -#include /**/ "ace/post.h" -#endif /* ACE_CONFIGURATION_H */ diff --git a/modules/worldengine/deps/acelite/ace/Configuration.inl b/modules/worldengine/deps/acelite/ace/Configuration.inl deleted file mode 100644 index ebd6d6f9e5..0000000000 --- a/modules/worldengine/deps/acelite/ace/Configuration.inl +++ /dev/null @@ -1,10 +0,0 @@ -// -*- C++ -*- -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_INLINE const ACE_TCHAR* -ACE_Configuration_ExtId::name (void) -{ - return name_; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Configuration_Import_Export.cpp b/modules/worldengine/deps/acelite/ace/Configuration_Import_Export.cpp deleted file mode 100644 index 74ff1a32b5..0000000000 --- a/modules/worldengine/deps/acelite/ace/Configuration_Import_Export.cpp +++ /dev/null @@ -1,669 +0,0 @@ -#include "ace/Configuration_Import_Export.h" -#include "ace/OS_Errno.h" -#include "ace/OS_NS_stdio.h" -#include "ace/OS_NS_ctype.h" -#include "ace/OS_NS_string.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_Config_ImpExp_Base::ACE_Config_ImpExp_Base (ACE_Configuration& config) - : config_ (config) -{ -} - -ACE_Config_ImpExp_Base::~ACE_Config_ImpExp_Base (void) -{ -} - -ACE_Registry_ImpExp::ACE_Registry_ImpExp (ACE_Configuration& config) - : ACE_Config_ImpExp_Base (config) -{ -} - -ACE_Registry_ImpExp::~ACE_Registry_ImpExp (void) -{ -} - -// Imports the configuration database from filename. -// No existing data is removed. -int -ACE_Registry_ImpExp::import_config (const ACE_TCHAR* filename) -{ - if (0 == filename) - { - errno = EINVAL; - return -1; - } - FILE* in = ACE_OS::fopen (filename, ACE_TEXT ("r")); - if (!in) - return -1; - - u_int buffer_size = 4096; - u_int read_pos = 0; - ACE_TCHAR *buffer = 0; - ACE_NEW_NORETURN (buffer, ACE_TCHAR[buffer_size]); - if (!buffer) - { - ACE_Errno_Guard guard (errno); - (void) ACE_OS::fclose (in); - return -1; - } - ACE_Configuration_Section_Key section; - ACE_TCHAR *end = 0; - - while (ACE_OS::fgets (buffer+read_pos, buffer_size - read_pos, in)) - { - // Check if we got all the line. - end = ACE_OS::strrchr (buffer + read_pos, - ACE_TEXT ('\n')); // look for end of line - if (!end) // we havn't reach the end of the line yet - { - // allocate a new buffer - double size the previous one - ACE_TCHAR *temp_buffer; - ACE_NEW_NORETURN (temp_buffer, ACE_TCHAR[buffer_size * 2]); - if (!temp_buffer) - { - ACE_Errno_Guard guard (errno); - delete [] buffer; - (void) ACE_OS::fclose (in); - return -1; - } - - // copy the beginnning of the line - ACE_OS::memcpy (temp_buffer, buffer, buffer_size); - read_pos = buffer_size - 1; - buffer_size *= 2; - delete [] buffer; - buffer = temp_buffer; - continue; - } - read_pos = 0; - - // Check for a comment - if (buffer[0] == ACE_TEXT (';') || buffer[0] == ACE_TEXT ('#')) - continue; - - if (buffer[0] == ACE_TEXT ('[')) - { - // We have a new section here, strip out the section name - end = ACE_OS::strrchr (buffer, ACE_TEXT (']')); - if (!end) - { - ACE_OS::fclose (in); - delete [] buffer; - return -3; - } - *end = 0; - - if (config_.expand_path (config_.root_section (), buffer + 1, section, 1)) - { - ACE_OS::fclose (in); - delete [] buffer; - return -3; - } - continue; - } // end if firs char is a [ - - if (buffer[0] == ACE_TEXT ('"')) - { - // we have a value - end = ACE_OS::strchr (buffer+1, '"'); - if (!end) // no closing quote, not a value so just skip it - continue; - - // null terminate the name - *end = 0; - ACE_TCHAR* name = buffer + 1; - end+=2; - // determine the type - if (*end == '\"') - { - // string type - // truncate trailing " - ++end; - ACE_TCHAR* trailing = ACE_OS::strrchr (end, '"'); - if (trailing) - *trailing = 0; - if (config_.set_string_value (section, name, end)) - { - ACE_OS::fclose (in); - delete [] buffer; - return -4; - } - } - else if (ACE_OS::strncmp (end, ACE_TEXT ("dword:"), 6) == 0) - { - // number type - ACE_TCHAR* endptr = 0; - unsigned long value = ACE_OS::strtoul (end + 6, &endptr, 16); - if (config_.set_integer_value (section, name, - static_cast (value))) - { - ACE_OS::fclose (in); - delete [] buffer; - return -4; - } - } - else if (ACE_OS::strncmp (end, ACE_TEXT ("hex:"), 4) == 0) - { - // binary type - size_t string_length = ACE_OS::strlen (end + 4); - // divide by 3 to get the actual buffer length - size_t length = string_length / 3; - size_t remaining = length; - u_char* data = 0; - ACE_NEW_RETURN (data, - u_char[length], - -1); - u_char* out = data; - ACE_TCHAR* inb = end + 4; - ACE_TCHAR* endptr = 0; - while (remaining) - { - u_char charin = (u_char) ACE_OS::strtoul (inb, &endptr, 16); - *out = charin; - ++out; - --remaining; - inb += 3; - } - if (config_.set_binary_value (section, name, data, length)) - { - ACE_OS::fclose (in); - delete [] data; - delete [] buffer; - return -4; - } - else - delete [] data; - } - else - { - // invalid type, ignore - continue; - } - }// end if first char is a " - else - { - // if the first character is not a ", [, ;, or # we may be - // processing a file in the old format. - // Try and process the line as such and if it fails, - // return an error - int rc = process_previous_line_format (buffer, section); - if (rc != 0) - { - ACE_OS::fclose (in); - delete [] buffer; - return rc; - } - } // end if maybe old format - } // end while fgets - - if (ferror (in)) - { - ACE_OS::fclose (in); - delete [] buffer; - return -1; - } - - ACE_OS::fclose (in); - delete [] buffer; - return 0; -} - -// This method exports the entire configuration database to . -// Once the file is opened this method calls 'export_section' passing -// the root section. -int -ACE_Registry_ImpExp::export_config (const ACE_TCHAR* filename) -{ - if (0 == filename) - { - errno = EINVAL; - return -1; - } - int result = -1; - - FILE* out = ACE_OS::fopen (filename, ACE_TEXT ("w")); - if (out) - { - result = this->export_section (config_.root_section (), - ACE_TEXT (""), - out); - // The data may have been buffered and will be flush on close, - // so we need to check that the close succeeds. - if (ACE_OS::fclose (out) < 0) - result = -7; - } - return result; -} - -// Method provided by derived classes in order to write one section -// to the file specified. Called by export_config when exporting -// the entire configuration object. - -int -ACE_Registry_ImpExp::export_section (const ACE_Configuration_Section_Key& section, - const ACE_TString& path, - FILE* out) -{ - // don't export the root - if (path.length ()) - { - // Write out the section header - ACE_TString header = ACE_TEXT ("["); - header += path; - header += ACE_TEXT ("]"); - header += ACE_TEXT ("\n"); - if (ACE_OS::fputs (header.fast_rep (), out) < 0) - return -1; - // Write out each value - int index = 0; - ACE_TString name; - ACE_Configuration::VALUETYPE type; - ACE_TString line; - ACE_TCHAR int_value[32]; - ACE_TCHAR bin_value[3]; - void* binary_data; - size_t binary_length; - ACE_TString string_value; - while (!config_.enumerate_values (section, index, name, type)) - { - line = ACE_TEXT ("\"") + name + ACE_TEXT ("\"="); - switch (type) - { - case ACE_Configuration::INTEGER: - { - u_int value; - if (config_.get_integer_value (section, name.fast_rep (), value)) - return -2; - ACE_OS::sprintf (int_value, ACE_TEXT ("%08x"), value); - line += ACE_TEXT ("dword:"); - line += int_value; - break; - } - case ACE_Configuration::STRING: - { - if (config_.get_string_value (section, - name.fast_rep (), - string_value)) - return -2; - line += ACE_TEXT ("\""); - line += string_value + ACE_TEXT ("\""); - break; - } -#ifdef _WIN32 - case ACE_Configuration::INVALID: - break; // JDO added break. Otherwise INVALID is processed - // like BINARY. If that's correct, please remove the - // break and these comments -#endif - case ACE_Configuration::BINARY: - { - // not supported yet - maybe use BASE64 codeing? - if (config_.get_binary_value (section, - name.fast_rep (), - binary_data, - binary_length)) - return -2; - line += ACE_TEXT ("hex:"); - unsigned char* ptr = (unsigned char*)binary_data; - while (binary_length) - { - if (ptr != binary_data) - { - line += ACE_TEXT (","); - } - ACE_OS::sprintf (bin_value, ACE_TEXT ("%02x"), *ptr); - line += bin_value; - --binary_length; - ++ptr; - } - delete [] (char*) binary_data; - break; - } - default: - return -3; - } - line += ACE_TEXT ("\n"); - if (ACE_OS::fputs (line.fast_rep (), out) < 0) - return -4; - ++index; - } - } - // Export all sub sections - int index = 0; - ACE_TString name; - ACE_Configuration_Section_Key sub_key; - ACE_TString sub_section; - while (!config_.enumerate_sections (section, index, name)) - { - ACE_TString sub_section (path); - if (path.length ()) - sub_section += ACE_TEXT ("\\"); - sub_section += name; - if (config_.open_section (section, name.fast_rep (), 0, sub_key)) - return -5; - if (export_section (sub_key, sub_section.fast_rep (), out)) - return -6; - ++index; - } - return 0; -} - -// -// This method read the line format origionally used in ACE 5.1 -// -int -ACE_Registry_ImpExp::process_previous_line_format (ACE_TCHAR* buffer, - ACE_Configuration_Section_Key& section) -{ - // Chop any cr/lf at the end of the line. - ACE_TCHAR *endp = ACE_OS::strpbrk (buffer, ACE_TEXT ("\r\n")); - if (endp != 0) - *endp = '\0'; - - // assume this is a value, read in the value name - ACE_TCHAR* end = ACE_OS::strchr (buffer, '='); - if (end) // no =, not a value so just skip it - { - // null terminate the name - *end = 0; - ++end; - // determine the type - if (*end == '\"') - { - // string type - if(config_.set_string_value (section, buffer, end + 1)) - return -4; - } - else if (*end == '#') - { - // number type - u_int value = ACE_OS::atoi (end + 1); - if (config_.set_integer_value (section, buffer, value)) - return -4; - } - } - return 0; -} // end read_previous_line_format - - -ACE_Ini_ImpExp::ACE_Ini_ImpExp (ACE_Configuration& config) - : ACE_Config_ImpExp_Base (config) -{ -} - -ACE_Ini_ImpExp::~ACE_Ini_ImpExp (void) -{ -} - -// Method to read file and populate object. -int -ACE_Ini_ImpExp::import_config (const ACE_TCHAR* filename) -{ - if (0 == filename) - { - errno = EINVAL; - return -1; - } - FILE* in = ACE_OS::fopen (filename, ACE_TEXT ("r")); - if (!in) - return -1; - - // @@ Make this a dynamic size! - ACE_TCHAR buffer[4096]; - ACE_Configuration_Section_Key section; - while (ACE_OS::fgets (buffer, sizeof buffer, in)) - { - ACE_TCHAR *line = this->squish (buffer); - // Check for a comment and blank line - if (line[0] == ACE_TEXT (';') || - line[0] == ACE_TEXT ('#') || - line[0] == '\0') - continue; - - if (line[0] == ACE_TEXT ('[')) - { - // We have a new section here, strip out the section name - ACE_TCHAR* end = ACE_OS::strrchr (line, ACE_TEXT (']')); - if (!end) - { - ACE_OS::fclose (in); - return -3; - } - *end = 0; - - if (config_.expand_path (config_.root_section (), - line + 1, - section, - 1)) - { - ACE_OS::fclose (in); - return -3; - } - - continue; - } - - // We have a line; name ends at equal sign. - ACE_TCHAR *end = ACE_OS::strchr (line, ACE_TEXT ('=')); - if (end == 0) // No '=' - { - ACE_OS::fclose (in); - return -3; - } - *end++ = '\0'; - ACE_TCHAR *name = this->squish (line); -#if 0 - if (ACE_OS::strlen (name) == 0) // No name; just an '=' - { - ACE_OS::fclose (in); - return -3; - } -#endif - // Now find the start of the value - ACE_TCHAR *value = this->squish (end); - size_t value_len = ACE_OS::strlen (value); - if (value_len > 0) - { - // ACE 5.2 (and maybe earlier) exported strings may be enclosed - // in quotes. If string is quote-delimited, strip the quotes. - // Newer exported files don't have quote delimiters. - if (value[0] == ACE_TEXT ('"') && - value[value_len - 1] == ACE_TEXT ('"')) - { - // Strip quotes off both ends. - value[value_len - 1] = '\0'; - ++value; - } - } - - if (config_.set_string_value (section, name, value)) - { - ACE_OS::fclose (in); - return -4; - } - } // end while fgets - - if (ferror (in)) - { - ACE_OS::fclose (in); - return -1; - } - - ACE_OS::fclose (in); - return 0; -} - -// This method exports the entire configuration database to . -// Once the file is opened this method calls 'export_section' passing -// the root section. -int -ACE_Ini_ImpExp::export_config (const ACE_TCHAR* filename) -{ - if (0 == filename) - { - errno = EINVAL; - return -1; - } - int result = -1; - - FILE* out = ACE_OS::fopen (filename, ACE_TEXT ("w")); - if (out) - { - result = this->export_section (config_.root_section (), - ACE_TEXT (""), - out); - // The data may have been buffered and will be flush on close, - // so we need to check that the close succeeds. - if (ACE_OS::fclose (out) < 0) - result = -7; - } - return result; -} - -// Method provided by derived classes in order to write one section to the -// file specified. Called by export_config when exporting the entire -// configuration objet - -int -ACE_Ini_ImpExp::export_section (const ACE_Configuration_Section_Key& section, - const ACE_TString& path, - FILE* out) -{ - // don't export the root - if (path.length ()) - { - // Write out the section header - ACE_TString header = ACE_TEXT ("["); - header += path; - header += ACE_TEXT ("]\n"); - if (ACE_OS::fputs (header.fast_rep (), out) < 0) - return -1; - // Write out each value - int index = 0; - ACE_TString name; - ACE_Configuration::VALUETYPE type; - ACE_TString line; - ACE_TCHAR int_value[32]; - ACE_TCHAR bin_value[3]; - void* binary_data; - size_t binary_length; - ACE_TString string_value; - while (!config_.enumerate_values (section, index, name, type)) - { - line = name + ACE_TEXT ("="); - switch (type) - { - case ACE_Configuration::INTEGER: - { - u_int value; - if (config_.get_integer_value (section, name.fast_rep (), value)) - return -2; - ACE_OS::sprintf (int_value, ACE_TEXT ("%08x"), value); - line += int_value; - break; - } - case ACE_Configuration::STRING: - { - if (config_.get_string_value (section, - name.fast_rep (), - string_value)) - return -2; - line += string_value; - break; - } -#ifdef _WIN32 - case ACE_Configuration::INVALID: - break; // JDO added break. Otherwise INVALID is processed - // like BINARY. If that's correct, please remove the - // break and these comments -#endif - case ACE_Configuration::BINARY: - { - // not supported yet - maybe use BASE64 codeing? - if (config_.get_binary_value (section, - name.fast_rep (), - binary_data, - binary_length)) - return -2; - line += ACE_TEXT ("\""); - unsigned char* ptr = (unsigned char*)binary_data; - while (binary_length) - { - if (ptr != binary_data) - { - line += ACE_TEXT (","); - } - ACE_OS::sprintf (bin_value, ACE_TEXT ("%02x"), *ptr); - line += bin_value; - --binary_length; - ++ptr; - } - line += ACE_TEXT ("\""); - delete [] (char *) binary_data; - break; - } - default: - return -3; - - }// end switch on type - - line += ACE_TEXT ("\n"); - if (ACE_OS::fputs (line.fast_rep (), out) < 0) - return -4; - ++index; - }// end while enumerating values - } - // Export all sub sections - int index = 0; - ACE_TString name; - ACE_Configuration_Section_Key sub_key; - ACE_TString sub_section; - while (!config_.enumerate_sections (section, index, name)) - { - ACE_TString sub_section (path); - if (path.length ()) - sub_section += ACE_TEXT ("\\"); - sub_section += name; - if (config_.open_section (section, name.fast_rep (), 0, sub_key)) - return -5; - if (export_section (sub_key, sub_section.fast_rep (), out)) - return -6; - ++index; - } - return 0; - -} - -// Method to squish leading and trailing whitespaces from a string. -// Whitespace is defined as: spaces (' '), tabs ('\t') or end-of-line -// (cr/lf). The terminating nul is moved up to expunge trailing -// whitespace and the returned pointer points at the first -// non-whitespace character in the string, which may be the nul -// terminator if the string is all whitespace. - -ACE_TCHAR * -ACE_Ini_ImpExp::squish (ACE_TCHAR *src) -{ - ACE_TCHAR *cp = 0; - - if (src == 0) - return 0; - - // Start at the end and work backwards over all whitespace. - for (cp = src + ACE_OS::strlen (src) - 1; - cp != src; - --cp) - if (!ACE_OS::ace_isspace (*cp)) - break; - cp[1] = '\0'; // Chop trailing whitespace - - // Now start at the beginning and move over all whitespace. - for (cp = src; ACE_OS::ace_isspace (*cp); ++cp) - continue; - - return cp; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Configuration_Import_Export.h b/modules/worldengine/deps/acelite/ace/Configuration_Import_Export.h deleted file mode 100644 index f40019ecca..0000000000 --- a/modules/worldengine/deps/acelite/ace/Configuration_Import_Export.h +++ /dev/null @@ -1,211 +0,0 @@ -/* -*- C++ -*- */ - -//============================================================================= -/** - * @file Configuration_Import_Export.h - * - * @author Jerry D. Odenwelder Jr. - * Chris Hafey - * - * Classes defined in this file provide the ability to import and export - * ACE Configuration objects to/from disk files. The base class - * ACE_Config_ImpExp_Base provides the common functionality and the derived - * classes implement the import/export functionality for the specific format. - * - * @todo - * - Add locking for thread safety. - * - Provide ability to read file in one format and write in another. - * - See todo's in each class - */ -//============================================================================= - -#ifndef ACE_CONFIGURATION_IMPORT_EXPORT_H -#define ACE_CONFIGURATION_IMPORT_EXPORT_H -#include /**/ "ace/pre.h" - -#include "ace/Configuration.h" -#include "ace/SString.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_Config_ImpExp_Base - * - * @brief Base class for file import/export configuration. - * - * This class provides base functionality for configuration objects - * that are persisted in files. It takes an ACE_Configuration - * object that it populates with the data read. - */ -class ACE_Export ACE_Config_ImpExp_Base -{ -public: - /// Constructor taking the ACE_Configuration to import/export to - ACE_Config_ImpExp_Base (ACE_Configuration& config); - - /** - * Destructor - */ - virtual ~ACE_Config_ImpExp_Base (void); - - /** - * Imports the configuration database from @a filename. - * No existing data is removed. - */ - virtual int import_config (const ACE_TCHAR* filename) = 0; - - /** - * This method exports the entire configuration database to @a filename. - * Once the file is opened this method calls 'export_section' passing - * the root section. - */ - virtual int export_config (const ACE_TCHAR* filename) = 0; - -protected: - ACE_Configuration &config_; - -private: - ACE_Config_ImpExp_Base (const ACE_Config_ImpExp_Base&); - ACE_Config_ImpExp_Base& operator= (const ACE_Config_ImpExp_Base&); -}; - -/** - * @class ACE_Registry_ImpExp - * - * @brief Configuration object that imports/exports data to a file formatted - * using the Win32 Registry file export format. This format looks like - * [Section] - * "key"="String Data" - * "key"=dword: numeric data in hexadecimal format - * "key"=hex: binary data - * - * @todo - * - Add dynamic buffer when importing. currently it will not allow - * importing of values greater than a fixed amount (4096 bytes) - */ -class ACE_Export ACE_Registry_ImpExp : public ACE_Config_ImpExp_Base -{ -public: - /// Construction - ACE_Registry_ImpExp (ACE_Configuration&); - - /// Destruction. - virtual ~ACE_Registry_ImpExp (void); - - /** - * Imports the configuration database from @a filename. - * No existing data is removed. - */ - virtual int import_config (const ACE_TCHAR* filename); - - /** - * This method exports the entire configuration database to @a filename. - * Once the file is opened this method calls export_section() passing - * the root section. - */ - virtual int export_config (const ACE_TCHAR* filename); - -private: - int export_section (const ACE_Configuration_Section_Key& section, - const ACE_TString& path, - FILE* out); - - int process_previous_line_format (ACE_TCHAR* buffer, - ACE_Configuration_Section_Key& section); - - ACE_Registry_ImpExp ( const ACE_Registry_ImpExp&); - ACE_Registry_ImpExp& operator= ( const ACE_Registry_ImpExp&); -}; - -/** - * @class ACE_Ini_ImpExp - * - * @brief Imports the configuration database from filename as strings. - * Allows non-typed values. (no #, dword: hex:, etc. prefixes) and - * skips whitespace (tabs and spaces) as in standard .ini and .conf - * files. Values (to right of equal sign) can be double quote - * delimited to embed tabs and spaces in the string. - * Caller must convert string to type. - * - * This method allows for lines in the .ini or .conf file like this: - * - * TimeToLive = 100 - * Delay = FALSE - * Flags = FF34 - * Heading = "ACE - Adaptive Communication Environment" - * - * (note leading whitespace (tabs) in examples below) - * - * SeekIndex = 14 - * TraceLevel = 6 # Can comment lines like this - * Justification = left_justified - * - * The caller can then retrieve the string with the regular - * get_string_value() function and convert the string to the - * desired data type. - * - * @todo - * - Strings with embedded newlines cause the import to fail - * - Strings with embedded quotes " cause the import to fail - * - Importing/exporting for values in the root section does not work - * - Add dynamic buffer when importing. currently it will not allow - * importing of values greater than a fixed amount (4096 bytes) -*/ -class ACE_Export ACE_Ini_ImpExp : public ACE_Config_ImpExp_Base -{ -public: - /** - * Construction - */ - ACE_Ini_ImpExp (ACE_Configuration&); - - /** - * Destructor - */ - virtual ~ACE_Ini_ImpExp (void); - - /** - * Imports the configuration database from @a filename. - * No existing data is removed. - */ - virtual int import_config (const ACE_TCHAR* filename); - - /** - * This method exports the entire configuration database to @a filename. - * Once the file is opened this method calls export_section() passing - * the root section. - */ - virtual int export_config (const ACE_TCHAR* filename); - -private: - /** - * Method provided by derived classes in order to write one section - * to the file specified. Called by export_config() when exporting - * the entire configuration object. - */ - int export_section (const ACE_Configuration_Section_Key& section, - const ACE_TString& path, - FILE* out); - - /** - * Method to squish leading and trailing whitespaces in a string. - * Whitespace is defined as: spaces (' '), tabs ('\\t') or cr/lf. - * Returns a pointer to the first non-whitespace character in the - * buffer provided, or a pointer to the terminating null if the string - * is all whitespace. The terminating null is moved forward to the - * first character past the last non-whitespace. - */ - ACE_TCHAR *squish (ACE_TCHAR *src); - - ACE_Ini_ImpExp (const ACE_Ini_ImpExp&); - ACE_Ini_ImpExp& operator= (const ACE_Ini_ImpExp&); -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#include /**/ "ace/post.h" -#endif /* ACE_CONFIGURATION_IMPORT_EXPORT_H */ diff --git a/modules/worldengine/deps/acelite/ace/Connection_Recycling_Strategy.cpp b/modules/worldengine/deps/acelite/ace/Connection_Recycling_Strategy.cpp deleted file mode 100644 index b5619a6749..0000000000 --- a/modules/worldengine/deps/acelite/ace/Connection_Recycling_Strategy.cpp +++ /dev/null @@ -1,13 +0,0 @@ -#include "ace/Connection_Recycling_Strategy.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_Connection_Recycling_Strategy::ACE_Connection_Recycling_Strategy (void) -{ -} - -ACE_Connection_Recycling_Strategy::~ACE_Connection_Recycling_Strategy (void) -{ -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Connection_Recycling_Strategy.h b/modules/worldengine/deps/acelite/ace/Connection_Recycling_Strategy.h deleted file mode 100644 index 368d4b2a3b..0000000000 --- a/modules/worldengine/deps/acelite/ace/Connection_Recycling_Strategy.h +++ /dev/null @@ -1,63 +0,0 @@ -/* -*- C++ -*- */ - -//============================================================================= -/** - * @file Connection_Recycling_Strategy.h - * - * @author Doug Schmidt - */ -//============================================================================= -#ifndef ACE_CONNECTION_RECYCLING_STRATEGY_H -#define ACE_CONNECTION_RECYCLING_STRATEGY_H -#include /**/ "ace/pre.h" - -#include "ace/Recyclable.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_Connection_Recycling_Strategy - * - * @brief Defines the interface for a connection recycler. - */ -class ACE_Export ACE_Connection_Recycling_Strategy -{ -public: - ACE_Connection_Recycling_Strategy (void); - - /// Virtual Destructor - virtual ~ACE_Connection_Recycling_Strategy (void); - - /// Remove from cache. - virtual int purge (const void *recycling_act) = 0; - - /// Add to cache. - virtual int cache (const void *recycling_act) = 0; - - virtual int recycle_state (const void *recycling_act, - ACE_Recyclable_State new_state) = 0; - - /// Get/Set recycle_state. - virtual ACE_Recyclable_State recycle_state (const void *recycling_act) const = 0; - - /// Mark as closed. - virtual int mark_as_closed (const void *recycling_act) = 0; - - /// Mark as closed.(non-locking version) - virtual int mark_as_closed_i (const void *recycling_act) = 0; - - /// Cleanup hint and reset @a act_holder to zero if @a act_holder != 0. - virtual int cleanup_hint (const void *recycling_act, - void **act_holder = 0) = 0; - -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#include /**/ "ace/post.h" - -#endif /*ACE_CONNECTION_RECYCLING_STRATEGY*/ diff --git a/modules/worldengine/deps/acelite/ace/Connector.cpp b/modules/worldengine/deps/acelite/ace/Connector.cpp deleted file mode 100644 index 43da033214..0000000000 --- a/modules/worldengine/deps/acelite/ace/Connector.cpp +++ /dev/null @@ -1,999 +0,0 @@ -#ifndef ACE_CONNECTOR_CPP -#define ACE_CONNECTOR_CPP - -#include "ace/Connector.h" -#include "ace/ACE.h" -#include "ace/OS_NS_stdio.h" -#include "ace/OS_NS_string.h" -#include "ace/os_include/os_fcntl.h" /* Has ACE_NONBLOCK */ - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_ALLOC_HOOK_DEFINE(ACE_Connector) - -template -ACE_NonBlocking_Connect_Handler::ACE_NonBlocking_Connect_Handler (ACE_Connector_Base &connector, - SVC_HANDLER *sh, - long id) - : connector_ (connector), - svc_handler_ (sh), - cleanup_svc_handler_ (0), - timer_id_ (id) -{ - ACE_TRACE ("ACE_NonBlocking_Connect_Handler::ACE_NonBlocking_Connect_Handler"); - - this->reference_counting_policy ().value - (ACE_Event_Handler::Reference_Counting_Policy::ENABLED); - - if (this->svc_handler_ != 0 && - this->svc_handler_->reference_counting_policy ().value () == - ACE_Event_Handler::Reference_Counting_Policy::ENABLED) - { - // If SVC_HANDLER is reference counted then NBCH holds a reference - // in cleanup_svc_handle_ which is both a pointer to SVC_HANDLER - // and a flag that triggers remove_reference in NBCH destructor. - this->cleanup_svc_handler_ = sh; - this->cleanup_svc_handler_->add_reference (); - } -} - -template -ACE_NonBlocking_Connect_Handler::~ACE_NonBlocking_Connect_Handler (void) -{ - if (this->cleanup_svc_handler_) - this->cleanup_svc_handler_->remove_reference (); -} - -template SVC_HANDLER * -ACE_NonBlocking_Connect_Handler::svc_handler (void) -{ - ACE_TRACE ("ACE_NonBlocking_Connect_Handler::svc_handler"); - return this->svc_handler_; -} - -template long -ACE_NonBlocking_Connect_Handler::timer_id (void) -{ - ACE_TRACE ("ACE_NonBlocking_Connect_Handler::timer_id"); - return this->timer_id_; -} - -template void -ACE_NonBlocking_Connect_Handler::timer_id (long id) -{ - ACE_TRACE ("ACE_NonBlocking_Connect_Handler::timer_id"); - this->timer_id_ = id; -} - -template void -ACE_NonBlocking_Connect_Handler::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_NonBlocking_Connect_Handler::dump"); - - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("svc_handler_ = %x"), this->svc_handler_)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("\ntimer_id_ = %d"), this->timer_id_)); - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} - -template bool -ACE_NonBlocking_Connect_Handler::close (SVC_HANDLER *&sh) -{ - // Make sure that we haven't already initialized the Svc_Handler. - if (!this->svc_handler_) - return false; - - { - // Exclusive access to the Reactor. - ACE_GUARD_RETURN (ACE_Lock, - ace_mon, - this->reactor ()->lock (), - 0); - - // Double check. - if (!this->svc_handler_) - return false; - - // Remember the Svc_Handler. - sh = this->svc_handler_; - ACE_HANDLE h = sh->get_handle (); - this->svc_handler_ = 0; - - // Remove this handle from the set of non-blocking handles - // in the Connector. - this->connector_.non_blocking_handles ().remove (h); - - // Cancel timer. - if (this->reactor ()->cancel_timer (this->timer_id (), - 0, - 0) == -1) - return false; - - // Remove from Reactor. - if (-1 == this->reactor ()->remove_handler ( - h, - ACE_Event_Handler::ALL_EVENTS_MASK | ACE_Event_Handler::DONT_CALL)) - return false; - } - - return true; -} - - -template int -ACE_NonBlocking_Connect_Handler::handle_timeout -(const ACE_Time_Value &tv, - const void *arg) -{ - // This method is called if a connection times out before completing. - ACE_TRACE ("ACE_NonBlocking_Connect_Handler::handle_timeout"); - - SVC_HANDLER *svc_handler = 0; - int const retval = this->close (svc_handler) ? 0 : -1; - - // Forward to the SVC_HANDLER the that was passed in as a - // magic cookie during ACE_Connector::connect(). This gives the - // SVC_HANDLER an opportunity to take corrective action (e.g., wait - // a few milliseconds and try to reconnect again. - if (svc_handler != 0 && svc_handler->handle_timeout (tv, arg) == -1) - svc_handler->handle_close (svc_handler->get_handle (), - ACE_Event_Handler::TIMER_MASK); - - return retval; -} - - -template int -ACE_NonBlocking_Connect_Handler::handle_input (ACE_HANDLE) -{ - // Called when a failure occurs during asynchronous connection - // establishment. - ACE_TRACE ("ACE_NonBlocking_Connect_Handler::handle_input"); - - SVC_HANDLER *svc_handler = 0; - int const retval = this->close (svc_handler) ? 0 : -1; - - // Close Svc_Handler. - if (svc_handler != 0) - { - svc_handler->close (NORMAL_CLOSE_OPERATION); - } - - return retval; -} - -template int -ACE_NonBlocking_Connect_Handler::handle_close (ACE_HANDLE handle, - ACE_Reactor_Mask m) -{ - // epoll on Linux will, at least sometimes, return EPOLLERR when a connect - // fails, triggering a total removal from the reactor. This is different from - // select()-based systems which select the fd for read on a connect failure. - // So just call handle_input() to rejoin common handling for a failed - // connect. - if (m == ACE_Event_Handler::ALL_EVENTS_MASK) - return this->handle_input (handle); - return -1; -} - -template int -ACE_NonBlocking_Connect_Handler::handle_output (ACE_HANDLE handle) -{ - // Called when a connection is establishment asynchronous. - ACE_TRACE ("ACE_NonBlocking_Connect_Handler::handle_output"); - - // Grab the connector ref before smashing ourselves in close(). - ACE_Connector_Base &connector = this->connector_; - SVC_HANDLER *svc_handler = 0; - int const retval = this->close (svc_handler) ? 0 : -1; - - if (svc_handler != 0) - { - connector.initialize_svc_handler (handle, svc_handler); - } - - return retval; -} - -template int -ACE_NonBlocking_Connect_Handler::handle_exception (ACE_HANDLE h) -{ - // On Win32, the except mask must also be set for asynchronous - // connects. - ACE_TRACE ("ACE_NonBlocking_Connect_Handler::handle_exception"); - return this->handle_output (h); -} - -template int -ACE_NonBlocking_Connect_Handler::resume_handler (void) -{ - return ACE_Event_Handler::ACE_EVENT_HANDLER_NOT_RESUMED; -} - -template void -ACE_Connector::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_Connector::dump"); - - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("\nflags_ = %d"), this->flags_)); - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} - -template int -ACE_Connector::make_svc_handler (SVC_HANDLER *&sh) -{ - ACE_TRACE ("ACE_Connector::make_svc_handler"); - - if (sh == 0) - ACE_NEW_RETURN (sh, - SVC_HANDLER, - -1); - - // Set the reactor of the newly created to the same - // reactor that this is using. - sh->reactor (this->reactor ()); - return 0; -} - -template int -ACE_Connector::activate_svc_handler (SVC_HANDLER *svc_handler) -{ - ACE_TRACE ("ACE_Connector::activate_svc_handler"); - // No errors initially - int error = 0; - - // See if we should enable non-blocking I/O on the 's - // peer. - if (ACE_BIT_ENABLED (this->flags_, ACE_NONBLOCK) != 0) - { - if (svc_handler->peer ().enable (ACE_NONBLOCK) == -1) - error = 1; - } - // Otherwise, make sure it's disabled by default. - else if (svc_handler->peer ().disable (ACE_NONBLOCK) == -1) - error = 1; - - // We are connected now, so try to open things up. - if (error || svc_handler->open ((void *) this) == -1) - { - // Make sure to close down the to avoid descriptor - // leaks. - // The connection was already made; so this close is a "normal" - // close operation. - svc_handler->close (NORMAL_CLOSE_OPERATION); - return -1; - } - else - return 0; -} - -template PEER_CONNECTOR & -ACE_Connector::connector (void) const -{ - return const_cast (this->connector_); -} - -template int -ACE_Connector::connect_svc_handler -(SVC_HANDLER *&svc_handler, - const typename PEER_CONNECTOR::PEER_ADDR &remote_addr, - ACE_Time_Value *timeout, - const typename PEER_CONNECTOR::PEER_ADDR &local_addr, - int reuse_addr, - int flags, - int perms) -{ - ACE_TRACE ("ACE_Connector::connect_svc_handler"); - - return this->connector_.connect (svc_handler->peer (), - remote_addr, - timeout, - local_addr, - reuse_addr, - flags, - perms); -} - -template int -ACE_Connector::connect_svc_handler -(SVC_HANDLER *&svc_handler, - SVC_HANDLER *&sh_copy, - const typename PEER_CONNECTOR::PEER_ADDR &remote_addr, - ACE_Time_Value *timeout, - const typename PEER_CONNECTOR::PEER_ADDR &local_addr, - int reuse_addr, - int flags, - int perms) -{ - ACE_TRACE ("ACE_Connector::connect_svc_handler"); - - sh_copy = svc_handler; - return this->connector_.connect (svc_handler->peer (), - remote_addr, - timeout, - local_addr, - reuse_addr, - flags, - perms); -} - -template int -ACE_Connector::open (ACE_Reactor *r, int flags) -{ - ACE_TRACE ("ACE_Connector::open"); - this->reactor (r); - this->flags_ = flags; - return 0; -} - -template -ACE_Connector::ACE_Connector (ACE_Reactor *r, - int flags) -{ - ACE_TRACE ("ACE_Connector::ACE_Connector"); - (void) this->open (r, flags); -} - -template int -ACE_Connector::connect -(SVC_HANDLER *&sh, - const typename PEER_CONNECTOR::PEER_ADDR &remote_addr, - const ACE_Synch_Options &synch_options, - const typename PEER_CONNECTOR::PEER_ADDR &local_addr, - int reuse_addr, - int flags, - int perms) -{ - // Initiate connection to peer. - return this->connect_i (sh, - 0, - remote_addr, - synch_options, - local_addr, - reuse_addr, - flags, - perms); -} - -template int -ACE_Connector::connect -(SVC_HANDLER *&sh, - SVC_HANDLER *&sh_copy, - const typename PEER_CONNECTOR::PEER_ADDR &remote_addr, - const ACE_Synch_Options &synch_options, - const typename PEER_CONNECTOR::PEER_ADDR &local_addr, - int reuse_addr, - int flags, - int perms) -{ - // Initiate connection to peer. - return this->connect_i (sh, - &sh_copy, - remote_addr, - synch_options, - local_addr, - reuse_addr, - flags, - perms); -} - -template int -ACE_Connector::connect_i -(SVC_HANDLER *&sh, - SVC_HANDLER **sh_copy, - const typename PEER_CONNECTOR::PEER_ADDR &remote_addr, - const ACE_Synch_Options &synch_options, - const typename PEER_CONNECTOR::PEER_ADDR &local_addr, - int reuse_addr, - int flags, - int perms) -{ - ACE_TRACE ("ACE_Connector::connect_i"); - - // If the user hasn't supplied us with a we'll use the - // factory method to create one. Otherwise, things will remain as - // they are... - if (this->make_svc_handler (sh) == -1) - return -1; - - ACE_Time_Value *timeout = 0; - int const use_reactor = synch_options[ACE_Synch_Options::USE_REACTOR]; - - if (use_reactor) - timeout = const_cast (&ACE_Time_Value::zero); - else - timeout = const_cast (synch_options.time_value ()); - - int result; - if (sh_copy == 0) - result = this->connect_svc_handler (sh, - remote_addr, - timeout, - local_addr, - reuse_addr, - flags, - perms); - else - result = this->connect_svc_handler (sh, - *sh_copy, - remote_addr, - timeout, - local_addr, - reuse_addr, - flags, - perms); - - // Activate immediately if we are connected. - if (result != -1) - return this->activate_svc_handler (sh); - - // Delegate to connection strategy. - if (use_reactor && ACE_OS::last_error () == EWOULDBLOCK) - { - // If the connection hasn't completed and we are using - // non-blocking semantics then register - // ACE_NonBlocking_Connect_Handler with the ACE_Reactor so that - // it will call us back when the connection is complete or we - // timeout, whichever comes first... - if (sh_copy == 0) - result = this->nonblocking_connect (sh, synch_options); - else - result = this->nonblocking_connect (*sh_copy, synch_options); - - // If for some reason the call failed, then - // will be set to the new error. If the call succeeds, however, - // we need to make sure that remains set to - // . - if (result == 0) - errno = EWOULDBLOCK; - } - else - { - // Save/restore errno. - ACE_Errno_Guard error (errno); - // Make sure to close down the service handler to avoid handle - // leaks. - if (sh_copy == 0) - { - if (sh) - sh->close (CLOSE_DURING_NEW_CONNECTION); - } - else if (*sh_copy) - (*sh_copy)->close (CLOSE_DURING_NEW_CONNECTION); - } - - return -1; -} - -template int -ACE_Connector::connect_n -(size_t n, - SVC_HANDLER *sh[], - typename PEER_CONNECTOR::PEER_ADDR remote_addrs[], - ACE_TCHAR *failed_svc_handlers, - const ACE_Synch_Options &synch_options) -{ - int result = 0; - - for (size_t i = 0; i < n; i++) - { - if (this->connect (sh[i], remote_addrs[i], synch_options) == -1 - && !(synch_options[ACE_Synch_Options::USE_REACTOR] - && errno == EWOULDBLOCK)) - { - result = -1; - if (failed_svc_handlers != 0) - // Mark this entry as having failed. - failed_svc_handlers[i] = 1; - } - else if (failed_svc_handlers != 0) - // Mark this entry as having succeeded. - failed_svc_handlers[i] = 0; - } - - return result; -} - -// Cancel a that was started asynchronously. -template int -ACE_Connector::cancel (SVC_HANDLER *sh) -{ - ACE_TRACE ("ACE_Connector::cancel"); - - ACE_Event_Handler *handler = - this->reactor ()->find_handler (sh->get_handle ()); - - if (handler == 0) - return -1; - - // find_handler() increments handler's refcount; ensure we decrement it. - ACE_Event_Handler_var safe_handler (handler); - - NBCH *nbch = - dynamic_cast (handler); - - if (nbch == 0) - return -1; - - SVC_HANDLER *tmp_sh = 0; - - if (nbch->close (tmp_sh) == false) - return -1; - - return 0; -} - -template int -ACE_Connector::nonblocking_connect -(SVC_HANDLER *sh, - const ACE_Synch_Options &synch_options) -{ - ACE_TRACE ("ACE_Connector::nonblocking_connect"); - - // Must have a valid Reactor for non-blocking connects to work. - if (this->reactor () == 0) - return -1; - - // Register the pending SVC_HANDLER so that it can be activated - // later on when the connection completes. - - ACE_HANDLE handle = sh->get_handle (); - long timer_id = -1; - ACE_Time_Value *tv = 0; - NBCH *nbch = 0; - - ACE_NEW_RETURN (nbch, - NBCH (*this, - sh, - -1), - -1); - - ACE_Event_Handler_var safe_nbch (nbch); - - // Exclusive access to the Reactor. - ACE_GUARD_RETURN (ACE_Lock, ace_mon, this->reactor ()->lock (), -1); - - // Register handle with the reactor for connection events. - ACE_Reactor_Mask mask = ACE_Event_Handler::CONNECT_MASK; - if (this->reactor ()->register_handler (handle, - nbch, - mask) == -1) - goto reactor_registration_failure; - - // Add handle to non-blocking handle set. - this->non_blocking_handles ().insert (handle); - - // If we're starting connection under timer control then we need to - // schedule a timeout with the ACE_Reactor. - tv = const_cast (synch_options.time_value ()); - if (tv != 0) - { - timer_id = - this->reactor ()->schedule_timer (nbch, - synch_options.arg (), - *tv); - if (timer_id == -1) - goto timer_registration_failure; - - // Remember timer id. - nbch->timer_id (timer_id); - } - - return 0; - - // Undo previous actions using the ol' "goto label and fallthru" - // trick... - timer_registration_failure: - - // Remove from Reactor. - this->reactor ()->remove_handler (handle, mask); - - // Remove handle from the set of non-blocking handles. - this->non_blocking_handles ().remove (handle); - - /* FALLTHRU */ - - reactor_registration_failure: - // Close the svc_handler - - sh->close (CLOSE_DURING_NEW_CONNECTION); - - return -1; -} - -template -ACE_Connector::~ACE_Connector (void) -{ - ACE_TRACE ("ACE_Connector::~ACE_Connector"); - - this->close (); -} - -template void -ACE_Connector::initialize_svc_handler -(ACE_HANDLE handle, - SVC_HANDLER *svc_handler) -{ - // Try to find out if the reactor uses event associations for the - // handles it waits on. If so we need to reset it. - bool reset_new_handle = - this->reactor ()->uses_event_associations (); - - if (reset_new_handle) - this->connector_.reset_new_handle (handle); - - // Transfer ownership of the ACE_HANDLE to the SVC_HANDLER. - svc_handler->set_handle (handle); - - typename PEER_CONNECTOR::PEER_ADDR raddr; - - // Check to see if we're connected. - if (svc_handler->peer ().get_remote_addr (raddr) != -1) - this->activate_svc_handler (svc_handler); - else // Somethings gone wrong, so close down... - { -#if defined (ACE_WIN32) - // Win32 (at least prior to Windows 2000) has a timing problem. - // If you check to see if the connection has completed too fast, - // it will fail - so wait 35 milliseconds to let it catch up. - ACE_Time_Value tv (0, ACE_NON_BLOCKING_BUG_DELAY); - ACE_OS::sleep (tv); - if (svc_handler->peer ().get_remote_addr (raddr) != -1) - this->activate_svc_handler (svc_handler); - else // do the svc handler close below... -#endif /* ACE_WIN32 */ - svc_handler->close (NORMAL_CLOSE_OPERATION); - } -} - -template void -ACE_Connector::reactor (ACE_Reactor *reactor) -{ - this->reactor_ = reactor; -} - -template ACE_Reactor * -ACE_Connector::reactor (void) const -{ - return this->reactor_; -} - -template ACE_Unbounded_Set & -ACE_Connector::non_blocking_handles (void) -{ - return this->non_blocking_handles_; -} - -template int -ACE_Connector::close (void) -{ - // If there are no non-blocking handle pending, return immediately. - if (this->non_blocking_handles ().size () == 0) - return 0; - - // Exclusive access to the Reactor. - ACE_GUARD_RETURN (ACE_Lock, ace_mon, this->reactor ()->lock (), -1); - - // Go through all the non-blocking handles. It is necessary to - // create a new iterator each time because we remove from the handle - // set when we cancel the Svc_Handler. - ACE_HANDLE *handle = 0; - while (1) - { - ACE_Unbounded_Set_Iterator - iterator (this->non_blocking_handles ()); - if (!iterator.next (handle)) - break; - - ACE_Event_Handler *handler = - this->reactor ()->find_handler (*handle); - if (handler == 0) - { - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("%t: Connector::close h %d, no handler\n"), - *handle)); - // Remove handle from the set of non-blocking handles. - this->non_blocking_handles ().remove (*handle); - continue; - } - - // find_handler() incremented handler's refcount; ensure it's decremented - ACE_Event_Handler_var safe_handler (handler); - NBCH *nbch = dynamic_cast (handler); - if (nbch == 0) - { - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("%t: Connector::close h %d handler %@ ") - ACE_TEXT ("not a legit handler\n"), - *handle, - handler)); - // Remove handle from the set of non-blocking handles. - this->non_blocking_handles ().remove (*handle); - continue; - } - SVC_HANDLER *svc_handler = nbch->svc_handler (); - - // Cancel the non-blocking connection. - this->cancel (svc_handler); - - // Close the associated Svc_Handler. - svc_handler->close (NORMAL_CLOSE_OPERATION); - } - - return 0; -} - -template int -ACE_Connector::fini (void) -{ - ACE_TRACE ("ACE_Connector::fini"); - - return this->close (); -} - -// Hook called by the explicit dynamic linking facility. - -template int -ACE_Connector::init (int, ACE_TCHAR *[]) -{ - ACE_TRACE ("ACE_Connector::init"); - return -1; -} - -template int -ACE_Connector::suspend (void) -{ - ACE_TRACE ("ACE_Connector::suspend"); - return -1; -} - -template int -ACE_Connector::resume (void) -{ - ACE_TRACE ("ACE_Connector::resume"); - return -1; -} - -template int -ACE_Connector::info (ACE_TCHAR **strp, size_t length) const -{ - ACE_TRACE ("ACE_Connector::info"); - ACE_TCHAR buf[BUFSIZ]; - - ACE_OS::sprintf (buf, - ACE_TEXT ("%s\t %s"), - ACE_TEXT ("ACE_Connector"), - ACE_TEXT ("# connector factory\n")); - - if (*strp == 0 && (*strp = ACE_OS::strdup (buf)) == 0) - return -1; - else - ACE_OS::strsncpy (*strp, buf, length); - return static_cast (ACE_OS::strlen (buf)); -} - -template int -ACE_Strategy_Connector::open (ACE_Reactor *r, - int flags) -{ - ACE_TRACE ("ACE_Strategy_Connector::open"); - return this->open (r, 0, 0, 0, flags); -} - -template int -ACE_Strategy_Connector::open -(ACE_Reactor *r, - ACE_Creation_Strategy *cre_s, - ACE_Connect_Strategy *conn_s, - ACE_Concurrency_Strategy *con_s, - int flags) -{ - ACE_TRACE ("ACE_Strategy_Connector::open"); - - this->reactor (r); - - // @@ Not implemented yet. - // this->flags_ = flags; - ACE_UNUSED_ARG (flags); - - // Initialize the creation strategy. - - // First we decide if we need to clean up. - if (this->creation_strategy_ != 0 && - this->delete_creation_strategy_ && - cre_s != 0) - { - delete this->creation_strategy_; - this->creation_strategy_ = 0; - this->delete_creation_strategy_ = false; - } - - if (cre_s != 0) - this->creation_strategy_ = cre_s; - else if (this->creation_strategy_ == 0) - { - ACE_NEW_RETURN (this->creation_strategy_, - CREATION_STRATEGY (0, r), - -1); - this->delete_creation_strategy_ = true; - } - - - // Initialize the accept strategy. - - if (this->connect_strategy_ != 0 && - this->delete_connect_strategy_ && - conn_s != 0) - { - delete this->connect_strategy_; - this->connect_strategy_ = 0; - this->delete_connect_strategy_ = false; - } - - if (conn_s != 0) - this->connect_strategy_ = conn_s; - else if (this->connect_strategy_ == 0) - { - ACE_NEW_RETURN (this->connect_strategy_, - CONNECT_STRATEGY, - -1); - this->delete_connect_strategy_ = true; - } - - // Initialize the concurrency strategy. - - if (this->concurrency_strategy_ != 0 && - this->delete_concurrency_strategy_ && - con_s != 0) - { - delete this->concurrency_strategy_; - this->concurrency_strategy_ = 0; - this->delete_concurrency_strategy_ = false; - } - - if (con_s != 0) - this->concurrency_strategy_ = con_s; - else if (this->concurrency_strategy_ == 0) - { - ACE_NEW_RETURN (this->concurrency_strategy_, - CONCURRENCY_STRATEGY, - -1); - this->delete_concurrency_strategy_ = true; - } - - return 0; -} - -template -ACE_Strategy_Connector::ACE_Strategy_Connector -(ACE_Reactor *reactor, - ACE_Creation_Strategy *cre_s, - ACE_Connect_Strategy *conn_s, - ACE_Concurrency_Strategy *con_s, - int flags) - : base_type (reactor), - creation_strategy_ (0), - delete_creation_strategy_ (false), - connect_strategy_ (0), - delete_connect_strategy_ (false), - concurrency_strategy_ (0), - delete_concurrency_strategy_ (false) -{ - ACE_TRACE ("ACE_Connector::ACE_Strategy_Connector"); - - if (this->open (reactor, cre_s, conn_s, con_s, flags) == -1) - ACELIB_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("ACE_Strategy_Connector::ACE_Strategy_Connector"))); -} - -template -ACE_Strategy_Connector::~ACE_Strategy_Connector (void) -{ - ACE_TRACE ("ACE_Strategy_Connector::~ACE_Strategy_Connector"); - - // Close down - this->close (); -} - -template int -ACE_Strategy_Connector::close (void) -{ - if (this->delete_creation_strategy_) - delete this->creation_strategy_; - this->delete_creation_strategy_ = false; - this->creation_strategy_ = 0; - - if (this->delete_connect_strategy_) - delete this->connect_strategy_; - this->delete_connect_strategy_ = false; - this->connect_strategy_ = 0; - - if (this->delete_concurrency_strategy_) - delete this->concurrency_strategy_; - this->delete_concurrency_strategy_ = false; - this->concurrency_strategy_ = 0; - - return SUPER::close (); -} - -template int -ACE_Strategy_Connector::make_svc_handler (SVC_HANDLER *&sh) -{ - return this->creation_strategy_->make_svc_handler (sh); -} - -template int -ACE_Strategy_Connector::connect_svc_handler -(SVC_HANDLER *&sh, - const typename PEER_CONNECTOR::PEER_ADDR &remote_addr, - ACE_Time_Value *timeout, - const typename PEER_CONNECTOR::PEER_ADDR &local_addr, - int reuse_addr, - int flags, - int perms) -{ - return this->connect_strategy_->connect_svc_handler (sh, - remote_addr, - timeout, - local_addr, - reuse_addr, - flags, - perms); -} - -template int -ACE_Strategy_Connector::connect_svc_handler -(SVC_HANDLER *&sh, - SVC_HANDLER *&sh_copy, - const typename PEER_CONNECTOR::PEER_ADDR &remote_addr, - ACE_Time_Value *timeout, - const typename PEER_CONNECTOR::PEER_ADDR &local_addr, - int reuse_addr, - int flags, - int perms) -{ - return this->connect_strategy_->connect_svc_handler (sh, - sh_copy, - remote_addr, - timeout, - local_addr, - reuse_addr, - flags, - perms); -} - -template int -ACE_Strategy_Connector::activate_svc_handler (SVC_HANDLER *svc_handler) -{ - return this->concurrency_strategy_->activate_svc_handler (svc_handler, this); -} - -template ACE_Creation_Strategy * -ACE_Strategy_Connector::creation_strategy (void) const -{ - return this->creation_strategy_; -} - -template ACE_Connect_Strategy * -ACE_Strategy_Connector::connect_strategy (void) const -{ - return this->connect_strategy_; -} - -template ACE_Concurrency_Strategy * -ACE_Strategy_Connector::concurrency_strategy (void) const -{ - return this->concurrency_strategy_; -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_CONNECTOR_C */ diff --git a/modules/worldengine/deps/acelite/ace/Connector.h b/modules/worldengine/deps/acelite/ace/Connector.h deleted file mode 100644 index a70f03a242..0000000000 --- a/modules/worldengine/deps/acelite/ace/Connector.h +++ /dev/null @@ -1,580 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Connector.h - * - * @author Douglas C. Schmidt - */ -//============================================================================= - -#ifndef ACE_CONNECTOR_H -#define ACE_CONNECTOR_H - -#include /**/ "ace/pre.h" - -#include "ace/Service_Object.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Strategies_T.h" -#include "ace/Synch_Options.h" -#include "ace/Unbounded_Set.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_Connector_Base - * - * @brief This base interface allows ACE_NonBlocking_Connect_Handler - * to only care about the SVC_HANDLER template parameter of the - * ACE_Connector. Otherwise, ACE_NonBlocking_Connect_Handler would - * have to be configured with all the template parameters that - * ACE_Connector is configured with. - */ -template -class ACE_Connector_Base -{ -public: - - virtual ~ACE_Connector_Base (void) {} - - /// Initialize the Svc_Handler. - virtual void initialize_svc_handler (ACE_HANDLE handle, - SVC_HANDLER *svc_handler) = 0; - - /// Return the handle set representing the non-blocking connects in - /// progress. - virtual ACE_Unbounded_Set &non_blocking_handles (void) = 0; -}; - -/** - * @class ACE_NonBlocking_Connect_Handler - * - * @brief Performs non-blocking connects on behalf of the Connector. - */ -template -class ACE_NonBlocking_Connect_Handler : public ACE_Event_Handler -{ -public: - - /// Constructor. - ACE_NonBlocking_Connect_Handler (ACE_Connector_Base &connector, - SVC_HANDLER *, - long timer_id); - - /// Destructor. - ~ACE_NonBlocking_Connect_Handler (void); - - /// Close up and return underlying SVC_HANDLER through @c sh. - /** - * If the return value is true the close was performed succesfully, - * implying that this object was removed from the reactor and thereby - * (by means of reference counting decremented to 0) deleted. - * If the return value is false, the close was not successful. - * The @c sh does not have any connection to the return - * value. The argument will return a valid svc_handler object if a - * valid one exists within the object. Returning a valid svc_handler - * pointer also invalidates the svc_handler contained in this - * object. - */ - bool close (SVC_HANDLER *&sh); - - /// Get SVC_HANDLER. - SVC_HANDLER *svc_handler (void); - - /// Get handle. - ACE_HANDLE handle (void); - - /// Set handle. - void handle (ACE_HANDLE); - - /// Get timer id. - long timer_id (void); - - /// Set timer id. - void timer_id (long timer_id); - - /// Called by ACE_Reactor when asynchronous connections fail. - virtual int handle_input (ACE_HANDLE); - - /// Called by ACE_Dev_Poll_Reactor when asynchronous connections fail. - virtual int handle_close (ACE_HANDLE, ACE_Reactor_Mask); - - /// Called by ACE_Reactor when asynchronous connections succeed. - virtual int handle_output (ACE_HANDLE); - - /// Called by ACE_Reactor when asynchronous connections suceeds (on - /// some platforms only). - virtual int handle_exception (ACE_HANDLE fd); - - /// This method is called if a connection times out before - /// completing. - virtual int handle_timeout (const ACE_Time_Value &tv, const void *arg); - - /// Should Reactor resume us if we have been suspended before the upcall? - virtual int resume_handler (void); - - /// Dump the state of an object. - void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - -private: - - /// Connector base. - ACE_Connector_Base &connector_; - - /// Associated SVC_HANDLER. - SVC_HANDLER *svc_handler_; - - /// Same as svc_handler_ if svc_handler_ is reference counted. - SVC_HANDLER *cleanup_svc_handler_; - - /// Associated timer id. - long timer_id_; -}; - -/** - * @class ACE_Connector - * - * @brief Generic factory for actively connecting clients and creating - * service handlers (SVC_HANDLERs). - * - * Implements the strategy for actively establishing connections with - * clients. Both blocking and non-blocking connects are supported. - * Moreover, non-blocking connects support timeouts. - * - * An ACE_Connector is parameterized by concrete types that conform to - * the interfaces of SVC_HANDLER and PEER_CONNECTOR described below. - * - * @tparam SVC_HANDLER The name of the concrete type that performs the - * application-specific service. The SVC_HANDLER typically - * inherits from ACE_Svc_Handler. @see Svc_Handler.h. - * - * @tparam PEER_CONNECTOR The name of the class that implements the - * PEER_CONNECTOR endpoint (e.g., ACE_SOCK_Connector) to - * passively establish connections. A PEER_CONNECTOR - * implementation must provide a PEER_STREAM and PEER_ADDR - * trait to identify the type of stream (e.g., - * ACE_SOCK_Stream) and type of address (e.g., ACE_INET_Addr) - * used by the endpoint. - */ -template -class ACE_Connector : public ACE_Connector_Base, public ACE_Service_Object -{ -public: - - // Useful STL-style traits. - typedef typename SVC_HANDLER::addr_type addr_type; - typedef PEER_CONNECTOR connector_type; - typedef SVC_HANDLER handler_type; - typedef typename SVC_HANDLER::stream_type stream_type; - typedef typename PEER_CONNECTOR::PEER_ADDR peer_addr_type; - typedef typename PEER_CONNECTOR::PEER_ADDR PEER_ADDR_TYPEDEF; - - /** - * Initialize a connector. @a flags indicates how SVC_HANDLER's - * should be initialized prior to being activated. Right now, the - * only flag that is processed is ACE_NONBLOCK, which enabled - * non-blocking I/O on the SVC_HANDLER when it is opened. - */ - ACE_Connector (ACE_Reactor *r = ACE_Reactor::instance (), - int flags = 0); - - /** - * Initialize a connector. @a flags indicates how SVC_HANDLER's - * should be initialized prior to being activated. Right now, the - * only flag that is processed is ACE_NONBLOCK, which enabled - * non-blocking I/O on the SVC_HANDLER when it is opened. - */ - virtual int open (ACE_Reactor *r = ACE_Reactor::instance (), - int flags = 0); - - /// Shutdown a connector and release resources. - virtual ~ACE_Connector (void); - - // = Connection establishment methods. - - /** - * Initiate connection of @a svc_handler to peer at @a remote_addr - * using @a synch_options. If the caller wants to designate the - * selected @a local_addr they can (and can also insist that the - * @a local_addr be reused by passing a value @a reuse_addr == - * 1). @a flags and @a perms can be used to pass any flags that are - * needed to perform specific operations such as opening a file - * within connect with certain permissions. If the connection fails - * the hook on the @a svc_handler will be called - * automatically to prevent resource leaks. - */ - virtual int connect (SVC_HANDLER *&svc_handler, - const typename PEER_CONNECTOR::PEER_ADDR &remote_addr, - const ACE_Synch_Options &synch_options = ACE_Synch_Options::defaults, - const typename PEER_CONNECTOR::PEER_ADDR &local_addr - = reinterpret_cast(peer_addr_type::sap_any), - int reuse_addr = 0, - int flags = O_RDWR, - int perms = 0); - - /** - * This is a variation on the previous method. On cached - * connectors the @a svc_handler_hint variable can be used as a hint - * for future lookups. Since this variable is modified in the - * context of the internal cache its use is thread-safe. But the - * actual svc_handler for the current connection is returned in the - * second parameter @a svc_handler. If the connection fails the - * hook on the @a svc_handler will be called automatically to - * prevent resource leaks. - */ - virtual int connect (SVC_HANDLER *&svc_handler_hint, - SVC_HANDLER *&svc_handler, - const typename PEER_CONNECTOR::PEER_ADDR &remote_addr, - const ACE_Synch_Options &synch_options = ACE_Synch_Options::defaults, - const typename PEER_CONNECTOR::PEER_ADDR &local_addr - = reinterpret_cast(peer_addr_type::sap_any), - int reuse_addr = 0, - int flags = O_RDWR, - int perms = 0); - - /** - * Initiate connection of @a n @a svc_handlers to peers at - * @a remote_addrs using @a synch_options. Returns -1 if failure - * occurs and 0 otherwise. If @a failed_svc_handlers is non-NULL, a - * 1 is placed in the corresponding index of @a failed_svc_handlers - * for each that failed to connect, else a 0 is - * placed in that index. - */ - virtual int connect_n (size_t n, - SVC_HANDLER *svc_handlers[], - typename PEER_CONNECTOR::PEER_ADDR remote_addrs[], - ACE_TCHAR *failed_svc_handlers = 0, - const ACE_Synch_Options &synch_options = - ACE_Synch_Options::defaults); - - /** - * Cancel the @a svc_handler that was started asynchronously. Note that - * this is the only case when the Connector does not actively close - * the @a svc_handler. It is left up to the caller of to - * decide the fate of the @a svc_handler. - */ - virtual int cancel (SVC_HANDLER *svc_handler); - - /// Close down the Connector. All pending non-blocking connects are - /// canceled and the corresponding svc_handler is closed. - virtual int close (void); - - /// Return the underlying PEER_CONNECTOR object. - virtual PEER_CONNECTOR &connector (void) const; - - /// Initialize Svc_Handler. - virtual void initialize_svc_handler (ACE_HANDLE handle, - SVC_HANDLER *svc_handler); - - /// Set Reactor. - virtual void reactor (ACE_Reactor *reactor); - - /// Get Reactor. - virtual ACE_Reactor *reactor (void) const; - - /// Dump the state of an object. - void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - -protected: - // = Helpful typedefs. - typedef ACE_NonBlocking_Connect_Handler NBCH; - - // = The following two methods define the Connector's strategies for - // creating, connecting, and activating SVC_HANDLER's, respectively. - - /** - * Bridge method for creating a SVC_HANDLER. The default is to - * create a new SVC_HANDLER only if @a sh == 0, else @a sh is - * unchanged. However, subclasses can override this policy to - * perform SVC_HANDLER creation in any way that they like (such as - * creating subclass instances of SVC_HANDLER, using a singleton, - * dynamically linking the handler, etc.). Returns -1 if failure, - * else 0. - */ - virtual int make_svc_handler (SVC_HANDLER *&sh); - - /** - * Bridge method for connecting the @a svc_handler to the - * @a remote_addr. The default behavior delegates to the - * . - */ - virtual int connect_svc_handler (SVC_HANDLER *&svc_handler, - const typename PEER_CONNECTOR::PEER_ADDR &remote_addr, - ACE_Time_Value *timeout, - const typename PEER_CONNECTOR::PEER_ADDR &local_addr, - int reuse_addr, - int flags, - int perms); - virtual int connect_svc_handler (SVC_HANDLER *&svc_handler, - SVC_HANDLER *&sh_copy, - const typename PEER_CONNECTOR::PEER_ADDR &remote_addr, - ACE_Time_Value *timeout, - const typename PEER_CONNECTOR::PEER_ADDR &local_addr, - int reuse_addr, - int flags, - int perms); - - /** - * Bridge method for activating a @a svc_handler with the appropriate - * concurrency strategy. The default behavior of this method is to - * activate the SVC_HANDLER by calling its method (which - * allows the SVC_HANDLER to define its own concurrency strategy). - * However, subclasses can override this strategy to do more - * sophisticated concurrency activations (such as creating the - * SVC_HANDLER as an "active object" via multi-threading or - * multi-processing). - */ - virtual int activate_svc_handler (SVC_HANDLER *svc_handler); - - /// Creates and registers ACE_NonBlocking_Connect_Handler. - int nonblocking_connect (SVC_HANDLER *, - const ACE_Synch_Options &); - - /// Implementation of the connect methods. - virtual int connect_i (SVC_HANDLER *&svc_handler, - SVC_HANDLER **sh_copy, - const typename PEER_CONNECTOR::PEER_ADDR &remote_addr, - const ACE_Synch_Options &synch_options, - const typename PEER_CONNECTOR::PEER_ADDR &local_addr, - int reuse_addr, - int flags, - int perms); - - /// Return the handle set representing the non-blocking connects in - /// progress. - ACE_Unbounded_Set &non_blocking_handles (void); - - // = Dynamic linking hooks. - /// Default version does no work and returns -1. Must be overloaded - /// by application developer to do anything meaningful. - virtual int init (int argc, ACE_TCHAR *argv[]); - - /// Calls handle_close() to shutdown the Connector gracefully. - virtual int fini (void); - - /// Default version returns address info in @a buf. - virtual int info (ACE_TCHAR **strp, size_t length) const; - - // = Service management hooks. - /// Default version does no work and returns -1. Must be overloaded - /// by application developer to do anything meaningful. - virtual int suspend (void); - - /// Default version does no work and returns -1. Must be overloaded - /// by application developer to do anything meaningful. - virtual int resume (void); - -private: - /// This is the peer connector factory. - PEER_CONNECTOR connector_; - - /** - * Flags that indicate how SVC_HANDLER's should be initialized - * prior to being activated. Right now, the only flag that is - * processed is ACE_NONBLOCK, which enabled non-blocking I/O on - * the SVC_HANDLER when it is opened. - */ - int flags_; - - /// Pointer to the Reactor. - ACE_Reactor *reactor_; - - /// Handle set representing the non-blocking connects in progress. - ACE_Unbounded_Set non_blocking_handles_; - -}; - -/** - * @class ACE_Strategy_Connector - * - * @brief Abstract factory for creating a service handler - * (SVC_HANDLER), connecting the SVC_HANDLER, and activating the - * SVC_HANDLER. - * - * Implements a flexible and extensible set of strategies for - * actively establishing connections with clients. There are - * three main strategies: (1) creating a SVC_HANDLER, (2) - * actively initiating a new connection from the client, - * and (3) activating the SVC_HANDLER with a - * particular concurrency mechanism after the connection is established. - */ -template -class ACE_Strategy_Connector - : public ACE_Connector -{ -public: - - // Useful STL-style traits. - typedef ACE_Creation_Strategy - creation_strategy_type; - typedef ACE_Connect_Strategy - connect_strategy_type; - typedef ACE_Concurrency_Strategy - concurrency_strategy_type; - typedef ACE_Connector - base_type; - - // = Define some useful (old style) traits. - typedef ACE_Creation_Strategy - CREATION_STRATEGY; - typedef ACE_Connect_Strategy - CONNECT_STRATEGY; - typedef ACE_Concurrency_Strategy - CONCURRENCY_STRATEGY; - typedef ACE_Connector - SUPER; - - /** - * Initialize a connector. @a flags indicates how SVC_HANDLER's - * should be initialized prior to being activated. Right now, the - * only flag that is processed is ACE_NONBLOCK, which enabled - * non-blocking I/O on the SVC_HANDLER when it is opened. - */ - ACE_Strategy_Connector (ACE_Reactor *r = ACE_Reactor::instance (), - ACE_Creation_Strategy * = 0, - ACE_Connect_Strategy * = 0, - ACE_Concurrency_Strategy * = 0, - int flags = 0); - - /** - * Initialize a connector. @a flags indicates how SVC_HANDLER's - * should be initialized prior to being activated. Right now, the - * only flag that is processed is ACE_NONBLOCK, which enabled - * non-blocking I/O on the SVC_HANDLER when it is opened. - * Default strategies would be created and used. - */ - virtual int open (ACE_Reactor *r, - int flags); - - /** - * Initialize a connector. @a flags indicates how SVC_HANDLER's - * should be initialized prior to being activated. Right now, the - * only flag that is processed is ACE_NONBLOCK, which enabled - * non-blocking I/O on the SVC_HANDLER when it is opened. - */ - virtual int open (ACE_Reactor *r = ACE_Reactor::instance (), - ACE_Creation_Strategy * = 0, - ACE_Connect_Strategy * = 0, - ACE_Concurrency_Strategy * = 0, - int flags = 0); - - /// Shutdown a connector and release resources. - virtual ~ACE_Strategy_Connector (void); - - /// Close down the Connector - virtual int close (void); - - // = Strategies accessors - virtual ACE_Creation_Strategy *creation_strategy (void) const; - virtual ACE_Connect_Strategy *connect_strategy (void) const; - virtual ACE_Concurrency_Strategy *concurrency_strategy (void) const; - -protected: - // = The following three methods define the 's strategies - // for creating, connecting, and activating SVC_HANDLER's, - // respectively. - - /** - * Bridge method for creating a SVC_HANDLER. The strategy for - * creating a SVC_HANDLER are configured into the Connector via - * it's . The default is to create a new - * SVC_HANDLER only if @a sh == 0, else @a sh is unchanged. - * However, subclasses can override this policy to perform - * SVC_HANDLER creation in any way that they like (such as - * creating subclass instances of SVC_HANDLER, using a singleton, - * dynamically linking the handler, etc.). Returns -1 if failure, - * else 0. - */ - virtual int make_svc_handler (SVC_HANDLER *&sh); - - /** - * Bridge method for connecting the new connection into the - * SVC_HANDLER. The default behavior delegates to the - * in the . - */ - virtual int connect_svc_handler (SVC_HANDLER *&sh, - const typename PEER_CONNECTOR::PEER_ADDR &remote_addr, - ACE_Time_Value *timeout, - const typename PEER_CONNECTOR::PEER_ADDR &local_addr, - int reuse_addr, - int flags, - int perms); - - /** - * Bridge method for connecting the new connection into the - * SVC_HANDLER. The default behavior delegates to the - * in the . - * @a sh_copy is used to obtain a copy of the @a sh pointer, but that - * can be kept in the stack; the motivation is a bit too long to - * include here, but basically we want to modify @a sh safely, using - * the internal locks in the Connect_Strategy, while saving a TSS - * copy in @a sh_copy, usually located in the stack. - */ - virtual int connect_svc_handler (SVC_HANDLER *&sh, - SVC_HANDLER *&sh_copy, - const typename PEER_CONNECTOR::PEER_ADDR &remote_addr, - ACE_Time_Value *timeout, - const typename PEER_CONNECTOR::PEER_ADDR &local_addr, - int reuse_addr, - int flags, - int perms); - - /** - * Bridge method for activating a SVC_HANDLER with the appropriate - * concurrency strategy. The default behavior of this method is to - * activate the SVC_HANDLER by calling its method (which - * allows the SVC_HANDLER to define its own concurrency strategy). - * However, subclasses can override this strategy to do more - * sophisticated concurrency activations (such as creating the - * SVC_HANDLER as an "active object" via multi-threading or - * multi-processing). - */ - virtual int activate_svc_handler (SVC_HANDLER *svc_handler); - - // = Strategy objects. - - /// Creation strategy for an Connector. - CREATION_STRATEGY *creation_strategy_; - - /// True if Connector created the creation strategy and thus should - /// delete it, else false. - bool delete_creation_strategy_; - - /// Connect strategy for a Connector. - CONNECT_STRATEGY *connect_strategy_; - - /// True if Connector created the connect strategy and thus should - /// delete it, else false. - bool delete_connect_strategy_; - - /// Concurrency strategy for a Connector. - CONCURRENCY_STRATEGY *concurrency_strategy_; - - /// True if Connector created the concurrency strategy and thus should - /// delete it, else false. - bool delete_concurrency_strategy_; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "ace/Connector.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Connector.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ - -#include /**/ "ace/post.h" - -#endif /* ACE_CONNECTOR_H */ diff --git a/modules/worldengine/deps/acelite/ace/Containers.cpp b/modules/worldengine/deps/acelite/ace/Containers.cpp deleted file mode 100644 index 40c5629620..0000000000 --- a/modules/worldengine/deps/acelite/ace/Containers.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include "ace/Containers.h" - -#if !defined (__ACE_INLINE__) -#include "ace/Containers.inl" -#endif /* __ACE_INLINE__ */ - diff --git a/modules/worldengine/deps/acelite/ace/Containers.h b/modules/worldengine/deps/acelite/ace/Containers.h deleted file mode 100644 index 6288431ae1..0000000000 --- a/modules/worldengine/deps/acelite/ace/Containers.h +++ /dev/null @@ -1,69 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Containers.h - * - * @author Douglas C. Schmidt - */ -//============================================================================= - -#ifndef ACE_CONTAINERS_H -#define ACE_CONTAINERS_H - -#include /**/ "ace/pre.h" - -#include /**/ "ace/ACE_export.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -template class ACE_Double_Linked_List; -template class ACE_Double_Linked_List_Iterator_Base; -template class ACE_Double_Linked_List_Iterator; -template class ACE_Double_Linked_List_Reverse_Iterator; - -/** - * @class ACE_DLList_Node - * - * @brief Base implementation of element in a DL list. Needed for - * ACE_Double_Linked_List. - */ -class ACE_Export ACE_DLList_Node -{ -public: - friend class ACE_Double_Linked_List; - friend class ACE_Double_Linked_List_Iterator_Base; - friend class ACE_Double_Linked_List_Iterator; - friend class ACE_Double_Linked_List_Reverse_Iterator; - - ACE_DLList_Node (void *i, - ACE_DLList_Node *n = 0, - ACE_DLList_Node *p = 0); - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - - void *item_; - - ACE_DLList_Node *next_; - ACE_DLList_Node *prev_; - -protected: - ACE_DLList_Node (void); -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/Containers.inl" -#endif /* __ACE_INLINE__ */ - -#include "ace/Containers_T.h" - -#include /**/ "ace/post.h" - -#endif /* ACE_CONTAINERS_H */ diff --git a/modules/worldengine/deps/acelite/ace/Containers.inl b/modules/worldengine/deps/acelite/ace/Containers.inl deleted file mode 100644 index cd7507d403..0000000000 --- a/modules/worldengine/deps/acelite/ace/Containers.inl +++ /dev/null @@ -1,22 +0,0 @@ -// -*- C++ -*- -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_INLINE -ACE_DLList_Node::ACE_DLList_Node (void) - : item_ (0), - next_ (0), - prev_ (0) -{ -} - -ACE_INLINE -ACE_DLList_Node::ACE_DLList_Node (void *i, - ACE_DLList_Node *n, - ACE_DLList_Node *p) - : item_ (i), - next_ (n), - prev_ (p) -{ -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Containers_T.cpp b/modules/worldengine/deps/acelite/ace/Containers_T.cpp deleted file mode 100644 index 4a835ebeae..0000000000 --- a/modules/worldengine/deps/acelite/ace/Containers_T.cpp +++ /dev/null @@ -1,1901 +0,0 @@ -#ifndef ACE_CONTAINERS_T_CPP -#define ACE_CONTAINERS_T_CPP - -#include "ace/Log_Category.h" -#include "ace/Malloc_Base.h" -#include "ace/OS_Memory.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Containers.h" - -#if !defined (__ACE_INLINE__) -#include "ace/Containers_T.inl" -#endif /* __ACE_INLINE__ */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_ALLOC_HOOK_DEFINE(ACE_Bounded_Stack) - -template void -ACE_Bounded_Stack::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_Bounded_Stack::dump"); -#endif /* ACE_HAS_DUMP */ -} - -template -ACE_Bounded_Stack::ACE_Bounded_Stack (size_t size) - : size_ (size), - top_ (0) -{ - ACE_NEW (this->stack_, - T[size]); - ACE_TRACE ("ACE_Bounded_Stack::ACE_Bounded_Stack"); -} - -template -ACE_Bounded_Stack::ACE_Bounded_Stack (const ACE_Bounded_Stack &s) - : size_ (s.size_), - top_ (s.top_) -{ - ACE_NEW (this->stack_, - T[s.size_]); - - ACE_TRACE ("ACE_Bounded_Stack::ACE_Bounded_Stack"); - - for (size_t i = 0; i < this->top_; i++) - this->stack_[i] = s.stack_[i]; -} - -template void -ACE_Bounded_Stack::operator= (const ACE_Bounded_Stack &s) -{ - ACE_TRACE ("ACE_Bounded_Stack::operator="); - - if (&s != this) - { - if (this->size_ < s.size_) - { - delete [] this->stack_; - ACE_NEW (this->stack_, - T[s.size_]); - this->size_ = s.size_; - } - this->top_ = s.top_; - - for (size_t i = 0; i < this->top_; i++) - this->stack_[i] = s.stack_[i]; - } -} - -template -ACE_Bounded_Stack::~ACE_Bounded_Stack (void) -{ - ACE_TRACE ("ACE_Bounded_Stack::~ACE_Bounded_Stack"); - delete [] this->stack_; -} - -// ---------------------------------------- - -ACE_ALLOC_HOOK_DEFINE(ACE_Fixed_Stack) - -template void -ACE_Fixed_Stack::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_Fixed_Stack::dump"); -#endif /* ACE_HAS_DUMP */ -} - -template -ACE_Fixed_Stack::ACE_Fixed_Stack (void) - : size_ (ACE_SIZE), - top_ (0) -{ - ACE_TRACE ("ACE_Fixed_Stack::ACE_Fixed_Stack"); -} - -template -ACE_Fixed_Stack::ACE_Fixed_Stack (const ACE_Fixed_Stack &s) - : size_ (s.size_), - top_ (s.top_) -{ - ACE_TRACE ("ACE_Fixed_Stack::ACE_Fixed_Stack"); - for (size_t i = 0; i < this->top_; i++) - this->stack_[i] = s.stack_[i]; -} - -template void -ACE_Fixed_Stack::operator= (const ACE_Fixed_Stack &s) -{ - ACE_TRACE ("ACE_Fixed_Stack::operator="); - - if (&s != this) - { - this->top_ = s.top_; - - for (size_t i = 0; i < this->top_; i++) - this->stack_[i] = s.stack_[i]; - } -} - -template -ACE_Fixed_Stack::~ACE_Fixed_Stack (void) -{ - ACE_TRACE ("ACE_Fixed_Stack::~ACE_Fixed_Stack"); -} - -//---------------------------------------- - -ACE_ALLOC_HOOK_DEFINE(ACE_Unbounded_Stack) - -template void -ACE_Unbounded_Stack::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - // ACE_TRACE ("ACE_Unbounded_Stack::dump"); -#endif /* ACE_HAS_DUMP */ -} - -template -ACE_Unbounded_Stack::ACE_Unbounded_Stack (ACE_Allocator *alloc) - : head_ (0), - cur_size_ (0), - allocator_ (alloc) -{ - // ACE_TRACE ("ACE_Unbounded_Stack::ACE_Unbounded_Stack"); - if (this->allocator_ == 0) - this->allocator_ = ACE_Allocator::instance (); - - ACE_NEW_MALLOC (this->head_, - (ACE_Node *) this->allocator_->malloc (sizeof (ACE_Node)), - ACE_Node); - this->head_->next_ = this->head_; -} - -template void -ACE_Unbounded_Stack::delete_all_nodes (void) -{ - // ACE_TRACE ("ACE_Unbounded_Stack::delete_all_nodes"); - - while (this->is_empty () == 0) - { - ACE_Node *temp = this->head_->next_; - this->head_->next_ = temp->next_; - ACE_DES_FREE_TEMPLATE (temp, this->allocator_->free, - ACE_Node, ); - } - - this->cur_size_ = 0; - - ACE_ASSERT (this->head_ == this->head_->next_ - && this->is_empty ()); -} - -template void -ACE_Unbounded_Stack::copy_all_nodes (const ACE_Unbounded_Stack &s) -{ - // ACE_TRACE ("ACE_Unbounded_Stack::copy_all_nodes"); - - ACE_ASSERT (this->head_ == this->head_->next_); - - ACE_Node *temp = this->head_; - - for (ACE_Node *s_temp = s.head_->next_; - s_temp != s.head_; - s_temp = s_temp->next_) - { - ACE_Node *nptr = temp->next_; - ACE_NEW_MALLOC (temp->next_, - (ACE_Node *) this->allocator_->malloc (sizeof (ACE_Node)), - ACE_Node (s_temp->item_, nptr)); - temp = temp->next_; - } - this->cur_size_ = s.cur_size_; -} - -template -ACE_Unbounded_Stack::ACE_Unbounded_Stack (const ACE_Unbounded_Stack &s) - : head_ (0), - cur_size_ (0), - allocator_ (s.allocator_) -{ - if (this->allocator_ == 0) - this->allocator_ = ACE_Allocator::instance (); - - ACE_NEW_MALLOC (this->head_, - (ACE_Node *) this->allocator_->malloc (sizeof (ACE_Node)), - ACE_Node); - this->head_->next_ = this->head_; - - // ACE_TRACE ("ACE_Unbounded_Stack::ACE_Unbounded_Stack"); - this->copy_all_nodes (s); -} - -template void -ACE_Unbounded_Stack::operator= (const ACE_Unbounded_Stack &s) -{ - // ACE_TRACE ("ACE_Unbounded_Stack::operator="); - - if (this != &s) - { - this->delete_all_nodes (); - this->copy_all_nodes (s); - } -} - -template -ACE_Unbounded_Stack::~ACE_Unbounded_Stack (void) -{ - // ACE_TRACE ("ACE_Unbounded_Stack::~ACE_Unbounded_Stack"); - - this->delete_all_nodes (); - ACE_DES_FREE_TEMPLATE (head_, - this->allocator_->free, - ACE_Node, - ); -} - -template int -ACE_Unbounded_Stack::push (const T &new_item) -{ - // ACE_TRACE ("ACE_Unbounded_Stack::push"); - - ACE_Node *temp = 0; - - ACE_NEW_MALLOC_RETURN (temp, - static_cast *> (this->allocator_->malloc (sizeof (ACE_Node))), - ACE_Node (new_item, this->head_->next_), - -1); - this->head_->next_ = temp; - ++this->cur_size_; - return 0; -} - -template int -ACE_Unbounded_Stack::pop (T &item) -{ - // ACE_TRACE ("ACE_Unbounded_Stack::pop"); - - if (this->is_empty ()) - return -1; - else - { - ACE_Node *temp = this->head_->next_; - item = temp->item_; - this->head_->next_ = temp->next_; - - ACE_DES_FREE_TEMPLATE (temp, - this->allocator_->free, - ACE_Node, - ); - --this->cur_size_; - return 0; - } -} - -template int -ACE_Unbounded_Stack::find (const T &item) const -{ - // ACE_TRACE ("ACE_Unbounded_Stack::find"); - // Set into the dummy node. - this->head_->item_ = item; - - ACE_Node *temp = this->head_->next_; - - // Keep looping until we find the item. - while (!(temp->item_ == item)) - temp = temp->next_; - - // If we found the dummy node then it's not really there, otherwise, - // it is there. - return temp == this->head_ ? -1 : 0; -} - -template int -ACE_Unbounded_Stack::insert (const T &item) -{ - // ACE_TRACE ("ACE_Unbounded_Stack::insert"); - - if (this->find (item) == 0) - return 1; - else - return this->push (item); -} - -template int -ACE_Unbounded_Stack::remove (const T &item) -{ - // ACE_TRACE ("ACE_Unbounded_Stack::remove"); - - // Insert the item to be founded into the dummy node. - this->head_->item_ = item; - - ACE_Node *curr = this->head_; - - while (!(curr->next_->item_ == item)) - curr = curr->next_; - - if (curr->next_ == this->head_) - return -1; // Item was not found. - else - { - ACE_Node *temp = curr->next_; - // Skip over the node that we're deleting. - curr->next_ = temp->next_; - --this->cur_size_; - ACE_DES_FREE_TEMPLATE (temp, - this->allocator_->free, - ACE_Node, - ); - return 0; - } -} - -//-------------------------------------------------- -ACE_ALLOC_HOOK_DEFINE(ACE_Double_Linked_List_Iterator_Base) - -template -ACE_Double_Linked_List_Iterator_Base::ACE_Double_Linked_List_Iterator_Base (const ACE_Double_Linked_List &dll) - : current_ (0), dllist_ (&dll) -{ - // Do nothing -} - -template -ACE_Double_Linked_List_Iterator_Base::ACE_Double_Linked_List_Iterator_Base (const ACE_Double_Linked_List_Iterator_Base &iter) - : current_ (iter.current_), - dllist_ (iter.dllist_) -{ - // Do nothing -} - - -template T * -ACE_Double_Linked_List_Iterator_Base::next (void) const -{ - return this->not_done (); -} - -template int -ACE_Double_Linked_List_Iterator_Base::next (T *&ptr) const -{ - ptr = this->not_done (); - return ptr ? 1 : 0; -} - - -template int -ACE_Double_Linked_List_Iterator_Base::done (void) const -{ - return this->not_done () ? 0 : 1; -} - -template T & -ACE_Double_Linked_List_Iterator_Base::operator* (void) const -{ - return *(this->not_done ()); -} - -// @@ Is this a valid retasking? Make sure to check with Purify and -// whatnot that we're not leaking memory or doing any other screwing things. -template void -ACE_Double_Linked_List_Iterator_Base::reset (ACE_Double_Linked_List &dll) -{ - current_ = 0; - dllist_ = &dll; -} - - template int -ACE_Double_Linked_List_Iterator_Base::go_head (void) -{ - this->current_ = static_cast (dllist_->head_->next_); - return this->current_ ? 1 : 0; -} - -template int -ACE_Double_Linked_List_Iterator_Base::go_tail (void) -{ - this->current_ = static_cast (dllist_->head_->prev_); - return this->current_ ? 1 : 0; -} - -template T * -ACE_Double_Linked_List_Iterator_Base::not_done (void) const -{ - if (this->current_ != this->dllist_->head_) - return this->current_; - else - return 0; -} - -template T * -ACE_Double_Linked_List_Iterator_Base::do_advance (void) -{ - if (this->not_done ()) - { - this->current_ = static_cast (this->current_->next_); - return this->not_done (); - } - else - return 0; -} - -template T * -ACE_Double_Linked_List_Iterator_Base::do_retreat (void) -{ - if (this->not_done ()) - { - this->current_ = static_cast (this->current_->prev_); - return this->not_done (); - } - else - return 0; -} - -template void -ACE_Double_Linked_List_Iterator_Base::dump_i (void) const -{ - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("current_ = %x"), this->current_)); - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -} - -//-------------------------------------------------- -ACE_ALLOC_HOOK_DEFINE(ACE_Double_Linked_List_Iterator) - -template -ACE_Double_Linked_List_Iterator::ACE_Double_Linked_List_Iterator (const ACE_Double_Linked_List &dll) - : ACE_Double_Linked_List_Iterator_Base (dll) -{ - this->current_ = static_cast (dll.head_->next_); - // Advance current_ out of the null area and onto the first item in - // the list -} - -template void -ACE_Double_Linked_List_Iterator::reset (ACE_Double_Linked_List &dll) -{ - this->ACE_Double_Linked_List_Iterator_Base ::reset (dll); - this->current_ = static_cast (dll.head_->next_); - // Advance current_ out of the null area and onto the first item in - // the list -} - -template int -ACE_Double_Linked_List_Iterator::first (void) -{ - return this->go_head (); -} - -template int -ACE_Double_Linked_List_Iterator::advance (void) -{ - return this->do_advance () ? 1 : 0; -} - -template T* -ACE_Double_Linked_List_Iterator::advance_and_remove (bool dont_remove) -{ - T* item = 0; - if (dont_remove) - this->do_advance (); - else - { - item = this->next (); - this->do_advance (); - // It seems dangerous to remove nodes in an iterator, but so it goes... - ACE_Double_Linked_List *dllist = - const_cast *> (this->dllist_); - dllist->remove (item); - } - return item; -} - -template void -ACE_Double_Linked_List_Iterator::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - this->dump_i (); -#endif /* ACE_HAS_DUMP */ -} - -// Prefix advance. - -template -ACE_Double_Linked_List_Iterator & -ACE_Double_Linked_List_Iterator::operator++ (void) -{ - this->do_advance (); - return *this; -} - - -// Postfix advance. - -template -ACE_Double_Linked_List_Iterator -ACE_Double_Linked_List_Iterator::operator++ (int) -{ - ACE_Double_Linked_List_Iterator retv (*this); - this->do_advance (); - return retv; -} - - -// Prefix reverse. - -template -ACE_Double_Linked_List_Iterator & -ACE_Double_Linked_List_Iterator::operator-- (void) -{ - this->do_retreat (); - return *this; -} - - -// Postfix reverse. - -template -ACE_Double_Linked_List_Iterator -ACE_Double_Linked_List_Iterator::operator-- (int) -{ - ACE_Double_Linked_List_Iterator retv (*this); - this->do_retreat (); - return retv; -} - - -//-------------------------------------------------- -ACE_ALLOC_HOOK_DEFINE(ACE_Double_Linked_List_Reverse_Iterator) - - template -ACE_Double_Linked_List_Reverse_Iterator::ACE_Double_Linked_List_Reverse_Iterator (ACE_Double_Linked_List &dll) - : ACE_Double_Linked_List_Iterator_Base (dll) -{ - this->current_ = static_cast (dll.head_->prev_); - // Advance current_ out of the null area and onto the last item in - // the list -} - -template void -ACE_Double_Linked_List_Reverse_Iterator::reset (ACE_Double_Linked_List &dll) -{ - this->ACE_Double_Linked_List_Iterator_Base ::reset (dll); - this->current_ = static_cast (dll.head_->prev_); - // Advance current_ out of the null area and onto the last item in - // the list -} - -template int -ACE_Double_Linked_List_Reverse_Iterator::first (void) -{ - return this->go_tail (); -} - -template int -ACE_Double_Linked_List_Reverse_Iterator::advance (void) -{ - return this->do_retreat () ? 1 : 0; -} - -template T* -ACE_Double_Linked_List_Reverse_Iterator::advance_and_remove (bool dont_remove) -{ - T* item = 0; - if (dont_remove) - { - this->do_retreat (); - } - else - { - item = this->next (); - this->do_retreat (); - // It seems dangerous to remove nodes in an iterator, but so it goes... - ACE_Double_Linked_List *dllist = - const_cast *> (this->dllist_); - dllist->remove (item); - } - return item; -} - -template void -ACE_Double_Linked_List_Reverse_Iterator::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - this->dump_i (); -#endif /* ACE_HAS_DUMP */ -} - -// Prefix advance. - -template -ACE_Double_Linked_List_Reverse_Iterator & -ACE_Double_Linked_List_Reverse_Iterator::operator++ (void) -{ - this->do_retreat (); - return *this; -} - - -// Postfix advance. - -template -ACE_Double_Linked_List_Reverse_Iterator -ACE_Double_Linked_List_Reverse_Iterator::operator++ (int) -{ - ACE_Double_Linked_List_Reverse_Iterator retv (*this); - this->do_retreat (); - return retv; -} - - -// Prefix reverse. - -template -ACE_Double_Linked_List_Reverse_Iterator & -ACE_Double_Linked_List_Reverse_Iterator::operator-- (void) -{ - this->do_advance (); - return *this; -} - - -// Postfix reverse. - -template -ACE_Double_Linked_List_Reverse_Iterator -ACE_Double_Linked_List_Reverse_Iterator::operator-- (int) -{ - ACE_Double_Linked_List_Reverse_Iterator retv (*this); - this->do_advance (); - return retv; -} - - -ACE_ALLOC_HOOK_DEFINE(ACE_Double_Linked_List) - - template -ACE_Double_Linked_List:: ACE_Double_Linked_List (ACE_Allocator *alloc) - : size_ (0), allocator_ (alloc) -{ - if (this->allocator_ == 0) - this->allocator_ = ACE_Allocator::instance (); - - ACE_NEW_MALLOC (this->head_, - (T *) this->allocator_->malloc (sizeof (T)), - T); - this->init_head (); -} - -template -ACE_Double_Linked_List::ACE_Double_Linked_List (const ACE_Double_Linked_List &cx) - : allocator_ (cx.allocator_) -{ - if (this->allocator_ == 0) - this->allocator_ = ACE_Allocator::instance (); - - ACE_NEW_MALLOC (this->head_, - (T *) this->allocator_->malloc (sizeof (T)), - T); - this->init_head (); - this->copy_nodes (cx); - this->size_ = cx.size_; -} - -template void -ACE_Double_Linked_List::operator= (const ACE_Double_Linked_List &cx) -{ - if (this != &cx) - { - this->delete_nodes (); - this->copy_nodes (cx); - } -} - -template -ACE_Double_Linked_List::~ACE_Double_Linked_List (void) -{ - this->delete_nodes (); - - ACE_DES_FREE (head_, - this->allocator_->free, - T); - - this->head_ = 0; -} - -template int -ACE_Double_Linked_List::is_empty (void) const -{ - return this->size () ? 0 : 1; -} - -template int -ACE_Double_Linked_List::is_full (void) const -{ - return 0; // We have no bound. -} - -template T * -ACE_Double_Linked_List::insert_tail (T *new_item) -{ - // Insert it before , i.e., at tail. - this->insert_element (new_item, 1); - return new_item; -} - -template T * -ACE_Double_Linked_List::insert_head (T *new_item) -{ - this->insert_element (new_item); // Insert it after , i.e., at head. - return new_item; -} - -template T * -ACE_Double_Linked_List::delete_head (void) -{ - if (this->is_empty ()) - return 0; - - T *temp = static_cast (this->head_->next_); - // Detach it from the list. - this->remove_element (temp); - return temp; -} - -template T * -ACE_Double_Linked_List::delete_tail (void) -{ - if (this->is_empty ()) - return 0; - - T *temp = static_cast (this->head_->prev_); - // Detach it from the list. - this->remove_element (temp); - return temp; -} - -template void -ACE_Double_Linked_List::reset (void) -{ - this->delete_nodes (); -} - -template int -ACE_Double_Linked_List::get (T *&item, size_t slot) -{ - ACE_Double_Linked_List_Iterator iter (*this); - - for (size_t i = 0; - i < slot && !iter.done (); - i++) - iter.advance (); - - item = iter.next (); - return item ? 0 : -1; -} - -template size_t -ACE_Double_Linked_List::size (void) const -{ - return this->size_; -} - -template void -ACE_Double_Linked_List::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - // Dump the state of an object. -#endif /* ACE_HAS_DUMP */ -} - -template int -ACE_Double_Linked_List::remove (T *n) -{ - return this->remove_element (n); -} - -template void -ACE_Double_Linked_List::delete_nodes (void) -{ - while (! this->is_empty ()) - { - T * temp = static_cast (this->head_->next_); - this->remove_element (temp); - ACE_DES_FREE (temp, - this->allocator_->free, - T); - } -} - -template void -ACE_Double_Linked_List::copy_nodes (const ACE_Double_Linked_List &c) -{ - for (ACE_Double_Linked_List_Iterator iter (c); - !iter.done (); - iter.advance ()) - { - T* temp = 0; - ACE_NEW_MALLOC (temp, - (T *)this->allocator_->malloc (sizeof (T)), - T (*iter.next ())); - this->insert_tail (temp); - } -} - -template void -ACE_Double_Linked_List::init_head (void) -{ - this->head_->next_ = this->head_; - this->head_->prev_ = this->head_; -} - -template int -ACE_Double_Linked_List::insert_element (T *new_item, - int before, - T *old_item) -{ - if (old_item == 0) - old_item = this->head_; - - if (before) - old_item = static_cast (old_item->prev_); - - new_item->next_ = old_item->next_; - new_item->next_->prev_ = new_item; - new_item->prev_ = old_item; - old_item->next_ = new_item; - ++this->size_; - return 0; // Well, what will cause errors here? -} - -template int -ACE_Double_Linked_List::remove_element (T *item) -{ - // Notice that you have to ensure that item is an element of this - // list. We can't do much checking here. - - if (item == this->head_ || item->next_ == 0 - || item->prev_ == 0 || this->size () == 0) // Can't remove head - return -1; - - item->prev_->next_ = item->next_; - item->next_->prev_ = item->prev_; - item->next_ = item->prev_ = 0; // reset pointers to prevent double removal. - --this->size_; - return 0; -} - -//-------------------------------------------------- -ACE_ALLOC_HOOK_DEFINE(ACE_Fixed_Set) - -template size_t -ACE_Fixed_Set::size (void) const -{ - ACE_TRACE ("ACE_Fixed_Set::size"); - return this->cur_size_; -} - -template void -ACE_Fixed_Set::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_Fixed_Set::dump"); -#endif /* ACE_HAS_DUMP */ -} - -template -ACE_Fixed_Set::~ACE_Fixed_Set (void) -{ - ACE_TRACE ("ACE_Fixed_Set::~ACE_Fixed_Set"); - this->cur_size_ = 0; -} - -template -ACE_Fixed_Set::ACE_Fixed_Set (const ACE_Fixed_Set &fs) - : cur_size_ (fs.cur_size_) -{ - ACE_TRACE ("ACE_Fixed_Set::ACE_Fixed_Set"); - - for (size_t i = 0, j = 0; i < fs.max_size_ && j < this->cur_size_; ++i) - if (fs.search_structure_[i].is_free_ == 0) - this->search_structure_[j++] = fs.search_structure_[i]; -} - -template void -ACE_Fixed_Set::operator= (const ACE_Fixed_Set &fs) -{ - ACE_TRACE ("ACE_Fixed_Set::operator="); - - if (this != &fs) - { - this->cur_size_ = fs.cur_size_; - - for (size_t i = 0, j = 0; i < fs.max_size_ && j < this->cur_size_; ++i) - if (fs.search_structure_[i].is_free_ == 0) - this->search_structure_[j++] = fs.search_structure_[i]; - } -} - -template -ACE_Fixed_Set::ACE_Fixed_Set (void) - : cur_size_ (0), - max_size_ (ACE_SIZE) -{ - ACE_TRACE ("ACE_Fixed_Set::ACE_Fixed_Set"); - for (size_t i = 0; i < this->max_size_; i++) - this->search_structure_[i].is_free_ = 1; -} - -template int -ACE_Fixed_Set::find (const T &item) const -{ - ACE_TRACE ("ACE_Fixed_Set::find"); - - for (size_t i = 0, j = 0; i < this->max_size_ && j < this->cur_size_; ++i) - if (this->search_structure_[i].is_free_ == 0) - { - if (this->search_structure_[i].item_ == item) - return 0; - ++j; - } - - return -1; -} - -template int -ACE_Fixed_Set::insert (const T &item) -{ - ACE_TRACE ("ACE_Fixed_Set::insert"); - ssize_t first_free = -1; // Keep track of first free slot. - size_t i; - - for (i = 0; - i < this->max_size_ && first_free == -1; - ++i) - - // First, make sure we don't allow duplicates. - - if (this->search_structure_[i].is_free_ == 0) - { - if (this->search_structure_[i].item_ == item) - return 1; - } - else - first_free = static_cast (i); - - // If we found a free spot let's reuse it. - - if (first_free > -1) - { - this->search_structure_[first_free].item_ = item; - this->search_structure_[first_free].is_free_ = 0; - this->cur_size_++; - return 0; - } - else /* No more room! */ - { - errno = ENOMEM; - return -1; - } -} - -template int -ACE_Fixed_Set::remove (const T &item) -{ - ACE_TRACE ("ACE_Fixed_Set::remove"); - - for (size_t i = 0, j = 0; - i < this->max_size_ && j < this->cur_size_; - ++i) - if (this->search_structure_[i].is_free_ == 0) - { - if (this->search_structure_[i].item_ == item) - { - // Mark this entry as being free. - this->search_structure_[i].is_free_ = 1; - - --this->cur_size_; - return 0; - } - else - ++j; - } - - return -1; -} - -//-------------------------------------------------- -ACE_ALLOC_HOOK_DEFINE(ACE_Fixed_Set_Iterator_Base) - -template void -ACE_Fixed_Set_Iterator_Base::dump_i (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_Fixed_Set_Iterator_Base::dump_i"); -#endif /* ACE_HAS_DUMP */ -} - -template -ACE_Fixed_Set_Iterator_Base::ACE_Fixed_Set_Iterator_Base (ACE_Fixed_Set &s) - : s_ (s), - next_ (-1), - iterated_items_ (0) -{ - ACE_TRACE ("ACE_Fixed_Set_Iterator_Base::ACE_Fixed_Set_Iterator_Base"); - this->advance (); -} - -template int -ACE_Fixed_Set_Iterator_Base::advance (void) -{ - ACE_TRACE ("ACE_Fixed_Set_Iterator_Base::advance"); - - if (this->iterated_items_ < this->s_.cur_size_) - { - for (++this->next_; - static_cast (this->next_) < this->s_.max_size_; - ++this->next_) - if (this->s_.search_structure_[this->next_].is_free_ == 0) - { - ++this->iterated_items_; - return 1; - } - } - else - ++this->next_; - - return 0; -} - -template int -ACE_Fixed_Set_Iterator_Base::first (void) -{ - ACE_TRACE ("ACE_Fixed_Set_Iterator_Base::first"); - - next_ = -1; - iterated_items_ = 0; - return this->advance (); -} - -template int -ACE_Fixed_Set_Iterator_Base::done (void) const -{ - ACE_TRACE ("ACE_Fixed_Set_Iterator_Base::done"); - - return ! (this->iterated_items_ < this->s_.cur_size_); -} - -template int -ACE_Fixed_Set_Iterator_Base::next_i (T *&item) -{ - ACE_TRACE ("ACE_Fixed_Set_Iterator_Base::next_i"); - - if (static_cast (this->next_) < this->s_.max_size_) - do - { - if (this->s_.search_structure_[this->next_].is_free_ == 0) - { - item = &this->s_.search_structure_[this->next_].item_; - this->advance (); - return 1; - } - } - while (this->advance () == 1); - - return 0; -} - -//-------------------------------------------------- -ACE_ALLOC_HOOK_DEFINE(ACE_Fixed_Set_Iterator) - -template void -ACE_Fixed_Set_Iterator::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - this->dump_i (); -#endif /* ACE_HAS_DUMP */ -} - -template -ACE_Fixed_Set_Iterator::ACE_Fixed_Set_Iterator (ACE_Fixed_Set &s) - : ACE_Fixed_Set_Iterator_Base (s) -{ - ACE_TRACE ("ACE_Fixed_Set_Iterator::ACE_Fixed_Set_Iterator"); -} - -template int -ACE_Fixed_Set_Iterator::next (T *&item) -{ - ACE_TRACE ("ACE_Fixed_Set_Iterator::next"); - return this->next_i (item); -} - -template int -ACE_Fixed_Set_Iterator::remove (T *&item) -{ - ACE_TRACE ("ACE_Fixed_Set_Iterator::remove"); - - if (this->s_.search_structure_[this->next_].is_free_ == 0) - { - item = &this->s_.search_structure_[this->next_].item_; - this->s_.remove (*item); - --(this->iterated_items_); - return 1; - } - - return 0; -} - -template T& -ACE_Fixed_Set_Iterator::operator* (void) -{ - T *retv = 0; - - if (this->s_.search_structure_[this->next_].is_free_ == 0) - retv = &this->s_.search_structure_[this->next_].item_; - - ACE_ASSERT (retv != 0); - - return *retv; -} - -//-------------------------------------------------- -ACE_ALLOC_HOOK_DEFINE(ACE_Fixed_Set_Const_Iterator) - -template void -ACE_Fixed_Set_Const_Iterator::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - this->dump_i (); -#endif /* ACE_HAS_DUMP */ -} - -template -ACE_Fixed_Set_Const_Iterator::ACE_Fixed_Set_Const_Iterator (const ACE_Fixed_Set &s) - : ACE_Fixed_Set_Iterator_Base (s) -{ - ACE_TRACE ("ACE_Fixed_Set_Const_Iterator::ACE_Fixed_Set_Const_Iterator"); -} - -template int -ACE_Fixed_Set_Const_Iterator::next (const T *&item) -{ - ACE_TRACE ("ACE_Fixed_Set_Const_Iterator::next"); - - return this->next_i (item); -} - -template const T& -ACE_Fixed_Set_Const_Iterator::operator* (void) const -{ - const T *retv = 0; - - if (this->s_.search_structure_[this->next_].is_free_ == 0) - retv = &this->s_.search_structure_[this->next_].item_; - - ACE_ASSERT (retv != 0); - - return *retv; -} - -//-------------------------------------------------- -ACE_ALLOC_HOOK_DEFINE(ACE_Bounded_Set) - -template void -ACE_Bounded_Set::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_Bounded_Set::dump"); -#endif /* ACE_HAS_DUMP */ -} - -template -ACE_Bounded_Set::~ACE_Bounded_Set (void) -{ - ACE_TRACE ("ACE_Bounded_Set::~ACE_Bounded_Set"); - delete [] this->search_structure_; -} - -template -ACE_Bounded_Set::ACE_Bounded_Set (void) - : cur_size_ (0), - max_size_ (static_cast (ACE_Bounded_Set::DEFAULT_SIZE)) -{ - ACE_TRACE ("ACE_Bounded_Set::ACE_Bounded_Set"); - - ACE_NEW (this->search_structure_, - typename ACE_Bounded_Set::Search_Structure[this->max_size_]); - - for (size_t i = 0; i < this->max_size_; ++i) - this->search_structure_[i].is_free_ = 1; -} - -template size_t -ACE_Bounded_Set::size (void) const -{ - ACE_TRACE ("ACE_Bounded_Set::size"); - return this->cur_size_; -} - -template -ACE_Bounded_Set::ACE_Bounded_Set (const ACE_Bounded_Set &bs) - : cur_size_ (bs.cur_size_), - max_size_ (bs.max_size_) -{ - ACE_TRACE ("ACE_Bounded_Set::ACE_Bounded_Set"); - - ACE_NEW (this->search_structure_, - typename ACE_Bounded_Set::Search_Structure[this->max_size_]); - - for (size_t i = 0; i < this->cur_size_; i++) - this->search_structure_[i] = bs.search_structure_[i]; -} - -template void -ACE_Bounded_Set::operator= (const ACE_Bounded_Set &bs) -{ - ACE_TRACE ("ACE_Bounded_Set::operator="); - - if (this != &bs) - { - if (this->max_size_ < bs.cur_size_) - { - delete [] this->search_structure_; - ACE_NEW (this->search_structure_, - typename ACE_Bounded_Set::Search_Structure[bs.cur_size_]); - this->max_size_ = bs.cur_size_; - } - - this->cur_size_ = bs.cur_size_; - - for (size_t i = 0; i < this->cur_size_; i++) - this->search_structure_[i] = bs.search_structure_[i]; - } -} - -template -ACE_Bounded_Set::ACE_Bounded_Set (size_t size) - : cur_size_ (0), - max_size_ (size) -{ - ACE_TRACE ("ACE_Bounded_Set::ACE_Bounded_Set"); - ACE_NEW (this->search_structure_, - typename ACE_Bounded_Set::Search_Structure[size]); - - for (size_t i = 0; i < this->max_size_; i++) - this->search_structure_[i].is_free_ = 1; -} - -template int -ACE_Bounded_Set::find (const T &item) const -{ - ACE_TRACE ("ACE_Bounded_Set::find"); - - for (size_t i = 0; i < this->cur_size_; i++) - if (this->search_structure_[i].item_ == item - && this->search_structure_[i].is_free_ == 0) - return 0; - - return -1; -} - -template int -ACE_Bounded_Set::insert (const T &item) -{ - ACE_TRACE ("ACE_Bounded_Set::insert"); - int first_free = -1; // Keep track of first free slot. - size_t i; - - for (i = 0; i < this->cur_size_; i++) - // First, make sure we don't allow duplicates. - - if (this->search_structure_[i].item_ == item - && this->search_structure_[i].is_free_ == 0) - return 1; - else if (this->search_structure_[i].is_free_ && first_free == -1) - first_free = static_cast (i); - - if (first_free > -1) // If we found a free spot let's reuse it. - { - this->search_structure_[first_free].item_ = item; - this->search_structure_[first_free].is_free_ = 0; - return 0; - } - else if (i < this->max_size_) // Insert at the end of the active portion. - { - this->search_structure_[i].item_ = item; - this->search_structure_[i].is_free_ = 0; - this->cur_size_++; - return 0; - } - else /* No more room! */ - { - errno = ENOMEM; - return -1; - } -} - -template int -ACE_Bounded_Set::remove (const T &item) -{ - ACE_TRACE ("ACE_Bounded_Set::remove"); - for (size_t i = 0; i < this->cur_size_; i++) - if (this->search_structure_[i].item_ == item) - { - // Mark this entry as being free. - this->search_structure_[i].is_free_ = 1; - - // If we just unbound the highest entry, then we need to - // figure out where the next highest active entry is. - if (i + 1 == this->cur_size_) - { - while (i > 0 && this->search_structure_[--i].is_free_) - continue; - - if (i == 0 && this->search_structure_[i].is_free_) - this->cur_size_ = 0; - else - this->cur_size_ = i + 1; - } - return 0; - } - - return -1; -} - -ACE_ALLOC_HOOK_DEFINE(ACE_Bounded_Set_Iterator) - - template void -ACE_Bounded_Set_Iterator::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_Bounded_Set_Iterator::dump"); -#endif /* ACE_HAS_DUMP */ -} - -template -ACE_Bounded_Set_Iterator::ACE_Bounded_Set_Iterator (ACE_Bounded_Set &s) - : s_ (s), - next_ (-1) -{ - ACE_TRACE ("ACE_Bounded_Set_Iterator::ACE_Bounded_Set_Iterator"); - this->advance (); -} - -template int -ACE_Bounded_Set_Iterator::advance (void) -{ - ACE_TRACE ("ACE_Bounded_Set_Iterator::advance"); - - for (++this->next_; - static_cast (this->next_) < this->s_.cur_size_ - && this->s_.search_structure_[this->next_].is_free_; - ++this->next_) - continue; - - return static_cast (this->next_) < this->s_.cur_size_; -} - -template int -ACE_Bounded_Set_Iterator::first (void) -{ - ACE_TRACE ("ACE_Bounded_Set_Iterator::first"); - - next_ = -1; - return this->advance (); -} - -template int -ACE_Bounded_Set_Iterator::done (void) const -{ - ACE_TRACE ("ACE_Bounded_Set_Iterator::done"); - - return static_cast (this->next_) >= - this->s_.cur_size_; -} - -template int -ACE_Bounded_Set_Iterator::next (T *&item) -{ - ACE_TRACE ("ACE_Bounded_Set_Iterator::next"); - if (static_cast (this->next_) < this->s_.cur_size_) - { - item = &this->s_.search_structure_[this->next_].item_; - return 1; - } - else - return 0; -} - -ACE_ALLOC_HOOK_DEFINE(ACE_DNode) - - template -ACE_DNode::ACE_DNode (const T &i, ACE_DNode *n, ACE_DNode *p) - : next_ (n), prev_ (p), item_ (i) -{ -} - -template -ACE_DNode::~ACE_DNode (void) -{ -} - -// **************************************************************** - -template void -ACE_Unbounded_Stack_Iterator::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - // ACE_TRACE ("ACE_Unbounded_Stack_Iterator::dump"); -#endif /* ACE_HAS_DUMP */ -} - -template -ACE_Unbounded_Stack_Iterator::ACE_Unbounded_Stack_Iterator (ACE_Unbounded_Stack &q) - : current_ (q.head_->next_), - stack_ (q) -{ - // ACE_TRACE ("ACE_Unbounded_Stack_Iterator::ACE_Unbounded_Stack_Iterator"); -} - -template int -ACE_Unbounded_Stack_Iterator::advance (void) -{ - // ACE_TRACE ("ACE_Unbounded_Stack_Iterator::advance"); - this->current_ = this->current_->next_; - return this->current_ != this->stack_.head_; -} - -template int -ACE_Unbounded_Stack_Iterator::first (void) -{ - // ACE_TRACE ("ACE_Unbounded_Stack_Iterator::first"); - this->current_ = this->stack_.head_->next_; - return this->current_ != this->stack_.head_; -} - -template int -ACE_Unbounded_Stack_Iterator::done (void) const -{ - ACE_TRACE ("ACE_Unbounded_Stack_Iterator::done"); - - return this->current_ == this->stack_.head_; -} - -template int -ACE_Unbounded_Stack_Iterator::next (T *&item) -{ - // ACE_TRACE ("ACE_Unbounded_Stack_Iterator::next"); - if (this->current_ == this->stack_.head_) - return 0; - else - { - item = &this->current_->item_; - return 1; - } -} - - -ACE_ALLOC_HOOK_DEFINE(ACE_Ordered_MultiSet) - - - template -ACE_Ordered_MultiSet::ACE_Ordered_MultiSet (ACE_Allocator *alloc) - : head_ (0) - , tail_ (0) - , cur_size_ (0) - , allocator_ (alloc) -{ - // ACE_TRACE ("ACE_Ordered_MultiSet::ACE_Ordered_MultiSet"); - - if (this->allocator_ == 0) - this->allocator_ = ACE_Allocator::instance (); -} - -template -ACE_Ordered_MultiSet::ACE_Ordered_MultiSet (const ACE_Ordered_MultiSet &us) - : head_ (0) - , tail_ (0) - , cur_size_ (0) - , allocator_ (us.allocator_) -{ - ACE_TRACE ("ACE_Ordered_MultiSet::ACE_Ordered_MultiSet"); - - if (this->allocator_ == 0) - this->allocator_ = ACE_Allocator::instance (); - - this->copy_nodes (us); -} - -template -ACE_Ordered_MultiSet::~ACE_Ordered_MultiSet (void) -{ - // ACE_TRACE ("ACE_Ordered_MultiSet::~ACE_Ordered_MultiSet"); - - this->delete_nodes (); -} - - -template void -ACE_Ordered_MultiSet::operator= (const ACE_Ordered_MultiSet &us) -{ - ACE_TRACE ("ACE_Ordered_MultiSet::operator="); - - if (this != &us) - { - this->delete_nodes (); - this->copy_nodes (us); - } -} - - -template int -ACE_Ordered_MultiSet::insert (const T &item) -{ - // ACE_TRACE ("ACE_Ordered_MultiSet::insert"); - - return this->insert_from (item, this->head_, 0); -} - -template int -ACE_Ordered_MultiSet::insert (const T &new_item, - ITERATOR &iter) -{ - // ACE_TRACE ("ACE_Ordered_MultiSet::insert using iterator"); - - return this->insert_from (new_item, iter.current_, &iter.current_); -} - -template int -ACE_Ordered_MultiSet::remove (const T &item) -{ - // ACE_TRACE ("ACE_Ordered_MultiSet::remove"); - - ACE_DNode *node = 0; - - int result = locate (item, 0, node); - - // if we found the node, remove from list and free it - if (node && (result == 0)) - { - if (node->prev_) - node->prev_->next_ = node->next_; - else - head_ = node->next_; - - if (node->next_) - node->next_->prev_ = node->prev_; - else - tail_ = node->prev_; - - --this->cur_size_; - - ACE_DES_FREE_TEMPLATE (node, - this->allocator_->free, - ACE_DNode, - ); - return 0; - } - - return -1; -} - -template int -ACE_Ordered_MultiSet::find (const T &item, - ITERATOR &iter) const -{ - // search an occurrence of item, using iterator's current position as a hint - ACE_DNode *node = iter.current_; - int const result = locate (item, node, node); - - // if we found the node, update the iterator and indicate success - if (node && (result == 0)) - { - iter.current_ = node; - return 0; - } - - return -1; -} - - - -template void -ACE_Ordered_MultiSet::reset (void) -{ - ACE_TRACE ("reset"); - - this->delete_nodes (); -} - -template void -ACE_Ordered_MultiSet::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - // ACE_TRACE ("ACE_Ordered_MultiSet::dump"); - // - // ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - // ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("\nhead_ = %u"), this->head_)); - // ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("\nhead_->next_ = %u"), this->head_->next_)); - // ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("\ncur_size_ = %d\n"), this->cur_size_)); - // - // T *item = 0; - // size_t count = 1; - // - // for (ACE_Ordered_MultiSet_Iterator iter (*(ACE_Ordered_MultiSet *) this); - // iter.next (item) != 0; - // iter.advance ()) - // ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("count = %d\n"), count++)); - // - // ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} - -template int -ACE_Ordered_MultiSet::insert_from (const T &item, ACE_DNode *position, - ACE_DNode **new_position) -{ - // ACE_TRACE ("ACE_Ordered_MultiSet::insert_from"); - - // create a new node - ACE_DNode *temp = 0; - ACE_NEW_MALLOC_RETURN (temp, - static_cast*> (this->allocator_->malloc (sizeof (ACE_DNode))), - ACE_DNode (item), - -1); - // obtain approximate location of the node - int result = locate (item, position, position); - - // if there are nodes in the multiset - if (position) - { - switch (result) - { - // insert after the approximate position - case -1: - - // if there is a following node - if (position->next_) - { - // link up with the following node - position->next_->prev_ = temp; - temp->next_ = position->next_; - } - else - // appending to the end of the set - tail_ = temp; - - // link up with the preceeding node - temp->prev_ = position; - position->next_ = temp; - - break; - - // insert before the position - case 0: - case 1: - - // if there is a preceeding node - if (position->prev_) - { - // link up with the preceeding node - position->prev_->next_ = temp; - temp->prev_ = position->prev_; - } - else - // prepending to the start of the set - head_ = temp; - - // link up with the preceeding node - temp->next_ = position; - position->prev_ = temp; - - break; - - default: - return -1; - } - } - else - { - // point the head and tail to the new node. - this->head_ = temp; - this->tail_ = temp; - } - - ++this->cur_size_; - if (new_position) - *new_position = temp; - - return 0; -} - -template int -ACE_Ordered_MultiSet::locate (const T &item, ACE_DNode *start_position, - ACE_DNode *&new_position) const -{ - if (! start_position) - start_position = this->head_; - - // If starting before the item, move forward until at or just before - // item. - while (start_position && start_position->item_ < item && - start_position->next_) - start_position = start_position->next_; - - // If starting after the item, move back until at or just after item - while (start_position && item < start_position->item_ && - start_position->prev_) - start_position = start_position->prev_; - - // Save the (approximate) location in the passed pointer. - new_position = start_position; - - // Show the location is after (1), before (-1) , or at (0) the item - if (!new_position) - return 1; - else if (item < new_position->item_) - return 1; - else if (new_position->item_ < item) - return -1; - else - return 0; -} - -// Looks for first occurrence of in the ordered set, using the -// passed starting position as a hint: if there is such an instance, -// it updates the new_position pointer to point to one such node and -// returns 0; if there is no such node, then if there is a node before -// where the item would have been, it updates the new_position pointer -// to point to this node and returns -1; if there is no such node, -// then if there is a node after where the item would have been, it -// updates the new_position pointer to point to this node (or 0 if -// there is no such node) and returns 1; - -template void -ACE_Ordered_MultiSet::copy_nodes (const ACE_Ordered_MultiSet &us) -{ - ACE_DNode *insertion_point = this->head_; - - for (ACE_DNode *curr = us.head_; - curr != 0; - curr = curr->next_) - this->insert_from (curr->item_, insertion_point, &insertion_point); -} - -template void -ACE_Ordered_MultiSet::delete_nodes (void) -{ - // iterate through list, deleting nodes - for (ACE_DNode *curr = this->head_; - curr != 0; - ) - { - ACE_DNode *temp = curr; - curr = curr->next_; - ACE_DES_FREE_TEMPLATE (temp, - this->allocator_->free, - ACE_DNode, - ); - } - - this->head_ = 0; - this->tail_ = 0; - this->cur_size_ = 0; -} - -ACE_ALLOC_HOOK_DEFINE(ACE_Ordered_MultiSet_Iterator) - -template -ACE_Ordered_MultiSet_Iterator::ACE_Ordered_MultiSet_Iterator (ACE_Ordered_MultiSet &s) - : current_ (s.head_), - set_ (s) -{ - // ACE_TRACE ("ACE_Ordered_MultiSet_Iterator::ACE_Ordered_MultiSet_Iterator"); -} - -template int -ACE_Ordered_MultiSet_Iterator::next (T *&item) const -{ - // ACE_TRACE ("ACE_Ordered_MultiSet_Iterator::next"); - if (this->current_) - { - item = &this->current_->item_; - return 1; - } - - return 0; -} - -template T& -ACE_Ordered_MultiSet_Iterator::operator* (void) -{ - //ACE_TRACE ("ACE_Ordered_MultiSet_Iterator::operator*"); - T *retv = 0; - - int const result = this->next (retv); - ACE_ASSERT (result != 0); - ACE_UNUSED_ARG (result); - - return *retv; -} - -ACE_ALLOC_HOOK_DEFINE (ACE_DLList_Node) - -template T * -ACE_DLList::insert_tail (T *new_item) -{ - ACE_DLList_Node *temp1 = 0; - ACE_NEW_MALLOC_RETURN (temp1, - static_cast (this->allocator_->malloc (sizeof (ACE_DLList_Node))), - ACE_DLList_Node (new_item), - 0); - ACE_DLList_Node *temp2 = ACE_DLList_Base::insert_tail (temp1); - return (T *) (temp2 ? temp2->item_ : 0); -} - -template T * -ACE_DLList::insert_head (T *new_item) -{ - ACE_DLList_Node *temp1 = 0; - ACE_NEW_MALLOC_RETURN (temp1, - (ACE_DLList_Node *) this->allocator_->malloc (sizeof (ACE_DLList_Node)), - ACE_DLList_Node (new_item), 0); - ACE_DLList_Node *temp2 = ACE_DLList_Base::insert_head (temp1); - return (T *) (temp2 ? temp2->item_ : 0); -} - -template T * -ACE_DLList::delete_head (void) -{ - ACE_DLList_Node *temp1 = ACE_DLList_Base::delete_head (); - T *temp2 = (T *) (temp1 ? temp1->item_ : 0); - ACE_DES_FREE (temp1, - this->allocator_->free, - ACE_DLList_Node); - - return temp2; -} - -template T * -ACE_DLList::delete_tail (void) -{ - ACE_DLList_Node *temp1 = ACE_DLList_Base::delete_tail (); - T *temp2 = (T *) (temp1 ? temp1->item_ : 0); - ACE_DES_FREE (temp1, - this->allocator_->free, - ACE_DLList_Node); - return temp2; -} - -// **************************************************************** - -// Compare this array with for equality. - -template bool -ACE_Array::operator== (const ACE_Array &s) const -{ - if (this == &s) - return true; - else if (this->size () != s.size ()) - return false; - - const size_t len = s.size (); - for (size_t slot = 0; slot < len; ++slot) - if ((*this)[slot] != s[slot]) - return false; - - return true; -} - -// **************************************************************** - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_CONTAINERS_T_CPP */ diff --git a/modules/worldengine/deps/acelite/ace/Containers_T.h b/modules/worldengine/deps/acelite/ace/Containers_T.h deleted file mode 100644 index bc93b9c1a0..0000000000 --- a/modules/worldengine/deps/acelite/ace/Containers_T.h +++ /dev/null @@ -1,2057 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Containers_T.h - * - * @author Douglas C. Schmidt - */ -//============================================================================= - -#ifndef ACE_CONTAINERS_T_H -#define ACE_CONTAINERS_T_H - -#include /**/ "ace/pre.h" - -#include /**/ "ace/config-all.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -// Need by ACE_DLList_Node. -#include "ace/Containers.h" - -// Shared with "ace/Unbounded_Set.h" -#include "ace/Node.h" - -// Backwards compatibility, please include "ace/Array_Base.h" directly. -#include "ace/Array_Base.h" - -// Backwards compatibility, please include "ace/Unbounded_Set.h" directly. -#include "ace/Unbounded_Set.h" - -// Backwards compatibility, please include "ace/Unbounded_Queue.h" directly. -#include "ace/Unbounded_Queue.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -class ACE_Allocator; - - -/** - * @class ACE_Bounded_Stack - * - * @brief Implement a generic LIFO abstract data type. - * - * This implementation of a Stack uses a bounded array - * that is allocated dynamically. The Stack interface - * provides the standard constant time push, pop, and top - * operations. - * - * Requirements and Performance Characteristics - * - Internal Structure - * Dynamic array - * - Duplicates allowed? - * Yes - * - Random access allowed? - * No - * - Search speed - * N/A - * - Insert/replace speed - * N/A - * - Iterator still valid after change to container? - * N/A - * - Frees memory for removed elements? - * No - * - Items inserted by - * Value - * - Requirements for contained type - * -# Default constructor - * -# Copy constructor - * -# operator= - */ -template -class ACE_Bounded_Stack -{ -public: - // = Initialization, assignment, and termination methods. - - /// Initialize a new empty stack with the provided size.. - /** - * Initialize and allocate space for a new Bounded_Stack with the provided - * size. - */ - ACE_Bounded_Stack (size_t size); - - /// Initialize the stack to be a copy of the stack provided. - /** - * Initialize the stack to be an exact copy of the Bounded_Stack provided - * as a parameter. - */ - ACE_Bounded_Stack (const ACE_Bounded_Stack &s); - - /// Assignment operator - /** - * Perform a deep copy operation using the Bounded_Stack parameter. If the - * capacity of the lhs isn't sufficient for the rhs, then the underlying data - * structure will be reallocated to accomadate the larger number of elements. - */ - void operator= (const ACE_Bounded_Stack &s); - - /// Perform actions needed when stack goes out of scope. - /** - * Deallocate the memory used by the Bounded_Stack. - */ - ~ACE_Bounded_Stack (void); - - // = Classic Stack operations. - - ///Add an element to the top of the stack. - /** - * Place a new item on top of the stack. Returns -1 if the stack - * is already full, 0 if the stack is not already full, and -1 if - * failure occurs. - */ - int push (const T &new_item); - - ///Remove an item from the top of stack. - /** - * Remove and return the top stack item. Returns -1 if the stack is - * already empty, 0 if the stack is not already empty, and -1 if - * failure occurs. - */ - int pop (T &item); - - ///Examine the contents of the top of stack. - /** - * Return top stack item without removing it. Returns -1 if the - * stack is already empty, 0 if the stack is not already empty, and - * -1 if failure occurs. - */ - int top (T &item) const; - - // = Check boundary conditions. - - /// Returns 1 if the container is empty, otherwise returns 0. - /** - * Performs constant time check to determine if the stack is empty. - */ - int is_empty (void) const; - - /// Returns 1 if the container is full, otherwise returns 0. - /** - * Performs constant time check to determine if the stack is at capacity. - */ - int is_full (void) const; - - /// The number of items in the stack. - /** - * Return the number of items currently in the stack. - */ - size_t size (void) const; - - /// Dump the state of an object. - void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - -private: - /// Size of the dynamically allocated data. - size_t size_; - - /// Keeps track of the current top of stack. - size_t top_; - - /// Holds the stack's contents. - T *stack_; -}; - -//---------------------------------------- - - -/** - * @class ACE_Fixed_Stack - * - * @brief Implement a generic LIFO abstract data type. - * - * This implementation of a Stack uses a fixed array - * with the size fixed at instantiation time. - * - * Requirements and Performance Characteristics - * - Internal Structure - * Fixed array - * - Duplicates allowed? - * Yes - * - Random access allowed? - * No - * - Search speed - * N/A - * - Insert/replace speed - * N/A - * - Iterator still valid after change to container? - * N/A - * - Frees memory for removed elements? - * No - * - Items inserted by - * Value - * - Requirements for contained type - * -# Default constructor - * -# Copy constructor - * -# operator= - */ -template -class ACE_Fixed_Stack -{ -public: - // = Initialization, assignment, and termination methods. - /// Initialize a new stack so that it is empty. - /** - * Initialize an empty stack. - */ - ACE_Fixed_Stack (void); - - /// The copy constructor (performs initialization). - /** - * Initialize the stack and copy the provided stack into the current stack. - */ - ACE_Fixed_Stack (const ACE_Fixed_Stack &s); - - /// Assignment operator (performs assignment). - /** - * Perform a deep copy of the provided stack. - */ - void operator= (const ACE_Fixed_Stack &s); - - /// Perform actions needed when stack goes out of scope. - /** - * Destroy the stack. - */ - ~ACE_Fixed_Stack (void); - - // = Classic Stack operations. - - ///Constant time placement of element on top of stack. - /** - * Place a new item on top of the stack. Returns -1 if the stack - * is already full, 0 if the stack is not already full, and -1 if - * failure occurs. - */ - int push (const T &new_item); - - ///Constant time removal of top of stack. - /** - * Remove and return the top stack item. Returns -1 if the stack is - * already empty, 0 if the stack is not already empty, and -1 if - * failure occurs. - */ - int pop (T &item); - - ///Constant time examination of top of stack. - /** - * Return top stack item without removing it. Returns -1 if the - * stack is already empty, 0 if the stack is not already empty, and - * -1 if failure occurs. - */ - int top (T &item) const; - - // = Check boundary conditions. - - /// Returns 1 if the container is empty, otherwise returns 0. - /** - * Performs constant time check to see if stack is empty. - */ - int is_empty (void) const; - - /// Returns 1 if the container is full, otherwise returns 0. - /** - * Performs constant time check to see if stack is full. - */ - int is_full (void) const; - - /// The number of items in the stack. - /** - * Constant time access to the current size of the stack. - */ - size_t size (void) const; - - /// Dump the state of an object. - void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - -private: - /// Size of the allocated data. - size_t size_; - - /// Keeps track of the current top of stack. - size_t top_; - - /// Holds the stack's contents. - T stack_[ACE_SIZE]; -}; - -//---------------------------------------- - -template class ACE_Ordered_MultiSet; -template class ACE_Ordered_MultiSet_Iterator; - -/** - * @class ACE_DNode - * - * @brief Implementation element in a bilinked list. - */ -template -class ACE_DNode -{ - friend class ACE_Ordered_MultiSet; - friend class ACE_Ordered_MultiSet_Iterator; - -public: - - /// This isn't necessary, but it keeps some compilers happy. - ~ACE_DNode (void); - -private: - - // = Initialization methods - ACE_DNode (const T &i, ACE_DNode *n = 0, ACE_DNode *p = 0); - - /// Pointer to next element in the list of {ACE_DNode}s. - ACE_DNode *next_; - - /// Pointer to previous element in the list of {ACE_DNode}s. - ACE_DNode *prev_; - - /// Current value of the item in this node. - T item_; -}; - - - -/** - * @class ACE_Unbounded_Stack - * - * @brief Implement a generic LIFO abstract data type. - * - * This implementation of an unbounded Stack uses a linked list. - * If you use the {insert} or {remove} methods you should keep - * in mind that duplicate entries aren't allowed. In general, - * therefore, you should avoid the use of these methods since - * they aren't really part of the ADT stack. The stack is implemented - * as a doubly linked list. - * - * Requirements and Performance Characteristics - * - Internal Structure - * Double linked list - * - Duplicates allowed? - * No - * - Random access allowed? - * No - * - Search speed - * Linear - * - Insert/replace speed - * Linear - * - Iterator still valid after change to container? - * Yes - * - Frees memory for removed elements? - * Yes - * - Items inserted by - * Value - * - Requirements for contained type - * -# Default constructor - * -# Copy constructor - * -# operator= - */ -template -class ACE_Unbounded_Stack -{ -public: - friend class ACE_Unbounded_Stack_Iterator; - - // Trait definition. - typedef ACE_Unbounded_Stack_Iterator ITERATOR; - - // = Initialization, assignment, and termination methods. - /// Initialize a new stack so that it is empty. Use user defined - /// allocation strategy if specified. - /** - * Initialize an empty stack using the user specified allocation strategy - * if provided. - */ - ACE_Unbounded_Stack (ACE_Allocator *the_allocator = 0); - - /// The copy constructor (performs initialization). - /** - * Initialize this stack to be an exact copy of {s}. - */ - ACE_Unbounded_Stack (const ACE_Unbounded_Stack &s); - - /// Assignment operator (performs assignment). - /** - * Perform a deep copy of the rhs into the lhs. - */ - void operator= (const ACE_Unbounded_Stack &s); - - /// Perform actions needed when stack goes out of scope. - /** - * Destroy the underlying list for the stack. - */ - ~ACE_Unbounded_Stack (void); - - // = Classic Stack operations. - - - ///Push an element onto the top of stack. - /** - * Place a new item on top of the stack. Returns -1 if the stack - * is already full, 0 if the stack is not already full, and -1 if - * failure occurs. - */ - int push (const T &new_item); - - ///Pop the top element of the stack. - /** - * Remove and return the top stack item. Returns -1 if the stack is - * already empty, 0 if the stack is not already empty, and -1 if - * failure occurs. - */ - int pop (T &item); - - ///Examine the top of the stack. - /** - * Return top stack item without removing it. Returns -1 if the - * stack is already empty, 0 if the stack is not already empty, and - * -1 if failure occurs. - */ - int top (T &item) const; - - // = Check boundary conditions. - - /// Returns 1 if the container is empty, otherwise returns 0. - /** - * Constant time check to see if the stack is empty. - */ - int is_empty (void) const; - - /// Returns 1 if the container is full, otherwise returns 0. - /** - * Always resturns 0 since the stack is unbounded. - */ - int is_full (void) const; - - // = Auxiliary methods (not strictly part of the Stack ADT). - - ///Linear Insert of an item. - /** - * Insert {new_item} into the Stack at the head (but doesn't allow - * duplicates). Returns -1 if failures occur, 1 if item is already - * present (i.e., no duplicates are allowed), else 0. - */ - int insert (const T &new_item); - - /// Remove @a item from the Stack. Returns 0 if it removes the item, - /// -1 if it can't find the item, and -1 if a failure occurs. - /** - * Linear remove operation. - */ - int remove (const T &item); - - /// Finds if @a item occurs the set. Returns 0 if finds, else -1. - /** - * Linear find operation. - */ - int find (const T &item) const; - - /// The number of items in the stack. - /** - * Constant time access to the current stack size. - */ - size_t size (void) const; - - /// Dump the state of an object. - void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - -private: - /// Delete all the nodes in the stack. - void delete_all_nodes (void); - - /// Copy all nodes from {s} to {this}. - void copy_all_nodes (const ACE_Unbounded_Stack &s); - - /// Head of the linked list of Nodes. - ACE_Node *head_; - - /// Current size of the stack. - size_t cur_size_; - - /// Allocation strategy of the stack. - ACE_Allocator *allocator_; -}; - -/** - * @class ACE_Unbounded_Stack_Iterator - * - * @brief Implement an iterator over an unbounded Stack. - */ -template -class ACE_Unbounded_Stack_Iterator -{ -public: - // = Initialization method. - /// Move to the first element in the {stack}. - ACE_Unbounded_Stack_Iterator (ACE_Unbounded_Stack &stack); - - // = Iteration methods. - - /// Pass back the @a next_item that hasn't been seen in the Stack. - /// Returns 0 when all items have been seen, else 1. - int next (T *&next_item); - - /// Move forward by one element in the Stack. Returns 0 when all the - /// items in the Stack have been seen, else 1. - int advance (void); - - /// Move to the first element in the Stack. Returns 0 if the - /// Stack is empty, else 1. - int first (void); - - /// Returns 1 when all items have been seen, else 0. - int done (void) const; - - /// Dump the state of an object. - void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - -private: - /// Pointer to the current node in the iteration. - ACE_Node *current_; - - /// Pointer to the Stack we're iterating over. - ACE_Unbounded_Stack &stack_; -}; - -template -class ACE_Double_Linked_List; - -/** - * @class ACE_Double_Linked_List_Iterator_Base - * - * @brief Implements a common base class for iterators for a double - * linked list ADT - */ -template -class ACE_Double_Linked_List_Iterator_Base -{ -public: - // = Iteration methods. - - /// Passes back the {entry} under the iterator. Returns 0 if the - /// iteration has completed, otherwise 1 - int next (T *&) const; - - /** - * @deprecated Return the address of next (current) unvisited item in - * the list. 0 if there is no more element available. - */ - T *next (void) const; - - /// Returns 1 when all items have been seen, else 0. - int done (void) const; - - /// STL-like iterator dereference operator: returns a reference - /// to the node underneath the iterator. - T & operator* (void) const ; - - /** - * Retasks the iterator to iterate over a new - * Double_Linked_List. This allows clients to reuse an iterator - * without incurring the constructor overhead. If you do use this, - * be aware that if there are more than one reference to this - * iterator, the other "clients" may be very bothered when their - * iterator changes. @@ Here be dragons. Comments? - */ - void reset (ACE_Double_Linked_List &); - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - -protected: - // = Initialization methods. - - /// Constructor - ACE_Double_Linked_List_Iterator_Base (const ACE_Double_Linked_List &); - - /// Copy constructor. - ACE_Double_Linked_List_Iterator_Base (const - ACE_Double_Linked_List_Iterator_Base - &iter); - - // = Iteration methods. - /** - * Move to the first element of the list. Returns 0 if the list is - * empty, else 1. - * @note the head of the ACE_DLList is actually a null entry, so the - * first element is actually the 2n'd entry - */ - int go_head (void); - - /// Move to the last element of the list. Returns 0 if the list is - /// empty, else 1. - int go_tail (void); - - /** - * Check if we reach the end of the list. Can also be used to get - * the *current* element in the list. Return the address of the - * current item if there are still elements left , 0 if we run out - * of element. - */ - T *not_done (void) const ; - - /// Advance to the next element in the list. Return the address of the - /// next element if there are more, 0 otherwise. - T *do_advance (void); - - /// Retreat to the previous element in the list. Return the address - /// of the previous element if there are more, 0 otherwise. - T *do_retreat (void); - - /// Dump the state of an object. - void dump_i (void) const; - - /// Remember where we are. - T *current_; - - const ACE_Double_Linked_List *dllist_; -}; - -/** - * @class ACE_Double_Linked_List_Iterator - * - * @brief Implements an iterator for a double linked list ADT - * - * Iterate thru the double-linked list. This class provides - * an interface that let users access the internal element - * addresses directly. Notice {class T} must declare - * ACE_Double_Linked_List<T>, - * ACE_Double_Linked_List_Iterator_Base <T> and - * ACE_Double_Linked_List_Iterator as friend classes and class T - * should also have data members T* next_ and T* prev_. - */ -template -class ACE_Double_Linked_List_Iterator : public ACE_Double_Linked_List_Iterator_Base -{ -public: - // = Initialization method. - ACE_Double_Linked_List_Iterator (const ACE_Double_Linked_List &); - - /** - * Retasks the iterator to iterate over a new - * Double_Linked_List. This allows clients to reuse an iterator - * without incurring the constructor overhead. If you do use this, - * be aware that if there are more than one reference to this - * iterator, the other "clients" may be very bothered when their - * iterator changes. - * @@ Here be dragons. Comments? - */ - void reset (ACE_Double_Linked_List &); - - /// Move to the first element in the list. Returns 0 if the - /// list is empty, else 1. - int first (void); - - /// Move forward by one element in the list. Returns 0 when all the - /// items in the list have been seen, else 1. - int advance (void); - - /** - * Advance the iterator while removing the original item from the - * list. Return a pointer points to the original (removed) item. - * If @a dont_remove equals false, this function behaves like {advance} - * but return 0 (NULL) instead. - */ - T* advance_and_remove (bool dont_remove); - - // = STL-style iteration methods - - /// Prefix advance. - ACE_Double_Linked_List_Iterator & operator++ (void); - - /// Postfix advance. - ACE_Double_Linked_List_Iterator operator++ (int); - - /// Prefix reverse. - ACE_Double_Linked_List_Iterator & operator-- (void); - - /// Postfix reverse. - ACE_Double_Linked_List_Iterator operator-- (int); - - /// Dump the state of an object. - void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; -}; - -/** - * @class ACE_Double_Linked_List_Reverse_Iterator - * - * @brief Implements a reverse iterator for a double linked list ADT - * - * Iterate backwards over the double-linked list. This class - * provide an interface that let users access the internal - * element addresses directly, which seems to break the - * encapsulation. Notice {class T} must declare - * ACE_Double_Linked_List<T>, - * ACE_Double_Linked_List_Iterator_Base <T> and - * ACE_Double_Linked_List_Iterator as friend classes and class T - * should also have data members T* next_ and T* prev_. - */ -template -class ACE_Double_Linked_List_Reverse_Iterator : public ACE_Double_Linked_List_Iterator_Base -{ -public: - // = Initialization method. - ACE_Double_Linked_List_Reverse_Iterator (ACE_Double_Linked_List &); - - /** - * Retasks the iterator to iterate over a new - * Double_Linked_List. This allows clients to reuse an iterator - * without incurring the constructor overhead. If you do use this, - * be aware that if there are more than one reference to this - * iterator, the other "clients" may be very bothered when their - * iterator changes. - * @@ Here be dragons. Comments? - */ - void reset (ACE_Double_Linked_List &); - - /// Move to the first element in the list. Returns 0 if the - /// list is empty, else 1. - int first (void); - - /// Move forward by one element in the list. Returns 0 when all the - /// items in the list have been seen, else 1. - int advance (void); - - /** - * Advance the iterator while removing the original item from the - * list. Return a pointer points to the original (removed) item. - * If @a dont_remove equals false, this function behaves like {advance} - * but return 0 (NULL) instead. - */ - T* advance_and_remove (bool dont_remove); - - // = STL-style iteration methods - - /// Prefix advance. - ACE_Double_Linked_List_Reverse_Iterator & operator++ (void); - - /// Postfix advance. - ACE_Double_Linked_List_Reverse_Iterator operator++ (int); - - /// Prefix reverse. - ACE_Double_Linked_List_Reverse_Iterator & operator-- (void); - - /// Postfix reverse. - ACE_Double_Linked_List_Reverse_Iterator operator-- (int); - - /// Dump the state of an object. - void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; -}; - - -/** - * @class ACE_Double_Linked_List - * - * @brief A double-linked list implementation. - * - * This implementation of an unbounded double-linked list uses a - * circular linked list with a dummy node. It is pretty much - * like the {ACE_Unbounded_Queue} except that it allows removing - * of a specific element from a specific location. - * Notice that this class is an implementation of a very simple - * data structure. This is *NOT* a container class. You can use the - * class to implement other contains classes but it is *NOT* a - * general purpose container class. - * The parameter class *MUST* have members T* prev and T* next - * and users of this class are responsible to follow the general - * rules of using double-linked lists to maintaining the list - * integrity. - * If you need a double linked container class, use the DLList - * class which is a container but delegates to the Double_Linked_List - * class. - * - * Requirements and Performance Characteristics - * - Internal Structure - * Double Linked List - * - Duplicates allowed? - * Yes - * - Random access allowed? - * No - * - Search speed - * N/A - * - Insert/replace speed - * Linear - * - Iterator still valid after change to container? - * Yes - * - Frees memory for removed elements? - * No - * - Items inserted by - * Value - * - Requirements for contained type - * -# Default constructor - * -# Copy constructor - * -# operator= - */ -template -class ACE_Double_Linked_List -{ -public: - friend class ACE_Double_Linked_List_Iterator_Base; - friend class ACE_Double_Linked_List_Iterator; - friend class ACE_Double_Linked_List_Reverse_Iterator; - - // Trait definition. - typedef ACE_Double_Linked_List_Iterator ITERATOR; - typedef ACE_Double_Linked_List_Reverse_Iterator REVERSE_ITERATOR; - - // = Initialization and termination methods. - /// construction. Use user specified allocation strategy - /// if specified. - /** - * Initialize an empy list using the allocation strategy specified by the user. - * If none is specified, then use default allocation strategy. - */ - ACE_Double_Linked_List (ACE_Allocator *the_allocator = 0); - - /// Copy constructor. - /** - * Create a double linked list that is a copy of the provided - * parameter. - */ - ACE_Double_Linked_List (const ACE_Double_Linked_List &); - - /// Assignment operator. - /** - * Perform a deep copy of the provided list by first deleting the nodes of the - * lhs and then copying the nodes of the rhs. - */ - void operator= (const ACE_Double_Linked_List &); - - /// Destructor. - /** - * Clean up the memory allocated for the nodes of the list. - */ - ~ACE_Double_Linked_List (void); - - // = Check boundary conditions. - - /// Returns 1 if the container is empty, 0 otherwise. - /** - * Performs constant time check to determine if the list is empty. - */ - int is_empty (void) const; - - /// The list is unbounded, so this always returns 0. - /** - * Since the list is unbounded, the method simply returns 0. - */ - int is_full (void) const; - - // = Classic queue operations. - - /// Adds @a new_item to the tail of the list. Returns the new item - /// that was inserted. - /** - * Provides constant time insertion at the end of the list structure. - */ - T *insert_tail (T *new_item); - - /// Adds @a new_item to the head of the list.Returns the new item that - /// was inserted. - /** - * Provides constant time insertion at the head of the list. - */ - T *insert_head (T *new_item); - - /// Removes the head of the list and returns a pointer to that item. - /** - * Removes and returns the first {item} in the list. Returns - * internal node's address on success, 0 if the queue was empty. - * This method will *not* free the internal node. - */ - T* delete_head (void); - - /// Removes the tail of the list and returns a pointer to that item. - /** - * Removes and returns the last {item} in the list. Returns - * internal nodes's address on success, 0 if the queue was - * empty. This method will *not* free the internal node. - */ - T *delete_tail (void); - - // = Additional utility methods. - - ///Empty the list. - /** - * Reset the {ACE_Double_Linked_List} to be empty. - * Notice that since no one is interested in the items within, - * This operation will delete all items. - */ - void reset (void); - - /// Get the {slot}th element in the set. Returns -1 if the element - /// isn't in the range {0..{size} - 1}, else 0. - /** - * Iterates through the list to the desired index and assigns the provides pointer - * with the address of the node occupying that index. - */ - int get (T *&item, size_t slot = 0); - - /// The number of items in the queue. - /** - * Constant time call to return the current size of the list. - */ - size_t size (void) const; - - /// Dump the state of an object. - void dump (void) const; - - /// Use DNode address directly. - /** - * Constant time removal of an item from the list using it's address. - */ - int remove (T *n); - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - -protected: - /// Delete all the nodes in the list. - /** - * Removes and deallocates memory for all of the list nodes. - */ - void delete_nodes (void); - - /// Copy nodes from {rhs} into this list. - /** - * Copy the elements of the provided list by allocated new nodes and assigning - * them with the proper data. - */ - void copy_nodes (const ACE_Double_Linked_List &rhs); - - /// Setup header pointer. Called after we create the head node in ctor. - /** - * Initialize the head pointer so that the list has a dummy node. - */ - void init_head (void); - - ///Constant time insert a new item into the list structure. - /** - * Insert a @a new_item into the list. It will be added before - * or after @a old_item. Default is to insert the new item *after* - * {head_}. Return 0 if succeed, -1 if error occured. - */ - int insert_element (T *new_item, - int before = 0, - T *old_item = 0); - - ///Constant time delete an item from the list structure. - /** - * Remove @a item from the list. Return 0 if succeed, -1 otherwise. - * Notice that this function checks if item is {head_} and either its - * {next_} or {prev_} is NULL. The function resets item's {next_} and - * {prev_} to 0 to prevent clobbering the double-linked list if a user - * tries to remove the same node again. - */ - int remove_element (T *item); - - /// Head of the circular double-linked list. - T *head_; - - /// Size of this list. - size_t size_; - - /// Allocation Strategy of the queue. - ACE_Allocator *allocator_; -}; - - -template class ACE_DLList; -template class ACE_DLList_Iterator; -template class ACE_DLList_Reverse_Iterator; - -typedef ACE_Double_Linked_List ACE_DLList_Base; - -//typedef ACE_Double_Linked_List_Iterator -// ACE_DLList_Iterator_Base; -//typedef ACE_Double_Linked_List_Reverse_Iterator -// ACE_DLList_Reverse_Iterator_Base; -//@@ These two typedefs (inherited from James Hu's original design) -// have been removed because Sun CC 4.2 had problems with it. I guess -// having the DLList_Iterators inheriting from a class which is -// actually a typedef leads to problems. #define'ing rather than -// typedef'ing worked, but as per Carlos's reccomendation, I'm just -// replacing all references to the base classes with their actual -// type. Matt Braun (6/15/99) - -/** - * @class ACE_DLList - * - * @brief A double-linked list container class. - * - * ACE_DLList is a simple, unbounded container implemented using a - * double-linked list. It is critical to remember that ACE_DLList inherits - * from ACE_Double_Linked_List, wrapping each T pointer in a ACE_DLList_Node - * object which satisfies the next/prev pointer requirements imposed by - * ACE_Double_Linked_List. - * - * Each item inserted to an ACE_DLList is a pointer to a T object. The - * caller is responsible for lifetime of the T object. ACE_DLList takes no - * action on the T object; it is not copied on insertion and it is not - * deleted on removal from the ACE_DLList. - */ -template -class ACE_DLList : public ACE_DLList_Base -{ - friend class ACE_DLList_Node; - friend class ACE_Double_Linked_List_Iterator; - friend class ACE_DLList_Iterator; - friend class ACE_DLList_Reverse_Iterator; - -public: - - /// Delegates to ACE_Double_Linked_List. - void operator= (const ACE_DLList &l); - - /** - * @name Queue-like insert and delete methods - */ - //@{ - - /** - * Insert pointer for a new item at the tail of the list. - * - * @return Pointer to item inserted; 0 on error. - */ - T *insert_tail (T *new_item); - - /** - * Insert pointer for a new item at the head of the list. - * - * @return Pointer to item inserted; 0 on error. - */ - T *insert_head (T *new_item); - - /** - * Removes the item at the head of the list and returns its pointer. - * - * @return Pointer to previously inserted item; 0 if the list is empty, - * an error occurred, or the original pointer inserted was 0. - */ - T *delete_head (void); - - /** - * Removes the item at the tail of the list and returns its pointer. - * - * @return Pointer to previously inserted item; 0 if the list is empty, - * an error occurred, or the original pointer inserted was 0. - */ - T *delete_tail (void); - //@} - - /** - * Provide random access to any item in the list. - * - * @param item Receives a pointer to the T object pointer held at the - * specified position in the list. - * @param slot Position in the list to access. The first position is 0. - * - * @retval 0 Success; T pointer returned in item. - * @retval -1 Error, most likely slot is outside the range of the list. - */ - int get (T *&item, size_t slot = 0); - - /// Delegates to ACE_Double_Linked_List. - void dump (void) const; - - /// Delegates to ACE_Double_Linked_List. - int remove (ACE_DLList_Node *n); - - /** - * Constructor. - * - * @param the_allocator Allocator to use for allocating ACE_DLList_Node - * objects that wrap T objects for inclusion in the - * list. If 0, ACE_Allocator::instance() is used. - */ - ACE_DLList (ACE_Allocator *the_allocator = 0); - - /// Delegates to ACE_Double_Linked_List. - ACE_DLList (const ACE_DLList &l); - - /** - * Deletes all ACE_DLList_Node objects in the list starting from the head. - * No T objects referred to by the deleted ACE_DLList_Node objects are - * modified or freed. If you desire all of the T objects in the list to - * be deleted as well, code such as this should be used prior to destroying - * the ACE_DLList: - * @code - ACE_DLList list; - ... // insert dynamically allocated Items... - Item *p; - while ((p = list.delete_head()) != 0) - delete *p; - @endcode - */ - ~ACE_DLList (void); -}; - -/** - * @class ACE_DLList_Iterator - * - * @brief A double-linked list container class iterator. - * - * This implementation uses ACE_Double_Linked_List_Iterator to - * perform the logic behind this container class. It delegates - * all of its calls to ACE_Double_Linked_List_Iterator. - */ -template -class ACE_DLList_Iterator : public ACE_Double_Linked_List_Iterator -{ - - friend class ACE_DLList; - friend class ACE_DLList_Node; - -public: - - // = Initialization method. - ACE_DLList_Iterator (ACE_DLList &l); - - /** - * Retasks the iterator to iterate over a new - * Double_Linked_List. This allows clients to reuse an iterator - * without incurring the constructor overhead. If you do use this, - * be aware that if there are more than one reference to this - * iterator, the other "clients" may be very bothered when their - * iterator changes. - * @@ Here be dragons. Comments? - */ - void reset (ACE_DLList &l); - - // = Iteration methods. - /// Move forward by one element in the list. Returns 0 when all the - /// items in the list have been seen, else 1. - int advance (void); - - /// Pass back the {next_item} that hasn't been seen in the list. - /// Returns 0 when all items have been seen, else 1. - int next (T *&); - - /** - * @deprecated Delegates to ACE_Double_Linked_List_Iterator, except that - * whereas the Double_Linked_List version of next returns the node, this next - * returns the contents of the node - */ - T *next (void) const; - - /** - * Removes the current item (i.e., {next}) from the list. - * Note that DLList iterators do not support {advance_and_remove} - * directly (defined in its base class) and you will need to - * release the element returned by it. - */ - int remove (void); - - /// Delegates to ACE_Double_Linked_List_Iterator. - void dump (void) const; - -private: - ACE_DLList *list_; -}; - -/** - * @class ACE_DLList_Reverse_Iterator - * - * @brief A double-linked list container class iterator. - * - * This implementation uses ACE_Double_Linked_List_Iterator to - * perform the logic behind this container class. It delegates - * all of its calls to ACE_Double_Linked_List_Iterator. - */ -template -class ACE_DLList_Reverse_Iterator : public ACE_Double_Linked_List_Reverse_Iterator -{ - - friend class ACE_DLList; - friend class ACE_DLList_Node; - -public: - - // = Initialization method. - ACE_DLList_Reverse_Iterator (ACE_DLList &l); - - /** - * Retasks the iterator to iterate over a new - * Double_Linked_List. This allows clients to reuse an iterator - * without incurring the constructor overhead. If you do use this, - * be aware that if there are more than one reference to this - * iterator, the other "clients" may be very bothered when their - * iterator changes. - * @@ Here be dragons. Comments? - */ - void reset (ACE_DLList &l); - - // = Iteration methods. - /// Move forward by one element in the list. Returns 0 when all the - /// items in the list have been seen, else 1. - int advance (void); - - /// Pass back the {next_item} that hasn't been seen in the list. - /// Returns 0 when all items have been seen, else 1. - int next (T *&); - - /// @deprecated Delegates to ACE_Double_Linked_List_Iterator. - T *next (void) const; - - /// Removes the current item (i.e., {next}) from the list. - /// Note that DLList iterators do not support {advance_and_remove} - /// directly (defined in its base class) and you will need to - /// release the element returned by it. - int remove (void); - - /// Delegates to ACE_Double_Linked_List_Iterator. - void dump (void) const; - -private: - ACE_DLList *list_; -}; - -// Forward declaration. -template -class ACE_Fixed_Set; - -/** - * @class ACE_Fixed_Set_Iterator_Base - * - * @brief Implements a common base class for iterators for a unordered set. - */ -template -class ACE_Fixed_Set_Iterator_Base -{ -public: - // = Iteration methods. - - /// Pass back the {next_item} that hasn't been seen in the Set. - /// Returns 0 when all items have been seen, else 1. - int next (T *&next_item); - - /// Move forward by one element in the set. Returns 0 when all the - /// items in the set have been seen, else 1. - int advance (void); - - /// Move to the first element in the set. Returns 0 if the - /// set is empty, else 1. - int first (void); - - /// Returns 1 when all items have been seen, else 0. - int done (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - -protected: - // = Initialization method. - ACE_Fixed_Set_Iterator_Base (ACE_Fixed_Set &s); - - /// Set we are iterating over. - ACE_Fixed_Set &s_; - - /// How far we've advanced over the set. - ssize_t next_; - - /// The number of non free items that the iterator had pointed at. - size_t iterated_items_; - - /// Dump the state of an object. - void dump_i (void) const; - - /// Pass back the {next_item} that hasn't been seen in the Set. - /// Returns 0 when all items have been seen, else 1. - int next_i (T *&next_item); -}; - -/** - * @class ACE_Fixed_Set_Iterator - * - * @brief Iterates through an unordered set. - * - * This implementation of an unordered set uses a fixed array. - * Allows deletions while iteration is occurring. - */ -template -class ACE_Fixed_Set_Iterator : public ACE_Fixed_Set_Iterator_Base -{ -public: - // = Initialization method. - ACE_Fixed_Set_Iterator (ACE_Fixed_Set &s); - - // = Iteration methods. - - /// Pass back the {next_item} that hasn't been seen in the Set. - /// Returns 0 when all items have been seen, else 1. - int next (T *&next_item); - - /// Dump the state of an object. - void dump (void) const; - - /// Remove the item where the itearetor is located at. - /// Returns 1 if it removes a item, else 0. - /// Pass back the removed {item}. - int remove (T *&item); - - /// STL-like iterator dereference operator: returns a reference - /// to the node underneath the iterator. - T & operator* (void); - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; -}; - -/** - * @class ACE_Fixed_Set_Const_Iterator - * - * @brief Iterates through a const unordered set. - * - * This implementation of an unordered set uses a fixed array. - */ -template -class ACE_Fixed_Set_Const_Iterator : public ACE_Fixed_Set_Iterator_Base -{ -public: - // = Initialization method. - ACE_Fixed_Set_Const_Iterator (const ACE_Fixed_Set &s); - - // = Iteration methods. - - /// Pass back the {next_item} that hasn't been seen in the Set. - /// Returns 0 when all items have been seen, else 1. - int next (const T *&next_item); - - /// Dump the state of an object. - void dump (void) const; - - /// STL-like iterator dereference operator: returns a reference - /// to the node underneath the iterator. - const T & operator* (void) const ; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; -}; - -/** - * @class ACE_Fixed_Set - * - * @brief Implement a simple unordered set of {T} with maximum {ACE_SIZE}. - * - * This implementation of an unordered set uses a fixed array. - * It does not allow duplicate members. The set provides linear insertion/deletion - * operations. - * - * Requirements and Performance Characteristics - * - Internal Structure - * Fixed array - * - Duplicates allowed? - * No - * - Random access allowed? - * No - * - Search speed - * Linear - * - Insert/replace speed - * Linear - * - Iterator still valid after change to container? - * Yes - * - Frees memory for removed elements? - * No - * - Items inserted by - * Value - * - Requirements for contained type - * -# Default constructor - * -# Copy constructor - * -# operator= - * -# operator== - */ -template -class ACE_Fixed_Set -{ -public: - friend class ACE_Fixed_Set_Iterator_Base; - friend class ACE_Fixed_Set_Iterator; - friend class ACE_Fixed_Set_Const_Iterator; - - // Trait definitions. - typedef ACE_Fixed_Set_Iterator ITERATOR; - typedef ACE_Fixed_Set_Const_Iterator CONST_ITERATOR; - - // = Initialization and termination methods. - /// Default Constructor. - /** - * Creates an empy set - */ - ACE_Fixed_Set (void); - - /// Copy constructor. - /** - * Initializes a set to be a copy of the set parameter. - */ - ACE_Fixed_Set (const ACE_Fixed_Set &); - - /// Assignment operator. - /** - * Deep copy of one set to another. - */ - void operator= (const ACE_Fixed_Set &); - - /// Destructor. - /** - * Destroys a set. - */ - ~ACE_Fixed_Set (void); - - // = Check boundary conditions. - - /// Returns 1 if the container is empty, otherwise returns 0. - /** - * Performs constant time check to determine if a set is empty. - */ - int is_empty (void) const; - - /// Returns 1 if the container is full, otherwise returns 0. - /** - * Performs a constant time check to see if the set is full. - */ - int is_full (void) const; - - // = Classic unordered set operations. - - ///Linear time insertion of an item unique to the set. - /** - * Insert @a new_item into the set (doesn't allow duplicates). - * Returns -1 if failures occur, 1 if item is already present, else - * 0. - */ - int insert (const T &new_item); - - ///Linear time removal operation of an item. - /** - * Remove first occurrence of {item} from the set. Returns 0 if - * it removes the item, -1 if it can't find the item, and -1 if a - * failure occurs. Removal doesn't reclaim memory for the @a item. - */ - int remove (const T &item); - - /// Finds if @a item occurs in the set. Returns 0 if finds, else -1. - /** - * Performs a linear find operation for the specified @a item. - */ - int find (const T &item) const; - - /// Size of the set. - /** - * Returns the current size of the set. - */ - size_t size (void) const; - - /// Dump the state of an object. - void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - -private: - /// Holds the contents of the set. - struct - { - /// Item in the set. - T item_; - - /// Keeps track of whether this item is in use or not. - int is_free_; - } search_structure_[ACE_SIZE]; - - /// Current size of the set. - size_t cur_size_; - - /// Maximum size of the set. - size_t max_size_; -}; - -// Forward declaration. -template -class ACE_Bounded_Set; - -/** - * @class ACE_Bounded_Set_Iterator - * - * @brief Iterates through an unordered set. - * - * This implementation of an unordered set uses a Bounded array. - * Allows deletions while iteration is occurring. - */ -template -class ACE_Bounded_Set_Iterator -{ -public: - // = Initialization method. - ACE_Bounded_Set_Iterator (ACE_Bounded_Set &s); - - // = Iteration methods. - - /// Pass back the {next_item} that hasn't been seen in the Set. - /// Returns 0 when all items have been seen, else 1. - int next (T *&next_item); - - /// Move forward by one element in the set. Returns 0 when all the - /// items in the set have been seen, else 1. - int advance (void); - - /// Move to the first element in the set. Returns 0 if the - /// set is empty, else 1. - int first (void); - - /// Returns 1 when all items have been seen, else 0. - int done (void) const; - - /// Dump the state of an object. - void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - -private: - /// Set we are iterating over. - ACE_Bounded_Set &s_; - - /// How far we've advanced over the set. - ssize_t next_; -}; - - -/** - * @class ACE_Bounded_Set - * - * @brief Implement a simple unordered set of {T} with maximum - * set at creation time. - * - * This implementation of an unordered set uses a Bounded array. - * This implementation does not allow duplicates. It provides - * linear insert/remove/find operations. Insertion/removal does not - * invalidate iterators, but caution should be taken to ensure - * expected behavior. Once initialized, the object has a maximum size - * which can only be increased by the assignment of another larger Bounded_Set. - * - * Requirements and Performance Characteristics - * - Internal Structure - * Bounded array which can grow via assignment - * - Duplicates allowed? - * No - * - Random access allowed? - * No - * - Search speed - * Linear - * - Insert/replace speed - * Linear - * - Iterator still valid after change to container? - * Yes - * - Frees memory for removed elements? - * No - * - Items inserted by - * Value - * - Requirements for contained type - * -# Default constructor - * -# Copy constructor - * -# operator= - * -# operator== - */ -template -class ACE_Bounded_Set -{ -public: - friend class ACE_Bounded_Set_Iterator; - - // Trait definition. - typedef ACE_Bounded_Set_Iterator ITERATOR; - - enum - { - DEFAULT_SIZE = 10 - }; - - // = Initialization and termination methods. - /// Construct a Bounded_Set using the default size. - /** - * The default constructor initializes the Bounded_Set to a maximum size - * specified by the DEFAULT_SIZE. - */ - ACE_Bounded_Set (void); - - /// Construct a Bounded_Set with the provided sizeB. - /** - * Initialize the Bounded_Set to have a maximum size equal to the size - * parameter specified. - */ - ACE_Bounded_Set (size_t size); - - /// Construct a Bounded_Set that is a copy of the provides Bounded_Set. - /** - * Initialize the Bounded_Set to be a copy of the Bounded_Set parameter. - */ - ACE_Bounded_Set (const ACE_Bounded_Set &); - - /// Assignment operator. - /** - * The assignment will make a deep copy of the Bounded_Set provided. If the - * rhs has more elements than the capacity of the lhs, then the lhs will be - * deleted and reallocated to accomadate the larger number of elements. - */ - void operator= (const ACE_Bounded_Set &); - - /// Destructor - /** - * Clean up the underlying dynamically allocated memory that is used by - * the Bounded_Set. - */ - ~ACE_Bounded_Set (void); - - // = Check boundary conditions. - - /// Returns 1 if the container is empty, otherwise returns 0. - /** - * A constant time check is performed to determine if the Bounded_Set is - * empty. - */ - int is_empty (void) const; - - /// Returns 1 if the container is full, otherwise returns 0. - /** - * Performs a constant time check to determine if the Bounded_Set is at - * capacity. - */ - int is_full (void) const; - - // = Classic unordered set operations. - - ///Inserts a new element unique to the set. - /** - * Insert @a new_item into the set (doesn't allow duplicates) in linear - * time. - * Returns -1 if failures occur, 1 if item is already present, else - * 0. - */ - int insert (const T &new_item); - - ///Finds the specified element and removes it from the set. - /** - * Remove first occurrence of @a item from the set. Returns 0 if it - * removes the item, -1 if it can't find the item, and -1 if a - * failure occurs. The linear remove operation does not reclaim the - * memory associated with the removed item. - */ - int remove (const T &item); - - /// Finds if @a item occurs in the set. Returns 0 if finds, else -1. - /** - * find preforms a linear search for {item} and returns 0 on successful - * find and -1 otherwise. - */ - int find (const T &item) const; - - /// Size of the set. - /** - * Returns a size_t representing the current size of the set. - */ - size_t size (void) const; - - /// Dump the state of an object. - void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - -private: - struct Search_Structure - { - /// Item in the set. - T item_; - - /// Keeps track of whether this item is in use or not. - int is_free_; - }; - - /// Holds the contents of the set. - Search_Structure *search_structure_; - - /// Current size of the set. - size_t cur_size_; - - /// Maximum size of the set. - size_t max_size_; -}; - -/** - * @class ACE_Ordered_MultiSet_Iterator - * - * @brief Implement a bidirectional iterator over an ordered multiset. - * This class template requires that < operator semantics be - * defined for the parameterized type {T}, but does not impose - * any restriction on how that ordering operator is implemented. - */ -template -class ACE_Ordered_MultiSet_Iterator -{ -public: - friend class ACE_Ordered_MultiSet; - - // = Initialization method. - ACE_Ordered_MultiSet_Iterator (ACE_Ordered_MultiSet &s); - - // = Iteration methods. - - /// Pass back the {next_item} that hasn't been seen in the ordered multiset. - /// Returns 0 when all items have been seen, else 1. - int next (T *&next_item) const; - - /// Repositions the iterator at the first item in the ordered multiset - /// Returns 0 if the list is empty else 1. - int first (void); - - /// Repositions the iterator at the last item in the ordered multiset - /// Returns 0 if the list is empty else 1. - int last (void); - - /// Move forward by one element in the set. Returns 0 when all the - /// items in the set have been seen, else 1. - int advance (void); - - /// Move backward by one element in the set. Returns 0 when all the - /// items in the set have been seen, else 1. - int retreat (void); - - /// Returns 1 when all items have been seen, else 0. - int done (void) const; - - /// Dump the state of an object. - void dump (void) const; - - /// Returns a reference to the internal element {this} is pointing to. - T& operator* (void); - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - -private: - - /// Pointer to the current node in the iteration. - ACE_DNode *current_; - - /// Pointer to the set we're iterating over. - ACE_Ordered_MultiSet &set_; -}; - - -/** - * @class ACE_Ordered_MultiSet - * - * @brief Implement a simple ordered multiset of {T} of unbounded size - * that allows duplicates. This class template requires that < - * operator semantics be defined for the parameterized type {T}, but - * does not impose any restriction on how that ordering operator is - * implemented. The set is implemented as a linked list. - * - * Requirements and Performance Characteristics - * - Internal Structure - * Double linked list - * - Duplicates allowed? - * Yes - * - Random access allowed? - * No - * - Search speed - * Linear - * - Insert/replace speed - * Linear - * - Iterator still valid after change to container? - * Yes - * - Frees memory for removed elements? - * Yes - * - Items inserted by - * Value - * - Requirements for contained type - * -# Default constructor - * -# Copy constructor - * -# operator= - * -# operator== - * -# operator< - */ -template -class ACE_Ordered_MultiSet -{ -public: - friend class ACE_Ordered_MultiSet_Iterator; - - // Trait definition. - typedef ACE_Ordered_MultiSet_Iterator ITERATOR; - - // = Initialization and termination methods. - /// Constructor. Use user specified allocation strategy - /// if specified. - /** - * Initialize the set using the allocation strategy specified. If none, use the - * default strategy. - */ - ACE_Ordered_MultiSet (ACE_Allocator *the_allocator = 0); - - /// Copy constructor. - /** - * Initialize the set to be a copy of the provided set. - */ - ACE_Ordered_MultiSet (const ACE_Ordered_MultiSet &); - - /// Destructor. - /** - * Delete the nodes of the set. - */ - ~ACE_Ordered_MultiSet (void); - - /// Assignment operator. - /** - * Delete the nodes in lhs, and copy the nodes from the rhs. - */ - void operator= (const ACE_Ordered_MultiSet &); - - // = Check boundary conditions. - - /// Returns 1 if the container is empty, otherwise returns 0. - /** - * Constant time check to determine if the set is empty. - */ - int is_empty (void) const; - - /// Size of the set. - /** - * Constant time check to determine the size of the set. - */ - size_t size (void) const; - - // = Classic unordered set operations. - - /// Insert @a new_item into the ordered multiset. - /// Returns -1 if failures occur, else 0. - /** - * Linear time, order preserving insert into the set beginning at the head. - */ - int insert (const T &new_item); - - ///Linear time insert beginning at the point specified by the provided iterator. - /** - * Insert @a new_item into the ordered multiset, starting its search at - * the node pointed to by the iterator, and if insertion was successful, - * updates the iterator to point to the newly inserted node. - * Returns -1 if failures occur, else 0. - */ - int insert (const T &new_item, ITERATOR &iter); - - /// Remove first occurrence of @a item from the set. Returns 0 if - /// it removes the item, -1 if it can't find the item. - /** - * Linear time search operation which removes the item from the set if found . - */ - int remove (const T &item); - - ///Linear find operation. - /** - * Finds first occurrence of @a item in the multiset, using the iterator's - * current position as a hint to improve performance. If find succeeds, - * it positions the iterator at that node and returns 0, or if it cannot - * locate the node, it leaves the iterator alone and just returns -1. - */ - int find (const T &item, ITERATOR &iter) const; - - /// Reset the ACE_Ordered_MultiSet to be empty. - /** - * Delete the nodes inside the set. - */ - void reset (void); - - /// Dump the state of an object. - void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - -private: - - /** - * Insert @a item, starting its search at the position given, - * and if successful updates the passed pointer to point to - * the newly inserted item's node. - */ - int insert_from (const T &item, ACE_DNode *start_position, - ACE_DNode **new_position); - - /** - * Looks for first occurrence of @a item in the ordered set, using the - * passed starting position as a hint: if there is such an instance, it - * updates the new_position pointer to point to this node and returns 0; - * if there is no such node, then if there is a node before where the - * item would have been, it updates the new_position pointer to point - * to this node and returns -1; if there is no such node, then if there - * is a node after where the item would have been, it updates the - * new_position pointer to point to this node (or 0 if there is no such - * node) and returns 1; - */ - int locate (const T &item, ACE_DNode *start_position, - ACE_DNode *&new_position) const; - - /// Delete all the nodes in the Set. - void delete_nodes (void); - - /// Copy nodes into this set. - void copy_nodes (const ACE_Ordered_MultiSet &); - - /// Head of the bilinked list of Nodes. - ACE_DNode *head_; - - /// Head of the bilinked list of Nodes. - ACE_DNode *tail_; - - /// Current size of the set. - size_t cur_size_; - - /// Allocation strategy of the set. - ACE_Allocator *allocator_; -}; - -// **************************************************************** - -/** - * @class ACE_Array - * - * @brief A dynamic array class. - * - * This class extends ACE_Array_Base, adding comparison operators. - * - * Requirements and Performance Characteristics - * - Internal Structure - * Dynamic array - * - Duplicates allowed? - * Yes - * - Random access allowed? - * Yes - * - Search speed - * N/A - * - Insert/replace speed - * O(1) - * - Iterator still valid after change to container? - * - In general, yes. - * - If array size is changed during iteration, no. - * - Frees memory for removed elements? - * No - * - Items inserted by - * Value - * - Requirements for contained type - * -# Default constructor - * -# Copy constructor - * -# operator= - * -# operator!= - * - * @sa ACE_Array_Base. This class inherits its operations and requirements. - */ -template -class ACE_Array : public ACE_Array_Base -{ -public: - // Define a "trait" - typedef T TYPE; - typedef ACE_Array_Iterator ITERATOR; - - /// Dynamically create an uninitialized array. - /** - * Initialize an empty array of the specified size using the provided - * allocation strategy. - */ - ACE_Array (size_t size = 0, - ACE_Allocator* alloc = 0); - - /// Dynamically initialize the entire array to the {default_value}. - /** - * Initialize an array the given size placing the default_value in each index. - */ - ACE_Array (size_t size, - const T &default_value, - ACE_Allocator* alloc = 0); - - ///Copy constructor. - /** - * The copy constructor performs initialization by making an exact - * copy of the contents of parameter {s}, i.e., *this == s will - * return true. - */ - ACE_Array (const ACE_Array &s); - - ///Assignment operator - /** - * Assignment operator performs an assignment by making an exact - * copy of the contents of parameter {s}, i.e., *this == s will - * return true. Note that if the {max_size_} of {array_} is >= than - * {s.max_size_} we can copy it without reallocating. However, if - * {max_size_} is < {s.max_size_} we must delete the {array_}, - * reallocate a new {array_}, and then copy the contents of {s}. - */ - void operator= (const ACE_Array &s); - - // = Compare operators - - ///Equality comparison operator. - /** - * Compare this array with {s} for equality. Two arrays are equal - * if their {size}'s are equal and all the elements from 0 .. {size} - * are equal. - */ - bool operator== (const ACE_Array &s) const; - - ///Inequality comparison operator. - /** - * Compare this array with {s} for inequality such that {*this} != - * {s} is always the complement of the boolean return value of - * {*this} == {s}. - */ - bool operator!= (const ACE_Array &s) const; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/Containers_T.inl" -#endif /* __ACE_INLINE__ */ - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "ace/Containers_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Containers_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ - -#include /**/ "ace/post.h" - -#endif /* ACE_CONTAINERS_T_H */ diff --git a/modules/worldengine/deps/acelite/ace/Containers_T.inl b/modules/worldengine/deps/acelite/ace/Containers_T.inl deleted file mode 100644 index adc0f42cd2..0000000000 --- a/modules/worldengine/deps/acelite/ace/Containers_T.inl +++ /dev/null @@ -1,476 +0,0 @@ -// -*- C++ -*- -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -template ACE_INLINE int -ACE_Bounded_Stack::is_empty (void) const -{ - ACE_TRACE ("ACE_Bounded_Stack::is_empty"); - return this->top_ == 0; -} - -template ACE_INLINE int -ACE_Bounded_Stack::is_full (void) const -{ - ACE_TRACE ("ACE_Bounded_Stack::is_full"); - return this->top_ >= this->size_; -} - -template ACE_INLINE int -ACE_Bounded_Stack::push (const T &new_item) -{ - ACE_TRACE ("ACE_Bounded_Stack::push"); - if (this->is_full () == 0) - { - this->stack_[this->top_++] = new_item; - return 0; - } - else - return -1; -} - -template ACE_INLINE int -ACE_Bounded_Stack::pop (T &item) -{ - ACE_TRACE ("ACE_Bounded_Stack::pop"); - if (this->is_empty () == 0) - { - item = this->stack_[--this->top_]; - return 0; - } - else - return -1; -} - -template ACE_INLINE int -ACE_Bounded_Stack::top (T &item) const -{ - ACE_TRACE ("ACE_Bounded_Stack::top"); - if (this->is_empty () == 0) - { - item = this->stack_[this->top_ - 1]; - return 0; - } - else - return -1; -} - -template ACE_INLINE size_t -ACE_Bounded_Stack::size (void) const -{ - return this->size_; -} - -//---------------------------------------- - -template ACE_INLINE int -ACE_Fixed_Stack::is_empty (void) const -{ - ACE_TRACE ("ACE_Fixed_Stack::is_empty"); - return this->top_ == 0; -} - -template ACE_INLINE int -ACE_Fixed_Stack::is_full (void) const -{ - ACE_TRACE ("ACE_Fixed_Stack::is_full"); - return this->top_ >= this->size_; -} - -template ACE_INLINE int -ACE_Fixed_Stack::push (const T &new_item) -{ - ACE_TRACE ("ACE_Fixed_Stack::push"); - if (this->is_full () == 0) - { - this->stack_[this->top_++] = new_item; - return 0; - } - else - return -1; -} - -template ACE_INLINE int -ACE_Fixed_Stack::pop (T &item) -{ - ACE_TRACE ("ACE_Fixed_Stack::pop"); - if (this->is_empty () == 0) - { - item = this->stack_[--this->top_]; - return 0; - } - else - return -1; -} - -template ACE_INLINE int -ACE_Fixed_Stack::top (T &item) const -{ - ACE_TRACE ("ACE_Fixed_Stack::top"); - if (this->is_empty () == 0) - { - item = this->stack_[this->top_ - 1]; - return 0; - } - else - return -1; -} - -template ACE_INLINE size_t -ACE_Fixed_Stack::size (void) const -{ - return this->size_; -} - -template ACE_INLINE int -ACE_Unbounded_Stack::is_empty (void) const -{ - // ACE_TRACE ("ACE_Unbounded_Stack::is_empty"); - return this->head_ == this->head_->next_; -} - -template ACE_INLINE int -ACE_Unbounded_Stack::top (T &item) const -{ - ACE_TRACE ("ACE_Unbounded_Stack::top"); - if (this->is_empty () == 0) - { - item = this->head_->next_->item_; - return 0; - } - else - return -1; -} - -template ACE_INLINE int -ACE_Unbounded_Stack::is_full (void) const -{ - ACE_TRACE ("ACE_Unbounded_Stack::is_full"); - return 0; // ??? -} - -template ACE_INLINE size_t -ACE_Unbounded_Stack::size (void) const -{ - return this->cur_size_; -} - -// --- - - -// --- - -template ACE_INLINE int -ACE_Fixed_Set::is_empty (void) const -{ - ACE_TRACE ("ACE_Fixed_Set::is_empty"); - return this->cur_size_ == 0; -} - -template ACE_INLINE int -ACE_Fixed_Set::is_full (void) const -{ - ACE_TRACE ("ACE_Fixed_Set::is_full"); - return this->cur_size_ == this->max_size_; -} - -// --- - -template ACE_INLINE int -ACE_Bounded_Set::is_empty (void) const -{ - ACE_TRACE ("ACE_Bounded_Set::is_empty"); - return this->cur_size_ == 0; -} - -template ACE_INLINE int -ACE_Bounded_Set::is_full (void) const -{ - ACE_TRACE ("ACE_Bounded_Set::is_full"); - return this->cur_size_ == this->max_size_; -} - -// -- - -template ACE_INLINE int -ACE_Ordered_MultiSet_Iterator::first (void) -{ - ACE_TRACE ("ACE_Ordered_MultiSet_Iterator::first"); - current_ = set_.head_; - - return (current_ ? 1 : 0); -} - -template ACE_INLINE int -ACE_Ordered_MultiSet_Iterator::last (void) -{ - ACE_TRACE ("ACE_Ordered_MultiSet_Iterator::last"); - current_ = set_.tail_; - - return (current_ ? 1 : 0); -} - -template ACE_INLINE int -ACE_Ordered_MultiSet_Iterator::advance (void) -{ - ACE_TRACE ("ACE_Ordered_MultiSet_Iterator::advance"); - - current_ = current_ ? current_->next_ : 0; - - return (current_ ? 1 : 0); -} - -template ACE_INLINE int -ACE_Ordered_MultiSet_Iterator::retreat (void) -{ - ACE_TRACE ("ACE_Ordered_MultiSet_Iterator::retreat"); - - current_ = current_ ? current_->prev_ : 0; - - return (current_ ? 1 : 0); -} - -template ACE_INLINE int -ACE_Ordered_MultiSet_Iterator::done (void) const -{ - ACE_TRACE ("ACE_Ordered_MultiSet_Iterator::done"); - - return (current_ ? 0 : 1); -} - -template ACE_INLINE void -ACE_Ordered_MultiSet_Iterator::dump (void) const -{ -#if defined (ACE_HAS_DUMP) -// ACE_TRACE ("ACE_Ordered_MultiSet_Iterator::dump"); -#endif /* ACE_HAS_DUMP */ -} - - - -// -- - -template ACE_INLINE int -ACE_Ordered_MultiSet::is_empty (void) const -{ - ACE_TRACE ("ACE_Ordered_MultiSet::is_empty"); - return this->cur_size_ > 0 ? 0 : 1; -} - -template ACE_INLINE size_t -ACE_Ordered_MultiSet::size (void) const -{ -// ACE_TRACE ("ACE_Ordered_MultiSet::size"); - return this->cur_size_; -} - -// **************************************************************** - -template ACE_INLINE -ACE_Array::ACE_Array (size_t size, - ACE_Allocator *alloc) - : ACE_Array_Base (size, alloc) -{ -} - -template ACE_INLINE -ACE_Array::ACE_Array (size_t size, - const T &default_value, - ACE_Allocator *alloc) - : ACE_Array_Base (size, default_value, alloc) -{ -} - -// The copy constructor (performs initialization). - -template ACE_INLINE -ACE_Array::ACE_Array (const ACE_Array &s) - : ACE_Array_Base (s) -{ -} - -// Assignment operator (performs assignment). - -template ACE_INLINE void -ACE_Array::operator= (const ACE_Array &s) -{ - // Check for "self-assignment". - - if (this != &s) - this->ACE_Array_Base::operator= (s); -} - -// Compare this array with for inequality. - -template ACE_INLINE bool -ACE_Array::operator!= (const ACE_Array &s) const -{ - return !(*this == s); -} - -// **************************************************************** - - -// **************************************************************** - -template ACE_INLINE void -ACE_DLList::operator= (const ACE_DLList &l) -{ - *(ACE_DLList_Base *) this = l; -} - -template ACE_INLINE int -ACE_DLList::get (T *&item, size_t index) -{ - ACE_DLList_Node *node; - int result = ACE_DLList_Base::get (node, index); - if (result != -1) - item = (T *) node->item_; - return result; -} - -template ACE_INLINE void -ACE_DLList::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_DLList_Base::dump (); -#endif /* ACE_HAS_DUMP */ -} - -template ACE_INLINE int -ACE_DLList::remove (ACE_DLList_Node *n) -{ - int result = ACE_DLList_Base::remove (n); - ACE_DES_FREE (n, - this->allocator_->free, - ACE_DLList_Node); - return result; -} - -template ACE_INLINE -ACE_DLList::ACE_DLList (ACE_Allocator *alloc) - : ACE_DLList_Base (alloc) -{ -} - -template ACE_INLINE -ACE_DLList::ACE_DLList (const ACE_DLList &l) - : ACE_DLList_Base ((ACE_DLList &) l) -{ -} - -template ACE_INLINE -ACE_DLList::~ACE_DLList (void) -{ - while (this->delete_head ()) ; -} - -template ACE_INLINE int -ACE_DLList_Iterator::remove (void) -{ - ACE_DLList_Node *temp = this->ACE_Double_Linked_List_Iterator ::next (); - this->ACE_Double_Linked_List_Iterator ::advance (); - return list_->remove (temp); -} - -template ACE_INLINE -ACE_DLList_Iterator::ACE_DLList_Iterator (ACE_DLList &l) - : ACE_Double_Linked_List_Iterator ((ACE_DLList_Base &)l), - list_ (&l) -{ -} - -template ACE_INLINE void -ACE_DLList_Iterator::reset (ACE_DLList &l) -{ - list_ = &l; - this->ACE_Double_Linked_List_Iterator ::reset ((ACE_DLList_Base &)l); -} - -template ACE_INLINE int -ACE_DLList_Iterator::next (T *&ptr) -{ - ACE_DLList_Node *temp = - ACE_Double_Linked_List_Iterator ::next (); - if (temp) - ptr = (T *) temp->item_; - return temp ? 1 : 0; -} - -template ACE_INLINE T * -ACE_DLList_Iterator::next (void) const -{ - ACE_DLList_Node *temp = ACE_Double_Linked_List_Iterator ::next (); - return (T *) (temp ? temp->item_ : 0); -} - -template ACE_INLINE int -ACE_DLList_Iterator::advance (void) -{ - return this->ACE_Double_Linked_List_Iterator ::advance (); -} - -template ACE_INLINE void -ACE_DLList_Iterator::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_Double_Linked_List_Iterator ::dump (); -#endif /* ACE_HAS_DUMP */ -} - - -template ACE_INLINE int -ACE_DLList_Reverse_Iterator::remove (void) -{ - ACE_DLList_Node *temp = ACE_Double_Linked_List_Reverse_Iterator ::next (); - this->ACE_Double_Linked_List_Reverse_Iterator ::advance (); - return list_->remove (temp); -} - -template ACE_INLINE -ACE_DLList_Reverse_Iterator::ACE_DLList_Reverse_Iterator (ACE_DLList &l) - : ACE_Double_Linked_List_Reverse_Iterator ((ACE_DLList_Base &)l), - list_ (&l) -{ -} - -template ACE_INLINE void -ACE_DLList_Reverse_Iterator::reset (ACE_DLList &l) -{ - list_ = &l; - this->ACE_Double_Linked_List_Reverse_Iterator ::reset ((ACE_DLList_Base &)l); -} - -template ACE_INLINE int -ACE_DLList_Reverse_Iterator::advance (void) -{ - return ACE_Double_Linked_List_Reverse_Iterator ::advance (); -} - -template ACE_INLINE int -ACE_DLList_Reverse_Iterator::next (T *&ptr) -{ - ACE_DLList_Node *temp = - ACE_Double_Linked_List_Reverse_Iterator ::next (); - if (temp == 0) - return 0; - ptr = (T *) temp->item_; - return 1; -} - -template ACE_INLINE T * -ACE_DLList_Reverse_Iterator::next (void) const -{ - ACE_DLList_Node *temp = ACE_Double_Linked_List_Reverse_Iterator ::next (); - return (T *) (temp ? temp->item_ : 0); -} - - -template ACE_INLINE void -ACE_DLList_Reverse_Iterator::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_Double_Linked_List_Reverse_Iterator ::dump (); -#endif /* ACE_HAS_DUMP */ -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Copy_Disabled.cpp b/modules/worldengine/deps/acelite/ace/Copy_Disabled.cpp deleted file mode 100644 index 59c6ba7af9..0000000000 --- a/modules/worldengine/deps/acelite/ace/Copy_Disabled.cpp +++ /dev/null @@ -1,15 +0,0 @@ -/** - * @file Copy_Disabled.cpp - * - * @author Carlos O'Ryan - */ - -#include "ace/Copy_Disabled.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_Copy_Disabled::ACE_Copy_Disabled (void) -{ -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Copy_Disabled.h b/modules/worldengine/deps/acelite/ace/Copy_Disabled.h deleted file mode 100644 index 374227e8a3..0000000000 --- a/modules/worldengine/deps/acelite/ace/Copy_Disabled.h +++ /dev/null @@ -1,62 +0,0 @@ -// -*- C++ -*- - -//=========================================================================== -/** - * @file Copy_Disabled.h - * - * @author Carlos O'Ryan - */ -//=========================================================================== - -#ifndef ACE_COPY_DISABLED_H -#define ACE_COPY_DISABLED_H - -#include /**/ "ace/pre.h" - -#include /**/ "ace/ACE_export.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_Copy_Disabled - * - * @brief Helper class to disable copy construction and assignment - * - * Classes used to control OS and other resources are not "canonical", - * i.e. they have their copy constructor and assignment operators - * disabled. - * This is often done by making the copy constructor and assignment - * operators private, effectively disallowing copying by clients of - * the class (including derived classes). If the copy constructor and - * assingment operators are left unimplemented then the class itself - * cannot make any copies of its instances, because it would result in - * link errors. - * - * To use this class simply use private inheritance: - * - * class Foo : private ACE_Copy_Disabled - * { - * // code here - * }; - */ -class ACE_Export ACE_Copy_Disabled -{ -public: - - /// Default constructor - ACE_Copy_Disabled (void); - -private: - ACE_Copy_Disabled (const ACE_Copy_Disabled &); - ACE_Copy_Disabled &operator= (const ACE_Copy_Disabled &); -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#include /**/ "ace/post.h" - -#endif /* ACE_COPY_DISABLED_H */ diff --git a/modules/worldengine/deps/acelite/ace/Countdown_Time.h b/modules/worldengine/deps/acelite/ace/Countdown_Time.h deleted file mode 100644 index 7c9a9e3d2b..0000000000 --- a/modules/worldengine/deps/acelite/ace/Countdown_Time.h +++ /dev/null @@ -1,34 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Countdown_Time.h - * - * @author Douglas C. Schmidt - * @author Irfan Pyarali - */ -//============================================================================= - -#ifndef ACE_COUNTDOWN_TIME_H -#define ACE_COUNTDOWN_TIME_H - -#include /**/ "ace/pre.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Countdown_Time_T.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -// The following typedef is here for ease of use and backward -// compatibility. -typedef ACE_Countdown_Time_T - ACE_Countdown_Time; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#include /**/ "ace/post.h" - -#endif /* ACE_COUNTDOWN_TIME_H */ diff --git a/modules/worldengine/deps/acelite/ace/Countdown_Time_T.cpp b/modules/worldengine/deps/acelite/ace/Countdown_Time_T.cpp deleted file mode 100644 index 8a38c4de11..0000000000 --- a/modules/worldengine/deps/acelite/ace/Countdown_Time_T.cpp +++ /dev/null @@ -1,65 +0,0 @@ -#ifndef ACE_COUNTDOWN_TIME_T_CPP -#define ACE_COUNTDOWN_TIME_T_CPP - -#include "ace/Countdown_Time_T.h" - -#if !defined (__ACE_INLINE__) -#include "ace/Countdown_Time_T.inl" -#endif /* __ACE_INLINE__ */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -template ACE_INLINE -ACE_Countdown_Time_T::ACE_Countdown_Time_T (ACE_Time_Value *max_wait_time, - TIME_POLICY const & time_policy) - : time_policy_ (time_policy), - max_wait_time_ (max_wait_time), - max_wait_value_ (ACE_Time_Value::zero), - stopped_ (false) -{ - this->start (); -} - -template ACE_INLINE -ACE_Countdown_Time_T::~ACE_Countdown_Time_T (void) -{ - this->stop (); -} - -template ACE_INLINE void -ACE_Countdown_Time_T::start (void) -{ - if (this->max_wait_time_ != 0) - { - this->max_wait_value_ = *this->max_wait_time_; - this->start_time_ = this->time_policy_ (); - this->stopped_ = false; - } -} - -template ACE_INLINE void -ACE_Countdown_Time_T::stop (void) -{ - if (this->max_wait_time_ != 0 && !this->stopped_) - { - ACE_Time_Value const elapsed_time = - this->time_policy_ () - this->start_time_; - - if (elapsed_time >= ACE_Time_Value::zero && - this->max_wait_value_ > elapsed_time) - { - *this->max_wait_time_ = this->max_wait_value_ - elapsed_time; - } - else - { - // Used all of timeout. - *this->max_wait_time_ = ACE_Time_Value::zero; - // errno = ETIME; - } - this->stopped_ = true; - } -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_COUNTDOWN_TIME_T_CPP */ diff --git a/modules/worldengine/deps/acelite/ace/Countdown_Time_T.h b/modules/worldengine/deps/acelite/ace/Countdown_Time_T.h deleted file mode 100644 index 78d46c6d3f..0000000000 --- a/modules/worldengine/deps/acelite/ace/Countdown_Time_T.h +++ /dev/null @@ -1,101 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Countdown_Time_T.h - * - * @author Douglas C. Schmidt - */ -//============================================================================= - -#ifndef ACE_COUNTDOWN_TIME_T_H -#define ACE_COUNTDOWN_TIME_T_H - -#include /**/ "ace/pre.h" - -#include /**/ "ace/ACE_export.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Time_Value.h" -#include "ace/Time_Policy.h" -#include "ace/Copy_Disabled.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_Countdown_Time - * - * @brief Keeps track of the amount of elapsed time. - * - * This class has a side-effect on the @c max_wait_time -- every - * time the stop() method is called the @c max_wait_time is - * updated. - */ -template -class ACE_Countdown_Time_T : private ACE_Copy_Disabled -{ -public: - /// Cache the @a max_wait_time and call @c start(). - ACE_Countdown_Time_T (ACE_Time_Value *max_wait_time, - TIME_POLICY const & time_policy = TIME_POLICY()); - - /// Destructor, makes sure the max_wait_time that got passed as pointer - /// to the constructor is updated with the time elapsed. - ~ACE_Countdown_Time_T (void); - - /// Cache the current time and enter a start state. - void start (void); - - /// Subtract the elapsed time from max_wait_time_ and enter a stopped - /// state. - void stop (void); - - /// Calls stop and then start. max_wait_time_ is modified by the - /// call to stop. - void update (void); - - /// Returns true if we've already been stopped, else false. - bool stopped (void) const; - - /// Allows applications to control how the timer queue gets the time - /// of day. - void set_time_policy(TIME_POLICY const & time_policy); - -private: - /// The policy to return the current time of day - TIME_POLICY time_policy_; - - /// Maximum time we are monitoring - ACE_Time_Value *max_wait_time_; - - /// Copy of the maximum time value, used to avoid nested decrements - ACE_Time_Value max_wait_value_; - - /// Beginning of the start time. - ACE_Time_Value start_time_; - - /// Keeps track of whether we've already been stopped. - bool stopped_; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#include /**/ "ace/post.h" - -#if defined (__ACE_INLINE__) -#include "ace/Countdown_Time_T.inl" -#endif /* __ACE_INLINE__ */ - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "ace/Countdown_Time_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Countdown_Time_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ - - -#endif /* ACE_COUNTDOWN_TIME_T_H */ diff --git a/modules/worldengine/deps/acelite/ace/Countdown_Time_T.inl b/modules/worldengine/deps/acelite/ace/Countdown_Time_T.inl deleted file mode 100644 index 319729d9c3..0000000000 --- a/modules/worldengine/deps/acelite/ace/Countdown_Time_T.inl +++ /dev/null @@ -1,23 +0,0 @@ -// -*- C++ -*- -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -template ACE_INLINE bool -ACE_Countdown_Time_T::stopped (void) const -{ - return stopped_; -} - -template ACE_INLINE void -ACE_Countdown_Time_T::update (void) -{ - this->stop (); - this->start (); -} - -template ACE_INLINE void -ACE_Countdown_Time_T::set_time_policy(TIME_POLICY const & time_policy) -{ - this->time_policy_ = time_policy; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/DEV.cpp b/modules/worldengine/deps/acelite/ace/DEV.cpp deleted file mode 100644 index 762e9472de..0000000000 --- a/modules/worldengine/deps/acelite/ace/DEV.cpp +++ /dev/null @@ -1,41 +0,0 @@ -#include "ace/DEV.h" - -#include "ace/OS_NS_unistd.h" - -#if !defined (__ACE_INLINE__) -#include "ace/DEV.inl" -#endif /* __ACE_INLINE__ */ - - - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_ALLOC_HOOK_DEFINE(ACE_DEV) - -void -ACE_DEV::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_DEV::dump"); -#endif /* ACE_HAS_DUMP */ -} - -// This is the do-nothing constructor. - -ACE_DEV::ACE_DEV (void) -{ - ACE_TRACE ("ACE_DEV::ACE_DEV"); -} - -// Close the device - -int -ACE_DEV::close (void) -{ - ACE_TRACE ("ACE_DEV::close"); - int result = ACE_OS::close (this->get_handle ()); - this->set_handle (ACE_INVALID_HANDLE); - return result; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/DEV.h b/modules/worldengine/deps/acelite/ace/DEV.h deleted file mode 100644 index c74c23429c..0000000000 --- a/modules/worldengine/deps/acelite/ace/DEV.h +++ /dev/null @@ -1,63 +0,0 @@ -/* -*- C++ -*- */ - -//============================================================================= -/** - * @file DEV.h - * - * @author Gerhard Lenzer - */ -//============================================================================= - - -#ifndef ACE_DEV_H -#define ACE_DEV_H -#include /**/ "ace/pre.h" - -#include "ace/IO_SAP.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/DEV_Addr.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_DEV - * - * @brief Defines the member functions for the base class of the - * ACE_DEV abstraction. - */ -class ACE_Export ACE_DEV : public ACE_IO_SAP -{ -public: - /// Close down the DEVICE - int close (void); - - /// Dump the state of an object. - void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - - /** - * Disable signal @a signum - * This is here to prevent Win32 from - * disabling SPIPE using socket calls - */ - int disable (int signum) const ; - -protected: - /// Ensure that this class is an abstract base class - ACE_DEV (void); -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/DEV.inl" -#endif /* __ACE_INLINE__ */ - -#include /**/ "ace/post.h" -#endif /* ACE_DEV_H */ diff --git a/modules/worldengine/deps/acelite/ace/DEV.inl b/modules/worldengine/deps/acelite/ace/DEV.inl deleted file mode 100644 index ee0bb78389..0000000000 --- a/modules/worldengine/deps/acelite/ace/DEV.inl +++ /dev/null @@ -1,15 +0,0 @@ -// -*- C++ -*- -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_INLINE int -ACE_DEV::disable (int signum) const -{ -#if defined (ACE_WIN32) - ACE_UNUSED_ARG (signum) ; - return 0 ; -#else /* ACE_WIN32 */ - return ACE_IO_SAP::disable (signum) ; -#endif /* ACE_WIN32 */ -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/DEV_Addr.cpp b/modules/worldengine/deps/acelite/ace/DEV_Addr.cpp deleted file mode 100644 index 6ff76ca946..0000000000 --- a/modules/worldengine/deps/acelite/ace/DEV_Addr.cpp +++ /dev/null @@ -1,102 +0,0 @@ -#include "ace/DEV_Addr.h" -#if !defined (__ACE_INLINE__) -#include "ace/DEV_Addr.inl" -#endif /* __ACE_INLINE__ */ - -#include "ace/Log_Category.h" -#include "ace/OS_NS_string.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_ALLOC_HOOK_DEFINE(ACE_DEV_Addr) - -// Transform the current address into string format. - -int -ACE_DEV_Addr::addr_to_string (ACE_TCHAR *s, size_t len) const -{ - ACE_TRACE ("ACE_DEV_Addr::addr_to_string"); - - ACE_OS::strsncpy (s, this->devname_, len); - return 0; -} - -// Return a pointer to the address. - -void * -ACE_DEV_Addr::get_addr (void) const -{ - ACE_TRACE ("ACE_DEV_Addr::get_addr"); - - return (void *) &this->devname_; -} - -void -ACE_DEV_Addr::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_DEV_Addr::dump"); - - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("devname_ = %s"), this->devname_)); - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} - -// Do nothing constructor. - -ACE_DEV_Addr::ACE_DEV_Addr (void) - : ACE_Addr (AF_DEV, sizeof this->devname_) -{ - ACE_TRACE ("ACE_DEV_Addr::ACE_DEV_Addr"); - - (void) ACE_OS::memset ((void *) &this->devname_, - 0, sizeof this->devname_); -} - -int -ACE_DEV_Addr::set (const ACE_DEV_Addr &sa) -{ - this->base_set (sa.get_type (), sa.get_size ()); - - if (sa.get_type () == AF_ANY) - (void) ACE_OS::memset ((void *) &this->devname_, - 0, - sizeof this->devname_); - else - (void) ACE_OS::strsncpy (this->devname_, - sa.devname_, - ACE_DEV_Addr::DEVNAME_LENGTH); - return 0; -} - -// Copy constructor. - -ACE_DEV_Addr::ACE_DEV_Addr (const ACE_DEV_Addr &sa) - : ACE_Addr (AF_DEV, sizeof this->devname_) -{ - ACE_TRACE ("ACE_DEV_Addr::ACE_DEV_Addr"); - - this->set (sa); -} - -ACE_DEV_Addr::ACE_DEV_Addr (const ACE_TCHAR *devname) - : ACE_Addr (AF_DEV, sizeof this->devname_) -{ - ACE_TRACE ("ACE_DEV_Addr::ACE_DEV_Addr"); - - this->set (devname); -} - -ACE_DEV_Addr & -ACE_DEV_Addr::operator= (const ACE_DEV_Addr &sa) -{ - ACE_TRACE ("ACE_DEV_Addr::operator="); - - if (this != &sa) - this->set (sa); - - return *this; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/DEV_Addr.h b/modules/worldengine/deps/acelite/ace/DEV_Addr.h deleted file mode 100644 index 3bbbad057c..0000000000 --- a/modules/worldengine/deps/acelite/ace/DEV_Addr.h +++ /dev/null @@ -1,88 +0,0 @@ -// -*- C++ -*- - -//========================================================================== -/** - * @file DEV_Addr.h - * - * @author Gerhard Lenzer and Douglas C. Schmidt - */ -//========================================================================== - -#ifndef ACE_DEV_ADDR_H -#define ACE_DEV_ADDR_H - -#include /**/ "ace/pre.h" - -#include "ace/Addr.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/os_include/os_dirent.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_DEV_Addr - * - * @brief Defines device address family address format. - */ -class ACE_Export ACE_DEV_Addr : public ACE_Addr -{ -public: - // = Initialization methods. - /// Default constructor. - ACE_DEV_Addr (void); - - /// Copy constructor. - ACE_DEV_Addr (const ACE_DEV_Addr &sa); - - /// Acts like a copy constructor. - int set (const ACE_DEV_Addr &sa); - - /// Create a ACE_DEV_Addr from a device name. - explicit ACE_DEV_Addr (const ACE_TCHAR *devname); - - /// Create a ACE_Addr from a ACE_DEV pathname. - void set (const ACE_TCHAR *devname); - - /// Assignment operator. - ACE_DEV_Addr &operator= (const ACE_DEV_Addr &); - - /// Return a pointer to the address. - virtual void *get_addr (void) const; - - /// Transform the current address into string format. - virtual int addr_to_string (ACE_TCHAR *addr, size_t) const; - - /// Compare two addresses for equality. - bool operator == (const ACE_DEV_Addr &SAP) const; - - /// Compare two addresses for inequality. - bool operator != (const ACE_DEV_Addr &SAP) const; - - /// Return the path name used for the rendezvous point. - const ACE_TCHAR *get_path_name (void) const; - - /// Dump the state of an object. - void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - -private: - enum { DEVNAME_LENGTH = MAXPATHLEN + 1 }; - /// Name of the device. - ACE_TCHAR devname_[DEVNAME_LENGTH]; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/DEV_Addr.inl" -#endif /* __ACE_INLINE__ */ - -#include /**/ "ace/post.h" - -#endif /* ACE_DEV_ADDR_H */ diff --git a/modules/worldengine/deps/acelite/ace/DEV_Addr.inl b/modules/worldengine/deps/acelite/ace/DEV_Addr.inl deleted file mode 100644 index 3025745f2c..0000000000 --- a/modules/worldengine/deps/acelite/ace/DEV_Addr.inl +++ /dev/null @@ -1,48 +0,0 @@ -// -*- C++ -*- -#include "ace/OS_NS_string.h" -#include "ace/Global_Macros.h" -#include "ace/os_include/sys/os_socket.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_INLINE void -ACE_DEV_Addr::set (const ACE_TCHAR *devname) -{ - ACE_TRACE ("ACE_DEV_Addr::set"); - - this->ACE_Addr::base_set - (AF_DEV, static_cast (ACE_OS::strlen (devname))); - ACE_OS::strsncpy (this->devname_, devname, ACE_DEV_Addr::DEVNAME_LENGTH); -} - -// Compare two addresses for equality. - -ACE_INLINE bool -ACE_DEV_Addr::operator == (const ACE_DEV_Addr &sap) const -{ - ACE_TRACE ("ACE_DEV_Addr::operator =="); - - return ACE_OS::strcmp (this->devname_, sap.devname_) == 0; -} - -// Compare two addresses for inequality. - -ACE_INLINE bool -ACE_DEV_Addr::operator != (const ACE_DEV_Addr &sap) const -{ - ACE_TRACE ("ACE_DEV_Addr::operator !="); - - return !((*this) == sap); // This is lazy, of course... ;-). -} - -// Return the path name used for the rendezvous point. - -ACE_INLINE const ACE_TCHAR * -ACE_DEV_Addr::get_path_name (void) const -{ - ACE_TRACE ("ACE_DEV_Addr::get_path_name"); - - return this->devname_; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/DEV_Connector.cpp b/modules/worldengine/deps/acelite/ace/DEV_Connector.cpp deleted file mode 100644 index c07e8b2661..0000000000 --- a/modules/worldengine/deps/acelite/ace/DEV_Connector.cpp +++ /dev/null @@ -1,45 +0,0 @@ -#include "ace/DEV_Connector.h" - -#include "ace/Handle_Ops.h" - -#if !defined (__ACE_INLINE__) -#include "ace/DEV_Connector.inl" -#endif /* __ACE_INLINE__ */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_ALLOC_HOOK_DEFINE(ACE_DEV_Connector) - -void -ACE_DEV_Connector::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_DEV_Connector::dump"); -#endif /* ACE_HAS_DUMP */ -} - -ACE_DEV_Connector::ACE_DEV_Connector (void) -{ - ACE_TRACE ("ACE_DEV_Connector::ACE_DEV_Connector"); -} - -int -ACE_DEV_Connector::connect (ACE_DEV_IO &new_io, - const ACE_DEV_Addr &remote_sap, - ACE_Time_Value *timeout, - const ACE_Addr &, - int, - int flags, - int perms) -{ - ACE_TRACE ("ACE_DEV_Connector::connect"); - - ACE_HANDLE handle = ACE::handle_timed_open (timeout, - remote_sap.get_path_name (), - flags, perms); - new_io.set_handle (handle); - new_io.addr_ = remote_sap; // class copy. - return handle == ACE_INVALID_HANDLE ? -1 : 0; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/DEV_Connector.h b/modules/worldengine/deps/acelite/ace/DEV_Connector.h deleted file mode 100644 index 1dbdf08414..0000000000 --- a/modules/worldengine/deps/acelite/ace/DEV_Connector.h +++ /dev/null @@ -1,108 +0,0 @@ -/* -*- C++ -*- */ - -//============================================================================= -/** - * @file DEV_Connector.h - * - * @author Gerhard Lenzer and Douglas C. Schmidt - */ -//============================================================================= - -#ifndef ACE_DEV_CONNECTOR_H -#define ACE_DEV_CONNECTOR_H -#include /**/ "ace/pre.h" - -#include "ace/DEV_IO.h" -#include "ace/Log_Category.h" -#include "ace/os_include/os_fcntl.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_DEV_Connector - * - * @brief Defines an active connection factory for the ACE_DEV wrappers. - */ -class ACE_Export ACE_DEV_Connector -{ -public: - /// Default constructor. - ACE_DEV_Connector (void); - - /** - * Actively connect and produce a @a new_io if things go well. - * The @a remote_sap is the address that we are trying to connect - * with. The @a timeout is the amount of time to wait to connect. - * If it's 0 then we block indefinitely. If *timeout == {0, 0} then - * the connection is done using non-blocking mode. In this case, if - * the connection can't be made immediately the value of -1 is - * returned with @c errno == EWOULDBLOCK. If *timeout > {0, 0} then - * this is the maximum amount of time to wait before timing out. If the - * time expires before the connection is made @c errno == ETIME. The - * @a local_sap is the value of local address to bind to. If it's - * the default value of ACE_Addr::sap_any then the user is letting - * the OS do the binding. If @a reuse_addr == 1 then the - * is reused, even if it hasn't been cleanedup yet. - * The @a flags and @a perms arguments are passed down to the - * method. - */ - ACE_DEV_Connector (ACE_DEV_IO &new_io, - const ACE_DEV_Addr &remote_sap, - ACE_Time_Value *timeout = 0, - const ACE_Addr &local_sap = ACE_Addr::sap_any, - int reuse_addr = 0, - int flags = O_RDWR, - int perms = 0); - - /** - * Actively connect and produce a @a new_io if things go well. - * The @a remote_sap is the address that we are trying to connect - * with. The @a timeout is the amount of time to wait to connect. - * If it's 0 then we block indefinitely. If *timeout == {0, 0} then - * the connection is done using non-blocking mode. In this case, if - * the connection can't be made immediately the value of -1 is - * returned with @c errno == EWOULDBLOCK. If *timeout > {0, 0} then - * this is the maximum amount of time to wait before timing out. If the - * time expires before the connection is made @c errno == ETIME. The - * @a local_sap is the value of local address to bind to. If it's - * the default value of ACE_Addr::sap_any then the user is letting - * the OS do the binding. If @a reuse_addr == 1 then the - * is reused, even if it hasn't been cleanedup yet. - * The @a flags and @a perms arguments are passed down to the - * method. - */ - int connect (ACE_DEV_IO &new_io, - const ACE_DEV_Addr &remote_sap, - ACE_Time_Value *timeout = 0, - const ACE_Addr &local_sap = ACE_Addr::sap_any, - int reuse_addr = 0, - int flags = O_RDWR, - int perms = 0); - - /// Resets any event associations on this handle - bool reset_new_handle (ACE_HANDLE handle); - - /// Dump the state of an object. - void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - - // = Meta-type info - typedef ACE_DEV_Addr PEER_ADDR; - typedef ACE_DEV_IO PEER_STREAM; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/DEV_Connector.inl" -#endif /* __ACE_INLINE__ */ - -#include /**/ "ace/post.h" -#endif /* ACE_DEV_CONNECTOR_H */ diff --git a/modules/worldengine/deps/acelite/ace/DEV_Connector.inl b/modules/worldengine/deps/acelite/ace/DEV_Connector.inl deleted file mode 100644 index b92b4d2a5a..0000000000 --- a/modules/worldengine/deps/acelite/ace/DEV_Connector.inl +++ /dev/null @@ -1,30 +0,0 @@ -// -*- C++ -*- -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -// Creates a Local ACE_DEV. - -ACE_INLINE -ACE_DEV_Connector::ACE_DEV_Connector (ACE_DEV_IO &new_io, - const ACE_DEV_Addr &remote_sap, - ACE_Time_Value *timeout, - const ACE_Addr &local_sap, - int reuse_addr, - int flags, - int perms) -{ - ACE_TRACE ("ACE_DEV_Connector::ACE_DEV_Connector"); - if (this->connect (new_io, remote_sap, timeout, local_sap, - reuse_addr, flags, perms) == ACE_IO_SAP::INVALID_HANDLE - && timeout != 0 && !(errno == EWOULDBLOCK || errno == ETIME)) - ACELIB_ERROR ((LM_ERROR, ACE_TEXT ("address %s, %p\n"), - remote_sap.get_path_name (), ACE_TEXT ("ACE_DEV_IO"))); -} - -ACE_INLINE bool -ACE_DEV_Connector::reset_new_handle (ACE_HANDLE) -{ - // Nothing to do here since the handle is not a socket - return false; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/DEV_IO.cpp b/modules/worldengine/deps/acelite/ace/DEV_IO.cpp deleted file mode 100644 index bc619e27f3..0000000000 --- a/modules/worldengine/deps/acelite/ace/DEV_IO.cpp +++ /dev/null @@ -1,129 +0,0 @@ -#include "ace/DEV_IO.h" -#include "ace/Log_Category.h" - -#if !defined (__ACE_INLINE__) -#include "ace/DEV_IO.inl" -#endif /* __ACE_INLINE__ */ - - - - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_ALLOC_HOOK_DEFINE(ACE_DEV_IO) - -// Return the local endpoint address. - -int -ACE_DEV_IO::get_local_addr (ACE_DEV_Addr &addr) const -{ - ACE_TRACE ("ACE_DEV_IO::get_local_addr"); - - addr = this->addr_; - return 0; -} - -// Return the address of the remotely connected peer (if there is -// one). - -int -ACE_DEV_IO::get_remote_addr (ACE_DEV_Addr &addr) const -{ - ACE_TRACE ("ACE_DEV_IO::get_remote_addr"); - addr = this->addr_; - return 0; -} - -void -ACE_DEV_IO::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_DEV_IO::dump"); - - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - this->addr_.dump (); - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} - -// Simple-minded do nothing constructor. - -ACE_DEV_IO::ACE_DEV_IO (void) -{ - ACE_TRACE ("ACE_DEV_IO::ACE_DEV_IO"); -} - -// Send N char *ptrs and int lengths. Note that the char *'s precede -// the ints (basically, an varargs version of writev). The count N is -// the *total* number of trailing arguments, *not* a couple of the -// number of tuple pairs! - -ssize_t -ACE_DEV_IO::send (size_t n, ...) const -{ - ACE_TRACE ("ACE_DEV_IO::send"); - va_list argp; - int total_tuples = static_cast (n / 2); - iovec *iovp; -#if defined (ACE_HAS_ALLOCA) - iovp = (iovec *) alloca (total_tuples * sizeof (iovec)); -#else - ACE_NEW_RETURN (iovp, - iovec[total_tuples], - -1); -#endif /* !defined (ACE_HAS_ALLOCA) */ - - va_start (argp, n); - - for (int i = 0; i < total_tuples; i++) - { - iovp[i].iov_base = va_arg (argp, char *); - iovp[i].iov_len = va_arg (argp, int); - } - - ssize_t result = ACE_OS::writev (this->get_handle (), iovp, total_tuples); -#if !defined (ACE_HAS_ALLOCA) - delete [] iovp; -#endif /* !defined (ACE_HAS_ALLOCA) */ - va_end (argp); - return result; -} - -// This is basically an interface to ACE_OS::readv, that doesn't use the -// struct iovec explicitly. The ... can be passed as an arbitrary -// number of (char *ptr, int len) tuples. However, the count N is the -// *total* number of trailing arguments, *not* a couple of the number -// of tuple pairs! - -ssize_t -ACE_DEV_IO::recv (size_t n, ...) const -{ - ACE_TRACE ("ACE_DEV_IO::recv"); - va_list argp; - int total_tuples = static_cast (n / 2); - iovec *iovp; -#if defined (ACE_HAS_ALLOCA) - iovp = (iovec *) alloca (total_tuples * sizeof (iovec)); -#else - ACE_NEW_RETURN (iovp, - iovec[total_tuples], - -1); -#endif /* !defined (ACE_HAS_ALLOCA) */ - - va_start (argp, n); - - for (int i = 0; i < total_tuples; i++) - { - iovp[i].iov_base = va_arg (argp, char *); - iovp[i].iov_len = va_arg (argp, int); - } - - ssize_t result = ACE_OS::readv (this->get_handle (), iovp, total_tuples); -#if !defined (ACE_HAS_ALLOCA) - delete [] iovp; -#endif /* !defined (ACE_HAS_ALLOCA) */ - va_end (argp); - return result; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/DEV_IO.h b/modules/worldengine/deps/acelite/ace/DEV_IO.h deleted file mode 100644 index 9a97c011f5..0000000000 --- a/modules/worldengine/deps/acelite/ace/DEV_IO.h +++ /dev/null @@ -1,183 +0,0 @@ -/* -*- C++ -*- */ - -//============================================================================= -/** - * @file DEV_IO.h - * - * @author Gerhard Lenzer - * @author Douglas C. Schmidt - */ -//============================================================================= - -#ifndef ACE_DEV_IO_H -#define ACE_DEV_IO_H -#include /**/ "ace/pre.h" - -#include "ace/DEV.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#if defined (ACE_HAS_STREAM_PIPES) -# include "ace/OS_NS_stropts.h" -#endif /* ACE_HAS_STREAM_PIPES */ - -#include "ace/os_include/os_stdio.h" -#include "ace/os_include/sys/os_uio.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -class ACE_Time_Value; - -/** - * @class ACE_DEV_IO - * - * @brief Read/Write operations on Devices. - */ -class ACE_Export ACE_DEV_IO : public ACE_DEV -{ -public: - friend class ACE_DEV_Connector; - - /// Default constructor. - ACE_DEV_IO (void); - - // = Various send operations. - /// send upto @a n bytes in @a buf. - ssize_t send (const void *buf, size_t n) const; - - /// Recv upto @a n bytes in @a buf. - ssize_t recv (void *buf, size_t n) const; - - /// Send n bytes, keep trying until n are sent. - ssize_t send_n (const void *buf, - size_t n) const; - - /** - * @name I/O operations - * - * Notes on common parameters: - * - * @a buf is the buffer to write from or receive into. - * - * @a len is the number of bytes to transfer. - * - * The @a timeout parameter in the following methods indicates how - * long to blocking trying to transfer data. If @a timeout == 0, - * then the call behaves as a normal send/recv call, i.e., for - * blocking sockets, the call will block until action is possible; - * for non-blocking sockets, EWOULDBLOCK will be returned if no - * action is immediately possible. - * - * If @a timeout != 0, the call will wait until the relative time - * specified in *@a timeout elapses. - * - * The "_n()" I/O methods keep looping until all the data has been - * transferred. These methods also work for sockets in non-blocking - * mode i.e., they keep looping on EWOULDBLOCK. @a timeout is used - * to make sure we keep making progress, i.e., the same timeout - * value is used for every I/O operation in the loop and the timeout - * is not counted down. - * - * The return values for the "*_n()" methods match the return values - * from the non "_n()" methods and are specified as follows: - * - * - On complete transfer, the number of bytes transferred is returned. - * - On timeout, -1 is returned, errno == ETIME. - * - On error, -1 is returned, errno is set to appropriate error. - * - On EOF, 0 is returned, errno is irrelevant. - * - * On partial transfers, i.e., if any data is transferred before - * timeout/error/EOF, @a bytes_transferred will contain the number of - * bytes transferred. - */ - ssize_t recv_n (void *buf, - size_t n, - const ACE_Time_Value *timeout = 0, - size_t *bytes_transferred = 0) const; - -#if defined (ACE_HAS_STREAM_PIPES) - /// Recv bytes via STREAM pipes using "band" mode. - ssize_t recv (ACE_Str_Buf *cntl, - ACE_Str_Buf *data, - int *band, - int *flags) const; - - /// Send bytes via STREAM pipes using "band" mode. - ssize_t send (const ACE_Str_Buf *cntl, - const ACE_Str_Buf *data, - int band, - int flags) const; - - /// Recv @a cntl and @a data via STREAM pipes. - ssize_t recv (ACE_Str_Buf *cntl, - ACE_Str_Buf *data, - int *flags) const; - - /// Send @a cntl and @a data via STREAM pipes. - ssize_t send (const ACE_Str_Buf *cntl, - const ACE_Str_Buf *data, - int flags = 0) const; -#endif /* ACE_HAS_STREAM_PIPES */ - - /// Send iovecs via <::writev>. - ssize_t send (const iovec iov[], size_t n) const; - - /// Recv iovecs via <::readv>. - ssize_t recv (iovec iov[], size_t n) const; - - /** - * Send N char *ptrs and int lengths. Note that the char *'s - * precede the ints (basically, an varargs version of writev). The - * count N is the *total* number of trailing arguments, *not* a - * couple of the number of tuple pairs! - */ - ssize_t send (size_t n, ...) const; - - /** - * This is an interface to ::readv, that doesn't use the struct - * iovec explicitly. The ... can be passed as an arbitrary number - * of (char *ptr, int len) tuples. However, the count N is the - * *total* number of trailing arguments, *not* a couple of the - * number of tuple pairs! - */ - ssize_t recv (size_t n, ...) const; - - /// Send @a n bytes via Win32 WriteFile using overlapped I/O. - ssize_t send (const void *buf, size_t n, ACE_OVERLAPPED *overlapped) const; - - /// Recv @a n bytes via Win32 ReadFile using overlapped I/O. - ssize_t recv (void *buf, size_t n, ACE_OVERLAPPED *overlapped) const; - - /// Dump the state of an object. - void dump (void) const; - - // = The following two methods are no-ops to keep the - // ACE_Connector happy. - /// Return the local endpoint address. - int get_local_addr (ACE_DEV_Addr &) const; - - /// Return the address of the remotely connected peer (if there is - /// one). - int get_remote_addr (ACE_DEV_Addr &) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - - // = Meta-type info - typedef ACE_DEV_Addr PEER_ADDR; - -private: - /// Address of device we are connected to. - ACE_DEV_Addr addr_; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/DEV_IO.inl" -#endif /* __ACE_INLINE__ */ - -#include /**/ "ace/post.h" -#endif /* ACE_DEV_IO_H */ diff --git a/modules/worldengine/deps/acelite/ace/DEV_IO.inl b/modules/worldengine/deps/acelite/ace/DEV_IO.inl deleted file mode 100644 index 45e4a09707..0000000000 --- a/modules/worldengine/deps/acelite/ace/DEV_IO.inl +++ /dev/null @@ -1,123 +0,0 @@ -// -*- C++ -*- -#include "ace/OS_NS_sys_uio.h" -#include "ace/OS_NS_unistd.h" -#include "ace/OS_Memory.h" - -#include "ace/ACE.h" - -// Send exactly N bytes from BUF to this device. Keeping trying until -// this many bytes are sent. - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_INLINE ssize_t -ACE_DEV_IO::send_n (const void *buf, size_t n) const -{ - ACE_TRACE ("ACE_DEV_IO::send_n"); - return ACE::write_n (this->get_handle (), buf, n); -} - -// Receive exactly N bytes from this file into BUF. Keep trying until -// this many bytes are received. - -ACE_INLINE ssize_t -ACE_DEV_IO::recv_n (void *buf, - size_t n, - const ACE_Time_Value *timeout, - size_t *bytes_transferred) const -{ - ACE_TRACE ("ACE_DEV_IO::recv_n"); -#if defined (ACE_WIN32) - ACE_UNUSED_ARG (timeout); - - return ACE::read_n (this->get_handle (), - buf, - n, - bytes_transferred); -#else - return ACE::recv_n (this->get_handle (), - buf, - n, - timeout, - bytes_transferred); -#endif /*ACE_WIN32*/ -} - -ACE_INLINE ssize_t -ACE_DEV_IO::send (const void *buf, size_t n) const -{ - ACE_TRACE ("ACE_DEV_IO::send"); - return ACE_OS::write (this->get_handle (), (const char *) buf, n); -} - -ACE_INLINE ssize_t -ACE_DEV_IO::recv (void *buf, size_t n) const -{ - ACE_TRACE ("ACE_DEV_IO::recv"); - return ACE_OS::read (this->get_handle (), (char *) buf, n); -} - -ACE_INLINE ssize_t -ACE_DEV_IO::send (const iovec iov[], size_t n) const -{ - ACE_TRACE ("ACE_DEV_IO::send"); - return ACE_OS::writev (this->get_handle (), iov, static_cast (n)); -} - -ACE_INLINE ssize_t -ACE_DEV_IO::recv (iovec iov[], size_t n) const -{ - ACE_TRACE ("ACE_DEV_IO::recv"); - return ACE_OS::readv (this->get_handle (), iov, static_cast (n)); -} - -ACE_INLINE ssize_t -ACE_DEV_IO::send (const void *buf, size_t n, - ACE_OVERLAPPED *overlapped) const -{ - ACE_TRACE ("ACE_DEV_IO::send"); - return ACE_OS::write (this->get_handle (), - (const char *) buf, n, - overlapped); -} - -ACE_INLINE ssize_t -ACE_DEV_IO::recv (void *buf, size_t n, - ACE_OVERLAPPED *overlapped) const -{ - ACE_TRACE ("ACE_DEV_IO::recv"); - return ACE_OS::read (this->get_handle (), (char *) buf, n, - overlapped); -} - -#if defined (ACE_HAS_STREAM_PIPES) -ACE_INLINE ssize_t -ACE_DEV_IO::recv (ACE_Str_Buf *cntl, ACE_Str_Buf *data, int *band, int *flags) const -{ - ACE_TRACE ("ACE_DEV_IO::recv"); - return ACE_OS::getpmsg (this->get_handle (), (strbuf *) cntl, (strbuf *) data, band, flags); -} - -ACE_INLINE ssize_t -ACE_DEV_IO::send (const ACE_Str_Buf *cntl, const ACE_Str_Buf *data, int band, int flags) const -{ - ACE_TRACE ("ACE_DEV_IO::send"); - return ACE_OS::putpmsg (this->get_handle (), (strbuf *) cntl, (strbuf *) data, band, flags); -} - -ACE_INLINE ssize_t -ACE_DEV_IO::recv (ACE_Str_Buf *cntl, ACE_Str_Buf *data, int *flags) const -{ - ACE_TRACE ("ACE_DEV_IO::recv"); - return ACE_OS::getmsg (this->get_handle (), (strbuf *) cntl, (strbuf *) data, flags); -} - -ACE_INLINE ssize_t -ACE_DEV_IO::send (const ACE_Str_Buf *cntl, const ACE_Str_Buf *data, int flags) const -{ - ACE_TRACE ("ACE_DEV_IO::send"); - return ACE_OS::putmsg (this->get_handle (), (strbuf *) cntl, (strbuf *) data, flags); -} -#endif /* ACE_HAS_STREAM_PIPES */ - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/DLL.cpp b/modules/worldengine/deps/acelite/ace/DLL.cpp deleted file mode 100644 index 24987005c6..0000000000 --- a/modules/worldengine/deps/acelite/ace/DLL.cpp +++ /dev/null @@ -1,279 +0,0 @@ -#include "ace/DLL.h" - -#include "ace/Log_Category.h" -#include "ace/ACE.h" -#include "ace/DLL_Manager.h" -#include "ace/OS_NS_string.h" -#include "ace/OS_NS_dlfcn.h" -#include "ace/OS_NS_Thread.h" - -#include - - - - ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -// Default constructor. Also, by default, the object will be closed -// before it is destroyed. - -ACE_DLL::ACE_DLL (bool close_handle_on_destruction) - : open_mode_ (0), - dll_name_ (0), - close_handle_on_destruction_ (close_handle_on_destruction), - dll_handle_ (0), - error_ (0) -{ - ACE_TRACE ("ACE_DLL::ACE_DLL (int)"); -} - -ACE_DLL::ACE_DLL (const ACE_DLL &rhs) - : open_mode_ (0), - dll_name_ (0), - close_handle_on_destruction_ (false), - dll_handle_ (0), - error_ (0) -{ - ACE_TRACE ("ACE_DLL::ACE_DLL (const ACE_DLL &)"); - - if (rhs.dll_name_ - // This will automatically up the refcount. - && this->open (rhs.dll_name_, - rhs.open_mode_, - rhs.close_handle_on_destruction_) != 0 - && ACE::debug ()) - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("ACE_DLL::copy_ctor: error: %s\n"), - this->error ())); -} - -// Assignment operator - -ACE_DLL & -ACE_DLL::operator= (const ACE_DLL &rhs) -{ - ACE_TRACE ("ACE_DLL::operator= (const ACE_DLL &)"); - - ACE_DLL tmp (rhs); - - std::swap (this->open_mode_, tmp.open_mode_); - std::swap (this->dll_name_, tmp.dll_name_); - std::swap (this->close_handle_on_destruction_, - tmp.close_handle_on_destruction_); - std::swap (this->dll_handle_, tmp.dll_handle_); - std::swap (this->error_, tmp.error_); - - return *this; -} - - -// If the library name and the opening mode are specified than on -// object creation the library is implicitly opened. - -ACE_DLL::ACE_DLL (const ACE_TCHAR *dll_name, - int open_mode, - bool close_handle_on_destruction) - : open_mode_ (open_mode), - dll_name_ (0), - close_handle_on_destruction_ (close_handle_on_destruction), - dll_handle_ (0), - error_ (0) -{ - ACE_TRACE ("ACE_DLL::ACE_DLL"); - - if (this->open (dll_name, this->open_mode_, close_handle_on_destruction) != 0 - && ACE::debug ()) - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("ACE_DLL::open: error calling open: %s\n"), - this->error ())); -} - -// The library is closed before the class gets destroyed depending on -// the close_handle_on_destruction value specified which is stored in -// close_handle_on_destruction_. - -ACE_DLL::~ACE_DLL (void) -{ - ACE_TRACE ("ACE_DLL::~ACE_DLL"); - - this->close (); - - // Normally delete()d in ACE_DLL::close(). However, that may not - // occur if full ACE_DLL initialization is interrupted due to errors - // (e.g. attempting to open a DSO/DLL that does not exist). Make - // sure this->dll_name_ is deallocated. - delete [] this->dll_name_; -} - -// This method opens the library based on the mode specified using the -// ACE_SHLIB_HANDLE which is obtained on making the ACE_OS::dlopen call. -// The default mode is: -// RTLD_LAZY Only references to data symbols are relocate when the -// object is first loaded. -// The other modes include: -// RTLD_NOW All necessary relocations are performed when the -// object is first loaded. -// RTLD_GLOBAL The object symbols are made available for the -// relocation processing of any other object. - -int -ACE_DLL::open (const ACE_TCHAR *dll_filename, - int open_mode, - bool close_handle_on_destruction) -{ - ACE_TRACE ("ACE_DLL::open"); - - return open_i (dll_filename, open_mode, close_handle_on_destruction); -} - -int -ACE_DLL::open_i (const ACE_TCHAR *dll_filename, - int open_mode, - bool close_handle_on_destruction, - ACE_SHLIB_HANDLE handle) -{ - ACE_TRACE ("ACE_DLL::open_i"); - - this->error_ = 0; - this->errmsg_.clear (true); - - if (!dll_filename) - { - if (ACE::debug ()) - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("ACE_DLL::open_i: dll_name is %s\n"), - this->dll_name_ == 0 ? ACE_TEXT ("(null)") - : this->dll_name_)); - return -1; - } - - if (this->dll_handle_) - { - // If we have a good handle and its the same name, just return. - if (ACE_OS::strcmp (this->dll_name_, dll_filename) == 0) - return 0; - else - this->close (); - } - - if (!this->dll_name_) - this->dll_name_ = ACE::strnew (dll_filename); - - this->open_mode_ = open_mode; - this->close_handle_on_destruction_ = close_handle_on_destruction; - - ACE_DLL_Handle::ERROR_STACK errors; - this->dll_handle_ = ACE_DLL_Manager::instance()->open_dll (this->dll_name_, - this->open_mode_, - handle, - &errors); - - if (!this->dll_handle_) - { - ACE_TString errtmp; - while (!errors.is_empty ()) - { - errors.pop (errtmp); - if (this->errmsg_.length () > 0) - this->errmsg_ += ACE_TEXT ("\n"); - this->errmsg_ += errtmp; - } - this->error_ = 1; - } - - return this->error_ ? -1 : 0; -} - -// The symbol refernce of the name specified is obtained. - -void * -ACE_DLL::symbol (const ACE_TCHAR *sym_name, int ignore_errors) -{ - ACE_TRACE ("ACE_DLL::symbol"); - - this->error_ = 0; - this->errmsg_.clear (true); - - void *sym = 0; - if (this->dll_handle_) - sym = this->dll_handle_->symbol (sym_name, ignore_errors, this->errmsg_); - - if (!sym) - this->error_ = 1; - - return sym; -} - -// The library is closed using the ACE_SHLIB_HANDLE object, i.e., the -// shared object is now disassociated form the current process. - -int -ACE_DLL::close (void) -{ - ACE_TRACE ("ACE_DLL::close"); - - int retval = 0; - - if (this->dll_handle_ - && this->close_handle_on_destruction_ - && this->dll_name_ - && (retval = ACE_DLL_Manager::instance ()->close_dll (this->dll_name_)) != 0) - this->error_ = 1; - - // Even if close_dll() failed, go ahead and cleanup. - this->dll_handle_ = 0; - delete [] this->dll_name_; - this->dll_name_ = 0; - this->close_handle_on_destruction_ = false; - - return retval; -} - -// This method is used return the last error of a library operation. - -ACE_TCHAR * -ACE_DLL::error (void) const -{ - ACE_TRACE ("ACE_DLL::error"); - if (this->error_) - { - return const_cast (this->errmsg_.c_str ()); - } - - return 0; -} - -// Return the handle to the user either temporarily or forever, thus -// orphaning it. If 0 means the user wants the handle forever and if 1 -// means the user temporarily wants to take the handle. - -ACE_SHLIB_HANDLE -ACE_DLL::get_handle (bool become_owner) const -{ - ACE_TRACE ("ACE_DLL::get_handle"); - - ACE_SHLIB_HANDLE handle = ACE_SHLIB_INVALID_HANDLE; - - if (this->dll_handle_) - handle = this->dll_handle_->get_handle (become_owner); - - return handle; -} - -// Set the handle for the DLL. By default, the object will be closed -// before it is destroyed. - -int -ACE_DLL::set_handle (ACE_SHLIB_HANDLE handle, - bool close_handle_on_destruction) -{ - ACE_TRACE ("ACE_DLL::set_handle"); - - // Create a unique name. Note that this name is only quaranteed - // to be unique for the life of this object. - ACE_TCHAR temp[ACE_UNIQUE_NAME_LEN]; - ACE_OS::unique_name (this, temp, ACE_UNIQUE_NAME_LEN); - - return this->open_i (temp, 1, close_handle_on_destruction, handle); -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/DLL.h b/modules/worldengine/deps/acelite/ace/DLL.h deleted file mode 100644 index 57d0f92541..0000000000 --- a/modules/worldengine/deps/acelite/ace/DLL.h +++ /dev/null @@ -1,210 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file DLL.h - * - * @author Kirthika Parameswaran - */ -//============================================================================= - -#ifndef ACE_DLL_H -#define ACE_DLL_H -#include /**/ "ace/pre.h" - -#include /**/ "ace/ACE_export.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Global_Macros.h" -#include "ace/os_include/os_dlfcn.h" -#include "ace/SString.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -class ACE_DLL_Handle; - -/** - * @class ACE_DLL - * - * @brief Provides an abstract interface for handling various DLL - * operations. - * - * This class is a wrapper over the various methods for utilizing - * a dynamically linked library (DLL), which is called a shared - * library on some platforms. Operations @c open(), @c close(), and - * @c symbol() have been implemented to help opening/closing and - * extracting symbol information from a DLL, respectively. - */ -class ACE_Export ACE_DLL -{ -public: - // = Initialization and termination methods. - - /** - * Default constructor. By default, the close() operation on the - * object will be invoked before it is destroyed. - * @param close_handle_on_destruction Indicates whether or not the - * close() method will be called to close an open DLL when this - * object is destroyed. By default, close() will be called. - * Set this parameter to false for situations where the DLL's lifetime - * is controlled in a scope other than that of this ACE_DLL object. - * For example, termination by ACE_DLL_Manager via ACE::fini(). - */ - explicit ACE_DLL (bool close_handle_on_destruction = true); - - /// Allow assignment - ACE_DLL& operator= (const ACE_DLL &rhs); - - - /** - * This constructor performs the actions of open() during construction. - * @param dll_name The name or path of the DLL to load. - * @param open_mode Flags to alter the actions taken when loading the DLL. - * The possible values are: - * @li @c RTLD_LAZY (this the default): loads identifier symbols but - * not the symbols for functions, which are loaded dynamically - * on-demand. - * @li @c RTLD_NOW: performs all necessary relocations when - * @a dll_name is first loaded - * @li RTLD_GLOBAL: makes symbols available for relocation - * processing of any other DLLs. - * @param close_handle_on_destruction Indicates whether or not the - * close() method will be called to close an open DLL when this - * object is destroyed. By default, close() will be called. - * Set this parameter to 0 for situations where the DLL's lifetime - * is controlled in a scope other than that of this ACE_DLL object. - * For example, termination by ACE_DLL_Manager via ACE::fini(). - */ - explicit ACE_DLL (const ACE_TCHAR *dll_name, - int open_mode = ACE_DEFAULT_SHLIB_MODE, - bool close_handle_on_destruction = true); - - /// Copy constructor. - ACE_DLL (const ACE_DLL &); - - /** - * This method opens and dynamically links a specified DLL. - * @param dll_name The filename or path of the DLL to load. ACE will - * attempt to apply the platform's standard library/DLL prefixes - * and suffixes, allowing a simple, unadorned name to be passed - * regardless of platform. The set of name transforms is listed - * below. A @i decorator is a platform's name designator for a debug - * vs release build. For example, on Windows it is usually "d". - * @li Prefix + name + decorator + suffix - * @li Prefix + name + suffix - * @li Name + decorator + suffix - * @li Name + suffix - * @li Name - * Note that the transforms with @i decorator will be avoided if - * ACE is built with the @c ACE_DISABLE_DEBUG_DLL_CHECK config macro. - * - * @Note There is another mode for locating library/DLL files that - * was used in old versions of ACE. The alternate method builds - * more combinations of pathname by combining the names transforms - * above with locations listed in the platform's standard "path" - * locations (e.g., @c LD_LIBRARY_PATH). It can be enabled by building - * ACE with the @c ACE_MUST_HELP_DLOPEN_SEARCH_PATH config macro. - * Use of this option is discouraged since it avoids the standard - * platform search options and security mechanisms. - * - * @param open_mode Flags to alter the actions taken when loading the DLL. - * The possible values are: - * @li @c RTLD_LAZY (this the default): loads identifier symbols but - * not the symbols for functions, which are loaded dynamically - * on demand. - * @li @c RTLD_NOW: performs all necessary relocations when - * @a dll_name is first loaded - * @li @c RTLD_GLOBAL: makes symbols available for relocation - * processing of any other DLLs. - * @param close_handle_on_destruction Indicates whether or not the - * close() method will be called to close an open DLL when this - * object is destroyed. By default, close() will be called. - * Set this parameter to 0 for situations where the DLL's lifetime - * is controlled in a scope other than that of this ACE_DLL object. - * For example, termination by ACE_DLL_Manager via ACE::fini(). - * @retval -1 On failure - * @retval 0 On success. - */ - int open (const ACE_TCHAR *dll_name, - int open_mode = ACE_DEFAULT_SHLIB_MODE, - bool close_handle_on_destruction = true); - - /// Call to close the DLL object. - int close (void); - - /** - * Called when the DLL object is destroyed -- invokes close() if the - * @a close_handle_on_destruction flag was set to non-zero in the - * constructor or open() method. - */ - ~ACE_DLL (void); - - /** - * Look up a named symbol in the DLL. DLL must be successfully opened - * before calling symbol(). - * @param symbol_name The symbol name to look up. - * @param ignore_errors If set to 1, allows you to probe a dll without - * generating error messages in the log. Handy for determining - * the capabilities of a library. - * @return Returns the value of @a symbol_name if it is a valid symbol - * in the DLL. Otherwise, returns 0. - */ - void *symbol (const ACE_TCHAR *symbol_name, int ignore_errors = 0); - - /// Returns a pointer to a string explaining that an error occured. You - /// will need to consult the error log for the actual error string - /// returned by the OS. - ACE_TCHAR *error (void) const; - - /** - * Return the handle to the caller. If @a become_owner is true then - * caller assumes ownership of the handle and the ACE_DLL object - * won't call close() when it goes out of scope, even if - * @c close_handle_on_destruction is set. - */ - ACE_SHLIB_HANDLE get_handle (bool become_owner = false) const; - - /// Set the handle for the DLL object. By default, the close() - /// operation on / the object will be invoked before it is destroyed. - int set_handle (ACE_SHLIB_HANDLE handle, - bool close_handle_on_destruction = true); - -private: - - int open_i (const ACE_TCHAR *dll_name, - int open_mode = ACE_DEFAULT_SHLIB_MODE, - bool close_handle_on_destruction = true, - ACE_SHLIB_HANDLE handle = 0); - - - //private: -public: - - /// Open mode. - int open_mode_; - - /// Keep track of the name of the loaded dll, so it can be used - /// to remove framework components, singletons that live in the dll, - /// prior to unloading the dll in the close() method. - ACE_TCHAR *dll_name_; - - /// This flag keeps track of whether we should close the handle - /// automatically when the object is destroyed. - bool close_handle_on_destruction_; - - ACE_DLL_Handle *dll_handle_; - - /// Flag to record if the last operation had an error. - bool error_; - - /// Any error messages encountered during last operation. - ACE_TString errmsg_; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#include /**/ "ace/post.h" -#endif /* ACE_DLL_H */ diff --git a/modules/worldengine/deps/acelite/ace/DLL_Manager.cpp b/modules/worldengine/deps/acelite/ace/DLL_Manager.cpp deleted file mode 100644 index 09f3e2f40b..0000000000 --- a/modules/worldengine/deps/acelite/ace/DLL_Manager.cpp +++ /dev/null @@ -1,833 +0,0 @@ -#include "ace/DLL_Manager.h" - -#include "ace/Log_Category.h" -#include "ace/ACE.h" -#include "ace/Framework_Component.h" - -#include "ace/Lib_Find.h" -#include "ace/Object_Manager.h" -#include "ace/SString.h" -#include "ace/Recursive_Thread_Mutex.h" -#include "ace/Guard_T.h" -#include "ace/OS_NS_dlfcn.h" -#include "ace/OS_NS_string.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -sig_atomic_t ACE_DLL_Handle::open_called_ = 0; - -ACE_DLL_Handle::ACE_DLL_Handle (void) - : refcount_ (0), - dll_name_ (0), - handle_ (ACE_SHLIB_INVALID_HANDLE) -{ - ACE_TRACE ("ACE_DLL_Handle::ACE_DLL_Handle"); -} - -ACE_DLL_Handle::~ACE_DLL_Handle (void) -{ - ACE_TRACE ("ACE_DLL_Handle::~ACE_DLL_Handle"); - this->close (1); - delete[] this->dll_name_; -} - -const ACE_TCHAR * -ACE_DLL_Handle::dll_name (void) const -{ - ACE_TRACE ("ACE_DLL_Handle::dll_name"); - return this->dll_name_; -} - -int -ACE_DLL_Handle::open (const ACE_TCHAR *dll_name, - int open_mode, - ACE_SHLIB_HANDLE handle, - ERROR_STACK *errors) -{ - ACE_TRACE ("ACE_DLL_Handle::open"); - ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, 0)); - - if (this->dll_name_) - { - // Once dll_name_ has been set, it can't be changed.. - if (ACE_OS::strcmp (this->dll_name_, dll_name) != 0) - { - if (ACE::debug ()) - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("ACE (%P|%t) DLL_Handle::open: error, ") - ACE_TEXT ("tried to reopen %s with name %s\n"), - this->dll_name_, - dll_name)); - - return -1; - } - } - else - this->dll_name_ = ACE::strnew (dll_name); - - if (!this->open_called_) - this->open_called_ = 1; - - // If it hasn't been loaded yet, go ahead and do that now. - if (this->handle_ == ACE_SHLIB_INVALID_HANDLE) - { - if (handle) - this->handle_ = handle; - else - { - /* - ** Get the set of names to try loading. We need to do this to - ** properly support the ability for a user to specify a simple, - ** unadorned name (for example, "ACE") that will work across - ** platforms. We apply platform specifics to get a name that will - ** work (e.g. libACE, ACEd.dll, ACE.dll, etc.) We rely on the - ** underlying dlopen() implementation to "Do The Right Thing" in - ** terms of using relative paths, LD_LIBRARY_PATH, system security - ** rules, etc. except when ACE_MUST_HELP_DLOPEN_SEARCH_PATH is set. - ** If it is set, then ACE::ldfind() scans the configured path - ** looking for a match on the name and prefix/suffix applications. - ** NOTE: having ACE scan for a file and then pass a fully-qualified - ** pathname to dlopen() is a potential security hole; therefore, - ** do not use ACE_MUST_HELP_DLOPEN_SEARCH_PATH unless necessary - ** and only after considering the risks. - */ - ACE_Array dll_names; - dll_names.max_size (10); // Decent guess to avoid realloc later - -#if defined (ACE_MUST_HELP_DLOPEN_SEARCH_PATH) - // Find out where the library is - ACE_TCHAR dll_pathname[MAXPATHLEN + 1]; - - // Transform the pathname into the appropriate dynamic link library - // by searching the ACE_LD_SEARCH_PATH. - ACE::ldfind (dll_name, - dll_pathname, - (sizeof dll_pathname / sizeof (ACE_TCHAR))); - ACE_TString dll_str (dll_pathname); - dll_names.size (1); - dll_names.set (dll_str, 0); -#else - this->get_dll_names (dll_name, dll_names); -#endif - - ACE_Array_Iterator name_iter (dll_names); - ACE_TString *name = 0; - while (name_iter.next (name)) - { - // The ACE_SHLIB_HANDLE object is obtained. - this->handle_ = ACE_OS::dlopen (name->c_str (), - open_mode); - - if (ACE::debug ()) - { - ACE_TString err; - ACELIB_DEBUG ((LM_DEBUG, - ACE_TEXT ("ACE (%P|%t) DLL_Handle::open ") - ACE_TEXT ("(\"%s\", 0x%x) -> %s: %s\n"), - name->c_str (), - open_mode, - ((this->handle_ != ACE_SHLIB_INVALID_HANDLE) - ? ACE_TEXT ("succeeded") - : ACE_TEXT ("failed")), - this->error (err).c_str())); - } - - if (this->handle_ != ACE_SHLIB_INVALID_HANDLE) // Good one? - break; - - // If errno is ENOENT we just skip over this one, - // anything else - like an undefined symbol, for - // instance must be flagged here or the next error will - // mask it. - // @TODO: If we've found our DLL _and_ it's - // broken, should we continue at all? - if ((errno != 0) && (errno != ENOENT) && (errors || ACE::debug ())) - { - ACE_TString errtmp; - if (errors) - { - errors->push (this->error (errtmp)); - } - - if (ACE::debug ()) - { - if (!errors) - this->error (errtmp); - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("ACE (%P|%t) DLL_Handle::open ") - ACE_TEXT ("(\'%s\') failed, errno=") - ACE_TEXT ("%d: <%s>\n"), - name->c_str (), - ACE_ERRNO_GET, - errtmp.c_str ())); - } - } - -#if defined (AIX) - // AIX often puts the shared library file (most often named - // shr.o) inside an archive library. If this is an archive - // library name, then try appending [shr.o] and retry. - if (ACE_TString::npos != name->strstr (ACE_TEXT (".a"))) - { - ACE_TCHAR aix_pathname[MAXPATHLEN + 1]; - ACE_OS::strncpy (aix_pathname, - name->c_str (), - name->length ()); - aix_pathname[name->length ()] = '\0'; - ACE_OS::strcat (aix_pathname, ACE_TEXT ("(shr.o)")); - open_mode |= RTLD_MEMBER; - - if (ACE::debug ()) - { - ACE_TString err; - ACELIB_DEBUG ((LM_DEBUG, - ACE_TEXT ("ACE (%P|%t) DLL_Handle::open ") - ACE_TEXT ("(\"%s\", 0x%x) -> %s: %s\n"), - aix_pathname, - open_mode, - (this->handle_ != ACE_SHLIB_INVALID_HANDLE - ? ACE_TEXT ("succeeded") - : ACE_TEXT ("failed")), - this->error(err).c_str())); - } - - this->handle_ = ACE_OS::dlopen (aix_pathname, open_mode); - if (this->handle_ != ACE_SHLIB_INVALID_HANDLE) - break; - - // If errno is ENOENT we just skip over this one, anything - // else - like an undefined symbol, for instance - // must be flagged here or the next error will mask it. - // - // @TODO: If we've found our DLL _and_ it's broken, - // should we continue at all? - if ((errno != 0) && (errno != ENOENT) && (errors || ACE::debug ())) - { - ACE_TString errtmp; - if (errors) - { - errors->push (this->error (errtmp)); - } - - if (ACE::debug ()) - { - if (!errors) - this->error (errtmp); - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("ACE (%P|%t) DLL_Handle::open ") - ACE_TEXT ("(\'%s\') failed, errno=") - ACE_TEXT ("%d: <%s>\n"), - name->c_str (), - ACE_ERRNO_GET, - errtmp.c_str ())); - } - } - - } -#endif /* AIX */ - - name_iter.advance (); - } - - if (this->handle_ == ACE_SHLIB_INVALID_HANDLE) - { - if (errors || ACE::debug ()) - { - ACE_TString errtmp; - if (errors) - { - errors->push (this->error (errtmp)); - } - - if (ACE::debug ()) - { - if (!errors) - this->error (errtmp); - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("ACE (%P|%t) DLL_Handle::open (\"%s\"): ") - ACE_TEXT ("Invalid handle error: %s\n"), - this->dll_name_, - errtmp.c_str ())); - } - } - - return -1; - } - } - } - - ++this->refcount_; - - if (ACE::debug ()) - ACELIB_DEBUG ((LM_DEBUG, - ACE_TEXT ("ACE (%P|%t) DLL_Handle::open - %s (%d), refcount=%d\n"), - this->dll_name_, - this->handle_, - this->refcount_)); - return 0; -} - - -int -ACE_DLL_Handle::close (int unload) -{ - ACE_TRACE ("ACE_DLL_Handle::close"); - - int retval = 0; - ACE_SHLIB_HANDLE h = ACE_SHLIB_INVALID_HANDLE; - - // Only hold the lock until it comes time to dlclose() the DLL. Closing - // the DLL can cause further shutdowns as DLLs and their dependents are - // unloaded. - { - ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, 0)); - - // Since we don't actually unload the dll as soon as the refcount - // reaches zero, we need to make sure we don't decrement it below - // zero. - if (this->refcount_ > 0) - --this->refcount_; - else - this->refcount_ = 0; - - if (ACE::debug ()) - ACELIB_DEBUG ((LM_DEBUG, - ACE_TEXT ("ACE (%P|%t) DLL_Handle::close - ") - ACE_TEXT ("%s (handle=%d, refcount=%d)\n"), - this->dll_name_, - this->handle_, - this->refcount_)); - - if (this->refcount_ == 0 && - this->handle_ != ACE_SHLIB_INVALID_HANDLE && - unload == 1) - { - if (ACE::debug ()) - ACELIB_DEBUG ((LM_DEBUG, - ACE_TEXT ("ACE (%P|%t) DLL_Handle::close: ") - ACE_TEXT ("Unloading %s (handle=%d)\n"), - this->dll_name_, - this->handle_)); - - // First remove any associated Framework Components. - ACE_Framework_Repository *frPtr= ACE_Framework_Repository::instance (); - if (frPtr) - { - frPtr->remove_dll_components (this->dll_name_); - } - - h = this->handle_; - this->handle_ = ACE_SHLIB_INVALID_HANDLE; - } - } // Release lock_ here - - if (h != ACE_SHLIB_INVALID_HANDLE) - { - retval = ACE_OS::dlclose (h); - - if (retval != 0 && ACE::debug ()) - { - ACE_TString err; - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("ACE (%P|%t) DLL_Handle::close - ") - ACE_TEXT ("Failed with: \"%s\".\n"), - this->error (err).c_str ())); - } - } - - return retval; -} - -sig_atomic_t -ACE_DLL_Handle::refcount (void) const -{ - return this->refcount_; -} - -void * -ACE_DLL_Handle::symbol (const ACE_TCHAR *sym_name, bool ignore_errors) -{ - ACE_TString error; - return this->symbol (sym_name, ignore_errors, error); -} - -void * -ACE_DLL_Handle::symbol (const ACE_TCHAR *sym_name, bool ignore_errors, ACE_TString &error) -{ - ACE_TRACE ("ACE_DLL_Handle::symbol"); - ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, 0)); - - ACE_Auto_Array_Ptr auto_name (ACE::ldname (sym_name)); - // handle_ can be invalid especially when ACE_DLL_Handle resigned ownership - // BTW. Handle lifecycle management is a little crazy in ACE - if (this->handle_ != ACE_SHLIB_INVALID_HANDLE) - { -#if defined (ACE_OPENVMS) - void *sym = ACE::ldsymbol (this->handle_, auto_name.get ()); -#else - void *sym = ACE_OS::dlsym (this->handle_, auto_name.get ()); -#endif - - // Linux says that the symbol could be null and that it isn't an - // error. So you should check the error message also, but since - // null symbols won't do us much good anyway, let's still report - // an error. - if (!sym && !ignore_errors) - { - this->error (error); - - if (ACE::debug ()) - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("ACE (%P|%t) DLL_Handle::symbol (\"%s\") ") - ACE_TEXT (" failed with \"%s\".\n"), - auto_name.get (), - error.c_str ())); - - return 0; - } - return sym; - } - return 0; -} - -ACE_SHLIB_HANDLE -ACE_DLL_Handle::get_handle (bool become_owner) -{ - ACE_TRACE ("ACE_DLL_Handle::get_handle"); - ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, 0)); - - if (this->refcount_ == 0 && become_owner) - { - if (ACE::debug ()) - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("ACE (%P|%t) DLL_Handle::get_handle: ") - ACE_TEXT ("cannot become owner, refcount == 0.\n"))); - - return ACE_SHLIB_INVALID_HANDLE; - } - - ACE_SHLIB_HANDLE handle = this->handle_; - - if (become_owner) - { - if (--this->refcount_ == 0) - this->handle_ = ACE_SHLIB_INVALID_HANDLE; - } - - if (ACE::debug ()) - ACELIB_DEBUG ((LM_DEBUG, - ACE_TEXT ("ACE (%P|%t) DLL_Handle::get_handle: ") - ACE_TEXT ("post call: handle %s, refcount %d\n"), - this->handle_ == ACE_SHLIB_INVALID_HANDLE ? - ACE_TEXT ("invalid") : ACE_TEXT ("valid"), - this->refcount_)); - - return handle; -} - -// This method is used return the last error of a library operation. - -ACE_TString & -ACE_DLL_Handle::error (ACE_TString &err) -{ - ACE_TRACE ("ACE_DLL_Handle::error"); - const ACE_TCHAR *error = ACE_OS::dlerror (); - err = (error ? error : ACE_TEXT ("no error")); - return err; -} - -void -ACE_DLL_Handle::get_dll_names (const ACE_TCHAR *dll_name, - ACE_Array &try_names) -{ - // Build the array of DLL names to try on this platform by applying the - // proper prefixes and/or suffixes to the specified dll_name. - ACE_TString base (dll_name); - ACE_TString base_dir, base_file, base_suffix; - - // 1. Separate the dll_name into the dir part and the file part. We - // only decorate the file part to determine the names to try loading. - ACE_TString::size_type pos = base.rfind (ACE_DIRECTORY_SEPARATOR_CHAR); - if (pos != ACE_TString::npos) - { - base_dir = base.substr (0, pos + 1); - base_file = base.substr (pos + 1); - } - else - base_file = base; - - // 2. Locate the file suffix, if there is one. Move the '.' and the - // suffix to base_suffix. - if ((pos = base_file.rfind (ACE_TEXT ('.'))) != ACE_TString::npos) - { - base_suffix = base_file.substr (pos); - base_file = base_file.substr (0, pos); - } - - // 3. Build the combinations to try for this platform. - // Try these combinations: - // - name with platform's dll prefix (if it has one) and suffix - // - name with platform's dll prefix, decorator, and suffix. - // - name with decorator and platform's suffix appended (if not supplied) - // - name with platform's suffix appended (if not supplied) - // - name as originally given - // We first try to find the file using the decorator so that when a - // filename with and without decorator is used, we get the file with - // the same decorator as the ACE dll has and then as last resort - // the one without. For example with msvc, the debug build has a "d" - // decorator, but the release build has none and we really want to get - // the debug version of the library in a debug application instead - // of the release one. - // So we need room for 5 entries in try_names. - try_names.size (0); - if ((try_names.max_size () - try_names.size ()) < 5) - try_names.max_size (try_names.max_size () + 5); -#if defined (ACE_LD_DECORATOR_STR) && !defined (ACE_DISABLE_DEBUG_DLL_CHECK) - ACE_TString decorator (ACE_LD_DECORATOR_STR); -#endif - ACE_TString suffix (ACE_DLL_SUFFIX); - ACE_TString prefix (ACE_DLL_PREFIX); - - for (size_t i = 0; i < 5 && try_names.size () < try_names.max_size (); ++i) - { - ACE_TString try_this; - size_t const j = try_names.size (); - switch (i) - { - case 0: // Prefix + name + decorator + suffix - case 1: // Prefix + name + suffix - case 2: // Name + decorator + suffix - case 3: // Name + suffix - if ( - base_suffix.length () > 0 -#if !(defined (ACE_LD_DECORATOR_STR) && !defined (ACE_DISABLE_DEBUG_DLL_CHECK)) - || (i == 1 || i == 3) // No decorator desired; skip -#endif - ) - break; - try_this = base_dir; - if (i < 2) - try_this += prefix; - try_this += base_file; - if (base_suffix.length () > 0) - try_this += base_suffix; - else - { -#if defined (ACE_LD_DECORATOR_STR) && !defined (ACE_DISABLE_DEBUG_DLL_CHECK) - try_this += decorator; -#endif - try_this += suffix; - } - break; - case 4: - try_this = dll_name; - break; - } - - if (try_this.length ()) - { - try_names.size (j + 1); - try_names.set (try_this, j); - } - } - return; -} - -/******************************************************************/ - -// Pointer to the Singleton instance. -ACE_DLL_Manager *ACE_DLL_Manager::instance_ = 0; - - -ACE_DLL_Manager * -ACE_DLL_Manager::instance (int size) -{ - ACE_TRACE ("ACE_DLL_Manager::instance"); - - if (ACE_DLL_Manager::instance_ == 0) - { - // Perform Double-Checked Locking Optimization. - ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon, - *ACE_Static_Object_Lock::instance (), 0)); - if (ACE_DLL_Manager::instance_ == 0) - { - ACE_NEW_RETURN (ACE_DLL_Manager::instance_, - ACE_DLL_Manager (size), - 0); - } - } - - return ACE_DLL_Manager::instance_; -} - -void -ACE_DLL_Manager::close_singleton (void) -{ - ACE_TRACE ("ACE_DLL_Manager::close_singleton"); - - ACE_MT (ACE_GUARD (ACE_Recursive_Thread_Mutex, ace_mon, - *ACE_Static_Object_Lock::instance ())); - - delete ACE_DLL_Manager::instance_; - ACE_DLL_Manager::instance_ = 0; -} - -ACE_DLL_Manager::ACE_DLL_Manager (int size) - : handle_vector_ (0), - current_size_ (0), - total_size_ (0), - unload_policy_ (ACE_DLL_UNLOAD_POLICY_PER_DLL) -{ - ACE_TRACE ("ACE_DLL_Manager::ACE_DLL_Manager"); - - if (this->open (size) != 0 && ACE::debug ()) - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("ACE (%P|%t) DLL_Manager ctor failed to allocate ") - ACE_TEXT ("handle_vector_.\n"))); -} - -ACE_DLL_Manager::~ACE_DLL_Manager (void) -{ - ACE_TRACE ("ACE_DLL_Manager::~ACE_DLL_Manager"); - - if (this->close () != 0 && ACE::debug ()) - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("ACE (%P|%t) DLL_Manager dtor failed to close ") - ACE_TEXT ("properly.\n"))); -} - -ACE_DLL_Handle * -ACE_DLL_Manager::open_dll (const ACE_TCHAR *dll_name, - int open_mode, - ACE_SHLIB_HANDLE handle, - ACE_DLL_Handle::ERROR_STACK *errors) -{ - ACE_TRACE ("ACE_DLL_Manager::open_dll"); - - ACE_DLL_Handle *temp_handle = 0; - ACE_DLL_Handle *dll_handle = 0; - { - ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, 0)); - dll_handle = this->find_dll (dll_name); - if (!dll_handle) - { - if (this->current_size_ < this->total_size_) - { - ACE_NEW_RETURN (temp_handle, - ACE_DLL_Handle, - 0); - - dll_handle = temp_handle; - } - } - } - - if (dll_handle) - { - if (dll_handle->open (dll_name, open_mode, handle, errors) != 0) - { - // Error while opening dll. Free temp handle - if (ACE::debug ()) - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("ACE (%P|%t) DLL_Manager::open_dll: Could not ") - ACE_TEXT ("open dll %s.\n"), - dll_name)); - - delete temp_handle; - return 0; - } - - // Add the handle to the vector only if the dll is successfully - // opened. - if (temp_handle != 0) - { - ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, 0)); - this->handle_vector_[this->current_size_] = dll_handle; - ++this->current_size_; - } - } - - return dll_handle; -} - -int -ACE_DLL_Manager::close_dll (const ACE_TCHAR *dll_name) -{ - ACE_TRACE ("ACE_DLL_Manager::close_dll"); - ACE_DLL_Handle *handle = 0; - - { - ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->lock_, 0)); - handle = this->find_dll (dll_name); - } - - if (handle) - { - return this->unload_dll (handle, 0); - } - - return -1; -} - -u_long -ACE_DLL_Manager::unload_policy (void) const -{ - ACE_TRACE ("ACE_DLL_Manager::unload_policy"); - return this->unload_policy_; -} - -void -ACE_DLL_Manager::unload_policy (u_long unload_policy) -{ - ACE_TRACE ("ACE_DLL_Manager::unload_policy"); - ACE_MT (ACE_GUARD (ACE_Thread_Mutex, ace_mon, this->lock_)); - - u_long old_policy = this->unload_policy_; - this->unload_policy_ = unload_policy; - - // If going from LAZY to EAGER or from PER_DLL to PER_PROCESS|EAGER, - // call close(1) on all the ACE_DLL_Handle objects with refcount == 0 - // which will force those that are still loaded to be unloaded. - if (this->handle_vector_) - if (( ACE_BIT_ENABLED (old_policy, ACE_DLL_UNLOAD_POLICY_LAZY) && - ACE_BIT_DISABLED (this->unload_policy_, ACE_DLL_UNLOAD_POLICY_LAZY) ) || - ( ACE_BIT_DISABLED (this->unload_policy_, ACE_DLL_UNLOAD_POLICY_LAZY) && - ACE_BIT_ENABLED (old_policy, ACE_DLL_UNLOAD_POLICY_PER_DLL) && - ACE_BIT_DISABLED (this->unload_policy_, ACE_DLL_UNLOAD_POLICY_PER_DLL) )) - { - for (int i = this->current_size_ - 1; i >= 0; i--) - { - if (this->handle_vector_[i] && - this->handle_vector_[i]->refcount () == 0) - this->handle_vector_[i]->close (1); - } - } -} - -int -ACE_DLL_Manager::open (int size) -{ - ACE_TRACE ("ACE_DLL_Manager::open"); - - ACE_DLL_Handle **temp = 0; - - ACE_NEW_RETURN (temp, - ACE_DLL_Handle *[size], - -1); - - this->handle_vector_ = temp; - this->total_size_ = size; - return 0; -} - -int -ACE_DLL_Manager::close (void) -{ - ACE_TRACE ("ACE_DLL_Manager::close"); - - int force_close = 1; - - if (this->handle_vector_ != 0) - { - // Delete components in reverse order. - for (int i = this->current_size_ - 1; i >= 0; i--) - { - if (this->handle_vector_[i]) - { - ACE_DLL_Handle *s = - const_cast (this->handle_vector_[i]); - this->handle_vector_[i] = 0; - this->unload_dll (s, force_close); - delete s; - } - } - - delete [] this->handle_vector_; - this->handle_vector_ = 0; - this->current_size_ = 0; - } - return 0; -} - -ACE_DLL_Handle * -ACE_DLL_Manager::find_dll (const ACE_TCHAR *dll_name) const -{ - ACE_TRACE ("ACE_DLL_Manager::find_dll"); - - for (int i = 0; i < this->current_size_; i++) - if (this->handle_vector_[i] && - ACE_OS::strcmp (this->handle_vector_[i]->dll_name (), dll_name) == 0) - { - return this->handle_vector_[i]; - } - - return 0; -} - -int -ACE_DLL_Manager::unload_dll (ACE_DLL_Handle *dll_handle, int force_unload) -{ - ACE_TRACE ("ACE_DLL_Manager::unload_dll"); - - if (dll_handle) - { - int unload = force_unload; - if (unload == 0) - { - // apply strategy - if (ACE_BIT_DISABLED (this->unload_policy_, - ACE_DLL_UNLOAD_POLICY_PER_DLL)) - { - unload = ACE_BIT_DISABLED (this->unload_policy_, - ACE_DLL_UNLOAD_POLICY_LAZY); - } - else - { - // Declare the type of the symbol: - typedef int (*dll_unload_policy)(void); - - void * const unload_policy_ptr = - dll_handle->symbol (ACE_TEXT ("_get_dll_unload_policy"), 1); -#if defined (ACE_OPENVMS) && (!defined (__INITIAL_POINTER_SIZE) || (__INITIAL_POINTER_SIZE < 64)) - int const temp_p = - reinterpret_cast (unload_policy_ptr); -#else - intptr_t const temp_p = - reinterpret_cast (unload_policy_ptr); -#endif - - dll_unload_policy const the_policy = - reinterpret_cast (temp_p); - - if (the_policy != 0) - unload = ACE_BIT_DISABLED (the_policy (), - ACE_DLL_UNLOAD_POLICY_LAZY); - else - unload = ACE_BIT_DISABLED (this->unload_policy_, - ACE_DLL_UNLOAD_POLICY_LAZY); - } - } - - if (dll_handle->close (unload) != 0) - { - if (ACE::debug ()) - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("ACE (%P|%t) DLL_Manager::unload error.\n"))); - - return -1; - } - } - else - { - if (ACE::debug ()) - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("ACE (%P|%t) DLL_Manager::unload_dll called with ") - ACE_TEXT ("null pointer.\n"))); - - return -1; - } - - return 0; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/DLL_Manager.h b/modules/worldengine/deps/acelite/ace/DLL_Manager.h deleted file mode 100644 index f803bc0e16..0000000000 --- a/modules/worldengine/deps/acelite/ace/DLL_Manager.h +++ /dev/null @@ -1,306 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file DLL_Manager.h - * - * @author Don Hinton - */ -//============================================================================= - -#ifndef ACE_DLL_MANAGER_H -#define ACE_DLL_MANAGER_H -#include /**/ "ace/pre.h" - -#include /**/ "ace/ACE_export.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Auto_Ptr.h" -#include "ace/Containers_T.h" -#include "ace/SString.h" -#include "ace/os_include/os_dlfcn.h" - -#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) -# include "ace/Thread_Mutex.h" -#endif /* ACE_MT_SAFE */ - -#define ACE_DEFAULT_DLL_MANAGER_SIZE 1024 - - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_DLL_Handle - * - * @brief Provides an abstract interface for handling various DLL - * operations. - * - * This class is an wrapper over the various methods for utilizing a - * dynamically linked library (DLL), which is called a shared library - * on some platforms. It is refcounted and managed by - * ACE_DLL_Manager, so there will only be a single instance of this - * class for each dll loaded, no matter how many instances of ACE_DLL - * an application has open. Operations open(), close(), and symbol() - * have been implemented to help opening/closing and extracting symbol - * information from a DLL, respectively. - * - * Most of this class came from the original ACE_DLL class. ACE_DLL - * is now just an interface that passed all it's calls either directly - * or via ACE_DLL_Manager to this class for execution. - */ -class ACE_Export ACE_DLL_Handle -{ -public: - - /// Error stack. Fixed size should suffice. Ignores any errors exceeding the size. - typedef ACE_Fixed_Stack < ACE_TString, 10 > ERROR_STACK; - - /// Default construtor. - ACE_DLL_Handle (void); - - /// Destructor. - ~ACE_DLL_Handle (void); - - /// Returns the name of the shared library (without prefixes or suffixes). - const ACE_TCHAR *dll_name () const; - - /** - * This method opens and dynamically links a library/DLL. - * @param dll_name The filename or path of the DLL to load. ACE will - * attempt to apply the platform's standard library/DLL prefixes - * and suffixes, allowing a simple, unadorned name to be passed - * regardless of platform. The set of name transforms is listed - * below. A @i decorator is a platform's name designator for a debug - * vs release build. For example, on Windows it is usually "d". - * @li Prefix + name + decorator + suffix - * @li Prefix + name + suffix - * @li Name + decorator + suffix - * @li Name + suffix - * @li Name - * Note that the transforms with @i decorator will be avoided if - * ACE is built with the @c ACE_DISABLE_DEBUG_DLL_CHECK config macro. - * - * @Note There is another mode for locating library/DLL files that - * was used in old versions of ACE. The alternate method builds - * more combinations of pathname by combining the names transforms - * above with locations listed in the platform's standard "path" - * locations (e.g., @c LD_LIBRARY_PATH). It can be enabled by building - * ACE with the @c ACE_MUST_HELP_DLOPEN_SEARCH_PATH config macro. - * Use of this option is discouraged since it avoids the standard - * platform search options and security mechanisms. - * - * @param open_mode Flags to alter the actions taken when loading the DLL. - * The possible values are: - * @li @c RTLD_LAZY (this the default): loads identifier symbols but - * not the symbols for functions, which are loaded dynamically - * on demand. - * @li @c RTLD_NOW: performs all necessary relocations when - * @a dll_name is first loaded - * @li @c RTLD_GLOBAL: makes symbols available for relocation - * processing of any other DLLs. - * @param handle If a value other than @c ACE_INVALID_HANDLE is supplied, - * this object is assigned the specified handle instead of attempting - * to open the specified @a dll_name. - * @param errors Optional address of an error stack to collect any errors - * encountered. - * @retval -1 On failure - * @retval 0 On success. - */ - int open (const ACE_TCHAR *dll_name, - int open_mode, - ACE_SHLIB_HANDLE handle, - ERROR_STACK *errors = 0); - - /// Call to close the DLL object. If unload = 0, it only decrements - /// the refcount, but if unload = 1, then it will actually unload - /// the library when the refcount == 0; - int close (int unload = 0); - - /// Return the current refcount. - sig_atomic_t refcount (void) const; - - /// If @a symbol_name is in the symbol table of the DLL a pointer to - /// the @a symbol_name is returned. Otherwise, returns 0. Set the - /// ignore_errors flag to supress logging errors if symbol_name isn't - /// found. This is nice if you just want to probe a dll to see what's - /// available, since missing functions in that case aren't really errors. - void *symbol (const ACE_TCHAR *symbol_name, bool ignore_errors = false); - - /// Resolves and returns any error encountered. - void *symbol (const ACE_TCHAR *symbol_name, bool ignore_errors, - ACE_TString &error); - - /** - * Return the handle to the caller. If @a become_owner is true then - * caller assumes ownership of the handle so we decrement the retcount. - */ - ACE_SHLIB_HANDLE get_handle (bool become_owner = false); - -private: - - /// Returns a string explaining why or - /// failed in @a err. This is used internal to print out the error to the log, - /// but since this object is shared, we can't store or return the error - /// to the caller. - ACE_TString& error (ACE_TString& err); - - /// Builds array of DLL names to try to dlopen, based on platform - /// and configured DLL prefixes/suffixes. - /// Returns the array of names to try in try_names. - void get_dll_names (const ACE_TCHAR *dll_name, - ACE_Array &try_names); - - /// Disallow copying and assignment since we don't handle them. - ACE_DLL_Handle (const ACE_DLL_Handle &); - void operator= (const ACE_DLL_Handle &); - -private: - - /// Keep track of how many ACE_DLL objects have a reference to this - /// dll. - sig_atomic_t refcount_; - - /// Name of the shared library. - ACE_TCHAR *dll_name_; - - /// Handle to the actual library loaded by the OS. - ACE_SHLIB_HANDLE handle_; - - /// Keeps track of whether or not open() has ever been called. This - /// helps get around problem on Linux, and perhaps other OS's, that - /// seg-fault if dlerror() is called before the ld library has been - /// initialized by a call to dlopen(). - static sig_atomic_t open_called_; - -#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) - /// Synchronization variable for the MT_SAFE Repository - ACE_Thread_Mutex lock_; -#endif /* ACE_MT_SAFE */ -}; - -class ACE_Framework_Repository; - -/** - * @class ACE_DLL_Manager - * - * @brief This class is a singleton and serves as a factory and - * repository for instances of ACE_DLL_Handle. - * - * This class is a singleton whose lifetime is managed by the - * ACE_Framework_Repository. Although it is normally meant to be - * used directly only by ACE_DLL, applications can call the unload_policy() - * methods in order get/set the the dll unload policy. Unload policies include - * per_process/per-dll and eager/lazy. Dlls can export set their own policy - * by using the ACE_DLL_UNLOAD_POLICY macro found in config-all.h. If a dll - * choses to set an unload policy, it will be used when the per-dll policy - * (the default) is in effect. If the per-dll policy is in effect and a dll - * has not chosen to set a policy, the current per-process policy will be - * used. - * - * The following policy macros are provided in config-all.h: - * - * ACE_DLL_UNLOAD_POLICY_PER_PROCESS - Per-process policy that unloads dlls - * eagerly. - * - * ACE_DLL_UNLOAD_POLICY_PER_DLL - Apply policy on a per-dll basis. If the - * dll doesn't use one of the macros below, the current per-process policy - * will be used. - * - * ACE_DLL_UNLOAD_POLICY_LAZY - Don't unload dll when refcount reaches - * zero, i.e., wait for either an explicit unload request or program exit. - * - * ACE_DLL_UNLOAD_POLICY_DEFAULT - Default policy allows dlls to control - * their own destinies, but will unload those that don't make a choice eagerly. - */ -class ACE_Export ACE_DLL_Manager -{ -public: - friend class ACE_Framework_Repository; - friend class ACE_Object_Manager; - - enum - { - DEFAULT_SIZE = ACE_DEFAULT_DLL_MANAGER_SIZE - }; - - /// Return a unique instance - static ACE_DLL_Manager *instance (int size = ACE_DLL_Manager::DEFAULT_SIZE); - - /// Factory for ACE_DLL_Handle objects. If one already exits, - /// its refcount is incremented. - ACE_DLL_Handle *open_dll (const ACE_TCHAR *dll_name, - int openmode, - ACE_SHLIB_HANDLE handle, - ACE_DLL_Handle::ERROR_STACK *errors = 0); - - /// Close the underlying dll. Decrements the refcount. - int close_dll (const ACE_TCHAR *dll_name); - - /// Returns the current per-process UNLOAD_POLICY. - u_long unload_policy (void) const; - - /// Set the per-process UNLOAD_POLICY. If the policy is changed from - /// LAZY to EAGER, then it will also unload any dlls with zero - /// refcounts. - void unload_policy (u_long unload_policy); - -protected: - - /// Default constructor. - ACE_DLL_Manager (int size = ACE_DLL_Manager::DEFAULT_SIZE); - - /// Destructor. - ~ACE_DLL_Manager (void); - - /// Allocate handle_vector_. - int open (int size); - - /// Close all open dlls and deallocate memory. - int close (void); - - /// Find dll in handle_vector_. - ACE_DLL_Handle *find_dll (const ACE_TCHAR *dll_name) const; - - /// Applies strategy for unloading dll. - int unload_dll (ACE_DLL_Handle *dll_handle, int force_unload = 0); - -private: - - /// Close the singleton instance. - static void close_singleton (void); - - /// Disallow copying and assignment since we don't handle these. - ACE_DLL_Manager (const ACE_DLL_Manager &); - void operator= (const ACE_DLL_Manager &); - -private: - - /// Vector containing all loaded handle objects. - ACE_DLL_Handle **handle_vector_; - - /// Current number of handles. - int current_size_; - - /// Maximum number of handles. - int total_size_; - - /// Unload strategy. - u_long unload_policy_; - - /// Pointer to a process-wide ACE_DLL_Manager. - static ACE_DLL_Manager *instance_; - -#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) - /// Synchronization variable for the MT_SAFE Repository - ACE_Thread_Mutex lock_; -#endif /* ACE_MT_SAFE */ - -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#include /**/ "ace/post.h" -#endif /* ACE_DLL_MANAGER_H */ diff --git a/modules/worldengine/deps/acelite/ace/Date_Time.cpp b/modules/worldengine/deps/acelite/ace/Date_Time.cpp deleted file mode 100644 index 8d84df812e..0000000000 --- a/modules/worldengine/deps/acelite/ace/Date_Time.cpp +++ /dev/null @@ -1,8 +0,0 @@ -// Date_Time.cpp -#include "ace/Date_Time.h" - -#if !defined (__ACE_INLINE__) -#include "ace/Date_Time.inl" -#endif /* __ACE_INLINE__ */ - - diff --git a/modules/worldengine/deps/acelite/ace/Date_Time.h b/modules/worldengine/deps/acelite/ace/Date_Time.h deleted file mode 100644 index aba5d04487..0000000000 --- a/modules/worldengine/deps/acelite/ace/Date_Time.h +++ /dev/null @@ -1,122 +0,0 @@ -// -*- C++ -*- - -//========================================================================== -/** - * @file Date_Time.h - * - * @author Tim Harrison (harrison@cs.wustl.edu) (and he's darn proud of this ;-)) - */ -//========================================================================== - -#ifndef ACE_DATE_TIME_H -#define ACE_DATE_TIME_H -#include /**/ "ace/pre.h" - -#include /**/ "ace/ACE_export.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -class ACE_Time_Value; - -/** - * @class ACE_Date_Time - * - * @brief System independent representation of date and time. - */ -class ACE_Export ACE_Date_Time -{ -public: - /// Constructor initializes current time/date info. - ACE_Date_Time (void); - - /// Constructor initializes with the given ACE_Time_Value - explicit ACE_Date_Time (const ACE_Time_Value& timevalue); - - /// Constructor with init values, no check for validy - /// Set/get portions of ACE_Date_Time, no check for validity. - ACE_Date_Time (long day, - long month = 0, - long year = 0, - long hour = 0, - long minute = 0, - long second = 0, - long microsec = 0, - long wday = 0); - - /// Update to the current time/date. - void update (void); - - /// Update to the given ACE_Time_Value - void update (const ACE_Time_Value& timevalue); - - /// Get day. - long day (void) const; - - /// Set day. - void day (long day); - - /// Get month. - long month (void) const; - - /// Set month. - void month (long month); - - /// Get year. - long year (void) const; - - /// Set year. - void year (long year); - - /// Get hour. - long hour (void) const; - - /// Set hour. - void hour (long hour); - - /// Get minute. - long minute (void) const; - - /// Set minute. - void minute (long minute); - - /// Get second. - long second (void) const; - - /// Set second. - void second (long second); - - /// Get microsec. - long microsec (void) const; - - /// Set microsec. - void microsec (long microsec); - - /// Get weekday. - long weekday (void) const; - - /// Set weekday. - void weekday (long wday); - -private: - long day_; - long month_; - long year_; - long hour_; - long minute_; - long second_; - long microsec_; - long wday_; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/Date_Time.inl" -#endif /* __ACE_INLINE__ */ - -#include /**/ "ace/post.h" -#endif /* ACE_DATE_TIME_H */ diff --git a/modules/worldengine/deps/acelite/ace/Date_Time.inl b/modules/worldengine/deps/acelite/ace/Date_Time.inl deleted file mode 100644 index 196f572bef..0000000000 --- a/modules/worldengine/deps/acelite/ace/Date_Time.inl +++ /dev/null @@ -1,216 +0,0 @@ -// -*- C++ -*- -#include "ace/Global_Macros.h" -#include "ace/Time_Value.h" -#include "ace/OS_NS_sys_time.h" -#include "ace/OS_NS_time.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_INLINE void -ACE_Date_Time::update (const ACE_Time_Value& timevalue) -{ -#if defined (ACE_HAS_WINCE) - // CE doesn't do localtime(). - FILETIME file_time = timevalue; - FILETIME local_file_time; - SYSTEMTIME sys_time; - ::FileTimeToLocalFileTime (&file_time, &local_file_time); - ::FileTimeToSystemTime (&local_file_time, &sys_time); - this->day_ = sys_time.wDay; - this->month_ = sys_time.wMonth; - this->year_ = sys_time.wYear; - this->hour_ = sys_time.wHour; - this->minute_ = sys_time.wMinute; - this->second_ = sys_time.wSecond; - this->microsec_ = sys_time.wMilliseconds * 1000; - this->wday_ = sys_time.wDayOfWeek; -#else - time_t time = timevalue.sec (); - struct tm tm_time; - ACE_OS::localtime_r (&time, &tm_time); - this->day_ = tm_time.tm_mday; - this->month_ = tm_time.tm_mon + 1; // localtime's months are 0-11 - this->year_ = tm_time.tm_year + 1900; // localtime reports years since 1900 - this->hour_ = tm_time.tm_hour; - this->minute_ = tm_time.tm_min; - this->second_ = tm_time.tm_sec; - this->microsec_ = timevalue.usec (); - this->wday_ = tm_time.tm_wday; -#endif /* ACE_HAS_WINCE */ -} - -ACE_INLINE void -ACE_Date_Time::update (void) -{ - ACE_TRACE ("ACE_Date_Time::update"); - - update(ACE_OS::gettimeofday ()); -} - -ACE_INLINE -ACE_Date_Time::ACE_Date_Time (void) -{ - ACE_TRACE ("ACE_Date_Time::ACE_Date_Time"); - this->update (); -} - -ACE_INLINE -ACE_Date_Time::ACE_Date_Time (const ACE_Time_Value& timevalue) -{ - ACE_TRACE ("ACE_Date_Time::ACE_Date_Time: timevalue"); - this->update (timevalue); -} - -// Constructor with init values, no check for validy -ACE_INLINE -ACE_Date_Time::ACE_Date_Time (long day, - long month, - long year, - long hour, - long minute, - long second, - long microsec, - long wday) - : day_ (day), - month_ (month), - year_ (year), - hour_ (hour), - minute_ (minute), - second_ (second), - microsec_ (microsec), - wday_ (wday) -{ - ACE_TRACE ("ACE_Date_Time::ACE_Date_Time"); -} - -// set/get portions of ACE_Date_Time, no check for validy - -// get day -ACE_INLINE long -ACE_Date_Time::day (void) const -{ - ACE_TRACE ("ACE_Date_Time::day"); - return day_; -} - -// set day -ACE_INLINE void -ACE_Date_Time::day (long day) -{ - ACE_TRACE ("ACE_Date_Time::day"); - day_ = day; -} - -// get month -ACE_INLINE long -ACE_Date_Time::month (void) const -{ - ACE_TRACE ("ACE_Date_Time::month"); - return month_; -} - -// set month -ACE_INLINE void -ACE_Date_Time::month (long month) -{ - ACE_TRACE ("ACE_Date_Time::month"); - month_ = month; -} - -// get year -ACE_INLINE long -ACE_Date_Time::year (void) const -{ - ACE_TRACE ("ACE_Date_Time::year"); - return year_; -} - -// set year -ACE_INLINE void -ACE_Date_Time::year (long year) -{ - ACE_TRACE ("ACE_Date_Time::year"); - year_ = year; -} - -// get hour -ACE_INLINE long -ACE_Date_Time::hour (void) const -{ - ACE_TRACE ("ACE_Date_Time::hour"); - return hour_; -} - -// set hour -ACE_INLINE void -ACE_Date_Time::hour (long hour) -{ - ACE_TRACE ("ACE_Date_Time::hour"); - hour_ = hour; -} - -// get minute -ACE_INLINE long -ACE_Date_Time::minute (void) const -{ - ACE_TRACE ("ACE_Date_Time::minute"); - return minute_; -} - -// set minute -ACE_INLINE void -ACE_Date_Time::minute (long minute) -{ - ACE_TRACE ("ACE_Date_Time::minute"); - minute_ = minute; -} - -// get second -ACE_INLINE long -ACE_Date_Time::second (void) const -{ - ACE_TRACE ("ACE_Date_Time::second"); - return second_; -} - -// set second -ACE_INLINE void -ACE_Date_Time::second (long second) -{ - ACE_TRACE ("ACE_Date_Time::second"); - second_ = second; -} - -// get microsec -ACE_INLINE long -ACE_Date_Time::microsec (void) const -{ - ACE_TRACE ("ACE_Date_Time::microsec"); - return microsec_; -} - -// set microsec -ACE_INLINE void -ACE_Date_Time::microsec (long microsec) -{ - ACE_TRACE ("ACE_Date_Time::microsec"); - microsec_ = microsec; -} - -// get wday -ACE_INLINE long -ACE_Date_Time::weekday (void) const -{ - ACE_TRACE ("ACE_Date_Time::weekday"); - return wday_; -} - -// set wday -ACE_INLINE void -ACE_Date_Time::weekday (long wday) -{ - ACE_TRACE ("ACE_Date_Time::weekday"); - wday_ = wday; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Default_Constants.h b/modules/worldengine/deps/acelite/ace/Default_Constants.h deleted file mode 100644 index 8a6c069177..0000000000 --- a/modules/worldengine/deps/acelite/ace/Default_Constants.h +++ /dev/null @@ -1,588 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Default_Constants.h - * - * @author Douglas C. Schmidt - * @author Jesper S. M|ller - * @author and a cast of thousands... - * - * This one is split from the famous OS.h - */ -//============================================================================= - -#ifndef ACE_DEFAULT_CONSTANTS_H -#define ACE_DEFAULT_CONSTANTS_H -#include /**/ "ace/pre.h" - -// Included just keep compilers that see #pragma directive first -// happy. -#include /**/ "ace/config-all.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -// For _POSIX_TIMER_MAX -#include "ace/os_include/os_limits.h" - -// Define the default constants for ACE. Many of these are used for -// the ACE tests and applications. You can change these values by -// defining the macros in your config.h file. -# if !defined (ACE_DEFAULT_CLOSE_ALL_HANDLES) -# define ACE_DEFAULT_CLOSE_ALL_HANDLES true -# endif /* ACE_DEFAULT_CLOSE_ALL_HANDLES */ - -// The maximum length for a fully qualified Internet name. -# if !defined(ACE_MAX_FULLY_QUALIFIED_NAME_LEN) -# define ACE_MAX_FULLY_QUALIFIED_NAME_LEN 256 -# endif /* ACE_MAX_FULLY_QUALIFIED_NAME_LEN */ - -#if !defined (ACE_DEFAULT_PAGEFILE_POOL_BASE) -#define ACE_DEFAULT_PAGEFILE_POOL_BASE (void *) 0 -#endif /* ACE_DEFAULT_PAGEFILE_POOL_BASE */ - -#if !defined (ACE_DEFAULT_PAGEFILE_POOL_SIZE) -#define ACE_DEFAULT_PAGEFILE_POOL_SIZE (size_t) 0x01000000 -#endif /* ACE_DEFAULT_PAGEFILE_POOL_SIZE */ - -#if !defined (ACE_DEFAULT_PAGEFILE_POOL_CHUNK) -#define ACE_DEFAULT_PAGEFILE_POOL_CHUNK (size_t) 0x00010000 -#endif /* ACE_DEFAULT_PAGEFILE_POOL_CHUNK */ - -#if !defined (ACE_DEFAULT_PAGEFILE_POOL_NAME) -#define ACE_DEFAULT_PAGEFILE_POOL_NAME ACE_TEXT ("Default_ACE_Pagefile_Memory_Pool") -#endif /* ACE_DEFAULT_PAGEFILE_POOL_NAME */ - -#if !defined (ACE_DEFAULT_MESSAGE_BLOCK_PRIORITY) -#define ACE_DEFAULT_MESSAGE_BLOCK_PRIORITY 0 -#endif /* ACE_DEFAULT_MESSAGE_BLOCK_PRIORITY */ - -#if !defined (ACE_DEFAULT_SERVICE_REPOSITORY_SIZE) -#define ACE_DEFAULT_SERVICE_REPOSITORY_SIZE 1024 -#endif /* ACE_DEFAULT_SERVICE_REPOSITORY_SIZE */ - -#if !defined (ACE_DEFAULT_SERVICE_GESTALT_SIZE) -#define ACE_DEFAULT_SERVICE_GESTALT_SIZE 1024 -#endif /* ACE_DEFAULT_SERVICE_GESTALT_SIZE */ - -#if !defined (ACE_REACTOR_NOTIFICATION_ARRAY_SIZE) -#define ACE_REACTOR_NOTIFICATION_ARRAY_SIZE 1024 -#endif /* ACE_REACTOR_NOTIFICATION_ARRAY_SIZE */ - -# if !defined (ACE_DEFAULT_TIMEOUT) -# define ACE_DEFAULT_TIMEOUT 5 -# endif /* ACE_DEFAULT_TIMEOUT */ - -# if !defined (ACE_DEFAULT_BACKLOG) -# define ACE_DEFAULT_BACKLOG 5 -# endif /* ACE_DEFAULT_BACKLOG */ - -# if !defined (ACE_DEFAULT_ASYNCH_BACKLOG) -# define ACE_DEFAULT_ASYNCH_BACKLOG 5 -# endif /* ACE_DEFAULT_ASYNCH_BACKLOG */ - -# if !defined (ACE_DEFAULT_THREADS) -# define ACE_DEFAULT_THREADS 1 -# endif /* ACE_DEFAULT_THREADS */ - -// The following 3 defines are used in the IP multicast and broadcast tests. -# if !defined (ACE_DEFAULT_BROADCAST_PORT) -# define ACE_DEFAULT_BROADCAST_PORT 20000 -# endif /* ACE_DEFAULT_BROADCAST_PORT */ - -# if !defined (ACE_DEFAULT_MULTICAST_PORT) -# define ACE_DEFAULT_MULTICAST_PORT 20001 -# endif /* ACE_DEFAULT_MULTICAST_PORT */ - -# if !defined (ACE_DEFAULT_MULTICAST_ADDR) -// This address MUST be within the range for host group addresses: -// 224.0.0.0 to 239.255.255.255. -# define ACE_DEFAULT_MULTICAST_ADDR "224.9.9.2" -# endif /* ACE_DEFAULT_MULTICAST_ADDR */ - -# if defined (ACE_HAS_IPV6) -# if !defined (ACE_DEFAULT_MULTICASTV6_ADDR) -// This address should be within the range for site-local addresses: -// ff05::0/16 . -# define ACE_DEFAULT_MULTICASTV6_ADDR "ff05:0::ff01:1" -# endif /* ACE_DEFAULT_MULTICASTV6_ADDR */ -# endif - -// Default port number for HTTP. -# if !defined (ACE_DEFAULT_HTTP_SERVER_PORT) -# define ACE_DEFAULT_HTTP_SERVER_PORT 80 -# endif /* ACE_DEFAULT_HTTP_SERVER_PORT */ - -// Used in many IPC_SAP tests -# if !defined (ACE_DEFAULT_SERVER_PORT) -# define ACE_DEFAULT_SERVER_PORT 20002 -# endif /* ACE_DEFAULT_SERVER_PORT */ - -# if !defined (ACE_DEFAULT_HTTP_PORT) -# define ACE_DEFAULT_HTTP_PORT 80 -# endif /* ACE_DEFAULT_HTTP_PORT */ - -# if !defined (ACE_DEFAULT_MAX_SOCKET_BUFSIZ) -# define ACE_DEFAULT_MAX_SOCKET_BUFSIZ 65536 -# endif /* ACE_DEFAULT_MAX_SOCKET_BUFSIZ */ - -# if !defined (ACE_DEFAULT_SERVER_PORT_STR) -# define ACE_DEFAULT_SERVER_PORT_STR ACE_TEXT("20002") -# endif /* ACE_DEFAULT_SERVER_PORT_STR */ - -// Used for the Service_Directory test -# if !defined (ACE_DEFAULT_SERVICE_PORT) -# define ACE_DEFAULT_SERVICE_PORT 20003 -# endif /* ACE_DEFAULT_SERVICE_PORT */ - -// Used for the ACE_Thread_Spawn test -# if !defined (ACE_DEFAULT_THR_PORT ) -# define ACE_DEFAULT_THR_PORT 20004 -# endif /* ACE_DEFAULT_THR_PORT */ - -// Used for tests -# if !defined (ACE_DEFAULT_LOCAL_PORT) -# define ACE_DEFAULT_LOCAL_PORT 20005 -# endif /* ACE_DEFAULT_LOCAL_PORT */ - -// Used for Connector tests -# if !defined (ACE_DEFAULT_LOCAL_PORT_STR) -# define ACE_DEFAULT_LOCAL_PORT_STR "20005" -# endif /* ACE_DEFAULT_LOCAL_PORT_STR */ - -// Used for the name server. -# if !defined (ACE_DEFAULT_NAME_SERVER_PORT) -# define ACE_DEFAULT_NAME_SERVER_PORT 20006 -# endif /* ACE_DEFAULT_NAME_SERVER_PORT */ - -# if !defined (ACE_DEFAULT_NAME_SERVER_PORT_STR) -# define ACE_DEFAULT_NAME_SERVER_PORT_STR "20006" -# endif /* ACE_DEFAULT_NAME_SERVER_PORT_STR */ - -// Used for the token server. -# if !defined (ACE_DEFAULT_TOKEN_SERVER_PORT) -# define ACE_DEFAULT_TOKEN_SERVER_PORT 20007 -# endif /* ACE_DEFAULT_TOKEN_SERVER_PORT */ - -# if !defined (ACE_DEFAULT_TOKEN_SERVER_PORT_STR) -# define ACE_DEFAULT_TOKEN_SERVER_PORT_STR "20007" -# endif /* ACE_DEFAULT_TOKEN_SERVER_PORT_STR */ - -// Used for the logging server. -# if !defined (ACE_DEFAULT_LOGGING_SERVER_PORT) -# define ACE_DEFAULT_LOGGING_SERVER_PORT 20008 -# endif /* ACE_DEFAULT_LOGGING_SERVER_PORT */ - -# if !defined (ACE_DEFAULT_LOGGING_SERVER_PORT_STR) -# define ACE_DEFAULT_LOGGING_SERVER_PORT_STR "20008" -# endif /* ACE_DEFAULT_LOGGING_SERVER_PORT_STR */ - -// Used for the logging server. -# if !defined (ACE_DEFAULT_THR_LOGGING_SERVER_PORT) -# define ACE_DEFAULT_THR_LOGGING_SERVER_PORT 20008 -# endif /* ACE_DEFAULT_THR_LOGGING_SERVER_PORT */ - -# if !defined (ACE_DEFAULT_THR_LOGGING_SERVER_PORT_STR) -# define ACE_DEFAULT_THR_LOGGING_SERVER_PORT_STR "20008" -# endif /* ACE_DEFAULT_THR_LOGGING_SERVER_PORT_STR */ - -// Used for the time server. -# if !defined (ACE_DEFAULT_TIME_SERVER_PORT) -# define ACE_DEFAULT_TIME_SERVER_PORT 20009 -# endif /* ACE_DEFAULT_TIME_SERVER_PORT */ - -# if !defined (ACE_DEFAULT_TIME_SERVER_PORT_STR) -# define ACE_DEFAULT_TIME_SERVER_PORT_STR "20009" -# endif /* ACE_DEFAULT_TIME_SERVER_PORT_STR */ - -# if !defined (ACE_DEFAULT_TIME_SERVER_STR) -# define ACE_DEFAULT_TIME_SERVER_STR "ACE_TS_TIME" -# endif /* ACE_DEFAULT_TIME_SERVER_STR */ - -// Used by the FIFO tests -# if !defined (ACE_DEFAULT_RENDEZVOUS) -# if defined (ACE_HAS_STREAM_PIPES) -# define ACE_DEFAULT_RENDEZVOUS ACE_TEXT("/tmp/fifo.ace") -# else -# define ACE_DEFAULT_RENDEZVOUS ACE_TEXT("localhost:20010") -# endif /* ACE_HAS_STREAM_PIPES */ -# endif /* ACE_DEFAULT_RENDEZVOUS */ - -// Used for the UNIX syslog logging interface to ACE_Log_Msg. -# ifndef ACE_DEFAULT_SYSLOG_FACILITY -# define ACE_DEFAULT_SYSLOG_FACILITY LOG_USER -# endif /* ACE_DEFAULT_SYSLOG_FACILITY */ - -# if !defined (ACE_HAS_STREAM_LOG_MSG_IPC) -# if defined (ACE_HAS_STREAM_PIPES) -# define ACE_HAS_STREAM_LOG_MSG_IPC 1 -# else -# define ACE_HAS_STREAM_LOG_MSG_IPC 0 -# endif /* ACE_HAS_STREAM_PIPES */ -# endif /* !ACE_HAS_STREAM_LOG_MSG_IPC */ - -# if !defined (ACE_DEFAULT_LOGGER_KEY) -# if (ACE_HAS_STREAM_LOG_MSG_IPC == 1) -# define ACE_DEFAULT_LOGGER_KEY ACE_TEXT ("/tmp/server_daemon") -# else -# define ACE_DEFAULT_LOGGER_KEY ACE_TEXT ("localhost:20012") -# endif /* ACE_HAS_STREAM_LOG_MSG_IPC==1 */ -# endif /* ACE_DEFAULT_LOGGER_KEY */ - -// The way to specify the local host for loopback IP. This is usually -// "localhost" but it may need changing on some platforms. -# if !defined (ACE_LOCALHOST) -# define ACE_LOCALHOST ACE_TEXT ("localhost") -# endif - -// This specification for an IPv6 localhost should work on all platforms -// supporting IPv6 -# if defined (ACE_HAS_IPV6) -# if !defined (ACE_IPV6_LOCALHOST) -# define ACE_IPV6_LOCALHOST ACE_TEXT ("::1") -# endif /* ACE_IPV6_LOCALHOST*/ -#endif /* ACE_HAS_IPV6 */ - -// This specification for an IPv6 ANY address should work on all platforms -// supporting IPv6 -# if defined (ACE_HAS_IPV6) -# if !defined (ACE_IPV6_ANY) -# define ACE_IPV6_ANY ACE_TEXT ("::") -# endif /* ACE_IPV6_ANY*/ -#endif /* ACE_HAS_IPV6 */ - -# if !defined (ACE_DEFAULT_SERVER_HOST) -# if defined (ACE_HAS_IPV6) -# define ACE_DEFAULT_SERVER_HOST ACE_IPV6_LOCALHOST -# else /*ACE_HAS_IPV6*/ -# define ACE_DEFAULT_SERVER_HOST ACE_LOCALHOST -# endif /*ACE_HAS_IPV6*/ -# endif /* ACE_DEFAULT_SERVER_HOST */ - -// Default shared memory key -# if !defined (ACE_DEFAULT_SHM_KEY) -# define ACE_DEFAULT_SHM_KEY 1234 -# endif /* ACE_DEFAULT_SHM_KEY */ - -// Default address for shared memory mapped files and SYSV shared memory -// (defaults to 64 M). -# if !defined (ACE_DEFAULT_BASE_ADDR) -# define ACE_DEFAULT_BASE_ADDR ((char *) (64 * 1024 * 1024)) -# endif /* ACE_DEFAULT_BASE_ADDR */ - -// Default segment size used by SYSV shared memory (128 K) -# if !defined (ACE_DEFAULT_SEGMENT_SIZE) -# define ACE_DEFAULT_SEGMENT_SIZE 1024 * 128 -# endif /* ACE_DEFAULT_SEGMENT_SIZE */ - -// Maximum number of SYSV shared memory segments -// (does anyone know how to figure out the right values?!) -# if !defined (ACE_DEFAULT_MAX_SEGMENTS) -# define ACE_DEFAULT_MAX_SEGMENTS 6 -# endif /* ACE_DEFAULT_MAX_SEGMENTS */ - -// Name of the map that's stored in shared memory. -# if !defined (ACE_NAME_SERVER_MAP) -# define ACE_NAME_SERVER_MAP "Name Server Map" -# endif /* ACE_NAME_SERVER_MAP */ - -// Default file permissions. -# if !defined (ACE_DEFAULT_FILE_PERMS) -# if defined (ACE_VXWORKS) -# define ACE_DEFAULT_FILE_PERMS (S_IRUSR | S_IWUSR| S_IRGRP| S_IROTH) -# else -# define ACE_DEFAULT_FILE_PERMS 0644 -# endif /* ACE_VXWORKS */ -# endif /* ACE_DEFAULT_FILE_PERMS */ - -// Default directory permissions. -# if !defined (ACE_DEFAULT_DIR_PERMS) -# define ACE_DEFAULT_DIR_PERMS 0755 -# endif /* ACE_DEFAULT_DIR_PERMS */ - -# if !defined (ACE_DEFAULT_TIMEPROBE_TABLE_SIZE) -# define ACE_DEFAULT_TIMEPROBE_TABLE_SIZE 8 * 1024 -# endif /* ACE_DEFAULT_TIMEPROBE_TABLE_SIZE */ - -// Default size of the ACE Map_Manager. -# if !defined (ACE_DEFAULT_MAP_SIZE) -# define ACE_DEFAULT_MAP_SIZE 1024 -# endif /* ACE_DEFAULT_MAP_SIZE */ - -# if defined (ACE_DEFAULT_MAP_SIZE) && (ACE_DEFAULT_MAP_SIZE == 0) -# error ACE_DEFAULT_MAP_SIZE should not be zero -# endif /* ACE_DEFAULT_MAP_SIZE */ - -// Defaults for ACE Timer Wheel -# if !defined (ACE_DEFAULT_TIMER_WHEEL_SIZE) -# define ACE_DEFAULT_TIMER_WHEEL_SIZE 1024 -# endif /* ACE_DEFAULT_TIMER_WHEEL_SIZE */ - -# if !defined (ACE_DEFAULT_TIMER_WHEEL_RESOLUTION) -# define ACE_DEFAULT_TIMER_WHEEL_RESOLUTION 100 -# endif /* ACE_DEFAULT_TIMER_WHEEL_RESOLUTION */ - -// Default size for ACE Timer Hash table -# if !defined (ACE_DEFAULT_TIMER_HASH_TABLE_SIZE) -# define ACE_DEFAULT_TIMER_HASH_TABLE_SIZE 1024 -# endif /* ACE_DEFAULT_TIMER_HASH_TABLE_SIZE */ - -// Defaults for the ACE Free List -# if !defined (ACE_DEFAULT_FREE_LIST_PREALLOC) -# define ACE_DEFAULT_FREE_LIST_PREALLOC 0 -# endif /* ACE_DEFAULT_FREE_LIST_PREALLOC */ - -# if !defined (ACE_DEFAULT_FREE_LIST_LWM) -# define ACE_DEFAULT_FREE_LIST_LWM 0 -# endif /* ACE_DEFAULT_FREE_LIST_LWM */ - -# if !defined (ACE_DEFAULT_FREE_LIST_HWM) -# define ACE_DEFAULT_FREE_LIST_HWM 25000 -# endif /* ACE_DEFAULT_FREE_LIST_HWM */ - -# if !defined (ACE_DEFAULT_FREE_LIST_INC) -# define ACE_DEFAULT_FREE_LIST_INC 100 -# endif /* ACE_DEFAULT_FREE_LIST_INC */ - -# if !defined (ACE_UNIQUE_NAME_LEN) -# define ACE_UNIQUE_NAME_LEN 100 -# endif /* ACE_UNIQUE_NAME_LEN */ - -# if !defined (ACE_MAX_DGRAM_SIZE) - // This is just a guess. 8k is the normal limit on - // most machines because that's what NFS expects. -# define ACE_MAX_DGRAM_SIZE 8192 -# endif /* ACE_MAX_DGRAM_SIZE */ - -# if !defined (ACE_DEFAULT_ARGV_BUFSIZ) -# define ACE_DEFAULT_ARGV_BUFSIZ 1024 * 4 -# endif /* ACE_DEFAULT_ARGV_BUFSIZ */ - -// A free list which create more elements when there aren't enough -// elements. -# define ACE_FREE_LIST_WITH_POOL 1 - -// A simple free list which doen't allocate/deallocate elements. -# define ACE_PURE_FREE_LIST 2 - -# if defined (ACE_WIN32) - -// This is necessary to work around bugs with Win32 non-blocking -// connects... -# if !defined (ACE_NON_BLOCKING_BUG_DELAY) -# define ACE_NON_BLOCKING_BUG_DELAY 35000 -# endif /* ACE_NON_BLOCKING_BUG_DELAY */ -# endif /*ACE_WIN32*/ - -// Max size of an ACE Log Record data buffer. This can be reset in -// the config.h file if you'd like to increase or decrease the size. -# if !defined (ACE_MAXLOGMSGLEN) -# define ACE_MAXLOGMSGLEN 4 * 1024 -# endif /* ACE_MAXLOGMSGLEN */ - -// Max size of an ACE Token. -# define ACE_MAXTOKENNAMELEN 40 - -// Max size of an ACE Token client ID. -# define ACE_MAXCLIENTIDLEN MAXHOSTNAMELEN + 20 - -/// Max udp packet size -#if !defined (ACE_MAX_UDP_PACKET_SIZE) -#define ACE_MAX_UDP_PACKET_SIZE 65507 -#endif - -/** - * @name Default values to control CDR classes memory allocation strategies - */ -//@{ - -/// Control the initial size of all CDR buffers, application -/// developers may want to optimize this value to fit their request -/// size -#if !defined (ACE_DEFAULT_CDR_BUFSIZE) -# define ACE_DEFAULT_CDR_BUFSIZE 512 -#endif /* ACE_DEFAULT_CDR_BUFSIZE */ - -#if (ACE_DEFAULT_CDR_BUFSIZE == 0) -# error: ACE_DEFAULT_CDR_BUFSIZE should be bigger then 0 -#endif - -/// Stop exponential growth of CDR buffers to avoid overallocation -#if !defined (ACE_DEFAULT_CDR_EXP_GROWTH_MAX) -# define ACE_DEFAULT_CDR_EXP_GROWTH_MAX 65536 -#endif /* ACE_DEFAULT_CDR_EXP_GROWTH_MAX */ - -/// Control CDR buffer growth after maximum exponential growth is -/// reached -#if !defined (ACE_DEFAULT_CDR_LINEAR_GROWTH_CHUNK) -# define ACE_DEFAULT_CDR_LINEAR_GROWTH_CHUNK 65536 -#endif /* ACE_DEFAULT_CDR_LINEAR_GROWTH_CHUNK */ -//@} - -/// Control the zero-copy optimizations for octet sequences -/** - * Large octet sequences can be sent without any copies by chaining - * them in the list of message blocks that represent a single CDR - * stream. However, if the octet sequence is too small the zero copy - * optimizations actually hurt performance. Octet sequences smaller - * than this value will be copied. - */ -#if !defined (ACE_DEFAULT_CDR_MEMCPY_TRADEOFF) -#define ACE_DEFAULT_CDR_MEMCPY_TRADEOFF 256 -#endif /* ACE_DEFAULT_CDR_MEMCPY_TRADEOFF */ - -#if defined (ACE_WIN32) - // Define the pathname separator characters for Win32 (ugh). -# define ACE_DIRECTORY_SEPARATOR_STR_A "\\" -# define ACE_DIRECTORY_SEPARATOR_CHAR_A '\\' -#else - // Define the pathname separator characters for UNIX. -# define ACE_DIRECTORY_SEPARATOR_STR_A "/" -# define ACE_DIRECTORY_SEPARATOR_CHAR_A '/' -#endif /* ACE_WIN32 */ - -// Define the Wide character and normal versions of some of the string macros -#if defined (ACE_HAS_WCHAR) -# define ACE_DIRECTORY_SEPARATOR_STR_W ACE_TEXT_WIDE(ACE_DIRECTORY_SEPARATOR_STR_A) -# define ACE_DIRECTORY_SEPARATOR_CHAR_W ACE_TEXT_WIDE(ACE_DIRECTORY_SEPARATOR_CHAR_A) -#endif /* ACE_HAS_WCHAR */ - -#define ACE_DIRECTORY_SEPARATOR_STR ACE_TEXT (ACE_DIRECTORY_SEPARATOR_STR_A) -#define ACE_DIRECTORY_SEPARATOR_CHAR ACE_TEXT (ACE_DIRECTORY_SEPARATOR_CHAR_A) - -#if !defined (ACE_DEFAULT_THREAD_PRIORITY) -# define ACE_DEFAULT_THREAD_PRIORITY (-0x7fffffffL - 1L) -#endif /* ACE_DEFAULT_THREAD_PRIORITY */ - -#if !defined (ACE_DEFAULT_THREAD_STACKSIZE) -# define ACE_DEFAULT_THREAD_STACKSIZE 0 -#endif /* ACE_DEFAULT_THREAD_STACKSIZE */ - -#if !defined (ACE_MAX_DEFAULT_PORT) -# define ACE_MAX_DEFAULT_PORT 65535 -#endif /* ACE_MAX_DEFAULT_PORT */ - -// Default number of ACE_Event_Handlers supported by -// ACE_Timer_Heap. -#if !defined (ACE_DEFAULT_TIMERS) && defined (_POSIX_TIMER_MAX) -# define ACE_DEFAULT_TIMERS _POSIX_TIMER_MAX -#endif /* ACE_DEFAULT_TIMERS */ - -#if !defined (ACE_DEFAULT_TIMERS) || (defined (ACE_DEFAULT_TIMERS) && (ACE_DEFAULT_TIMERS == 0)) -#error ACE_DEFAULT_TIMERS should be defined and not be zero -#endif /* ACE_DEFAULT_TIMERS */ - -#if defined (ACE_WIN32) -# define ACE_PLATFORM_A "Win32" -# define ACE_PLATFORM_EXE_SUFFIX_A ".exe" -#elif defined (ACE_VXWORKS) -# define ACE_PLATFORM_A "VxWorks" -# if defined (__RTP__) -# define ACE_PLATFORM_EXE_SUFFIX_A ".vxe" -# else -# define ACE_PLATFORM_EXE_SUFFIX_A ".out" -# endif -#else /* !ACE_WIN32 && !ACE_VXWORKS */ -# define ACE_PLATFORM_A "UNIX" -# define ACE_PLATFORM_EXE_SUFFIX_A "" -#endif /* ACE_WIN32 */ - -// Define the Wide character and normal versions of some of the string macros -#if defined (ACE_HAS_WCHAR) -# define ACE_PLATFORM_W ACE_TEXT_WIDE(ACE_PLATFORM_A) -# define ACE_PLATFORM_EXE_SUFFIX_W ACE_TEXT_WIDE(ACE_PLATFORM_EXE_SUFFIX_A) -#endif /* ACE_HAS_WCHAR */ - -#define ACE_PLATFORM ACE_TEXT (ACE_PLATFORM_A) -#define ACE_PLATFORM_EXE_SUFFIX ACE_TEXT (ACE_PLATFORM_EXE_SUFFIX_A) - -#if defined (ACE_WIN32) -# define ACE_LD_SEARCH_PATH ACE_TEXT ("PATH") -# define ACE_LD_SEARCH_PATH_SEPARATOR_STR ACE_TEXT (";") -# define ACE_DLL_SUFFIX ACE_TEXT (".dll") -# if !defined (ACE_DLL_PREFIX) -# define ACE_DLL_PREFIX ACE_TEXT ("") -# endif /* !ACE_DLL_PREFIX */ -#else /* !ACE_WIN32 */ -# if !defined (ACE_LD_SEARCH_PATH) -# define ACE_LD_SEARCH_PATH ACE_TEXT ("LD_LIBRARY_PATH") -# endif /* ACE_LD_SEARCH_PATH */ -# if !defined (ACE_LD_SEARCH_PATH_SEPARATOR_STR) -# define ACE_LD_SEARCH_PATH_SEPARATOR_STR ACE_TEXT (":") -# endif /* ACE_LD_SEARCH_PATH_SEPARATOR_STR */ -#endif /* ACE_WIN32 */ - -#if !defined (ACE_DLL_SUFFIX) -# define ACE_DLL_SUFFIX ACE_TEXT (".so") -#endif /* ACE_DLL_SUFFIX */ - -#if !defined (ACE_DLL_PREFIX) -# define ACE_DLL_PREFIX ACE_TEXT ("lib") -#endif /* ACE_DLL_PREFIX */ - -#if defined (ACE_WIN32) -// Used for dynamic linking -# if !defined (ACE_DEFAULT_SVC_CONF) -# if (ACE_USES_CLASSIC_SVC_CONF == 1) -# define ACE_DEFAULT_SVC_CONF ACE_TEXT (".\\svc.conf") -# else -# define ACE_DEFAULT_SVC_CONF ACE_TEXT (".\\svc.conf.xml") -# endif /* ACE_USES_CLASSIC_SVC_CONF ==1 */ -# endif /* ACE_DEFAULT_SVC_CONF */ -#endif /* ACE_WIN32 */ - - // Used for dynamic linking. -#if !defined (ACE_DEFAULT_SVC_CONF) -# if (ACE_USES_CLASSIC_SVC_CONF == 1) -# define ACE_DEFAULT_SVC_CONF ACE_TEXT ("./svc.conf") -# else -# define ACE_DEFAULT_SVC_CONF ACE_TEXT ("./svc.conf.xml") -# endif /* ACE_USES_CLASSIC_SVC_CONF ==1 */ -#endif /* ACE_DEFAULT_SVC_CONF */ - -#if !defined (ACE_LOGGER_KEY) -# define ACE_LOGGER_KEY ACE_TEXT ("/tmp/server_daemon") -#endif /* ACE_LOGGER_KEY */ - -// Theses defines are used by the ACE Name Server. -#if !defined (ACE_DEFAULT_LOCALNAME_A) -# define ACE_DEFAULT_LOCALNAME_A "localnames" -#endif /* ACE_DEFAULT_LOCALNAME_A */ -#if !defined (ACE_DEFAULT_GLOBALNAME_A) -# define ACE_DEFAULT_GLOBALNAME_A "globalnames" -#endif /* ACE_DEFAULT_GLOBALNAME_A */ - -#if defined (ACE_HAS_WCHAR) -# define ACE_DEFAULT_LOCALNAME_W ACE_TEXT_WIDE(ACE_DEFAULT_LOCALNAME_A) -# define ACE_DEFAULT_GLOBALNAME_W ACE_TEXT_WIDE(ACE_DEFAULT_GLOBALNAME_A) -#endif /* ACE_HAS_WCHAR */ - -#define ACE_DEFAULT_LOCALNAME ACE_TEXT (ACE_DEFAULT_LOCALNAME_A) -#define ACE_DEFAULT_GLOBALNAME ACE_TEXT (ACE_DEFAULT_GLOBALNAME_A) - -#if !defined (ACE_DEFAULT_OPEN_PERMS) -# define ACE_DEFAULT_OPEN_PERMS ACE_DEFAULT_FILE_PERMS -#endif /* ACE_DEFAULT_OPEN_PERMS */ - -#if !defined (ACE_DEFAULT_RW_PROCESS_MUTEX_PERMS) -# if defined (ACE_WIN32) -# define ACE_DEFAULT_RW_PROCESS_MUTEX_PERMS ACE_DEFAULT_OPEN_PERMS -# else -# define ACE_DEFAULT_RW_PROCESS_MUTEX_PERMS (S_IRUSR | S_IWUSR) -# endif /* ACE_WIN32 */ -#endif /* ACE_DEFAULT_RW_PROCESS_MUTEX_PERMS */ - -# if defined (ACE_WIN32) - // The "null" device on Win32. -# define ACE_DEV_NULL "nul" -# define ACE_SYSCALL_FAILED 0xFFFFFFFF -# else /* !ACE_WIN32 */ - // The "null" device on UNIX. -# define ACE_DEV_NULL "/dev/null" -# define ACE_SYSCALL_FAILED -1 -# endif /* ACE_WIN32 */ - -#include /**/ "ace/post.h" -#endif /*ACE_DEFAULT_CONSTANTS_H*/ diff --git a/modules/worldengine/deps/acelite/ace/Dev_Poll_Reactor.cpp b/modules/worldengine/deps/acelite/ace/Dev_Poll_Reactor.cpp deleted file mode 100644 index 87d78be719..0000000000 --- a/modules/worldengine/deps/acelite/ace/Dev_Poll_Reactor.cpp +++ /dev/null @@ -1,2578 +0,0 @@ -#include "ace/OS_NS_errno.h" -#include "ace/Dev_Poll_Reactor.h" -#include "ace/Signal.h" -#include "ace/Sig_Handler.h" -#include "ace/Flag_Manip.h" - -#if defined (ACE_HAS_EVENT_POLL) || defined (ACE_HAS_DEV_POLL) - -# include "ace/OS_NS_unistd.h" -# include "ace/OS_NS_fcntl.h" -# include "ace/OS_NS_stropts.h" - -# if defined (ACE_HAS_DEV_POLL) -# if defined (ACE_LINUX) -# include /**/ -# elif defined (HPUX_VERS) && HPUX_VERS < 1123 -# include /**/ -# else -# include /**/ -# endif /* ACE_LINUX */ -# endif /* ACE_HAS_DEV_POLL */ - -#if !defined (__ACE_INLINE__) -# include "ace/Dev_Poll_Reactor.inl" -#endif /* __ACE_INLINE__ */ - - -#include "ace/Handle_Set.h" -#include "ace/Reactor.h" -#include "ace/Timer_Heap.h" -#include "ace/Timer_Queue.h" -#include "ace/ACE.h" -#include "ace/Reverse_Lock_T.h" -#include "ace/Recursive_Thread_Mutex.h" -#include "ace/Null_Mutex.h" -#include "ace/os_include/os_poll.h" -#include "ace/OS_NS_sys_mman.h" -#include "ace/Guard_T.h" -#include "ace/OS_NS_string.h" -#include "ace/OS_NS_sys_time.h" -#include "ace/Functor_T.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_Dev_Poll_Reactor_Notify::ACE_Dev_Poll_Reactor_Notify (void) - : dp_reactor_ (0) - , notification_pipe_ () - , max_notify_iterations_ (-1) -#if defined (ACE_HAS_REACTOR_NOTIFICATION_QUEUE) - , notification_queue_ () -#endif /* ACE_HAS_REACTOR_NOTIFICATION_QUEUE */ -{ -} - -int -ACE_Dev_Poll_Reactor_Notify::open (ACE_Reactor_Impl *r, - ACE_Timer_Queue * /* timer_queue */, - int disable_notify_pipe) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor_Notify::open"); - - if (disable_notify_pipe == 0) - { - this->dp_reactor_ = dynamic_cast (r); - - if (this->dp_reactor_ == 0) - { - errno = EINVAL; - return -1; - } - - if (this->notification_pipe_.open () == -1) - return -1; - -#if defined (F_SETFD) - // close-on-exec - ACE_OS::fcntl (this->notification_pipe_.read_handle (), F_SETFD, 1); - ACE_OS::fcntl (this->notification_pipe_.write_handle (), F_SETFD, 1); -#endif /* F_SETFD */ - -#if defined (ACE_HAS_REACTOR_NOTIFICATION_QUEUE) - if (notification_queue_.open () == -1) - { - return -1; - } - - if (ACE::set_flags (this->notification_pipe_.write_handle (), - ACE_NONBLOCK) == -1) - return -1; -#endif /* ACE_HAS_REACTOR_NOTIFICATION_QUEUE */ - - // Set the read handle into non-blocking mode since we need to - // perform a "speculative" read when determining if there are - // notifications to dispatch. - if (ACE::set_flags (this->notification_pipe_.read_handle (), - ACE_NONBLOCK) == -1) - return -1; - } - - return 0; -} - -int -ACE_Dev_Poll_Reactor_Notify::close (void) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor_Notify::close"); - -#if defined (ACE_HAS_REACTOR_NOTIFICATION_QUEUE) - notification_queue_.reset (); -#endif /* ACE_HAS_REACTOR_NOTIFICATION_QUEUE */ - - return this->notification_pipe_.close (); -} - -int -ACE_Dev_Poll_Reactor_Notify::notify (ACE_Event_Handler *eh, - ACE_Reactor_Mask mask, - ACE_Time_Value *timeout) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor_Notify::notify"); - - // Just consider this method a "no-op" if there's no - // ACE_Dev_Poll_Reactor configured. - if (this->dp_reactor_ == 0) - return 0; - - ACE_Notification_Buffer buffer (eh, mask); - -#if defined (ACE_HAS_REACTOR_NOTIFICATION_QUEUE) - ACE_UNUSED_ARG (timeout); - ACE_Dev_Poll_Handler_Guard eh_guard (eh); - - // When using the queue, always try to write to the notify pipe. If it - // fills up, ignore it safely because the already-written bytes will - // eventually cause the notify handler to be dispatched. - if (-1 == this->notification_queue_.push_new_notification (buffer)) - return -1; // Also decrement eh's reference count - - // The notification has been queued, so it will be delivered at some - // point (and may have been already); release the refcnt guard. - eh_guard.release (); - - // Now pop the pipe to force the callback for dispatching when ready. If - // the send fails due to a full pipe, don't fail - assume the already-sent - // pipe bytes will cause the entire notification queue to be processed. - // Note that we don't need a timeout since the pipe is already in - // nonblocking mode and all we want is one attempt. - ssize_t n = ACE::send (this->notification_pipe_.write_handle (), - (char *) &buffer, - 1); // Only need one byte to pop the pipe - if (n == -1 && (errno != EAGAIN)) - return -1; - - return 0; -#else - - ACE_Dev_Poll_Handler_Guard eh_guard (eh); - - ssize_t n = ACE::send (this->notification_pipe_.write_handle (), - (char *) &buffer, - sizeof buffer, - timeout); - if (n == -1) - return -1; - - eh_guard.release (); - - return 0; -#endif /* ACE_HAS_REACTOR_NOTIFICATION_QUEUE */ -} - -int -ACE_Dev_Poll_Reactor_Notify::dispatch_notifications ( - int & /* number_of_active_handles */, - ACE_Handle_Set & /* rd_mask */) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor_Notify::dispatch_notifications"); - - // This method is unimplemented in the ACE_Dev_Poll_Reactor. - // Instead, the notification handler is invoked as part of the IO - // event set. Doing so alters the some documented semantics that - // state that the notifications are handled before IO events. - // Enforcing such semantics does not appear to be beneficial, and - // also serves to slow down event dispatching particularly with this - // ACE_Dev_Poll_Reactor. - - ACE_NOTSUP_RETURN (-1); -} - -int -ACE_Dev_Poll_Reactor_Notify::read_notify_pipe (ACE_HANDLE handle, - ACE_Notification_Buffer &buffer) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor_Notify::read_notify_pipe"); - - // This is a (non-blocking) "speculative" read, i.e., we attempt to - // read even if no event was polled on the read handle. A - // speculative read is necessary since notifications must be - // dispatched before IO events. We can avoid the speculative read - // by "walking" the array of pollfd structures returned from - // `/dev/poll' or `/dev/epoll' but that is potentially much more - // expensive than simply checking for an EWOULDBLOCK. - size_t to_read; - char *read_p; - -#if defined (ACE_HAS_REACTOR_NOTIFICATION_QUEUE) - // The idea in the queued case is to be sure we never end up with a notify - // queued but no byte in the pipe. If that happens, the notify won't be - // dispatched. So always try to empty the pipe, read the queue, then put - // a byte in if needed. The notify() method is enqueueing then writing the - // pipe, so be sure to do it in the reverse order here to avoid a race - // between removing the last notification from the queue and the notify - // side writing its byte. - char b[1024]; - read_p = b; - to_read = sizeof(b); - (void)ACE::recv (handle, read_p, to_read); - - bool more_messages_queued = false; - ACE_Notification_Buffer next; - int result = 1; - while (result == 1) - { - result = notification_queue_.pop_next_notification (buffer, - more_messages_queued, - next); - - if (result <= 0) // Nothing dequeued or error - return result; - - // If it's just a wake-up, toss it and see if there's anything else. - if (buffer.eh_ != 0) - break; - } - - // If there are more messages, ensure there's a byte in the pipe - // in case the notification limit stops dequeuing notifies before - // emptying the queue. - if (more_messages_queued) - (void) ACE::send (this->notification_pipe_.write_handle (), - (char *)&next, - 1); /* one byte is enough */ - return 1; -#else - to_read = sizeof buffer; - read_p = (char *)&buffer; - - ssize_t n = ACE::recv (handle, read_p, to_read); - - if (n > 0) - { - // Check to see if we've got a short read. - if (static_cast (n) != to_read) - { - size_t remainder = to_read - n; - - // If so, try to recover by reading the remainder. If this - // doesn't work we're in big trouble since the input stream - // won't be aligned correctly. I'm not sure quite what to - // do at this point. It's probably best just to return -1. - if (ACE::recv (handle, &read_p[n], remainder) <= 0) - return -1; - } - - return 1; - } - - // Return -1 if things have gone seriously wrong. - if (n <= 0 && (errno != EWOULDBLOCK && errno != EAGAIN)) - return -1; - - return 0; -#endif /* ACE_HAS_REACTOR_NOTIFICATION_QUEUE */ -} - - -int -ACE_Dev_Poll_Reactor_Notify::handle_input (ACE_HANDLE /*handle*/) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor_Notify::handle_input"); - ACELIB_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("SHOULD NOT BE HERE.\n")), -1); -} - -ACE_HANDLE -ACE_Dev_Poll_Reactor_Notify::notify_handle (void) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor_Notify::notify_handle"); - - return this->notification_pipe_.read_handle (); -} - -int -ACE_Dev_Poll_Reactor_Notify::is_dispatchable (ACE_Notification_Buffer &) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor_Notify::is_dispatchable"); - - ACE_NOTSUP_RETURN (-1); -} - -int -ACE_Dev_Poll_Reactor_Notify::dispatch_notify (ACE_Notification_Buffer &buffer) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor_Notify::dispatch_notify"); - - // If eh == 0 then another thread is unblocking the - // ACE_Dev_Poll_Reactor to update the ACE_Dev_Poll_Reactor's - // internal structures. Otherwise, we need to dispatch the - // appropriate handle_* method on the ACE_Event_Handler - // pointer we've been passed. - if (buffer.eh_ != 0) - { - int result = 0; - - // Guard the handler's refcount. Recall that when the notify - // was queued, the refcount was incremented, so it need not be - // now. The guard insures that it is decremented properly. - ACE_Dev_Poll_Handler_Guard eh_guard (buffer.eh_, false); - - switch (buffer.mask_) - { - case ACE_Event_Handler::READ_MASK: - case ACE_Event_Handler::ACCEPT_MASK: - result = buffer.eh_->handle_input (ACE_INVALID_HANDLE); - break; - case ACE_Event_Handler::WRITE_MASK: - result = buffer.eh_->handle_output (ACE_INVALID_HANDLE); - break; - case ACE_Event_Handler::EXCEPT_MASK: - result = buffer.eh_->handle_exception (ACE_INVALID_HANDLE); - break; - default: - // Should we bail out if we get an invalid mask? - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("dispatch_notify invalid mask = %d\n"), - buffer.mask_)); - } - if (result == -1) - buffer.eh_->handle_close (ACE_INVALID_HANDLE, buffer.mask_); - } - - return 1; -} - -void -ACE_Dev_Poll_Reactor_Notify::max_notify_iterations (int iterations) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor_Notify::max_notify_iterations"); - - // Must always be > 0 or < 0 to optimize the loop exit condition. - if (iterations == 0) - iterations = 1; - - this->max_notify_iterations_ = iterations; -} - -int -ACE_Dev_Poll_Reactor_Notify::max_notify_iterations (void) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor_Notify::max_notify_iterations"); - - return this->max_notify_iterations_; -} - -int -ACE_Dev_Poll_Reactor_Notify::purge_pending_notifications ( - ACE_Event_Handler *eh, - ACE_Reactor_Mask mask) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor_Notify::purge_pending_notifications"); - -#if defined (ACE_HAS_REACTOR_NOTIFICATION_QUEUE) - - return notification_queue_.purge_pending_notifications (eh, mask); - -#else /* defined (ACE_HAS_REACTOR_NOTIFICATION_QUEUE) */ - ACE_UNUSED_ARG (eh); - ACE_UNUSED_ARG (mask); - ACE_NOTSUP_RETURN (-1); -#endif /* defined (ACE_HAS_REACTOR_NOTIFICATION_QUEUE) */ -} - -void -ACE_Dev_Poll_Reactor_Notify::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_Dev_Poll_Reactor_Notify::dump"); - - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - ACELIB_DEBUG ((LM_DEBUG, - ACE_TEXT ("dp_reactor_ = %@"), - this->dp_reactor_)); - this->notification_pipe_.dump (); - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} - -int -ACE_Dev_Poll_Reactor_Notify::dequeue_one (ACE_Notification_Buffer &nb) -{ - nb.eh_ = 0; - nb.mask_ = 0; - return this->read_notify_pipe (this->notify_handle (), nb); -} - - -// ----------------------------------------------------------------- - -ACE_Dev_Poll_Reactor::Handler_Repository::Handler_Repository (void) - : size_ (0), - max_size_ (0), - handlers_ (0) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::Handler_Repository::Handler_Repository"); -} - -bool -ACE_Dev_Poll_Reactor::Handler_Repository::invalid_handle ( - ACE_HANDLE handle) const -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::Handler_Repository::invalid_handle"); - - if (handle < 0 || handle >= this->max_size_) - { - errno = EINVAL; - return true; - } - else - return false; -} - -bool -ACE_Dev_Poll_Reactor::Handler_Repository::handle_in_range ( - ACE_HANDLE handle) const -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::Handler_Repository::handle_in_range"); - - if (handle >= 0 && handle < this->max_size_) - return true; - else - { - errno = EINVAL; - return false; - } -} - -int -ACE_Dev_Poll_Reactor::Handler_Repository::open (size_t size) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::Handler_Repository::open"); - - this->max_size_ = size; - - // Try to allocate the memory. - ACE_NEW_RETURN (this->handlers_, Event_Tuple[size], -1); - - // Try to increase the number of handles if is greater than - // the current limit. - return ACE::set_handle_limit (size); -} - -int -ACE_Dev_Poll_Reactor::Handler_Repository::unbind_all (void) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::Handler_Repository::unbind_all"); - - // Unbind all of the event handlers; similar to remove_handler() on all. - for (int handle = 0; - handle < this->max_size_; - ++handle) - { - Event_Tuple *entry = this->find (handle); - if (entry == 0) - continue; - - // Check for ref counting now - handle_close () may delete eh. - bool const requires_reference_counting = - entry->event_handler->reference_counting_policy ().value () == - ACE_Event_Handler::Reference_Counting_Policy::ENABLED; - - (void) entry->event_handler->handle_close (handle, entry->mask); - this->unbind (handle, requires_reference_counting); - } - - return 0; -} - -int -ACE_Dev_Poll_Reactor::Handler_Repository::close (void) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::Handler_Repository::close"); - - if (this->handlers_ != 0) - { - this->unbind_all (); - - delete [] this->handlers_; - this->handlers_ = 0; - } - - return 0; -} - -ACE_Dev_Poll_Reactor::Event_Tuple * -ACE_Dev_Poll_Reactor::Handler_Repository::find (ACE_HANDLE handle) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::Handler_Repository::find"); - - Event_Tuple *tuple = 0; - - // Only bother to search for the if it's in range. - if (!this->handle_in_range (handle)) - { - errno = ERANGE; - return 0; - } - - tuple = &(this->handlers_[handle]); - if (tuple->event_handler == 0) - { - errno = ENOENT; - tuple = 0; - } - - return tuple; -} - -int -ACE_Dev_Poll_Reactor::Handler_Repository::bind ( - ACE_HANDLE handle, - ACE_Event_Handler *event_handler, - ACE_Reactor_Mask mask) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::Handler_Repository::bind"); - - if (event_handler == 0) - return -1; - - if (handle == ACE_INVALID_HANDLE) - handle = event_handler->get_handle (); - - if (this->invalid_handle (handle)) - return -1; - - this->handlers_[handle].event_handler = event_handler; - this->handlers_[handle].mask = mask; - event_handler->add_reference (); - ++this->size_; - - return 0; -} - -int -ACE_Dev_Poll_Reactor::Handler_Repository::unbind (ACE_HANDLE handle, - bool decr_refcnt) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::Handler_Repository::unbind"); - - Event_Tuple *entry = this->find (handle); - if (entry == 0) - return -1; - - if (decr_refcnt) - entry->event_handler->remove_reference (); - - entry->event_handler = 0; - entry->mask = ACE_Event_Handler::NULL_MASK; - entry->suspended = false; - entry->controlled = false; - --this->size_; - return 0; -} - -// ----------------------------------------------------------------- - -ACE_Dev_Poll_Reactor::ACE_Dev_Poll_Reactor (ACE_Sig_Handler *sh, - ACE_Timer_Queue *tq, - int disable_notify_pipe, - ACE_Reactor_Notify *notify, - int mask_signals, - int s_queue) - : initialized_ (false) - , poll_fd_ (ACE_INVALID_HANDLE) - // , ready_set_ () -#if defined (ACE_HAS_DEV_POLL) - , dp_fds_ (0) - , start_pfds_ (0) - , end_pfds_ (0) -#endif /* ACE_HAS_DEV_POLL */ - , token_ (*this, s_queue) - , lock_adapter_ (token_) - , deactivated_ (0) - , timer_queue_ (0) - , delete_timer_queue_ (false) - , signal_handler_ (0) - , delete_signal_handler_ (false) - , notify_handler_ (0) - , delete_notify_handler_ (false) - , mask_signals_ (mask_signals) - , restart_ (0) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::ACE_Dev_Poll_Reactor"); - - if (this->open (ACE::max_handles (), - 0, - sh, - tq, - disable_notify_pipe, - notify) == -1) - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("%p\n"), - ACE_TEXT ("ACE_Dev_Poll_Reactor::open ") - ACE_TEXT ("failed inside ") - ACE_TEXT ("ACE_Dev_Poll_Reactor::CTOR"))); -} - -ACE_Dev_Poll_Reactor::ACE_Dev_Poll_Reactor (size_t size, - bool rs, - ACE_Sig_Handler *sh, - ACE_Timer_Queue *tq, - int disable_notify_pipe, - ACE_Reactor_Notify *notify, - int mask_signals, - int s_queue) - : initialized_ (false) - , poll_fd_ (ACE_INVALID_HANDLE) - // , ready_set_ () -#if defined (ACE_HAS_DEV_POLL) - , dp_fds_ (0) - , start_pfds_ (0) - , end_pfds_ (0) -#endif /* ACE_HAS_DEV_POLL */ - , token_ (*this, s_queue) - , lock_adapter_ (token_) - , deactivated_ (0) - , timer_queue_ (0) - , delete_timer_queue_ (false) - , signal_handler_ (0) - , delete_signal_handler_ (false) - , notify_handler_ (0) - , delete_notify_handler_ (false) - , mask_signals_ (mask_signals) - , restart_ (0) -{ - if (this->open (size, - rs, - sh, - tq, - disable_notify_pipe, - notify) == -1) - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("%p\n"), - ACE_TEXT ("ACE_Dev_Poll_Reactor::open ") - ACE_TEXT ("failed inside ACE_Dev_Poll_Reactor::CTOR"))); -} - -ACE_Dev_Poll_Reactor::~ACE_Dev_Poll_Reactor (void) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::~ACE_Dev_Poll_Reactor"); - - (void) this->close (); -} - -int -ACE_Dev_Poll_Reactor::open (size_t size, - bool restart, - ACE_Sig_Handler *sh, - ACE_Timer_Queue *tq, - int disable_notify_pipe, - ACE_Reactor_Notify *notify) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::open"); - - ACE_MT (ACE_GUARD_RETURN (ACE_Dev_Poll_Reactor_Token, mon, this->token_, -1)); - - // Can't initialize ourselves more than once. - if (this->initialized_) - return -1; - -#ifdef ACE_HAS_EVENT_POLL - ACE_OS::memset (&this->event_, 0, sizeof (this->event_)); - this->event_.data.fd = ACE_INVALID_HANDLE; -#endif /* ACE_HAS_EVENT_POLL */ - - this->restart_ = restart; - this->signal_handler_ = sh; - this->timer_queue_ = tq; - this->notify_handler_ = notify; - - int result = 0; - - // Allows the signal handler to be overridden. - if (this->signal_handler_ == 0) - { - ACE_NEW_RETURN (this->signal_handler_, - ACE_Sig_Handler, - -1); - - if (this->signal_handler_ == 0) - result = -1; - else - this->delete_signal_handler_ = true; - } - - // Allows the timer queue to be overridden. - if (result != -1 && this->timer_queue_ == 0) - { - ACE_NEW_RETURN (this->timer_queue_, - ACE_Timer_Heap, - -1); - - if (this->timer_queue_ == 0) - result = -1; - else - this->delete_timer_queue_ = true; - } - - // Allows the Notify_Handler to be overridden. - if (result != -1 && this->notify_handler_ == 0) - { - ACE_NEW_RETURN (this->notify_handler_, - ACE_Dev_Poll_Reactor_Notify, - -1); - - if (this->notify_handler_ == 0) - result = -1; - else - this->delete_notify_handler_ = true; - } - -#if defined (ACE_HAS_EVENT_POLL) - - // Initialize epoll: - this->poll_fd_ = ::epoll_create (size); - if (this->poll_fd_ == -1) - result = -1; - -#else - - // Allocate the array before opening the device to avoid a potential - // resource leak if allocation fails. - ACE_NEW_RETURN (this->dp_fds_, - pollfd[size], - -1); - - // Open the `/dev/poll' character device. - this->poll_fd_ = ACE_OS::open ("/dev/poll", O_RDWR); - if (this->poll_fd_ == ACE_INVALID_HANDLE) - result = -1; - -#endif /* ACE_HAS_EVENT_POLL */ - - if (result != -1 && this->handler_rep_.open (size) == -1) - result = -1; - - // Registration of the notification handler must be done after the - // /dev/poll device has been fully initialized. - else if (this->notify_handler_->open (this, - 0, - disable_notify_pipe) == -1 - || (disable_notify_pipe == 0 - && this->register_handler_i ( - this->notify_handler_->notify_handle (), - this->notify_handler_, - ACE_Event_Handler::READ_MASK) == -1)) - result = -1; - - if (result != -1) - // We're all set to go. - this->initialized_ = true; - else - // This will close down all the allocated resources properly. - (void) this->close (); - - return result; -} - -int -ACE_Dev_Poll_Reactor::current_info (ACE_HANDLE, size_t & /* size */) -{ - ACE_NOTSUP_RETURN (-1); -} - - -int -ACE_Dev_Poll_Reactor::set_sig_handler (ACE_Sig_Handler *signal_handler) -{ - if (this->delete_signal_handler_) - delete this->signal_handler_; - - this->signal_handler_ = signal_handler; - this->delete_signal_handler_ = false; - - return 0; -} - -int -ACE_Dev_Poll_Reactor::timer_queue (ACE_Timer_Queue *tq) -{ - if (this->delete_timer_queue_) - delete this->timer_queue_; - else if (this->timer_queue_) - this->timer_queue_->close (); - - this->timer_queue_ = tq; - this->delete_timer_queue_ = false; - - return 0; -} - -ACE_Timer_Queue * -ACE_Dev_Poll_Reactor::timer_queue (void) const -{ - return this->timer_queue_; -} - -int -ACE_Dev_Poll_Reactor::close (void) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::close"); - - ACE_MT (ACE_GUARD_RETURN (ACE_Dev_Poll_Reactor_Token, mon, this->token_, -1)); - - int result = 0; - - if (this->poll_fd_ != ACE_INVALID_HANDLE) - { - result = ACE_OS::close (this->poll_fd_); - } - -#if defined (ACE_HAS_EVENT_POLL) - - ACE_OS::memset (&this->event_, 0, sizeof (this->event_)); - this->event_.data.fd = ACE_INVALID_HANDLE; - -#else - - delete [] this->dp_fds_; - this->dp_fds_ = 0; - this->start_pfds_ = 0; - this->end_pfds_ = 0; - -#endif /* ACE_HAS_EVENT_POLL */ - - if (this->delete_signal_handler_) - { - delete this->signal_handler_; - this->signal_handler_ = 0; - this->delete_signal_handler_ = false; - } - - (void) this->handler_rep_.close (); - - if (this->delete_timer_queue_) - { - delete this->timer_queue_; - this->timer_queue_ = 0; - this->delete_timer_queue_ = false; - } - else if (this->timer_queue_) - { - this->timer_queue_->close (); - this->timer_queue_ = 0; - } - - if (this->notify_handler_ != 0) - this->notify_handler_->close (); - - if (this->delete_notify_handler_) - { - delete this->notify_handler_; - this->notify_handler_ = 0; - this->delete_notify_handler_ = false; - } - - this->poll_fd_ = ACE_INVALID_HANDLE; - - this->initialized_ = false; - - return result; -} - -int -ACE_Dev_Poll_Reactor::work_pending (const ACE_Time_Value & max_wait_time) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::work_pending"); - - // Stash the current time - // - // The destructor of this object will automatically compute how much - // time elapsed since this method was called. - ACE_Time_Value mwt (max_wait_time); - ACE_MT (ACE_Countdown_Time countdown (&mwt)); - - Token_Guard guard (this->token_); - int const result = guard.acquire_quietly (&mwt); - - // If the guard is NOT the owner just return the retval - if (!guard.is_owner ()) - return result; - - // Update the countdown to reflect time waiting for the mutex. - ACE_MT (countdown.update ()); - - return this->work_pending_i (&mwt); -} - -int -ACE_Dev_Poll_Reactor::work_pending_i (ACE_Time_Value * max_wait_time) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::work_pending_i"); - - if (this->deactivated_) - return 0; - -#if defined (ACE_HAS_EVENT_POLL) - if (this->event_.data.fd != ACE_INVALID_HANDLE) -#else - if (this->start_pfds_ != this->end_pfds_) -#endif /* ACE_HAS_EVENT_POLL */ - return 1; // We still have work_pending (). Do not poll for - // additional events. - - ACE_Time_Value timer_buf (0); - ACE_Time_Value *this_timeout = - this->timer_queue_->calculate_timeout (max_wait_time, &timer_buf); - - // Check if we have timers to fire. - int const timers_pending = - ((this_timeout != 0 && max_wait_time == 0) - || (this_timeout != 0 && max_wait_time != 0 - && *this_timeout != *max_wait_time) ? 1 : 0); - - long const timeout = - (this_timeout == 0 - ? -1 /* Infinity */ - : static_cast (this_timeout->msec ())); - -#if defined (ACE_HAS_EVENT_POLL) - - // Wait for an event. - int const nfds = ::epoll_wait (this->poll_fd_, - &this->event_, - 1, - static_cast (timeout)); - -#else - - struct dvpoll dvp; - - dvp.dp_fds = this->dp_fds_; - dvp.dp_nfds = this->handler_rep_.size (); - dvp.dp_timeout = timeout; // Milliseconds - - // Poll for events - int const nfds = ACE_OS::ioctl (this->poll_fd_, DP_POLL, &dvp); - - // Retrieve the results from the pollfd array. - this->start_pfds_ = dvp.dp_fds; - - // If nfds == 0 then end_pfds_ == start_pfds_ meaning that there is - // no work pending. If nfds > 0 then there is work pending. - // Otherwise an error occurred. - if (nfds > -1) - this->end_pfds_ = this->start_pfds_ + nfds; -#endif /* ACE_HAS_EVENT_POLL */ - - // If timers are pending, override any timeout from the poll. - return (nfds == 0 && timers_pending != 0 ? 1 : nfds); -} - - -int -ACE_Dev_Poll_Reactor::handle_events (ACE_Time_Value *max_wait_time) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::handle_events"); - - // Stash the current time - // - // The destructor of this object will automatically compute how much - // time elapsed since this method was called. - ACE_Countdown_Time countdown (max_wait_time); - - Token_Guard guard (this->token_); - int const result = guard.acquire_quietly (max_wait_time); - - // If the guard is NOT the owner just return the retval - if (!guard.is_owner ()) - return result; - - if (this->deactivated_) - { - errno = ESHUTDOWN; - return -1; - } - - // Update the countdown to reflect time waiting for the mutex. - ACE_MT (countdown.update ()); - - return this->handle_events_i (max_wait_time, guard); -} - -int -ACE_Dev_Poll_Reactor::handle_events_i (ACE_Time_Value *max_wait_time, - Token_Guard &guard) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::handle_events_i"); - - int result = 0; - - // Poll for events - // - // If the underlying event wait call was interrupted via the interrupt - // signal (i.e. returned -1 with errno == EINTR) then the loop will - // be restarted if so desired. - do - { - result = this->work_pending_i (max_wait_time); - if (result == -1 && (this->restart_ == 0 || errno != EINTR)) - ACELIB_ERROR ((LM_ERROR, ACE_TEXT("%t: %p\n"), ACE_TEXT("work_pending_i"))); - } - while (result == -1 && this->restart_ != 0 && errno == EINTR); - - if (result == 0 || (result == -1 && errno == ETIME)) - return 0; - else if (result == -1) - { - if (errno != EINTR) - return -1; - - // Bail out -- we got here since the poll was interrupted. - // If it was due to a signal registered through our ACE_Sig_Handler, - // then it was dispatched, so we count it in the number of events - // handled rather than cause an error return. - if (ACE_Sig_Handler::sig_pending () != 0) - { - ACE_Sig_Handler::sig_pending (0); - return 1; - } - return -1; - } - - // Dispatch an event. - return this->dispatch (guard); -} - -// Dispatch an event. On entry, the token is held by the caller. If an -// event is found to dispatch, the token is released before dispatching it. -int -ACE_Dev_Poll_Reactor::dispatch (Token_Guard &guard) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::dispatch"); - - // Perform the Template Method for dispatching the first located event. - // We dispatch only one to effectively dispatch events concurrently. - // As soon as an event is located, the token is released, allowing the - // next waiter to begin getting an event while we dispatch one here. - int result = 0; - - // Handle timers early since they may have higher latency - // constraints than I/O handlers. Ideally, the order of - // dispatching should be a strategy... - if ((result = this->dispatch_timer_handler (guard)) != 0) - return result; - - // If no timer dispatched, check for an I/O event. - result = this->dispatch_io_event (guard); - - return result; -} - -int -ACE_Dev_Poll_Reactor::dispatch_timer_handler (Token_Guard &guard) -{ - typedef ACE_Member_Function_Command Guard_Release; - - Guard_Release release(guard, &Token_Guard::release_token); - return this->timer_queue_->expire_single(release); -} - -#if 0 -int -ACE_Dev_Poll_Reactor::dispatch_notification_handlers ( - ACE_Select_Reactor_Handle_Set &dispatch_set, - int &number_of_active_handles, - int &number_of_handlers_dispatched) -{ - // Check to see if the ACE_HANDLE associated with the - // Dev_Poll_Reactor's notify hook is enabled. If so, it means that - // one or more other threads are trying to update the - // ACE_Dev_Poll_Reactor's internal tables or the notify pipe is - // enabled. We'll handle all these threads and notifications, and - // then break out to continue the event loop. - - const int n = - this->notify_handler_->dispatch_notifications (number_of_active_handles, - dispatch_set.rd_mask_); - - if (n == -1) - return -1; - else - number_of_handlers_dispatched += n; - - return /* this->state_changed_ ? -1 : */ 0; -} -#endif /* 0 */ - -int -ACE_Dev_Poll_Reactor::dispatch_io_event (Token_Guard &guard) -{ - - // Dispatch a ready event. - - // Define bits to check for while dispatching. -#if defined (ACE_HAS_EVENT_POLL) - const __uint32_t out_event = EPOLLOUT; - const __uint32_t exc_event = EPOLLPRI; - const __uint32_t in_event = EPOLLIN; - const __uint32_t err_event = EPOLLHUP | EPOLLERR; -#else - const short out_event = POLLOUT; - const short exc_event = POLLPRI; - const short in_event = POLLIN; - const short err_event = 0; // No known bits for this -#endif /* ACE_HAS_EVENT_POLL */ - -#if defined (ACE_HAS_EVENT_POLL) - // epoll_wait() pulls one event which is stored in event_. If the handle - // is invalid, there's no event there. Else process it. In any event, we - // have the event, so clear event_ for the next thread. - const ACE_HANDLE handle = this->event_.data.fd; - __uint32_t revents = this->event_.events; - this->event_.data.fd = ACE_INVALID_HANDLE; - this->event_.events = 0; - if (handle != ACE_INVALID_HANDLE) - -#else - // Since the underlying event demultiplexing mechansim (`/dev/poll' - // or '/dev/epoll') is stateful, and since only one result buffer is - // used, all pending events (i.e. those retrieved from a previous - // poll) must be dispatched before any additional event can be - // polled. As such, the Dev_Poll_Reactor keeps track of the - // progress of events that have been dispatched. - - // Select the first available handle with event (s) pending. Check for - // event type in defined order of dispatch: output, exception, input. - // When an event is located, clear its bit in the dispatch set. If there - // are no more events for the handle, also increment the pfds pointer - // to move to the next handle ready. - // - // Notice that pfds only contains file descriptors that have - // received events. - struct pollfd *& pfds = this->start_pfds_; - const ACE_HANDLE handle = pfds->fd; - short &revents = pfds->revents; - if (pfds < this->end_pfds_) -#endif /* ACE_HAS_EVENT_POLL */ - - { - /* When using sys_epoll, we can attach arbitrary user - data to the descriptor, so it can be delivered when - activity is detected. Perhaps we should store event - handler together with descriptor, instead of looking - it up in a repository ? Could it boost performance ? - */ - - // Going to access handler repo, so lock it. If the lock is - // unobtainable, something is very wrong so bail out. - Event_Tuple *info = 0; - ACE_Reactor_Mask disp_mask = 0; - ACE_Event_Handler *eh = 0; - int (ACE_Event_Handler::*callback)(ACE_HANDLE) = 0; - bool reactor_resumes_eh = false; - { - ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, grd, this->repo_lock_, -1); - info = this->handler_rep_.find (handle); - if (info == 0) // No registered handler any longer - return 0; - - // It is possible another thread has changed (and possibly re-armed) - // this handle mask before current thread obtained the repo lock. - // If that did happen and this handler is still suspended, don't - // dispatch on top of another callback. See Bugzilla 4129. - if (info->suspended) - return 0; - - // Figure out what to do first in order to make it easier to manage - // the bit twiddling and possible pfds increment before releasing - // the token for dispatch. - // Note that if there's an error (such as the handle was closed - // without being removed from the event set) the EPOLLHUP and/or - // EPOLLERR bits will be set in revents. - eh = info->event_handler; - if (ACE_BIT_ENABLED (revents, out_event)) - { - disp_mask = ACE_Event_Handler::WRITE_MASK; - callback = &ACE_Event_Handler::handle_output; - ACE_CLR_BITS (revents, out_event); - } - else if (ACE_BIT_ENABLED (revents, exc_event)) - { - disp_mask = ACE_Event_Handler::EXCEPT_MASK; - callback = &ACE_Event_Handler::handle_exception; - ACE_CLR_BITS (revents, exc_event); - } - else if (ACE_BIT_ENABLED (revents, in_event)) - { - disp_mask = ACE_Event_Handler::READ_MASK; - callback = &ACE_Event_Handler::handle_input; - ACE_CLR_BITS (revents, in_event); - } - else if (ACE_BIT_ENABLED (revents, err_event)) - { - this->remove_handler_i (handle, - ACE_Event_Handler::ALL_EVENTS_MASK, - grd, - info->event_handler); -#ifdef ACE_HAS_DEV_POLL - ++pfds; -#endif /* ACE_HAS_DEV_POLL */ - return 1; - } - else - { - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("(%t) dispatch_io h %d unknown events 0x%x\n"), - handle, revents)); - } - -#ifdef ACE_HAS_DEV_POLL - // Increment the pointer to the next element before we - // release the token. Otherwise event handlers end up being - // dispatched multiple times for the same poll. - if (revents == 0) - ++pfds; -#else - // With epoll, events are registered with oneshot, so the handle is - // effectively suspended; future calls to epoll_wait() will select - // the next event, so they're not managed here. - // The hitch to this is that the notify handler is always registered - // WITHOUT oneshot and is never suspended/resumed. This avoids endless - // notify loops caused by the notify handler requiring a resumption - // which requires the token, which requires a notify, etc. described - // in Bugzilla 3714. So, never suspend the notify handler. - if (eh != this->notify_handler_) - { - info->suspended = true; - - reactor_resumes_eh = - eh->resume_handler () == - ACE_Event_Handler::ACE_REACTOR_RESUMES_HANDLER; - } -#endif /* ACE_HAS_DEV_POLL */ - - } // End scope for ACE_GUARD holding repo lock - - int status = 0; // gets callback status, below. - - // Dispatch notifies directly. The notify dispatcher locates a - // notification then releases the token prior to dispatching it. - // NOTE: If notify_handler_->dispatch_one() returns a fail condition - // it has not releases the guard. Else, it has. - if (eh == this->notify_handler_) - { - ACE_Notification_Buffer b; - status = - dynamic_cast(notify_handler_)->dequeue_one (b); - if (status == -1) - return status; - guard.release_token (); - return notify_handler_->dispatch_notify (b); - } - - { - // Modify the reference count in an exception-safe way. - // Note that eh could be the notify handler. It's not strictly - // necessary to manage its refcount, but since we don't enable - // the counting policy, it won't do much. Management of the - // notified handlers themselves is done in the notify handler. - ACE_Dev_Poll_Handler_Guard eh_guard (eh); - - // Release the reactor token before upcall. - guard.release_token (); - - // Dispatch the detected event; will do the repeated upcalls - // if callback returns > 0, unless it's the notify handler (which - // returns the number of notfies dispatched, not an indication of - // re-callback requested). If anything other than the notify, come - // back with either 0 or < 0. - status = this->upcall (eh, callback, handle); - - // If the callback returned 0, epoll-based needs to resume the - // suspended handler but dev/poll doesn't. - // In both epoll and dev/poll cases, if the callback returns <0, - // the token needs to be acquired and the handler checked and - // removed if it hasn't already been. - if (status == 0) - { -#ifdef ACE_HAS_EVENT_POLL - // epoll-based effectively suspends handlers around the upcall. - // If the handler must be resumed, check to be sure it's the - // same handle/handler combination still. - if (reactor_resumes_eh) - { - ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, grd, this->repo_lock_, -1); - info = this->handler_rep_.find (handle); - if (info != 0 && info->event_handler == eh) - this->resume_handler_i (handle); - } -#endif /* ACE_HAS_EVENT_POLL */ - return 1; - } - - // All state in the handler repository may have changed during the - // upcall. Thus, reacquire the repo lock and evaluate what's needed. - // If the upcalled handler is still the handler of record for handle, - // continue with checking whether or not to remove or resume the - // handler. - ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, grd, this->repo_lock_, 1); - info = this->handler_rep_.find (handle); - if (info != 0 && info->event_handler == eh) - { - if (status < 0) - { - this->remove_handler_i (handle, disp_mask, grd); -#ifdef ACE_HAS_EVENT_POLL - // epoll-based effectively suspends handlers around the upcall. - // If the handler must be resumed, check to be sure it's the - // same handle/handler combination still. - if (reactor_resumes_eh) - { - info = this->handler_rep_.find (handle); - if (info != 0 && info->event_handler == eh) - { - this->resume_handler_i (handle); - } - } -#endif /* ACE_HAS_EVENT_POLL */ - } - } - } - // Scope close handles eh ref count decrement, if needed. - - return 1; - } - - return 0; -} - -int -ACE_Dev_Poll_Reactor::alertable_handle_events (ACE_Time_Value *max_wait_time) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::alertable_handle_events"); - - return this->handle_events (max_wait_time); -} - -int -ACE_Dev_Poll_Reactor::handle_events (ACE_Time_Value &max_wait_time) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::handle_events"); - - return this->handle_events (&max_wait_time); -} - -int -ACE_Dev_Poll_Reactor::alertable_handle_events (ACE_Time_Value &max_wait_time) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::alertable_handle_events"); - - return this->handle_events (max_wait_time); -} - -int -ACE_Dev_Poll_Reactor::deactivated (void) -{ - return this->deactivated_; -} - -void -ACE_Dev_Poll_Reactor::deactivate (int do_stop) -{ - this->deactivated_ = do_stop; - this->wakeup_all_threads (); -} - -int -ACE_Dev_Poll_Reactor::register_handler (ACE_Event_Handler *handler, - ACE_Reactor_Mask mask) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::register_handler"); - - ACE_MT (ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, grd, this->repo_lock_, -1)); - - return this->register_handler_i (handler->get_handle (), - handler, - mask); -} - -int -ACE_Dev_Poll_Reactor::register_handler (ACE_HANDLE handle, - ACE_Event_Handler *event_handler, - ACE_Reactor_Mask mask) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::register_handler"); - - ACE_MT (ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, grd, this->repo_lock_, -1)); - - return this->register_handler_i (handle, - event_handler, - mask); -} - -int -ACE_Dev_Poll_Reactor::register_handler_i (ACE_HANDLE handle, - ACE_Event_Handler *event_handler, - ACE_Reactor_Mask mask) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::register_handler_i"); - - if (handle == ACE_INVALID_HANDLE - || mask == ACE_Event_Handler::NULL_MASK) - { - errno = EINVAL; - return -1; - } - - if (this->handler_rep_.find (handle) == 0) - { - // Handler not present in the repository. Bind it. - if (this->handler_rep_.bind (handle, event_handler, mask) != 0) - return -1; - -#if defined (ACE_HAS_EVENT_POLL) - - Event_Tuple *info = this->handler_rep_.find (handle); - - struct epoll_event epev; - ACE_OS::memset (&epev, 0, sizeof (epev)); - static const int op = EPOLL_CTL_ADD; - - epev.data.fd = handle; - epev.events = this->reactor_mask_to_poll_event (mask); - // All but the notify handler get registered with oneshot to facilitate - // auto suspend before the upcall. See dispatch_io_event for more - // information. - if (event_handler != this->notify_handler_) - epev.events |= EPOLLONESHOT; - - if (::epoll_ctl (this->poll_fd_, op, handle, &epev) == -1) - { - ACELIB_ERROR ((LM_ERROR, ACE_TEXT("%p\n"), ACE_TEXT("epoll_ctl"))); - (void) this->handler_rep_.unbind (handle); - return -1; - } - info->controlled = true; - -#endif /* ACE_HAS_EVENT_POLL */ - } - else - { - // Handler is already present in the repository, so register it - // again, possibly for different event. Add new mask to the - // current one. - if (this->mask_ops_i (handle, mask, ACE_Reactor::ADD_MASK) == -1) - ACELIB_ERROR_RETURN ((LM_ERROR, ACE_TEXT("%p\n"), ACE_TEXT("mask_ops_i")), - -1); - } - -#ifdef ACE_HAS_DEV_POLL - - struct pollfd pfd; - - pfd.fd = handle; - pfd.events = this->reactor_mask_to_poll_event (mask); - pfd.revents = 0; - - // Add file descriptor to the "interest set." - if (ACE_OS::write (this->poll_fd_, &pfd, sizeof (pfd)) != sizeof (pfd)) - { - (void) this->handler_rep_.unbind (handle); - return -1; - } -#endif /*ACE_HAS_DEV_POLL*/ - - // Note the fact that we've changed the state of the wait_set_, - // which is used by the dispatching loop to determine whether it can - // keep going or if it needs to reconsult select (). - // this->state_changed_ = 1; - - return 0; -} - -int -ACE_Dev_Poll_Reactor::register_handler ( - ACE_HANDLE /* event_handle */, - ACE_HANDLE /* io_handle */, - ACE_Event_Handler * /* event_handler */, - ACE_Reactor_Mask /* mask */) -{ - ACE_NOTSUP_RETURN (-1); -} - -int -ACE_Dev_Poll_Reactor::register_handler (const ACE_Handle_Set &handle_set, - ACE_Event_Handler *event_handler, - ACE_Reactor_Mask mask) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::register_handler"); - - ACE_Handle_Set_Iterator handle_iter (handle_set); - - ACE_MT (ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, grd, this->repo_lock_, -1)); - - // @@ It might be more efficient to construct a pollfd array and - // pass it to the write () call in register_handler_i () only once, - // instead of calling write () (a system call) once for each file - // descriptor. - - for (ACE_HANDLE h = handle_iter (); - h != ACE_INVALID_HANDLE; - h = handle_iter ()) - if (this->register_handler_i (h, event_handler, mask) == -1) - return -1; - - return 0; -} - -int -ACE_Dev_Poll_Reactor::register_handler (int signum, - ACE_Event_Handler *new_sh, - ACE_Sig_Action *new_disp, - ACE_Event_Handler **old_sh, - ACE_Sig_Action *old_disp) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::register_handler"); - - return this->signal_handler_->register_handler (signum, - new_sh, - new_disp, - old_sh, - old_disp); -} - -int -ACE_Dev_Poll_Reactor::register_handler (const ACE_Sig_Set &sigset, - ACE_Event_Handler *new_sh, - ACE_Sig_Action *new_disp) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::register_handler"); - - int result = 0; - -#if (ACE_NSIG > 0) - - for (int s = 1; s < ACE_NSIG; ++s) - if ((sigset.is_member (s) == 1) - && this->signal_handler_->register_handler (s, - new_sh, - new_disp) == -1) - result = -1; - -#else /* ACE_NSIG <= 0 */ - - ACE_UNUSED_ARG (sigset); - ACE_UNUSED_ARG (new_sh); - ACE_UNUSED_ARG (new_disp); - -#endif /* ACE_NSIG <= 0 */ - - return result; -} - -int -ACE_Dev_Poll_Reactor::remove_handler (ACE_Event_Handler *handler, - ACE_Reactor_Mask mask) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::remove_handler"); - - ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, grd, this->repo_lock_, -1); - return this->remove_handler_i (handler->get_handle (), mask, grd); -} - -int -ACE_Dev_Poll_Reactor::remove_handler (ACE_HANDLE handle, - ACE_Reactor_Mask mask) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::remove_handler"); - - ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, grd, this->repo_lock_, -1); - - return this->remove_handler_i (handle, mask, grd); -} - -// FUZZ: disable check_for_ACE_Guard -int -ACE_Dev_Poll_Reactor::remove_handler_i (ACE_HANDLE handle, - ACE_Reactor_Mask mask, - ACE_Guard &repo_guard, - ACE_Event_Handler *eh) -// FUZZ: enable check_for_ACE_Guard -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::remove_handler_i"); - - // If registered event handler not the same as eh, don't mess with - // the mask, but do the proper callback and refcount when needed. - bool handle_reg_changed = true; - Event_Tuple *info = this->handler_rep_.find (handle); - if (info == 0 && eh == 0) // Nothing to work with - return -1; - if (info != 0 && (eh == 0 || info->event_handler == eh)) - { - if (this->mask_ops_i (handle, mask, ACE_Reactor::CLR_MASK) == -1) - return -1; - handle_reg_changed = false; - eh = info->event_handler; - } - - // Check for ref counting now - handle_close () may delete eh. - bool const requires_reference_counting = - eh->reference_counting_policy ().value () == - ACE_Event_Handler::Reference_Counting_Policy::ENABLED; - - if (ACE_BIT_DISABLED (mask, ACE_Event_Handler::DONT_CALL)) - { - // It would be great if ACE_Reverse_Lock worked with the Guard. - repo_guard.release (); - eh->handle_close (handle, mask); - repo_guard.acquire (); - } - - // If there are no longer any outstanding events on the given handle - // then remove it from the handler repository. - if (!handle_reg_changed && info->mask == ACE_Event_Handler::NULL_MASK) - this->handler_rep_.unbind (handle, requires_reference_counting); - - return 0; -} - -int -ACE_Dev_Poll_Reactor::remove_handler (const ACE_Handle_Set &handle_set, - ACE_Reactor_Mask mask) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::remove_handler"); - - ACE_Handle_Set_Iterator handle_iter (handle_set); - for (ACE_HANDLE h = handle_iter (); - h != ACE_INVALID_HANDLE; - h = handle_iter ()) - { - ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, grd, this->repo_lock_, -1); - if (this->remove_handler_i (h, mask, grd) == -1) - return -1; - } - return 0; -} - -int -ACE_Dev_Poll_Reactor::remove_handler (int signum, - ACE_Sig_Action *new_disp, - ACE_Sig_Action *old_disp, - int sigkey) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::remove_handler"); - - return this->signal_handler_->remove_handler (signum, - new_disp, - old_disp, - sigkey); -} - -int -ACE_Dev_Poll_Reactor::remove_handler (const ACE_Sig_Set &sigset) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::remove_handler"); - - int result = 0; - -#if (ACE_NSIG > 0) - - for (int s = 1; s < ACE_NSIG; ++s) - if ((sigset.is_member (s) == 1) - && this->signal_handler_->remove_handler (s) == -1) - result = -1; - -#else /* ACE_NSIG <= 0 */ - - ACE_UNUSED_ARG (sigset); - -#endif /* ACE_NSIG <= 0 */ - - return result; -} - -int -ACE_Dev_Poll_Reactor::suspend_handler (ACE_Event_Handler *event_handler) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::suspend_handler"); - - if (event_handler == 0) - { - errno = EINVAL; - return -1; - } - - ACE_HANDLE handle = event_handler->get_handle (); - - ACE_MT (ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, grd, this->repo_lock_, -1)); - - return this->suspend_handler_i (handle); -} - -int -ACE_Dev_Poll_Reactor::suspend_handler (ACE_HANDLE handle) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::suspend_handler"); - - ACE_MT (ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, grd, this->repo_lock_, -1)); - - return this->suspend_handler_i (handle); -} - -int -ACE_Dev_Poll_Reactor::suspend_handler (const ACE_Handle_Set &handles) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::suspend_handler"); - - ACE_Handle_Set_Iterator handle_iter (handles); - ACE_HANDLE h; - - ACE_MT (ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, grd, this->repo_lock_, -1)); - - while ((h = handle_iter ()) != ACE_INVALID_HANDLE) - if (this->suspend_handler_i (h) == -1) - return -1; - - return 0; -} - -int -ACE_Dev_Poll_Reactor::suspend_handlers (void) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::suspend_handlers"); - - ACE_MT (ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, grd, this->repo_lock_, -1)); - - size_t const len = this->handler_rep_.max_size (); - - for (size_t i = 0; i < len; ++i) - { - Event_Tuple *info = this->handler_rep_.find (i); - if (info != 0 && !info->suspended && this->suspend_handler_i (i) != 0) - return -1; - } - return 0; -} - -int -ACE_Dev_Poll_Reactor::suspend_handler_i (ACE_HANDLE handle) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::suspend_handler_i"); - - Event_Tuple *info = this->handler_rep_.find (handle); - if (info == 0) - return -1; - - if (info->suspended) - return 0; // Already suspended. @@ Should this be an error? - - // Remove the handle from the "interest set." - // - // Note that the associated event handler is still in the handler - // repository, but no events will be polled on the given handle thus - // no event will be dispatched to the event handler. - -#if defined (ACE_HAS_EVENT_POLL) - - struct epoll_event epev; - ACE_OS::memset (&epev, 0, sizeof (epev)); - static const int op = EPOLL_CTL_DEL; - - epev.events = 0; - epev.data.fd = handle; - - if (::epoll_ctl (this->poll_fd_, op, handle, &epev) == -1) - return -1; - info->controlled = false; -#else - - struct pollfd pfd[1]; - - pfd[0].fd = handle; - pfd[0].events = POLLREMOVE; - pfd[0].revents = 0; - - if (ACE_OS::write (this->poll_fd_, pfd, sizeof (pfd)) != sizeof (pfd)) - return -1; - -#endif /* ACE_HAS_EVENT_POLL */ - - info->suspended = true; - - return 0; -} - -int -ACE_Dev_Poll_Reactor::resume_handler (ACE_Event_Handler *event_handler) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::resume_handler"); - - if (event_handler == 0) - { - errno = EINVAL; - return -1; - } - - ACE_HANDLE handle = event_handler->get_handle (); - - ACE_MT (ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, grd, this->repo_lock_, -1)); - - return this->resume_handler_i (handle); -} - -int -ACE_Dev_Poll_Reactor::resume_handler (ACE_HANDLE handle) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::resume_handler"); - - ACE_MT (ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, grd, this->repo_lock_, -1)); - - return this->resume_handler_i (handle); -} - -int -ACE_Dev_Poll_Reactor::resume_handler (const ACE_Handle_Set &handles) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::resume_handler"); - - ACE_Handle_Set_Iterator handle_iter (handles); - ACE_HANDLE h; - - ACE_MT (ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, grd, this->repo_lock_, -1)); - - while ((h = handle_iter ()) != ACE_INVALID_HANDLE) - if (this->resume_handler_i (h) == -1) - return -1; - - return 0; -} - -int -ACE_Dev_Poll_Reactor::resume_handlers (void) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::resume_handlers"); - - ACE_MT (ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, grd, this->repo_lock_, -1)); - - size_t const len = this->handler_rep_.max_size (); - - for (size_t i = 0; i < len; ++i) - { - Event_Tuple *info = this->handler_rep_.find (i); - if (info != 0 && info->suspended && this->resume_handler_i (i) != 0) - return -1; - } - - return 0; -} - -int -ACE_Dev_Poll_Reactor::resume_handler_i (ACE_HANDLE handle) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::resume_handler_i"); - - Event_Tuple *info = this->handler_rep_.find (handle); - if (info == 0) - return -1; - - if (!info->suspended) - return 0; - - ACE_Reactor_Mask mask = info->mask; - if (mask == ACE_Event_Handler::NULL_MASK) - { - info->suspended = false; - return 0; - } - - // Place the handle back in to the "interest set." - // - // Events for the given handle will once again be polled. - -#if defined (ACE_HAS_EVENT_POLL) - - struct epoll_event epev; - ACE_OS::memset (&epev, 0, sizeof (epev)); - int op = EPOLL_CTL_ADD; - if (info->controlled) - op = EPOLL_CTL_MOD; - epev.events = this->reactor_mask_to_poll_event (mask) | EPOLLONESHOT; - epev.data.fd = handle; - - if (::epoll_ctl (this->poll_fd_, op, handle, &epev) == -1) - return -1; - info->controlled = true; - -#else - - struct pollfd pfd[1]; - - pfd[0].fd = handle; - pfd[0].events = this->reactor_mask_to_poll_event (mask); - pfd[0].revents = 0; - - if (ACE_OS::write (this->poll_fd_, pfd, sizeof (pfd)) != sizeof (pfd)) - return -1; - -#endif /* ACE_HAS_EVENT_POLL */ - - info->suspended = false; - - return 0; -} - -int -ACE_Dev_Poll_Reactor::resumable_handler (void) -{ - // @@ Is this correct? - - return 1; -} - -bool -ACE_Dev_Poll_Reactor::uses_event_associations (void) -{ - // Since the Dev_Poll_Reactor does not do any event associations, - // this method always return false. - return false; -} - -long -ACE_Dev_Poll_Reactor::schedule_timer (ACE_Event_Handler *event_handler, - const void *arg, - const ACE_Time_Value &delay, - const ACE_Time_Value &interval) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::schedule_timer"); - - ACE_MT (ACE_GUARD_RETURN (ACE_Dev_Poll_Reactor_Token, mon, this->token_, -1)); - - if (0 != this->timer_queue_) - return this->timer_queue_->schedule - (event_handler, - arg, - this->timer_queue_->gettimeofday () + delay, - interval); - - errno = ESHUTDOWN; - return -1; -} - -int -ACE_Dev_Poll_Reactor::reset_timer_interval (long timer_id, - const ACE_Time_Value &interval) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::reset_timer_interval"); - - ACE_MT (ACE_GUARD_RETURN (ACE_Dev_Poll_Reactor_Token, mon, this->token_, -1)); - - if (0 != this->timer_queue_) - return this->timer_queue_->reset_interval (timer_id, interval); - - errno = ESHUTDOWN; - return -1; -} - -int -ACE_Dev_Poll_Reactor::cancel_timer (ACE_Event_Handler *handler, - int dont_call_handle_close) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::cancel_timer"); - - // Don't bother waking the poll - the worse that will happen is it will - // wake up for a timer that doesn't exist then go back to waiting. - if ((this->timer_queue_ != 0) && (handler != 0)) - return this->timer_queue_->cancel (handler, dont_call_handle_close); - else - return 0; -} - -int -ACE_Dev_Poll_Reactor::cancel_timer (long timer_id, - const void **arg, - int dont_call_handle_close) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::cancel_timer"); - - // Don't bother waking the poll - the worse that will happen is it will - // wake up for a timer that doesn't exist then go back to waiting. - return (this->timer_queue_ == 0 - ? 0 - : this->timer_queue_->cancel (timer_id, - arg, - dont_call_handle_close)); -} - -int -ACE_Dev_Poll_Reactor::schedule_wakeup (ACE_Event_Handler *eh, - ACE_Reactor_Mask mask) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::schedule_wakeup"); - - return this->mask_ops (eh->get_handle (), mask, ACE_Reactor::ADD_MASK); -} - -int -ACE_Dev_Poll_Reactor::schedule_wakeup (ACE_HANDLE handle, - ACE_Reactor_Mask mask) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::schedule_wakeup"); - - return this->mask_ops (handle, mask, ACE_Reactor::ADD_MASK); -} - -int -ACE_Dev_Poll_Reactor::cancel_wakeup (ACE_Event_Handler *eh, - ACE_Reactor_Mask mask) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::cancel_wakeup"); - - return this->mask_ops (eh->get_handle (), mask, ACE_Reactor::CLR_MASK); -} - -int -ACE_Dev_Poll_Reactor::cancel_wakeup (ACE_HANDLE handle, - ACE_Reactor_Mask mask) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::cancel_wakeup"); - - return this->mask_ops (handle, mask, ACE_Reactor::CLR_MASK); -} - -int -ACE_Dev_Poll_Reactor::notify (ACE_Event_Handler *eh, - ACE_Reactor_Mask mask, - ACE_Time_Value *timeout) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::notify"); - - ssize_t n = 0; - - // Pass over both the Event_Handler *and* the mask to allow the - // caller to dictate which Event_Handler method the receiver - // invokes. Note that this call can timeout. - - n = this->notify_handler_->notify (eh, mask, timeout); - - return n == -1 ? -1 : 0; -} - -void -ACE_Dev_Poll_Reactor::max_notify_iterations (int iterations) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::max_notify_iterations"); - - ACE_MT (ACE_GUARD (ACE_Dev_Poll_Reactor_Token, mon, this->token_)); - - this->notify_handler_->max_notify_iterations (iterations); -} - -int -ACE_Dev_Poll_Reactor::max_notify_iterations (void) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::max_notify_iterations"); - - ACE_MT (ACE_GUARD_RETURN (ACE_Dev_Poll_Reactor_Token, mon, this->token_, -1)); - - return this->notify_handler_->max_notify_iterations (); -} - -int -ACE_Dev_Poll_Reactor::purge_pending_notifications (ACE_Event_Handler * eh, - ACE_Reactor_Mask mask) -{ - if (this->notify_handler_ == 0) - return 0; - - return this->notify_handler_->purge_pending_notifications (eh, mask); -} - -ACE_Event_Handler * -ACE_Dev_Poll_Reactor::find_handler (ACE_HANDLE handle) -{ - ACE_MT (ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, grd, this->repo_lock_, 0)); - - Event_Tuple *info = this->handler_rep_.find (handle); - if (info) - { - info->event_handler->add_reference (); - return info->event_handler; - } - else - { - return 0; - } -} - -int -ACE_Dev_Poll_Reactor::handler (ACE_HANDLE handle, - ACE_Reactor_Mask mask, - ACE_Event_Handler **event_handler) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::handler"); - - ACE_MT (ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, grd, this->repo_lock_, -1)); - - Event_Tuple *info = this->handler_rep_.find (handle); - - if (info != 0 - && ACE_BIT_CMP_MASK (info->mask, - mask, // Compare all bits in the mask - mask)) - { - if (event_handler != 0) - *event_handler = info->event_handler; - - return 0; - } - - return -1; -} - -int -ACE_Dev_Poll_Reactor::handler (int signum, - ACE_Event_Handler **eh) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::handler"); - - ACE_Event_Handler *handler = this->signal_handler_->handler (signum); - - if (handler == 0) - return -1; - else if (eh != 0) - *eh = handler; - - return 0; -} - -bool -ACE_Dev_Poll_Reactor::initialized (void) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::initialized"); - - ACE_MT (ACE_GUARD_RETURN (ACE_Dev_Poll_Reactor_Token, mon, this->token_, false)); - - return this->initialized_; -} - -size_t -ACE_Dev_Poll_Reactor::size (void) const -{ - return this->handler_rep_.size (); -} - -ACE_Lock & -ACE_Dev_Poll_Reactor::lock (void) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::lock"); - - return this->lock_adapter_; -} - -void -ACE_Dev_Poll_Reactor::wakeup_all_threads (void) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::wakeup_all_threads"); - - // Send a notification, but don't block if there's no one to receive - // it. - this->notify (0, - ACE_Event_Handler::NULL_MASK, - (ACE_Time_Value *) &ACE_Time_Value::zero); -} - -int -ACE_Dev_Poll_Reactor::owner (ACE_thread_t /* new_owner */, - ACE_thread_t * /* old_owner */) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::owner"); - - // There is no need to set the owner of the event loop. Multiple - // threads may invoke the event loop simulataneously. - - return 0; -} - -int -ACE_Dev_Poll_Reactor::owner (ACE_thread_t * /* owner */) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::owner"); - - // There is no need to set the owner of the event loop. Multiple - // threads may invoke the event loop simulataneously. - - return 0; -} - -bool -ACE_Dev_Poll_Reactor::restart (void) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::restart"); - - ACE_MT (ACE_GUARD_RETURN (ACE_Dev_Poll_Reactor_Token, mon, this->token_, false)); - - return this->restart_; -} - -bool -ACE_Dev_Poll_Reactor::restart (bool r) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::restart"); - - ACE_MT (ACE_GUARD_RETURN (ACE_Dev_Poll_Reactor_Token, mon, this->token_, false)); - - bool current_value = this->restart_; - this->restart_ = r; - return current_value; -} - -void -ACE_Dev_Poll_Reactor::requeue_position (int) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::requeue_position"); -} - -int -ACE_Dev_Poll_Reactor::requeue_position (void) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::requeue_position"); - - ACE_NOTSUP_RETURN (-1); -} - -int -ACE_Dev_Poll_Reactor::mask_ops (ACE_Event_Handler *event_handler, - ACE_Reactor_Mask mask, - int ops) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::mask_ops"); - - ACE_MT (ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, grd, this->repo_lock_, -1)); - - return this->mask_ops_i (event_handler->get_handle (), mask, ops); -} - -int -ACE_Dev_Poll_Reactor::mask_ops (ACE_HANDLE handle, - ACE_Reactor_Mask mask, - int ops) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::mask_ops"); - - ACE_MT (ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, grd, this->repo_lock_, -1)); - - return this->mask_ops_i (handle, mask, ops); -} - -int -ACE_Dev_Poll_Reactor::mask_ops_i (ACE_HANDLE handle, - ACE_Reactor_Mask mask, - int ops) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::mask_ops_i"); - - Event_Tuple *info = this->handler_rep_.find (handle); - if (info == 0) - return -1; - - // Block out all signals until method returns. - ACE_Sig_Guard sb; - - ACE_Reactor_Mask const old_mask = info->mask; - ACE_Reactor_Mask new_mask = old_mask; - - // Perform GET, CLR, SET, and ADD operations on the interest/wait - // set and the suspend set (if necessary). - // - // GET = 1, Retrieve current value - // SET = 2, Set value of bits to new mask (changes the entire mask) - // ADD = 3, Bitwise "or" the value into the mask (only changes - // enabled bits) - // CLR = 4 Bitwise "and" the negation of the value out of the mask - // (only changes enabled bits) - // - // Returns the original mask. - - switch (ops) - { - case ACE_Reactor::GET_MASK: - // The work for this operation is done in all cases at the - // beginning of the function. - return old_mask; - - case ACE_Reactor::CLR_MASK: - ACE_CLR_BITS (new_mask, mask); - break; - - case ACE_Reactor::SET_MASK: - new_mask = mask; - break; - - case ACE_Reactor::ADD_MASK: - ACE_SET_BITS (new_mask, mask); - break; - - default: - return -1; - } - - /// Reset the mask for the given handle. - info->mask = new_mask; - - // Only attempt to alter events for the handle from the - // "interest set" if it hasn't been suspended. If it has been - // suspended, the revised mask will take affect when the - // handle is resumed. The exception is if all the mask bits are - // cleared, we can un-control the fd now. - if (!info->suspended || (info->controlled && new_mask == 0)) - { - - short const events = this->reactor_mask_to_poll_event (new_mask); - -#if defined (sun) - // Apparently events cannot be updated on-the-fly on Solaris so - // remove the existing events, and then add the new ones. - struct pollfd pfd[2]; - - pfd[0].fd = handle; - pfd[0].events = POLLREMOVE; - pfd[0].revents = 0; - pfd[1].fd = (events == POLLREMOVE ? ACE_INVALID_HANDLE : handle); - pfd[1].events = events; - pfd[1].revents = 0; - - // Change the events associated with the given file descriptor. - if (ACE_OS::write (this->poll_fd_, - pfd, - sizeof (pfd)) != sizeof (pfd)) - return -1; -#elif defined (ACE_HAS_EVENT_POLL) - - struct epoll_event epev; - ACE_OS::memset (&epev, 0, sizeof (epev)); - int op; - - // ACE_Event_Handler::NULL_MASK ??? - if (new_mask == 0) - { - op = EPOLL_CTL_DEL; - epev.events = 0; - } - else - { - op = EPOLL_CTL_MOD; - epev.events = events | EPOLLONESHOT; - } - - epev.data.fd = handle; - - if (::epoll_ctl (this->poll_fd_, op, handle, &epev) == -1) - { - // If a handle is closed, epoll removes it from the poll set - // automatically - we may not know about it yet. If that's the - // case, a mod operation will fail with ENOENT. Retry it as - // an add. If it's any other failure, just fail outright. - if (op != EPOLL_CTL_MOD || errno != ENOENT || - ::epoll_ctl (this->poll_fd_, EPOLL_CTL_ADD, handle, &epev) == -1) - return -1; - } - info->controlled = (op != EPOLL_CTL_DEL); -#else - pollfd pfd[1]; - - pfd[0].fd = handle; - pfd[0].events = events; - pfd[0].revents = 0; - - // Change the events associated with the given file descriptor. - if (ACE_OS::write (this->poll_fd_, - pfd, - sizeof (pfd)) != sizeof (pfd)) - return -1; -#endif /*ACE_HAS_EVENT_POLL */ - } - - return old_mask; -} - -int -ACE_Dev_Poll_Reactor::ready_ops (ACE_Event_Handler * /* event_handler */, - ACE_Reactor_Mask /* mask */, - int /* ops */) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::ready_ops"); - - // Since the Dev_Poll_Reactor uses the poll result buffer, the - // ready_set cannot be directly manipulated outside of the event - // loop. - ACE_NOTSUP_RETURN (-1); -} - -int -ACE_Dev_Poll_Reactor::ready_ops (ACE_HANDLE /* handle */, - ACE_Reactor_Mask /* mask */, - int /* ops */) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::ready_ops"); - - // Since the Dev_Poll_Reactor uses the poll result buffer, the - // ready_set cannot be directly manipulated outside of the event - // loop. - ACE_NOTSUP_RETURN (-1); -} - -void -ACE_Dev_Poll_Reactor::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_Dev_Poll_Reactor::dump"); - - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("restart_ = %d\n"), this->restart_)); - ACELIB_DEBUG ((LM_DEBUG, - ACE_TEXT ("initialized_ = %d"), - this->initialized_)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("poll_fd_ = %d"), this->poll_fd_)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("size_ = %u"), this->handler_rep_.size ())); - ACELIB_DEBUG ((LM_DEBUG, - ACE_TEXT ("deactivated_ = %d"), - this->deactivated_)); - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} - -short -ACE_Dev_Poll_Reactor::reactor_mask_to_poll_event (ACE_Reactor_Mask mask) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::reactor_mask_to_poll_event"); - - if (mask == ACE_Event_Handler::NULL_MASK) - // No event. Remove from interest set. -#if defined (ACE_HAS_EVENT_POLL) - return EPOLL_CTL_DEL; -#else - return POLLREMOVE; -#endif /* ACE_HAS_EVENT_POLL */ - - short events = 0; - - // READ, ACCEPT, and CONNECT flag will place the handle in the - // read set. - if (ACE_BIT_ENABLED (mask, ACE_Event_Handler::READ_MASK) - || ACE_BIT_ENABLED (mask, ACE_Event_Handler::ACCEPT_MASK) - || ACE_BIT_ENABLED (mask, ACE_Event_Handler::CONNECT_MASK)) - { -#if defined (ACE_HAS_EVENT_POLL) - ACE_SET_BITS (events, EPOLLIN); -#else - ACE_SET_BITS (events, POLLIN); -#endif /*ACE_HAS_EVENT_POLL*/ - } - - // WRITE and CONNECT flag will place the handle in the write set. - if (ACE_BIT_ENABLED (mask, ACE_Event_Handler::WRITE_MASK) - || ACE_BIT_ENABLED (mask, ACE_Event_Handler::CONNECT_MASK)) - { -#if defined (ACE_HAS_EVENT_POLL) - ACE_SET_BITS (events, EPOLLOUT); -#else - ACE_SET_BITS (events, POLLOUT); -#endif /*ACE_HAS_EVENT_POLL*/ - } - - // EXCEPT flag will place the handle in the except set. - if (ACE_BIT_ENABLED (mask, ACE_Event_Handler::EXCEPT_MASK)) - { -#if defined (ACE_HAS_EVENT_POLL) - ACE_SET_BITS (events, EPOLLPRI); -#else - ACE_SET_BITS (events, POLLPRI); -#endif /*ACE_HAS_EVENT_POLL*/ - } - - return events; -} - -#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) -namespace { - void polite_sleep_hook (void *) { } -} -#endif - -int -ACE_Dev_Poll_Reactor::Token_Guard::acquire_quietly (ACE_Time_Value *max_wait) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::Token_Guard::acquire_quietly"); - - // Acquire the token but don't ping any waiters; just queue up politely. - int result = 0; - if (max_wait) - { - ACE_Time_Value tv = ACE_OS::gettimeofday (); - tv += *max_wait; - - ACE_MT (result = this->token_.acquire_read (&polite_sleep_hook, - 0, - &tv)); - } - else - { - ACE_MT (result = this->token_.acquire_read (&polite_sleep_hook)); - } - - // Check for timeouts and errors. - if (result == -1) - { - if (errno == ETIME) - return 0; - else - { - ACELIB_ERROR ((LM_ERROR, ACE_TEXT("%t: %p\n"), ACE_TEXT("token acquire_read"))); - return -1; - } - } - - // We got the token and so let us mark ourselves as owner - this->owner_ = 1; - - return result; -} - -int -ACE_Dev_Poll_Reactor::Token_Guard::acquire (ACE_Time_Value *max_wait) -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::Token_Guard::acquire"); - - // Try to grab the token. If someone if already there, don't wake - // them up, just queue up in the thread pool. - int result = 0; - if (max_wait) - { - ACE_Time_Value tv = ACE_OS::gettimeofday (); - tv += *max_wait; - - ACE_MT (result = this->token_.acquire (0, 0, &tv)); - } - else - { - ACE_MT (result = this->token_.acquire ()); - } - - // Check for timeouts and errors. - if (result == -1) - { - if (errno == ETIME) - return 0; - else - return -1; - } - - // We got the token and so let us mark ourseleves as owner - this->owner_ = 1; - - return result; -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_HAS_EVENT_POLL || ACE_HAS_DEV_POLL */ diff --git a/modules/worldengine/deps/acelite/ace/Dev_Poll_Reactor.h b/modules/worldengine/deps/acelite/ace/Dev_Poll_Reactor.h deleted file mode 100644 index 31f942e3e8..0000000000 --- a/modules/worldengine/deps/acelite/ace/Dev_Poll_Reactor.h +++ /dev/null @@ -1,1207 +0,0 @@ -// -*- C++ -*- - -// ========================================================================= -/** - * @file Dev_Poll_Reactor.h - * - * @c /dev/poll (or Linux @c sys_epoll) based Reactor implementation. - * - * @author Ossama Othman - */ -// ========================================================================= - - -#ifndef ACE_DEV_POLL_REACTOR_H -#define ACE_DEV_POLL_REACTOR_H - -#include /**/ "ace/pre.h" - -#include /**/ "ace/ACE_export.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#if defined (ACE_HAS_EVENT_POLL) && defined (ACE_HAS_DEV_POLL) -# error ACE_HAS_EVENT_POLL and ACE_HAS_DEV_POLL are mutually exclusive. -#endif /* ACE_HAS_EVENT_POLL && defined ACE_HAS_DEV_POLL */ - -#if defined (ACE_HAS_EVENT_POLL) || defined (ACE_HAS_DEV_POLL) - -#include "ace/Pipe.h" -#include "ace/Lock_Adapter_T.h" -#include "ace/Reactor_Impl.h" -#include "ace/Reactor_Token_T.h" -#include "ace/Token.h" - -#if defined (ACE_HAS_REACTOR_NOTIFICATION_QUEUE) -# include "ace/Notification_Queue.h" -#endif /* ACE_HAS_REACTOR_NOTIFICATION_QUEUE */ - -#if defined (ACE_HAS_DEV_POLL) -struct pollfd; -#elif defined (ACE_HAS_EVENT_POLL) -# include "ace/Array_Map.h" -# include /**/ -#endif - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -// Forward declarations -class ACE_Sig_Handler; -class ACE_Dev_Poll_Reactor; - - -// --------------------------------------------------------------------- - -/** - * @class ACE_Dev_Poll_Reactor_Notify - * - * @brief Event handler used for unblocking the ACE_Dev_Poll_Reactor - * from its event loop. - * - * This event handler is used internally by the ACE_Dev_Poll_Reactor - * as a means to allow a thread other then the one running the event - * loop to unblock the event loop. - */ -class ACE_Dev_Poll_Reactor_Notify : public ACE_Reactor_Notify -{ -public: - - /// Constructor - ACE_Dev_Poll_Reactor_Notify (void); - - /** - * @name Initialization and Termination Methods - * - * Methods called when initializing and terminating this event - * handler. - */ - virtual int open (ACE_Reactor_Impl *, - ACE_Timer_Queue *timer_queue = 0, - int disable_notify = 0); - virtual int close (void); - - /** - * Called by a thread when it wants to unblock the Reactor_Impl. - * This wakes up the Reactor_Impl if currently blocked. Pass over - * both the Event_Handler and the mask to allow the caller to - * dictate which Event_Handler method the Reactor_Impl will - * invoke. The ACE_Time_Value indicates how long to block - * trying to notify the Reactor_Impl. If timeout == 0, the - * caller will block until action is possible, else will wait until - * the relative time specified in *timeout elapses). - */ - virtual int notify (ACE_Event_Handler *eh = 0, - ACE_Reactor_Mask mask = ACE_Event_Handler::EXCEPT_MASK, - ACE_Time_Value *timeout = 0); - - /// Unimplemented method required by pure virtual method in abstract - /// base class. - /** - * This method's interface is not very compatibile with this - * Reactor's design. It's not clear why this method is pure virtual - * either. - */ - virtual int dispatch_notifications (int &number_of_active_handles, - ACE_Handle_Set &rd_mask); - - /// Returns the ACE_HANDLE of the notify pipe on which the reactor - /// is listening for notifications so that other threads can unblock - /// the Reactor_Impl. - virtual ACE_HANDLE notify_handle (void); - - /// Verify whether the buffer has dispatchable info or not. - virtual int is_dispatchable (ACE_Notification_Buffer &buffer); - - /// Handle one notify call represented in @a buffer. This could be - /// because of a thread trying to unblock the Reactor_Impl. - virtual int dispatch_notify (ACE_Notification_Buffer &buffer); - - /// Read one notify call on the handle into @a buffer. - /// This could be because of a thread trying to unblock the Reactor_Impl. - virtual int read_notify_pipe (ACE_HANDLE handle, - ACE_Notification_Buffer &buffer); - - /// Called back by the ACE_Dev_Poll_Reactor when a thread wants to - /// unblock us. - virtual int handle_input (ACE_HANDLE handle); - - /** - * Set the maximum number of times that the handle_input method - * will iterate and dispatch the ACE_Event_Handlers that are - * passed in via the notify queue before breaking out of the event - * loop. By default, this is set to -1, which means "iterate until - * the queue is empty." Setting this to a value like "1 or 2" will - * increase "fairness" (and thus prevent starvation) at the expense - * of slightly higher dispatching overhead. - */ - virtual void max_notify_iterations (int); - - /** - * Get the maximum number of times that the handle_input method - * will iterate and dispatch the ACE_Event_Handlers that are - * passed in via the notify queue before breaking out of its event - * loop. - */ - virtual int max_notify_iterations (void); - - /** - * Purge any notifications pending in this reactor for the specified - * ACE_Event_Handler object. Returns the number of notifications - * purged. Returns -1 on error. - */ - virtual int purge_pending_notifications ( - ACE_Event_Handler * = 0, - ACE_Reactor_Mask = ACE_Event_Handler::ALL_EVENTS_MASK); - - /// Dump the state of an object. - virtual void dump (void) const; - - /// Method called by ACE_Dev_Poll_Reactor to obtain one notification. - /// THIS METHOD MUST BE CALLED WITH THE REACTOR TOKEN HELD! - /// - /// @return -1 on error, else 0 and @arg nb has the notify to - /// dispatch. Note that the contained event handler may be - /// 0 if there were only wake-ups (no handlers to dispatch). - int dequeue_one (ACE_Notification_Buffer &nb); - -protected: - - /** - * Keep a back pointer to the ACE_Dev_Poll_Reactor. If this value - * if NULL then the ACE_Dev_Poll_Reactor has been initialized with - * disable_notify_pipe. - */ - ACE_Dev_Poll_Reactor *dp_reactor_; - - /** - * Contains the ACE_HANDLE the ACE_Dev_Poll_Reactor is listening - * on, as well as the ACE_HANDLE that threads wanting the attention - * of the ACE_Dev_Poll_Reactor will write to. - */ - ACE_Pipe notification_pipe_; - - /** - * Keeps track of the maximum number of times that the - * ACE_Dev_Poll_Reactor_Notify::handle_input method will iterate and - * dispatch the ACE_Event_Handlers that are passed in via the - * notify pipe before breaking out of its recv loop. By default, - * this is set to -1, which means "iterate until the pipe is empty." - */ - int max_notify_iterations_; - -#if defined (ACE_HAS_REACTOR_NOTIFICATION_QUEUE) - /** - * @brief A user-space queue to store the notifications. - * - * The notification pipe has OS-specific size restrictions. That - * is, no more than a certain number of bytes may be stored in the - * pipe without blocking. This limit may be too small for certain - * applications. In this case, ACE can be configured to store all - * the events in user-space. The pipe is still needed to wake up - * the reactor thread, but only one event is sent through the pipe - * at a time. - */ - ACE_Notification_Queue notification_queue_; -#endif /* ACE_HAS_REACTOR_NOTIFICATION_QUEUE */ -}; - -// --------------------------------------------------------------------- - -/** - * @class ACE_Dev_Poll_Reactor - * - * @brief A `/dev/poll' or `/dev/epoll' based Reactor implemenatation. - * - * @attention The Linux epoll implementation works quite well and is - * fully supported; however, the /dev/poll implementation is @em experimental. - * - * The ACE_Dev_Poll_Reactor uses the `/dev/poll' or '/dev/epoll' - * character devices to demultiplex events on a given set of file - * descriptors. Unlike @c select(), `/dev/poll' and `/dev/epoll' have - * no hard-coded limit on the number of file descriptors that may be - * handled at any given time. As such, the ACE_Dev_Poll_Reactor can - * generally handle a much larger number of file descriptors than - * @c select() -based reactors. Furthermore, since `/dev/poll' and - * `/dev/epoll' both return a set of file descriptors that are active, - * there is no need to "walk" the set of file descriptors to determine - * which ones are active, such as what is done with the @c select() and - * @c poll() system calls. All returned file descriptors are active. - * This makes event dispatching very efficient. - * - * @note In general, this reactor may only be used to demultiplex - * events on sockets. Demultiplexing events on pipes, for - * example may not work. This is due to a limitation in the - * underlying `/dev/poll' device driver. - * - * @note It is only possible to achieve millisecond timeout - * resolutions with the @c ACE_Dev_Poll_Reactor. However, the - * timeout resolution for timers is independent of the reactors - * timeout resolution. As such, it may be possible to achieve - * sub-millisecond timeout resolutions for timers but that is - * entirely platform dependent. - */ - -#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) -typedef ACE_Token ACE_DEV_POLL_TOKEN; -#else -typedef ACE_Noop_Token ACE_DEV_POLL_TOKEN; -#endif /* ACE_MT_SAFE && ACE_MT_SAFE != 0 */ -typedef ACE_Reactor_Token_T ACE_Dev_Poll_Reactor_Token; - -class ACE_Export ACE_Dev_Poll_Reactor : public ACE_Reactor_Impl -{ - - /** - * @struct Event_Tuple - * - * @brief Struct that collects event registration information for a handle. - * - * @internal Internal use only - * - * This struct merely provides a means to associate an event mask - * with an event handler. Such an association is needed since it is - * not possible to retrieve the event mask from the "interest set" - * stored in the `/dev/poll' or `/dev/epoll' driver. Without this - * external association, it would not be possible keep track of the - * event mask for a given event handler when suspending it or resuming - * it. - * - * @note An ACE_Handle_Set is not used since the number of handles may - * exceed its capacity (ACE_DEFAULT_SELECT_REACTOR_SIZE). - */ - struct Event_Tuple - { - /// Constructor to set up defaults. - Event_Tuple (ACE_Event_Handler *eh = 0, - ACE_Reactor_Mask m = ACE_Event_Handler::NULL_MASK, - bool is_suspended = false, - bool is_controlled = false); - - /// The event handler. - ACE_Event_Handler *event_handler; - - /// The event mask for the above event handler. - ACE_Reactor_Mask mask; - - /// Flag that states whether or not the event handler is suspended. - bool suspended; - - /// Flag to say whether or not this handle is registered with epoll. - bool controlled; - }; - - - // --------------------------------------------------------------------- - - /** - * @class Handler_Repository - * - * @internal - * - * @brief Used to map ACE_HANDLEs onto the appropriate Event_Tuple. - * - * This class is simply a container that maps a handle to its - * corresponding event tuple. It is not meant for use outside of - * the Dev_Poll_Reactor. - * - * @note Calls to any method in this class, and any modification to a - * Event_Tuple returned from this class's methods, must be made - * while holding the repository lock. - */ - class Handler_Repository - { - public: - - /// Constructor. - Handler_Repository (void); - - /// Initialize a repository that can map handles up to the value @a size. - /// Since the event tuples are accessed directly using the handle as - /// an index, @a size sets the maximum handle value, minus 1. - int open (size_t size); - - /// Close down the repository. - int close (void); - - /** - * @name Repository Manipulation Operations - * - * Methods used to search and modify the handler repository. - */ - //@{ - - /// Return a pointer to the Event_Tuple associated with @a handle. - /// If there is none associated, returns 0 and sets errno. - Event_Tuple *find (ACE_HANDLE handle); - - - /// Bind the ACE_Event_Handler to the @c ACE_HANDLE with the - /// appropriate ACE_Reactor_Mask settings. - int bind (ACE_HANDLE handle, - ACE_Event_Handler *handler, - ACE_Reactor_Mask mask); - - /// Remove the binding for @a handle; optionally decrement the associated - /// handler's reference count. - int unbind (ACE_HANDLE handle, bool decr_refcnt = true); - - /// Remove all the registered tuples. - int unbind_all (void); - - //@} - - /** - * @name Sanity Checking - * - * Methods used to prevent "out-of-range" errors when indexing the - * underlying handler array. - */ - //@{ - - // Check the @a handle to make sure it's a valid @c ACE_HANDLE that - // within the range of legal handles (i.e., greater than or equal to - // zero and less than @c max_size_). - bool invalid_handle (ACE_HANDLE handle) const; - - // Check the handle to make sure it's a valid @c ACE_HANDLE that is - // within the range of currently registered handles (i.e., greater - // than or equal to zero and less than @c max_handlep1_). - bool handle_in_range (ACE_HANDLE handle) const; - - //@} - - /// Returns the current table size. - size_t size (void) const; - - /// Returns the current table size. - size_t max_size (void) const; - - /// Dump the state of an object. - void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - - private: - - /// Current number of handles. - int size_; - - /// Maximum number of handles. - int max_size_; - - /// The underlying array of event handlers. - /** - * The array of event handlers is directly indexed directly using - * an @c ACE_HANDLE value. This is Unix-specific. - */ - Event_Tuple *handlers_; - - }; - -public: - - /// Initialize @c ACE_Dev_Poll_Reactor with the default size. - /** - * The default size for the @c ACE_Dev_Poll_Reactor is the maximum - * number of open file descriptors for the process. - */ - ACE_Dev_Poll_Reactor (ACE_Sig_Handler * = 0, - ACE_Timer_Queue * = 0, - int disable_notify_pipe = 0, - ACE_Reactor_Notify *notify = 0, - int mask_signals = 1, - int s_queue = ACE_DEV_POLL_TOKEN::FIFO); - - /// Initialize ACE_Dev_Poll_Reactor with size @a size. - /** - * @note On Unix platforms, the @a size parameter should be as large - * as the maximum number of file descriptors allowed for a - * given process. This is necessary since a file descriptor - * is used to directly index the array of event handlers - * maintained by the Reactor's handler repository. Direct - * indexing is used for efficiency reasons. If the size - * parameter is less than the process maximum, the process - * maximum will be decreased in order to prevent potential - * access violations. - */ - ACE_Dev_Poll_Reactor (size_t size, - bool restart = false, - ACE_Sig_Handler * = 0, - ACE_Timer_Queue * = 0, - int disable_notify_pipe = 0, - ACE_Reactor_Notify *notify = 0, - int mask_signals = 1, - int s_queue = ACE_DEV_POLL_TOKEN::FIFO); - - /// Close down and release all resources. - virtual ~ACE_Dev_Poll_Reactor (void); - - /// Initialization. - virtual int open (size_t size, - bool restart = false, - ACE_Sig_Handler * = 0, - ACE_Timer_Queue * = 0, - int disable_notify_pipe = 0, - ACE_Reactor_Notify * = 0); - - /** - * @param handle allows the reactor to check if the caller is - * valid. - * - * @return 0 if the size of the current message has been put in - * size. -1 if not. - */ - virtual int current_info (ACE_HANDLE handle, size_t & /* size */); - - /// Use a user specified signal handler instead. - virtual int set_sig_handler (ACE_Sig_Handler *signal_handler); - - /// Set a user-specified timer queue. - virtual int timer_queue (ACE_Timer_Queue *tq); - - /// Get the timer queue - /// @return The current @c ACE_Timer_Queue. - virtual ACE_Timer_Queue *timer_queue (void) const; - - /// Close down and release all resources. - virtual int close (void); - - // = Event loop drivers. - /** - * Returns non-zero if there are I/O events "ready" for dispatching, - * but does not actually dispatch the event handlers. By default, - * don't block while checking this, i.e., "poll". - * - * @note It is only possible to achieve millisecond timeout - * resolutions with the @c ACE_Dev_Poll_Reactor. - */ - virtual int work_pending ( - const ACE_Time_Value &max_wait_time = ACE_Time_Value::zero); - - /** - * This event loop driver blocks for up to @a max_wait_time before - * returning. It will return earlier if events occur. Note that - * @a max_wait_time can be 0, in which case this method blocks - * indefinitely until events occur. - * @par - * @a max_wait_time is decremented to reflect how much time this - * call took. For instance, if a time value of 3 seconds is passed - * to @c handle_events() and an event occurs after 2 seconds, - * @a max_wait_time will equal 1 second. This can be used if an - * application wishes to handle events for some fixed amount of - * time. - * @par - * The only difference between @c alertable_handle_events() and - * handle_events() is that in the alertable case, the event loop - * will return when the system queues an I/O completion routine or - * an Asynchronous Procedure Call. - * - * @return The total number of @c ACE_Event_Handlers that were - * dispatched, 0 if the @a max_wait_time elapsed without - * dispatching any handlers, or -1 if an error occurs. - - * @note It is only possible to achieve millisecond timeout - * resolutions with the @c ACE_Dev_Poll_Reactor. - */ - virtual int handle_events (ACE_Time_Value *max_wait_time = 0); - virtual int alertable_handle_events (ACE_Time_Value *max_wait_time = 0); - - /** - * This method is just like the one above, except the - * @a max_wait_time value is a reference and can therefore never be - * @c NULL. - * - * @note It is only possible to achieve millisecond timeout - * resolutions with the @c ACE_Dev_Poll_Reactor. - */ - virtual int handle_events (ACE_Time_Value &max_wait_time); - virtual int alertable_handle_events (ACE_Time_Value &max_wait_time); - - // = Event handling control. - - /** - * @return The status of Reactor. If this function returns 0, the - * reactor is actively handling events. If it returns - * non-zero, @c handle_events() and - * @c handle_alertable_events() return -1 immediately. - */ - virtual int deactivated (void); - - /** - * Control whether the Reactor will handle any more incoming events - * or not. If @a do_stop == 1, the Reactor will be disabled. By - * default, a reactor is in active state and can be - * deactivated/reactived as desired. - */ - virtual void deactivate (int do_stop); - - // = Register and remove Handlers. - - /// Register @a event_handler with @a mask. The I/O handle will - /// always come from get_handle on the event_handler. - virtual int register_handler (ACE_Event_Handler *event_handler, - ACE_Reactor_Mask mask); - - /// Register @a event_handler with @a mask. The I/O handle is - /// provided through the @a io_handle parameter. - virtual int register_handler (ACE_HANDLE io_handle, - ACE_Event_Handler *event_handler, - ACE_Reactor_Mask mask); - - /** - * Register an @a event_handler that will be notified when - * @a event_handle is signaled. @a mask specifies the network - * events that the @a event_handler is interested in. - */ - virtual int register_handler (ACE_HANDLE event_handle, - ACE_HANDLE io_handle, - ACE_Event_Handler *event_handler, - ACE_Reactor_Mask mask); - - /// Register @a event_handler with all the @a handles in the @c - /// Handle_Set. - virtual int register_handler (const ACE_Handle_Set &handles, - ACE_Event_Handler *event_handler, - ACE_Reactor_Mask mask); - - /** - * Register @a new_sh to handle the signal @a signum using the - * @a new_disp. Returns the @a old_sh that was previously - * registered (if any), along with the @a old_disp of the signal - * handler. - */ - virtual int register_handler (int signum, - ACE_Event_Handler *new_sh, - ACE_Sig_Action *new_disp = 0, - ACE_Event_Handler **old_sh = 0, - ACE_Sig_Action *old_disp = 0); - - /// Registers @a new_sh to handle a set of signals @a sigset using the - /// @a new_disp. - virtual int register_handler (const ACE_Sig_Set &sigset, - ACE_Event_Handler *new_sh, - ACE_Sig_Action *new_disp = 0); - - /// Removes @a event_handler. - /** - * @note The I/O handle will be obtained using @c get_handle() - * method of @a event_handler . If @a mask == - * @c ACE_Event_Handler::DONT_CALL then the @c handle_close() - * method of the @a event_handler is not invoked. - */ - virtual int remove_handler (ACE_Event_Handler *event_handler, - ACE_Reactor_Mask mask); - - /** - * Removes @a handle. If @a mask == ACE_Event_Handler::DONT_CALL - * then the method of the associated - * is not invoked. - */ - virtual int remove_handler (ACE_HANDLE handle, - ACE_Reactor_Mask mask); - - /** - * Removes all handles in @a handle_set. If @a mask == - * ACE_Event_Handler::DONT_CALL then the method of - * the associated s is not invoked. - */ - virtual int remove_handler (const ACE_Handle_Set &handle_set, - ACE_Reactor_Mask mask); - - /** - * Remove the ACE_Event_Handler currently associated with @a signum. - * Install the new disposition (if given) and return the previous - * disposition (if desired by the caller). Returns 0 on success and - * -1 if @a signum is invalid. - */ - virtual int remove_handler (int signum, - ACE_Sig_Action *new_disp, - ACE_Sig_Action *old_disp = 0, - int sigkey = -1); - - /// Calls for every signal in @a sigset. - virtual int remove_handler (const ACE_Sig_Set &sigset); - - // = Suspend and resume Handlers. - - /// Suspend event_handler temporarily. Use - /// ACE_Event_Handler::get_handle() to get the handle. - virtual int suspend_handler (ACE_Event_Handler *event_handler); - - /// Suspend handle temporarily. - virtual int suspend_handler (ACE_HANDLE handle); - - /// Suspend all handles in handle set temporarily. - virtual int suspend_handler (const ACE_Handle_Set &handles); - - /// Suspend all handles temporarily. - virtual int suspend_handlers (void); - - /// Resume event_handler. Use ACE_Event_Handler::get_handle() to - /// get the handle. - virtual int resume_handler (ACE_Event_Handler *event_handler); - - /// Resume handle. - virtual int resume_handler (ACE_HANDLE handle); - - /// Resume all handles in handle set. - virtual int resume_handler (const ACE_Handle_Set &handles); - - /// Resume all handles. - virtual int resume_handlers (void); - - /// Does the reactor allow the application to resume the handle on - /// its own, i.e., can it pass on the control of handle resumption to - /// the application. - virtual int resumable_handler (void); - - /// Return true if we any event associations were made by the reactor - /// for the handles that it waits on, false otherwise. - virtual bool uses_event_associations (void); - - // = Timer management. - - /** - * Schedule an ACE_Event_Handler that will expire after an amount - * of time. The return value of this method, a timer_id value, - * uniquely identifies the event_handler in the ACE_Reactor's - * internal list of timers. - * This timer_id value can be used to cancel the timer - * with the cancel_timer() call. - * - * @see cancel_timer() - * @see reset_timer_interval() - * - * @param event_handler event handler to schedule on reactor - * @param arg argument passed to the handle_timeout() method of - * event_handler. - * @param delay time interval after which the timer will expire. - * @param interval time interval for which the timer will be - * automatically rescheduled. - * @return -1 on failure, a timer_id value on success - */ - virtual long schedule_timer (ACE_Event_Handler *event_handler, - const void *arg, - const ACE_Time_Value &delay, - const ACE_Time_Value &interval = ACE_Time_Value::zero); - - /** - * Resets the interval of the timer represented by @a timer_id to - * @a interval, which is specified in relative time to the current - * . If @a interval is equal to - * ACE_Time_Value::zero, the timer will become a non-rescheduling - * timer. Returns 0 if successful, -1 if not. - */ - virtual int reset_timer_interval (long timer_id, - const ACE_Time_Value &interval); - - /// Cancel all Event_Handlers that match the address of - /// @a event_handler. Returns number of handlers cancelled. - virtual int cancel_timer (ACE_Event_Handler *event_handler, - int dont_call_handle_close = 1); - - /** - * Cancel the single event handler that matches the @a timer_id value - * (which was returned from the schedule method). If @a arg is - * non-NULL then it will be set to point to the ``magic cookie'' - * argument passed in when the event handler was registered. This - * makes it possible to free up the memory and avoid memory leaks. - * Returns 1 if cancellation succeeded and 0 if the @a timer_id - * wasn't found. - */ - virtual int cancel_timer (long timer_id, - const void **arg = 0, - int dont_call_handle_close = 1); - - // = High-level event handler scheduling operations - - /// Add @a masks_to_be_added to the @a event_handler's entry. - /// @a event_handler must already have been registered. - virtual int schedule_wakeup (ACE_Event_Handler *event_handler, - ACE_Reactor_Mask masks_to_be_added); - - /// Add @a masks_to_be_added to the @a handle's entry. - /// associated with @a handle must already have been registered. - virtual int schedule_wakeup (ACE_HANDLE handle, - ACE_Reactor_Mask masks_to_be_added); - - /// Clear @a masks_to_be_cleared from the @a event_handler's entry. - virtual int cancel_wakeup (ACE_Event_Handler *event_handler, - ACE_Reactor_Mask masks_to_be_cleared); - - /// Clear @a masks_to_be_cleared from the @a handle's entry. - virtual int cancel_wakeup (ACE_HANDLE handle, - ACE_Reactor_Mask masks_to_be_cleared); - - // = Notification methods. - - /** - * Notify @a event_handler of @a mask event. The ACE_Time_Value - * indicates how long to blocking trying to notify. If @a timeout == - * 0, the caller will block until action is possible, else will wait - * until the relative time specified in @a timeout elapses). - */ - virtual int notify (ACE_Event_Handler *event_handler = 0, - ACE_Reactor_Mask mask = ACE_Event_Handler::EXCEPT_MASK, - ACE_Time_Value * = 0); - - /** - * Set the maximum number of times that ACE_Reactor_Impl will - * iterate and dispatch the ACE_Event_Handlers that are passed in - * via the notify queue before breaking out of its - * loop. By default, this is set to - * -1, which means "iterate until the queue is empty." Setting this - * to a value like "1 or 2" will increase "fairness" (and thus - * prevent starvation) at the expense of slightly higher dispatching - * overhead. - */ - virtual void max_notify_iterations (int); - - /** - * Get the maximum number of times that the ACE_Reactor_Impl will - * iterate and dispatch the ACE_Event_Handlers that are passed in - * via the notify queue before breaking out of its - * loop. - */ - virtual int max_notify_iterations (void); - - /** - * Purge any notifications pending in this reactor for the specified - * ACE_Event_Handler object. Returns the number of notifications - * purged. Returns -1 on error. - */ - virtual int purge_pending_notifications (ACE_Event_Handler * = 0, - ACE_Reactor_Mask = ACE_Event_Handler::ALL_EVENTS_MASK); - - /** - * Return the Event_Handler associated with @a handle. Return 0 if - * @a handle is not registered. - */ - virtual ACE_Event_Handler *find_handler (ACE_HANDLE handle); - - /** - * Check to see if @a handle is associated with a valid Event_Handler - * bound to @a mask. Return the @a event_handler associated with this - * @c handler if @a event_handler != 0. - */ - virtual int handler (ACE_HANDLE handle, - ACE_Reactor_Mask mask, - ACE_Event_Handler **event_handler = 0); - - /** - * Check to see if @a signum is associated with a valid Event_Handler - * bound to a signal. Return the @a event_handler associated with - * this @c handler if @a event_handler != 0. - */ - virtual int handler (int signum, - ACE_Event_Handler ** = 0); - - /// Returns true if Reactor has been successfully initialized, else - /// false. - virtual bool initialized (void); - - /// Returns the current size of the Reactor's internal descriptor - /// table. - virtual size_t size (void) const; - - /// Returns a reference to the Reactor's internal repository lock. - virtual ACE_Lock &lock (void); - - /// Wake up all threads waiting in the event loop. - virtual void wakeup_all_threads (void); - - /// Transfers ownership of Reactor_Impl to the @a new_owner. - /** - * @note There is no need to set the owner of the event loop for the - * ACE_Dev_Poll_Reactor. Multiple threads may invoke the - * event loop simulataneously. As such, this method is a - * no-op. - */ - virtual int owner (ACE_thread_t new_owner, ACE_thread_t *old_owner = 0); - - /// Return the ID of the "owner" thread. - /** - * @note There is no need to set the owner of the event loop for the - * ACE_Dev_Poll_Reactor. Multiple threads may invoke the - * event loop simultaneously. As such, this method is a - * no-op. - */ - virtual int owner (ACE_thread_t *owner); - - /// Get the existing restart value. - virtual bool restart (void); - - /// Set a new value for restart and return the original value. - /** - * @param r If zero, then the event loop will not be automatically - * restarted if the underlying poll is interrupted via the - * INTR (interrupt) signal. - * - * @return Returns the previous "restart" value. - */ - virtual bool restart (bool r); - - /// Set position of the owner thread. - /** - * @note This is currently a no-op. - */ - virtual void requeue_position (int); - - /// Get position of the owner thread. - /** - * @note This is currently a no-op. - */ - virtual int requeue_position (void); - - /** - * @name Low-level wait_set mask manipulation methods - * - * Low-level methods to manipulate the event/reactor mask associated - * with a handle and event handler when polling for events. - * @par - * The "interest set," i.e. the wait set, can be directly - * manipulated with these methods. - */ - //@{ - - /// GET/SET/ADD/CLR the dispatch mask "bit" bound with the - /// event_handler and mask. - /** - * @return Old mask on success, -1 on error. - */ - virtual int mask_ops (ACE_Event_Handler *event_handler, - ACE_Reactor_Mask mask, - int ops); - - /// GET/SET/ADD/CLR the dispatch MASK "bit" bound with the handle - /// and mask. - /** - * @return Old mask on success, -1 on error. - */ - virtual int mask_ops (ACE_HANDLE handle, - ACE_Reactor_Mask mask, - int ops); - - //@} - - /** - * @name Low-level ready_set mask manipulation methods - * - * These methods are unimplemented. - */ - //@{ - - /// GET/SET/ADD/CLR the ready "bit" bound with the event_handler - /// and mask. - virtual int ready_ops (ACE_Event_Handler *event_handler, - ACE_Reactor_Mask mask, - int ops); - - /// GET/SET/ADD/CLR the ready "bit" bound with the handle and mask. - virtual int ready_ops (ACE_HANDLE handle, - ACE_Reactor_Mask, - int ops); - - //@} - - /// Dump the state of an object. - virtual void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - -protected: - - class Token_Guard; - - /// Non-locking version of wait_pending(). - /** - * Returns non-zero if there are I/O events "ready" for dispatching, - * but does not actually dispatch the event handlers. By default, - * don't block while checking this, i.e., "poll". - * - * @note It is only possible to achieve millisecond timeout - * resolutions with the ACE_Dev_Poll_Reactor. - */ - int work_pending_i (ACE_Time_Value *max_wait_time); - - /// Poll for events and return the number of event handlers that - /// were dispatched. - /** - * This is a helper method called by all handle_events() methods. - */ - int handle_events_i (ACE_Time_Value *max_wait_time, Token_Guard &guard); - - /// Perform the upcall with the given event handler method. - int upcall (ACE_Event_Handler *event_handler, - int (ACE_Event_Handler::*callback)(ACE_HANDLE), - ACE_HANDLE handle); - - /** - * Dispatch ACE_Event_Handlers for time events, I/O events, and - * signal events. Returns the total number of ACE_Event_Handlers - * that were dispatched or -1 if something goes wrong. - */ - int dispatch (Token_Guard &guard); - - /// Dispatch a single timer, if ready. - /// Returns: 0 if no timers ready (token still held), - /// 1 if a timer was expired (token released), - /// -1 on error (token still held). - int dispatch_timer_handler (Token_Guard &guard); - - /// Dispatch an IO event to the corresponding event handler. Returns - /// Returns: 0 if no events ready (token still held), - /// 1 if an event was expired (token released), - /// -1 on error (token still held). - int dispatch_io_event (Token_Guard &guard); - - /// Register the given event handler with the reactor. - int register_handler_i (ACE_HANDLE handle, - ACE_Event_Handler *eh, - ACE_Reactor_Mask mask); - - /// Remove the event handler associated with the given handle and - /// event mask from the "interest set." If @a eh is supplied, only do the - /// remove if @eh matches the event handler that's registered for @a handle. - /// The caller is expected to be holding the repo token on entry and have - /// @repo_guard referencing that token. It will be temporarily released - /// during a handle_close() callback if needed; if it is released for the - //// callback it will be reacquired before return. - // FUZZ: disable check_for_ACE_Guard - int remove_handler_i (ACE_HANDLE handle, - ACE_Reactor_Mask mask, - ACE_Guard &repo_guard, - ACE_Event_Handler *eh = 0); - // FUZZ: enable check_for_ACE_Guard - - /// Temporarily remove the given handle from the "interest set." - int suspend_handler_i (ACE_HANDLE handle); - - /// Place the given handle that was temporarily removed from the - /// "interest set," i.e that was suspended, back in to the interest - /// set. The given handle will once again be polled for events. - int resume_handler_i (ACE_HANDLE handle); - - /// GET/SET/ADD/CLR the dispatch MASK "bit" bound with the handle - /// and mask. This internal helper method acquires no lock. - /** - * @return Old mask on success, -1 on error. - */ - int mask_ops_i (ACE_HANDLE handle, - ACE_Reactor_Mask mask, - int ops); - - /// Convert a reactor mask to its corresponding poll() event mask. - short reactor_mask_to_poll_event (ACE_Reactor_Mask mask); - -protected: - - /// Has the reactor been initialized. - bool initialized_; - - /// The file descriptor associated with the open `/dev/poll' or - /// `/dev/epoll' device. - /** - * All interactions with the `/dev/poll' or `/dev/epoll' device are - * done through this file descriptor. - */ - ACE_HANDLE poll_fd_; - -#if defined (ACE_HAS_EVENT_POLL) - /// Event structure to be filled by epoll_wait. epoll_wait() only gets - /// one event at a time and we rely on it's internals for fairness. - /// If this struct's fd is ACE_INVALID_HANDLE, the rest is indeterminate. - /// If the fd is good, the event is one that's been retrieved by - /// epoll_wait() but not yet processed. - struct epoll_event event_; - -#else - /// The pollfd array that `/dev/poll' will feed its results to. - struct pollfd *dp_fds_; - - - /// Pointer to the next pollfd array element that contains the next - /// event to be dispatched. - struct pollfd *start_pfds_; - - /// The last element in the pollfd array plus one. - /** - * The loop that dispatches IO events stops when this->start_pfds == - * this->end_pfds_. - */ - struct pollfd *end_pfds_; -#endif /* ACE_HAS_EVENT_POLL */ - - /// Token serializing event waiter threads. - ACE_Dev_Poll_Reactor_Token token_; - - /// Adapter used to return internal lock to outside world. - ACE_Lock_Adapter lock_adapter_; - - /// This flag is used to keep track of whether we are actively handling - /// events or not. - sig_atomic_t deactivated_; - - /// Token used to protect manipulation of the handler repository. - /// No need to hold the waiter token to change the repo. - // ACE_DEV_POLL_TOKEN repo_token_; - ACE_SYNCH_MUTEX repo_lock_; - - /// The repository that contains all registered event handlers. - Handler_Repository handler_rep_; - - /// Defined as a pointer to allow overriding by derived classes... - ACE_Timer_Queue *timer_queue_; - - /// Keeps track of whether we should delete the timer queue (if we - /// didn't create it, then we don't delete it). - bool delete_timer_queue_; - - /// Handle signals without requiring global/static variables. - ACE_Sig_Handler *signal_handler_; - - /// Keeps track of whether we should delete the signal handler (if we - /// didn't create it, then we don't delete it). - bool delete_signal_handler_; - - /// Callback object that unblocks the if it's - /// sleeping. - ACE_Reactor_Notify *notify_handler_; - - /// Keeps track of whether we need to delete the notify handler (if - /// we didn't create it, then we don't delete it). - bool delete_notify_handler_; - - /// Flag that determines if signals are masked during event - /// dispatching. - /** - * If 0 then the Reactor will not mask the signals during the event - * dispatching. This is useful for applications that do not - * register any signal handlers and want to reduce the overhead - * introduce by the kernel level locks required to change the mask. - */ - int mask_signals_; - - /// Restart the handle_events event loop method automatically when - /// polling function in use (ioctl() in this case) is interrupted - /// via an EINTR signal. - bool restart_; - -protected: - - /** - * @class Token_Guard - * - * @brief A helper class that helps grabbing, releasing and waiting - * on tokens for a thread that needs access to the reactor's token. - */ - class ACE_Export Token_Guard - { - public: - - /// Constructor that will grab the token for us - Token_Guard (ACE_Dev_Poll_Reactor_Token &token); - - /// Destructor. This will release the token if it hasn't been - /// released till this point - ~Token_Guard (void); - - /// Release the token .. - void release_token (void); - - /// Returns whether the thread that created this object owns the - /// token or not. - int is_owner (void); - - /// A helper method that acquires the token 1) at a low priority, and - /// 2) wait quietly for the token, not waking another thread. This - /// is appropriate for cases where a thread wants to wait for and - /// dispatch an event, not causing an existing waiter to relinquish the - /// token. - int acquire_quietly (ACE_Time_Value *max_wait = 0); - - /// A helper method that acquires the token at a high priority, and - /// does wake the current token holder. - int acquire (ACE_Time_Value *max_wait = 0); - - private: - - Token_Guard (void); - - private: - - /// The Reactor token. - ACE_Dev_Poll_Reactor_Token &token_; - - /// Flag that indicate whether the thread that created this object - /// owns the token or not. A value of 0 indicates that this class - /// hasn't got the token (and hence the thread) and a value of 1 - /// vice-versa. - int owner_; - - }; -}; - - -/** - * @class ACE_Dev_Poll_Handler_Guard - * - * @brief Class used to make event handler reference count - * manipulation exception-safe. - * - * This class makes the reference count manipulation that occurs - * during an upcall exception-safe. Prior to dispatching the event - * handler, the reference count is increased. Once the upcall for the - * given event handler is complete, its reference count will be decreased. - */ -class ACE_Dev_Poll_Handler_Guard -{ -public: - - /// Constructor - /** - * The constructor checks to see if @a eh is a reference-counted handler and - * remember that for later. If @a eh is reference counted, its reference - * count is incremented unless @a do_incr is false. - * @a do_incr should be false if the reference count was incremented - * independently of this guard, for example, on a notify handler since - * the reference count is incremented when the notify is queued. - */ - ACE_Dev_Poll_Handler_Guard (ACE_Event_Handler *eh, bool do_incr = true); - - /// Destructor - /** - * The destructor decrements the reference count on the event - * handler corresponding to the given handle. - */ - ~ACE_Dev_Poll_Handler_Guard (void); - - /// Release the event handler from this guard; when the destructor is - /// called, the handler's reference count will not be decremented. - void release (void); - -private: - - /// The event handler being managed. - ACE_Event_Handler *eh_; - - /// true if eh_ is a reference-counted handler. - bool refcounted_; - -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -# include "ace/Dev_Poll_Reactor.inl" -#endif /* __ACE_INLINE__ */ - -#endif /* ACE_HAS_EVENT_POLL || ACE_HAS_DEV_POLL */ - -#include /**/ "ace/post.h" - -#endif /* ACE_DEV_POLL_REACTOR_H */ diff --git a/modules/worldengine/deps/acelite/ace/Dev_Poll_Reactor.inl b/modules/worldengine/deps/acelite/ace/Dev_Poll_Reactor.inl deleted file mode 100644 index aedd570571..0000000000 --- a/modules/worldengine/deps/acelite/ace/Dev_Poll_Reactor.inl +++ /dev/null @@ -1,132 +0,0 @@ -// -*- C++ -*- -#include "ace/Log_Category.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_INLINE -ACE_Dev_Poll_Reactor::Event_Tuple::Event_Tuple (ACE_Event_Handler *eh, - ACE_Reactor_Mask m, - bool is_suspended, - bool is_controlled) - : event_handler (eh), - mask (m), - suspended (is_suspended), - controlled (is_controlled) -{ -} - -// --------------------------------------------------------------------- - -ACE_INLINE size_t -ACE_Dev_Poll_Reactor::Handler_Repository::size (void) const -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::Handler_Repository::size"); - - return this->size_; -} - -ACE_INLINE size_t -ACE_Dev_Poll_Reactor::Handler_Repository::max_size (void) const -{ - ACE_TRACE ("ACE_Dev_Poll_Reactor::Handler_Repository::max_size"); - - return this->max_size_; -} - -// ----------------------------------------------------------------- - -ACE_INLINE -ACE_Dev_Poll_Handler_Guard::ACE_Dev_Poll_Handler_Guard - (ACE_Event_Handler *eh, - bool do_incr) - : eh_ (eh), - refcounted_ (false) -{ - if (eh == 0) - return; - - this->refcounted_ = - eh->reference_counting_policy ().value () == - ACE_Event_Handler::Reference_Counting_Policy::ENABLED; - - if (do_incr && this->refcounted_) - eh->add_reference (); -} - -ACE_INLINE -ACE_Dev_Poll_Handler_Guard::~ACE_Dev_Poll_Handler_Guard (void) -{ - if (this->refcounted_ && this->eh_ != 0) - this->eh_->remove_reference (); -} - -ACE_INLINE void -ACE_Dev_Poll_Handler_Guard::release (void) -{ - this->eh_ = 0; -} - -// --------------------------------------------------------------------- - -ACE_INLINE int -ACE_Dev_Poll_Reactor::upcall (ACE_Event_Handler *event_handler, - int (ACE_Event_Handler::*callback)(ACE_HANDLE), - ACE_HANDLE handle) -{ - // If the handler returns positive value (requesting a reactor - // callback) just call back as many times as the handler requests - // it. The handler is suspended internally and other threads are off - // handling other things. - int status = 0; - - do - { - status = (event_handler->*callback) (handle); - } - while (status > 0 && event_handler != this->notify_handler_); - - return status; -} - - -/************************************************************************/ -// Methods for ACE_Dev_Poll_Reactor::Token_Guard -/************************************************************************/ - -ACE_INLINE -ACE_Dev_Poll_Reactor::Token_Guard::Token_Guard (ACE_Dev_Poll_Reactor_Token &token) - - : token_ (token), - owner_ (0) -{ -} - -ACE_INLINE -ACE_Dev_Poll_Reactor::Token_Guard::~Token_Guard (void) -{ - if (this->owner_ == 1) - { - ACE_MT (this->token_.release ()); - this->owner_ = 0; - } -} - -ACE_INLINE void -ACE_Dev_Poll_Reactor::Token_Guard::release_token (void) -{ - if (this->owner_) - { - ACE_MT (this->token_.release ()); - - // We are not the owner anymore.. - this->owner_ = 0; - } -} - -ACE_INLINE int -ACE_Dev_Poll_Reactor::Token_Guard::is_owner (void) -{ - return this->owner_; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Dirent.cpp b/modules/worldengine/deps/acelite/ace/Dirent.cpp deleted file mode 100644 index 5f8bd074d5..0000000000 --- a/modules/worldengine/deps/acelite/ace/Dirent.cpp +++ /dev/null @@ -1,5 +0,0 @@ -#include "ace/Dirent.h" - -#if !defined (__ACE_INLINE__) -#include "ace/Dirent.inl" -#endif /* __ACE_INLINE__ */ diff --git a/modules/worldengine/deps/acelite/ace/Dirent.h b/modules/worldengine/deps/acelite/ace/Dirent.h deleted file mode 100644 index a1acbedd49..0000000000 --- a/modules/worldengine/deps/acelite/ace/Dirent.h +++ /dev/null @@ -1,120 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Dirent.h - * - * Define a portable C++ interface to ACE_OS_Dirent directory-entry - * manipulation. - * - * @author Douglas C. Schmidt - */ -//============================================================================= - -#ifndef ACE_DIRENT_H -#define ACE_DIRENT_H -#include /**/ "ace/pre.h" - -#include /**/ "ace/ACE_export.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/OS_NS_dirent.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_Dirent - * - * @brief Define a portable C++ directory-entry iterator based on the POSIX API. - */ -class ACE_Export ACE_Dirent -{ -public: - // = Initialization and termination methods. - /// Default constructor. - ACE_Dirent (void); - - /// Constructor calls @c opendir() - explicit ACE_Dirent (const ACE_TCHAR *dirname); - - /// Opens the directory named by filename and associates a directory - /// stream with it. - int open (const ACE_TCHAR *filename); - - /// Destructor calls @c closedir(). - ~ACE_Dirent (void); - - /// Closes the directory stream and frees the ACE_DIR structure. - void close (void); - - // = Iterator methods. - /** - * Returns a pointer to a structure representing the directory entry - * at the current position in the directory stream to which dirp - * refers, and positions the directory stream at the next entry, - * except on read-only filesystems. It returns a NULL pointer upon - * reaching the end of the directory stream, or upon detecting an - * invalid location in the directory. @c read() shall not return - * directory entries containing empty names. It is unspecified - * whether entries are returned for dot or dot-dot. The pointer - * returned by @c read() points to data that may be overwritten by - * another call to @c read() on the same directory stream. This - * data shall not be overwritten by another call to @c read() on a - * different directory stream. @c read() may buffer several - * directory entries per actual read operation; @c read() marks for - * update the st_atime field of the directory each time the - * directory is actually read. - */ - ACE_DIRENT *read (void); - - /** - * Has the equivalent functionality as @c read() except that an - * @a entry and @a result buffer must be supplied by the caller to - * store the result. - */ - int read (struct ACE_DIRENT *entry, - struct ACE_DIRENT **result); - - // = Manipulators. - /// Returns the current location associated with the directory - /// stream. - long tell (void); - - /** - * Sets the position of the next @c read() operation on the - * directory stream. The new position reverts to the position - * associated with the directory stream at the time the @c tell() - * operation that provides loc was performed. Values returned by - * @c tell() are good only for the lifetime of the ACE_DIR pointer from - * which they are derived. If the directory is closed and then - * reopened, the @c telldir() value may be invalidated due to - * undetected directory compaction. It is safe to use a previous - * @c telldir() value immediately after a call to @c opendir() and before - * any calls to readdir. - */ - void seek (long loc); - - /** - * Resets the position of the directory stream to the beginning of - * the directory. It also causes the directory stream to refer to - * the current state of the corresponding directory, as a call to - * @c opendir() would. - */ - void rewind (void); - -private: - /// Pointer to the directory stream. - ACE_DIR *dirp_; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/Dirent.inl" -#endif /* __ACE_INLINE__ */ - -#include /**/ "ace/post.h" -#endif /* ACE_DIRENT_H */ diff --git a/modules/worldengine/deps/acelite/ace/Dirent.inl b/modules/worldengine/deps/acelite/ace/Dirent.inl deleted file mode 100644 index 3e420f1cc7..0000000000 --- a/modules/worldengine/deps/acelite/ace/Dirent.inl +++ /dev/null @@ -1,96 +0,0 @@ -// -*- C++ -*- -#include "ace/Log_Category.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_INLINE int -ACE_Dirent::open (const ACE_TCHAR *dirname) -{ - // If the directory stream is already open, close it to prevent - // possible resource leaks. - - if (this->dirp_ != 0) - { - ACE_OS::closedir (this->dirp_); - this->dirp_ = 0; - } - - this->dirp_ = ACE_OS::opendir (dirname); - - if (this->dirp_ == 0) - return -1; - else - return 0; -} - -ACE_INLINE -ACE_Dirent::ACE_Dirent (void) - : dirp_ (0) -{ -} - -ACE_INLINE -ACE_Dirent::ACE_Dirent (const ACE_TCHAR *dirname) - : dirp_ (0) -{ - if (this->open (dirname) == -1) - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("%p\n"), - ACE_TEXT ("ACE_Dirent::ACE_Dirent"))); -} - -ACE_INLINE -ACE_Dirent::~ACE_Dirent (void) -{ - if (this->dirp_ != 0) - ACE_OS::closedir (this->dirp_); -} - -ACE_INLINE ACE_DIRENT * -ACE_Dirent::read (void) -{ - return this->dirp_ ? ACE_OS::readdir (this->dirp_) : 0; -} - -ACE_INLINE int -ACE_Dirent::read (struct ACE_DIRENT *entry, - struct ACE_DIRENT **result) -{ - return this->dirp_ - ? ACE_OS::readdir_r (this->dirp_, entry, result) - : 0; -} - -ACE_INLINE void -ACE_Dirent::close (void) -{ - if (this->dirp_ != 0) - { - ACE_OS::closedir (this->dirp_); - - // Prevent double closure - this->dirp_ = 0; - } -} - -ACE_INLINE void -ACE_Dirent::rewind (void) -{ - if (this->dirp_) - ACE_OS::rewinddir (this->dirp_); -} - -ACE_INLINE void -ACE_Dirent::seek (long loc) -{ - if (this->dirp_) - ACE_OS::seekdir (this->dirp_, loc); -} - -ACE_INLINE long -ACE_Dirent::tell (void) -{ - return this->dirp_ ? ACE_OS::telldir (this->dirp_) : 0; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Dirent_Selector.cpp b/modules/worldengine/deps/acelite/ace/Dirent_Selector.cpp deleted file mode 100644 index 3e71059977..0000000000 --- a/modules/worldengine/deps/acelite/ace/Dirent_Selector.cpp +++ /dev/null @@ -1,53 +0,0 @@ -#include "ace/Dirent_Selector.h" - -#if !defined (__ACE_INLINE__) -#include "ace/Dirent_Selector.inl" -#endif /* __ACE_INLINE__ */ - -#include "ace/OS_NS_dirent.h" -#include "ace/OS_NS_stdlib.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -// Construction/Destruction - -ACE_Dirent_Selector::ACE_Dirent_Selector (void) - : namelist_ (0), - n_ (0) -{ -} - -ACE_Dirent_Selector::~ACE_Dirent_Selector (void) -{ - // Free up any allocated resources. - this->close(); -} - -int -ACE_Dirent_Selector::open (const ACE_TCHAR *dir, - ACE_SCANDIR_SELECTOR sel, - ACE_SCANDIR_COMPARATOR cmp) -{ - n_ = ACE_OS::scandir (dir, &this->namelist_, sel, cmp); - return n_; -} - -int -ACE_Dirent_Selector::close (void) -{ - for (--n_; n_ >= 0; --n_) - { -#if defined (ACE_LACKS_STRUCT_DIR) - // Only the lacking-struct-dir emulation allocates this. Native - // scandir includes d_name in the dirent struct itself. - ACE_OS::free (this->namelist_[n_]->d_name); -#endif - ACE_OS::free (this->namelist_[n_]); - } - - ACE_OS::free (this->namelist_); - this->namelist_ = 0; - return 0; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Dirent_Selector.h b/modules/worldengine/deps/acelite/ace/Dirent_Selector.h deleted file mode 100644 index 0de9dc085a..0000000000 --- a/modules/worldengine/deps/acelite/ace/Dirent_Selector.h +++ /dev/null @@ -1,73 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Dirent_Selector.h - * - * Define a portable C++ interface to the method. - * - * @author Rich Newman - */ -//============================================================================= - -#ifndef ACE_DIRENT_SELECTOR_H -#define ACE_DIRENT_SELECTOR_H -#include /**/ "ace/pre.h" - -#include /**/ "ace/ACE_export.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -#pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/OS_NS_dirent.h" /* Need ACE_SCANDIR_SELECTOR, COMPARATOR */ -#include "ace/os_include/os_dirent.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_Dirent_Selector - * - * @brief Define a portable C++ directory-entry iterator based on the - * POSIX scandir API. - */ -class ACE_Export ACE_Dirent_Selector -{ -public: - /// Constructor - ACE_Dirent_Selector (void); - - /// Destructor. - virtual ~ACE_Dirent_Selector (void); - - /// Return the length of the list of matching directory entries. - int length (void) const; - - /// Return the entry at @a index. - ACE_DIRENT *operator[] (const int index) const; - - /// Free up resources. - int close (void); - - /// Open the directory @a dir and populate the current list of names with - /// directory entries that match the @a selector and @a comparator. - int open (const ACE_TCHAR *dir, - ACE_SCANDIR_SELECTOR selector = 0, - ACE_SCANDIR_COMPARATOR comparator = 0); - -protected: - /// Ptr to the namelist array. - ACE_DIRENT **namelist_; - - /// Number of entries in the array. - int n_; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/Dirent_Selector.inl" -#endif /* __ACE_INLINE__ */ - -#include /**/ "ace/post.h" -#endif /* ACE_DIRENT_SELECTOR_H */ diff --git a/modules/worldengine/deps/acelite/ace/Dirent_Selector.inl b/modules/worldengine/deps/acelite/ace/Dirent_Selector.inl deleted file mode 100644 index 27651569b7..0000000000 --- a/modules/worldengine/deps/acelite/ace/Dirent_Selector.inl +++ /dev/null @@ -1,16 +0,0 @@ -// -*- C++ -*- -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_INLINE int -ACE_Dirent_Selector::length (void) const -{ - return n_; -} - -ACE_INLINE ACE_DIRENT * -ACE_Dirent_Selector::operator[] (const int n) const -{ - return this->namelist_[n]; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Dump.cpp b/modules/worldengine/deps/acelite/ace/Dump.cpp deleted file mode 100644 index 1dbb021753..0000000000 --- a/modules/worldengine/deps/acelite/ace/Dump.cpp +++ /dev/null @@ -1,139 +0,0 @@ -#include "ace/Dump.h" -#include "ace/Guard_T.h" -#include "ace/Thread_Mutex.h" -#include "ace/Object_Manager.h" -#include "ace/Log_Category.h" - - - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -// Implementations (very simple for now...) - -ACE_Dumpable::~ACE_Dumpable (void) -{ - ACE_TRACE ("ACE_Dumpable::~ACE_Dumpable"); -} - -ACE_Dumpable::ACE_Dumpable (const void *this_ptr) - : this_ (this_ptr) -{ - ACE_TRACE ("ACE_Dumpable::ACE_Dumpable"); -} - -ACE_Dumpable_Ptr::ACE_Dumpable_Ptr (const ACE_Dumpable *dumper) - : dumper_ (dumper) -{ - ACE_TRACE ("ACE_Dumpable_Ptr::ACE_Dumpable_Ptr"); -} - -const ACE_Dumpable * -ACE_Dumpable_Ptr::operator->() const -{ - ACE_TRACE ("ACE_Dumpable_Ptr::operator->"); - return this->dumper_; -} - -void -ACE_Dumpable_Ptr::operator= (const ACE_Dumpable *dumper) const -{ - ACE_TRACE ("ACE_Dumpable_Ptr::operator="); - if (this->dumper_ != dumper) - { - delete const_cast (this->dumper_); - (const_cast (this))->dumper_ = dumper; - } -} - -ACE_ODB::ACE_ODB (void) - // Let the Tuple default constructor initialize object_table_ - : current_size_ (0) -{ - ACE_TRACE ("ACE_ODB::ACE_ODB"); -} - -ACE_ODB * -ACE_ODB::instance (void) -{ - ACE_TRACE ("ACE_ODB::instance"); - - if (ACE_ODB::instance_ == 0) - { - ACE_MT (ACE_Thread_Mutex *lock = - ACE_Managed_Object::get_preallocated_object - (ACE_Object_Manager::ACE_DUMP_LOCK); - ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, *lock, 0)); - - if (ACE_ODB::instance_ == 0) - ACE_NEW_RETURN (ACE_ODB::instance_, - ACE_ODB, - 0); - } - - return ACE_ODB::instance_; -} - -void -ACE_ODB::dump_objects (void) -{ - ACE_TRACE ("ACE_ODB::dump_objects"); - for (int i = 0; i < this->current_size_; i++) - { - if (this->object_table_[i].this_ != 0) - // Dump the state of the object. - this->object_table_[i].dumper_->dump (); - } -} - -// This method registers a new . It detects -// duplicates and simply overwrites them. - -void -ACE_ODB::register_object (const ACE_Dumpable *dumper) -{ - ACE_TRACE ("ACE_ODB::register_object"); - int i; - int slot = 0; - - for (i = 0; i < this->current_size_; i++) - { - if (this->object_table_[i].this_ == 0) - slot = i; - else if (this->object_table_[i].this_ == dumper->this_) - { - slot = i; - break; - } - } - - if (i == this->current_size_) - { - slot = this->current_size_++; - ACE_ASSERT (this->current_size_ < ACE_ODB::MAX_TABLE_SIZE); - } - this->object_table_[slot].this_ = dumper->this_; - this->object_table_[slot].dumper_ = dumper; -} - -void -ACE_ODB::remove_object (const void *this_ptr) -{ - ACE_TRACE ("ACE_ODB::remove_object"); - int i; - - for (i = 0; i < this->current_size_; i++) - { - if (this->object_table_[i].this_ == this_ptr) - break; - } - - if (i < this->current_size_) - { - this->object_table_[i].this_ = 0; - this->object_table_[i].dumper_ = 0; - } -} - -ACE_ODB *ACE_ODB::instance_ = 0; - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Dump.h b/modules/worldengine/deps/acelite/ace/Dump.h deleted file mode 100644 index 5c32e05257..0000000000 --- a/modules/worldengine/deps/acelite/ace/Dump.h +++ /dev/null @@ -1,168 +0,0 @@ -/* -*- C++ -*- */ - -//============================================================================= -/** - * @file Dump.h - * - * A prototype mechanism that allow all ACE objects to be registered - * with a central in-memory "database" that can dump the state of all - * live ACE objects (e.g., from within a debugger). - * - * The macros which allow easy registration and removal of objects to be - * dumped (ACE_REGISTER_OBJECT and ACE_REMOVE_OBJECT) are turned into - * no-ops by compiling with the ACE_NDEBUG macro defined. This allows - * usage to be removed in "release mode" builds without changing code. - * - * There are several interesting aspects to this design: - * - * 1. It uses the External Polymorphism pattern to avoid having to - * derive all ACE classes from a common base class that has virtual - * methods (this is crucial to avoid unnecessary overhead). In - * addition, there is no additional space added to ACE objects - * (this is crucial to maintain binary layout compatibility). - * - * 2. This mechanism can be conditionally compiled in order to - * completely disable this feature entirely. Moreover, by - * using macros there are relatively few changes to ACE code. - * - * 3. This mechanism copes with single-inheritance hierarchies of - * dumpable classes. In such cases we typically want only one - * dump, corresponding to the most derived instance. Thanks to - * Christian Millour (chris@etca.fr) for illustrating how to do - * this. Note, however, that this scheme doesn't generalize to - * work with multiple-inheritance or virtual base classes. - * - * Future work includes: - * - * 1. Using a dynamic object table rather than a static table - * - * 2. Adding support to allow particular classes of objects to - * be selectively dumped. - * - * @author Doug Schmidt - */ -//============================================================================= - - -#ifndef ACE_DUMP_H -#define ACE_DUMP_H -#include /**/ "ace/pre.h" - -#include /**/ "ace/ACE_export.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_Dumpable - * - * @brief Base class that defines a uniform interface for all object - * dumping. - */ -class ACE_Export ACE_Dumpable -{ -public: - friend class ACE_ODB; - friend class ACE_Dumpable_Ptr; - - /// Constructor. - ACE_Dumpable (const void *); - - /// This pure virtual method must be filled in by a subclass. - virtual void dump (void) const = 0; - -protected: - virtual ~ACE_Dumpable (void); - -private: - /// Pointer to the object that is being stored. - const void *this_; -}; - -/** - * @class ACE_Dumpable_Ptr - * - * @brief A smart pointer stored in the in-memory object database - * ACE_ODB. The pointee (if any) is deleted when reassigned. - */ -class ACE_Export ACE_Dumpable_Ptr -{ -public: - ACE_Dumpable_Ptr (const ACE_Dumpable *dumper = 0); - const ACE_Dumpable *operator->() const; - void operator= (const ACE_Dumpable *dumper) const; - -private: - /// "Real" pointer to the underlying abstract base class - /// pointer that does the real work. - const ACE_Dumpable *dumper_; -}; - -/** - * @class ACE_ODB - * - * @brief This is the object database (ODB) that keeps track of all - * live ACE objects. - */ -class ACE_Export ACE_ODB -{ -public: - /// @todo This is clearly inadequate and should be dynamic... - enum {MAX_TABLE_SIZE = 100000}; - - /// Iterates through the entire set of registered objects and - /// dumps their state. - void dump_objects (void); - - /// Add the tuple to the list of registered ACE objects. - void register_object (const ACE_Dumpable *dumper); - - /// Use to locate and remove the associated from the - /// list of registered ACE objects. - void remove_object (const void *this_); - - /// Interface to the Singleton instance of the object database. - static ACE_ODB *instance (void); - -private: - ACE_ODB (void); // Ensure we have a Singleton... - - struct Tuple - { - /// Pointer to the object that is registered. - const void *this_; - - /// Smart pointer to the ACE_Dumpable object associated with this_. - /// This uses an ACE_Dumpable_Ptr, instead of a bare pointer, to - /// cope with hierarchies of dumpable classes. In such cases we - /// typically want only one dump, corresponding to the most derived - /// instance. To achieve this, the handle registered for the - /// subobject corresponding to the base class is destroyed (hence - /// on destruction of the subobject its handle won't exist anymore - /// and we'll have to check for that). - const ACE_Dumpable_Ptr dumper_; - - Tuple (void) : this_ (0), dumper_(0) {} - }; - - /// Singleton instance of this class. - static ACE_ODB *instance_; - - /// The current implementation is very simple-minded and will be - /// changed to be dynamic. - Tuple object_table_[ACE_ODB::MAX_TABLE_SIZE]; - - /// Current size of . - int current_size_; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -// Include the templates classes at this point. -#include "ace/Dump_T.h" - -#include /**/ "ace/post.h" -#endif /* ACE_DUMP_H */ diff --git a/modules/worldengine/deps/acelite/ace/Dump_T.cpp b/modules/worldengine/deps/acelite/ace/Dump_T.cpp deleted file mode 100644 index fc0833a9e3..0000000000 --- a/modules/worldengine/deps/acelite/ace/Dump_T.cpp +++ /dev/null @@ -1,45 +0,0 @@ -// Dump_T.cpp -#ifndef ACE_DUMP_T_CPP -#define ACE_DUMP_T_CPP - -#include "ace/Dump_T.h" -#include "ace/Global_Macros.h" -#include "ace/config-all.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -template -ACE_Dumpable_Adapter::~ACE_Dumpable_Adapter (void) -{ - ACE_TRACE ("ACE_Dumpable_Adapter::~ACE_Dumpable_Adapter"); -} - -template -ACE_Dumpable_Adapter::ACE_Dumpable_Adapter (const Concrete *t) - : ACE_Dumpable ((const void *) t), this_ (t) -{ - ACE_TRACE ("ACE_Dumpable_Adapter::ACE_Dumpable_Adapter"); -} - -template Concrete * -ACE_Dumpable_Adapter::operator->() const -{ - return (Concrete *) this->this_; -} - -template void -ACE_Dumpable_Adapter::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_Dumpable_Adapter::dump"); - this->this_->dump (); -#endif /* ACE_HAS_DUMP */ -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_DUMP_T_CPP */ diff --git a/modules/worldengine/deps/acelite/ace/Dump_T.h b/modules/worldengine/deps/acelite/ace/Dump_T.h deleted file mode 100644 index b8859d1136..0000000000 --- a/modules/worldengine/deps/acelite/ace/Dump_T.h +++ /dev/null @@ -1,81 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Dump_T.h - * - * @author Doug Schmidt - */ -//============================================================================= - - -#ifndef ACE_DUMP_T_H -#define ACE_DUMP_T_H -#include /**/ "ace/pre.h" - -#include "ace/Dump.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_Dumpable_Adapter - * - * @brief - * This class inherits the interface of the abstract ACE_Dumpable - * class and is instantiated with the implementation of the - * concrete component class . - * - * This design is similar to the Adapter and Decorator patterns - * from the ``Gang of Four'' book. Note that - * need not inherit from a common class since ACE_Dumpable - * provides the uniform virtual interface! - */ -template -class ACE_Dumpable_Adapter : public ACE_Dumpable -{ -public: - // = Initialization and termination methods. - ACE_Dumpable_Adapter (const Concrete *t); - ~ACE_Dumpable_Adapter (void); - - /// Concrete dump method (simply delegates to the dump() method of - /// ). - virtual void dump (void) const; - - /// Delegate to methods in the Concrete class. - Concrete *operator->() const; - -private: - /// Pointer to @c this of . - const Concrete *this_; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -// Some useful macros for conditionally compiling this feature... -#if defined (ACE_NDEBUG) -#define ACE_REGISTER_OBJECT(CLASS) -#define ACE_REMOVE_OBJECT -#else -#define ACE_REGISTER_OBJECT(CLASS) \ - ACE_ODB::instance ()->register_object \ - (new ACE_Dumpable_Adapter (this)); -#define ACE_REMOVE_OBJECT \ - ACE_ODB::instance ()->remove_object \ - ((void *) this); -#endif /* ACE_NDEBUG */ - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "ace/Dump_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Dump_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ - -#include /**/ "ace/post.h" -#endif /* ACE_DUMP_T_H */ diff --git a/modules/worldengine/deps/acelite/ace/Dynamic.cpp b/modules/worldengine/deps/acelite/ace/Dynamic.cpp deleted file mode 100644 index f4e9708b99..0000000000 --- a/modules/worldengine/deps/acelite/ace/Dynamic.cpp +++ /dev/null @@ -1,30 +0,0 @@ -#include "ace/Dynamic.h" -#include "ace/Singleton.h" -#include "ace/TSS_T.h" -#include "ace/Synch_Traits.h" -#include "ace/Null_Mutex.h" - -#if !defined (__ACE_INLINE__) -#include "ace/Dynamic.inl" -#endif /* __ACE_INLINE__ */ - - - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_Dynamic::ACE_Dynamic (void) - : is_dynamic_ (false) -{ - ACE_TRACE ("ACE_Dynamic::ACE_Dynamic"); -} - -/* static */ ACE_Dynamic * -ACE_Dynamic::instance (void) -{ - return ACE_TSS_Singleton::instance (); -} - -ACE_SINGLETON_TEMPLATE_INSTANTIATE(ACE_TSS_Singleton, ACE_Dynamic, ACE_Null_Mutex); - - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Dynamic.h b/modules/worldengine/deps/acelite/ace/Dynamic.h deleted file mode 100644 index 83bc055f34..0000000000 --- a/modules/worldengine/deps/acelite/ace/Dynamic.h +++ /dev/null @@ -1,73 +0,0 @@ -// -*- C++ -*- - -//========================================================================== -/** - * @file Dynamic.h - * - * @author Doug Schmidt - * @author Irfan Pyarali. - */ -//========================================================================== - -#ifndef ACE_DYNAMIC_H -#define ACE_DYNAMIC_H -#include /**/ "ace/pre.h" - -#include /**/ "ace/ACE_export.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_Dynamic - * - * @brief Checks to see if an object was dynamically allocated. - * - * This class holds the pointer in a thread-safe manner between - * the call to operator new and the call to the constructor. - */ -class ACE_Export ACE_Dynamic -{ -public: - // = Initialization and termination method. - /// Constructor. - ACE_Dynamic (void); - - /// Destructor. - ~ACE_Dynamic (void); - - /** - * Sets a flag that indicates that the object was dynamically - * created. This method is usually called in operator new and then - * checked and reset in the constructor. - */ - void set (void); - - /// @c true if we were allocated dynamically, else @c false. - bool is_dynamic (void); - - /// Resets state flag. - void reset (void); - - static ACE_Dynamic *instance (void); - -private: - /** - * Flag that indicates that the object was dynamically created. This - * method is usually called in operator new and then checked and - * reset in the constructor. - */ - bool is_dynamic_; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/Dynamic.inl" -#endif /* __ACE_INLINE__ */ - -#include /**/ "ace/post.h" -#endif /* ACE_DYNAMIC_H */ diff --git a/modules/worldengine/deps/acelite/ace/Dynamic.inl b/modules/worldengine/deps/acelite/ace/Dynamic.inl deleted file mode 100644 index 795f33d2ec..0000000000 --- a/modules/worldengine/deps/acelite/ace/Dynamic.inl +++ /dev/null @@ -1,31 +0,0 @@ -// -*- C++ -*- -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_INLINE -ACE_Dynamic::~ACE_Dynamic (void) -{ - // ACE_TRACE ("ACE_Dynamic::~ACE_Dynamic"); -} - -ACE_INLINE void -ACE_Dynamic::set (void) -{ - // ACE_TRACE ("ACE_Dynamic::set"); - this->is_dynamic_ = true; -} - -ACE_INLINE bool -ACE_Dynamic::is_dynamic (void) -{ - // ACE_TRACE ("ACE_Dynamic::is_dynamic"); - return this->is_dynamic_; -} - -ACE_INLINE void -ACE_Dynamic::reset (void) -{ - // ACE_TRACE ("ACE_Dynamic::reset"); - this->is_dynamic_ = false; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Dynamic_Message_Strategy.cpp b/modules/worldengine/deps/acelite/ace/Dynamic_Message_Strategy.cpp deleted file mode 100644 index 35802fdbff..0000000000 --- a/modules/worldengine/deps/acelite/ace/Dynamic_Message_Strategy.cpp +++ /dev/null @@ -1,201 +0,0 @@ -#include "ace/Dynamic_Message_Strategy.h" - -#if !defined (__ACE_INLINE__) -#include "ace/Dynamic_Message_Strategy.inl" -#endif /* __ACE_INLINE__ */ - -#include "ace/Guard_T.h" -#include "ace/Log_Category.h" -#include "ace/Malloc_Base.h" -#include "ace/OS_NS_string.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -// ctor - -ACE_Dynamic_Message_Strategy::ACE_Dynamic_Message_Strategy (unsigned long static_bit_field_mask, - unsigned long static_bit_field_shift, - unsigned long dynamic_priority_max, - unsigned long dynamic_priority_offset) - : static_bit_field_mask_ (static_bit_field_mask), - static_bit_field_shift_ (static_bit_field_shift), - dynamic_priority_max_ (dynamic_priority_max), - dynamic_priority_offset_ (dynamic_priority_offset), - max_late_ (0, dynamic_priority_offset - 1), - min_pending_ (0, dynamic_priority_offset), - pending_shift_ (0, dynamic_priority_max) -{ -} - -// dtor - -ACE_Dynamic_Message_Strategy::~ACE_Dynamic_Message_Strategy (void) -{ -} - -ACE_Dynamic_Message_Strategy::Priority_Status -ACE_Dynamic_Message_Strategy::priority_status (ACE_Message_Block & mb, - const ACE_Time_Value & tv) -{ - // default the message to have pending priority status - Priority_Status status = ACE_Dynamic_Message_Strategy::PENDING; - - // start with the passed absolute time as the message's priority, then - // call the polymorphic hook method to (at least partially) convert - // the absolute time and message attributes into the message's priority - ACE_Time_Value priority (tv); - convert_priority (priority, mb); - - // if the priority is negative, the message is pending - if (priority < ACE_Time_Value::zero) - { - // priority for pending messages must be shifted - // upward above the late priority range - priority += pending_shift_; - if (priority < min_pending_) - priority = min_pending_; - } - // otherwise, if the priority is greater than the maximum late - // priority value that can be represented, it is beyond late - else if (priority > max_late_) - { - // all messages that are beyond late are assigned lowest priority (zero) - mb.msg_priority (0); - return ACE_Dynamic_Message_Strategy::BEYOND_LATE; - } - // otherwise, the message is late, but its priority is correct - else - status = ACE_Dynamic_Message_Strategy::LATE; - - // use (fast) bitwise operators to isolate and replace - // the dynamic portion of the message's priority - mb.msg_priority((mb.msg_priority() & static_bit_field_mask_) | - ((priority.usec () + - ACE_ONE_SECOND_IN_USECS * (suseconds_t)(priority.sec())) << - static_bit_field_shift_)); - - // returns the priority status of the message - return status; -} - - -// Dump the state of the strategy. - -void -ACE_Dynamic_Message_Strategy::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_Dynamic_Message_Strategy::dump"); - - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - - ACELIB_DEBUG ((LM_DEBUG, - ACE_TEXT ("static_bit_field_mask_ = %u\n") - ACE_TEXT ("static_bit_field_shift_ = %u\n") - ACE_TEXT ("dynamic_priority_max_ = %u\n") - ACE_TEXT ("dynamic_priority_offset_ = %u\n") - ACE_TEXT ("max_late_ = [%d sec, %d usec]\n") - ACE_TEXT ("min_pending_ = [%d sec, %d usec]\n") - ACE_TEXT ("pending_shift_ = [%d sec, %d usec]\n"), - this->static_bit_field_mask_, - this->static_bit_field_shift_, - this->dynamic_priority_max_, - this->dynamic_priority_offset_, - this->max_late_.sec (), - this->max_late_.usec (), - this->min_pending_.sec (), - this->min_pending_.usec (), - this->pending_shift_.sec (), - this->pending_shift_.usec ())); - - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} - -ACE_Deadline_Message_Strategy::ACE_Deadline_Message_Strategy (unsigned long static_bit_field_mask, - unsigned long static_bit_field_shift, - unsigned long dynamic_priority_max, - unsigned long dynamic_priority_offset) - : ACE_Dynamic_Message_Strategy (static_bit_field_mask, - static_bit_field_shift, - dynamic_priority_max, - dynamic_priority_offset) -{ -} - -ACE_Deadline_Message_Strategy::~ACE_Deadline_Message_Strategy (void) -{ -} - -void -ACE_Deadline_Message_Strategy::convert_priority (ACE_Time_Value & priority, - const ACE_Message_Block & mb) -{ - // Convert absolute time passed in tv to negative time - // to deadline of mb with respect to that absolute time. - priority -= mb.msg_deadline_time (); -} - // dynamic priority conversion function based on time to deadline - -void -ACE_Deadline_Message_Strategy::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_Deadline_Message_Strategy::dump"); - - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_Dynamic_Message_Strategy base class:\n"))); - this->ACE_Dynamic_Message_Strategy::dump (); - - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("\nderived class: ACE_Deadline_Message_Strategy\n"))); - - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} - -ACE_Laxity_Message_Strategy::ACE_Laxity_Message_Strategy (unsigned long static_bit_field_mask, - unsigned long static_bit_field_shift, - unsigned long dynamic_priority_max, - unsigned long dynamic_priority_offset) - : ACE_Dynamic_Message_Strategy (static_bit_field_mask, - static_bit_field_shift, - dynamic_priority_max, - dynamic_priority_offset) -{ -} - -ACE_Laxity_Message_Strategy::~ACE_Laxity_Message_Strategy (void) -{ -} - -void -ACE_Laxity_Message_Strategy::convert_priority (ACE_Time_Value & priority, - const ACE_Message_Block & mb) -{ - // Convert absolute time passed in tv to negative - // laxity of mb with respect to that absolute time. - priority += mb.msg_execution_time (); - priority -= mb.msg_deadline_time (); -} - // dynamic priority conversion function based on laxity - -void -ACE_Laxity_Message_Strategy::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_Laxity_Message_Strategy::dump"); - - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_Dynamic_Message_Strategy base class:\n"))); - this->ACE_Dynamic_Message_Strategy::dump (); - - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("\nderived class: ACE_Laxity_Message_Strategy\n"))); - - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} - // Dump the state of the strategy. - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Dynamic_Message_Strategy.h b/modules/worldengine/deps/acelite/ace/Dynamic_Message_Strategy.h deleted file mode 100644 index 94b67d9477..0000000000 --- a/modules/worldengine/deps/acelite/ace/Dynamic_Message_Strategy.h +++ /dev/null @@ -1,213 +0,0 @@ -// -*- C++ -*- - -//========================================================================== -/** - * @file Dynamic_Message_Strategy.h - * - * @author Douglas C. Schmidt - */ -//========================================================================== - -#ifndef ACE_DYNAMIC_MESSAGE_STRATEGY_H -#define ACE_DYNAMIC_MESSAGE_STRATEGY_H - -#include /**/ "ace/pre.h" - -#include /**/ "ace/config-lite.h" -#include /**/ "ace/ACE_export.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Message_Block.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_Dynamic_Message_Strategy - * - * @brief An abstract base class which provides dynamic priority - * evaluation methods for use by the ACE_Dynamic_Message_Queue - * class or any other class which needs to manage the priorities - * of a collection of ACE_Message_Blocks dynamically. - * - * Methods for deadline and laxity based priority evaluation are - * provided. These methods assume a specific partitioning of - * the message priority number into a higher order dynamic bit - * field and a lower order static priority bit field. The - * default partitioning assumes an unsigned dynamic message - * priority field of 22 bits and an unsigned static message - * priority field of 10 bits. This corresponds to the initial - * values of the static class members. To provide a different - * partitioning, assign a different set of values to the static - * class members before using the static member functions. - */ -class ACE_Export ACE_Dynamic_Message_Strategy -{ -public: - - /// Message priority status - /// Values are defined as bit flags so that status combinations may - /// be specified easily. - enum Priority_Status - { - /// Message can still make its deadline - PENDING = 0x01, - /// Message cannot make its deadline - LATE = 0x02, - /// Message is so late its priority is undefined - BEYOND_LATE = 0x04, - /// Mask to match any priority status - ANY_STATUS = 0x07 - }; - - /// Constructor. - ACE_Dynamic_Message_Strategy (unsigned long static_bit_field_mask, - unsigned long static_bit_field_shift, - unsigned long dynamic_priority_max, - unsigned long dynamic_priority_offset); - - /// Virtual destructor. - virtual ~ACE_Dynamic_Message_Strategy (void); - - /// Updates the message's priority and returns its priority status. - Priority_Status priority_status (ACE_Message_Block &mb, - const ACE_Time_Value &tv); - - /// Get static bit field mask. - unsigned long static_bit_field_mask (void) const; - - /// Set static bit field mask. - void static_bit_field_mask (unsigned long); - - /// Get left shift value to make room for static bit field. - unsigned long static_bit_field_shift (void) const; - - /// Set left shift value to make room for static bit field. - void static_bit_field_shift (unsigned long); - - /// Get maximum supported priority value. - unsigned long dynamic_priority_max (void) const; - - /// Set maximum supported priority value. - void dynamic_priority_max (unsigned long); - - /// Get offset to boundary between signed range and unsigned range. - unsigned long dynamic_priority_offset (void) const; - - /// Set offset to boundary between signed range and unsigned range. - void dynamic_priority_offset (unsigned long); - - /// Dump the state of the strategy. - virtual void dump (void) const; - -protected: - /// Hook method for dynamic priority conversion. - virtual void convert_priority (ACE_Time_Value &priority, - const ACE_Message_Block &mb) = 0; - - /// This is a bit mask with all ones in the static bit field. - unsigned long static_bit_field_mask_; - - /** - * This is a left shift value to make room for static bit field: - * this value should be the logarithm base 2 of - * (static_bit_field_mask_ + 1). - */ - unsigned long static_bit_field_shift_; - - /// Maximum supported priority value. - unsigned long dynamic_priority_max_; - - /// Offset to boundary between signed range and unsigned range. - unsigned long dynamic_priority_offset_; - - /// Maximum late time value that can be represented. - ACE_Time_Value max_late_; - - /// Minimum pending time value that can be represented. - ACE_Time_Value min_pending_; - - /// Time value by which to shift pending priority. - ACE_Time_Value pending_shift_; -}; - -/** - * @class ACE_Deadline_Message_Strategy - * - * @brief Deadline based message priority strategy. - * - * Assigns dynamic message priority according to time to deadline. The - * message priority is divided into high and low order bit fields. The - * high order bit field is used for dynamic message priority, which is - * updated whenever the convert_priority() method is called. The - * low order bit field is used for static message priority and is left - * unchanged. The partitioning of the priority value into high and low - * order bit fields is done according to the arguments passed to the - * strategy object's constructor. - */ -class ACE_Export ACE_Deadline_Message_Strategy : public ACE_Dynamic_Message_Strategy -{ -public: - /// Constructor with all arguments defaulted. - ACE_Deadline_Message_Strategy (unsigned long static_bit_field_mask = 0x3FFUL, // 2^(10) - 1 - unsigned long static_bit_field_shift = 10, // 10 low order bits - unsigned long dynamic_priority_max = 0x3FFFFFUL, // 2^(22)-1 - unsigned long dynamic_priority_offset = 0x200000UL); // 2^(22-1) - - /// Virtual destructor. - virtual ~ACE_Deadline_Message_Strategy (void); - - /// Dynamic priority conversion function based on time to deadline. - virtual void convert_priority (ACE_Time_Value &priority, - const ACE_Message_Block &mb); - - /// Dump the state of the strategy. - virtual void dump (void) const; -}; - -/** - * @class ACE_Laxity_Message_Strategy - * - * @brief Laxity based message priority strategy. - * - * Assigns dynamic message priority according to laxity (time to - * deadline minus worst case execution time). The message priority is - * divided into high and low order bit fields. The high order - * bit field is used for dynamic message priority, which is - * updated whenever the convert_priority() method is called. The - * low order bit field is used for static message priority and is left - * unchanged. The partitioning of the priority value into high and low - * order bit fields is done according to the arguments passed to the - * strategy object's constructor. - */ -class ACE_Export ACE_Laxity_Message_Strategy : public ACE_Dynamic_Message_Strategy -{ -public: - /// Ctor, with all arguments defaulted. - ACE_Laxity_Message_Strategy (unsigned long static_bit_field_mask = 0x3FFUL, // 2^(10) - 1 - unsigned long static_bit_field_shift = 10, // 10 low order bits - unsigned long dynamic_priority_max = 0x3FFFFFUL, // 2^(22)-1 - unsigned long dynamic_priority_offset = 0x200000UL); // 2^(22-1) - - /// virtual dtor. - virtual ~ACE_Laxity_Message_Strategy (void); - - /// Dynamic priority conversion function based on laxity. - virtual void convert_priority (ACE_Time_Value &priority, - const ACE_Message_Block &mb); - - /// Dump the state of the strategy. - virtual void dump (void) const; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/Dynamic_Message_Strategy.inl" -#endif /* __ACE_INLINE__ */ - -#include /**/ "ace/post.h" - -#endif /* ACE_DYNAMIC_MESSAGE_STRATEGY_H */ diff --git a/modules/worldengine/deps/acelite/ace/Dynamic_Message_Strategy.inl b/modules/worldengine/deps/acelite/ace/Dynamic_Message_Strategy.inl deleted file mode 100644 index 675e0f1e49..0000000000 --- a/modules/worldengine/deps/acelite/ace/Dynamic_Message_Strategy.inl +++ /dev/null @@ -1,72 +0,0 @@ -// -*- C++ -*- -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_INLINE unsigned long -ACE_Dynamic_Message_Strategy::static_bit_field_mask (void) const -{ - return static_bit_field_mask_; -} - // get static bit field mask - -ACE_INLINE void -ACE_Dynamic_Message_Strategy::static_bit_field_mask (unsigned long ul) -{ - static_bit_field_mask_ = ul; -} - // set static bit field mask - -ACE_INLINE unsigned long -ACE_Dynamic_Message_Strategy::static_bit_field_shift (void) const -{ - return static_bit_field_shift_; -} - // get left shift value to make room for static bit field - -ACE_INLINE void -ACE_Dynamic_Message_Strategy::static_bit_field_shift (unsigned long ul) -{ - static_bit_field_shift_ = ul; -} - // set left shift value to make room for static bit field - -ACE_INLINE unsigned long -ACE_Dynamic_Message_Strategy::dynamic_priority_max (void) const -{ - return dynamic_priority_max_; -} - // get maximum supported priority value - -ACE_INLINE void -ACE_Dynamic_Message_Strategy::dynamic_priority_max (unsigned long ul) -{ - // pending_shift_ depends on dynamic_priority_max_: for performance - // reasons, the value in pending_shift_ is (re)calculated only when - // dynamic_priority_max_ is initialized or changes, and is stored - // as a class member rather than being a derived value. - dynamic_priority_max_ = ul; - pending_shift_ = ACE_Time_Value (0, ul); -} - // set maximum supported priority value - -ACE_INLINE unsigned long -ACE_Dynamic_Message_Strategy::dynamic_priority_offset (void) const -{ - return dynamic_priority_offset_; -} - // get offset for boundary between signed range and unsigned range - -ACE_INLINE void -ACE_Dynamic_Message_Strategy::dynamic_priority_offset (unsigned long ul) -{ - // max_late_ and min_pending_ depend on dynamic_priority_offset_: - // for performance reasons, the values in max_late_ and min_pending_ - // are (re)calculated only when dynamic_priority_offset_ is - // initialized or changes, and are stored as a class member rather - // than being derived each time one of their values is needed. - dynamic_priority_offset_ = ul; - max_late_ = ACE_Time_Value (0, ul - 1); - min_pending_ = ACE_Time_Value (0, ul); -} - // set offset for boundary between signed range and unsigned range - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Dynamic_Service.cpp b/modules/worldengine/deps/acelite/ace/Dynamic_Service.cpp deleted file mode 100644 index 8bf6871d1d..0000000000 --- a/modules/worldengine/deps/acelite/ace/Dynamic_Service.cpp +++ /dev/null @@ -1,61 +0,0 @@ -#ifndef ACE_DYNAMIC_SERVICE_CPP -#define ACE_DYNAMIC_SERVICE_CPP - -#include "ace/Dynamic_Service.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Service_Object.h" - -#if !defined (__ACE_INLINE__) -#include "ace/Dynamic_Service.inl" -#endif /* __ACE_INLINE__ */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - - -template TYPE * -ACE_Dynamic_Service::instance (const ACE_TCHAR *name) -{ - ACE_Service_Object * svc_obj = - static_cast - (ACE_Dynamic_Service_Base::instance (name,false)); - return dynamic_cast (svc_obj); -} - -template TYPE * -ACE_Dynamic_Service::instance (const ACE_TCHAR *name, - bool no_global) -{ - ACE_Service_Object * svc_obj = - static_cast - (ACE_Dynamic_Service_Base::instance (name, no_global)); - return dynamic_cast (svc_obj); -} - -template TYPE * -ACE_Dynamic_Service::instance (const ACE_Service_Gestalt* conf, - const ACE_TCHAR *name) -{ - ACE_Service_Object * svc_obj = - static_cast - (ACE_Dynamic_Service_Base::instance (conf, name, false)); - return dynamic_cast (svc_obj); -} - -template TYPE * -ACE_Dynamic_Service::instance (const ACE_Service_Gestalt* conf, - const ACE_TCHAR *name, - bool no_global) -{ - ACE_Service_Object * svc_obj = - static_cast - (ACE_Dynamic_Service_Base::instance (conf, name, no_global)); - return dynamic_cast (svc_obj); -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_DYNAMIC_SERVICE_CPP */ diff --git a/modules/worldengine/deps/acelite/ace/Dynamic_Service.h b/modules/worldengine/deps/acelite/ace/Dynamic_Service.h deleted file mode 100644 index 95456db349..0000000000 --- a/modules/worldengine/deps/acelite/ace/Dynamic_Service.h +++ /dev/null @@ -1,87 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Dynamic_Service.h - * - * @author Prashant Jain - * @author Douglas C. Schmidt - */ -//============================================================================= - -#ifndef ACE_DYNAMIC_SERVICE_H -#define ACE_DYNAMIC_SERVICE_H - -#include /**/ "ace/pre.h" - -#include /**/ "ace/config-all.h" -#include "ace/Global_Macros.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Dynamic_Service_Base.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -class ACE_Service_Object; - -/** - * @class ACE_Dynamic_Service - * - * @brief Provides a general interface to retrieve arbitrary objects - * from the ACE service repository. - * - * Uses "name" for lookup in the ACE service repository. Obtains - * the object and returns it as the appropriate type. - */ -template -class ACE_Dynamic_Service : public ACE_Dynamic_Service_Base -{ -public: - /// Return instance using @a name to search the Service_Repository. - static TYPE* instance (const ACE_TCHAR *name); - static TYPE* instance (const ACE_TCHAR *name, bool no_global); - - static TYPE* instance (const ACE_Service_Gestalt* repo, - const ACE_TCHAR *name); - static TYPE* instance (const ACE_Service_Gestalt* repo, - const ACE_TCHAR *name, bool no_global); - -#if defined (ACE_USES_WCHAR) - - /// Return instance using @a name to search the Service_Repository. - static TYPE* instance (const ACE_ANTI_TCHAR *name); - - static TYPE* instance (const ACE_ANTI_TCHAR *name, bool no_global); - - static TYPE* instance (const ACE_Service_Gestalt* repo, - const ACE_ANTI_TCHAR *name); - static TYPE* instance (const ACE_Service_Gestalt* repo, - const ACE_ANTI_TCHAR *name, bool no_global); -#endif // ACE_USES_WCHAR - -private: - ACE_UNIMPLEMENTED_FUNC (ACE_Dynamic_Service ()) - ACE_UNIMPLEMENTED_FUNC (ACE_Dynamic_Service (const ACE_Dynamic_Service&)) - ACE_UNIMPLEMENTED_FUNC (ACE_Dynamic_Service& operator= (const ACE_Dynamic_Service&)) -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/Dynamic_Service.inl" -#endif /* __ACE_INLINE__ */ - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -# include "ace/Dynamic_Service.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -# pragma implementation ("Dynamic_Service.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ - -#include /**/ "ace/post.h" - -#endif /* ACE_DYNAMIC_SERVICE_H */ diff --git a/modules/worldengine/deps/acelite/ace/Dynamic_Service.inl b/modules/worldengine/deps/acelite/ace/Dynamic_Service.inl deleted file mode 100644 index 5ae958d8ff..0000000000 --- a/modules/worldengine/deps/acelite/ace/Dynamic_Service.inl +++ /dev/null @@ -1,36 +0,0 @@ -// -*- C++ -*- -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -#if defined (ACE_USES_WCHAR) - -template ACE_INLINE TYPE * -ACE_Dynamic_Service::instance (const ACE_ANTI_TCHAR *name) -{ - return instance (ACE_TEXT_CHAR_TO_TCHAR (name),false); -} - -template ACE_INLINE TYPE * -ACE_Dynamic_Service::instance (const ACE_ANTI_TCHAR *name, - bool no_global) -{ - return instance (ACE_TEXT_CHAR_TO_TCHAR (name),no_global); -} - -template ACE_INLINE TYPE * -ACE_Dynamic_Service::instance (const ACE_Service_Gestalt* repo, - const ACE_ANTI_TCHAR *name) -{ - return instance (repo, ACE_TEXT_CHAR_TO_TCHAR (name),false); -} - -template ACE_INLINE TYPE * -ACE_Dynamic_Service::instance (const ACE_Service_Gestalt* repo, - const ACE_ANTI_TCHAR *name, - bool no_global) -{ - return instance (repo, ACE_TEXT_CHAR_TO_TCHAR (name),no_global); -} - -#endif // ACE_USES_WCHAR - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Dynamic_Service_Base.cpp b/modules/worldengine/deps/acelite/ace/Dynamic_Service_Base.cpp deleted file mode 100644 index d38f1a5cd9..0000000000 --- a/modules/worldengine/deps/acelite/ace/Dynamic_Service_Base.cpp +++ /dev/null @@ -1,102 +0,0 @@ -#include "ace/Dynamic_Service_Base.h" -#include "ace/ACE.h" -#include "ace/Service_Config.h" -#include "ace/Service_Repository.h" -#include "ace/Service_Types.h" -#include "ace/Log_Category.h" - - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - - -void -ACE_Dynamic_Service_Base::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_Dynamic_Service_Base::dump"); - - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("\n"))); - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} - -// Get the instance using for the current global -// service configuration repository. - -void * -ACE_Dynamic_Service_Base::instance (const ACE_TCHAR *name, bool no_global) -{ - ACE_TRACE ("ACE_Dynamic_Service_Base::instance"); - return instance (ACE_Service_Config::current (), name, no_global); -} - -// Find a service registration - -const ACE_Service_Type * -ACE_Dynamic_Service_Base::find_i (const ACE_Service_Gestalt* &repo, - const ACE_TCHAR *name, - bool no_global) -{ - ACE_TRACE ("ACE_Dynamic_Service_Base::find_i"); - const ACE_Service_Type *svc_rec = 0; - - ACE_Service_Gestalt* global = ACE_Service_Config::global (); - - for ( ; (repo->find (name, &svc_rec) == -1) && !no_global; repo = global) - { - // Check the static repo, too if different - if (repo == global) - break; - } - - return svc_rec; -} - - -// Get the instance using for specific configuration repository. -void * -ACE_Dynamic_Service_Base::instance (const ACE_Service_Gestalt* repo, - const ACE_TCHAR *name, - bool no_global) -{ - ACE_TRACE ("ACE_Dynamic_Service_Base::instance"); - - void *obj = 0; - const ACE_Service_Type_Impl *type = 0; - - const ACE_Service_Gestalt* repo_found = repo; - const ACE_Service_Type *svc_rec = find_i (repo_found, name, no_global); - if (svc_rec != 0) - { - type = svc_rec->type (); - if (type != 0) - obj = type->object (); - } - - if (ACE::debug ()) - { - ACE_GUARD_RETURN (ACE_Log_Msg, log_guard, *ACE_Log_Msg::instance (), 0); - - if (repo->repo_ != repo_found->repo_) - { - ACELIB_DEBUG ((LM_DEBUG, - ACE_TEXT ("ACE (%P|%t) DSB::instance, repo=%@, name=%s") - ACE_TEXT (" type=%@ => %@") - ACE_TEXT (" [in repo=%@]\n"), - repo->repo_, name, type, obj, - repo_found->repo_)); - } - else - { - ACELIB_DEBUG ((LM_DEBUG, - ACE_TEXT ("ACE (%P|%t) DSB::instance, repo=%@, name=%s") - ACE_TEXT (" type=%@ => %@\n"), - repo->repo_, name, type, obj)); - } - } - - return obj; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Dynamic_Service_Base.h b/modules/worldengine/deps/acelite/ace/Dynamic_Service_Base.h deleted file mode 100644 index fe34b50af1..0000000000 --- a/modules/worldengine/deps/acelite/ace/Dynamic_Service_Base.h +++ /dev/null @@ -1,71 +0,0 @@ -/* -*- C++ -*- */ - -//============================================================================= -/** - * @file Dynamic_Service_Base.h - * - * @author Prashant Jain - * @author Douglas C. Schmidt - */ -//============================================================================= - -#ifndef ACE_DYNAMIC_SERVICE_BASE_H -#define ACE_DYNAMIC_SERVICE_BASE_H - -#include /**/ "ace/pre.h" - -#include /**/ "ace/ACE_export.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -class ACE_Service_Gestalt; -class ACE_Service_Type; - -/** - * @class ACE_Dynamic_Service_Base - * - * @brief Base class for all ACE_Dynamic_Service instantiations. - * - * Factors out common code shared by all ACE_Dynamic_Service - * instantiations, this avoid code bloat. - */ -class ACE_Export ACE_Dynamic_Service_Base -{ -public: - /// Dump the current static of the object - void dump (void) const; - -protected: - /// Perform the default repo search, but optionally skip searching the global - /// repo. - static void* instance (const ACE_TCHAR *name, bool no_global = false); - - static void* instance (const ACE_Service_Gestalt* repo, - const ACE_TCHAR *name, - bool no_global = false); - - /// No need to create, or assign instances of this class - ACE_Dynamic_Service_Base (void); - ~ACE_Dynamic_Service_Base (void); - const ACE_Dynamic_Service_Base& operator= (const ACE_Dynamic_Service_Base&); - -private: - /// Implement the service search policy, i.e. "look for the service first - /// locally and then globally" - static const ACE_Service_Type *find_i (const ACE_Service_Gestalt* &repo, - const ACE_TCHAR *name, - bool no_global); - - /// The dependency declaration class needs access to the service search - /// policy, implemented by find_i() - friend class ACE_Dynamic_Service_Dependency; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#include /**/ "ace/post.h" -#endif /* ACE_DYNAMIC_SERVICE_BASE_H */ diff --git a/modules/worldengine/deps/acelite/ace/Dynamic_Service_Dependency.cpp b/modules/worldengine/deps/acelite/ace/Dynamic_Service_Dependency.cpp deleted file mode 100644 index 0a7e9e03d7..0000000000 --- a/modules/worldengine/deps/acelite/ace/Dynamic_Service_Dependency.cpp +++ /dev/null @@ -1,45 +0,0 @@ -#include "ace/ACE.h" -#include "ace/DLL_Manager.h" -#include "ace/Dynamic_Service_Dependency.h" -#include "ace/Service_Config.h" -#include "ace/Log_Category.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_Dynamic_Service_Dependency::ACE_Dynamic_Service_Dependency (const ACE_TCHAR *principal) -{ - this->init (ACE_Service_Config::current (), principal); -} - -ACE_Dynamic_Service_Dependency::ACE_Dynamic_Service_Dependency (const ACE_Service_Gestalt *cfg, - const ACE_TCHAR *principal) -{ - this->init (cfg, principal); -} - - -ACE_Dynamic_Service_Dependency::~ACE_Dynamic_Service_Dependency (void) -{ - if (ACE::debug ()) - ACELIB_DEBUG ((LM_DEBUG, - ACE_TEXT ("(%P|%t) DSD, this=%@ - destroying\n"), - this)); -} - -void -ACE_Dynamic_Service_Dependency::init (const ACE_Service_Gestalt *cfg, - const ACE_TCHAR *principal) -{ - const ACE_Service_Type* st = - ACE_Dynamic_Service_Base::find_i (cfg, principal,false); - if (ACE::debug ()) - { - ACELIB_DEBUG ((LM_DEBUG, - ACE_TEXT ("(%P|%t) DSD, this=%@ - creating dependency on "), this)); - st->dump (); - } - this->tracker_ = st->dll (); -} - - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Dynamic_Service_Dependency.h b/modules/worldengine/deps/acelite/ace/Dynamic_Service_Dependency.h deleted file mode 100644 index bb5294f408..0000000000 --- a/modules/worldengine/deps/acelite/ace/Dynamic_Service_Dependency.h +++ /dev/null @@ -1,68 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Dynamic_Service_Dependency.h - * - * @author Iliyan Jeliazkov - */ -//============================================================================= - -#ifndef ACE_DYNAMIC_SERVICE_DEPENDENCY_H -#define ACE_DYNAMIC_SERVICE_DEPENDENCY_H - -#include /**/ "ace/pre.h" - - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Dynamic_Service_Base.h" -#include "ace/Service_Object.h" -#include "ace/DLL.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_Dynamic_Service_Dependency - * - * @brief Provides a way to declare dependency on specific service, - * thus helping to avoid order of initialization issues with instances - * of an objects whose implementation code resides in dynamically loaded - * services. - * - * It is disastrous to have dynamically loadable services create and give away - * ownership of objects and then ending up being unloaded before all those - * instances have been deleted. Normally the code for such objects classes - * resides within the TEXT segment of the DLL, which implements the service. - * If a service gets removed, its DLL may be unmapped from memory and then - * any attempt to invoke a method on the said objects will cause SEGV. - * - * Such instances must contain a member of ACE_Dynamic_Service_Dependency - * initialized with the service they depend on. - * ACE_Dynamic_Service_Dependency's constructor and destructor are - * "magical" - they work by maintaining the underlying dynamic service's - * DLL reference count. - */ -class ACE_Export ACE_Dynamic_Service_Dependency -{ -public: - ACE_Dynamic_Service_Dependency (const ACE_Service_Gestalt *cfg, - const ACE_TCHAR *principal); - ACE_Dynamic_Service_Dependency (const ACE_TCHAR *principal); - ~ACE_Dynamic_Service_Dependency (void); - -private: - void init (const ACE_Service_Gestalt *cfg, const ACE_TCHAR *principal); - -private: - ACE_DLL tracker_; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - - -#include /**/ "ace/post.h" - -#endif /* ACE_DYNAMIC_SERVICE_DEPENDENCY_H */ diff --git a/modules/worldengine/deps/acelite/ace/ETCL/ACE_ETCL.pc.in b/modules/worldengine/deps/acelite/ace/ETCL/ACE_ETCL.pc.in deleted file mode 100644 index 89e0907076..0000000000 --- a/modules/worldengine/deps/acelite/ace/ETCL/ACE_ETCL.pc.in +++ /dev/null @@ -1,11 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ - -Name: ACE_ETCL -Description: ACE Extended Trading Constraint Language Library -Requires: ACE -Version: @VERSION@ -Libs: -L${libdir} -lACE_ETCL -Cflags: -I${includedir} diff --git a/modules/worldengine/deps/acelite/ace/ETCL/ACE_ETCL_Parser.pc.in b/modules/worldengine/deps/acelite/ace/ETCL/ACE_ETCL_Parser.pc.in deleted file mode 100644 index 80ece055d2..0000000000 --- a/modules/worldengine/deps/acelite/ace/ETCL/ACE_ETCL_Parser.pc.in +++ /dev/null @@ -1,11 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ - -Name: ACE_ETCL_Parser -Description: ACE Extended Trading Constraint Language Parser Library -Requires: ACE_ETCL -Version: @VERSION@ -Libs: -L${libdir} -lACE_ETCL_Parser -Cflags: -I${includedir} diff --git a/modules/worldengine/deps/acelite/ace/ETCL/ETCL.ll b/modules/worldengine/deps/acelite/ace/ETCL/ETCL.ll deleted file mode 100644 index 7cbc0c4782..0000000000 --- a/modules/worldengine/deps/acelite/ace/ETCL/ETCL.ll +++ /dev/null @@ -1,159 +0,0 @@ -%option noyywrap - -%{ -// ETCL.ll,v 1.5 2005/11/16 07:53:24 ossama Exp -// ======================================================================== -// -// = LIBRARY -// orbsvcs/ECTL -// -// = FILENAME -// ETCL.ll -// -// = AUTHOR -// Carlos O'Ryan based on previous work by -// Seth Widoff -// -// ======================================================================== - -#include "ace/ETCL/ETCL_Interpreter.h" -#include "ace/ETCL/ETCL_y.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -static const char * extract_string(char*); - -#define YY_LEX_DEBUG - -#ifdef CONSTRAINT_DEBUG -#define YY_LEX_DEBUG OS::fprintf(stderr, "%s\n", yytext) -#endif /* CONSTRAINT_DEBUG */ - -#define YY_DECL int ETCL_yylex (ETCL_YYSTYPE *lvalp, void* state) - -#define YY_BREAK -#define YY_NO_UNPUT - -%} - -white_space [ \t] -letter [a-zA-Z] -digit [0-9] -alpha_num ({letter}|{digit}) -integer {digit}+ -float ({digit}*\.{digit}+)([eE][-+]?{digit}+)? -string '(([^'\\]*)|([^'\\]*\\')|([^'\\]*\\\\))*' -base {letter}({alpha_num}|[_])* -ident {base}|\\{base} -newline \n - -%% - -min { YY_LEX_DEBUG; return ETCL_MIN; } -max { YY_LEX_DEBUG; return ETCL_MAX; } -first { YY_LEX_DEBUG; return ETCL_FIRST; } -random { YY_LEX_DEBUG; return ETCL_RANDOM; } -with { YY_LEX_DEBUG; return ETCL_WITH; } -exist { YY_LEX_DEBUG; return ETCL_EXIST; } -not { YY_LEX_DEBUG; return ETCL_NOT; } -and { YY_LEX_DEBUG; return ETCL_AND; } -or { YY_LEX_DEBUG; return ETCL_OR; } -in { YY_LEX_DEBUG; return ETCL_IN; } -"~" { YY_LEX_DEBUG; return ETCL_TWIDDLE; } -"+" { YY_LEX_DEBUG; return ETCL_PLUS; } -"-" { YY_LEX_DEBUG; return ETCL_MINUS; } -"*" { YY_LEX_DEBUG; return ETCL_MULT; } -"/" { YY_LEX_DEBUG; return ETCL_DIV; } -"<" { YY_LEX_DEBUG; return ETCL_LT; } -"<=" { YY_LEX_DEBUG; return ETCL_LE; } -">" { YY_LEX_DEBUG; return ETCL_GT; } -">=" { YY_LEX_DEBUG; return ETCL_GE; } -"==" { YY_LEX_DEBUG; return ETCL_EQ; } -"!=" { YY_LEX_DEBUG; return ETCL_NE; } -"(" { YY_LEX_DEBUG; return ETCL_LPAREN; } -")" { YY_LEX_DEBUG; return ETCL_RPAREN; } -"$" { YY_LEX_DEBUG; return ETCL_DOLLAR; } -"." { YY_LEX_DEBUG; return ETCL_DOT; } -"default" { YY_LEX_DEBUG; return ETCL_DEFAULT; } -"_d" { YY_LEX_DEBUG; return ETCL_DISCRIMINANT; } -"_type_id" { YY_LEX_DEBUG; return ETCL_TYPE_ID; } -"_repos_id" { YY_LEX_DEBUG; return ETCL_REPOS_ID; } -"_length" { YY_LEX_DEBUG; return ETCL_LENGTH; } -"[" { YY_LEX_DEBUG; return ETCL_LBRA; } -"]" { YY_LEX_DEBUG; return ETCL_RBRA; } -TRUE { - lvalp->constraint = - new ETCL_Literal_Constraint ((CORBA::Boolean) 1); - YY_LEX_DEBUG; return ETCL_BOOLEAN; - } -FALSE { - lvalp->constraint = - new ETCL_Literal_Constraint ((CORBA::Boolean) 0); - YY_LEX_DEBUG; return ETCL_BOOLEAN; - } -{integer} { - lvalp->constraint = - new ETCL_Literal_Constraint (ACE_OS::atoi (yytext)); - YY_LEX_DEBUG; return ETCL_INTEGER; - } -{float} { - double v; - sscanf (yytext, "%lf", &v); - lvalp->constraint = - new ETCL_Literal_Constraint (v); - YY_LEX_DEBUG; return ETCL_FLOAT; - } -{string} { - lvalp->constraint = - new ETCL_Literal_Constraint (extract_string (yytext)); - YY_LEX_DEBUG; return ETCL_STRING; - } -{ident} { - lvalp->constraint = - new ETCL_Identifier (yytext); - YY_LEX_DEBUG; return ETCL_IDENT; - } -{white_space} { - YY_LEX_DEBUG; break; // Ignore - } -. { - YY_LEX_DEBUG; break; // @@ TODO - } -%% - -const char* -extract_string(char* str) -{ - char *t = str; - for (char * i = str + 1; *i != '\''; ++i, ++t) - { - if (*i == '\\') - { - ++i; - if (*i == 0) - return 0; - else if (*i == 't') - *t = '\t'; - else if (*i == 'n') - *t = '\n'; - else if (*i == '\\') - *t = '\\'; - else - *t = *i; - continue; - } - - *t = *i; - } - - *t = '\0'; - return str; -} - -int -yywrap (void) -{ - return 1; -} - -ACE_END_VERSIONED_NAMESPACE_DECL \ No newline at end of file diff --git a/modules/worldengine/deps/acelite/ace/ETCL/ETCL.mpc b/modules/worldengine/deps/acelite/ace/ETCL/ETCL.mpc deleted file mode 100644 index 20d387cbd7..0000000000 --- a/modules/worldengine/deps/acelite/ace/ETCL/ETCL.mpc +++ /dev/null @@ -1,62 +0,0 @@ -// -*- MPC -*- -project(ACE_ETCL) : acelib, install, ace_output { - sharedname = ACE_ETCL - dynamicflags += ACE_ETCL_BUILD_DLL - - Source_Files { - ETCL_Constraint.cpp - ETCL_Constraint_Visitor.cpp - } - - Header_Files { - ETCL_Constraint.h - ETCL_Constraint_Visitor.h - ace_etcl_export.h - } - - Inline_Files { - ETCL_Constraint.inl - } - - Template_Files { - } - - Pkgconfig_Files { - ACE_ETCL.pc.in - } - - specific { - install_dir = ace/ETCL - } -} - -project(ACE_ETCL_Parser) : acelib, ace_etcl, install, ace_output { - sharedname = ACE_ETCL_Parser - dynamicflags += ETCL_PARSER_BUILD_DLL - - Source_Files { - ETCL_Interpreter.cpp - ETCL_l.cpp - ETCL_y.cpp - } - - Header_Files { - ETCL_Interpreter.h - ETCL_y.h - etcl_parser_export.h - } - - Inline_Files { - } - - Template_Files { - } - - Pkgconfig_Files { - ACE_ETCL_Parser.pc.in - } - - specific { - install_dir = ace/ETCL - } -} diff --git a/modules/worldengine/deps/acelite/ace/ETCL/ETCL.yy b/modules/worldengine/deps/acelite/ace/ETCL/ETCL.yy deleted file mode 100644 index 507b8b9740..0000000000 --- a/modules/worldengine/deps/acelite/ace/ETCL/ETCL.yy +++ /dev/null @@ -1,269 +0,0 @@ -%{ -// $Id$ -// ======================================================================== -// -// = LIBRARY -// orbsvcs / Extended Trader Constraint Language parser. -// -// = FILENAME -// ETCL.yy -// -// = AUTHOR -// Carlos O'Ryan based on previous work by -// Seth Widoff -// Jeff Parsons -// -// ======================================================================== - -#include "ace/ETCL/ETCL_y.h" -#include "ace/ETCL/ETCL_constraint.h" -#include "ace/ETCL/ETCL_Interpreter.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -extern int yylex (void); -extern void yyflush_current_buffer (void); - -static void yyerror (const char *) -{ - // @@ TODO - // Ignore error messages -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#include - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -%} - -%token ETCL_GT -%token ETCL_GE -%token ETCL_LT -%token ETCL_LE -%token ETCL_EQ -%token ETCL_NE -%token ETCL_EXIST -%token ETCL_DEFAULT -%token ETCL_AND -%token ETCL_OR -%token ETCL_NOT -%token ETCL_IN -%token ETCL_TWIDDLE -%token ETCL_BOOLEAN -%token ETCL_PLUS -%token ETCL_MINUS -%token ETCL_MULT -%token ETCL_DIV -%token ETCL_UMINUS -%token ETCL_INTEGER -%token ETCL_FLOAT -%token ETCL_STRING -%token ETCL_RPAREN -%token ETCL_LPAREN -%token ETCL_RBRA -%token ETCL_LBRA -%token ETCL_IDENT -%token ETCL_UNSIGNED -%token ETCL_SIGNED -%token ETCL_DOUBLE -%token ETCL_CONSTRAINT -%token ETCL_COMPONENT -%token ETCL_WITH -%token ETCL_MAX -%token ETCL_MIN -%token ETCL_FIRST -%token ETCL_RANDOM -%token ETCL_DOLLAR -%token ETCL_DOT -%token ETCL_DISCRIMINANT -%token ETCL_LENGTH -%token ETCL_TYPE_ID -%token ETCL_REPOS_ID - - -%type ETCL_IDENT -%type ETCL_BOOLEAN -%type ETCL_STRING -%type ETCL_FLOAT -%type ETCL_INTEGER -%type expr_in -%type constraint preference bool_or bool_and bool_compare -%type expr_in expr_twiddle expr term factor_not factor -%type union_pos union_val component_array -%type component_array component_assoc component_pos -%type component_dot component_ext component - -%start constraint - -%% - -constraint: bool_or - | preference - ; - -preference: ETCL_MIN bool_or - { $$ = new ETCL_PREFERENCE_CLASS (ETCL_MIN, $2); } - | ETCL_MAX bool_or - { $$ = new ETCL_PREFERENCE_CLASS (ETCL_MAX, $2); } - | ETCL_WITH bool_or - { $$ = new ETCL_PREFERENCE_CLASS (ETCL_WITH, $2); } - | ETCL_FIRST - { $$ = new ETCL_PREFERENCE_CLASS (ETCL_FIRST); } - | ETCL_RANDOM - { $$ = new ETCL_PREFERENCE_CLASS (ETCL_RANDOM); } - ; - -bool_or: bool_or ETCL_OR bool_and - { $$ = new ETCL_BINARY_EXPR_CLASS (ETCL_OR, $1, $3); } - | bool_and - ; - -bool_and: bool_and ETCL_AND bool_compare - { $$ = new ETCL_BINARY_EXPR_CLASS (ETCL_AND, $1, $3); } - | bool_compare - ; - -bool_compare: expr_in ETCL_EQ expr_in - { $$ = new ETCL_BINARY_EXPR_CLASS (ETCL_EQ, $1, $3); } - | expr_in ETCL_NE expr_in - { $$ = new ETCL_BINARY_EXPR_CLASS (ETCL_NE, $1, $3); } - | expr_in ETCL_GT expr_in - { $$ = new ETCL_BINARY_EXPR_CLASS (ETCL_GT, $1, $3); } - | expr_in ETCL_GE expr_in - { $$ = new ETCL_BINARY_EXPR_CLASS (ETCL_GE, $1, $3); } - | expr_in ETCL_LT expr_in - { $$ = new ETCL_BINARY_EXPR_CLASS (ETCL_LT, $1, $3); } - | expr_in ETCL_LE expr_in - { $$ = new ETCL_BINARY_EXPR_CLASS (ETCL_LE, $1, $3); } - | expr_in - ; - -expr_in: expr_twiddle ETCL_IN component - { $$ = new ETCL_BINARY_EXPR_CLASS (ETCL_IN, $1, $3); } - | expr_twiddle ETCL_IN ETCL_DOLLAR component - { $$ = new ETCL_BINARY_EXPR_CLASS (ETCL_IN, $1, $4); } - | expr_twiddle - ; - -expr_twiddle: expr ETCL_TWIDDLE expr - { $$ = new ETCL_BINARY_EXPR_CLASS (ETCL_TWIDDLE, $1, $3); } - | expr - ; - -expr: expr ETCL_PLUS term - { $$ = new ETCL_BINARY_EXPR_CLASS (ETCL_PLUS, $1, $3); } - | expr ETCL_MINUS term - { $$ = new ETCL_BINARY_EXPR_CLASS (ETCL_MINUS, $1, $3); } - | term - ; - -term: term ETCL_MULT factor_not - { $$ = new ETCL_BINARY_EXPR_CLASS (ETCL_MULT, $1, $3); } - | term ETCL_DIV factor_not - { $$ = new ETCL_BINARY_EXPR_CLASS (ETCL_DIV, $1, $3); } - | factor_not - ; - -factor_not: ETCL_NOT factor - { $$ = new ETCL_UNARY_EXPR_CLASS (ETCL_NOT, $2); } - | factor - ; - -factor: ETCL_LPAREN bool_or ETCL_RPAREN - { $$ = $2; } - | ETCL_INTEGER - { $$ = $1; } - | ETCL_PLUS ETCL_INTEGER - { $$ = new ETCL_UNARY_EXPR_CLASS (ETCL_PLUS, $2); } - | ETCL_MINUS ETCL_INTEGER - { $$ = new ETCL_UNARY_EXPR_CLASS (ETCL_MINUS, $2); } - | ETCL_FLOAT - { $$ = $1; } - | ETCL_PLUS ETCL_FLOAT - { $$ = new ETCL_UNARY_EXPR_CLASS (ETCL_PLUS, $2); } - | ETCL_MINUS ETCL_FLOAT - { $$ = new ETCL_UNARY_EXPR_CLASS (ETCL_MINUS, $2); } - | ETCL_STRING - { $$ = $1; } - | ETCL_BOOLEAN - { $$ = $1; } - | ETCL_EXIST ETCL_IDENT - { $$ = new ETCL_EXIST_CLASS ($2); } - | ETCL_EXIST ETCL_DOLLAR component - { $$ = new ETCL_EXIST_CLASS ($3); } - | ETCL_DEFAULT ETCL_DOLLAR component - { $$ = new ETCL_DEFAULT_CLASS ($3); } - | ETCL_DOLLAR component - { $$ = new ETCL_EVAL_CLASS ($2); } - | ETCL_IDENT - { $$ = $1; } - ; - -component: /* empty */ - { $$ = 0; } - | ETCL_DOT component_dot - { $$ = new ETCL_DOT_CLASS ($2); } - - | ETCL_IDENT component_ext - { $$ = new ETCL_COMPONENT_CLASS ($1, $2); } - - | component_array - | component_assoc - ; - -component_ext: /* empty */ - { $$ = 0; } - | ETCL_DOT component_dot - { $$ = new ETCL_Dot ($2); } - - | component_array - | component_assoc - ; - -component_dot: ETCL_IDENT component_ext - { $$ = new ETCL_COMPONENT_CLASS ($1, $2); } - | ETCL_LENGTH - { $$ = new ETCL_SPECIAL_CLASS (ETCL_LENGTH); } - | ETCL_DISCRIMINANT - { $$ = new ETCL_SPECIAL_CLASS (ETCL_DISCRIMINANT); } - | ETCL_TYPE_ID - { $$ = new ETCL_SPECIAL_CLASS (ETCL_TYPE_ID); } - | ETCL_REPOS_ID - { $$ = new ETCL_SPECIAL_CLASS (ETCL_REPOS_ID); } - | component_pos - | union_pos - ; - -component_array: ETCL_LBRA ETCL_INTEGER ETCL_RBRA component_ext - { $$ = new ETCL_COMPONENT_ARRAY_CLASS ($2, $4); } - ; - -component_assoc: ETCL_LPAREN ETCL_IDENT ETCL_RPAREN component_ext - { $$ = new ETCL_COMPONENT_ASSOC_CLASS ($2, $4); } - ; - -component_pos: ETCL_INTEGER component_ext - { $$ = new ETCL_COMPONENT_POS_CLASS ($1, $2); } - ; - -union_pos: ETCL_LPAREN union_val ETCL_RPAREN component_ext - { $$ = new ETCL_UNION_POS_CLASS ($2, $4); } - ; - -union_val: /* empty */ - { $$ = 0; } - | ETCL_INTEGER - { $$ = new ETCL_UNION_VALUE_CLASS (+1, $1); } - | ETCL_PLUS ETCL_INTEGER - { $$ = new ETCL_UNION_VALUE_CLASS (+1, $2); } - | ETCL_MINUS ETCL_INTEGER - { $$ = new ETCL_UNION_VALUE_CLASS (-1, $2); } - | ETCL_STRING - { $$ = new ETCL_UNION_VALUE_CLASS ($1); } - ; - -%% - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/ETCL/ETCL_Constraint.cpp b/modules/worldengine/deps/acelite/ace/ETCL/ETCL_Constraint.cpp deleted file mode 100644 index 9d38af32bb..0000000000 --- a/modules/worldengine/deps/acelite/ace/ETCL/ETCL_Constraint.cpp +++ /dev/null @@ -1,653 +0,0 @@ -// -*- C++ -*- -#include "ace/ACE.h" - -#include "ace/ETCL/ETCL_Constraint.h" -#include "ace/ETCL/ETCL_Constraint_Visitor.h" - -#if ! defined (__ACE_INLINE__) -#include "ace/ETCL/ETCL_Constraint.inl" -#endif /* __ACE_INLINE__ */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ETCL_Constraint::ETCL_Constraint (void) -{ -} - -ETCL_Constraint::~ETCL_Constraint (void) -{ -} - -int -ETCL_Constraint::accept (ETCL_Constraint_Visitor * /* visitor */) -{ - return 0; -} - -// **************************************************************** - -ETCL_Literal_Constraint::ETCL_Literal_Constraint ( - const ETCL_Literal_Constraint & lit - ) - : ETCL_Constraint(), - type_ (ACE_ETCL_UNKNOWN) -{ - this->copy (lit); -} - -ETCL_Literal_Constraint::ETCL_Literal_Constraint ( - ACE_CDR::ULong uinteger) : type_ (ACE_ETCL_UNSIGNED) -{ - this->op_.uinteger_ = uinteger; -} - -ETCL_Literal_Constraint::ETCL_Literal_Constraint ( - ACE_CDR::Long integer) : type_ (ACE_ETCL_SIGNED) -{ - this->op_.integer_ = integer; -} - -ETCL_Literal_Constraint::ETCL_Literal_Constraint ( - ACE_CDR::Boolean boolean - ) - : type_ (ACE_ETCL_BOOLEAN) -{ - this->op_.bool_ = boolean; -} - -ETCL_Literal_Constraint::ETCL_Literal_Constraint ( - ACE_CDR::Double doub) : type_ (ACE_ETCL_DOUBLE) -{ - this->op_.double_ = doub; -} - -ETCL_Literal_Constraint::ETCL_Literal_Constraint ( - const char* str) : type_ (ACE_ETCL_STRING) -{ - this->op_.str_ = ACE::strnew (str); -} - -ETCL_Literal_Constraint::~ETCL_Literal_Constraint (void) -{ - if (this->type_ == ACE_ETCL_STRING) - { - ACE::strdelete (this->op_.str_); - } -} - -int -ETCL_Literal_Constraint::accept (ETCL_Constraint_Visitor* visitor) -{ - return visitor->visit_literal (this); -} - -Literal_Type -ETCL_Literal_Constraint::expr_type (void) const -{ - return this->type_; -} - -void -ETCL_Literal_Constraint::operator= (const ETCL_Literal_Constraint& co) -{ - this->copy (co); -} - -ETCL_Literal_Constraint::operator ACE_CDR::Boolean (void) const -{ - return (this->type_ == ACE_ETCL_BOOLEAN) ? this->op_.bool_ : false; -} - -ETCL_Literal_Constraint::operator ACE_CDR::ULong (void) const -{ - switch (this->type_) - { - case ACE_ETCL_UNSIGNED: - return this->op_.uinteger_; - case ACE_ETCL_SIGNED: - case ACE_ETCL_INTEGER: - return - (this->op_.integer_ > 0) ? (ACE_CDR::ULong) this->op_.integer_ : 0; - case ACE_ETCL_DOUBLE: - return - (this->op_.double_ > 0) ? - ((this->op_.double_ > ACE_UINT32_MAX) ? - ACE_UINT32_MAX : - (ACE_CDR::ULong) this->op_.double_) - : 0; - default: - return 0; - } -} - -ETCL_Literal_Constraint::operator ACE_CDR::Long (void) const -{ - switch (this->type_) - { - case ACE_ETCL_SIGNED: - case ACE_ETCL_INTEGER: - return this->op_.integer_; - case ACE_ETCL_UNSIGNED: - return - (this->op_.uinteger_ > (ACE_CDR::ULong) ACE_INT32_MAX) ? - ACE_INT32_MAX : (ACE_CDR::Long) this->op_.uinteger_; - case ACE_ETCL_DOUBLE: - return - (this->op_.double_ > 0) ? - ((this->op_.double_ > ACE_INT32_MAX) ? - ACE_INT32_MAX : - (ACE_CDR::Long) this->op_.double_) : - ((this->op_.double_ < ACE_INT32_MIN) ? - ACE_INT32_MIN : - (ACE_CDR::Long) this->op_.double_); - default: - return 0; - } -} - -ETCL_Literal_Constraint::operator ACE_CDR::Double (void) const -{ - switch (this->type_) - { - case ACE_ETCL_DOUBLE: - return this->op_.double_; - case ACE_ETCL_SIGNED: - case ACE_ETCL_INTEGER: - return (ACE_CDR::Double) this->op_.integer_; - case ACE_ETCL_UNSIGNED: - return (ACE_CDR::Double) this->op_.uinteger_; - default: - return 0.0; - } -} - -ETCL_Literal_Constraint::operator const char* (void) const -{ - switch (this->type_) - { - case ACE_ETCL_STRING: - return this->op_.str_; - default: - return 0; - } -} - -bool -ETCL_Literal_Constraint::operator== (const ETCL_Literal_Constraint & rhs) -{ - bool return_value = false; - Literal_Type widest_type = this->widest_type (rhs); - - switch (widest_type) - { - case ACE_ETCL_STRING: - return_value = (ACE_OS::strcmp ((const char*) *this, (const char*) rhs) == 0); - break; - case ACE_ETCL_DOUBLE: - return_value = ACE::is_equal ((ACE_CDR::Double) *this, (ACE_CDR::Double) rhs); - break; - case ACE_ETCL_INTEGER: - case ACE_ETCL_SIGNED: - return_value = (ACE_CDR::Long) *this == (ACE_CDR::Long) rhs; - break; - case ACE_ETCL_UNSIGNED: - return_value = (ACE_CDR::ULong) *this == (ACE_CDR::ULong) rhs; - break; - case ACE_ETCL_BOOLEAN: - return_value = (ACE_CDR::Boolean) *this == (ACE_CDR::Boolean) rhs; - break; - default: - break; - } - - return return_value; -} - -bool -ETCL_Literal_Constraint::operator< (const ETCL_Literal_Constraint & rhs) -{ - bool return_value = false; - Literal_Type widest_type = this->widest_type (rhs); - - switch (widest_type) - { - case ACE_ETCL_STRING: - return_value = (ACE_OS::strcmp ((const char*) *this, (const char*) rhs) < 0); - break; - case ACE_ETCL_DOUBLE: - return_value = (ACE_CDR::Double) *this < (ACE_CDR::Double) rhs; - break; - case ACE_ETCL_INTEGER: - case ACE_ETCL_SIGNED: - return_value = (ACE_CDR::Long) *this < (ACE_CDR::Long) rhs; - break; - case ACE_ETCL_UNSIGNED: - return_value = (ACE_CDR::ULong) *this < (ACE_CDR::ULong) rhs; - break; - case ACE_ETCL_BOOLEAN: - return_value = (ACE_CDR::Boolean) *this < (ACE_CDR::Boolean) rhs; - break; - default: - break; - } - - return return_value; -} - -bool -ETCL_Literal_Constraint::operator> (const ETCL_Literal_Constraint & rhs) -{ - bool return_value = false; - Literal_Type widest_type = this->widest_type (rhs); - - switch (widest_type) - { - case ACE_ETCL_STRING: - return_value = (ACE_OS::strcmp ((const char*) *this, (const char*) rhs) > 0); - break; - case ACE_ETCL_DOUBLE: - return_value = (ACE_CDR::Double) *this > (ACE_CDR::Double) rhs; - break; - case ACE_ETCL_INTEGER: - case ACE_ETCL_SIGNED: - return_value = (ACE_CDR::Long) *this > (ACE_CDR::Long) rhs; - break; - case ACE_ETCL_UNSIGNED: - return_value = (ACE_CDR::ULong) *this > (ACE_CDR::ULong) rhs; - break; - default: - break; - } - - return return_value; -} - -ETCL_Literal_Constraint -ETCL_Literal_Constraint::operator+ (const ETCL_Literal_Constraint & rhs) -{ - Literal_Type widest_type = this->widest_type (rhs); - - switch (widest_type) - { - case ACE_ETCL_DOUBLE: - { - ACE_CDR::Double result = (ACE_CDR::Double) *this + (ACE_CDR::Double) rhs; - return ETCL_Literal_Constraint ((ACE_CDR::Double) result); - } - case ACE_ETCL_INTEGER: - case ACE_ETCL_SIGNED: - { - ACE_CDR::Long result = (ACE_CDR::Long) *this + (ACE_CDR::Long) rhs; - return ETCL_Literal_Constraint ((ACE_CDR::Long) result); - } - case ACE_ETCL_UNSIGNED: - { - ACE_CDR::ULong result = (ACE_CDR::ULong) *this + (ACE_CDR::ULong) rhs; - return ETCL_Literal_Constraint ((ACE_CDR::ULong) result); - } - default: - return ETCL_Literal_Constraint ((ACE_CDR::Long) 0); - } -} - -ETCL_Literal_Constraint -ETCL_Literal_Constraint::operator- (const ETCL_Literal_Constraint & rhs) -{ - Literal_Type widest_type = this->widest_type (rhs); - - switch (widest_type) - { - case ACE_ETCL_DOUBLE: - { - ACE_CDR::Double result = (ACE_CDR::Double) *this - (ACE_CDR::Double) rhs; - return ETCL_Literal_Constraint ((ACE_CDR::Double) result); - } - case ACE_ETCL_INTEGER: - case ACE_ETCL_SIGNED: - { - ACE_CDR::Long result = (ACE_CDR::Long) *this - (ACE_CDR::Long) rhs; - return ETCL_Literal_Constraint ((ACE_CDR::Long) result); - } - case ACE_ETCL_UNSIGNED: - { - ACE_CDR::ULong result = (ACE_CDR::ULong) *this - (ACE_CDR::ULong) rhs; - return ETCL_Literal_Constraint ((ACE_CDR::ULong) result); - } - default: - return ETCL_Literal_Constraint ((ACE_CDR::Long) 0); - } -} - -ETCL_Literal_Constraint -ETCL_Literal_Constraint::operator* (const ETCL_Literal_Constraint & rhs) -{ - Literal_Type widest_type = this->widest_type (rhs); - - switch (widest_type) - { - case ACE_ETCL_DOUBLE: - { - ACE_CDR::Double result = (ACE_CDR::Double) *this * (ACE_CDR::Double) rhs; - return ETCL_Literal_Constraint ((ACE_CDR::Double) result); - } - case ACE_ETCL_INTEGER: - case ACE_ETCL_SIGNED: - { - ACE_CDR::Long result = (ACE_CDR::Long) *this * (ACE_CDR::Long) rhs; - return ETCL_Literal_Constraint ((ACE_CDR::Long) result); - } - case ACE_ETCL_UNSIGNED: - { - ACE_CDR::ULong result = (ACE_CDR::ULong) *this * (ACE_CDR::ULong) rhs; - return ETCL_Literal_Constraint ((ACE_CDR::ULong) result); - } - default: - return ETCL_Literal_Constraint ((ACE_CDR::Long) 0); - } -} - -ETCL_Literal_Constraint -ETCL_Literal_Constraint::operator/ (const ETCL_Literal_Constraint & rhs) -{ - Literal_Type widest_type = this->widest_type (rhs); - - switch (widest_type) - { - case ACE_ETCL_DOUBLE: - { - if (ACE::is_equal ((ACE_CDR::Double) rhs, 0.0)) - return ETCL_Literal_Constraint ((ACE_CDR::Double) 0.0); - - ACE_CDR::Double result = (ACE_CDR::Double) *this / (ACE_CDR::Double) rhs; - return ETCL_Literal_Constraint ((ACE_CDR::Double) result); - } - case ACE_ETCL_INTEGER: - case ACE_ETCL_SIGNED: - { - if ((ACE_CDR::Long) rhs == 0) - return ETCL_Literal_Constraint ((ACE_CDR::Long) 0); - - ACE_CDR::Long result = (ACE_CDR::Long) *this / (ACE_CDR::Long) rhs; - return ETCL_Literal_Constraint ((ACE_CDR::Long) result); - } - case ACE_ETCL_UNSIGNED: - { - if ((ACE_CDR::ULong) rhs == 0) - return ETCL_Literal_Constraint ((ACE_CDR::ULong) 0); - - ACE_CDR::ULong result = (ACE_CDR::ULong) *this / (ACE_CDR::ULong) rhs; - return ETCL_Literal_Constraint ((ACE_CDR::ULong) result); - } - default: - return ETCL_Literal_Constraint ((ACE_CDR::Long) 0); - } -} - -ETCL_Literal_Constraint -ETCL_Literal_Constraint::operator- (void) -{ - switch (this->type_) - { - case ACE_ETCL_DOUBLE: - return ETCL_Literal_Constraint (- this->op_.double_); - case ACE_ETCL_INTEGER: - case ACE_ETCL_SIGNED: - return ETCL_Literal_Constraint (- this->op_.integer_); - case ACE_ETCL_UNSIGNED: - return ETCL_Literal_Constraint (- (ACE_CDR::Long) this->op_.uinteger_); - default: - return ETCL_Literal_Constraint ((ACE_CDR::Long) 0); - } -} - -Literal_Type -ETCL_Literal_Constraint::widest_type (const ETCL_Literal_Constraint & rhs) -{ - Literal_Type rhs_type = rhs.expr_type (); - Literal_Type return_value = rhs_type; - - if (rhs_type != this->type_) - { - if (rhs_type > this->type_) - { - return_value = rhs_type; - } - else - { - return_value = this->type_; - } - } - - return return_value; -} - -void -ETCL_Literal_Constraint::copy (const ETCL_Literal_Constraint &lit) -{ - if (this->type_ == ACE_ETCL_STRING) - { - ACE::strdelete (this->op_.str_); - } - - this->type_ = lit.type_; - - switch (this->type_) - { - case ACE_ETCL_STRING: - this->op_.str_ = ACE::strnew (lit.op_.str_); - break; - case ACE_ETCL_DOUBLE: - this->op_.double_ = lit.op_.double_; - break; - case ACE_ETCL_UNSIGNED: - this->op_.uinteger_ = lit.op_.uinteger_; - break; - case ACE_ETCL_INTEGER: - case ACE_ETCL_SIGNED: - this->op_.integer_ = lit.op_.integer_; - break; - case ACE_ETCL_BOOLEAN: - this->op_.bool_ = lit.op_.bool_; - break; - default: - this->type_ = ACE_ETCL_UNKNOWN; - break; - } -} - -// **************************************************************** - -int -ETCL_Identifier::accept (ETCL_Constraint_Visitor *visitor) -{ - return visitor->visit_identifier (this); -} - -// **************************************************************** - -ETCL_Union_Value::~ETCL_Union_Value (void) -{ - delete this->string_; - delete this->integer_; -} - -int -ETCL_Union_Value::accept (ETCL_Constraint_Visitor *visitor) -{ - return visitor->visit_union_value (this); -} - -// **************************************************************** - -ETCL_Union_Pos::~ETCL_Union_Pos (void) -{ - delete this->component_; - delete this->union_value_; -} - -int -ETCL_Union_Pos::accept (ETCL_Constraint_Visitor *visitor) -{ - return visitor->visit_union_pos (this); -} - -// **************************************************************** - -ETCL_Component_Pos::~ETCL_Component_Pos (void) -{ - delete this->component_; - delete this->integer_; -} - -int -ETCL_Component_Pos::accept (ETCL_Constraint_Visitor *visitor) -{ - return visitor->visit_component_pos (this); -} - -// **************************************************************** - -ETCL_Component_Assoc::~ETCL_Component_Assoc (void) -{ - delete this->component_; - delete this->identifier_; -} - -int -ETCL_Component_Assoc::accept (ETCL_Constraint_Visitor *visitor) -{ - return visitor->visit_component_assoc (this); -} - -// **************************************************************** - -ETCL_Component_Array::~ETCL_Component_Array (void) -{ - delete this->component_; - delete this->integer_; -} - -int -ETCL_Component_Array::accept (ETCL_Constraint_Visitor *visitor) -{ - return visitor->visit_component_array (this); -} - -// **************************************************************** - -ETCL_Special::~ETCL_Special (void) -{} - -int -ETCL_Special::accept (ETCL_Constraint_Visitor *visitor) -{ - return visitor->visit_special (this); -} - -// **************************************************************** - -ETCL_Component::~ETCL_Component (void) -{ - delete this->component_; - delete this->identifier_; -} - -int -ETCL_Component::accept (ETCL_Constraint_Visitor *visitor) -{ - return visitor->visit_component (this); -} - -// **************************************************************** - -ETCL_Dot::~ETCL_Dot (void) -{ - delete this->component_; -} - -int -ETCL_Dot::accept (ETCL_Constraint_Visitor *visitor) -{ - return visitor->visit_dot (this); -} - -// **************************************************************** - -ETCL_Eval::~ETCL_Eval (void) -{ - delete this->component_; -} - -int -ETCL_Eval::accept (ETCL_Constraint_Visitor *visitor) -{ - return visitor->visit_eval (this); -} - -// **************************************************************** - -ETCL_Default::~ETCL_Default (void) -{ - delete this->component_; -} - -int -ETCL_Default::accept (ETCL_Constraint_Visitor *visitor) -{ - return visitor->visit_default (this); -} - -// **************************************************************** - -ETCL_Exist::~ETCL_Exist (void) -{ - delete this->component_; -} - -int -ETCL_Exist::accept (ETCL_Constraint_Visitor *visitor) -{ - return visitor->visit_exist (this); -} - -// **************************************************************** - -ETCL_Unary_Expr::~ETCL_Unary_Expr (void) -{ - delete this->subexpr_; -} - -int -ETCL_Unary_Expr::accept (ETCL_Constraint_Visitor *visitor) -{ - return visitor->visit_unary_expr (this); -} - -// **************************************************************** - -ETCL_Binary_Expr::~ETCL_Binary_Expr (void) -{ - delete this->lhs_; - delete this->rhs_; -} - -int -ETCL_Binary_Expr::accept (ETCL_Constraint_Visitor *visitor) -{ - return visitor->visit_binary_expr (this); -} - -// **************************************************************** - -ETCL_Preference::~ETCL_Preference (void) -{ - delete this->subexpr_; -} - -int -ETCL_Preference::accept (ETCL_Constraint_Visitor *visitor) -{ - return visitor->visit_preference (this); -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/ETCL/ETCL_Constraint.h b/modules/worldengine/deps/acelite/ace/ETCL/ETCL_Constraint.h deleted file mode 100644 index bb1e9eec9c..0000000000 --- a/modules/worldengine/deps/acelite/ace/ETCL/ETCL_Constraint.h +++ /dev/null @@ -1,414 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file ETCL_Constraint.h - * - * @author Carlos O'Ryan (coryan@cs.wustl.edu) - * @author Jeff Parsons (j.parsons@vanderbilt.edu) - */ -//============================================================================= - -#ifndef ACE_ETCL_CONSTRAINT_H -#define ACE_ETCL_CONSTRAINT_H - -#include /**/ "ace/pre.h" - -#include "ace/SString.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/CDR_Base.h" - -#include "ace/ETCL/ace_etcl_export.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -typedef unsigned long Literal_Type; - -class ETCL_Constraint_Visitor; - -class ACE_ETCL_Export ETCL_Constraint -{ -public: - /// Constructor and destructor - ETCL_Constraint (void); - virtual ~ETCL_Constraint (void); - - virtual int accept (ETCL_Constraint_Visitor *visitor); - -protected: - enum - { - ACE_ETCL_STRING, - ACE_ETCL_DOUBLE, - ACE_ETCL_UNSIGNED, - ACE_ETCL_SIGNED, - ACE_ETCL_INTEGER, - ACE_ETCL_BOOLEAN, - ACE_ETCL_COMPONENT, - ACE_ETCL_UNKNOWN - }; -}; - -// **************************************************************** - -class ACE_ETCL_Export ETCL_Literal_Constraint - : public ETCL_Constraint -{ -public: - ETCL_Literal_Constraint (void); - - // = Constructors for each of the various types of literals. - - explicit ETCL_Literal_Constraint (ACE_CDR::ULong uinteger); - explicit ETCL_Literal_Constraint (ACE_CDR::Long integer); - explicit ETCL_Literal_Constraint (ACE_CDR::Boolean boolean); - explicit ETCL_Literal_Constraint (ACE_CDR::Double doub); - explicit ETCL_Literal_Constraint (const char* str); - - /// Copy constructor - ETCL_Literal_Constraint (const ETCL_Literal_Constraint& lit); - - /// Destructor. - virtual ~ETCL_Literal_Constraint(void); - - /// Visitor accept method. - virtual int accept (ETCL_Constraint_Visitor* visitor); - - Literal_Type expr_type (void) const; - - /// Assignment operator. - void operator= (const ETCL_Literal_Constraint& co); - - // Conversion routines. - operator ACE_CDR::Boolean (void) const; - operator ACE_CDR::ULong (void) const; - operator ACE_CDR::Long (void) const; - operator ACE_CDR::Double (void) const; - operator const char* (void) const; - - // Return the type represented by this MysteryOperand. - - // = Boolean operators. - - bool - operator< (const ETCL_Literal_Constraint& rhs); - - bool - operator<= (const ETCL_Literal_Constraint& rhs); - - bool - operator> (const ETCL_Literal_Constraint& rhs); - - bool - operator>= (const ETCL_Literal_Constraint& rhs); - - bool - operator== (const ETCL_Literal_Constraint& rhs); - - bool - operator!= (const ETCL_Literal_Constraint& rhs); - - // = Arithmetic operators. - - ETCL_Literal_Constraint - operator+ (const ETCL_Literal_Constraint& rhs); - - ETCL_Literal_Constraint - operator- (const ETCL_Literal_Constraint& rhs); - - ETCL_Literal_Constraint - operator* (const ETCL_Literal_Constraint& rhs); - - ETCL_Literal_Constraint - operator/ (const ETCL_Literal_Constraint& rhs); - - // Unary minus. - ETCL_Literal_Constraint - operator- (void); - - /// Ensure both operands are of the same simple numeric type. - virtual Literal_Type - widest_type (const ETCL_Literal_Constraint& rhs); - -protected: - /// Private copy method. - void copy (const ETCL_Literal_Constraint& co); - - /// Union of the possible literal types. - union - { - char* str_; - ACE_CDR::ULong uinteger_; - ACE_CDR::Long integer_; - ACE_CDR::Boolean bool_; - ACE_CDR::Double double_; - } op_; - - /// The actual types of the ETCL_Literal_Constraint. - Literal_Type type_; -}; - -// **************************************************************** - -class ACE_ETCL_Export ETCL_Identifier : public ETCL_Constraint -{ -public: - ETCL_Identifier (const char *value); - - /// Get the value - const char *value (void) const; - - // = The Constraint methods. - int accept (ETCL_Constraint_Visitor *visitor); - -private: - /// The value - ACE_CString string_; -}; - -// **************************************************************** - -class ACE_ETCL_Export ETCL_Union_Value : public ETCL_Constraint -{ -public: - ETCL_Union_Value (int sign, - ETCL_Constraint *integer); - explicit ETCL_Union_Value (ETCL_Constraint *string = 0); - virtual ~ETCL_Union_Value (void); - - int sign (void) const; - ETCL_Literal_Constraint *integer (void) const; - ETCL_Literal_Constraint *string (void) const; - - virtual int accept (ETCL_Constraint_Visitor *visitor); - -private: - int sign_; - ETCL_Literal_Constraint *integer_; - ETCL_Literal_Constraint *string_; -}; - -class ACE_ETCL_Export ETCL_Union_Pos : public ETCL_Constraint -{ -public: - ETCL_Union_Pos (ETCL_Constraint *union_value = 0, - ETCL_Constraint *component = 0); - virtual ~ETCL_Union_Pos (void); - - ETCL_Union_Value *union_value (void) const; - ETCL_Constraint *component (void) const; - - virtual int accept (ETCL_Constraint_Visitor *visitor); - -private: - ETCL_Union_Value *union_value_; - ETCL_Constraint *component_; -}; - -class ACE_ETCL_Export ETCL_Component_Pos : public ETCL_Constraint -{ -public: - ETCL_Component_Pos (ETCL_Constraint *integer = 0, - ETCL_Constraint *component = 0); - virtual ~ETCL_Component_Pos (void); - - ETCL_Literal_Constraint *integer (void) const; - ETCL_Constraint *component (void) const; - - virtual int accept (ETCL_Constraint_Visitor *visitor); - -private: - ETCL_Literal_Constraint *integer_; - ETCL_Constraint *component_; -}; - -class ACE_ETCL_Export ETCL_Component_Assoc : public ETCL_Constraint -{ -public: - ETCL_Component_Assoc (ETCL_Constraint *identifier = 0, - ETCL_Constraint *component = 0); - virtual ~ETCL_Component_Assoc (void); - - ETCL_Identifier *identifier (void) const; - ETCL_Constraint *component (void) const; - - virtual int accept (ETCL_Constraint_Visitor *visitor); - -private: - ETCL_Identifier *identifier_; - ETCL_Constraint *component_; -}; - -class ACE_ETCL_Export ETCL_Component_Array : public ETCL_Constraint -{ -public: - ETCL_Component_Array (ETCL_Constraint *integer = 0, - ETCL_Constraint *component = 0); - virtual ~ETCL_Component_Array (void); - - ETCL_Literal_Constraint *integer (void) const; - ETCL_Constraint *component (void) const; - - virtual int accept (ETCL_Constraint_Visitor *visitor); - -private: - ETCL_Literal_Constraint *integer_; - ETCL_Constraint *component_; -}; - -class ACE_ETCL_Export ETCL_Special : public ETCL_Constraint -{ -public: - ETCL_Special (void); - ETCL_Special (int type); - virtual ~ETCL_Special (void); - - int type (void) const; - - virtual int accept (ETCL_Constraint_Visitor *visitor); - -private: - int type_; -}; - -class ACE_ETCL_Export ETCL_Component : public ETCL_Constraint -{ -public: - ETCL_Component (ETCL_Constraint *identifier = 0, - ETCL_Constraint *component = 0); - virtual ~ETCL_Component (void); - - ETCL_Identifier *identifier (void) const; - ETCL_Constraint *component (void) const; - - virtual int accept (ETCL_Constraint_Visitor *visitor); - -private: - ETCL_Identifier *identifier_; - ETCL_Constraint *component_; -}; - -class ACE_ETCL_Export ETCL_Dot : public ETCL_Constraint -{ -public: - explicit ETCL_Dot (ETCL_Constraint *component = 0); - virtual ~ETCL_Dot (void); - - ETCL_Constraint *component (void) const; - - virtual int accept (ETCL_Constraint_Visitor *visitor); - -private: - ETCL_Constraint *component_; -}; - -class ACE_ETCL_Export ETCL_Eval : public ETCL_Constraint -{ -public: - explicit ETCL_Eval (ETCL_Constraint *component = 0); - virtual ~ETCL_Eval (void); - - ETCL_Constraint *component (void) const; - - virtual int accept (ETCL_Constraint_Visitor *visitor); - -private: - ETCL_Constraint *component_; -}; - -class ACE_ETCL_Export ETCL_Default : public ETCL_Constraint -{ -public: - explicit ETCL_Default (ETCL_Constraint *component = 0); - virtual ~ETCL_Default (void); - - ETCL_Constraint *component (void) const; - - virtual int accept (ETCL_Constraint_Visitor *visitor); - -private: - ETCL_Constraint *component_; -}; - -class ACE_ETCL_Export ETCL_Exist : public ETCL_Constraint -{ -public: - explicit ETCL_Exist (ETCL_Constraint *component = 0); - virtual ~ETCL_Exist (void); - - ETCL_Constraint *component (void) const; - - virtual int accept (ETCL_Constraint_Visitor *visitor); - -private: - ETCL_Constraint *component_; -}; - -class ACE_ETCL_Export ETCL_Unary_Expr : public ETCL_Constraint -{ -public: - ETCL_Unary_Expr (int type, - ETCL_Constraint *subexpr); - virtual ~ETCL_Unary_Expr (void); - - int type (void) const; - ETCL_Constraint *subexpr (void) const; - - int accept (ETCL_Constraint_Visitor *visitor); - -private: - int type_; - ETCL_Constraint *subexpr_; -}; - -class ACE_ETCL_Export ETCL_Binary_Expr : public ETCL_Constraint -{ -public: - ETCL_Binary_Expr (int type, - ETCL_Constraint *lhs, - ETCL_Constraint *rhs); - virtual ~ETCL_Binary_Expr (void); - - int type (void) const; - ETCL_Constraint *rhs (void) const; - ETCL_Constraint *lhs (void) const; - - int accept (ETCL_Constraint_Visitor *visitor); - -private: - int type_; - ETCL_Constraint *lhs_; - ETCL_Constraint *rhs_; -}; - -class ACE_ETCL_Export ETCL_Preference : public ETCL_Constraint -{ -public: - ETCL_Preference (void); - ETCL_Preference (int type, - ETCL_Constraint *subexpr = 0); - virtual ~ETCL_Preference (void); - - int type (void) const; - ETCL_Constraint *subexpr (void) const; - - virtual int accept (ETCL_Constraint_Visitor *visitor); - -private: - int type_; - ETCL_Constraint *subexpr_; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/ETCL/ETCL_Constraint.inl" -#endif /* __ACE_INLINE__ */ - -#include /**/ "ace/post.h" - -#endif // ACE_ETCL_CONSTRAINT_H diff --git a/modules/worldengine/deps/acelite/ace/ETCL/ETCL_Constraint.inl b/modules/worldengine/deps/acelite/ace/ETCL/ETCL_Constraint.inl deleted file mode 100644 index 2ee32f420c..0000000000 --- a/modules/worldengine/deps/acelite/ace/ETCL/ETCL_Constraint.inl +++ /dev/null @@ -1,349 +0,0 @@ -// -*- C++ -*- -// **************************************************************** - -ACE_INLINE -ETCL_Literal_Constraint::ETCL_Literal_Constraint (void) - : type_ (ACE_ETCL_UNKNOWN) -{ -} - -// **************************************************************** - -ACE_INLINE -ETCL_Identifier::ETCL_Identifier (const char *value) - : string_ (value) -{ -} - -ACE_INLINE const char * -ETCL_Identifier::value (void) const -{ - return this->string_.c_str (); -} - - -// **************************************************************** - -ACE_INLINE -ETCL_Union_Value::ETCL_Union_Value (int sign, - ETCL_Constraint *integer) - : sign_ (sign), - string_ (0) -{ - this->integer_ = - dynamic_cast (integer); -} - -ACE_INLINE -ETCL_Union_Value::ETCL_Union_Value (ETCL_Constraint *string) - : sign_ (0), - integer_ (0) -{ - this->string_ = - dynamic_cast (string); -} - -ACE_INLINE int -ETCL_Union_Value::sign (void) const -{ - return this->sign_; -} - -ACE_INLINE ETCL_Literal_Constraint * -ETCL_Union_Value::integer (void) const -{ - return this->integer_; -} - -ACE_INLINE ETCL_Literal_Constraint * -ETCL_Union_Value::string (void) const -{ - return this->string_; -} - -// **************************************************************** - -ACE_INLINE -ETCL_Union_Pos::ETCL_Union_Pos (ETCL_Constraint *union_value, - ETCL_Constraint *component) - : component_ (component) -{ - this->union_value_ = - dynamic_cast (union_value); -} - -ACE_INLINE ETCL_Union_Value * -ETCL_Union_Pos::union_value (void) const -{ - return this->union_value_; -} - -ACE_INLINE ETCL_Constraint * -ETCL_Union_Pos::component (void) const -{ - return this->component_; -} - -// **************************************************************** - -ACE_INLINE -ETCL_Component_Pos::ETCL_Component_Pos ( - ETCL_Constraint *integer, - ETCL_Constraint *component) - : component_ (component) -{ - this->integer_ = - dynamic_cast (integer); -} - -ACE_INLINE ETCL_Literal_Constraint * -ETCL_Component_Pos::integer (void) const -{ - return this->integer_; -} - -ACE_INLINE ETCL_Constraint * -ETCL_Component_Pos::component (void) const -{ - return this->component_; -} - -// **************************************************************** - -ACE_INLINE -ETCL_Component_Assoc::ETCL_Component_Assoc ( - ETCL_Constraint *identifier, - ETCL_Constraint *component) - : component_ (component) -{ - this->identifier_ = - dynamic_cast (identifier); -} - -ACE_INLINE ETCL_Identifier * -ETCL_Component_Assoc::identifier (void) const -{ - return this->identifier_; -} - -ACE_INLINE ETCL_Constraint * -ETCL_Component_Assoc::component (void) const -{ - return this->component_; -} - -// **************************************************************** - -ACE_INLINE -ETCL_Component_Array::ETCL_Component_Array ( - ETCL_Constraint *integer, - ETCL_Constraint *component) - : component_ (component) -{ - this->integer_ = - dynamic_cast (integer); -} - -ACE_INLINE ETCL_Literal_Constraint * -ETCL_Component_Array::integer (void) const -{ - return this->integer_; -} - -ACE_INLINE ETCL_Constraint * -ETCL_Component_Array::component (void) const -{ - return this->component_; -} - -// **************************************************************** - -ACE_INLINE -ETCL_Special::ETCL_Special (void) - : type_ (0) -{} - -ACE_INLINE -ETCL_Special::ETCL_Special (int type) - : type_ (type) -{} - -ACE_INLINE int -ETCL_Special::type (void) const -{ - return this->type_; -} - -// **************************************************************** - -ACE_INLINE -ETCL_Component::ETCL_Component (ETCL_Constraint *identifier, - ETCL_Constraint *component) - : component_ (component) -{ - this->identifier_ = - dynamic_cast (identifier); -} - -ACE_INLINE ETCL_Identifier * -ETCL_Component::identifier (void) const -{ - return this->identifier_; -} - -ACE_INLINE ETCL_Constraint * -ETCL_Component::component (void) const -{ - return this->component_; -} - -// **************************************************************** - -ACE_INLINE -ETCL_Dot::ETCL_Dot (ETCL_Constraint *component) - : component_ (component) -{ -} - -ACE_INLINE ETCL_Constraint * -ETCL_Dot::component (void) const -{ - return this->component_; -} - -// **************************************************************** - -ACE_INLINE -ETCL_Eval::ETCL_Eval (ETCL_Constraint *component) - : component_ (component) -{ -} - -ACE_INLINE ETCL_Constraint * -ETCL_Eval::component (void) const -{ - return this->component_; -} - -// **************************************************************** - -ACE_INLINE -ETCL_Default::ETCL_Default (ETCL_Constraint *component) - : component_ (component) -{ -} - -ACE_INLINE ETCL_Constraint * -ETCL_Default::component (void) const -{ - return this->component_; -} - -// **************************************************************** - -ACE_INLINE -ETCL_Exist::ETCL_Exist (ETCL_Constraint *component) - : component_ (component) -{ -} - -ACE_INLINE ETCL_Constraint * -ETCL_Exist::component (void) const -{ - return this->component_; -} - -// **************************************************************** - -ACE_INLINE -ETCL_Unary_Expr::ETCL_Unary_Expr (int type, - ETCL_Constraint *subexpr) - : type_ (type), - subexpr_ (subexpr) -{} - -ACE_INLINE int -ETCL_Unary_Expr::type (void) const -{ - return this->type_; -} - -ACE_INLINE ETCL_Constraint * -ETCL_Unary_Expr::subexpr (void) const -{ - return this->subexpr_; -} - -// **************************************************************** - -ACE_INLINE -ETCL_Binary_Expr::ETCL_Binary_Expr (int type, - ETCL_Constraint *lhs, - ETCL_Constraint *rhs) - : type_ (type), - lhs_ (lhs), - rhs_ (rhs) -{} - -ACE_INLINE int -ETCL_Binary_Expr::type (void) const -{ - return this->type_; -} - -ACE_INLINE ETCL_Constraint * -ETCL_Binary_Expr::rhs (void) const -{ - return this->rhs_; -} - -ACE_INLINE ETCL_Constraint * -ETCL_Binary_Expr::lhs (void) const -{ - return this->lhs_; -} - -// **************************************************************** - -ACE_INLINE -ETCL_Preference::ETCL_Preference (void) - : type_ (0), - subexpr_ (0) -{} - -ACE_INLINE -ETCL_Preference::ETCL_Preference (int type, - ETCL_Constraint *subexpr) - : type_ (type), - subexpr_ (subexpr) -{} - -ACE_INLINE int -ETCL_Preference::type (void) const -{ - return this->type_; -} - -ACE_INLINE ETCL_Constraint * -ETCL_Preference::subexpr (void) const -{ - return this->subexpr_; -} - -ACE_INLINE bool -ETCL_Literal_Constraint::operator!= (const ETCL_Literal_Constraint & rhs) -{ - return !(*this == rhs); -} - -ACE_INLINE bool -ETCL_Literal_Constraint::operator<= (const ETCL_Literal_Constraint & rhs) -{ - return !(*this > rhs); -} - -ACE_INLINE bool -ETCL_Literal_Constraint::operator>= (const ETCL_Literal_Constraint & rhs) -{ - return !(*this < rhs); -} diff --git a/modules/worldengine/deps/acelite/ace/ETCL/ETCL_Constraint_Visitor.cpp b/modules/worldengine/deps/acelite/ace/ETCL/ETCL_Constraint_Visitor.cpp deleted file mode 100644 index 50d666025d..0000000000 --- a/modules/worldengine/deps/acelite/ace/ETCL/ETCL_Constraint_Visitor.cpp +++ /dev/null @@ -1,119 +0,0 @@ -// -*- C++ -*- -//============================================================================= -/** - * @file ETCL_Constraint_Visitor.cpp - * - * @author Jeff Parsons - */ -//============================================================================= - -#include "ace/ETCL/ETCL_Constraint_Visitor.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ETCL_Constraint_Visitor::ETCL_Constraint_Visitor (void) -{ -} - -ETCL_Constraint_Visitor::~ETCL_Constraint_Visitor (void) -{ -} - -int -ETCL_Constraint_Visitor::visit_literal (ETCL_Literal_Constraint *) -{ - return 0; -} - -int -ETCL_Constraint_Visitor::visit_identifier (ETCL_Identifier *) -{ - return 0; -} - -int -ETCL_Constraint_Visitor::visit_union_value (ETCL_Union_Value *) -{ - return 0; -} - -int -ETCL_Constraint_Visitor::visit_union_pos (ETCL_Union_Pos *) -{ - return 0; -} - -int -ETCL_Constraint_Visitor::visit_component_pos (ETCL_Component_Pos *) -{ - return 0; -} - -int -ETCL_Constraint_Visitor::visit_component_assoc (ETCL_Component_Assoc *) -{ - return 0; -} - -int -ETCL_Constraint_Visitor::visit_component_array (ETCL_Component_Array *) -{ - return 0; -} - -int -ETCL_Constraint_Visitor::visit_special (ETCL_Special *) -{ - return 0; -} - -int -ETCL_Constraint_Visitor::visit_component (ETCL_Component *) -{ - return 0; -} - -int -ETCL_Constraint_Visitor::visit_dot (ETCL_Dot *) -{ - return 0; -} - -int -ETCL_Constraint_Visitor::visit_eval (ETCL_Eval *) -{ - return 0; -} - -int -ETCL_Constraint_Visitor::visit_default (ETCL_Default *) -{ - return 0; -} - -int -ETCL_Constraint_Visitor::visit_exist (ETCL_Exist *) -{ - return 0; -} - -int -ETCL_Constraint_Visitor::visit_unary_expr (ETCL_Unary_Expr *) -{ - return 0; -} - -int -ETCL_Constraint_Visitor::visit_binary_expr (ETCL_Binary_Expr *) -{ - return 0; -} - -int -ETCL_Constraint_Visitor::visit_preference (ETCL_Preference *) -{ - return 0; -} - -ACE_END_VERSIONED_NAMESPACE_DECL - diff --git a/modules/worldengine/deps/acelite/ace/ETCL/ETCL_Constraint_Visitor.h b/modules/worldengine/deps/acelite/ace/ETCL/ETCL_Constraint_Visitor.h deleted file mode 100644 index ea790676c9..0000000000 --- a/modules/worldengine/deps/acelite/ace/ETCL/ETCL_Constraint_Visitor.h +++ /dev/null @@ -1,69 +0,0 @@ -// -*- C++ -*- -//============================================================================= -/** - * @file ETCL_Constraint_Visitor.h - * - * @author Carlos O'Ryan - * @author Jeff Parsons - */ -//============================================================================= - -#ifndef ACE_ETCL_CONSTRAINT_VISITOR_H -#define ACE_ETCL_CONSTRAINT_VISITOR_H - -#include /**/ "ace/pre.h" - -#include "ace/ETCL/ace_etcl_export.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -class ETCL_Literal_Constraint; -class ETCL_Identifier; -class ETCL_Union_Value; -class ETCL_Union_Pos; -class ETCL_Component_Pos; -class ETCL_Component_Assoc; -class ETCL_Component_Array; -class ETCL_Special; -class ETCL_Component; -class ETCL_Dot; -class ETCL_Eval; -class ETCL_Default; -class ETCL_Exist; -class ETCL_Unary_Expr; -class ETCL_Binary_Expr; -class ETCL_Preference; - -class ACE_ETCL_Export ETCL_Constraint_Visitor -{ -public: - ETCL_Constraint_Visitor (void); - virtual ~ETCL_Constraint_Visitor (void); - - virtual int visit_literal (ETCL_Literal_Constraint *); - virtual int visit_identifier (ETCL_Identifier *); - virtual int visit_union_value (ETCL_Union_Value *); - virtual int visit_union_pos (ETCL_Union_Pos *); - virtual int visit_component_pos (ETCL_Component_Pos *); - virtual int visit_component_assoc (ETCL_Component_Assoc *); - virtual int visit_component_array (ETCL_Component_Array *); - virtual int visit_special (ETCL_Special *); - virtual int visit_component (ETCL_Component *); - virtual int visit_dot (ETCL_Dot *); - virtual int visit_eval (ETCL_Eval *); - virtual int visit_default (ETCL_Default *); - virtual int visit_exist (ETCL_Exist *); - virtual int visit_unary_expr (ETCL_Unary_Expr *); - virtual int visit_binary_expr (ETCL_Binary_Expr *); - virtual int visit_preference (ETCL_Preference *); -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#include /**/ "ace/post.h" - -#endif // ACE_ETCL_CONSTRAINT_VISITOR_H diff --git a/modules/worldengine/deps/acelite/ace/ETCL/ETCL_Interpreter.cpp b/modules/worldengine/deps/acelite/ace/ETCL/ETCL_Interpreter.cpp deleted file mode 100644 index cc37c48b89..0000000000 --- a/modules/worldengine/deps/acelite/ace/ETCL/ETCL_Interpreter.cpp +++ /dev/null @@ -1,111 +0,0 @@ -// -*- C++ -*- -#include "ace/Guard_T.h" -#include "ace/Truncate.h" - -#include "ace/ETCL/ETCL_Interpreter.h" -#include "ace/ETCL/ETCL_Constraint.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ETCL_Parser_Export ACE_SYNCH_MUTEX ETCL_Interpreter::parserMutex__; - -ETCL_Interpreter::ETCL_Interpreter (void) - : root_ (0) -{ -} - -ETCL_Interpreter::~ETCL_Interpreter (void) -{ - delete this->root_; -} - -int -ETCL_Interpreter::build_tree (const char* constraints) -{ - ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, - guard, - ETCL_Interpreter::parserMutex__, - -1); - - Lex_String_Input::reset ((char*)constraints); - - yyval.constraint = 0; - int return_value = ::yyparse (); - - if (return_value == 0 && yyval.constraint != 0) - { - this->root_ = yyval.constraint; - } - else - { - this->root_ = 0; - } - - return return_value; -} - -int -ETCL_Interpreter::is_empty_string (const char* str) -{ - int return_value = 0; - - if (str != 0) - { - int i = 0; - - while (str[i] != '\0') - { - if (str[i] != ' ') - { - break; - } - - ++i; - } - - if (str[i] == '\0') - { - return_value = 1; - } - } - - return return_value; -} - -char* Lex_String_Input::string_ = 0; -char* Lex_String_Input::current_ = 0; -char* Lex_String_Input::end_ = 0; - -// Routine to have Lex read its input from the constraint string. - -int -Lex_String_Input::copy_into (char* buf, - int max_size) -{ - int const chars_left = - ACE_Utils::truncate_cast ( - Lex_String_Input::end_ - Lex_String_Input::current_); - - int const n = max_size > chars_left ? chars_left : max_size; - - if (n > 0) - { - ACE_OS::memcpy (buf, - Lex_String_Input::current_, - n); - Lex_String_Input::current_ += n; - } - - return n; -} - -void -Lex_String_Input::reset (char* input_string) -{ - Lex_String_Input::string_ = input_string; - Lex_String_Input::current_ = input_string; - Lex_String_Input::end_ = - input_string + ACE_OS::strlen (Lex_String_Input::string_); -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/ETCL/ETCL_Interpreter.h b/modules/worldengine/deps/acelite/ace/ETCL/ETCL_Interpreter.h deleted file mode 100644 index 06fe138dd0..0000000000 --- a/modules/worldengine/deps/acelite/ace/ETCL/ETCL_Interpreter.h +++ /dev/null @@ -1,115 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file ETCL_Interpreter.h - * - * @author Jeff Parsons based on previous work by - * @author Seth Widoff - */ -//============================================================================= - - -#ifndef ETCL_INTERPRETER_H -#define ETCL_INTERPRETER_H - -#include /**/ "ace/pre.h" - -#include "ace/Thread_Mutex.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Synch_Traits.h" - -#include "etcl_parser_export.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -class ETCL_Constraint; - -ACE_END_VERSIONED_NAMESPACE_DECL - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ETCL_Interpreter - * - * @brief ETCL_Interpreter is the superclass for all ETCL interpreters. - * Its build tree method invokes the yacc parser to parse a constraint - * or preference string. - */ -class ETCL_Parser_Export ETCL_Interpreter -{ -protected: - // = Initialization and termination methods. - /// Constructor. - ETCL_Interpreter (void); - - /// Destructor. - virtual ~ETCL_Interpreter (void); - - /// Using the Yacc generated parser, construct an expression tree - /// representing @a constraints from the tokens returned by it. - int build_tree (const char* constraints); - - static int is_empty_string (const char* str); - - /// The root of the expression tree, not equal to null if build_tree - /// successfully builds a tree from the constraints. - ETCL_Constraint* root_; -private: - /// This mutex protects the method from reentrance. - static ACE_SYNCH_MUTEX parserMutex__; -}; - - -// Functions we need for parsing. -extern int yyparse (void); -extern void yyrestart (FILE*); -extern int yylex (void); - -// Have yylex read from the constraint string, not from stdin. -#undef YY_INPUT -#define YY_INPUT(b, r, ms) (r = Lex_String_Input::copy_into(b, ms)) - -/** - * @class Lex_String_Input - * - * @brief Have Lex read from a string and not from stdin. Essentially, - * the interpreter needs to call yylex() until EOF, and call - * TAO_Lex_String_Input::reset() with the new string, prior to - * calling yyparse. - */ -class Lex_String_Input -{ -public: - /// Reset the lex input. - static void reset (char* input_string); - - /// Method lex will call to read from the input string. - static int copy_into (char* buf, int max_size); - -private: - - /// Pointers to keep track of the input string. - static char* string_; - static char* current_; - static char* end_; -}; - -/// The union used by lex and bison to build the Abstract Syntax Tree. -typedef union -{ - ACE_VERSIONED_NAMESPACE_NAME::ETCL_Constraint* constraint; -} YYSTYPE; - -extern YYSTYPE yylval; -extern YYSTYPE yyval; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#include /**/ "ace/post.h" - -#endif // ETCL_INTERPRETER_H diff --git a/modules/worldengine/deps/acelite/ace/ETCL/ETCL_l.cpp b/modules/worldengine/deps/acelite/ace/ETCL/ETCL_l.cpp deleted file mode 100644 index 4b78f5b06d..0000000000 --- a/modules/worldengine/deps/acelite/ace/ETCL/ETCL_l.cpp +++ /dev/null @@ -1,1875 +0,0 @@ - -/* A lexical scanner generated by flex */ - -/* Scanner skeleton version: - */ - -#define FLEX_SCANNER -#define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 5 - - -/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ -#ifdef c_plusplus -#ifndef __cplusplus -#define __cplusplus -#endif -#endif - -#include "ace/ETCL/ETCL_Constraint.h" - -#ifdef __cplusplus - -#include "ace/OS_NS_unistd.h" -#include "ace/OS_NS_stdio.h" - -/* Use prototypes in function declarations. */ -#define YY_USE_PROTOS - -/* The "const" storage-class-modifier is valid. */ -#define YY_USE_CONST - -#else /* ! __cplusplus */ - -#if __STDC__ - -#define YY_USE_PROTOS -#define YY_USE_CONST - -#endif /* __STDC__ */ -#endif /* ! __cplusplus */ - -#ifdef __TURBOC__ - #pragma warn -rch - #pragma warn -use -#include -#include -#define YY_USE_CONST -#define YY_USE_PROTOS -#endif - -#ifdef YY_USE_CONST -#define yyconst const -#else -#define yyconst -#endif - - -#ifdef YY_USE_PROTOS -#define YY_PROTO(proto) proto -#else -#define YY_PROTO(proto) () -#endif - -/* Returned upon end-of-file. */ -#define YY_NULL 0 - -/* 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) - -/* 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 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 ((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 yyrestart( yyin ) - -#define YY_END_OF_BUFFER_CHAR 0 - -/* Size of default input buffer. */ -#define YY_BUF_SIZE 16384 - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -typedef struct yy_buffer_state *YY_BUFFER_STATE; - -extern int yyleng; -extern FILE *yyin, *yyout; - -#define EOB_ACT_CONTINUE_SCAN 0 -#define EOB_ACT_END_OF_FILE 1 -#define EOB_ACT_LAST_MATCH 2 - -/* The funky do-while in the following #define is used to turn the definition - * int a single C statement (which needs a semi-colon terminator). This - * avoids problems with code like: - * - * if ( condition_holds ) - * yyless( 5 ); - * else - * do_something_else(); - * - * Prior to using the do-while the compiler would get upset at the - * "else" because it interpreted the "if" statement as being all - * done when it reached the ';' after the yyless() call. - */ - -/* Return all but the first 'n' matched characters back to the input stream. */ - -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - *yy_cp = yy_hold_char; \ - YY_RESTORE_YY_MORE_OFFSET \ - yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up yytext again */ \ - } \ - while ( 0 ) - -#define unput(c) yyunput( c, yytext_ptr ) - -/* The following is because we cannot portably get our hands on size_t - * (without autoconf's help, which isn't available because we want - * flex-generated scanners to compile on their own). - */ -typedef unsigned int yy_size_t; - - -struct yy_buffer_state -{ - FILE *yy_input_file; - - 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. - */ - int 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; - - /* 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 yyrestart()), so that the user can continue scanning by - * just pointing yyin at a new input file. - */ -#define YY_BUFFER_EOF_PENDING 2 -}; - -static YY_BUFFER_STATE yy_current_buffer = 0; - -/* 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". - */ -#define YY_CURRENT_BUFFER yy_current_buffer - - -/* yy_hold_char holds the character lost when yytext is formed. */ -static char yy_hold_char; - -static int yy_n_chars; /* number of characters read into yy_ch_buf */ - - -int yyleng; - -/* Points to current character in buffer. */ -static char *yy_c_buf_p = (char *) 0; -static int yy_init = 1; /* whether we need to initialize */ -static int yy_start = 0; /* start state number */ - -/* Flag which is used to allow yywrap()'s to do buffer switches - * instead of setting up a fresh yyin. A bit of a hack ... - */ -static int yy_did_buffer_switch_on_eof; - -void yyrestart YY_PROTO(( FILE *input_file )); - -void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); -void yy_load_buffer_state YY_PROTO(( void )); -YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); -void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); -void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); -void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); -#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) - -YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); -YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str )); -YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); - -static void *yy_flex_alloc YY_PROTO(( yy_size_t )); -static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); -static void yy_flex_free YY_PROTO(( void * )); - -#define yy_new_buffer yy_create_buffer - -#define yy_set_interactive(is_interactive) \ - { \ - if ( ! yy_current_buffer ) \ - yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ - yy_current_buffer->yy_is_interactive = is_interactive; \ - } - -#define yy_set_bol(at_bol) \ - { \ - if ( ! yy_current_buffer ) \ - yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ - yy_current_buffer->yy_at_bol = at_bol; \ - } - -#define YY_AT_BOL() (yy_current_buffer->yy_at_bol) - - -typedef unsigned char YY_CHAR; -FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; -typedef int yy_state_type; -extern char *yytext; -#define yytext_ptr yytext - -static yy_state_type yy_get_previous_state YY_PROTO(( void )); -static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); -static int yy_get_next_buffer YY_PROTO(( void )); -static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); - -/* Done after the current pattern has been matched and before the - * corresponding action - sets up yytext. - */ -#define YY_DO_BEFORE_ACTION \ - yytext_ptr = yy_bp; \ - yyleng = (int) (yy_cp - yy_bp); \ - yy_hold_char = *yy_cp; \ - *yy_cp = '\0'; \ - yy_c_buf_p = yy_cp; - -#define YY_NUM_RULES 41 -#define YY_END_OF_BUFFER 42 -static yyconst short int yy_accept[118] = - { 0, - 0, 0, 42, 40, 39, 41, 40, 24, 40, 22, - 23, 14, 12, 13, 25, 15, 35, 16, 40, 18, - 38, 38, 38, 31, 40, 32, 40, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 11, 21, 0, - 37, 0, 36, 0, 35, 17, 20, 19, 38, 38, - 38, 38, 27, 0, 0, 0, 38, 38, 38, 38, - 10, 38, 38, 38, 9, 38, 38, 0, 0, 38, - 38, 38, 0, 0, 0, 8, 38, 38, 38, 2, - 1, 7, 38, 38, 0, 36, 38, 33, 0, 0, - 0, 38, 38, 38, 38, 5, 34, 0, 0, 0, - - 38, 6, 3, 38, 0, 0, 0, 38, 4, 30, - 0, 0, 26, 0, 28, 29, 0 - } ; - -static yyconst int 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, 1, 1, 5, 1, 1, 6, 7, - 8, 9, 10, 1, 11, 12, 13, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 1, 1, 15, - 16, 17, 1, 1, 18, 19, 19, 19, 20, 21, - 19, 19, 19, 19, 19, 22, 19, 19, 19, 19, - 19, 23, 24, 25, 26, 19, 19, 19, 19, 19, - 27, 28, 29, 1, 30, 1, 31, 19, 19, 32, - - 33, 34, 35, 36, 37, 19, 19, 38, 39, 40, - 41, 42, 19, 43, 44, 45, 46, 19, 47, 48, - 49, 19, 1, 1, 1, 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 int yy_meta[51] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 2, 1, 1, 1, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 1, 1, 1, 2, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 1 - } ; - -static yyconst short int yy_base[122] = - { 0, - 0, 0, 146, 147, 147, 147, 129, 147, 45, 147, - 147, 147, 147, 147, 130, 147, 40, 127, 126, 125, - 0, 122, 116, 147, 0, 147, 21, 98, 104, 88, - 98, 94, 24, 92, 89, 100, 93, 147, 147, 50, - 147, 51, 48, 115, 46, 147, 147, 147, 0, 106, - 101, 0, 147, 93, 92, 75, 91, 88, 84, 77, - 0, 71, 78, 72, 0, 76, 70, 57, 60, 90, - 93, 0, 72, 69, 68, 0, 78, 64, 63, 0, - 0, 0, 74, 69, 90, 89, 82, 0, 66, 59, - 66, 52, 52, 51, 54, 0, 0, 49, 49, 54, - - 45, 0, 0, 43, 44, 47, 39, 30, 0, 147, - 35, 37, 0, 35, 147, 147, 147, 85, 87, 62, - 89 - } ; - -static yyconst short int yy_def[122] = - { 0, - 117, 1, 117, 117, 117, 117, 117, 117, 118, 117, - 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, - 119, 119, 119, 117, 120, 117, 117, 119, 119, 119, - 119, 119, 119, 119, 119, 119, 119, 117, 117, 118, - 117, 117, 117, 117, 117, 117, 117, 117, 119, 119, - 119, 121, 117, 117, 117, 117, 119, 119, 119, 119, - 119, 119, 119, 119, 119, 119, 119, 118, 117, 119, - 119, 121, 117, 117, 117, 119, 119, 119, 119, 119, - 119, 119, 119, 119, 117, 117, 119, 119, 117, 117, - 117, 119, 119, 119, 119, 119, 119, 117, 117, 117, - - 119, 119, 119, 119, 117, 117, 117, 119, 119, 117, - 117, 117, 119, 117, 117, 117, 0, 117, 117, 117, - 117 - } ; - -static yyconst short int yy_nxt[198] = - { 0, - 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, - 14, 15, 16, 17, 18, 19, 20, 21, 21, 21, - 22, 21, 21, 21, 23, 21, 24, 25, 26, 27, - 28, 29, 30, 31, 21, 21, 32, 21, 33, 34, - 35, 21, 36, 21, 21, 21, 37, 21, 21, 38, - 41, 44, 53, 45, 62, 41, 68, 44, 54, 45, - 63, 43, 41, 55, 52, 56, 116, 69, 115, 85, - 85, 114, 42, 86, 113, 112, 111, 42, 68, 110, - 69, 109, 108, 107, 42, 40, 40, 40, 49, 49, - 72, 72, 106, 105, 104, 103, 102, 101, 100, 99, - - 98, 97, 86, 86, 96, 95, 94, 93, 92, 91, - 90, 89, 88, 87, 84, 83, 82, 81, 80, 79, - 78, 77, 76, 75, 74, 73, 71, 70, 43, 67, - 66, 65, 64, 61, 60, 59, 58, 57, 51, 50, - 48, 47, 46, 43, 39, 117, 3, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117 - - } ; - -static yyconst short int yy_chk[198] = - { 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, - 9, 17, 27, 17, 33, 40, 42, 45, 27, 45, - 33, 43, 68, 27, 120, 27, 114, 43, 112, 69, - 69, 111, 9, 69, 108, 107, 106, 40, 42, 105, - 43, 104, 101, 100, 68, 118, 118, 118, 119, 119, - 121, 121, 99, 98, 95, 94, 93, 92, 91, 90, - - 89, 87, 86, 85, 84, 83, 79, 78, 77, 75, - 74, 73, 71, 70, 67, 66, 64, 63, 62, 60, - 59, 58, 57, 56, 55, 54, 51, 50, 44, 37, - 36, 35, 34, 32, 31, 30, 29, 28, 23, 22, - 20, 19, 18, 15, 7, 3, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117 - - } ; - -static yy_state_type yy_last_accepting_state; -static char *yy_last_accepting_cpos; - -/* 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 -char *yytext; -#define INITIAL 0 - -ACE_END_VERSIONED_NAMESPACE_DECL - -//============================================================================= -/** - * @file ETCL_l.cpp - * - * @author Carlos O'Ryan based on previous work by Seth Widoff - */ -//============================================================================= - - -#include "ace/ETCL/ETCL_Interpreter.h" -#include "ace/ETCL/ETCL_y.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -static const char* extract_string(char*); -//static const char * extract_string(char*); - -#define YY_LEX_DEBUG - -#ifdef CONSTRAINT_DEBUG -#define YY_LEX_DEBUG ACE_OS::fprintf(stderr, "%s\n", yytext) -#endif /* CONSTRAINT_DEBUG */ - -//#define YY_DECL int ETCL_yylex (ETCL_YYSTYPE *lvalp, void* state) - -#define YY_BREAK -#define YY_NO_UNPUT -#define YY_NO_INPUT - -/* Macros after this point can all be overridden by user definitions in - * section 1. - */ - -#ifndef YY_SKIP_YYWRAP -#ifdef __cplusplus -extern "C" int yywrap YY_PROTO(( void )); -#else -extern int yywrap YY_PROTO(( void )); -#endif -#endif - -#ifndef yytext_ptr -static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen YY_PROTO(( yyconst char * )); -#endif - -#ifndef YY_NO_INPUT -#ifdef __cplusplus -static int yyinput YY_PROTO(( void )); -#else -static int input YY_PROTO(( void )); -#endif -#endif - -#if YY_STACK_USED -static int yy_start_stack_ptr = 0; -static int yy_start_stack_depth = 0; -static int *yy_start_stack = 0; -#ifndef YY_NO_PUSH_STATE -static void yy_push_state YY_PROTO(( int new_state )); -#endif -#ifndef YY_NO_POP_STATE -static void yy_pop_state YY_PROTO(( void )); -#endif -#ifndef YY_NO_TOP_STATE -static int yy_top_state YY_PROTO(( void )); -#endif - -#else -#define YY_NO_PUSH_STATE 1 -#define YY_NO_POP_STATE 1 -#define YY_NO_TOP_STATE 1 -#endif - -ACE_END_VERSIONED_NAMESPACE_DECL - -#ifdef YY_MALLOC_DECL -YY_MALLOC_DECL -#else -#if __STDC__ -#ifndef __cplusplus -#include -#endif -#else -/* Just try to get by without declaring the routines. This will fail - * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) - * or sizeof(void*) != sizeof(int). - */ -#endif -#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. */ - -//FUZZ: disable check_for_lack_ACE_OS -#ifndef ETCL_ECHO -/* This used to be an fputs(), but since the string might contain NUL's, - * we now use fwrite(). - */ -#define ETCL_ECHO { size_t __dum_ret = fwrite( yytext, yyleng, 1, yyout ); (void) __dum_ret; } -#endif - //FUZZ: enable check_for_lack_ACE_OS - -/* 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) \ - if ( yy_current_buffer->yy_is_interactive ) \ - { \ - int c = '*', n; \ - for ( n = 0; n < max_size && \ - (c = ACE_OS::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 if ( ((result = ACE_OS::fread( buf, 1, max_size, yyin )) == 0) \ - && ferror( yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); -#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 -#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) -#endif - -/* Default declaration of generated scanner - a define so the user can - * easily add parameters. - */ -#ifndef YY_DECL -#define YY_DECL int yylex YY_PROTO(( void )) -#endif - -/* 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 - -#define YY_RULE_SETUP \ - YY_USER_ACTION - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -YY_DECL - { - register yy_state_type yy_current_state; - register char *yy_cp = 0; - register char *yy_bp = 0; - register int yy_act; - -//#line 50 "ETCL/ETCL.ll" - - if ( yy_init ) - { - yy_init = 0; - -#ifdef YY_USER_INIT - YY_USER_INIT; -#endif - - if ( ! yy_start ) - yy_start = 1; /* first start state */ - - if ( ! yyin ) - yyin = stdin; - - if ( ! yyout ) - yyout = stdout; - - if ( ! yy_current_buffer ) - yy_current_buffer = - yy_create_buffer( yyin, YY_BUF_SIZE ); - - yy_load_buffer_state(); - } - - while ( 1 ) /* loops until end-of-file is reached */ - { - yy_cp = yy_c_buf_p; - - /* Support of yytext. */ - *yy_cp = yy_hold_char; - - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; - - yy_current_state = yy_start; -yy_match: - do - { - register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; - if ( yy_accept[yy_current_state] ) - { - yy_last_accepting_state = yy_current_state; - 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 >= 118 ) - 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_base[yy_current_state] != 147 ); - -yy_find_action: - yy_act = yy_accept[yy_current_state]; - if ( yy_act == 0 ) - { /* have to back up */ - yy_cp = yy_last_accepting_cpos; - yy_current_state = yy_last_accepting_state; - yy_act = yy_accept[yy_current_state]; - } - - YY_DO_BEFORE_ACTION; - - -do_action: /* This label is used only to access EOF actions. */ - - - switch ( yy_act ) - { /* beginning of action switch */ - case 0: /* must back up */ - /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = yy_hold_char; - yy_cp = yy_last_accepting_cpos; - yy_current_state = yy_last_accepting_state; - goto yy_find_action; - -case 1: -YY_RULE_SETUP -//#line 52 "ETCL/ETCL.ll" -{ YY_LEX_DEBUG; return ETCL_MIN; } - YY_BREAK -case 2: -YY_RULE_SETUP -//#line 53 "ETCL/ETCL.ll" -{ YY_LEX_DEBUG; return ETCL_MAX; } - YY_BREAK -case 3: -YY_RULE_SETUP -//#line 54 "ETCL/ETCL.ll" -{ YY_LEX_DEBUG; return ETCL_FIRST; } - YY_BREAK -case 4: -YY_RULE_SETUP -//#line 55 "ETCL/ETCL.ll" -{ YY_LEX_DEBUG; return ETCL_RANDOM; } - YY_BREAK -case 5: -YY_RULE_SETUP -//#line 56 "ETCL/ETCL.ll" -{ YY_LEX_DEBUG; return ETCL_WITH; } - YY_BREAK -case 6: -YY_RULE_SETUP -//#line 57 "ETCL/ETCL.ll" -{ YY_LEX_DEBUG; return ETCL_EXIST; } - YY_BREAK -case 7: -YY_RULE_SETUP -//#line 58 "ETCL/ETCL.ll" -{ YY_LEX_DEBUG; return ETCL_NOT; } - YY_BREAK -case 8: -YY_RULE_SETUP -//#line 59 "ETCL/ETCL.ll" -{ YY_LEX_DEBUG; return ETCL_AND; } - YY_BREAK -case 9: -YY_RULE_SETUP -//#line 60 "ETCL/ETCL.ll" -{ YY_LEX_DEBUG; return ETCL_OR; } - YY_BREAK -case 10: -YY_RULE_SETUP -//#line 61 "ETCL/ETCL.ll" -{ YY_LEX_DEBUG; return ETCL_IN; } - YY_BREAK -case 11: -YY_RULE_SETUP -//#line 62 "ETCL/ETCL.ll" -{ YY_LEX_DEBUG; return ETCL_TWIDDLE; } - YY_BREAK -case 12: -YY_RULE_SETUP -//#line 63 "ETCL/ETCL.ll" -{ YY_LEX_DEBUG; return ETCL_PLUS; } - YY_BREAK -case 13: -YY_RULE_SETUP -//#line 64 "ETCL/ETCL.ll" -{ YY_LEX_DEBUG; return ETCL_MINUS; } - YY_BREAK -case 14: -YY_RULE_SETUP -//#line 65 "ETCL/ETCL.ll" -{ YY_LEX_DEBUG; return ETCL_MULT; } - YY_BREAK -case 15: -YY_RULE_SETUP -//#line 66 "ETCL/ETCL.ll" -{ YY_LEX_DEBUG; return ETCL_DIV; } - YY_BREAK -case 16: -YY_RULE_SETUP -//#line 67 "ETCL/ETCL.ll" -{ YY_LEX_DEBUG; return ETCL_LT; } - YY_BREAK -case 17: -YY_RULE_SETUP -//#line 68 "ETCL/ETCL.ll" -{ YY_LEX_DEBUG; return ETCL_LE; } - YY_BREAK -case 18: -YY_RULE_SETUP -//#line 69 "ETCL/ETCL.ll" -{ YY_LEX_DEBUG; return ETCL_GT; } - YY_BREAK -case 19: -YY_RULE_SETUP -//#line 70 "ETCL/ETCL.ll" -{ YY_LEX_DEBUG; return ETCL_GE; } - YY_BREAK -case 20: -YY_RULE_SETUP -//#line 71 "ETCL/ETCL.ll" -{ YY_LEX_DEBUG; return ETCL_EQ; } - YY_BREAK -case 21: -YY_RULE_SETUP -//#line 72 "ETCL/ETCL.ll" -{ YY_LEX_DEBUG; return ETCL_NE; } - YY_BREAK -case 22: -YY_RULE_SETUP -//#line 73 "ETCL/ETCL.ll" -{ YY_LEX_DEBUG; return ETCL_LPAREN; } - YY_BREAK -case 23: -YY_RULE_SETUP -//#line 74 "ETCL/ETCL.ll" -{ YY_LEX_DEBUG; return ETCL_RPAREN; } - YY_BREAK -case 24: -YY_RULE_SETUP -//#line 75 "ETCL/ETCL.ll" -{ YY_LEX_DEBUG; return ETCL_DOLLAR; } - YY_BREAK -case 25: -YY_RULE_SETUP -//#line 76 "ETCL/ETCL.ll" -{ YY_LEX_DEBUG; return ETCL_DOT; } - YY_BREAK -case 26: -YY_RULE_SETUP -//#line 77 "ETCL/ETCL.ll" -{ YY_LEX_DEBUG; return ETCL_DEFAULT; } - YY_BREAK -case 27: -YY_RULE_SETUP -//#line 78 "ETCL/ETCL.ll" -{ YY_LEX_DEBUG; return ETCL_DISCRIMINANT; } - YY_BREAK -case 28: -YY_RULE_SETUP -//#line 79 "ETCL/ETCL.ll" -{ YY_LEX_DEBUG; return ETCL_TYPE_ID; } - YY_BREAK -case 29: -YY_RULE_SETUP -//#line 80 "ETCL/ETCL.ll" -{ YY_LEX_DEBUG; return ETCL_REPOS_ID; } - YY_BREAK -case 30: -YY_RULE_SETUP -//#line 81 "ETCL/ETCL.ll" -{ YY_LEX_DEBUG; return ETCL_LENGTH; } - YY_BREAK -case 31: -YY_RULE_SETUP -//#line 82 "ETCL/ETCL.ll" -{ YY_LEX_DEBUG; return ETCL_LBRA; } - YY_BREAK -case 32: -YY_RULE_SETUP -//#line 83 "ETCL/ETCL.ll" -{ YY_LEX_DEBUG; return ETCL_RBRA; } - YY_BREAK -case 33: -YY_RULE_SETUP -//#line 84 "ETCL/ETCL.ll" -{ - yylval.constraint = - new ETCL_Literal_Constraint ((ACE_CDR::Boolean) 1); - YY_LEX_DEBUG; return ETCL_BOOLEAN; - } - YY_BREAK -case 34: -YY_RULE_SETUP -//#line 89 "ETCL/ETCL.ll" -{ - yylval.constraint = - new ETCL_Literal_Constraint ((ACE_CDR::Boolean) 0); - YY_LEX_DEBUG; return ETCL_BOOLEAN; - } - YY_BREAK -case 35: -YY_RULE_SETUP -//#line 94 "ETCL/ETCL.ll" -{ - yylval.constraint = - new ETCL_Literal_Constraint (ACE_OS::atoi (yytext)); - YY_LEX_DEBUG; return ETCL_INTEGER; - } - YY_BREAK -case 36: -YY_RULE_SETUP -//#line 99 "ETCL/ETCL.ll" -{ - double v; - sscanf (yytext, "%lf", &v); - yylval.constraint = - new ETCL_Literal_Constraint (v); - YY_LEX_DEBUG; return ETCL_FLOAT; - } - YY_BREAK -case 37: -YY_RULE_SETUP -//#line 106 "ETCL/ETCL.ll" -{ - yylval.constraint = - new ETCL_Literal_Constraint (extract_string(yytext)); - YY_LEX_DEBUG; return ETCL_STRING; - } - YY_BREAK -case 38: -YY_RULE_SETUP -//#line 111 "ETCL/ETCL.ll" -{ - yylval.constraint = - new ETCL_Identifier (yytext); - YY_LEX_DEBUG; return ETCL_IDENT; - } - YY_BREAK -case 39: -YY_RULE_SETUP -//#line 116 "ETCL/ETCL.ll" -{ - YY_LEX_DEBUG; break; // Ignore - } - YY_BREAK -case 40: -YY_RULE_SETUP -//#line 119 "ETCL/ETCL.ll" -{ - YY_LEX_DEBUG; break; // @@ TODO - } - YY_BREAK -case 41: -YY_RULE_SETUP -//#line 122 "ETCL/ETCL.ll" -ETCL_ECHO; - YY_BREAK -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 - yytext_ptr) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = yy_hold_char; - YY_RESTORE_YY_MORE_OFFSET - - if ( yy_current_buffer->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 - * yylex(). 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. - */ - yy_n_chars = yy_current_buffer->yy_n_chars; - yy_current_buffer->yy_input_file = yyin; - yy_current_buffer->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 ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) - { /* This was really a NUL. */ - yy_state_type yy_next_state; - - yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state(); - - /* 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 ); - - yy_bp = yytext_ptr + YY_MORE_ADJ; - - if ( yy_next_state ) - { - /* Consume the NUL. */ - yy_cp = ++yy_c_buf_p; - yy_current_state = yy_next_state; - goto yy_match; - } - - else - { - yy_cp = yy_c_buf_p; - goto yy_find_action; - } - } - - else switch ( yy_get_next_buffer() ) - { - case EOB_ACT_END_OF_FILE: - { - yy_did_buffer_switch_on_eof = 0; - - if ( yywrap() ) - { - /* 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. - */ - yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else - { - if ( ! yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - yy_c_buf_p = - yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state(); - - yy_cp = yy_c_buf_p; - yy_bp = yytext_ptr + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - yy_c_buf_p = - &yy_current_buffer->yy_ch_buf[yy_n_chars]; - - yy_current_state = yy_get_previous_state(); - - yy_cp = yy_c_buf_p; - yy_bp = 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 yylex */ - - -/* 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 - */ - -static int yy_get_next_buffer() - { - register char *dest = yy_current_buffer->yy_ch_buf; - register char *source = yytext_ptr; - register int number_to_move, i; - int ret_val; - - if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) - YY_FATAL_ERROR( - "fatal flex scanner internal error--end of buffer missed" ); - - if ( yy_current_buffer->yy_fill_buffer == 0 ) - { /* Don't try to fill the buffer, so this is an EOF. */ - if ( yy_c_buf_p - 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) (yy_c_buf_p - yytext_ptr) - 1; - - for ( i = 0; i < number_to_move; ++i ) - *(dest++) = *(source++); - - if ( yy_current_buffer->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->yy_n_chars = yy_n_chars = 0; - - else - { - int num_to_read = - yy_current_buffer->yy_buf_size - number_to_move - 1; - - while ( num_to_read <= 0 ) - { /* Not enough room in the buffer - grow it. */ -#ifdef YY_USES_REJECT - YY_FATAL_ERROR( -"input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); -#else - - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = yy_current_buffer; - - int yy_c_buf_p_offset = - (int) (yy_c_buf_p - b->yy_ch_buf); - - if ( b->yy_is_our_buffer ) - { - int 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. */ - yy_flex_realloc( (void *) b->yy_ch_buf, - b->yy_buf_size + 2 ); - } - 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" ); - - yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; - - num_to_read = yy_current_buffer->yy_buf_size - - number_to_move - 1; -#endif - } - - if ( num_to_read > YY_READ_BUF_SIZE ) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), - yy_n_chars, num_to_read ); - - yy_current_buffer->yy_n_chars = yy_n_chars; - } - - if ( yy_n_chars == 0 ) - { - if ( number_to_move == YY_MORE_ADJ ) - { - ret_val = EOB_ACT_END_OF_FILE; - yyrestart( yyin ); - } - - else - { - ret_val = EOB_ACT_LAST_MATCH; - yy_current_buffer->yy_buffer_status = - YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - yy_n_chars += number_to_move; - yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; - yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; - - yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; - - return ret_val; - } - - -/* yy_get_previous_state - get the state just before the EOB char was reached */ - -static yy_state_type yy_get_previous_state() - { - register yy_state_type yy_current_state; - register char *yy_cp; - - yy_current_state = yy_start; - - for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) - { - register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); - if ( yy_accept[yy_current_state] ) - { - yy_last_accepting_state = yy_current_state; - 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 >= 118 ) - 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 ); - */ - -#ifdef YY_USE_PROTOS -static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) -#else -static yy_state_type yy_try_NUL_trans( yy_current_state ) -yy_state_type yy_current_state; -#endif - { - register int yy_is_jam; - register char *yy_cp = yy_c_buf_p; - - register YY_CHAR yy_c = 1; - if ( yy_accept[yy_current_state] ) - { - yy_last_accepting_state = yy_current_state; - 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 >= 118 ) - 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 == 117); - - return yy_is_jam ? 0 : yy_current_state; - } - -#ifndef YY_NO_UNPUT -#ifdef YY_USE_PROTOS -static void yyunput( int c, register char *yy_bp ) -#else -static void yyunput( c, yy_bp ) -int c; -register char *yy_bp; -#endif - { - register char *yy_cp = yy_c_buf_p; - - /* undo effects of setting up yytext */ - *yy_cp = yy_hold_char; - - if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) - { /* need to shift things up to make room */ - /* +2 for EOB chars. */ - register int number_to_move = yy_n_chars + 2; - register char *dest = &yy_current_buffer->yy_ch_buf[ - yy_current_buffer->yy_buf_size + 2]; - register char *source = - &yy_current_buffer->yy_ch_buf[number_to_move]; - - while ( source > yy_current_buffer->yy_ch_buf ) - *--dest = *--source; - - yy_cp += (int) (dest - source); - yy_bp += (int) (dest - source); - yy_current_buffer->yy_n_chars = - yy_n_chars = yy_current_buffer->yy_buf_size; - - if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) - YY_FATAL_ERROR( "flex scanner push-back overflow" ); - } - - *--yy_cp = (char) c; - - - yytext_ptr = yy_bp; - yy_hold_char = *yy_cp; - yy_c_buf_p = yy_cp; - } -#endif /* ifndef YY_NO_UNPUT */ - -#ifndef YY_NO_INPUT -#ifdef __cplusplus -static int yyinput() -#else -static int input() -#endif - { - int c; - - *yy_c_buf_p = yy_hold_char; - - if ( *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 ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) - /* This was really a NUL. */ - *yy_c_buf_p = '\0'; - - else - { /* need more input */ - int offset = yy_c_buf_p - yytext_ptr; - ++yy_c_buf_p; - - switch ( yy_get_next_buffer() ) - { - 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. */ - yyrestart( yyin ); - - /* fall through */ - - case EOB_ACT_END_OF_FILE: - { - if ( yywrap() ) - return EOF; - - if ( ! yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; -#ifdef __cplusplus - return yyinput(); -#else - return input(); -#endif - } - - case EOB_ACT_CONTINUE_SCAN: - yy_c_buf_p = yytext_ptr + offset; - break; - } - } - } - - c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ - *yy_c_buf_p = '\0'; /* preserve yytext */ - yy_hold_char = *++yy_c_buf_p; - - - return c; - } -#endif /* YY_NO_INPUT */ - -void yyflush_current_buffer (void) -{ - YY_FLUSH_BUFFER; -} - - -#ifdef YY_USE_PROTOS -void yyrestart( FILE *input_file ) -#else -void yyrestart( input_file ) -FILE *input_file; -#endif - { - if ( ! yy_current_buffer ) - yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); - - yy_init_buffer( yy_current_buffer, input_file ); - yy_load_buffer_state(); - } - - -#ifdef YY_USE_PROTOS -void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) -#else -void yy_switch_to_buffer( new_buffer ) -YY_BUFFER_STATE new_buffer; -#endif - { - if ( yy_current_buffer == new_buffer ) - return; - - if ( yy_current_buffer ) - { - /* Flush out information for old buffer. */ - *yy_c_buf_p = yy_hold_char; - yy_current_buffer->yy_buf_pos = yy_c_buf_p; - yy_current_buffer->yy_n_chars = yy_n_chars; - } - - yy_current_buffer = new_buffer; - yy_load_buffer_state(); - - /* We don't actually know whether we did this switch during - * EOF (yywrap()) processing, but the only time this flag - * is looked at is after yywrap() is called, so it's safe - * to go ahead and always set it. - */ - yy_did_buffer_switch_on_eof = 1; - } - - -#ifdef YY_USE_PROTOS -void yy_load_buffer_state( void ) -#else -void yy_load_buffer_state() -#endif - { - yy_n_chars = yy_current_buffer->yy_n_chars; - yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; - yyin = yy_current_buffer->yy_input_file; - yy_hold_char = *yy_c_buf_p; - } - - -#ifdef YY_USE_PROTOS -YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) -#else -YY_BUFFER_STATE yy_create_buffer( file, size ) -FILE *file; -int size; -#endif - { - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_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 *) yy_flex_alloc( b->yy_buf_size + 2 ); - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - - b->yy_is_our_buffer = 1; - - yy_init_buffer( b, file ); - - return b; - } - - -#ifdef YY_USE_PROTOS -void yy_delete_buffer( YY_BUFFER_STATE b ) -#else -void yy_delete_buffer( b ) -YY_BUFFER_STATE b; -#endif - { - if ( ! b ) - return; - - if ( b == yy_current_buffer ) - yy_current_buffer = (YY_BUFFER_STATE) 0; - - if ( b->yy_is_our_buffer ) - yy_flex_free( (void *) b->yy_ch_buf ); - - yy_flex_free( (void *) b ); - } - - - -#ifdef YY_USE_PROTOS -void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) -#else -void yy_init_buffer( b, file ) -YY_BUFFER_STATE b; -FILE *file; -#endif - - - { - yy_flush_buffer( b ); - - b->yy_input_file = file; - b->yy_fill_buffer = 1; - -#if defined (ACE_HAS_WINCE) - // Mimic the behavior as WinCE does not have isatty(). - if ((file != 0) && (file == ACE_OS::fileno(file))) { - b->yy_is_interactive = 1; - } - else { - b->yy_is_interactive = 0; - } -#else - b->yy_is_interactive = file ? (ACE_OS::isatty( ACE_OS::fileno(file) ) > 0) : 0; -#endif // ACE_HAS_WINCE - - } - - -#ifdef YY_USE_PROTOS -void yy_flush_buffer( YY_BUFFER_STATE b ) -#else -void yy_flush_buffer( b ) -YY_BUFFER_STATE b; -#endif - - { - 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 ) - yy_load_buffer_state(); - } - - -#ifndef YY_NO_SCAN_BUFFER -#ifdef YY_USE_PROTOS -YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) -#else -YY_BUFFER_STATE yy_scan_buffer( base, size ) -char *base; -yy_size_t size; -#endif - { - 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) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_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; - - yy_switch_to_buffer( b ); - - return b; - } -#endif - - -#ifndef YY_NO_SCAN_STRING -#ifdef YY_USE_PROTOS -YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str ) -#else -YY_BUFFER_STATE yy_scan_string( yy_str ) -yyconst char *yy_str; -#endif - { - int len; - for ( len = 0; yy_str[len]; ++len ) - ; - - return yy_scan_bytes( yy_str, len ); - } -#endif - - -#ifndef YY_NO_SCAN_BYTES -#ifdef YY_USE_PROTOS -YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) -#else -YY_BUFFER_STATE yy_scan_bytes( bytes, len ) -yyconst char *bytes; -int len; -#endif - { - YY_BUFFER_STATE b; - char *buf; - yy_size_t n; - int i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = len + 2; - buf = (char *) yy_flex_alloc( n ); - if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); - - for ( i = 0; i < len; ++i ) - buf[i] = bytes[i]; - - buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; - - b = yy_scan_buffer( buf, n ); - if ( ! b ) - YY_FATAL_ERROR( "bad buffer in yy_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_NO_PUSH_STATE -#ifdef YY_USE_PROTOS -static void yy_push_state( int new_state ) -#else -static void yy_push_state( new_state ) -int new_state; -#endif - { - if ( yy_start_stack_ptr >= yy_start_stack_depth ) - { - yy_size_t new_size; - - yy_start_stack_depth += YY_START_STACK_INCR; - new_size = yy_start_stack_depth * sizeof( int ); - - if ( ! yy_start_stack ) - yy_start_stack = (int *) yy_flex_alloc( new_size ); - - else - yy_start_stack = (int *) yy_flex_realloc( - (void *) yy_start_stack, new_size ); - - if ( ! yy_start_stack ) - YY_FATAL_ERROR( - "out of memory expanding start-condition stack" ); - } - - yy_start_stack[yy_start_stack_ptr++] = YY_START; - - BEGIN(new_state); - } -#endif - - -#ifndef YY_NO_POP_STATE -static void yy_pop_state() - { - if ( --yy_start_stack_ptr < 0 ) - YY_FATAL_ERROR( "start-condition stack underflow" ); - - BEGIN(yy_start_stack[yy_start_stack_ptr]); - } -#endif - - -#ifndef YY_NO_TOP_STATE -static int yy_top_state() - { - return yy_start_stack[yy_start_stack_ptr - 1]; - } -#endif - -#ifndef YY_EXIT_FAILURE -#define YY_EXIT_FAILURE 2 -#endif - -#ifdef YY_USE_PROTOS -static void yy_fatal_error( yyconst char msg[] ) -#else -static void yy_fatal_error( msg ) -char msg[]; -#endif - { - (void) ACE_OS::fprintf( stderr, "%s\n", msg ); - ACE_OS::exit( YY_EXIT_FAILURE ); - } - - - -/* Redefine yyless() so it works in section 3 code. */ - -#undef yyless -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - yytext[yyleng] = yy_hold_char; \ - yy_c_buf_p = yytext + n; \ - yy_hold_char = *yy_c_buf_p; \ - *yy_c_buf_p = '\0'; \ - yyleng = n; \ - } \ - while ( 0 ) - - -/* Internal utility routines. */ - -#ifndef yytext_ptr -#ifdef YY_USE_PROTOS -static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) -#else -static void yy_flex_strncpy( s1, s2, n ) -char *s1; -yyconst char *s2; -int n; -#endif - { - register int i; - for ( i = 0; i < n; ++i ) - s1[i] = s2[i]; - } -#endif - -#ifdef YY_NEED_STRLEN -#ifdef YY_USE_PROTOS -static int yy_flex_strlen( yyconst char *s ) -#else -static int yy_flex_strlen( s ) -yyconst char *s; -#endif - { - register int n; - for ( n = 0; s[n]; ++n ) - ; - - return n; - } -#endif - - -#ifdef YY_USE_PROTOS -static void *yy_flex_alloc( yy_size_t size ) -#else -static void *yy_flex_alloc( size ) -yy_size_t size; -#endif - { - return (void *) ACE_OS::malloc( size ); - } - -#ifdef YY_USE_PROTOS -static void *yy_flex_realloc( void *ptr, yy_size_t size ) -#else -static void *yy_flex_realloc( ptr, size ) -void *ptr; -yy_size_t size; -#endif - { - /* 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 *) ACE_OS::realloc( (char *) ptr, size ); - } - -#ifdef YY_USE_PROTOS -static void yy_flex_free( void *ptr ) -#else -static void yy_flex_free( ptr ) -void *ptr; -#endif - { - ACE_OS::free( ptr ); - } - -#if YY_MAIN -int main() - { - yylex(); - return 0; - } -#endif -//#line 122 "ETCL/ETCL.ll" - - -const char* -extract_string(char* str) -{ - char *t = str; - for (char * i = str + 1; *i != '\''; ++i, ++t) - { - if (*i == '\\') - { - ++i; - if (*i == 0) - return 0; - else if (*i == 't') - *t = '\t'; - else if (*i == 'n') - *t = '\n'; - else if (*i == '\\') - *t = '\\'; - else - *t = *i; - continue; - } - - *t = *i; - } - - *t = '\0'; - return str; -} - -int -yywrap (void) -{ - return 1; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/ETCL/ETCL_y.cpp b/modules/worldengine/deps/acelite/ace/ETCL/ETCL_y.cpp deleted file mode 100644 index 9fe453f62f..0000000000 --- a/modules/worldengine/deps/acelite/ace/ETCL/ETCL_y.cpp +++ /dev/null @@ -1,1286 +0,0 @@ - -/* A Bison parser, made from ETCL/ETCL.yy - by GNU Bison version 1.28 */ - -#define YYBISON 1 /* Identify Bison output. */ - -#define ETCL_GT 257 -#define ETCL_GE 258 -#define ETCL_LT 259 -#define ETCL_LE 260 -#define ETCL_EQ 261 -#define ETCL_NE 262 -#define ETCL_EXIST 263 -#define ETCL_DEFAULT 264 -#define ETCL_AND 265 -#define ETCL_OR 266 -#define ETCL_NOT 267 -#define ETCL_IN 268 -#define ETCL_TWIDDLE 269 -#define ETCL_BOOLEAN 270 -#define ETCL_PLUS 271 -#define ETCL_MINUS 272 -#define ETCL_MULT 273 -#define ETCL_DIV 274 -#define ETCL_UMINUS 275 -#define ETCL_INTEGER 276 -#define ETCL_FLOAT 277 -#define ETCL_STRING 278 -#define ETCL_RPAREN 279 -#define ETCL_LPAREN 280 -#define ETCL_RBRA 281 -#define ETCL_LBRA 282 -#define ETCL_IDENT 283 -#define ETCL_UNSIGNED 284 -#define ETCL_SIGNED 285 -#define ETCL_DOUBLE 286 -#define ETCL_CONSTRAINT 287 -#define ETCL_COMPONENT 288 -#define ETCL_WITH 289 -#define ETCL_MAX 290 -#define ETCL_MIN 291 -#define ETCL_FIRST 292 -#define ETCL_RANDOM 293 -#define ETCL_DOLLAR 294 -#define ETCL_DOT 295 -#define ETCL_DISCRIMINANT 296 -#define ETCL_LENGTH 297 -#define ETCL_TYPE_ID 298 -#define ETCL_REPOS_ID 299 - - -//============================================================================= -/** - * @file ETCL_y.cpp - * - * @author Carlos O'Ryan based on previous work by Seth Widoff - */ -//============================================================================= - - -#include "ace/ETCL/ETCL_y.h" -#include "ace/ETCL/ETCL_Constraint.h" -#include "ace/ETCL/ETCL_Interpreter.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -extern int yylex (void); -extern void yyflush_current_buffer (void); - -static void yyerror (const char *) -{ - // @@ TODO - // Ignore error messages -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#include - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -#ifndef __cplusplus -#ifndef __STDC__ -#define const -#endif -#endif - - - -#define YYFINAL 114 -#define YYFLAG -32768 -#define YYNTBASE 46 - -#define YYTRANSLATE(x) ((unsigned)(x) <= 299 ? yytranslate[x] : 65) - -static const char 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, 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, 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, 3, 4, 5, 6, - 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, - 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 -}; - -#if YYDEBUG != 0 -static const short yyprhs[] = { 0, - 0, 2, 4, 7, 10, 13, 15, 17, 21, 23, - 27, 29, 33, 37, 41, 45, 49, 53, 55, 59, - 64, 66, 70, 72, 76, 80, 82, 86, 90, 92, - 95, 97, 101, 103, 106, 109, 111, 114, 117, 119, - 121, 124, 128, 132, 135, 137, 138, 141, 144, 146, - 148, 149, 152, 154, 156, 159, 161, 163, 165, 167, - 169, 171, 176, 181, 184, 189, 190, 192, 195, 198 -}; - -static const short yyrhs[] = { 48, - 0, 47, 0, 37, 48, 0, 36, 48, 0, 35, - 48, 0, 38, 0, 39, 0, 48, 12, 49, 0, - 49, 0, 49, 11, 50, 0, 50, 0, 51, 7, - 51, 0, 51, 8, 51, 0, 51, 3, 51, 0, - 51, 4, 51, 0, 51, 5, 51, 0, 51, 6, - 51, 0, 51, 0, 52, 14, 57, 0, 52, 14, - 40, 57, 0, 52, 0, 53, 15, 53, 0, 53, - 0, 53, 17, 54, 0, 53, 18, 54, 0, 54, - 0, 54, 19, 55, 0, 54, 20, 55, 0, 55, - 0, 13, 56, 0, 56, 0, 26, 48, 25, 0, - 22, 0, 17, 22, 0, 18, 22, 0, 23, 0, - 17, 23, 0, 18, 23, 0, 24, 0, 16, 0, - 9, 29, 0, 9, 40, 57, 0, 10, 40, 57, - 0, 40, 57, 0, 29, 0, 0, 41, 59, 0, - 29, 58, 0, 60, 0, 61, 0, 0, 41, 59, - 0, 60, 0, 61, 0, 29, 58, 0, 43, 0, - 42, 0, 44, 0, 45, 0, 62, 0, 63, 0, - 28, 22, 27, 58, 0, 26, 29, 25, 58, 0, - 22, 58, 0, 26, 64, 25, 58, 0, 0, 22, - 0, 17, 22, 0, 18, 22, 0, 24, 0 -}; - -#endif - -#if YYDEBUG != 0 -static const short yyrline[] = { 0, - 92, 93, 96, 98, 100, 102, 104, 108, 110, 113, - 115, 118, 120, 122, 124, 126, 128, 130, 133, 135, - 137, 140, 142, 145, 147, 149, 152, 154, 156, 159, - 161, 164, 166, 168, 170, 172, 174, 176, 178, 180, - 182, 184, 186, 188, 190, 194, 196, 199, 202, 203, - 206, 208, 211, 212, 215, 217, 219, 221, 223, 225, - 226, 229, 233, 237, 241, 245, 247, 249, 251, 253 -}; -#endif - - -#if YYDEBUG != 0 || defined (YYERROR_VERBOSE) - -static const char * const yytname[] = { "$","error","$undefined.","ETCL_GT", -"ETCL_GE","ETCL_LT","ETCL_LE","ETCL_EQ","ETCL_NE","ETCL_EXIST", -"ETCL_DEFAULT","ETCL_AND","ETCL_OR","ETCL_NOT","ETCL_IN", -"ETCL_TWIDDLE","ETCL_BOOLEAN","ETCL_PLUS","ETCL_MINUS","ETCL_MULT", -"ETCL_DIV","ETCL_UMINUS","ETCL_INTEGER","ETCL_FLOAT","ETCL_STRING", -"ETCL_RPAREN","ETCL_LPAREN","ETCL_RBRA","ETCL_LBRA","ETCL_IDENT", -"ETCL_UNSIGNED","ETCL_SIGNED","ETCL_DOUBLE","ETCL_CONSTRAINT", -"ETCL_COMPONENT","ETCL_WITH","ETCL_MAX","ETCL_MIN","ETCL_FIRST", -"ETCL_RANDOM","ETCL_DOLLAR","ETCL_DOT","ETCL_DISCRIMINANT","ETCL_LENGTH", -"ETCL_TYPE_ID","ETCL_REPOS_ID","constraint","preference","bool_or","bool_and", -"bool_compare","expr_in","expr_twiddle","expr","term","factor_not","factor", -"component","component_ext","component_dot","component_array","component_assoc", -"component_pos","union_pos","union_val", 0 -}; -#endif - -static const short yyr1[] = { 0, - 46, 46, 47, 47, 47, 47, 47, 48, 48, 49, - 49, 50, 50, 50, 50, 50, 50, 50, 51, 51, - 51, 52, 52, 53, 53, 53, 54, 54, 54, 55, - 55, 56, 56, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 57, 57, 57, 57, 57, - 58, 58, 58, 58, 59, 59, 59, 59, 59, 59, - 59, 60, 61, 62, 63, 64, 64, 64, 64, 64 -}; - -static const short yyr2[] = { 0, - 1, 1, 2, 2, 2, 1, 1, 3, 1, 3, - 1, 3, 3, 3, 3, 3, 3, 1, 3, 4, - 1, 3, 1, 3, 3, 1, 3, 3, 1, 2, - 1, 3, 1, 2, 2, 1, 2, 2, 1, 1, - 2, 3, 3, 2, 1, 0, 2, 2, 1, 1, - 0, 2, 1, 1, 2, 1, 1, 1, 1, 1, - 1, 4, 4, 2, 4, 0, 1, 2, 2, 1 -}; - -static const short yydefact[] = { 0, - 0, 0, 0, 40, 0, 0, 33, 36, 39, 0, - 45, 0, 0, 0, 6, 7, 46, 2, 1, 9, - 11, 18, 21, 23, 26, 29, 31, 41, 46, 46, - 30, 34, 37, 35, 38, 0, 5, 4, 3, 0, - 0, 51, 0, 44, 49, 50, 0, 0, 0, 0, - 0, 0, 0, 0, 46, 0, 0, 0, 0, 0, - 42, 43, 32, 0, 0, 0, 48, 53, 54, 51, - 66, 51, 57, 56, 58, 59, 47, 60, 61, 8, - 10, 14, 15, 16, 17, 12, 13, 46, 19, 22, - 24, 25, 27, 28, 51, 51, 52, 64, 0, 0, - 67, 70, 0, 55, 20, 63, 62, 68, 69, 51, - 65, 0, 0, 0 -}; - -static const short yydefgoto[] = { 112, - 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 44, 67, 77, 68, 69, 78, 79, 103 -}; - -static const short yypact[] = { 41, - -13, -39, 94,-32768, 38, 46,-32768,-32768,-32768, 73, --32768, 73, 73, 73,-32768,-32768, -9,-32768, -6, 7, --32768, 121, -5, 19, 55,-32768,-32768,-32768, -9, -9, --32768,-32768,-32768,-32768,-32768, 21, -6, -6, -6, 6, - 25, -2, -1,-32768,-32768,-32768, 73, 73, 73, 73, - 73, 73, 73, 73, -18, 73, 73, 73, 73, 73, --32768,-32768,-32768, 27, 29, -1,-32768,-32768,-32768, -2, - 31, -2,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 7, --32768,-32768,-32768,-32768,-32768,-32768,-32768, -9,-32768, 67, - 55, 55,-32768,-32768, -2, -2,-32768,-32768, 44, 50, --32768,-32768, 69,-32768,-32768,-32768,-32768,-32768,-32768, -2, --32768, 98, 100,-32768 -}; - -static const short yypgoto[] = {-32768, --32768, 95, 54, 58, 86,-32768, 59, 30, 33, 111, - -26, -65, 53, -17, -15,-32768,-32768,-32768 -}; - - -#define YYLAST 140 - - -static const short yytable[] = { 45, - 30, 46, 61, 62, 98, 47, 104, 40, 55, 41, - 42, 45, 45, 46, 46, 28, 40, 48, 41, 42, - 70, 88, 43, 40, 71, 41, 29, 72, 89, 106, - 107, 43, 47, 56, 64, 57, 58, 45, 66, 46, - 73, 74, 75, 76, 111, 63, 65, 99, 100, 1, - 2, 95, 101, 3, 102, 96, 4, 5, 6, 32, - 33, 105, 7, 8, 9, 108, 10, 34, 35, 11, - 45, 109, 46, 59, 60, 12, 13, 14, 15, 16, - 17, 1, 2, 57, 58, 3, 91, 92, 4, 5, - 6, 93, 94, 110, 7, 8, 9, 113, 10, 114, - 80, 11, 1, 2, 36, 81, 37, 38, 39, 4, - 5, 6, 17, 31, 90, 7, 8, 9, 97, 10, - 0, 0, 11, 49, 50, 51, 52, 53, 54, 0, - 0, 0, 0, 17, 82, 83, 84, 85, 86, 87 -}; - -static const short yycheck[] = { 17, - 40, 17, 29, 30, 70, 12, 72, 26, 14, 28, - 29, 29, 30, 29, 30, 29, 26, 11, 28, 29, - 22, 40, 41, 26, 26, 28, 40, 29, 55, 95, - 96, 41, 12, 15, 29, 17, 18, 55, 41, 55, - 42, 43, 44, 45, 110, 25, 22, 17, 18, 9, - 10, 25, 22, 13, 24, 27, 16, 17, 18, 22, - 23, 88, 22, 23, 24, 22, 26, 22, 23, 29, - 88, 22, 88, 19, 20, 35, 36, 37, 38, 39, - 40, 9, 10, 17, 18, 13, 57, 58, 16, 17, - 18, 59, 60, 25, 22, 23, 24, 0, 26, 0, - 47, 29, 9, 10, 10, 48, 12, 13, 14, 16, - 17, 18, 40, 3, 56, 22, 23, 24, 66, 26, - -1, -1, 29, 3, 4, 5, 6, 7, 8, -1, - -1, -1, -1, 40, 49, 50, 51, 52, 53, 54 -}; -/* -*-C-*- Note some compilers choke on comments on `//#line' lines. */ -//#line 3 "/pkg/gnu/share/bison.simple" -/* This file comes from bison-1.28. */ - -/* Skeleton output parser for bison, - Copyright (C) 1984, 1989, 1990 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 2, 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., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* As a special exception, when this file is copied by Bison into a - Bison output file, you may use that output file without restriction. - This special exception was added by the Free Software Foundation - in version 1.24 of Bison. */ - -/* This is the parser code that is written into each bison parser - when the %semantic_parser declaration is not specified in the grammar. - It was written by Richard Stallman by simplifying the hairy parser - used when %semantic_parser is specified. */ - -ACE_END_VERSIONED_NAMESPACE_DECL - -#ifndef YYSTACK_USE_ALLOCA -#ifdef alloca -#define YYSTACK_USE_ALLOCA -#else /* alloca not defined */ -#ifdef __GNUC__ -#define YYSTACK_USE_ALLOCA -#define alloca __builtin_alloca -#else /* not GNU C. */ -#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || (defined (__sun) && defined (__i386)) -#define YYSTACK_USE_ALLOCA -#include -#else /* not sparc */ -/* We think this test detects Watcom and Microsoft C. */ -/* This used to test MSDOS, but that is a bad idea - since that symbol is in the user namespace. */ -#if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__) -#if 0 /* No need for malloc.h, which pollutes the namespace; - instead, just don't use alloca. */ -#include -#endif -#else /* not MSDOS, or __TURBOC__ */ -#if defined(_AIX) -/* I don't know what this was needed for, but it pollutes the namespace. - So I turned it off. rms, 2 May 1997. */ -/* #include */ - #pragma alloca -#define YYSTACK_USE_ALLOCA -#else /* not MSDOS, or __TURBOC__, or _AIX */ -#if 0 -#ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up, - and on HPUX 10. Eventually we can turn this on. */ -#define YYSTACK_USE_ALLOCA -#define alloca __builtin_alloca -#endif /* __hpux */ -#endif -#endif /* not _AIX */ -#endif /* not MSDOS, or __TURBOC__ */ -#endif /* not sparc */ -#endif /* not GNU C */ -#endif /* alloca not defined */ -#endif /* YYSTACK_USE_ALLOCA not defined */ - -#ifdef YYSTACK_USE_ALLOCA -#define YYSTACK_ALLOC alloca -#else -#define YYSTACK_ALLOC malloc -#endif - -/* Note: there must be only one dollar sign in this file. - It is replaced by the list of actions, each action - as one case of the switch. */ - -#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 yyerrlab1 -/* 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. */ -#define YYFAIL goto yyerrlab -#define YYRECOVERING() (!!yyerrstatus) -#define YYBACKUP(token, value) \ -do \ - if (yychar == YYEMPTY && yylen == 1) \ - { yychar = (token), yylval = (value); \ - yychar1 = YYTRANSLATE (yychar); \ - YYPOPSTACK; \ - goto yybackup; \ - } \ - else \ - { yyerror ("syntax error: cannot back up"); YYERROR; } \ -while (0) - -#define YYTERROR 1 -#define YYERRCODE 256 - -#ifndef YYPURE -#define YYLEX yylex() -#endif - -#ifdef YYPURE -#ifdef YYLSP_NEEDED -#ifdef YYLEX_PARAM -#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM) -#else -#define YYLEX yylex(&yylval, &yylloc) -#endif -#else /* not YYLSP_NEEDED */ -#ifdef YYLEX_PARAM -#define YYLEX yylex(&yylval, YYLEX_PARAM) -#else -#define YYLEX yylex(&yylval) -#endif -#endif /* not YYLSP_NEEDED */ -#endif - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/* If nonreentrant, generate the variables here */ - -#ifndef YYPURE - -int yychar; /* the lookahead symbol */ -YYSTYPE yylval; /* the semantic value of the */ - /* lookahead symbol */ -YYSTYPE yyval; /* the variable used to return */ - /* semantic values from the action */ - /* routines */ - - -#ifdef YYLSP_NEEDED -YYLTYPE yylloc; /* location data for the lookahead */ - /* symbol */ -#endif - -int yynerrs; /* number of parse errors so far */ -#endif /* not YYPURE */ - -#if YYDEBUG != 0 -int yydebug; /* nonzero means print parse trace */ -/* Since this is uninitialized, it does not stop multiple parsers - from coexisting. */ -#endif - -/* YYINITDEPTH indicates the initial size of the parser's stacks */ - -#ifndef YYINITDEPTH -#define YYINITDEPTH 200 -#endif - -/* YYMAXDEPTH is the maximum size the stacks can grow to - (effective only if the built-in stack extension method is used). */ - -#if YYMAXDEPTH == 0 -#undef YYMAXDEPTH -#endif - -#ifndef YYMAXDEPTH -#define YYMAXDEPTH 10000 -#endif - -/* Define __yy_memcpy. Note that the size argument - should be passed with type unsigned int, because that is what the non-GCC - definitions require. With GCC, __builtin_memcpy takes an arg - of type size_t, but it can handle unsigned int. */ - -#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ -#define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT) -#else /* not GNU C or C++ */ -#ifndef __cplusplus - -/* This is the most reliable way to avoid incompatibilities - in available built-in functions on various systems. */ -static void -__yy_memcpy (to, from, count) - char *to; - char *from; - unsigned int count; -{ - ACE_REGISTER char *f = from; - ACE_REGISTER char *t = to; - ACE_REGISTER int i = count; - - while (i-- > 0) - *t++ = *f++; -} - -#else /* __cplusplus */ - -/* This is the most reliable way to avoid incompatibilities - in available built-in functions on various systems. */ -static void -__yy_memcpy (char *to, char *from, unsigned int count) -{ - ACE_REGISTER char *t = to; - ACE_REGISTER char *f = from; - ACE_REGISTER int i = count; - - while (i-- > 0) - *t++ = *f++; -} - -#endif -#endif - -//#line 217 "/pkg/gnu/share/bison.simple" - -/* The user can define YYPARSE_PARAM as the name of an argument to be passed - into yyparse. The argument should have type void *. - It should actually point to an object. - Grammar actions can access the variable by casting it - to the proper pointer type. */ - -#ifdef YYPARSE_PARAM -#ifdef __cplusplus -#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM -#define YYPARSE_PARAM_DECL -#else /* not __cplusplus */ -#define YYPARSE_PARAM_ARG YYPARSE_PARAM -#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; -#endif /* not __cplusplus */ -#else /* not YYPARSE_PARAM */ -#define YYPARSE_PARAM_ARG -#define YYPARSE_PARAM_DECL -#endif /* not YYPARSE_PARAM */ - -/* Prevent warning if -Wstrict-prototypes. */ -#ifdef __GNUC__ -#ifdef YYPARSE_PARAM -int yyparse (void *); -#else -int yyparse (void); -#endif -#endif - -int -yyparse(YYPARSE_PARAM_ARG) - YYPARSE_PARAM_DECL -{ - ACE_REGISTER int yystate; - ACE_REGISTER int yyn; - ACE_REGISTER short *yyssp; - ACE_REGISTER YYSTYPE *yyvsp; - int yyerrstatus; /* number of tokens to shift before error messages enabled */ - int yychar1 = 0; /* lookahead token as an internal (translated) token number */ - - short yyssa[YYINITDEPTH]; /* the state stack */ - YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */ - - short *yyss = yyssa; /* refer to the stacks thru separate pointers */ - YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */ - -#ifdef YYLSP_NEEDED - YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */ - YYLTYPE *yyls = yylsa; - YYLTYPE *yylsp; - -#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) -#else -#define YYPOPSTACK (yyvsp--, yyssp--) -#endif - - int yystacksize = YYINITDEPTH; - int yyfree_stacks = 0; - -#ifdef YYPURE - int yychar; - YYSTYPE yylval; - int yynerrs; -#ifdef YYLSP_NEEDED - YYLTYPE yylloc; -#endif -#endif - - int yylen; - -#if YYDEBUG != 0 - if (yydebug) - ACE_OS::fprintf(stderr, "Starting parse\n"); -#endif - - yystate = 0; - yyerrstatus = 0; - yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ - - /* Initialize stack pointers. - Waste one element of value and location stack - so that they stay on the same level as the state stack. - The wasted elements are never initialized. */ - - yyssp = yyss - 1; - yyvsp = yyvs; -#ifdef YYLSP_NEEDED - yylsp = yyls; -#endif - -/* Push a new state, which is found in yystate . */ -/* In all cases, when you get here, the value and location stacks - have just been pushed. so pushing a state here evens the stacks. */ -yynewstate: - - *++yyssp = yystate; - - if (yyssp >= yyss + yystacksize - 1) - { - /* 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; - short *yyss1 = yyss; -#ifdef YYLSP_NEEDED - YYLTYPE *yyls1 = yyls; -#endif - - /* Get the current used size of the three stacks, in elements. */ - int size = yyssp - yyss + 1; - -#ifdef yyoverflow - /* Each stack pointer address is followed by the size of - the data in use in that stack, in bytes. */ -#ifdef YYLSP_NEEDED - /* This used to be a conditional around just the two extra args, - but that might be undefined if yyoverflow is a macro. */ - yyoverflow("parser stack overflow", - &yyss1, size * sizeof (*yyssp), - &yyvs1, size * sizeof (*yyvsp), - &yyls1, size * sizeof (*yylsp), - &yystacksize); -#else - yyoverflow("parser stack overflow", - &yyss1, size * sizeof (*yyssp), - &yyvs1, size * sizeof (*yyvsp), - &yystacksize); -#endif - - yyss = yyss1; yyvs = yyvs1; -#ifdef YYLSP_NEEDED - yyls = yyls1; -#endif -#else /* no yyoverflow */ - /* Extend the stack our own way. */ - if (yystacksize >= YYMAXDEPTH) - { - yyerror("parser stack overflow"); - if (yyfree_stacks) - { - ACE_OS::free (yyss); - ACE_OS::free (yyvs); -#ifdef YYLSP_NEEDED - ACE_OS::free (yyls); -#endif - } - return 2; - } - yystacksize *= 2; - if (yystacksize > YYMAXDEPTH) - yystacksize = YYMAXDEPTH; -#ifndef YYSTACK_USE_ALLOCA - yyfree_stacks = 1; -#endif - yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp)); - __yy_memcpy ((char *)yyss, (char *)yyss1, - size * (unsigned int) sizeof (*yyssp)); - yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp)); - __yy_memcpy ((char *)yyvs, (char *)yyvs1, - size * (unsigned int) sizeof (*yyvsp)); -#ifdef YYLSP_NEEDED - yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp)); - __yy_memcpy ((char *)yyls, (char *)yyls1, - size * (unsigned int) sizeof (*yylsp)); -#endif -#endif /* no yyoverflow */ - - yyssp = yyss + size - 1; - yyvsp = yyvs + size - 1; -#ifdef YYLSP_NEEDED - yylsp = yyls + size - 1; -#endif - -#if YYDEBUG != 0 - if (yydebug) - ACE_OS::fprintf(stderr, "Stack size increased to %d\n", yystacksize); -#endif - - if (yyssp >= yyss + yystacksize - 1) - YYABORT; - } - -#if YYDEBUG != 0 - if (yydebug) - ACE_OS::fprintf(stderr, "Entering state %d\n", yystate); -#endif - - goto yybackup; - yybackup: - -/* Do appropriate processing given the current state. */ -/* Read a lookahead token if we need one and don't already have one. */ -/* yyresume: */ - - /* First try to decide what to do without reference to lookahead token. */ - - yyn = yypact[yystate]; - if (yyn == YYFLAG) - goto yydefault; - - /* Not known => get a lookahead token if don't already have one. */ - - /* yychar is either YYEMPTY or YYEOF - or a valid token in external form. */ - - if (yychar == YYEMPTY) - { -#if YYDEBUG != 0 - if (yydebug) - ACE_OS::fprintf(stderr, "Reading a token: "); -#endif - yychar = YYLEX; - } - - /* Convert token to internal form (in yychar1) for indexing tables with */ - - if (yychar <= 0) /* This means end of input. */ - { - yychar1 = 0; - yychar = YYEOF; /* Don't call YYLEX any more */ - -#if YYDEBUG != 0 - if (yydebug) - ACE_OS::fprintf(stderr, "Now at end of input.\n"); -#endif - } - else - { - yychar1 = YYTRANSLATE(yychar); - -#if YYDEBUG != 0 - if (yydebug) - { - ACE_OS::fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]); - /* Give the individual parser a way to print the precise meaning - of a token, for further debugging info. */ -#ifdef YYPRINT - YYPRINT (stderr, yychar, yylval); -#endif - ACE_OS::fprintf (stderr, ")\n"); - } -#endif - } - - yyn += yychar1; - if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1) - goto yydefault; - - yyn = yytable[yyn]; - - /* yyn is what to do for this token type in this state. - Negative => reduce, -yyn is rule number. - Positive => shift, yyn is new state. - New state is final state => don't bother to shift, - just return success. - 0, or most negative number => error. */ - - if (yyn < 0) - { - if (yyn == YYFLAG) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } - else if (yyn == 0) - goto yyerrlab; - - if (yyn == YYFINAL) - YYACCEPT; - - /* Shift the lookahead token. */ - -#if YYDEBUG != 0 - if (yydebug) - ACE_OS::fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]); -#endif - - /* Discard the token being shifted unless it is eof. */ - if (yychar != YYEOF) - yychar = YYEMPTY; - - *++yyvsp = yylval; -#ifdef YYLSP_NEEDED - *++yylsp = yylloc; -#endif - - /* count tokens shifted since error; after three, turn off error status. */ - if (yyerrstatus) yyerrstatus--; - - yystate = yyn; - goto yynewstate; - -/* Do the default action for the current state. */ -yydefault: - - yyn = yydefact[yystate]; - if (yyn == 0) - goto yyerrlab; - -/* Do a reduction. yyn is the number of a rule to reduce with. */ -yyreduce: - yylen = yyr2[yyn]; - if (yylen > 0) - yyval = yyvsp[1-yylen]; /* implement default value of the action */ - -#if YYDEBUG != 0 - if (yydebug) - { - int i; - - ACE_OS::fprintf (stderr, "Reducing via rule %d (line %d), ", - yyn, yyrline[yyn]); - - /* Print the symbols being reduced, and their result. */ - for (i = yyprhs[yyn]; yyrhs[i] > 0; i++) - ACE_OS::fprintf (stderr, "%s ", yytname[yyrhs[i]]); - ACE_OS::fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]); - } -#endif - - - switch (yyn) { - -case 3: -//#line 97 "ETCL/ETCL.yy" -{ yyval.constraint = new ETCL_Preference (ETCL_MIN, yyvsp[0].constraint); ; - break;} -case 4: -//#line 99 "ETCL/ETCL.yy" -{ yyval.constraint = new ETCL_Preference (ETCL_MAX, yyvsp[0].constraint); ; - break;} -case 5: -//#line 101 "ETCL/ETCL.yy" -{ yyval.constraint = new ETCL_Preference (ETCL_WITH, yyvsp[0].constraint); ; - break;} -case 6: -//#line 103 "ETCL/ETCL.yy" -{ yyval.constraint = new ETCL_Preference (ETCL_FIRST); ; - break;} -case 7: -//#line 105 "ETCL/ETCL.yy" -{ yyval.constraint = new ETCL_Preference (ETCL_RANDOM); ; - break;} -case 8: -//#line 109 "ETCL/ETCL.yy" -{ yyval.constraint = new ETCL_Binary_Expr (ETCL_OR, yyvsp[-2].constraint, yyvsp[0].constraint); ; - break;} -case 10: -//#line 114 "ETCL/ETCL.yy" -{ yyval.constraint = new ETCL_Binary_Expr (ETCL_AND, yyvsp[-2].constraint, yyvsp[0].constraint); ; - break;} -case 12: -//#line 119 "ETCL/ETCL.yy" -{ yyval.constraint = new ETCL_Binary_Expr (ETCL_EQ, yyvsp[-2].constraint, yyvsp[0].constraint); ; - break;} -case 13: -//#line 121 "ETCL/ETCL.yy" -{ yyval.constraint = new ETCL_Binary_Expr (ETCL_NE, yyvsp[-2].constraint, yyvsp[0].constraint); ; - break;} -case 14: -//#line 123 "ETCL/ETCL.yy" -{ yyval.constraint = new ETCL_Binary_Expr (ETCL_GT, yyvsp[-2].constraint, yyvsp[0].constraint); ; - break;} -case 15: -//#line 125 "ETCL/ETCL.yy" -{ yyval.constraint = new ETCL_Binary_Expr (ETCL_GE, yyvsp[-2].constraint, yyvsp[0].constraint); ; - break;} -case 16: -//#line 127 "ETCL/ETCL.yy" -{ yyval.constraint = new ETCL_Binary_Expr (ETCL_LT, yyvsp[-2].constraint, yyvsp[0].constraint); ; - break;} -case 17: -//#line 129 "ETCL/ETCL.yy" -{ yyval.constraint = new ETCL_Binary_Expr (ETCL_LE, yyvsp[-2].constraint, yyvsp[0].constraint); ; - break;} -case 19: -//#line 134 "ETCL/ETCL.yy" -{ yyval.constraint = new ETCL_Binary_Expr (ETCL_IN, yyvsp[-2].constraint, yyvsp[0].constraint); ; - break;} -case 20: -//#line 136 "ETCL/ETCL.yy" -{ yyval.constraint = new ETCL_Binary_Expr (ETCL_IN, yyvsp[-3].constraint, yyvsp[0].constraint); ; - break;} -case 22: -//#line 141 "ETCL/ETCL.yy" -{ yyval.constraint = new ETCL_Binary_Expr (ETCL_TWIDDLE, yyvsp[-2].constraint, yyvsp[0].constraint); ; - break;} -case 24: -//#line 146 "ETCL/ETCL.yy" -{ yyval.constraint = new ETCL_Binary_Expr (ETCL_PLUS, yyvsp[-2].constraint, yyvsp[0].constraint); ; - break;} -case 25: -//#line 148 "ETCL/ETCL.yy" -{ yyval.constraint = new ETCL_Binary_Expr (ETCL_MINUS, yyvsp[-2].constraint, yyvsp[0].constraint); ; - break;} -case 27: -//#line 153 "ETCL/ETCL.yy" -{ yyval.constraint = new ETCL_Binary_Expr (ETCL_MULT, yyvsp[-2].constraint, yyvsp[0].constraint); ; - break;} -case 28: -//#line 155 "ETCL/ETCL.yy" -{ yyval.constraint = new ETCL_Binary_Expr (ETCL_DIV, yyvsp[-2].constraint, yyvsp[0].constraint); ; - break;} -case 30: -//#line 160 "ETCL/ETCL.yy" -{ yyval.constraint = new ETCL_Unary_Expr (ETCL_NOT, yyvsp[0].constraint); ; - break;} -case 32: -//#line 165 "ETCL/ETCL.yy" -{ yyval.constraint = yyvsp[-1].constraint; ; - break;} -case 33: -//#line 167 "ETCL/ETCL.yy" -{ yyval.constraint = yyvsp[0].constraint; ; - break;} -case 34: -//#line 169 "ETCL/ETCL.yy" -{ yyval.constraint = new ETCL_Unary_Expr (ETCL_PLUS, yyvsp[0].constraint); ; - break;} -case 35: -//#line 171 "ETCL/ETCL.yy" -{ yyval.constraint = new ETCL_Unary_Expr (ETCL_MINUS, yyvsp[0].constraint); ; - break;} -case 36: -//#line 173 "ETCL/ETCL.yy" -{ yyval.constraint = yyvsp[0].constraint; ; - break;} -case 37: -//#line 175 "ETCL/ETCL.yy" -{ yyval.constraint = new ETCL_Unary_Expr (ETCL_PLUS, yyvsp[0].constraint); ; - break;} -case 38: -//#line 177 "ETCL/ETCL.yy" -{ yyval.constraint = new ETCL_Unary_Expr (ETCL_MINUS, yyvsp[0].constraint); ; - break;} -case 39: -//#line 179 "ETCL/ETCL.yy" -{ yyval.constraint = yyvsp[0].constraint; ; - break;} -case 40: -//#line 181 "ETCL/ETCL.yy" -{ yyval.constraint = yyvsp[0].constraint; ; - break;} -case 41: -//#line 183 "ETCL/ETCL.yy" -{ yyval.constraint = new ETCL_Exist (yyvsp[0].constraint); ; - break;} -case 42: -//#line 185 "ETCL/ETCL.yy" -{ yyval.constraint = new ETCL_Exist (yyvsp[0].constraint); ; - break;} -case 43: -//#line 187 "ETCL/ETCL.yy" -{ yyval.constraint = new ETCL_Default (yyvsp[0].constraint); ; - break;} -case 44: -//#line 189 "ETCL/ETCL.yy" -{ yyval.constraint = new ETCL_Eval (yyvsp[0].constraint); ; - break;} -case 45: -//#line 191 "ETCL/ETCL.yy" -{ yyval.constraint = yyvsp[0].constraint; ; - break;} -case 46: -//#line 195 "ETCL/ETCL.yy" -{ yyval.constraint = 0; ; - break;} -case 47: -//#line 197 "ETCL/ETCL.yy" -{ yyval.constraint = new ETCL_Dot (yyvsp[0].constraint); ; - break;} -case 48: -//#line 200 "ETCL/ETCL.yy" -{ yyval.constraint = new ETCL_Component (yyvsp[-1].constraint, yyvsp[0].constraint); ; - break;} -case 51: -//#line 207 "ETCL/ETCL.yy" -{ yyval.constraint = 0; ; - break;} -case 52: -//#line 209 "ETCL/ETCL.yy" -{ yyval.constraint = new ETCL_Dot (yyvsp[0].constraint); ; - break;} -case 55: -//#line 216 "ETCL/ETCL.yy" -{ yyval.constraint = new ETCL_Component (yyvsp[-1].constraint, yyvsp[0].constraint); ; - break;} -case 56: -//#line 218 "ETCL/ETCL.yy" -{ yyval.constraint = new ETCL_Special (ETCL_LENGTH); ; - break;} -case 57: -//#line 220 "ETCL/ETCL.yy" -{ yyval.constraint = new ETCL_Special (ETCL_DISCRIMINANT); ; - break;} -case 58: -//#line 222 "ETCL/ETCL.yy" -{ yyval.constraint = new ETCL_Special (ETCL_TYPE_ID); ; - break;} -case 59: -//#line 224 "ETCL/ETCL.yy" -{ yyval.constraint = new ETCL_Special (ETCL_REPOS_ID); ; - break;} -case 62: -//#line 230 "ETCL/ETCL.yy" -{ yyval.constraint = new ETCL_Component_Array (yyvsp[-2].constraint, yyvsp[0].constraint); ; - break;} -case 63: -//#line 234 "ETCL/ETCL.yy" -{ yyval.constraint = new ETCL_Component_Assoc (yyvsp[-2].constraint, yyvsp[0].constraint); ; - break;} -case 64: -//#line 238 "ETCL/ETCL.yy" -{ yyval.constraint = new ETCL_Component_Pos (yyvsp[-1].constraint, yyvsp[0].constraint); ; - break;} -case 65: -//#line 242 "ETCL/ETCL.yy" -{ yyval.constraint = new ETCL_Union_Pos (yyvsp[-2].constraint, yyvsp[0].constraint); ; - break;} -case 66: -//#line 246 "ETCL/ETCL.yy" -{ yyval.constraint = 0; ; - break;} -case 67: -//#line 248 "ETCL/ETCL.yy" -{ yyval.constraint = new ETCL_Union_Value (+1, yyvsp[0].constraint); ; - break;} -case 68: -//#line 250 "ETCL/ETCL.yy" -{ yyval.constraint = new ETCL_Union_Value (+1, yyvsp[0].constraint); ; - break;} -case 69: -//#line 252 "ETCL/ETCL.yy" -{ yyval.constraint = new ETCL_Union_Value (-1, yyvsp[0].constraint); ; - break;} -case 70: -//#line 254 "ETCL/ETCL.yy" -{ yyval.constraint = new ETCL_Union_Value (yyvsp[0].constraint); ; - break;} -} - /* the action file gets copied in in place of this dollarsign */ -//#line 543 "/pkg/gnu/share/bison.simple" - - yyvsp -= yylen; - yyssp -= yylen; -#ifdef YYLSP_NEEDED - yylsp -= yylen; -#endif - -#if YYDEBUG != 0 - if (yydebug) - { - short *ssp1 = yyss - 1; - ACE_OS::fprintf (stderr, "state stack now"); - while (ssp1 != yyssp) - ACE_OS::fprintf (stderr, " %d", *++ssp1); - ACE_OS::fprintf (stderr, "\n"); - } -#endif - - *++yyvsp = yyval; - -#ifdef YYLSP_NEEDED - yylsp++; - if (yylen == 0) - { - yylsp->first_line = yylloc.first_line; - yylsp->first_column = yylloc.first_column; - yylsp->last_line = (yylsp-1)->last_line; - yylsp->last_column = (yylsp-1)->last_column; - yylsp->text = 0; - } - else - { - yylsp->last_line = (yylsp+yylen-1)->last_line; - yylsp->last_column = (yylsp+yylen-1)->last_column; - } -#endif - - /* 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 - YYNTBASE] + *yyssp; - if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp) - yystate = yytable[yystate]; - else - yystate = yydefgoto[yyn - YYNTBASE]; - - goto yynewstate; - -yyerrlab: /* here on detecting error */ - - if (! yyerrstatus) - /* If not already recovering from an error, report this error. */ - { - ++yynerrs; - -#ifdef YYERROR_VERBOSE - yyn = yypact[yystate]; - - if (yyn > YYFLAG && yyn < YYLAST) - { - int size = 0; - char *msg; - int x, count; - - count = 0; - /* Start X at -yyn if nec to avoid negative indexes in yycheck. */ - for (x = (yyn < 0 ? -yyn : 0); - x < (sizeof(yytname) / sizeof(char *)); x++) - if (yycheck[x + yyn] == x) - size += ACE_OS::strlen(yytname[x]) + 15, count++; - msg = (char *) ACE_OS::malloc(size + 15); - if (msg != 0) - { - ACE_OS::strcpy(msg, "parse error"); - - if (count < 5) - { - count = 0; - for (x = (yyn < 0 ? -yyn : 0); - x < (sizeof(yytname) / sizeof(char *)); x++) - if (yycheck[x + yyn] == x) - { - ACE_OS::strcat(msg, count == 0 ? ", expecting `" : " or `"); - ACE_OS::strcat(msg, yytname[x]); - ACE_OS::strcat(msg, "'"); - count++; - } - } - yyerror(msg); - ACE_OS::free(msg); - } - else - yyerror ("parse error; also virtual memory exceeded"); - } - else -#endif /* YYERROR_VERBOSE */ - yyerror("parse error"); - } - - goto yyerrlab1; -yyerrlab1: /* here on error raised explicitly by an action */ - - if (yyerrstatus == 3) - { - /* if just tried and failed to reuse lookahead token after an error, discard it. */ - - /* return failure if at end of input */ - if (yychar == YYEOF) - YYABORT; - -#if YYDEBUG != 0 - if (yydebug) - ACE_OS::fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]); -#endif - - yychar = YYEMPTY; - } - - /* Else will try to reuse lookahead token - after shifting the error token. */ - - yyerrstatus = 3; /* Each real token shifted decrements this */ - - goto yyerrhandle; - -yyerrdefault: /* current state does not do anything special for the error token. */ - -#if 0 - /* This is wrong; only states that explicitly want error tokens - should shift them. */ - yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/ - if (yyn) goto yydefault; -#endif - -yyerrpop: /* pop the current state because it cannot handle the error token */ - - if (yyssp == yyss) YYABORT; - yyvsp--; - yystate = *--yyssp; -#ifdef YYLSP_NEEDED - yylsp--; -#endif - -#if YYDEBUG != 0 - if (yydebug) - { - short *ssp1 = yyss - 1; - ACE_OS::fprintf (stderr, "Error: state stack now"); - while (ssp1 != yyssp) - ACE_OS::fprintf (stderr, " %d", *++ssp1); - ACE_OS::fprintf (stderr, "\n"); - } -#endif - -yyerrhandle: - - yyn = yypact[yystate]; - if (yyn == YYFLAG) - goto yyerrdefault; - - yyn += YYTERROR; - if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR) - goto yyerrdefault; - - yyn = yytable[yyn]; - if (yyn < 0) - { - if (yyn == YYFLAG) - goto yyerrpop; - yyn = -yyn; - goto yyreduce; - } - else if (yyn == 0) - goto yyerrpop; - - if (yyn == YYFINAL) - YYACCEPT; - -#if YYDEBUG != 0 - if (yydebug) - ACE_OS::fprintf(stderr, "Shifting error token, "); -#endif - - *++yyvsp = yylval; -#ifdef YYLSP_NEEDED - *++yylsp = yylloc; -#endif - - yystate = yyn; - goto yynewstate; - - yyacceptlab: - /* YYACCEPT comes here. */ - if (yyfree_stacks) - { - ACE_OS::free (yyss); - ACE_OS::free (yyvs); -#ifdef YYLSP_NEEDED - ACE_OS::free (yyls); -#endif - } - return 0; - - yyabortlab: - /* YYABORT comes here. */ - - /* Flush out yy_current_buffer before next parse. Since there is - no error recovery, the buffer could still contain tokens from this - parse. */ - yyflush_current_buffer(); - - if (yyfree_stacks) - { - ACE_OS::free (yyss); - ACE_OS::free (yyvs); -#ifdef YYLSP_NEEDED - ACE_OS::free (yyls); -#endif - } - return 1; -} -//#line 257 "ETCL/ETCL.yy" - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/ETCL/ETCL_y.h b/modules/worldengine/deps/acelite/ace/ETCL/ETCL_y.h deleted file mode 100644 index ee66290c48..0000000000 --- a/modules/worldengine/deps/acelite/ace/ETCL/ETCL_y.h +++ /dev/null @@ -1,44 +0,0 @@ -#define ETCL_GT 257 -#define ETCL_GE 258 -#define ETCL_LT 259 -#define ETCL_LE 260 -#define ETCL_EQ 261 -#define ETCL_NE 262 -#define ETCL_EXIST 263 -#define ETCL_DEFAULT 264 -#define ETCL_AND 265 -#define ETCL_OR 266 -#define ETCL_NOT 267 -#define ETCL_IN 268 -#define ETCL_TWIDDLE 269 -#define ETCL_BOOLEAN 270 -#define ETCL_PLUS 271 -#define ETCL_MINUS 272 -#define ETCL_MULT 273 -#define ETCL_DIV 274 -#define ETCL_UMINUS 275 -#define ETCL_INTEGER 276 -#define ETCL_FLOAT 277 -#define ETCL_STRING 278 -#define ETCL_RPAREN 279 -#define ETCL_LPAREN 280 -#define ETCL_RBRA 281 -#define ETCL_LBRA 282 -#define ETCL_IDENT 283 -#define ETCL_UNSIGNED 284 -#define ETCL_SIGNED 285 -#define ETCL_DOUBLE 286 -#define ETCL_CONSTRAINT 287 -#define ETCL_COMPONENT 288 -#define ETCL_WITH 289 -#define ETCL_MAX 290 -#define ETCL_MIN 291 -#define ETCL_FIRST 292 -#define ETCL_RANDOM 293 -#define ETCL_DOLLAR 294 -#define ETCL_DOT 295 -#define ETCL_DISCRIMINANT 296 -#define ETCL_LENGTH 297 -#define ETCL_TYPE_ID 298 -#define ETCL_REPOS_ID 299 - diff --git a/modules/worldengine/deps/acelite/ace/ETCL/ace_etcl_export.h b/modules/worldengine/deps/acelite/ace/ETCL/ace_etcl_export.h deleted file mode 100644 index 3470a5b2b6..0000000000 --- a/modules/worldengine/deps/acelite/ace/ETCL/ace_etcl_export.h +++ /dev/null @@ -1,39 +0,0 @@ - -// -*- C++ -*- -// Definition for Win32 Export directives. -// This file is generated automatically by generate_export_file.pl -// ------------------------------ -#ifndef ACE_ETCL_EXPORT_H -#define ACE_ETCL_EXPORT_H - -#include "ace/config-all.h" - -#if defined (ACE_AS_STATIC_LIBS) -# if !defined (ACE_ETCL_HAS_DLL) -# define ACE_ETCL_HAS_DLL 0 -# endif /* ! ACE_ETCL_HAS_DLL */ -#else -# if !defined (ACE_ETCL_HAS_DLL) -# define ACE_ETCL_HAS_DLL 1 -# endif /* ! ACE_ETCL_HAS_DLL */ -#endif - -#if defined (ACE_ETCL_HAS_DLL) && (ACE_ETCL_HAS_DLL == 1) -# if defined (ACE_ETCL_BUILD_DLL) -# define ACE_ETCL_Export ACE_Proper_Export_Flag -# define ACE_ETCL_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) -# define ACE_ETCL_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# else /* ACE_ETCL_BUILD_DLL */ -# define ACE_ETCL_Export ACE_Proper_Import_Flag -# define ACE_ETCL_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) -# define ACE_ETCL_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# endif /* ACE_ETCL_BUILD_DLL */ -#else /* ACE_ETCL_HAS_DLL == 1 */ -# define ACE_ETCL_Export -# define ACE_ETCL_SINGLETON_DECLARATION(T) -# define ACE_ETCL_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -#endif /* ACE_ETCL_HAS_DLL == 1 */ - -#endif /* ACE_ETCL_EXPORT_H */ - -// End of auto generated file. diff --git a/modules/worldengine/deps/acelite/ace/ETCL/etcl_parser_export.h b/modules/worldengine/deps/acelite/ace/ETCL/etcl_parser_export.h deleted file mode 100644 index e0e62b8f77..0000000000 --- a/modules/worldengine/deps/acelite/ace/ETCL/etcl_parser_export.h +++ /dev/null @@ -1,39 +0,0 @@ - -// -*- C++ -*- -// Definition for Win32 Export directives. -// This file is generated automatically by generate_export_file.pl -// ------------------------------ -#ifndef ETCL_PARSER_EXPORT_H -#define ETCL_PARSER_EXPORT_H - -#include "ace/config-all.h" - -#if defined (ACE_AS_STATIC_LIBS) -# if !defined (ETCL_PARSER_HAS_DLL) -# define ETCL_PARSER_HAS_DLL 0 -# endif /* ! ETCL_PARSER_HAS_DLL */ -#else -# if !defined (ETCL_PARSER_HAS_DLL) -# define ETCL_PARSER_HAS_DLL 1 -# endif /* ! ETCL_PARSER_HAS_DLL */ -#endif - -#if defined (ETCL_PARSER_HAS_DLL) && (ETCL_PARSER_HAS_DLL == 1) -# if defined (ETCL_PARSER_BUILD_DLL) -# define ETCL_Parser_Export ACE_Proper_Export_Flag -# define ETCL_PARSER_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) -# define ETCL_PARSER_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# else /* ETCL_PARSER_BUILD_DLL */ -# define ETCL_Parser_Export ACE_Proper_Import_Flag -# define ETCL_PARSER_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) -# define ETCL_PARSER_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# endif /* ETCL_PARSER_BUILD_DLL */ -#else /* ETCL_PARSER_HAS_DLL == 1 */ -# define ETCL_Parser_Export -# define ETCL_PARSER_SINGLETON_DECLARATION(T) -# define ETCL_PARSER_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -#endif /* ETCL_PARSER_HAS_DLL == 1 */ - -#endif /* ETCL_PARSER_EXPORT_H */ - -// End of auto generated file. diff --git a/modules/worldengine/deps/acelite/ace/Encoding_Converter.cpp b/modules/worldengine/deps/acelite/ace/Encoding_Converter.cpp deleted file mode 100644 index 29a3a1d18f..0000000000 --- a/modules/worldengine/deps/acelite/ace/Encoding_Converter.cpp +++ /dev/null @@ -1,11 +0,0 @@ -#include "ace/Encoding_Converter.h" - -#if defined (ACE_USES_WCHAR) -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_Encoding_Converter::~ACE_Encoding_Converter (void) -{ -} - -ACE_END_VERSIONED_NAMESPACE_DECL -#endif /* ACE_USES_WCHAR */ diff --git a/modules/worldengine/deps/acelite/ace/Encoding_Converter.h b/modules/worldengine/deps/acelite/ace/Encoding_Converter.h deleted file mode 100644 index c430e8f93a..0000000000 --- a/modules/worldengine/deps/acelite/ace/Encoding_Converter.h +++ /dev/null @@ -1,68 +0,0 @@ -// -*- C++ -*- - -//========================================================================= -/** - * @file Encoding_Converter.h - * - * This class is the base class for all encoding converters that convert - * to and from UTF-8. - * - * @author Chad Elliott - */ -//========================================================================= - -#ifndef ACE_ENCODING_CONVERTER_H -#define ACE_ENCODING_CONVERTER_H - -#include /**/ "ace/pre.h" - -#include "ace/Basic_Types.h" - -#if defined (ACE_USES_WCHAR) -#include /**/ "ace/ACE_export.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** The base class for all ACE UTF Encoding Converters. - * This class provides a generic interface that is used to implement - * various UTF encoding conversion classes. - */ -class ACE_Export ACE_Encoding_Converter -{ -public: - /// This enum describes the various states that can be returned - /// from the to_utf8() and from_utf8() methods which depends on - /// both the source buffer and the size of the target buffer. - enum Result {CONVERSION_OK, - SOURCE_EXHAUSTED, - TARGET_EXHAUSTED, - SOURCE_ILLEGAL - }; - - /// This destructor is here (and virtual) because we have virtual - /// functions. - virtual ~ACE_Encoding_Converter (void); - - /// Convert the source (which can be in any encoding) to UTF-8 and - /// store it in the provided target buffer. - virtual Result to_utf8 (const void* source, - size_t source_size, - ACE_Byte* target, - size_t target_size, - bool strict = true) = 0; - - /// Convert the UTF-8 source into an alternate encoding and store it - /// in the provided target buffer. - virtual Result from_utf8 (const ACE_Byte* source, - size_t source_size, - void* target, - size_t target_size, - bool strict = true) = 0; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL -#endif /* ACE_USES_WCHAR */ - -#include /**/ "ace/post.h" - -#endif /* ACE_ENCODING_CONVERTER_H */ diff --git a/modules/worldengine/deps/acelite/ace/Encoding_Converter_Factory.cpp b/modules/worldengine/deps/acelite/ace/Encoding_Converter_Factory.cpp deleted file mode 100644 index 85f139fc11..0000000000 --- a/modules/worldengine/deps/acelite/ace/Encoding_Converter_Factory.cpp +++ /dev/null @@ -1,73 +0,0 @@ -#include "ace/Encoding_Converter_Factory.h" - -#if defined (ACE_USES_WCHAR) -#include "ace/UTF32_Encoding_Converter.h" -#include "ace/UTF16_Encoding_Converter.h" -#include "ace/UTF8_Encoding_Converter.h" -#include "ace/OS_Memory.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_Encoding_Converter* -ACE_Encoding_Converter_Factory::create ( - const ACE_Byte* source, - size_t source_size, - ACE_Encoding_Converter_Factory::Encoding_Hint hint) -{ -#if defined (ACE_BIG_ENDIAN) - bool const convert_for_bigendian = true; -#else - bool const convert_for_bigendian = false; -#endif /* ACE_BIG_ENDIAN */ - ACE_Encoding_Converter* converter = 0; - - switch (hint) - { - case ACE_UTF_32BE: - ACE_NEW_RETURN (converter, - ACE_UTF32_Encoding_Converter (!convert_for_bigendian), - 0); - break; - case ACE_UTF_32LE: - ACE_NEW_RETURN (converter, - ACE_UTF32_Encoding_Converter (convert_for_bigendian), - 0); - break; - case ACE_UTF_16BE: - ACE_NEW_RETURN (converter, - ACE_UTF16_Encoding_Converter (!convert_for_bigendian), - 0); - break; - case ACE_UTF_16LE: - ACE_NEW_RETURN (converter, - ACE_UTF16_Encoding_Converter (convert_for_bigendian), - 0); - break; - case ACE_UTF_8: - ACE_NEW_RETURN (converter, - ACE_UTF8_Encoding_Converter, - 0); - break; - default: - // First check for ASCII since much of ASCII text will appear to - // convert from UTF-16 to UTF-8. - converter = ACE_UTF8_Encoding_Converter::encoded (source, source_size); - if (converter != 0) - return converter; - - // Check for UTF-32 - converter = ACE_UTF32_Encoding_Converter::encoded (source, source_size); - if (converter != 0) - return converter; - - // Check for UTF-16 - converter = ACE_UTF16_Encoding_Converter::encoded (source, source_size); - if (converter != 0) - return converter; - } - - return converter; -} - -ACE_END_VERSIONED_NAMESPACE_DECL -#endif /* ACE_USES_WCHAR */ diff --git a/modules/worldengine/deps/acelite/ace/Encoding_Converter_Factory.h b/modules/worldengine/deps/acelite/ace/Encoding_Converter_Factory.h deleted file mode 100644 index 1a871a4cc5..0000000000 --- a/modules/worldengine/deps/acelite/ace/Encoding_Converter_Factory.h +++ /dev/null @@ -1,52 +0,0 @@ -// -*- C++ -*- - -//========================================================================= -/** - * @file Encoding_Converter_Factory.h - * - * This class can be used to create encoding converters of various types. - * - * @author Chad Elliott - */ -//========================================================================= - -#ifndef ACE_ENCODING_CONVERTER_FACTORY_H -#define ACE_ENCODING_CONVERTER_FACTORY_H - -#include /**/ "ace/pre.h" - -#include "ace/Basic_Types.h" - -#if defined (ACE_USES_WCHAR) -#include /**/ "ace/ACE_export.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -class ACE_Encoding_Converter; - -/** Create an encoding converter based on the source or hint. - * This class allows users to avoid knowing any concrete converter types. - */ -class ACE_Export ACE_Encoding_Converter_Factory -{ -public: - /// This enum is used to tell what type of converter to create. - enum Encoding_Hint { ACE_UTF_32BE, ACE_UTF_32LE, - ACE_UTF_16BE, ACE_UTF_16LE, - ACE_UTF_8, ACE_NONE - }; - - /// Create an encoding converter based on the source. If a hint is - /// given, it just creates the specified type of converter without looking - /// at the source. - static ACE_Encoding_Converter* create (const ACE_Byte* source, - size_t source_size, - Encoding_Hint hint = ACE_NONE); -}; - -ACE_END_VERSIONED_NAMESPACE_DECL -#endif /* ACE_USES_WCHAR */ - -#include /**/ "ace/post.h" - -#endif /* ACE_ENCODING_CONVERTER_FACTORY_H */ diff --git a/modules/worldengine/deps/acelite/ace/Env_Value_T.cpp b/modules/worldengine/deps/acelite/ace/Env_Value_T.cpp deleted file mode 100644 index a63e768440..0000000000 --- a/modules/worldengine/deps/acelite/ace/Env_Value_T.cpp +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef ACE_ENV_VALUE_T_CPP -#define ACE_ENV_VALUE_T_CPP - -#include "ace/Env_Value_T.h" - -#if ! defined (__ACE_INLINE__) -#include "ace/Env_Value_T.inl" -#endif /* __ACE_INLINE__ */ - -#endif /* ACE_ENV_VALUE_T_CPP */ diff --git a/modules/worldengine/deps/acelite/ace/Env_Value_T.h b/modules/worldengine/deps/acelite/ace/Env_Value_T.h deleted file mode 100644 index 4e268d3f93..0000000000 --- a/modules/worldengine/deps/acelite/ace/Env_Value_T.h +++ /dev/null @@ -1,159 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Env_Value_T.h - * - * Template to encapsulate getting a value from an environment variable - * and using a supplied default value if not in the environment. - * - * @author Chris Cleeland (derived from work by Carlos O'Ryan) - */ -//============================================================================= - -#ifndef ACE_ENV_VALUE_T_H -#define ACE_ENV_VALUE_T_H - -#include /**/ "ace/pre.h" - -#include /**/ "ace/config-all.h" -#include "ace/Global_Macros.h" -#include "ace/OS_NS_stdlib.h" -#include "ace/Copy_Disabled.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_Env_Value - * - * @brief Environment Variable Value - * - * Reads a variable from the user environment, providing a default - * value. - */ -template -class ACE_Env_Value : private ACE_Copy_Disabled -{ -public: - /** - * Default constructor which isn't bound to a specific environment - * variable name or a default value. Before being useful it must - * open()'d. - */ - ACE_Env_Value (void); - - /// Constructor that calls open(). - ACE_Env_Value (const ACE_TCHAR *varname, const T &vardefault); - - /// Destroy the value. - ~ACE_Env_Value (void); - - /// Returns the value as type T. - operator T (void); - - /// The constructor, read @a varname from the environment, using - /// @a defval as its value if it is not defined. - void open (const ACE_TCHAR *varname, const T &defval); - - /// Returns the name of the variable being tracked. - const ACE_TCHAR *varname (void) const; - -private: - void fetch_value (void); - - const ACE_TCHAR *varname_; - T value_; -}; - -/// Function to convert a string @a s into type @c T. -template void ACE_Convert (const ACE_TCHAR *s, T &t); - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/Env_Value_T.inl" -#endif /* __ACE_INLINE__ */ - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "ace/Env_Value_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -template <> inline void -ACE_Convert (const ACE_TCHAR *s, ACE_TCHAR *&v) -{ - v = (ACE_TCHAR *) s; -} - -template <> inline void -ACE_Convert (const ACE_TCHAR *s, const ACE_TCHAR *&v) -{ - v = (const ACE_TCHAR *) s; -} - -template <> inline void -ACE_Convert (const ACE_TCHAR *s, short &si) -{ - si = static_cast (ACE_OS::strtol (s, 0, 10)); -} - -template <> inline void -ACE_Convert (const ACE_TCHAR *s, u_short &us) -{ - us = static_cast (ACE_OS::strtol (s, 0, 10)); -} - -template <> inline void -ACE_Convert (const ACE_TCHAR *s, u_int &i) -{ - i = static_cast (ACE_OS::strtol (s, 0, 10)); -} - -template <> inline void -ACE_Convert (const ACE_TCHAR *s, long &l) -{ - l = ACE_OS::strtol (s, 0, 10); -} - -template <> inline void -ACE_Convert (const ACE_TCHAR *s, int &i) -{ - i = static_cast (ACE_OS::strtol (s, 0, 10)); -} - -template <> inline void -ACE_Convert (const ACE_TCHAR *s, u_long &ul) -{ - ul = ACE_OS::strtoul (s, 0, 10); -} - -template <> inline void -ACE_Convert (const ACE_TCHAR *s, double &d) -{ - d = ACE_OS::strtod (s, 0); -} - -// Default calls a CTOR on type T of the form 'T::T(const char*)', but -// users can feel free to create their own specialized conversion -// functions if necessary, as shown above. Note that for 'char*' the -// default is used because a simple cast will be performed and no -// conversion will be necessary. -template inline void -ACE_Convert (const ACE_TCHAR *s, T &t) -{ - t = T (s); -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Env_Value_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ - -#include /**/ "ace/post.h" -#endif /* ACE_ENV_VALUE_T_H */ diff --git a/modules/worldengine/deps/acelite/ace/Env_Value_T.inl b/modules/worldengine/deps/acelite/ace/Env_Value_T.inl deleted file mode 100644 index 1fc1b863f0..0000000000 --- a/modules/worldengine/deps/acelite/ace/Env_Value_T.inl +++ /dev/null @@ -1,58 +0,0 @@ -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -template ACE_INLINE -ACE_Env_Value::operator T (void) -{ - return value_; -} - -template ACE_INLINE -ACE_Env_Value::ACE_Env_Value (void) - : varname_ (0) -{ -} - -template ACE_INLINE -ACE_Env_Value::ACE_Env_Value (const ACE_TCHAR *varname, - const T &defval) - : varname_ (varname), - value_(defval) -{ - this->fetch_value (); -} - -template ACE_INLINE void -ACE_Env_Value::open (const ACE_TCHAR *varname, - const T &defval) -{ - this->varname_ = varname; - this->value_ = defval; - this->fetch_value (); -} - -template ACE_INLINE void -ACE_Env_Value::fetch_value (void) -{ -#if defined (ACE_WIN32) - const ACE_TCHAR *env = ACE_OS::getenv (this->varname_); - if (env != 0) - ACE_Convert (env, value_); -#else - char *nenv = ACE_OS::getenv (ACE_TEXT_ALWAYS_CHAR (this->varname_)); - if (nenv != 0) - ACE_Convert (ACE_TEXT_CHAR_TO_TCHAR (nenv), this->value_); -#endif -} - -template ACE_INLINE const ACE_TCHAR* -ACE_Env_Value::varname (void) const -{ - return this->varname_; -} - -template ACE_INLINE -ACE_Env_Value::~ACE_Env_Value (void) -{ -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Event.cpp b/modules/worldengine/deps/acelite/ace/Event.cpp deleted file mode 100644 index 72a15d3ba8..0000000000 --- a/modules/worldengine/deps/acelite/ace/Event.cpp +++ /dev/null @@ -1,14 +0,0 @@ -#include "ace/Event.h" - -#if !defined (__ACE_INLINE__) -//#include "ace/Event.inl" -#endif /* __ACE_INLINE__ */ - -#include "ace/Log_Category.h" -#include "ace/Condition_Attributes.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - - - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Event.h b/modules/worldengine/deps/acelite/ace/Event.h deleted file mode 100644 index d7fdcd4af3..0000000000 --- a/modules/worldengine/deps/acelite/ace/Event.h +++ /dev/null @@ -1,115 +0,0 @@ -// -*- C++ -*- - -//========================================================================== -/** - * @file Event.h - * - * Moved from Synch.h. - * - * @author Douglas C. Schmidt - */ -//========================================================================== - -#ifndef ACE_EVENT_H -#define ACE_EVENT_H -#include /**/ "ace/pre.h" - -#include /**/ "ace/ACE_export.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Event_Base.h" -#include "ace/Time_Policy.h" -#include "ace/Time_Value_T.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_Event_T - * - * @brief A wrapper around the Win32 event locking mechanism. - * - * Portable implementation of an Event mechanism, which is native to - * Win32, but must be emulated on UNIX. All platforms support - * process-scope locking support. However, only Win32 platforms - * support global naming and system-scope locking support. - */ -template -class ACE_Event_T : public ACE_Event_Base -{ -public: - /// Constructor that creates event. - ACE_Event_T (int manual_reset = 0, - int initial_state = 0, - int type = USYNC_THREAD, - const ACE_TCHAR *name = 0, - void *arg = 0, - LPSECURITY_ATTRIBUTES sa = 0) : ACE_Event_Base () - { - ACE_Condition_Attributes_T cond_attr (type); - if (ACE_OS::event_init (&this->handle_, - type, - &const_cast (cond_attr.attributes ()), - manual_reset, - initial_state, - name, - arg, - sa) != 0) - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("%p\n"), - ACE_TEXT ("ACE_Event_T::ACE_Event_T"))); - } - - /// Implicitly destroy the event variable. - virtual ~ACE_Event_T (void) - { - } - - /// Get the current time of day according to the queue's TIME_POLICY. - /// Allows users to initialize timeout values using correct time policy. - ACE_Time_Value_T gettimeofday (void) const - { - return this->time_policy_ (); - } - - /// Allows applications to control how the event gets the time - /// of day. - void set_time_policy (TIME_POLICY const & time_policy) - { - this->time_policy_ = rhs; - } - - /// Declare the dynamic allocation hooks - ACE_ALLOC_HOOK_DECLARE; - -protected: - - /// The policy to return the current time of day - TIME_POLICY time_policy_; - -private: - // = Prevent copying. - ACE_Event_T (const ACE_Event_T& event); - const ACE_Event_T &operator= (const ACE_Event_T &rhs); -}; - -typedef ACE_Event_T ACE_Event; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/Event.inl" -#endif /* __ACE_INLINE__ */ - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "ace/Event.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Event.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ - -#include /**/ "ace/post.h" -#endif /* ACE_EVENT_H */ diff --git a/modules/worldengine/deps/acelite/ace/Event.inl b/modules/worldengine/deps/acelite/ace/Event.inl deleted file mode 100644 index e1facac51a..0000000000 --- a/modules/worldengine/deps/acelite/ace/Event.inl +++ /dev/null @@ -1,4 +0,0 @@ -// -*- C++ -*- -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Event_Base.cpp b/modules/worldengine/deps/acelite/ace/Event_Base.cpp deleted file mode 100644 index ac191b0840..0000000000 --- a/modules/worldengine/deps/acelite/ace/Event_Base.cpp +++ /dev/null @@ -1,74 +0,0 @@ -#include "ace/Event_Base.h" - -#if !defined (__ACE_INLINE__) -#include "ace/Event_Base.inl" -#endif /* __ACE_INLINE__ */ - -#include "ace/Log_Category.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_Event_Base::ACE_Event_Base () - : removed_ (false) -{ -} - -ACE_Event_Base::~ACE_Event_Base (void) -{ - this->remove (); -} - -int -ACE_Event_Base::remove (void) -{ - int result = 0; - if (!this->removed_) - { - this->removed_ = true; - result = ACE_OS::event_destroy (&this->handle_); - } - return result; -} - -int -ACE_Event_Base::wait (void) -{ - return ACE_OS::event_wait (&this->handle_); -} - -int -ACE_Event_Base::wait (const ACE_Time_Value *abstime, int use_absolute_time) -{ - return ACE_OS::event_timedwait (&this->handle_, - const_cast (abstime), - use_absolute_time); -} - -int -ACE_Event_Base::signal (void) -{ - return ACE_OS::event_signal (&this->handle_); -} - -int -ACE_Event_Base::pulse (void) -{ - return ACE_OS::event_pulse (&this->handle_); -} - -int -ACE_Event_Base::reset (void) -{ - return ACE_OS::event_reset (&this->handle_); -} - -void -ACE_Event_Base::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Event_Base.h b/modules/worldengine/deps/acelite/ace/Event_Base.h deleted file mode 100644 index a158c5e67f..0000000000 --- a/modules/worldengine/deps/acelite/ace/Event_Base.h +++ /dev/null @@ -1,139 +0,0 @@ -// -*- C++ -*- - -//========================================================================== -/** - * @file Event_Base.h - * - * Moved from Synch.h. - * - * @author Martin Corino - */ -//========================================================================== - -#ifndef ACE_EVENT_BASE_H -#define ACE_EVENT_BASE_H -#include /**/ "ace/pre.h" - -#include /**/ "ace/ACE_export.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/OS_NS_Thread.h" -#include "ace/Time_Value.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_Event_Base - * - * @brief A base class for wrappers around the Win32 event locking - * mechanism. - * - * Portable implementation of an Event mechanism, which is native to - * Win32, but must be emulated on UNIX. All platforms support - * process-scope locking support. However, only Win32 platforms - * support global naming and system-scope locking support. - */ -class ACE_Export ACE_Event_Base -{ -public: - /// Implicitly destroy the event variable. - virtual ~ACE_Event_Base (void); - - /** - * Explicitly destroy the event variable. Note that only one thread - * should call this method since it doesn't protect against race - * conditions. - */ - int remove (void); - - /// Underlying handle to event. - ACE_event_t handle (void) const; - - /** - * Set the underlying handle to event. Note that this method assumes - * ownership of the and will close it down in . If - * you want the to stay open when is called make - * sure to call on the before closing it. You are - * responsible for the closing the existing before - * overwriting it. - */ - void handle (ACE_event_t new_handle); - - /** - * if MANUAL reset - * sleep till the event becomes signaled - * event remains signaled after wait() completes. - * else AUTO reset - * sleep till the event becomes signaled - * event resets wait() completes. - */ - int wait (void); - - /// Same as wait() above, but this one can be timed - /// @a abstime is absolute time-of-day if if @a use_absolute_time - /// is non-0, else it is relative time. - int wait (const ACE_Time_Value *abstime, - int use_absolute_time = 1); - - /** - * if MANUAL reset - * wake up all waiting threads - * set to signaled state - * else AUTO reset - * if no thread is waiting, set to signaled state - * if thread(s) are waiting, wake up one waiting thread and - * reset event - */ - int signal (void); - - /** - * if MANUAL reset - * wakeup all waiting threads and - * reset event - * else AUTO reset - * wakeup one waiting thread (if present) and - * reset event - */ - int pulse (void); - - /// Set to nonsignaled state. - int reset (void); - - /// Dump the state of an object. - void dump (void) const; - - /// Declare the dynamic allocation hooks - ACE_ALLOC_HOOK_DECLARE; - -protected: - /// Only derived classes allowed to construct event. - ACE_Event_Base (); - - - /// The underlying handle. - ACE_event_t handle_; - - /// Keeps track of whether has been called yet to avoid - /// multiple calls, e.g., explicitly and implicitly in the - /// destructor. This flag isn't protected by a lock, so make sure - /// that you don't have multiple threads simultaneously calling - /// on the same object, which is a bad idea anyway... - bool removed_; - -private: - // = Prevent copying. - ACE_Event_Base (const ACE_Event_Base& event); - const ACE_Event_Base &operator= (const ACE_Event_Base &rhs); -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/Event_Base.inl" -#endif /* __ACE_INLINE__ */ - -#include /**/ "ace/post.h" -#endif /* ACE_EVENT_BASE_H */ diff --git a/modules/worldengine/deps/acelite/ace/Event_Base.inl b/modules/worldengine/deps/acelite/ace/Event_Base.inl deleted file mode 100644 index fa8cf909e2..0000000000 --- a/modules/worldengine/deps/acelite/ace/Event_Base.inl +++ /dev/null @@ -1,16 +0,0 @@ -// -*- C++ -*- -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_INLINE ACE_event_t -ACE_Event_Base::handle (void) const -{ - return this->handle_; -} - -ACE_INLINE void -ACE_Event_Base::handle (ACE_event_t new_handle) -{ - this->handle_ = new_handle; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Event_Handler.cpp b/modules/worldengine/deps/acelite/ace/Event_Handler.cpp deleted file mode 100644 index 82e6879bed..0000000000 --- a/modules/worldengine/deps/acelite/ace/Event_Handler.cpp +++ /dev/null @@ -1,410 +0,0 @@ -// Event_Handler.cpp -#include "ace/Event_Handler.h" -#include "ace/OS_Errno.h" -#include "ace/Reactor.h" -#include "ace/Thread_Manager.h" -/* Need to see if ACE_HAS_BUILTIN_ATOMIC_OP defined */ -#include "ace/Atomic_Op.h" - -#if !defined (__ACE_INLINE__) -#include "ace/Event_Handler.inl" -#endif /* __ACE_INLINE__ */ - -#include - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -// Implement conceptually abstract virtual functions in the base class -// so derived classes don't have to implement unused ones. - -ACE_Event_Handler::ACE_Event_Handler (ACE_Reactor *r, - int p) - : reference_count_ (1), - priority_ (p), - reactor_ (r), - reference_counting_policy_ (Reference_Counting_Policy::DISABLED) -{ - // ACE_TRACE ("ACE_Event_Handler::ACE_Event_Handler"); -} - -ACE_Event_Handler::~ACE_Event_Handler (void) -{ - // ACE_TRACE ("ACE_Event_Handler::~ACE_Event_Handler"); -} - -// Gets the file descriptor associated with this I/O device. - -ACE_HANDLE -ACE_Event_Handler::get_handle (void) const -{ - ACE_TRACE ("ACE_Event_Handler::get_handle"); - return ACE_INVALID_HANDLE; -} - -// Sets the file descriptor associated with this I/O device. - -void -ACE_Event_Handler::set_handle (ACE_HANDLE) -{ - ACE_TRACE ("ACE_Event_Handler::set_handle"); -} - -// Gets the priority of this handler. - -int -ACE_Event_Handler::priority (void) const -{ - ACE_TRACE ("ACE_Event_Handler::priority"); - return this->priority_; -} - -// Sets the priority - -void -ACE_Event_Handler::priority (int priority) -{ - ACE_TRACE ("ACE_Event_Handler::priority"); - this->priority_ = priority; -} - -// Called when the object is about to be removed from the Dispatcher -// tables. - -int -ACE_Event_Handler::handle_close (ACE_HANDLE, ACE_Reactor_Mask) -{ - ACE_TRACE ("ACE_Event_Handler::handle_close"); - return -1; -} - -// Called when input becomes available on fd. - -int -ACE_Event_Handler::handle_input (ACE_HANDLE) -{ - ACE_TRACE ("ACE_Event_Handler::handle_input"); - return -1; -} - -// Called when output is possible on fd. - -int -ACE_Event_Handler::handle_output (ACE_HANDLE) -{ - ACE_TRACE ("ACE_Event_Handler::handle_output"); - return -1; -} - -// Called when urgent data is available on fd. - -int -ACE_Event_Handler::handle_exception (ACE_HANDLE) -{ - ACE_TRACE ("ACE_Event_Handler::handle_exception"); - return -1; -} - -// Called when timer expires, TV stores the current time. - -int -ACE_Event_Handler::handle_timeout (const ACE_Time_Value &, const void *) -{ - ACE_TRACE ("ACE_Event_Handler::handle_timeout"); - return -1; -} - -// Called when a monitored Process exits - -int -ACE_Event_Handler::handle_exit (ACE_Process *) -{ - ACE_TRACE ("ACE_Event_Handler::handle_exit"); - return -1; -} - -// Called when a registered signal occurs. - -int -ACE_Event_Handler::handle_signal (int, siginfo_t *, ucontext_t *) -{ - ACE_TRACE ("ACE_Event_Handler::handle_signal"); - return -1; -} - -int -ACE_Event_Handler::resume_handler (void) -{ - ACE_TRACE ("ACE_Event_Handler::resume_handler"); - - // Return a default value and allow the reactor to take care of - // resuming the handler - return ACE_Event_Handler::ACE_REACTOR_RESUMES_HANDLER; -} - - -int -ACE_Event_Handler::handle_qos (ACE_HANDLE) -{ - ACE_TRACE ("ACE_Event_Handler::handle_qos"); - return -1; -} - -int -ACE_Event_Handler::handle_group_qos (ACE_HANDLE) -{ - ACE_TRACE ("ACE_Event_Handler::handle_group_qos"); - return -1; -} - -void -ACE_Event_Handler::reactor (ACE_Reactor *reactor) -{ - ACE_TRACE ("ACE_Event_Handler::reactor"); - this->reactor_ = reactor; -} - -ACE_Reactor * -ACE_Event_Handler::reactor (void) const -{ - ACE_TRACE ("ACE_Event_Handler::reactor"); - return this->reactor_; -} - -ACE_Reactor_Timer_Interface * -ACE_Event_Handler::reactor_timer_interface (void) const -{ - ACE_TRACE ("ACE_Event_Handler::reactor_timer_interface"); - return this->reactor_; -} - -ACE_Event_Handler::Reference_Count -ACE_Event_Handler::add_reference (void) -{ - bool const reference_counting_required = - this->reference_counting_policy ().value () == - ACE_Event_Handler::Reference_Counting_Policy::ENABLED; - - if (reference_counting_required) - return ++this->reference_count_; - else - return 1; -} - -ACE_Event_Handler::Reference_Count -ACE_Event_Handler::remove_reference (void) -{ - bool const reference_counting_required = - this->reference_counting_policy ().value () == - ACE_Event_Handler::Reference_Counting_Policy::ENABLED; - - if (reference_counting_required) - { - Reference_Count result = - --this->reference_count_; - - if (result == 0) - delete this; - - return result; - } - else - { - return 1; - } -} - -ACE_Event_Handler::Policy::~Policy (void) -{ -} - -ACE_Event_Handler::Reference_Counting_Policy::Reference_Counting_Policy (Reference_Counting_Policy::Value value) - : value_ (value) -{ -} - -ACE_Event_Handler::Reference_Counting_Policy::Value -ACE_Event_Handler::Reference_Counting_Policy::value (void) const -{ - return this->value_; -} - -void -ACE_Event_Handler::Reference_Counting_Policy::value (ACE_Event_Handler::Reference_Counting_Policy::Value value) -{ - this->value_ = value; -} - -ACE_Event_Handler::Reference_Counting_Policy & -ACE_Event_Handler::reference_counting_policy (void) -{ - return this->reference_counting_policy_; -} - -ACE_THR_FUNC_RETURN -ACE_Event_Handler::read_adapter (void *args) -{ - ACE_Event_Handler *this_ptr = static_cast (args); - ACE_Reactor *r = this_ptr->reactor (); - - while (this_ptr->handle_input (ACE_STDIN) != -1) - continue; - - this_ptr->handle_close (ACE_STDIN, ACE_Event_Handler::READ_MASK); - // It's possible for handle_close() to "delete this" so we need to - // cache the reactor pointer and use it here. - r->notify (); - - return 0; -} - -int -ACE_Event_Handler::register_stdin_handler (ACE_Event_Handler *eh, - ACE_Reactor *reactor, - ACE_Thread_Manager *thr_mgr, - int flags) -{ -#if defined (ACE_WIN32) - ACE_UNUSED_ARG (reactor); - - eh->reactor (reactor); - return thr_mgr->spawn (&read_adapter, static_cast (eh), flags); -#else - // Keep compilers happy. - ACE_UNUSED_ARG (flags); - ACE_UNUSED_ARG (thr_mgr); - return reactor->register_handler (ACE_STDIN, - eh, - ACE_Event_Handler::READ_MASK); -#endif /* ACE_WIN32 */ -} - -int -ACE_Event_Handler::remove_stdin_handler (ACE_Reactor *reactor, - ACE_Thread_Manager * /* thr_mgr */) -{ -#if defined (ACE_WIN32) - ACE_UNUSED_ARG (reactor); - - // What should we do here? - ACE_NOTSUP_RETURN (-1); -#else - return reactor->remove_handler (ACE_STDIN, - ACE_Event_Handler::READ_MASK); -#endif /* ACE_WIN32 */ -} - -// --------------------------------------------------------------------- - -ACE_Event_Handler_var::ACE_Event_Handler_var (void) - : ptr_ (0) -{ -} - -ACE_Event_Handler_var::ACE_Event_Handler_var (ACE_Event_Handler *p) - : ptr_ (p) -{ -} - -ACE_Event_Handler_var::ACE_Event_Handler_var (const ACE_Event_Handler_var &b) - : ptr_ (b.ptr_) -{ - if (this->ptr_ != 0) - { - this->ptr_->add_reference (); - } -} - -ACE_Event_Handler_var::~ACE_Event_Handler_var (void) -{ - if (this->ptr_ != 0) - { - ACE_Errno_Guard eguard (errno); - this->ptr_->remove_reference (); - } -} - -ACE_Event_Handler_var & -ACE_Event_Handler_var::operator= (ACE_Event_Handler *p) -{ - if (this->ptr_ != p) - { - ACE_Event_Handler_var tmp (p); - std::swap (this->ptr_, tmp.ptr_); - } - - return *this; -} - -ACE_Event_Handler_var & -ACE_Event_Handler_var::operator= (const ACE_Event_Handler_var &b) -{ - ACE_Event_Handler_var tmp (b); - std::swap (this->ptr_, tmp.ptr_); - - return *this; -} - -ACE_Event_Handler * -ACE_Event_Handler_var::operator->() const -{ - return this->ptr_; -} - -ACE_Event_Handler * -ACE_Event_Handler_var::handler (void) const -{ - return this->ptr_; -} - -ACE_Event_Handler * -ACE_Event_Handler_var::release (void) -{ - ACE_Event_Handler * const old = this->ptr_; - this->ptr_ = 0; - return old; -} - -void -ACE_Event_Handler_var::reset (ACE_Event_Handler *p) -{ - *this = p; -} - -#if defined (ACE_HAS_CPP11) -ACE_Event_Handler_var::operator bool() const -{ - return this->ptr_ == nullptr ? false : true; -} - -bool -ACE_Event_Handler_var::operator ==(std::nullptr_t) const -{ - return this->ptr_ == nullptr ? true : false; -} - -bool -ACE_Event_Handler_var::operator !=(std::nullptr_t) const -{ - return this->ptr_ == nullptr ? false : true; - -} -#endif /* ACE_HAS_CPP11 */ - -// --------------------------------------------------------------------- - -ACE_Notification_Buffer::ACE_Notification_Buffer (void) - : eh_ (0), - mask_ (ACE_Event_Handler::NULL_MASK) -{ - ACE_TRACE ("ACE_Notification_Buffer::ACE_Notification_Buffer"); -} - -ACE_Notification_Buffer::ACE_Notification_Buffer (ACE_Event_Handler *eh, - ACE_Reactor_Mask mask) - : eh_ (eh), - mask_ (mask) -{ - ACE_TRACE ("ACE_Notification_Buffer::ACE_Notification_Buffer"); -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Event_Handler.h b/modules/worldengine/deps/acelite/ace/Event_Handler.h deleted file mode 100644 index 3b4f9bb94f..0000000000 --- a/modules/worldengine/deps/acelite/ace/Event_Handler.h +++ /dev/null @@ -1,425 +0,0 @@ -/* -*- C++ -*- */ - -//========================================================================== -/** - * @file Event_Handler.h - * - * @author Douglas C. Schmidt - */ -//========================================================================== - -#ifndef ACE_EVENT_HANDLER_H -#define ACE_EVENT_HANDLER_H -#include /**/ "ace/pre.h" - -#include /**/ "ace/ACE_export.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/os_include/os_signal.h" -#include "ace/Atomic_Op.h" -#include "ace/Synch_Traits.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -// Forward declaration. -class ACE_Message_Block; -class ACE_Reactor; -class ACE_Reactor_Timer_Interface; -class ACE_Thread_Manager; -class ACE_Process; - -typedef unsigned long ACE_Reactor_Mask; - -/** - * @class ACE_Event_Handler - * - * @brief - * Provides an abstract interface for handling various types of - * I/O, timer, and signal events. - * - * Subclasses read/write input/output on an I/O descriptor, - * handle an exception raised on an I/O descriptor, handle a - * timer's expiration, or handle a signal. - */ -class ACE_Export ACE_Event_Handler -{ -public: - enum - { - LO_PRIORITY = 0, - HI_PRIORITY = 10, - NULL_MASK = 0, -#if defined (ACE_USE_POLL) - READ_MASK = POLLIN, - WRITE_MASK = POLLOUT, - EXCEPT_MASK = POLLPRI, -#else /* USE SELECT */ - READ_MASK = (1 << 0), - WRITE_MASK = (1 << 1), - EXCEPT_MASK = (1 << 2), -#endif /* ACE_USE_POLL */ - ACCEPT_MASK = (1 << 3), - CONNECT_MASK = (1 << 4), - TIMER_MASK = (1 << 5), - QOS_MASK = (1 << 6), - GROUP_QOS_MASK = (1 << 7), - SIGNAL_MASK = (1 << 8), - ALL_EVENTS_MASK = READ_MASK | - WRITE_MASK | - EXCEPT_MASK | - ACCEPT_MASK | - CONNECT_MASK | - TIMER_MASK | - QOS_MASK | - GROUP_QOS_MASK | - SIGNAL_MASK, - RWE_MASK = READ_MASK | - WRITE_MASK | - EXCEPT_MASK, - DONT_CALL = (1 << 9) - }; - - /// Destructor is virtual to enable proper cleanup. - virtual ~ACE_Event_Handler (void); - - /// Get the I/O handle. - virtual ACE_HANDLE get_handle (void) const; - - /// Set the I/O handle. - virtual void set_handle (ACE_HANDLE); - - // = Get/set priority - - /// Get the priority of the Event_Handler. - /// @note Priorities run from MIN_PRIORITY (which is the "lowest priority") - /// to MAX_PRIORITY (which is the "highest priority"). - virtual int priority (void) const; - - /// Set the priority of the Event_Handler. - virtual void priority (int priority); - - /// Called when input events occur (e.g., connection or data). - virtual int handle_input (ACE_HANDLE fd = ACE_INVALID_HANDLE); - - /// Called when output events are possible (e.g., when flow control - /// abates or non-blocking connection completes). - virtual int handle_output (ACE_HANDLE fd = ACE_INVALID_HANDLE); - - /// Called when an exceptional events occur (e.g., SIGURG). - virtual int handle_exception (ACE_HANDLE fd = ACE_INVALID_HANDLE); - - /** - * Called when timer expires. @a current_time represents the current - * time that the Event_Handler was selected for timeout - * dispatching and @a act is the asynchronous completion token that - * was passed in when was invoked. - */ - virtual int handle_timeout (const ACE_Time_Value ¤t_time, - const void *act = 0); - - /// Called when a process exits. - virtual int handle_exit (ACE_Process *); - - /// Called when a handle_*() method returns -1 or when the - /// remove_handler() method is called on an ACE_Reactor. The - /// @a close_mask indicates which event has triggered the - /// handle_close() method callback on a particular @a handle. - virtual int handle_close (ACE_HANDLE handle, - ACE_Reactor_Mask close_mask); - - /// Called when object is signaled by OS (either via UNIX signals or - /// when a Win32 object becomes signaled). - virtual int handle_signal (int signum, siginfo_t * = 0, ucontext_t * = 0); - - enum - { - /// The handler is not resumed at all. Could lead to deadlock.. - ACE_EVENT_HANDLER_NOT_RESUMED = -1, - /// The reactor takes responsibility of resuming the handler and - /// is the default - ACE_REACTOR_RESUMES_HANDLER = 0, - /// The application takes responsibility of resuming the handler - ACE_APPLICATION_RESUMES_HANDLER - }; - - /** - * Called to figure out whether the handler needs to resumed by the - * reactor or the application can take care of it. The default - * value of 0 would be returned which would allow the reactor to - * take care of resumption of the handler. The application can - * return a value more than zero and decide to resume the handler - * themselves. - * - * @note This method has an affect only when used with the - * ACE_Dev_Poll_Reactor (and then, only on Linux) or the ACE_TP_Reactor. - */ - virtual int resume_handler (void); - - virtual int handle_qos (ACE_HANDLE = ACE_INVALID_HANDLE); - virtual int handle_group_qos (ACE_HANDLE = ACE_INVALID_HANDLE); - - // = Accessors to set/get the various event demultiplexors. - /// Set the event demultiplexors. - virtual void reactor (ACE_Reactor *reactor); - - /// Get the event demultiplexors. - virtual ACE_Reactor *reactor (void) const; - - /// Get only the reactor's timer related interface. - virtual ACE_Reactor_Timer_Interface *reactor_timer_interface (void) const; - - /** - * Used to read from non-socket ACE_HANDLEs in our own thread to - * work around Win32 limitations that don't allow us to 'able on - * Win32. - */ - static int register_stdin_handler (ACE_Event_Handler *eh, - ACE_Reactor *reactor, - ACE_Thread_Manager *thr_mgr, - int flags = THR_DETACHED); - - /// Performs the inverse of the register_stdin_handler() method. - static int remove_stdin_handler (ACE_Reactor *reactor, - ACE_Thread_Manager *thr_mgr); - - /// Reference count type. - typedef long Reference_Count; - - /// Increment reference count on the handler. - /** - * This method is called when the handler is registered with the - * Reactor and when the Reactor makes an upcall on the handler. - * Reference count is 1 when the handler is created. - * - * @return Current reference count. - */ - virtual Reference_Count add_reference (void); - - /// Decrement reference count on the handler. - /** - * This method is called when the handler is removed from the - * Reactor and when an upcall made on the handler by the Reactor - * completes. Handler is deleted when the reference count reaches - * 0. - * - * @return Current reference count. - */ - virtual Reference_Count remove_reference (void); - - /** - * @class Policy - * - * @brief Base class for all handler policies. - */ - class ACE_Export Policy - { - - public: - - /// Virtual destructor. - virtual ~Policy (void); - }; - - /** - * @class Reference_Counting_Policy - * - * @brief - * This policy dictates the reference counting requirements - * for the handler. - * - * This policy allows applications to configure whether it wants the - * Reactor to call add_reference() and remove_reference() during - * registrations, removals, and upcalls. - * - * Default: DISABLED. - */ - class ACE_Export Reference_Counting_Policy : public Policy - { - /// This policy can only be created by the handler. - friend class ACE_Event_Handler; - - public: - - enum Value - { - /// Perform reference counting. - ENABLED, - /// Don't perform reference counting. - DISABLED - }; - - /// Current Reference_Counting_Policy. - Value value (void) const; - - /// Update Reference_Counting_Policy. - void value (Value value); - - private: - - /// Private constructor. - Reference_Counting_Policy (Value value); - - /// The value of the policy. - Value value_; - }; - - /// Current Reference_Counting_Policy. - Reference_Counting_Policy &reference_counting_policy (void); - -protected: - /// Force ACE_Event_Handler to be an abstract base class. - ACE_Event_Handler (ACE_Reactor * = 0, - int priority = ACE_Event_Handler::LO_PRIORITY); - - /// Typedef for implementation of reference counting. - typedef ACE_Atomic_Op Atomic_Reference_Count; - - /// Reference count. - Atomic_Reference_Count reference_count_; - -private: - - /// Priority of this Event_Handler. - int priority_; - - /// Pointer to the various event demultiplexors. - ACE_Reactor *reactor_; - - /// Reference counting requirements. - Reference_Counting_Policy reference_counting_policy_; -}; - -/** - * @class ACE_Event_Handler_var - * - * @brief Auto pointer like class for Event Handlers. - * - * Used to manage lifecycle of handlers. This class calls - * ACE_Event_Handler::remove_reference() in its destructor. - */ -class ACE_Export ACE_Event_Handler_var -{ -public: - /// Default constructor. - ACE_Event_Handler_var (void); - - /// Construct with a handler. - ACE_Event_Handler_var (ACE_Event_Handler *p); - - /// Copy constructor. - ACE_Event_Handler_var (const ACE_Event_Handler_var &b); - - /// Destructor. - ~ACE_Event_Handler_var (void); - - /// Assignment to a handler. - ACE_Event_Handler_var &operator= (ACE_Event_Handler *p); - - /// Assignment to a ACE_Event_Handler_var. - ACE_Event_Handler_var &operator= (const ACE_Event_Handler_var &b); - - /// Overloaded "->". - ACE_Event_Handler *operator-> () const; - - /// Access the handler. - ACE_Event_Handler *handler (void) const; - - /// Release the handler. - ACE_Event_Handler *release (void); - - /// Reset the handler. - void reset (ACE_Event_Handler *p = 0); - -#if defined (ACE_HAS_CPP11) - /// Bool operator to check if the ACE_Event_Handler_var has a value - explicit operator bool() const; - /// Equality operator to compare with nullptr_t - bool operator ==(std::nullptr_t) const; - /// Not equal operator to compare with nullptr_t - bool operator !=(std::nullptr_t) const; -#endif - -private: - - /// Handler. - ACE_Event_Handler *ptr_; -}; - -#if defined ACE_HAS_CPP11 - -/// Define that we can use in user code to check if this -/// helper factory method is there -#define ACE_HAS_ACE_MAKE_EVENT_HANDLER - -namespace ACE -{ - /// With C++11 it is common to not use C++ new and delete, but - /// use std::make_shared and std::make_unique. This will not - /// work for ACE event handlers so we introduce a new - /// ACE::make_event_handler which can be used in user code to - /// allocate a new ACE event handler instance and directly assign - /// it to a ACE_Event_Handler_var - /// As user this now makes it for example possible to implement - /// the following when Simple_Handler is derived from ACE_Event_Handler - /// ACE_Event_Handler_var v = - /// ACE::make_event_handler (reactor.get()); - template::value>::type, - typename ...Args> inline - ACE_Event_Handler_var make_event_handler (Args&& ...args) - { - return ACE_Event_Handler_var (new T (std::forward (args)...)); - } -} - -#endif - -/** - * @class ACE_Notification_Buffer - * - * @brief Simple wrapper for passing ACE_Event_Handler *s and - * ACE_Reactor_Masks between threads. - */ -class ACE_Export ACE_Notification_Buffer -{ -public: - ACE_Notification_Buffer (void); - - ACE_Notification_Buffer (ACE_Event_Handler *eh, - ACE_Reactor_Mask mask); - - /// Default destructor. - ~ACE_Notification_Buffer (void); - - /// Pointer to the Event_Handler that will be dispatched - /// by the main event loop. - ACE_Event_Handler *eh_; - - /// Mask that indicates which method to call. - ACE_Reactor_Mask mask_; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/Event_Handler.inl" -#endif /* __ACE_INLINE__ */ - -#include /**/ "ace/post.h" -#endif /* ACE_EVENT_HANDLER_H */ diff --git a/modules/worldengine/deps/acelite/ace/Event_Handler.inl b/modules/worldengine/deps/acelite/ace/Event_Handler.inl deleted file mode 100644 index 4ad5d2d26b..0000000000 --- a/modules/worldengine/deps/acelite/ace/Event_Handler.inl +++ /dev/null @@ -1,9 +0,0 @@ -// -*- C++ -*- -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_INLINE -ACE_Notification_Buffer::~ACE_Notification_Buffer (void) -{ -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Event_Handler_Handle_Timeout_Upcall.cpp b/modules/worldengine/deps/acelite/ace/Event_Handler_Handle_Timeout_Upcall.cpp deleted file mode 100644 index c2edf3d2df..0000000000 --- a/modules/worldengine/deps/acelite/ace/Event_Handler_Handle_Timeout_Upcall.cpp +++ /dev/null @@ -1,97 +0,0 @@ -#include "ace/Event_Handler_Handle_Timeout_Upcall.h" -#include "ace/Reactor_Timer_Interface.h" -#include "ace/Abstract_Timer_Queue.h" - -#if !defined(__ACE_INLINE__) -# include "ace/Event_Handler_Handle_Timeout_Upcall.inl" -#endif /* __ACE_INLINE__ */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_Event_Handler_Handle_Timeout_Upcall:: -ACE_Event_Handler_Handle_Timeout_Upcall (void) : - requires_reference_counting_ (0) -{ -} - -ACE_Event_Handler_Handle_Timeout_Upcall:: -~ACE_Event_Handler_Handle_Timeout_Upcall (void) -{ -} - -int -ACE_Event_Handler_Handle_Timeout_Upcall:: -timeout (ACE_Timer_Queue &timer_queue, - ACE_Event_Handler *event_handler, - const void *act, - int recurring_timer, - const ACE_Time_Value &cur_time) -{ - int requires_reference_counting = 0; - - if (!recurring_timer) - { - requires_reference_counting = - event_handler->reference_counting_policy ().value () == - ACE_Event_Handler::Reference_Counting_Policy::ENABLED; - } - - // Upcall to the s handle_timeout method. - if (event_handler->handle_timeout (cur_time, act) == -1) - { - if (event_handler->reactor_timer_interface ()) - event_handler->reactor_timer_interface ()->cancel_timer (event_handler, 0); - else - timer_queue.cancel (event_handler, 0); // 0 means "call handle_close()". - } - - if (!recurring_timer && - requires_reference_counting) - { - event_handler->remove_reference (); - } - - return 0; -} - -int -ACE_Event_Handler_Handle_Timeout_Upcall:: -cancel_type (ACE_Timer_Queue &, - ACE_Event_Handler *event_handler, - int dont_call, - int &requires_reference_counting) -{ - requires_reference_counting = - event_handler->reference_counting_policy ().value () == - ACE_Event_Handler::Reference_Counting_Policy::ENABLED; - - // Upcall to the s handle_close method - if (dont_call == 0) - event_handler->handle_close (ACE_INVALID_HANDLE, - ACE_Event_Handler::TIMER_MASK); - - return 0; -} - -int -ACE_Event_Handler_Handle_Timeout_Upcall:: -deletion (ACE_Timer_Queue &timer_queue, - ACE_Event_Handler *event_handler, - const void *) -{ - int requires_reference_counting = 0; - - this->cancel_type (timer_queue, - event_handler, - 0, - requires_reference_counting); - - this->cancel_timer (timer_queue, - event_handler, - 0, - requires_reference_counting); - - return 0; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Event_Handler_Handle_Timeout_Upcall.h b/modules/worldengine/deps/acelite/ace/Event_Handler_Handle_Timeout_Upcall.h deleted file mode 100644 index 200e2e4724..0000000000 --- a/modules/worldengine/deps/acelite/ace/Event_Handler_Handle_Timeout_Upcall.h +++ /dev/null @@ -1,101 +0,0 @@ -#ifndef ACE_EVENT_HANDLER_HANDLE_TIMEOUT_UPCALL_H -#define ACE_EVENT_HANDLER_HANDLE_TIMEOUT_UPCALL_H - -#include /**/ "ace/pre.h" - -/** - * @file Event_Handler_Handle_Timeout_Upcall.h - * - * @author Carlos O'Ryan - * - * Based on classes and files developed by Doug Schmidt, Darrell - * Brunsch, Irfan Pyarali and a cast of thousands. - */ - -#include "ace/Timer_Queuefwd.h" -#include "ace/Copy_Disabled.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -class ACE_Time_Value; - -/** - * @class ACE_Event_Handler_Handle_Timeout_Upcall - * - * @brief Functor for Timer_Queues. - * - * This class implements the functor required by the Timer - * Queue to call on ACE_Event_Handlers. - */ -class ACE_Export ACE_Event_Handler_Handle_Timeout_Upcall - : private ACE_Copy_Disabled -{ -public: - // = Initialization and termination methods. - /// Constructor. - ACE_Event_Handler_Handle_Timeout_Upcall (void); - - /// Destructor. - ~ACE_Event_Handler_Handle_Timeout_Upcall (void); - - /// This method is called when a timer is registered. - int registration (ACE_Timer_Queue &timer_queue, - ACE_Event_Handler *handler, - const void *arg); - - /// This method is called before the timer expires. - int preinvoke (ACE_Timer_Queue &timer_queue, - ACE_Event_Handler *handler, - const void *arg, - int recurring_timer, - const ACE_Time_Value &cur_time, - const void *&upcall_act); - - /// This method is called when the timer expires. - int timeout (ACE_Timer_Queue &timer_queue, - ACE_Event_Handler *handler, - const void *arg, - int recurring_timer, - const ACE_Time_Value &cur_time); - - /// This method is called after the timer expires. - int postinvoke (ACE_Timer_Queue &timer_queue, - ACE_Event_Handler *handler, - const void *arg, - int recurring_timer, - const ACE_Time_Value &cur_time, - const void *upcall_act); - - /// This method is called when a handler is cancelled - int cancel_type (ACE_Timer_Queue &timer_queue, - ACE_Event_Handler *handler, - int dont_call, - int &requires_reference_counting); - - /// This method is called when a timer is cancelled - int cancel_timer (ACE_Timer_Queue &timer_queue, - ACE_Event_Handler *handler, - int dont_call, - int requires_reference_counting); - - /// This method is called when the timer queue is destroyed and - /// the timer is still contained in it - int deletion (ACE_Timer_Queue &timer_queue, - ACE_Event_Handler *handler, - const void *arg); - -private: - - /// Flag indicating that reference counting is required for this - /// event handler upcall. - int requires_reference_counting_; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined(__ACE_INLINE__) -# include "ace/Event_Handler_Handle_Timeout_Upcall.inl" -#endif /* __ACE_INLINE__ */ - -#include /**/ "ace/post.h" -#endif /* ACE_EVENT_HANDLER_HANDLE_TIMEOUT_UPCALL_H */ diff --git a/modules/worldengine/deps/acelite/ace/Event_Handler_Handle_Timeout_Upcall.inl b/modules/worldengine/deps/acelite/ace/Event_Handler_Handle_Timeout_Upcall.inl deleted file mode 100644 index 8c0b41bb0c..0000000000 --- a/modules/worldengine/deps/acelite/ace/Event_Handler_Handle_Timeout_Upcall.inl +++ /dev/null @@ -1,69 +0,0 @@ -#include "ace/Event_Handler.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_INLINE int -ACE_Event_Handler_Handle_Timeout_Upcall:: -registration (ACE_Timer_Queue &, - ACE_Event_Handler *event_handler, - const void *) -{ - event_handler->add_reference (); - return 0; -} - -ACE_INLINE int -ACE_Event_Handler_Handle_Timeout_Upcall:: -preinvoke (ACE_Timer_Queue &, - ACE_Event_Handler *event_handler, - const void *, - int, - const ACE_Time_Value &, - const void * & upcall_act) -{ - bool const requires_reference_counting = - event_handler->reference_counting_policy ().value () == - ACE_Event_Handler::Reference_Counting_Policy::ENABLED; - - if (requires_reference_counting) - { - event_handler->add_reference (); - - upcall_act = &this->requires_reference_counting_; - } - - return 0; -} - -ACE_INLINE int -ACE_Event_Handler_Handle_Timeout_Upcall:: -postinvoke (ACE_Timer_Queue & /* timer_queue */, - ACE_Event_Handler *event_handler, - const void * /* timer_act */, - int /* recurring_timer */, - const ACE_Time_Value & /* cur_time */, - const void *upcall_act) -{ - if (upcall_act == &this->requires_reference_counting_) - { - event_handler->remove_reference (); - } - - return 0; -} - -ACE_INLINE int -ACE_Event_Handler_Handle_Timeout_Upcall:: -cancel_timer (ACE_Timer_Queue &, - ACE_Event_Handler *event_handler, - int, - int requires_reference_counting) -{ - if (requires_reference_counting) - event_handler->remove_reference (); - - return 0; -} - - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Event_Handler_T.cpp b/modules/worldengine/deps/acelite/ace/Event_Handler_T.cpp deleted file mode 100644 index 51efca8913..0000000000 --- a/modules/worldengine/deps/acelite/ace/Event_Handler_T.cpp +++ /dev/null @@ -1,118 +0,0 @@ -// Event_Handler_T.cpp -#ifndef ACE_EVENT_HANDLER_T_CPP -#define ACE_EVENT_HANDLER_T_CPP - -#include "ace/Event_Handler_T.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#if !defined (__ACE_INLINE__) -#include "ace/Event_Handler_T.inl" -#endif /* __ACE_INLINE__ */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_ALLOC_HOOK_DEFINE(ACE_Event_Handler_T) - -template void -ACE_Event_Handler_T::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_Event_Handler_T::dump"); -#endif /* ACE_HAS_DUMP */ -} - -template -ACE_Event_Handler_T::~ACE_Event_Handler_T (void) -{ - ACE_TRACE ("ACE_Event_Handler_T::~ACE_Event_Handler_T"); - if (this->delete_handler_) - delete this->op_handler_; -} - -template -ACE_Event_Handler_T::ACE_Event_Handler_T (T *op_handler, int delete_handler, - GET_HANDLE get_handle, - IO_HANDLER input_h, - CL_HANDLER close_h, - SIG_HANDLER sig_h, - TO_HANDLER timeout_h, - IO_HANDLER output_h, - SET_HANDLE set_handle, - IO_HANDLER except_h) - : op_handler_ (op_handler), - input_handler_ (input_h), - output_handler_ (output_h), - except_handler_ (except_h), - to_handler_ (timeout_h), - cl_handler_ (close_h), - sig_handler_ (sig_h), - delete_handler_ (delete_handler), - set_handle_ (set_handle), - get_handle_ (get_handle) -{ - ACE_TRACE ("ACE_Event_Handler_T::ACE_Event_Handler_T"); -} - -template ACE_HANDLE -ACE_Event_Handler_T::get_handle (void) const -{ - ACE_TRACE ("ACE_Event_Handler_T::get_handle"); - return this->get_handle_ == 0 ? ACE_INVALID_HANDLE : (this->op_handler_->*get_handle_) (); -} - -template void -ACE_Event_Handler_T::set_handle (ACE_HANDLE h) -{ - ACE_TRACE ("ACE_Event_Handler_T::set_handle"); - if (this->set_handle_ != 0) - (this->op_handler_->*set_handle_) (h); -} - -template int -ACE_Event_Handler_T::handle_input (ACE_HANDLE fd) -{ - ACE_TRACE ("ACE_Event_Handler_T::handle_input"); - return this->input_handler_ == 0 ? 0 : (this->op_handler_->*input_handler_) (fd); -} - -template int -ACE_Event_Handler_T::handle_output (ACE_HANDLE fd) -{ - ACE_TRACE ("ACE_Event_Handler_T::handle_output"); - return this->output_handler_ == 0 ? 0 : (this->op_handler_->*output_handler_) (fd); -} - -template int -ACE_Event_Handler_T::handle_exception (ACE_HANDLE fd) -{ - ACE_TRACE ("ACE_Event_Handler_T::handle_exception"); - return this->except_handler_ == 0 ? 0 : (this->op_handler_->*except_handler_) (fd); -} - -template int -ACE_Event_Handler_T::handle_timeout (const ACE_Time_Value &tv, const void *arg) -{ - ACE_TRACE ("ACE_Event_Handler_T::handle_timeout"); - return this->to_handler_ == 0 ? 0 : (this->op_handler_->*to_handler_) (tv, arg); -} - -template int -ACE_Event_Handler_T::handle_close (ACE_HANDLE fd, ACE_Reactor_Mask close_mask) -{ - ACE_TRACE ("ACE_Event_Handler_T::handle_close"); - return this->cl_handler_ == 0 ? 0 : (this->op_handler_->*cl_handler_) (fd, close_mask); -} - -template int -ACE_Event_Handler_T::handle_signal (int signum, siginfo_t *s, ucontext_t *u) -{ - ACE_TRACE ("ACE_Event_Handler_T::handle_signal"); - return this->sig_handler_ == 0 ? 0 : (this->op_handler_->*sig_handler_) (signum, s, u); -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_EVENT_HANDLER_T_CPP */ diff --git a/modules/worldengine/deps/acelite/ace/Event_Handler_T.h b/modules/worldengine/deps/acelite/ace/Event_Handler_T.h deleted file mode 100644 index 5f596e7272..0000000000 --- a/modules/worldengine/deps/acelite/ace/Event_Handler_T.h +++ /dev/null @@ -1,186 +0,0 @@ -/* -*- C++ -*- */ - -//============================================================================= -/** - * @file Event_Handler_T.h - * - * @author Douglas C. Schmidt - */ -//============================================================================= - -#ifndef ACE_EVENT_HANDLER_T_H -#define ACE_EVENT_HANDLER_T_H -#include /**/ "ace/pre.h" - -#include "ace/Event_Handler.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_Event_Handler_T - * - * @brief Enable a class that doesn't inherit from the - * ACE_Event_Handler to be incorporated into the ACE_Reactor - * framework. Thanks to Greg Lavender (g.lavender@isode.com) - * for sharing this idea. - * - * It is sometimes the case that an application has a hierarchy - * of operation dispatcher classes that have their own - * inheritance hierarchy but also would like to integrate with - * the ACE_Reactor. Rather than adopt a "mixin" approach, it is - * often cleaner to define a template as a subclass of - * ACE_Event_Handler and parameterize it with an operation - * dispatcher type. - * When constructing an instantiation of the ACE_Event_Handler_T - * object, a set of pointers to member functions must be - * provided so that when one of the handle_* methods is called - * by the ACE_Reactor, the appropriate method is called on the - * underlying operations object. This is done since in some - * cases it is useful to map any event that happens to the same - * method on an object. - * The ACE_Event_Handler_T template is instantiated by an - * operations object and registered with the ACE_Reactor, and it - * then calls the appropriate op_handler. So, it's basically - * just another level of indirection in event dispatching. The - * coupling betweent the ultimate handler of the event and the - * ACE_Event_Handler class is relaxed a bit by have this - * intermediate object of type around. The - * client object can then dynamically change the bindings for - * the various handlers so that during the life of one of the - * operation objects, it can change how it wants events to be - * handled. It just instantiates a new instance of the template - * with different bindings and reregisters this new object with - * the ACE_Reactor. - */ -template -class ACE_Event_Handler_T : public ACE_Event_Handler -{ -public: - // = Typedefs to simplify pointer-to-member-function registration. - - // Get/set the underlying handle. - typedef ACE_HANDLE (T::*GET_HANDLE) (void) const; - typedef void (T::*SET_HANDLE) (ACE_HANDLE); - - /// Handle I/O events. - typedef int (T::*IO_HANDLER) (ACE_HANDLE); - - /// Handle timeout events. - typedef int (T::*TO_HANDLER) (const ACE_Time_Value &, const void *); - - /// Handle close events. - typedef int (T::*CL_HANDLER) (ACE_HANDLE, ACE_Reactor_Mask); - - /// = Initialization and termination methods. - typedef int (T::*SIG_HANDLER) (int, siginfo_t*, ucontext_t*); - - /// Initialize the op_handler. - ACE_Event_Handler_T (T *op_handler, - int delete_handler, - GET_HANDLE get_handle = 0, - IO_HANDLER input = 0, - CL_HANDLER close = 0, - SIG_HANDLER sig = 0, - TO_HANDLER timeout = 0, - IO_HANDLER output = 0, - SET_HANDLE set_handle = 0, - IO_HANDLER except = 0); - - /// Close down and delete the - ~ACE_Event_Handler_T (void); - - // = Override all the ACE_Event_Handler methods. - - // These methods all delegate down to the operations handler. - virtual ACE_HANDLE get_handle (void) const; - virtual void set_handle (ACE_HANDLE); - virtual int handle_input (ACE_HANDLE fd = ACE_INVALID_HANDLE); - virtual int handle_output (ACE_HANDLE fd = ACE_INVALID_HANDLE); - virtual int handle_exception (ACE_HANDLE fd = ACE_INVALID_HANDLE); - virtual int handle_timeout (const ACE_Time_Value &tv, const void *arg = 0); - virtual int handle_close (ACE_HANDLE fd, ACE_Reactor_Mask close_mask); - virtual int handle_signal (int signum, siginfo_t * = 0, ucontext_t * = 0); - - // = Get/set the operations handler. - T *op_handler (void); - void op_handler (T *); - - // = Get/set the target pointer-to-method used for dispatching. - - GET_HANDLE handle_get (void); - void handle_get (GET_HANDLE); - - SET_HANDLE handle_set (void); - void handle_set (SET_HANDLE); - - IO_HANDLER input_handler (void); - void input_handler (IO_HANDLER); - - IO_HANDLER output_handler (void); - void output_handler (IO_HANDLER); - - IO_HANDLER except_handler (void); - void except_handler (IO_HANDLER); - - TO_HANDLER to_handler (void); - void to_handler (TO_HANDLER); - - CL_HANDLER cl_handler (void); - void cl_handler (CL_HANDLER); - - SIG_HANDLER sig_handler (void); - void sig_handler (SIG_HANDLER); - - /// Dump the state of an object. - void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - -protected: - /// Pointer to the object that handles all the delegated operations. - T *op_handler_; - - // = Handle input, output, and exception events. - IO_HANDLER input_handler_; - IO_HANDLER output_handler_; - IO_HANDLER except_handler_; - - /// Handle timeout events. - TO_HANDLER to_handler_; - - /// Handle close events. - CL_HANDLER cl_handler_; - - /// Handle signal events. - SIG_HANDLER sig_handler_; - - /// Keeps track of whether we need to delete the handler in the - /// destructor. - int delete_handler_; - - // = Get/set underlying handle. - SET_HANDLE set_handle_; - GET_HANDLE get_handle_; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/Event_Handler_T.inl" -#endif /* __ACE_INLINE__ */ - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "ace/Event_Handler_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Event_Handler_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ - -#include /**/ "ace/post.h" -#endif /* ACE_EVENT_HANDLER_H */ diff --git a/modules/worldengine/deps/acelite/ace/Event_Handler_T.inl b/modules/worldengine/deps/acelite/ace/Event_Handler_T.inl deleted file mode 100644 index 64df02a1d0..0000000000 --- a/modules/worldengine/deps/acelite/ace/Event_Handler_T.inl +++ /dev/null @@ -1,132 +0,0 @@ -// -*- C++ -*- -#include "ace/Global_Macros.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -template ACE_INLINE void -ACE_Event_Handler_T::op_handler (T *op) -{ - ACE_TRACE ("ACE_Event_Handler_T::op_handler"); - this->op_handler_ = op; -} - -template ACE_INLINE T * -ACE_Event_Handler_T::op_handler (void) -{ - ACE_TRACE ("ACE_Event_Handler_T::op_handler"); - return this->op_handler_; -} - -template ACE_INLINE typename ACE_Event_Handler_T::GET_HANDLE -ACE_Event_Handler_T::handle_get (void) -{ - ACE_TRACE ("ACE_Event_Handler_T::handle_get"); - return this->get_handle_; -} - -template ACE_INLINE void -ACE_Event_Handler_T::handle_get (typename ACE_Event_Handler_T::GET_HANDLE h) -{ - ACE_TRACE ("ACE_Event_Handler_T::handle_get"); - this->get_handle_ = h; -} - -template ACE_INLINE typename ACE_Event_Handler_T::SET_HANDLE -ACE_Event_Handler_T::handle_set (void) -{ - ACE_TRACE ("ACE_Event_Handler_T::handle_set"); - return this->set_handle_; -} - -template ACE_INLINE void -ACE_Event_Handler_T::handle_set (typename ACE_Event_Handler_T::SET_HANDLE h) -{ - ACE_TRACE ("ACE_Event_Handler_T::handle_set"); - this->set_handle_ = h; -} - -template ACE_INLINE typename ACE_Event_Handler_T::IO_HANDLER -ACE_Event_Handler_T::input_handler (void) -{ - ACE_TRACE ("ACE_Event_Handler_T::input_handler"); - return this->input_handler_; -} - -template ACE_INLINE void -ACE_Event_Handler_T::input_handler (typename ACE_Event_Handler_T::IO_HANDLER h) -{ - ACE_TRACE ("ACE_Event_Handler_T::input_handler"); - this->input_handler_ = h; -} - -template ACE_INLINE typename ACE_Event_Handler_T::IO_HANDLER -ACE_Event_Handler_T::output_handler (void) -{ - ACE_TRACE ("ACE_Event_Handler_T::output_handler"); - return this->output_handler_; -} - -template ACE_INLINE void -ACE_Event_Handler_T::output_handler (typename ACE_Event_Handler_T::IO_HANDLER h) -{ - ACE_TRACE ("ACE_Event_Handler_T::output_handler"); - this->output_handler_ = h; -} - -template ACE_INLINE typename ACE_Event_Handler_T::IO_HANDLER -ACE_Event_Handler_T::except_handler (void) -{ - ACE_TRACE ("ACE_Event_Handler_T::except_handler"); - return this->except_handler_; -} - -template ACE_INLINE void -ACE_Event_Handler_T::except_handler (typename ACE_Event_Handler_T::IO_HANDLER h) -{ - ACE_TRACE ("ACE_Event_Handler_T::except_handler"); - this->except_handler_ = h; -} - -template ACE_INLINE typename ACE_Event_Handler_T::TO_HANDLER -ACE_Event_Handler_T::to_handler (void) -{ - ACE_TRACE ("ACE_Event_Handler_T::to_handler"); - return this->to_handler_; -} - -template ACE_INLINE void -ACE_Event_Handler_T::to_handler (typename ACE_Event_Handler_T::TO_HANDLER h) -{ - ACE_TRACE ("ACE_Event_Handler_T::to_handler"); - this->to_handler_ = h; -} - -template ACE_INLINE typename ACE_Event_Handler_T::CL_HANDLER -ACE_Event_Handler_T::cl_handler (void) -{ - ACE_TRACE ("ACE_Event_Handler_T::cl_handler"); - return this->cl_handler_; -} - -template ACE_INLINE void -ACE_Event_Handler_T::cl_handler (typename ACE_Event_Handler_T::CL_HANDLER h) -{ - ACE_TRACE ("ACE_Event_Handler_T::cl_handler"); - this->cl_handler_ = h; -} - -template ACE_INLINE typename ACE_Event_Handler_T::SIG_HANDLER -ACE_Event_Handler_T::sig_handler (void) -{ - ACE_TRACE ("ACE_Event_Handler_T::sig_handler"); - return this->sig_handler_; -} - -template ACE_INLINE void -ACE_Event_Handler_T::sig_handler (typename ACE_Event_Handler_T::SIG_HANDLER h) -{ - ACE_TRACE ("ACE_Event_Handler_T::sig_handler"); - this->sig_handler_ = h; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/FIFO.cpp b/modules/worldengine/deps/acelite/ace/FIFO.cpp deleted file mode 100644 index 95bfd6ef99..0000000000 --- a/modules/worldengine/deps/acelite/ace/FIFO.cpp +++ /dev/null @@ -1,74 +0,0 @@ -#include "ace/FIFO.h" - -#if !defined (__ACE_INLINE__) -#include "ace/FIFO.inl" -#endif /* __ACE_INLINE__ */ - -#include "ace/Log_Category.h" -#include "ace/OS_NS_string.h" -#include "ace/OS_NS_errno.h" -#include "ace/OS_NS_sys_stat.h" -#include "ace/OS_NS_fcntl.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_ALLOC_HOOK_DEFINE(ACE_FIFO) - -void -ACE_FIFO::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_FIFO::dump"); - - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("rendezvous_ = %s"), this->rendezvous_)); - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} - -int -ACE_FIFO::open (const ACE_TCHAR *r, int flags, mode_t perms, - LPSECURITY_ATTRIBUTES sa) -{ - ACE_TRACE ("ACE_FIFO::open"); - ACE_OS::strsncpy (this->rendezvous_, r, MAXPATHLEN); - - if ((flags & O_CREAT) != 0 - && ACE_OS::mkfifo (this->rendezvous_, perms) == -1 - && !(errno == EEXIST)) - return -1; - - this->set_handle (ACE_OS::open (this->rendezvous_, flags, 0, sa)); - return this->get_handle () == ACE_INVALID_HANDLE ? -1 : 0; -} - -ACE_FIFO::ACE_FIFO (const ACE_TCHAR *fifo_name, - int flags, - mode_t perms, - LPSECURITY_ATTRIBUTES sa) -{ - ACE_TRACE ("ACE_FIFO::ACE_FIFO"); - if (this->open (fifo_name, flags, perms, sa) == -1) - ACELIB_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("ACE_FIFO"))); -} - -ACE_FIFO::ACE_FIFO (void) -{ -// ACE_TRACE ("ACE_FIFO::ACE_FIFO"); -} - -int -ACE_FIFO::close (void) -{ - ACE_TRACE ("ACE_FIFO::close"); - int result = 0; - - if (this->get_handle () != ACE_INVALID_HANDLE) - { - result = ACE_OS::close (this->get_handle ()); - this->set_handle (ACE_INVALID_HANDLE); - } - return result; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/FIFO.h b/modules/worldengine/deps/acelite/ace/FIFO.h deleted file mode 100644 index 2c66ab10f0..0000000000 --- a/modules/worldengine/deps/acelite/ace/FIFO.h +++ /dev/null @@ -1,97 +0,0 @@ -// -*- C++ -*- - -//========================================================================== -/** - * @file FIFO.h - * - * @author Doug Schmidt - */ -//========================================================================== - - -#ifndef ACE_FIFO_H -#define ACE_FIFO_H -#include /**/ "ace/pre.h" - -#include /**/ "ace/ACE_export.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/IPC_SAP.h" -#include "ace/os_include/os_limits.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_FIFO - * - * @brief Abstract base class for UNIX FIFOs - * - * UNIX FIFOs are also known Named Pipes, which are totally - * unrelated to Windows Named Pipes. If you want to use a local - * IPC mechanism that will be portable to both UNIX and Windows, - * take a look at the ACE_Pipe or ACE_SPIPE_Stream classes. - */ -class ACE_Export ACE_FIFO : public ACE_IPC_SAP -{ -public: - /** - * Open up the named pipe (FIFO) on the @a rendezvous point in accordance - * with the @a flags. - * - * If @a flags contains @c O_CREAT open() will attempt to call mkfifo() - * to create the FIFO before opening it. In this case, this method - * will not fail simply because the fifo already exists. - * - * @retval 0 for success - * @retval -1 for error; errno contains the error code. - */ - int open (const ACE_TCHAR *rendezvous, int flags, mode_t perms, - LPSECURITY_ATTRIBUTES sa = 0); - - /// Close down the ACE_FIFO without removing the rendezvous point. - int close (void); - - /// Close down the ACE_FIFO and remove the rendezvous point from the - /// file system. - int remove (void); - - /// Return the local address of this endpoint. - int get_local_addr (const ACE_TCHAR *&rendezvous) const; - - /// Dump the state of an object. - void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - -protected: - /** - * Protected constructors ensure this class cannot be used directly. - * User code must use ACE_FIFO_Send and/or ACE_FIFO_Recv. - */ - //@{ - /// Default constructor. - ACE_FIFO (void); - - /// Open up the named pipe on the @a rendezvous in accordance with the - /// flags. - ACE_FIFO (const ACE_TCHAR *rendezvous, int flags, mode_t perms, - LPSECURITY_ATTRIBUTES sa = 0); - //@} - -private: - /// Rendezvous point in the file system. - ACE_TCHAR rendezvous_[MAXPATHLEN + 1]; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/FIFO.inl" -#endif /* __ACE_INLINE__ */ - -#include /**/ "ace/post.h" -#endif /* ACE_FIFO_H */ diff --git a/modules/worldengine/deps/acelite/ace/FIFO.inl b/modules/worldengine/deps/acelite/ace/FIFO.inl deleted file mode 100644 index 9fe5c733e3..0000000000 --- a/modules/worldengine/deps/acelite/ace/FIFO.inl +++ /dev/null @@ -1,22 +0,0 @@ -// -*- C++ -*- -#include "ace/OS_NS_unistd.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_INLINE int -ACE_FIFO::get_local_addr (const ACE_TCHAR *&r) const -{ - ACE_TRACE ("ACE_FIFO::get_local_addr"); - r = this->rendezvous_; - return 0; -} - -ACE_INLINE int -ACE_FIFO::remove (void) -{ - ACE_TRACE ("ACE_FIFO::remove"); - int const result = this->close (); - return ACE_OS::unlink (this->rendezvous_) == -1 || result == -1 ? -1 : 0; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/FIFO_Recv.cpp b/modules/worldengine/deps/acelite/ace/FIFO_Recv.cpp deleted file mode 100644 index 37c9f31a4f..0000000000 --- a/modules/worldengine/deps/acelite/ace/FIFO_Recv.cpp +++ /dev/null @@ -1,86 +0,0 @@ -#include "ace/FIFO_Recv.h" -#include "ace/Log_Category.h" -#include "ace/OS_NS_fcntl.h" - -#if !defined (__ACE_INLINE__) -#include "ace/FIFO_Recv.inl" -#endif /* __ACE_INLINE__ */ - - - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_ALLOC_HOOK_DEFINE(ACE_FIFO_Recv) - -void -ACE_FIFO_Recv::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_FIFO_Recv::dump"); - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - ACE_FIFO::dump (); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("aux_handle_ = %d"), this->aux_handle_)); - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} - -int -ACE_FIFO_Recv::close (void) -{ - ACE_TRACE ("ACE_FIFO_Recv::close"); - int result = ACE_FIFO::close (); - - if (this->aux_handle_ != ACE_INVALID_HANDLE) - return ACE_OS::close (this->aux_handle_); - else - return result; -} - -// Note that persistent means "open fifo for writing, as well as -// reading." This ensures that the fifo never gets EOF, even if there -// aren't any writers at the moment! - -int -ACE_FIFO_Recv::open (const ACE_TCHAR *fifo_name, - int flags, - mode_t perms, - int persistent, - LPSECURITY_ATTRIBUTES sa) -{ - ACE_TRACE ("ACE_FIFO_Recv::open"); - - if (ACE_FIFO::open (fifo_name, ACE_NONBLOCK | flags, perms, sa) == -1) - return -1; - else if (this->disable (ACE_NONBLOCK) == -1) - return -1; - else if (persistent - && (this->aux_handle_ = ACE_OS::open (fifo_name, O_WRONLY, 0, sa)) == ACE_INVALID_HANDLE) - return -1; - else - return this->get_handle () == ACE_INVALID_HANDLE ? -1 : 0; -} - -ACE_FIFO_Recv::ACE_FIFO_Recv (void) - : aux_handle_ (ACE_INVALID_HANDLE) -{ - ACE_TRACE ("ACE_FIFO_Recv::ACE_FIFO_Recv"); -} - -ACE_FIFO_Recv::ACE_FIFO_Recv (const ACE_TCHAR *fifo_name, - int flags, - mode_t perms, - int persistent, - LPSECURITY_ATTRIBUTES sa) - : aux_handle_ (ACE_INVALID_HANDLE) -{ - ACE_TRACE ("ACE_FIFO_Recv::ACE_FIFO_Recv"); - - if (this->ACE_FIFO_Recv::open (fifo_name, - flags, - perms, - persistent, - sa) == -1) - ACELIB_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("ACE_FIFO_Recv"))); -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/FIFO_Recv.h b/modules/worldengine/deps/acelite/ace/FIFO_Recv.h deleted file mode 100644 index bf3c9a8d2e..0000000000 --- a/modules/worldengine/deps/acelite/ace/FIFO_Recv.h +++ /dev/null @@ -1,94 +0,0 @@ -// -*- C++ -*- - -//========================================================================== -/** - * @file FIFO_Recv.h - * - * @author Doug Schmidt - */ -//========================================================================== - - -#ifndef ACE_FIFO_RECV_H -#define ACE_FIFO_RECV_H - -#include /**/ "ace/pre.h" - -#include "ace/FIFO.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/os_include/os_fcntl.h" -#include "ace/Default_Constants.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_FIFO_Recv - * - * @brief Receiver side of the bytestream C++ wrapper for UNIX - * FIFOs. - */ -class ACE_Export ACE_FIFO_Recv : public ACE_FIFO -{ -public: - /// @name Initialization methods. - /// - /// Note that @c ACE_NONBLOCK will be added to any @a flags value passed. - /// This causes the open to succeed even if no writer has yet opened the - /// fifo. There is no way to disable this behavior. - /// - /// @arg persistent Means "open fifo for writing, as well as - /// reading." This ensures that the fifo never gets EOF, even if there - /// aren't any writers at the moment! - //@{ - - /// Default constructor. - ACE_FIFO_Recv (void); - - /// Open up a bytestream named pipe for reading. - ACE_FIFO_Recv (const ACE_TCHAR *rendezvous, - int flags = O_CREAT | O_RDONLY, - mode_t perms = ACE_DEFAULT_FILE_PERMS, - int persistent = 1, - LPSECURITY_ATTRIBUTES sa = 0); - - /// Open up a bytestream named pipe for reading. - int open (const ACE_TCHAR *rendezvous, - int flags = O_CREAT | O_RDONLY, - mode_t perms = ACE_DEFAULT_FILE_PERMS, - int persistent = 1, - LPSECURITY_ATTRIBUTES sa = 0); - //@} - - /// Close down the fifo. - int close (void); - - /// Recv @a buf of up to @a len bytes. - ssize_t recv (void *buf, size_t len); - - /// Recv @a buf of exactly @a len bytes (block until done). - ssize_t recv_n (void *buf, size_t len); - - /// Dump the state of an object. - void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - -private: - /// Auxiliary handle that is used to implement persistent FIFOs. - ACE_HANDLE aux_handle_; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/FIFO_Recv.inl" -#endif /* __ACE_INLINE__ */ - -#include /**/ "ace/post.h" - -#endif /* ACE_FIFO_RECV_H */ diff --git a/modules/worldengine/deps/acelite/ace/FIFO_Recv.inl b/modules/worldengine/deps/acelite/ace/FIFO_Recv.inl deleted file mode 100644 index aa95234c57..0000000000 --- a/modules/worldengine/deps/acelite/ace/FIFO_Recv.inl +++ /dev/null @@ -1,21 +0,0 @@ -// -*- C++ -*- -#include "ace/ACE.h" -#include "ace/OS_NS_unistd.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_INLINE ssize_t -ACE_FIFO_Recv::recv (void *buf, size_t len) -{ - ACE_TRACE ("ACE_FIFO_Recv::recv"); - return ACE_OS::read (this->get_handle (), (char *) buf, len); -} - -ACE_INLINE ssize_t -ACE_FIFO_Recv::recv_n (void *buf, size_t n) -{ - ACE_TRACE ("ACE_FIFO_Recv::recv_n"); - return ACE::recv_n (this->get_handle (), buf, n); -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/FIFO_Recv_Msg.cpp b/modules/worldengine/deps/acelite/ace/FIFO_Recv_Msg.cpp deleted file mode 100644 index bb14e733c8..0000000000 --- a/modules/worldengine/deps/acelite/ace/FIFO_Recv_Msg.cpp +++ /dev/null @@ -1,63 +0,0 @@ -#include "ace/FIFO_Recv_Msg.h" - -#include "ace/Log_Category.h" - -#if !defined (__ACE_INLINE__) -#include "ace/FIFO_Recv_Msg.inl" -#endif /* __ACE_INLINE__ */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_ALLOC_HOOK_DEFINE(ACE_FIFO_Recv_Msg) - -void -ACE_FIFO_Recv_Msg::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_FIFO_Recv_Msg::dump"); - ACE_FIFO_Recv::dump (); -#endif /* ACE_HAS_DUMP */ -} - -// Note that persistent means "open FIFO for writing, as well as -// reading." This ensures that the FIFO never gets EOF, even if there -// aren't any writers at the moment! - -int -ACE_FIFO_Recv_Msg::open (const ACE_TCHAR *fifo_name, - int flags, - mode_t perms, - int persistent, - LPSECURITY_ATTRIBUTES sa) -{ - ACE_TRACE ("ACE_FIFO_Recv_Msg::open"); - - return ACE_FIFO_Recv::open (fifo_name, - flags, - perms, - persistent, - sa); -} - -ACE_FIFO_Recv_Msg::ACE_FIFO_Recv_Msg (void) -{ - ACE_TRACE ("ACE_FIFO_Recv_Msg::ACE_FIFO_Recv_Msg"); -} - -ACE_FIFO_Recv_Msg::ACE_FIFO_Recv_Msg (const ACE_TCHAR *fifo_name, - int flags, - mode_t perms, - int persistent, - LPSECURITY_ATTRIBUTES sa) -{ - ACE_TRACE ("ACE_FIFO_Recv_Msg::ACE_FIFO_Recv_Msg"); - - if (this->ACE_FIFO_Recv_Msg::open (fifo_name, - flags, - perms, - persistent, - sa) == -1) - ACELIB_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("ACE_FIFO_Recv_Msg"))); -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/FIFO_Recv_Msg.h b/modules/worldengine/deps/acelite/ace/FIFO_Recv_Msg.h deleted file mode 100644 index 566f26fdfa..0000000000 --- a/modules/worldengine/deps/acelite/ace/FIFO_Recv_Msg.h +++ /dev/null @@ -1,136 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file FIFO_Recv_Msg.h - * - * @author Doug Schmidt - */ -//============================================================================= - - -#ifndef ACE_FIFO_RECV_MSG_H -#define ACE_FIFO_RECV_MSG_H -#include /**/ "ace/pre.h" - -#include "ace/FIFO_Recv.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -// Forward decls -class ACE_Str_Buf; - -/** - * @class ACE_FIFO_Recv_Msg - * - * @brief Receiver side for the record oriented C++ wrapper for UNIX FIFOs. - * - * This method works slightly differently on platforms with the - * @c ACE_HAS_STREAM_PIPES configuration setting than those without. - * With ACE_HAS_STREAM_PIPES, the @c getmsg() system function is used - * and it preserves message boundaries internally. Without - * @c ACE_HAS_STREAM_PIPES, the message boundaries are emulated by - * this class and ACE_FIFO_Send_Msg cooperating. The sending class - * first writes an integer number of bytes in the message, then the - * message. ACE_FIFO_Recv_Msg reads the count, then the data. - * The operational differences occur primarily when a message is larger - * than what a caller of this class requests. See recv() for details. - */ -class ACE_Export ACE_FIFO_Recv_Msg : public ACE_FIFO_Recv -{ -public: - // = Initialization methods. - /// Default constructor. - ACE_FIFO_Recv_Msg (void); - - /// Open up a record-oriented named pipe for reading. - ACE_FIFO_Recv_Msg (const ACE_TCHAR *rendezvous, - int flags = O_CREAT | O_RDONLY, - mode_t perms = ACE_DEFAULT_FILE_PERMS, - int persistent = 1, - LPSECURITY_ATTRIBUTES sa = 0); - - /// Open up a record-oriented named pipe for reading. - int open (const ACE_TCHAR *rendezvous, - int flags = O_CREAT | O_RDONLY, - mode_t perms = ACE_DEFAULT_FILE_PERMS, - int persistent = 1, - LPSECURITY_ATTRIBUTES sa = 0); - - /// Receive a message based on attributes in an ACE_Str_Buf. - /** - * @param msg Reference to an ACE_Str_Buf whose @c buf member points - * to the memory to receive the data and @c maxlen member - * contains the maximum number of bytes to receive. - * On return after successfully reading data, the - * @c len member contains the number of bytes received and - * placed in the buffer pointed to by @c msg.buf. - * - * @retval -1 Error; consult @c errno for specific error number. - * @return If the @c ACE_HAS_STREAM_PIPES configuration setting is - * defined, the return value is the number of bytes received - * in the message and will be the same as @c buf.len. - * The return value from the @c getmsg() system function - * is discarded. - * If @c ACE_HAS_STREAM_PIPES is not defined, the number - * of bytes in the message read from the FIFO is returned. - * If the message is larger than the maximum length - * requested in @c msg.maxlen, the return value reflects - * the entire message length, and the @c msg.len member - * reflects how many bytes were actually placed in the - * caller's buffer. Any part of the message longer than - * @c msg.maxlen is discarded. - */ - ssize_t recv (ACE_Str_Buf &msg); - - /// Receive a message based on buffer pointer and maximum size. - /** - * @param buf Pointer to the memory to receive the data. - * @param len The maximum number of bytes to receive. - * - * @retval -1 Error; consult @c errno for specific error number. - * @return The number of bytes received in the message. For messages - * that are larger than the requested maximum size, the - * behavior is different depending on the @c ACE_HAS_STREAM_PIPES - * configuration setting. With @c ACE_HAS_STREAM_PIPES, - * the return value will be the same as @arg len (this is - * also possible if the message is exactly the same length - * as @arg len, and the two cases are indistinguishable). - * Without @c ACE_HAS_STREAM_PIPES, the return value is - * the total length of the message, including bytes in - * excess of @arg len. The excess bytes are discarded. - */ - ssize_t recv (void *buf, size_t len); - -#if defined (ACE_HAS_STREAM_PIPES) - /// Recv @a data and @a cntl message via Stream pipes. - ssize_t recv (ACE_Str_Buf *data, - ACE_Str_Buf *cntl, - int *flags); - - /// Recv @a data and @a cntl message via Stream pipes in "band" mode. - ssize_t recv (int *band, - ACE_Str_Buf *data, - ACE_Str_Buf *cntl, - int *flags); -#endif /* ACE_HAS_STREAM_PIPES */ - - /// Dump the state of an object. - void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/FIFO_Recv_Msg.inl" -#endif /* __ACE_INLINE__ */ - -#include /**/ "ace/post.h" -#endif /* ACE_FIFO_RECV_MSG_H */ diff --git a/modules/worldengine/deps/acelite/ace/FIFO_Recv_Msg.inl b/modules/worldengine/deps/acelite/ace/FIFO_Recv_Msg.inl deleted file mode 100644 index 917aee9df3..0000000000 --- a/modules/worldengine/deps/acelite/ace/FIFO_Recv_Msg.inl +++ /dev/null @@ -1,134 +0,0 @@ -// -*- C++ -*- -#include "ace/Min_Max.h" -#include "ace/OS_NS_stropts.h" -#include "ace/Truncate.h" - -#if !defined (ACE_HAS_STREAM_PIPES) -#include "ace/OS_NS_unistd.h" -#endif - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_INLINE ssize_t -ACE_FIFO_Recv_Msg::recv (ACE_Str_Buf &recv_msg) -{ - ACE_TRACE ("ACE_FIFO_Recv_Msg::recv"); -#if defined (ACE_HAS_STREAM_PIPES) - int i = 0; - if (ACE_OS::getmsg (this->get_handle (), - (strbuf *) 0, - (strbuf *) &recv_msg, - &i) == -1) - { - return -1; - } - else - { - return recv_msg.len; - } -#else /* Do the ol' 2-read trick... */ - if (ACE_OS::read (this->get_handle (), - (char *) &recv_msg.len, - sizeof recv_msg.len) != (ssize_t) sizeof recv_msg.len) - { - return -1; - } - else - { - size_t remaining = static_cast (recv_msg.len); - size_t requested = static_cast (recv_msg.maxlen); - ssize_t recv_len = ACE_OS::read (this->get_handle (), - (char *) recv_msg.buf, - ACE_MIN (remaining, requested)); - - if (recv_len == -1) - { - return -1; - } - - // Tell caller what's really in the buffer. - recv_msg.len = static_cast (recv_len); - - // If there are more bytes remaining in the message, read them and - // throw them away. Leaving them in the FIFO would make it difficult - // to find the start of the next message in the fifo. - // Since the ACE_HAS_STREAM_PIPES version of this method doesn't - // return getmsg()'s indication of "data remaining", don't worry about - // saving the indication here either to read the remainder later. - size_t total_msg_size = remaining; - remaining -= recv_len; - - while (remaining > 0) - { - const size_t throw_away = 1024; - char dev_null[throw_away]; - recv_len = ACE_OS::read (this->get_handle (), - dev_null, - ACE_MIN (remaining, throw_away)); - - if (recv_len == -1) - { - break; - } - - remaining -= recv_len; - } - - return ACE_Utils::truncate_cast (total_msg_size); - } -#endif /* ACE_HAS_STREAM_PIPES */ -} - -ACE_INLINE ssize_t -ACE_FIFO_Recv_Msg::recv (void *buf, size_t max_len) -{ - ACE_TRACE ("ACE_FIFO_Recv_Msg::recv"); - ACE_Str_Buf recv_msg ((char *) buf, 0, static_cast (max_len)); - - return this->recv (recv_msg); -} - -#if defined (ACE_HAS_STREAM_PIPES) -ACE_INLINE ssize_t -ACE_FIFO_Recv_Msg::recv (ACE_Str_Buf *data, - ACE_Str_Buf *cntl, - int *flags) -{ - ACE_TRACE ("ACE_FIFO_Recv_Msg::recv"); - if (ACE_OS::getmsg (this->get_handle (), - (strbuf *) cntl, - (strbuf *) data, - flags) == -1) - { - return -1; - } - else - { - return (cntl == 0 ? 0 : cntl->len) + (data == 0 ? 0 : data->len); - } -} - -ACE_INLINE ssize_t -ACE_FIFO_Recv_Msg::recv (int *band, - ACE_Str_Buf *data, - ACE_Str_Buf *cntl, - int *flags) -{ - ACE_TRACE ("ACE_FIFO_Recv_Msg::recv"); - - if (ACE_OS::getpmsg (this->get_handle (), - (strbuf *) cntl, - (strbuf *) data, - band, - flags) == -1) - { - return -1; - } - else - { - return (cntl == 0 ? 0 : cntl->len) + (data == 0 ? 0 : data->len); - } -} -#endif /* ACE_HAS_STREAM_PIPES */ - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/FIFO_Send.cpp b/modules/worldengine/deps/acelite/ace/FIFO_Send.cpp deleted file mode 100644 index 32a502ae36..0000000000 --- a/modules/worldengine/deps/acelite/ace/FIFO_Send.cpp +++ /dev/null @@ -1,56 +0,0 @@ -#include "ace/FIFO_Send.h" -#include "ace/Log_Category.h" - -#if !defined (__ACE_INLINE__) -#include "ace/FIFO_Send.inl" -#endif /* __ACE_INLINE__ */ - - - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_ALLOC_HOOK_DEFINE(ACE_FIFO_Send) - -void -ACE_FIFO_Send::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_FIFO_Send::dump"); - ACE_FIFO::dump (); -#endif /* ACE_HAS_DUMP */ -} - -ACE_FIFO_Send::ACE_FIFO_Send (void) -{ -// ACE_TRACE ("ACE_FIFO_Send::ACE_FIFO_Send"); -} - -int -ACE_FIFO_Send::open (const ACE_TCHAR *rendezvous_name, - int flags, - mode_t perms, - LPSECURITY_ATTRIBUTES sa) -{ - ACE_TRACE ("ACE_FIFO_Send::open"); - return ACE_FIFO::open (rendezvous_name, - flags | O_WRONLY, - perms, - sa); -} - -ACE_FIFO_Send::ACE_FIFO_Send (const ACE_TCHAR *fifo_name, - int flags, - mode_t perms, - LPSECURITY_ATTRIBUTES sa) -{ - ACE_TRACE ("ACE_FIFO_Send::ACE_FIFO_Send"); - if (this->ACE_FIFO_Send::open (fifo_name, - flags, - perms, - sa) == -1) - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("%p\n"), - ACE_TEXT ("ACE_FIFO_Send::ACE_FIFO_Send"))); -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/FIFO_Send.h b/modules/worldengine/deps/acelite/ace/FIFO_Send.h deleted file mode 100644 index 37580662b0..0000000000 --- a/modules/worldengine/deps/acelite/ace/FIFO_Send.h +++ /dev/null @@ -1,79 +0,0 @@ -// -*- C++ -*- - -//========================================================================== -/** - * @file FIFO_Send.h - * - * @author Doug Schmidt - */ -//========================================================================== - - -#ifndef ACE_FIFO_SEND_H -#define ACE_FIFO_SEND_H - -#include /**/ "ace/pre.h" - -#include "ace/FIFO.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/os_include/os_fcntl.h" -#include "ace/Default_Constants.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_FIFO_Send - * - * @brief Sender side for the bytestream C++ wrapper for UNIX FIFOs - */ -class ACE_Export ACE_FIFO_Send : public ACE_FIFO -{ -public: - /// @name Initialization methods. - /// - /// Note that @c O_WRONLY will be added to any @a flags value passed. - /// Default behavior is to block until a receiver also opens the fifo. - /// To use non-blocking behavior include ACE_NONBLOCK in @a flags. - //@{ - /// Default constructor. - ACE_FIFO_Send (void); - - /// Open up a bytestream named pipe for writing. - ACE_FIFO_Send (const ACE_TCHAR *rendezvous, - int flags = O_WRONLY, - mode_t perms = ACE_DEFAULT_FILE_PERMS, - LPSECURITY_ATTRIBUTES sa = 0); - - /// Open up a bytestream named pipe for writing. - int open (const ACE_TCHAR *rendezvous, - int flags = O_WRONLY, - mode_t perms = ACE_DEFAULT_FILE_PERMS, - LPSECURITY_ATTRIBUTES sa = 0); - //@} - - /// Send @a buf of up to @a len bytes. - ssize_t send (const void *buf, size_t len); - - /// Send @a buf of exactly @a len bytes (block until done). - ssize_t send_n (const void *buf, size_t len); - - /// Dump the state of an object. - void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/FIFO_Send.inl" -#endif /* __ACE_INLINE__ */ - -#include /**/ "ace/post.h" - -#endif /* ACE_FIFO_SEND_H */ diff --git a/modules/worldengine/deps/acelite/ace/FIFO_Send.inl b/modules/worldengine/deps/acelite/ace/FIFO_Send.inl deleted file mode 100644 index ee0d8d0b53..0000000000 --- a/modules/worldengine/deps/acelite/ace/FIFO_Send.inl +++ /dev/null @@ -1,21 +0,0 @@ -// -*- C++ -*- -#include "ace/ACE.h" -#include "ace/OS_NS_unistd.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_INLINE ssize_t -ACE_FIFO_Send::send (const void *buf, size_t len) -{ - ACE_TRACE ("ACE_FIFO_Send::send"); - return ACE_OS::write (this->get_handle (), (const char *) buf, len); -} - -ACE_INLINE ssize_t -ACE_FIFO_Send::send_n (const void *buf, size_t n) -{ - ACE_TRACE ("ACE_FIFO_Send::send_n"); - return ACE::send_n (this->get_handle (), buf, n); -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/FIFO_Send_Msg.cpp b/modules/worldengine/deps/acelite/ace/FIFO_Send_Msg.cpp deleted file mode 100644 index cd9294d3bd..0000000000 --- a/modules/worldengine/deps/acelite/ace/FIFO_Send_Msg.cpp +++ /dev/null @@ -1,78 +0,0 @@ -#include "ace/FIFO_Send_Msg.h" - -#include "ace/Log_Category.h" -#include "ace/OS_NS_sys_uio.h" - -#if !defined (__ACE_INLINE__) -#include "ace/FIFO_Send_Msg.inl" -#endif /* __ACE_INLINE__ */ - - - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_ALLOC_HOOK_DEFINE(ACE_FIFO_Send_Msg) - -void -ACE_FIFO_Send_Msg::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_FIFO_Send_Msg::dump"); - ACE_FIFO_Send::dump (); -#endif /* ACE_HAS_DUMP */ -} - -ssize_t -ACE_FIFO_Send_Msg::send (const ACE_Str_Buf &send_msg) -{ - // ACE_TRACE ("ACE_FIFO_Send_Msg::send"); -#if defined (ACE_HAS_STREAM_PIPES) - if (ACE_OS::putmsg (this->get_handle (), - (strbuf *) 0, - (strbuf *) &send_msg, - 0) == -1) - return -1; - else - return send_msg.len; -#else - iovec iov[2]; - - iov[0].iov_base = (char *) &send_msg.len; - iov[0].iov_len = sizeof send_msg.len; - - iov[1].iov_base = (char *) send_msg.buf; - iov[1].iov_len = static_cast (send_msg.len); - - ssize_t sent = ACE_OS::writev (this->get_handle (), iov, 2); - if (sent > 0) - sent -= iov[0].iov_len; // Don't count the length we added. - return sent; -#endif /* ACE_HAS_STREAM_PIPES */ -} - -ACE_FIFO_Send_Msg::ACE_FIFO_Send_Msg (void) -{ -// ACE_TRACE ("ACE_FIFO_Send_Msg::ACE_FIFO_Send_Msg"); -} - -int -ACE_FIFO_Send_Msg::open (const ACE_TCHAR *fifo_name, - int flags, - mode_t perms, - LPSECURITY_ATTRIBUTES sa) -{ - ACE_TRACE ("ACE_FIFO_Send_Msg::open"); - return ACE_FIFO_Send::open (fifo_name, flags | O_WRONLY, perms, sa); -} - -ACE_FIFO_Send_Msg::ACE_FIFO_Send_Msg (const ACE_TCHAR *fifo_name, - int flags, - mode_t perms, - LPSECURITY_ATTRIBUTES sa) -{ - ACE_TRACE ("ACE_FIFO_Send_Msg::ACE_FIFO_Send_Msg"); - if (this->ACE_FIFO_Send_Msg::open (fifo_name, flags, perms, sa) == -1) - ACELIB_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("ACE_FIFO_Send_Msg"))); -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/FIFO_Send_Msg.h b/modules/worldengine/deps/acelite/ace/FIFO_Send_Msg.h deleted file mode 100644 index 226f53da06..0000000000 --- a/modules/worldengine/deps/acelite/ace/FIFO_Send_Msg.h +++ /dev/null @@ -1,89 +0,0 @@ -/* -*- C++ -*- */ - -//============================================================================= -/** - * @file FIFO_Send_Msg.h - * - * @author Doug Schmidt - */ -//============================================================================= - - -#ifndef ACE_FIFO_SEND_MSG_H -#define ACE_FIFO_SEND_MSG_H -#include /**/ "ace/pre.h" - -#include "ace/FIFO_Send.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#if defined (ACE_HAS_STREAM_PIPES) -# include "ace/OS_NS_stropts.h" -#endif /* ACE_HAS_STREAM_PIPES */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -// Forward Decls -class ACE_Str_Buf; - -/** - * @class ACE_FIFO_Send_Msg - * - * @brief Sender side for the Record oriented C++ wrapper for UNIX - * FIFOs. - */ -class ACE_Export ACE_FIFO_Send_Msg : public ACE_FIFO_Send -{ -public: - // = Initialization methods. - /// Default constructor. - ACE_FIFO_Send_Msg (void); - - /// Open up a record-oriented named pipe for writing. - ACE_FIFO_Send_Msg (const ACE_TCHAR *rendezvous, - int flags = O_WRONLY, - mode_t perms = ACE_DEFAULT_FILE_PERMS, - LPSECURITY_ATTRIBUTES sa = 0); - - /// Open up a record-oriented named pipe for writing. - int open (const ACE_TCHAR *rendezvous, - int flags = O_WRONLY, - mode_t perms = ACE_DEFAULT_FILE_PERMS, - LPSECURITY_ATTRIBUTES sa = 0); - - /// Send @a buf of up to @a len bytes. - ssize_t send (const ACE_Str_Buf &msg); - - /// Send @a buf of exactly @a len bytes (block until done). - ssize_t send (const void *buf, size_t len); - -#if defined (ACE_HAS_STREAM_PIPES) - /// Send @a data and @a cntl message via Stream pipes. - ssize_t send (const ACE_Str_Buf *data, - const ACE_Str_Buf *cntl = 0, - int flags = 0); - - /// Send @a data and @a cntl message via Stream pipes in "band" mode. - ssize_t send (int band, - const ACE_Str_Buf *data, - const ACE_Str_Buf *cntl = 0, - int flags = MSG_BAND); -#endif /* ACE_HAS_STREAM_PIPES */ - - /// Dump the state of an object. - void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/FIFO_Send_Msg.inl" -#endif /* __ACE_INLINE__ */ - -#include /**/ "ace/post.h" -#endif /* ACE_FIFO_SEND_MSG_H */ diff --git a/modules/worldengine/deps/acelite/ace/FIFO_Send_Msg.inl b/modules/worldengine/deps/acelite/ace/FIFO_Send_Msg.inl deleted file mode 100644 index 74aaa19719..0000000000 --- a/modules/worldengine/deps/acelite/ace/FIFO_Send_Msg.inl +++ /dev/null @@ -1,50 +0,0 @@ -// -*- C++ -*- -#include "ace/OS_NS_stropts.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_INLINE ssize_t -ACE_FIFO_Send_Msg::send (const void *buf, size_t len) -{ - ACE_TRACE ("ACE_FIFO_Send_Msg::send"); - ACE_Str_Buf send_msg ((char *) buf, static_cast (len)); - - return this->send (send_msg); -} - -#if defined (ACE_HAS_STREAM_PIPES) -ACE_INLINE ssize_t -ACE_FIFO_Send_Msg::send (const ACE_Str_Buf *data, - const ACE_Str_Buf *cntl, - int flags) -{ - ACE_TRACE ("ACE_FIFO_Send_Msg::send"); - if (ACE_OS::putmsg (this->get_handle (), - (strbuf *) cntl, - (strbuf *) data, - flags) == -1) - return-1; - else - return (cntl == 0 ? 0 : cntl->len) + (data == 0 ? 0 : data->len); -} - -ACE_INLINE ssize_t -ACE_FIFO_Send_Msg::send (int band, - const ACE_Str_Buf *data, - const ACE_Str_Buf *cntl, - int flags) -{ - ACE_TRACE ("ACE_FIFO_Send_Msg::send"); - - if (ACE_OS::putpmsg (this->get_handle (), - (strbuf *) cntl, - (strbuf *) data, - band, - flags) == -1) - return -1; - else - return (cntl == 0 ? 0 : cntl->len) + (data == 0 ? 0 : data->len); -} -#endif /* ACE_HAS_STREAM_PIPES */ - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/FILE.cpp b/modules/worldengine/deps/acelite/ace/FILE.cpp deleted file mode 100644 index 7704285384..0000000000 --- a/modules/worldengine/deps/acelite/ace/FILE.cpp +++ /dev/null @@ -1,145 +0,0 @@ -/* Defines the member functions for the base class of the ACE_IO_SAP - ACE_FILE abstraction. */ - -#include "ace/FILE.h" - -#include "ace/OS_NS_unistd.h" -#include "ace/OS_NS_sys_stat.h" - -#if !defined (__ACE_INLINE__) -#include "ace/FILE.inl" -#endif /* __ACE_INLINE__ */ - - - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_ALLOC_HOOK_DEFINE(ACE_FILE) - -void -ACE_FILE::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_FILE::dump"); - ACE_IO_SAP::dump (); -#endif /* ACE_HAS_DUMP */ -} - -// This is the do-nothing constructor. - -ACE_FILE::ACE_FILE (void) -{ - ACE_TRACE ("ACE_FILE::ACE_FILE"); -} - -// Close the file - -int -ACE_FILE::close (void) -{ - ACE_TRACE ("ACE_FILE::close"); - int result = 0; - - if (this->get_handle () != ACE_INVALID_HANDLE) - { - result = ACE_OS::close (this->get_handle ()); - this->set_handle (ACE_INVALID_HANDLE); - } - return result; -} - -int -ACE_FILE::get_info (ACE_FILE_Info *finfo) -{ - ACE_TRACE ("ACE_FILE::get_info"); - ACE_stat filestatus; - - int const result = ACE_OS::fstat (this->get_handle (), &filestatus); - - if (result == 0) - { - finfo->mode_ = filestatus.st_mode; - finfo->nlink_ = filestatus.st_nlink; - finfo->size_ = filestatus.st_size; - } - - return result; -} - -int -ACE_FILE::get_info (ACE_FILE_Info &finfo) -{ - ACE_TRACE ("ACE_FILE::get_info"); - - return this->get_info (&finfo); -} - -int -ACE_FILE::truncate (ACE_OFF_T length) -{ - ACE_TRACE ("ACE_FILE::truncate"); - return ACE_OS::ftruncate (this->get_handle (), length); -} - -ACE_OFF_T -ACE_FILE::seek (ACE_OFF_T offset, int startpos) -{ - return ACE_OS::lseek (this->get_handle (), offset, startpos); -} - -ACE_OFF_T -ACE_FILE::tell (void) -{ - ACE_TRACE ("ACE_FILE::tell"); - return ACE_OS::lseek (this->get_handle (), 0, SEEK_CUR); -} - -// Return the local endpoint address. - -int -ACE_FILE::get_local_addr (ACE_Addr &addr) const -{ - ACE_TRACE ("ACE_FILE::get_local_addr"); - - // Perform the downcast since had better be an - // . - ACE_FILE_Addr *file_addr = - dynamic_cast (&addr); - - if (file_addr == 0) - return -1; - else - { - *file_addr = this->addr_; - return 0; - } -} - -// Return the same result as . - -int -ACE_FILE::get_remote_addr (ACE_Addr &addr) const -{ - ACE_TRACE ("ACE_FILE::get_remote_addr"); - - return this->get_local_addr (addr); -} - -int -ACE_FILE::remove (void) -{ - ACE_TRACE ("ACE_FILE::remove"); - - this->close (); - return ACE_OS::unlink (this->addr_.get_path_name ()); -} - -int -ACE_FILE::unlink (void) -{ - ACE_TRACE ("ACE_FILE::unlink"); - - return ACE_OS::unlink (this->addr_.get_path_name ()); -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/FILE.h b/modules/worldengine/deps/acelite/ace/FILE.h deleted file mode 100644 index e128eda3a0..0000000000 --- a/modules/worldengine/deps/acelite/ace/FILE.h +++ /dev/null @@ -1,124 +0,0 @@ -/* -*- C++ -*- */ - -//============================================================================= -/** - * @file FILE.h - * - * @author Gerhard Lenzer - */ -//============================================================================= - -#ifndef ACE_FILE_H -#define ACE_FILE_H -#include /**/ "ace/pre.h" - -#include "ace/IO_SAP.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/FILE_Addr.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_FILE_Info - * - * @brief Abstracts basic OS FILE information. - */ -class ACE_Export ACE_FILE_Info -{ -public: - /// Mode of file - mode_t mode_; - - /// No of links - nlink_t nlink_; - - /// Size of file - ACE_OFF_T size_; -}; - -/** - * @class ACE_FILE - * - * @brief Defines the core methods of the ACE_FILE abstraction. - */ -class ACE_Export ACE_FILE : public ACE_IO_SAP -{ -public: - /// Close the ACE_FILE handle without removing the ACE_FILE from - /// the file system. - int close (void); - - /// Close and remove the ACE_FILE from the file system. - int remove (void); - - /// Remove the ACE_FILE from the file system without closing the - /// ACE_FILE handle. - int unlink (void); - - /// Get information on this ACE_FILE. - int get_info (ACE_FILE_Info *finfo); - - /// Get information on this ACE_FILE. - int get_info (ACE_FILE_Info &finfo); - - /// Set filesize to length byte. - int truncate (ACE_OFF_T length); - - /** - * Sets the file pointer as follows: - * o If @ whence is @c SEEK_SET, the pointer is set to @a offset - * bytes. - * - * o If @a whence> is @c SEEK_CUR, the pointer is set to its - * current location plus @a offset. - * - * o If @a whence is @c SEEK_END, the pointer is set to the size - * of the file plus offset. - */ - ACE_OFF_T seek (ACE_OFF_T offset, - int whence = SEEK_CUR); - - /// Return an offset for the file handle. - ACE_OFF_T tell (void); - - /** - * Disable signal @a signum - * This is here to prevent Win32 from - * disabling SPIPE using socket calls - */ - int disable (int signum) const ; - - /// Return the local endpoint address in the referenced ACE_Addr. - /// Returns 0 if successful, else -1. - int get_local_addr (ACE_Addr &) const; - - /// Return the same thing as get_local_addr(). - int get_remote_addr (ACE_Addr &) const; - - /// Dump the state of an object. - void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - -protected: - /// Ensure that this class is only created by the - /// ACE_FILE_Connector. - ACE_FILE (void); - - /// File we are "connected" with... - ACE_FILE_Addr addr_; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/FILE.inl" -#endif /* __ACE_INLINE__ */ - -#include /**/ "ace/post.h" -#endif /* ACE_FILE_H */ diff --git a/modules/worldengine/deps/acelite/ace/FILE.inl b/modules/worldengine/deps/acelite/ace/FILE.inl deleted file mode 100644 index 69c3e0cd23..0000000000 --- a/modules/worldengine/deps/acelite/ace/FILE.inl +++ /dev/null @@ -1,15 +0,0 @@ -// -*- C++ -*- -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_INLINE int -ACE_FILE::disable (int signum) const -{ -#if defined (ACE_WIN32) - ACE_UNUSED_ARG (signum) ; - return 0 ; -#else /* ACE_WIN32 */ - return ACE_IO_SAP::disable (signum) ; -#endif /* ACE_WIN32 */ -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/FILE_Addr.cpp b/modules/worldengine/deps/acelite/ace/FILE_Addr.cpp deleted file mode 100644 index 9d043f5fcf..0000000000 --- a/modules/worldengine/deps/acelite/ace/FILE_Addr.cpp +++ /dev/null @@ -1,129 +0,0 @@ -#include "ace/FILE_Addr.h" -#include "ace/Lib_Find.h" -#include "ace/Log_Category.h" -#include "ace/OS_NS_stdlib.h" -#include "ace/OS_NS_string.h" -#include "ace/os_include/sys/os_socket.h" - -#if !defined (__ACE_INLINE__) -#include "ace/FILE_Addr.inl" -#endif /* __ACE_INLINE__ */ - - - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_ALLOC_HOOK_DEFINE(ACE_FILE_Addr) - -ACE_FILE_Addr::ACE_FILE_Addr (void) - : ACE_Addr (AF_FILE, sizeof this->filename_ / sizeof (ACE_TCHAR)) -{ - this->filename_[0] = '\0'; -} - -int -ACE_FILE_Addr::set (const ACE_FILE_Addr &sa) -{ - if (sa.get_type () == AF_ANY) - { -#if defined (ACE_DISABLE_MKTEMP) - // Built without mktemp support; punt back to caller. - errno = ENOTSUP; - return -1; -#else - -# if defined (ACE_DEFAULT_TEMP_FILE) - // Create a temporary file. - ACE_OS::strcpy (this->filename_, - ACE_DEFAULT_TEMP_FILE); -# else /* ACE_DEFAULT_TEMP_FILE */ - if (ACE::get_temp_dir (this->filename_, MAXPATHLEN - 15) == -1) - // -15 for ace-file-XXXXXX - { - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("Temporary path too long, ") - ACE_TEXT ("defaulting to current directory\n"))); - this->filename_[0] = 0; - } - - // Add the filename to the end - ACE_OS::strcat (this->filename_, ACE_TEXT ("ace-fileXXXXXX")); - -# endif /* ACE_DEFAULT_TEMP_FILE */ - - if (ACE_OS::mktemp (this->filename_) == 0) - return -1; - this->base_set (AF_FILE, - static_cast (ACE_OS::strlen (this->filename_) + 1)); -#endif /* ACE_DISABLE_MKTEMP */ - } - else - { - (void)ACE_OS::strsncpy (this->filename_, sa.filename_, sa.get_size ()); - - this->base_set (sa.get_type (), sa.get_size ()); - } - return 0; -} - -// Copy constructor. - -ACE_FILE_Addr::ACE_FILE_Addr (const ACE_FILE_Addr &sa) - : ACE_Addr (AF_FILE, sizeof this->filename_) -{ - this->set (sa); -} - -int -ACE_FILE_Addr::set (const ACE_TCHAR *filename) -{ - this->ACE_Addr::base_set (AF_FILE, - static_cast (ACE_OS::strlen (filename) + 1)); - (void) ACE_OS::strsncpy (this->filename_, - filename, - sizeof this->filename_ / sizeof (ACE_TCHAR)); - return 0; -} - -ACE_FILE_Addr & -ACE_FILE_Addr::operator= (const ACE_FILE_Addr &sa) -{ - if (this != &sa) - this->set (sa); - return *this; -} - -// Create a ACE_Addr from a ACE_FILE pathname. - -ACE_FILE_Addr::ACE_FILE_Addr (const ACE_TCHAR *filename) -{ - this->set (filename); -} - -int -ACE_FILE_Addr::addr_to_string (ACE_TCHAR *s, size_t len) const -{ - ACE_OS::strsncpy (s, this->filename_, len); - return 0; -} - -// Return the address. - -void * -ACE_FILE_Addr::get_addr (void) const -{ - return (void *)&this->filename_; -} - -void -ACE_FILE_Addr::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_FILE_Addr::dump"); - - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("filename_ = %s"), this->filename_)); - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/FILE_Addr.h b/modules/worldengine/deps/acelite/ace/FILE_Addr.h deleted file mode 100644 index 52466e7807..0000000000 --- a/modules/worldengine/deps/acelite/ace/FILE_Addr.h +++ /dev/null @@ -1,87 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file FILE_Addr.h - * - * @author Douglas C. Schmidt - */ -//============================================================================= - -#ifndef ACE_FILE_ADDR_H -#define ACE_FILE_ADDR_H -#include /**/ "ace/pre.h" - -#include "ace/Addr.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Flag_Manip.h" -#include "ace/os_include/os_dirent.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_FILE_Addr - * - * @brief Defines the FILE address family address format. - */ -class ACE_Export ACE_FILE_Addr : public ACE_Addr -{ -public: - // = Initialization methods. - /// Default constructor. - ACE_FILE_Addr (void); - - /// Copy constructor. - ACE_FILE_Addr (const ACE_FILE_Addr &sa); - - /// Acts like a copy constructor. If @a sa == ACE_Addr::sap_any then - /// create a temporary filename using ACE_OS::mktemp. - int set (const ACE_FILE_Addr &sa); - - /// Create a ACE_FILE_Addr from a pathname. - explicit ACE_FILE_Addr (const ACE_TCHAR *filename); - - /// Create a ACE_FILE_Addr from a pathname. - int set (const ACE_TCHAR *filename); - - /// Assignment operator. - ACE_FILE_Addr &operator= (const ACE_FILE_Addr &); - - /// Return a pointer to the address. - virtual void *get_addr (void) const; - - /// Transform the current address into string format. - virtual int addr_to_string (ACE_TCHAR *addr, size_t) const; - - /// Compare two addresses for equality. - bool operator == (const ACE_FILE_Addr &SAP) const; - - /// Compare two addresses for inequality. - bool operator != (const ACE_FILE_Addr &SAP) const; - - /// Return the path name used for the rendezvous point. - const ACE_TCHAR *get_path_name (void) const; - - /// Dump the state of an object. - void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - -private: - /// Name of the file. - ACE_TCHAR filename_[MAXPATHLEN + 1]; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/FILE_Addr.inl" -#endif /* __ACE_INLINE__ */ - -#include /**/ "ace/post.h" -#endif /* ACE_FILE_ADDR_H */ diff --git a/modules/worldengine/deps/acelite/ace/FILE_Addr.inl b/modules/worldengine/deps/acelite/ace/FILE_Addr.inl deleted file mode 100644 index c873ba8b08..0000000000 --- a/modules/worldengine/deps/acelite/ace/FILE_Addr.inl +++ /dev/null @@ -1,31 +0,0 @@ -// -*- C++ -*- - -#include "ace/SString.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -// Compare two addresses for equality. - -ACE_INLINE bool -ACE_FILE_Addr::operator == (const ACE_FILE_Addr &sap) const -{ - return ACE_OS::strcmp (this->filename_, sap.filename_) == 0; -} - -// Compare two addresses for inequality. - -ACE_INLINE bool -ACE_FILE_Addr::operator != (const ACE_FILE_Addr &sap) const -{ - return !((*this) == sap); // This is lazy, of course... ;-) -} - -// Return the path name used for the rendezvous point. - -ACE_INLINE const ACE_TCHAR * -ACE_FILE_Addr::get_path_name (void) const -{ - return this->filename_; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/FILE_Connector.cpp b/modules/worldengine/deps/acelite/ace/FILE_Connector.cpp deleted file mode 100644 index 1dfc9adf4e..0000000000 --- a/modules/worldengine/deps/acelite/ace/FILE_Connector.cpp +++ /dev/null @@ -1,82 +0,0 @@ -#include "ace/FILE_Connector.h" -#include "ace/Handle_Ops.h" -#include "ace/OS_NS_stdlib.h" - -#if !defined (__ACE_INLINE__) -#include "ace/FILE_Connector.inl" -#endif /* __ACE_INLINE__ */ - - - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_ALLOC_HOOK_DEFINE(ACE_FILE_Connector) - -void -ACE_FILE_Connector::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_FILE_Connector::dump"); - - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("\n"))); - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} - -ACE_FILE_Connector::ACE_FILE_Connector (void) -{ - ACE_TRACE ("ACE_FILE_Connector::ACE_FILE_Connector"); -} - -int -ACE_FILE_Connector::connect (ACE_FILE_IO &new_io, - const ACE_FILE_Addr &remote_sap, - ACE_Time_Value *timeout, - const ACE_Addr &, - int, - int flags, - int perms) -{ - ACE_TRACE ("ACE_FILE_Connector::connect"); - ACE_ASSERT (new_io.get_handle () == ACE_INVALID_HANDLE); - - ACE_HANDLE handle = ACE_INVALID_HANDLE; - - // Check to see if caller has requested that we create the filename. - if (reinterpret_cast ( - const_cast (remote_sap)) == ACE_Addr::sap_any) - { - // Create a new temporary file. - // Use ACE_OS::mkstemp() if it is available since it avoids a - // race condition, and subsequently a security hole due to that - // race condition (specifically, a denial-of-service attack). - // - // However, using mkstemp() prevents us from doing a timed open - // since it opens the file for us. Better to avoid the race - // condition. - char filename[] = "ace-file-XXXXXX"; - - handle = ACE_OS::mkstemp (filename); // mkstemp() replaces "XXXXXX" - - if (handle == ACE_INVALID_HANDLE - || new_io.addr_.set (ACE_TEXT_CHAR_TO_TCHAR (filename)) != 0) - return -1; - - new_io.set_handle (handle); - - return 0; - } - else - new_io.addr_ = remote_sap; // class copy. - - handle = ACE::handle_timed_open (timeout, - new_io.addr_.get_path_name (), - flags, - perms); - - new_io.set_handle (handle); - return handle == ACE_INVALID_HANDLE ? -1 : 0; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/FILE_Connector.h b/modules/worldengine/deps/acelite/ace/FILE_Connector.h deleted file mode 100644 index abec0acc07..0000000000 --- a/modules/worldengine/deps/acelite/ace/FILE_Connector.h +++ /dev/null @@ -1,111 +0,0 @@ -/* -*- C++ -*- */ - -//============================================================================= -/** - * @file FILE_Connector.h - * - * @author Doug Schmidt - */ -//============================================================================= - -#ifndef ACE_FILE_CONNECTOR_H -#define ACE_FILE_CONNECTOR_H -#include /**/ "ace/pre.h" - -#include "ace/FILE_IO.h" -#include "ace/Log_Category.h" -#include "ace/os_include/os_fcntl.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_FILE_Connector - * - * @brief Defines an active connection factory for the ACE_FILE wrappers. - * - * Note that the O_APPEND flag is only partly supported on Win32. If - * you specify O_APPEND, then the file pointer will be positioned at - * the end of the file initially during open, but it is not - * re-positioned at the end prior to each write, as specified by - * POSIX. This is generally good enough for typical situations, but - * it is ``not quite right'' in its semantics. - */ -class ACE_Export ACE_FILE_Connector -{ -public: - // = Initialization methods. - /// Default constructor. - ACE_FILE_Connector (void); - - /** - * Actively ``connect'' and produce a @a new_io ACE_FILE_IO object - * if things go well. The @a remote_sap is the file that we are - * trying to create/open. If it's the default value of - * ACE_Addr::sap_any then the user is letting the OS create the - * filename (via ). The @a timeout is the amount of - * time to wait to create/open the file. If it's 0 then we block - * indefinitely. If *timeout == {0, 0} then the file is created - * using non-blocking mode. If *timeout > {0, 0} then this is the - * maximum amount of time to wait before timing out. The - * @a local_sap and @a reuse_addr parameters are ignored. The @a flags - * and @a perms arguments are passed down to the - * method. - */ - ACE_FILE_Connector (ACE_FILE_IO &new_io, - const ACE_FILE_Addr &remote_sap, - ACE_Time_Value *timeout = 0, - const ACE_Addr &local_sap = ACE_Addr::sap_any, - int reuse_addr = 0, - int flags = O_RDWR | O_CREAT, - int perms = ACE_DEFAULT_FILE_PERMS); - - /** - * Actively ``connect'' and produce a @a new_io object - * if things go well. The @a remote_sap is the file that we are - * trying to create/open. If it's the default value of - * ACE_Addr::sap_any then the user is letting the OS create the - * filename (via ). The @a timeout is the amount of - * time to wait to create/open the file. If it's 0 then we block - * indefinitely. If *timeout == {0, 0} then the file is created - * using non-blocking mode. In this case, if the create/open can't - * be done immediately the value of -1 is returned with . If *timeout > {0, 0} then this is the maximum amount of - * time to wait before timing out. If the time expires before the - * connection is made @c errno == ETIME. The @a local_sap and - * @a reuse_addr parameters are ignored. The @a flags and @a perms - * arguments are passed down to the method. - */ - int connect (ACE_FILE_IO &new_io, - const ACE_FILE_Addr &remote_sap, - ACE_Time_Value *timeout = 0, - const ACE_Addr &local_sap = ACE_Addr::sap_any, - int reuse_addr = 0, - int flags = O_RDWR | O_CREAT, - int perms = ACE_DEFAULT_FILE_PERMS); - - /// Resets any event associations on this handle - bool reset_new_handle (ACE_HANDLE handle); - - /// Dump the state of an object. - void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - - // = Meta-type "trait" information. - typedef ACE_FILE_Addr PEER_ADDR; - typedef ACE_FILE_IO PEER_STREAM; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/FILE_Connector.inl" -#endif /* __ACE_INLINE__ */ - -#include /**/ "ace/post.h" -#endif /* ACE_FILE_CONNECTOR_H */ diff --git a/modules/worldengine/deps/acelite/ace/FILE_Connector.inl b/modules/worldengine/deps/acelite/ace/FILE_Connector.inl deleted file mode 100644 index a12a6573bc..0000000000 --- a/modules/worldengine/deps/acelite/ace/FILE_Connector.inl +++ /dev/null @@ -1,32 +0,0 @@ -// -*- C++ -*- -// Creates a Local ACE_FILE. - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_INLINE -ACE_FILE_Connector::ACE_FILE_Connector (ACE_FILE_IO &new_io, - const ACE_FILE_Addr &remote_sap, - ACE_Time_Value *timeout, - const ACE_Addr &local_sap, - int reuse_addr, - int flags, - int perms) -{ - ACE_TRACE ("ACE_FILE_Connector::ACE_FILE_Connector"); - if (this->connect (new_io, remote_sap, timeout, local_sap, - reuse_addr, flags, perms) == ACE_IO_SAP::INVALID_HANDLE - && timeout != 0 && !(errno == EWOULDBLOCK || errno == ETIME)) - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("address %s, %p\n"), - remote_sap.get_path_name (), - ACE_TEXT ("ACE_FILE_IO"))); -} - -ACE_INLINE bool -ACE_FILE_Connector::reset_new_handle (ACE_HANDLE) -{ - // Nothing to do here since the handle is not a socket - return false; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/FILE_IO.cpp b/modules/worldengine/deps/acelite/ace/FILE_IO.cpp deleted file mode 100644 index f79b6827a6..0000000000 --- a/modules/worldengine/deps/acelite/ace/FILE_IO.cpp +++ /dev/null @@ -1,144 +0,0 @@ -#include "ace/FILE_IO.h" - -#include "ace/Log_Category.h" -#include "ace/OS_NS_sys_stat.h" -#include "ace/OS_Memory.h" -#include "ace/Truncate.h" - -#if !defined (__ACE_INLINE__) -#include "ace/FILE_IO.inl" -#endif /* __ACE_INLINE__ */ - - - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_ALLOC_HOOK_DEFINE(ACE_FILE_IO) - -void -ACE_FILE_IO::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_FILE_IO::dump"); - - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - this->addr_.dump (); - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} - -// Simple-minded do nothing constructor. - -ACE_FILE_IO::ACE_FILE_IO (void) -{ - ACE_TRACE ("ACE_FILE_IO::ACE_FILE_IO"); -} - -// Send N char *ptrs and int lengths. Note that the char *'s precede -// the ints (basically, an varargs version of writev). The count N is -// the *total* number of trailing arguments, *not* a couple of the -// number of tuple pairs! - -ssize_t -ACE_FILE_IO::send (size_t n, ...) const -{ - ACE_TRACE ("ACE_FILE_IO::send"); - va_list argp; - int total_tuples = ACE_Utils::truncate_cast (n / 2); - iovec *iovp = 0; -#if defined (ACE_HAS_ALLOCA) - iovp = (iovec *) alloca (total_tuples * sizeof (iovec)); -#else - ACE_NEW_RETURN (iovp, - iovec[total_tuples], - -1); -#endif /* !defined (ACE_HAS_ALLOCA) */ - - va_start (argp, n); - - for (int i = 0; i < total_tuples; i++) - { - iovp[i].iov_base = va_arg (argp, char *); - iovp[i].iov_len = va_arg (argp, int); - } - - ssize_t result = ACE_OS::writev (this->get_handle (), - iovp, - total_tuples); -#if !defined (ACE_HAS_ALLOCA) - delete [] iovp; -#endif /* !defined (ACE_HAS_ALLOCA) */ - va_end (argp); - return result; -} - -// This is basically an interface to ACE_OS::readv, that doesn't use -// the struct iovec explicitly. The ... can be passed as an arbitrary -// number of (char *ptr, int len) tuples. However, the count N is the -// *total* number of trailing arguments, *not* a couple of the number -// of tuple pairs! - -ssize_t -ACE_FILE_IO::recv (size_t n, ...) const -{ - ACE_TRACE ("ACE_FILE_IO::recv"); - va_list argp; - int total_tuples = ACE_Utils::truncate_cast (n / 2); - iovec *iovp = 0; -#if defined (ACE_HAS_ALLOCA) - iovp = (iovec *) alloca (total_tuples * sizeof (iovec)); -#else - ACE_NEW_RETURN (iovp, - iovec[total_tuples], - -1); -#endif /* !defined (ACE_HAS_ALLOCA) */ - - va_start (argp, n); - - for (int i = 0; i < total_tuples; i++) - { - iovp[i].iov_base = va_arg (argp, char *); - iovp[i].iov_len = va_arg (argp, int); - } - - ssize_t const result = ACE_OS::readv (this->get_handle (), - iovp, - total_tuples); -#if !defined (ACE_HAS_ALLOCA) - delete [] iovp; -#endif /* !defined (ACE_HAS_ALLOCA) */ - va_end (argp); - return result; -} - -// Allows a client to read from a file without having to provide a -// buffer to read. This method determines how much data is in the -// file, allocates a buffer of this size, reads in the data, and -// returns the number of bytes read. - -ssize_t -ACE_FILE_IO::recvv (iovec *io_vec) -{ - ACE_TRACE ("ACE_FILE_IO::recvv"); - - io_vec->iov_base = 0; - ACE_OFF_T const length = ACE_OS::filesize (this->get_handle ()); - - if (length > 0) - { - // Restrict to max size we can record in iov_len. - size_t len = ACE_Utils::truncate_cast (length); - ACE_NEW_RETURN (io_vec->iov_base, - char[len], - -1); - io_vec->iov_len = static_cast (this->recv_n (io_vec->iov_base, - len)); - return io_vec->iov_len; - } - else - { - return ACE_Utils::truncate_cast (length); - } -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/FILE_IO.h b/modules/worldengine/deps/acelite/ace/FILE_IO.h deleted file mode 100644 index 96cfb9863b..0000000000 --- a/modules/worldengine/deps/acelite/ace/FILE_IO.h +++ /dev/null @@ -1,168 +0,0 @@ -/* -*- C++ -*- */ - -//============================================================================= -/** - * @file FILE_IO.h - * - * @author Douglas C. Schmidt - */ -//============================================================================= - -#ifndef ACE_FILE_IO_H -#define ACE_FILE_IO_H -#include /**/ "ace/pre.h" - -#include "ace/FILE.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/FILE_Addr.h" - -// Used in the FILE_IO.h file... -#include "ace/os_include/os_stdio.h" -#include "ace/os_include/sys/os_uio.h" - -#if defined (ACE_HAS_STREAM_PIPES) -# include "ace/OS_NS_stropts.h" -#endif /* ACE_HAS_STREAM_PIPES */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -// Forward decl. -class ACE_Message_Block; -class ACE_Time_Value; - -/** - * @class ACE_FILE_IO - * - * @brief Read/Write operations on Files - */ -class ACE_Export ACE_FILE_IO : public ACE_FILE -{ -public: - friend class ACE_FILE_Connector; - - // = Initialization method. - /// Default constructor. - ACE_FILE_IO (void); - - /// send upto @a n bytes in @a buf. - ssize_t send (const void *buf, size_t n) const; - - /// Recv upto @a n bytes in @a buf. - ssize_t recv (void *buf, size_t n) const; - - /// Send n bytes, keep trying until n are sent. - ssize_t send_n (const void *buf, size_t n) const; - - /// Send all the @a message_blocks chained through their next and - /// cont pointers. This call uses the underlying OS gather-write - /// operation to reduce the domain-crossing penalty. - ssize_t send_n (const ACE_Message_Block *message_block, - const ACE_Time_Value *timeout = 0, - size_t *bytes_transferred = 0); - - /// Recv n bytes, keep trying until n are received. - ssize_t recv_n (void *buf, size_t n) const; - -#if defined (ACE_HAS_STREAM_PIPES) - /// Send bytes via STREAM pipes. - ssize_t send (const ACE_Str_Buf *cntl, - const ACE_Str_Buf *data, - int flags = 0) const; - - /// Recv bytes via STREAM pipes. - ssize_t recv (ACE_Str_Buf *cntl, - ACE_Str_Buf *data, - int *flags) const; - - /// Send bytes via STREAM pipes using "band" mode. - ssize_t send (const ACE_Str_Buf *cntl, - const ACE_Str_Buf *data, - int band, - int flags) const; - - /// Recv bytes via STREAM pipes using "band" mode. - ssize_t recv (ACE_Str_Buf *cntl, - ACE_Str_Buf *data, - int *band, - int *flags) const; - -#endif /* ACE_HAS_STREAM_PIPES */ - - /// Send iovecs via <::writev>. - ssize_t send (const iovec iov[], int n) const; - - /// Recv iovecs via <::readv>. - ssize_t recv (iovec iov[], int n) const; - - /** - * Send N char *ptrs and int lengths. Note that the char *'s - * precede the ints (basically, an varargs version of writev). The - * count N is the *total* number of trailing arguments, *not* a - * couple of the number of tuple pairs! - */ - ssize_t send (size_t n, ...) const; - - /** - * This is an interface to ::readv, that doesn't use the struct - * iovec explicitly. The ... can be passed as an arbitrary number - * of (char *ptr, int len) tuples. However, the count N is the - * *total* number of trailing arguments, *not* a couple of the - * number of tuple pairs! - */ - ssize_t recv (size_t n, ...) const; - - /// Send @a n bytes via Win32 WriteFile using overlapped I/O. - ssize_t send (const void *buf, - size_t n, - ACE_OVERLAPPED *overlapped) const; - - /// Recv @a n bytes via Win32 ReadFile using overlapped I/O. - ssize_t recv (void *buf, - size_t n, - ACE_OVERLAPPED *overlapped) const; - - /// Send an @c iovec of size @a n to the file. - ssize_t sendv (const iovec iov[], - int n) const; - - /** - * Allows a client to read from a file without having to provide a - * buffer to read. This method determines how much data is in the - * file, allocates a buffer of this size, reads in the data, and - * returns the number of bytes read. The caller is responsible for - * deleting the member in the field of using - * delete [] io_vec->iov_base. - */ - ssize_t recvv (iovec *io_vec); - - /// Send an of size @a n to the file. Will block until all - /// bytes are sent or an error occurs. - ssize_t sendv_n (const iovec iov[], - int n) const; - - /// Receive an of size @a n to the file. - ssize_t recvv_n (iovec iov[], - int n) const; - - /// Dump the state of an object. - void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - - // = Meta-type info - typedef ACE_FILE_Addr PEER_ADDR; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/FILE_IO.inl" -#endif /* __ACE_INLINE__ */ - -#include /**/ "ace/post.h" -#endif /* ACE_FILE_IO_H */ diff --git a/modules/worldengine/deps/acelite/ace/FILE_IO.inl b/modules/worldengine/deps/acelite/ace/FILE_IO.inl deleted file mode 100644 index 57c300490e..0000000000 --- a/modules/worldengine/deps/acelite/ace/FILE_IO.inl +++ /dev/null @@ -1,149 +0,0 @@ -// -*- C++ -*- -#include "ace/ACE.h" -#include "ace/OS_NS_sys_uio.h" -#include "ace/OS_NS_unistd.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_INLINE ssize_t -ACE_FILE_IO::sendv_n (const iovec iov[], int n) const -{ - ACE_TRACE ("ACE_FILE_IO::sendv_n"); - return ACE::writev_n (this->get_handle (), - iov, - n); -} - -ACE_INLINE ssize_t -ACE_FILE_IO::send_n (const ACE_Message_Block *message_block, - const ACE_Time_Value *timeout, - size_t *bytes_transferred) -{ - ACE_TRACE ("ACE_FILE_IO::send_n"); - ACE_UNUSED_ARG (timeout); - return ACE::write_n (this->get_handle (), - message_block, - bytes_transferred); -} - -// Recv an n byte message from the file. - -ACE_INLINE ssize_t -ACE_FILE_IO::recvv_n (iovec iov[], int n) const -{ - ACE_TRACE ("ACE_FILE_IO::recvv_n"); - // @@ Carlos, can you please update this to call the - // new ACE::recvv_n() method that you write? - return ACE_OS::readv (this->get_handle (), - iov, - n); -} - -// Send an of size to the file. - -ACE_INLINE ssize_t -ACE_FILE_IO::sendv (const iovec iov[], int n) const -{ - ACE_TRACE ("ACE_FILE_IO::sendv"); - return ACE_OS::writev (this->get_handle (), iov, n); -} - -// Send exactly N bytes from BUF to this file. Keeping trying until -// this many bytes are sent. - -ACE_INLINE ssize_t -ACE_FILE_IO::send_n (const void *buf, size_t n) const -{ - ACE_TRACE ("ACE_FILE_IO::send_n"); - return ACE::write_n (this->get_handle (), buf, n); -} - -// Receive exactly N bytes from this file into BUF. Keep trying until -// this many bytes are received. - -ACE_INLINE ssize_t -ACE_FILE_IO::recv_n (void *buf, size_t n) const -{ - ACE_TRACE ("ACE_FILE_IO::recv_n"); - return ACE::read_n (this->get_handle (), buf, n); -} - -ACE_INLINE ssize_t -ACE_FILE_IO::send (const void *buf, size_t n) const -{ - ACE_TRACE ("ACE_FILE_IO::send"); - return ACE_OS::write (this->get_handle (), buf, n); -} - -ACE_INLINE ssize_t -ACE_FILE_IO::recv (void *buf, size_t n) const -{ - ACE_TRACE ("ACE_FILE_IO::recv"); - return ACE_OS::read (this->get_handle (), buf, n); -} - -ACE_INLINE ssize_t -ACE_FILE_IO::send (const iovec iov[], int n) const -{ - ACE_TRACE ("ACE_FILE_IO::send"); - return ACE_OS::writev (this->get_handle (), iov, n); -} - -ACE_INLINE ssize_t -ACE_FILE_IO::recv (iovec iov[], int n) const -{ - ACE_TRACE ("ACE_FILE_IO::recv"); - return ACE_OS::readv (this->get_handle (), iov, n); -} - -#if defined (ACE_HAS_STREAM_PIPES) -ACE_INLINE ssize_t -ACE_FILE_IO::recv (ACE_Str_Buf *cntl, ACE_Str_Buf *data, int *band, int *flags) const -{ - ACE_TRACE ("ACE_FILE_IO::recv"); - return ACE_OS::getpmsg (this->get_handle (), (strbuf *) cntl, (strbuf *) data, band, flags); -} - -ACE_INLINE ssize_t -ACE_FILE_IO::send (const ACE_Str_Buf *cntl, const ACE_Str_Buf *data, int band, int flags) const -{ - ACE_TRACE ("ACE_FILE_IO::send"); - return ACE_OS::putpmsg (this->get_handle (), (strbuf *) cntl, (strbuf *) data, band, flags); -} - -ACE_INLINE ssize_t -ACE_FILE_IO::recv (ACE_Str_Buf *cntl, ACE_Str_Buf *data, int *flags) const -{ - ACE_TRACE ("ACE_FILE_IO::recv"); - return ACE_OS::getmsg (this->get_handle (), (strbuf *) cntl, (strbuf *) data, flags); -} - -ACE_INLINE ssize_t -ACE_FILE_IO::send (const ACE_Str_Buf *cntl, const ACE_Str_Buf *data, int flags) const -{ - ACE_TRACE ("ACE_FILE_IO::send"); - return ACE_OS::putmsg (this->get_handle (), (strbuf *) cntl, (strbuf *) data, flags); -} - -ACE_INLINE ssize_t -ACE_FILE_IO::send (const void *buf, size_t n, - ACE_OVERLAPPED *overlapped) const -{ - ACE_TRACE ("ACE_FILE_IO::send"); - return ACE_OS::write (this->get_handle (), - buf, n, - overlapped); -} - -ACE_INLINE ssize_t -ACE_FILE_IO::recv (void *buf, size_t n, - ACE_OVERLAPPED *overlapped) const -{ - ACE_TRACE ("ACE_FILE_IO::recv"); - return ACE_OS::read (this->get_handle (), buf, n, - overlapped); -} - -#endif /* ACE_HAS_STREAM_PIPES */ - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/File_Lock.cpp b/modules/worldengine/deps/acelite/ace/File_Lock.cpp deleted file mode 100644 index 5255ca460d..0000000000 --- a/modules/worldengine/deps/acelite/ace/File_Lock.cpp +++ /dev/null @@ -1,70 +0,0 @@ -#include "ace/File_Lock.h" -#include "ace/Log_Category.h" - -#if !defined (__ACE_INLINE__) -#include "ace/File_Lock.inl" -#endif /* __ACE_INLINE__ */ - - - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_ALLOC_HOOK_DEFINE(ACE_File_Lock) - -void -ACE_File_Lock::dump (void) const -{ -#if defined (ACE_HAS_DUMP) -// ACE_TRACE ("ACE_File_Lock::dump"); - - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - this->lock_.dump (); - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} - -ACE_File_Lock::ACE_File_Lock (ACE_HANDLE h, - bool unlink_in_destructor) - : removed_ (false), - unlink_in_destructor_ (unlink_in_destructor) -{ -// ACE_TRACE ("ACE_File_Lock::ACE_File_Lock"); - if (ACE_OS::flock_init (&this->lock_) == -1) - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("%p\n"), - ACE_TEXT ("ACE_File_Lock::ACE_File_Lock"))); - this->set_handle (h); -} - -ACE_File_Lock::ACE_File_Lock (const ACE_TCHAR *name, - int flags, - mode_t perms, - bool unlink_in_destructor) - : unlink_in_destructor_ (unlink_in_destructor) -{ -// ACE_TRACE ("ACE_File_Lock::ACE_File_Lock"); - - if (this->open (name, flags, perms) == -1) - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("%p %s\n"), - ACE_TEXT ("ACE_File_Lock::ACE_File_Lock"), - name)); -} - -int -ACE_File_Lock::open (const ACE_TCHAR *name, - int flags, - mode_t perms) -{ -// ACE_TRACE ("ACE_File_Lock::open"); - this->removed_ = false; - return ACE_OS::flock_init (&this->lock_, flags, name, perms); -} - -ACE_File_Lock::~ACE_File_Lock (void) -{ -// ACE_TRACE ("ACE_File_Lock::~ACE_File_Lock"); - this->remove (this->unlink_in_destructor_); -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/File_Lock.h b/modules/worldengine/deps/acelite/ace/File_Lock.h deleted file mode 100644 index 060aeebe0b..0000000000 --- a/modules/worldengine/deps/acelite/ace/File_Lock.h +++ /dev/null @@ -1,168 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file File_Lock.h - * - * @author Douglas C. Schmidt - */ -//============================================================================= - -#ifndef ACE_FILE_LOCK_H -#define ACE_FILE_LOCK_H -#include /**/ "ace/pre.h" - -#include /**/ "ace/ACE_export.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/OS_NS_stdio.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_File_Lock - * - * @brief A wrapper around the UNIX file locking mechanism. - * - * Allows us to "adapt" the UNIX file locking mechanisms to work - * with all of our Guard stuff... - */ -class ACE_Export ACE_File_Lock -{ -public: - /** - * Set the of the File_Lock to @a handle. Note that this - * constructor assumes ownership of the @a handle and will close it - * down in . If you want the @a handle to stay open when - * is called make sure to call on the @a handle. - * If you don't want the file unlinked in the destructor pass a - * zero value for . - */ - ACE_File_Lock (ACE_HANDLE handle = ACE_INVALID_HANDLE, - bool unlink_in_destructor = true); - - /// Open the @a filename with @a flags and @a mode and set the result - /// to . If you don't want the file unlinked in the - /// destructor pass a false value for @a unlink_in_destructor. - ACE_File_Lock (const ACE_TCHAR *filename, - int flags, - mode_t mode = 0, - bool unlink_in_destructor = true); - - /// Open the @a filename with @a flags and @a mode and set the result to - /// . - int open (const ACE_TCHAR *filename, - int flags, - mode_t mode = 0); - - /// Remove a File lock by releasing it and closing down the . - ~ACE_File_Lock (void); - - /// Remove a File lock by releasing it and closing down the - /// . If @a unlink_file is true then we unlink the file. - int remove (bool unlink_file = true); - - /** - * Note, for interface uniformity with other synchronization - * wrappers we include the acquire() method. This is implemented as - * a write-lock to be on the safe-side... - */ - int acquire (short whence = 0, ACE_OFF_T start = 0, ACE_OFF_T len = 1); - - /** - * Note, for interface uniformity with other synchronization - * wrappers we include the method. This is implemented - * as a write-lock to be on the safe-side... Returns -1 on failure. - * If we "failed" because someone else already had the lock, @c errno - * is set to @c EBUSY. - */ - int tryacquire (short whence = 0, ACE_OFF_T start = 0, ACE_OFF_T len = 1); - - /// Unlock a readers/writer lock. - int release (short whence = 0, ACE_OFF_T start = 0, ACE_OFF_T len = 1); - - /// Acquire a write lock, but block if any readers or a - /// writer hold the lock. - int acquire_write (short whence = 0, ACE_OFF_T start = 0, ACE_OFF_T len = 1); - - /** - * Conditionally acquire a write lock (i.e., won't block). Returns - * -1 on failure. If we "failed" because someone else already had - * the lock, @c errno is set to @c EBUSY. - */ - int tryacquire_write (short whence = 0, ACE_OFF_T start = 0, ACE_OFF_T len = 1); - - /** - * Conditionally upgrade to a write lock (i.e., won't block). Returns - * -1 on failure. If we "failed" because someone else already had - * the lock, @c errno is set to @c EBUSY. - */ - int tryacquire_write_upgrade (short whence = 0, - ACE_OFF_T start = 0, - ACE_OFF_T len = 1); - - /** - * Acquire a read lock, but block if a writer hold the lock. - * Returns -1 on failure. If we "failed" because someone else - * already had the lock, @c errno is set to @c EBUSY. - */ - int acquire_read (short whence = 0, ACE_OFF_T start = 0, ACE_OFF_T len = 1); - - /** - * Conditionally acquire a read lock (i.e., won't block). Returns - * -1 on failure. If we "failed" because someone else already had - * the lock, @c errno is set to @c EBUSY. - */ - int tryacquire_read (short whence = 0, ACE_OFF_T start = 0, ACE_OFF_T len = 1); - - /// Get underlying ACE_HANDLE for the file. - ACE_HANDLE get_handle (void) const; - - /** - * Set underlying ACE_HANDLE. Note that this method assumes - * ownership of the @a handle and will close it down in . If - * you want the @a handle to stay open when is called make - * sure to call on the @a handle before closing it. You are - * responsible for the closing the existing @a handle before - * overwriting it. - */ - void set_handle (ACE_HANDLE); - - /// Dump state of the object. - void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - -protected: - /// Locking structure for OS record locks. - ACE_OS::ace_flock_t lock_; - - /// Keeps track of whether has been called yet to avoid - /// multiple calls, e.g., explicitly and implicitly in the - /// destructor. This flag isn't protected by a lock, so make sure - /// that you don't have multiple threads simultaneously calling - /// on the same object, which is a bad idea anyway... - bool removed_; - - /// Keeps track of whether to unlink the underlying file in the - /// destructor. - bool const unlink_in_destructor_; - -private: - // = Prevent assignment and initialization. - void operator= (const ACE_File_Lock &); - ACE_File_Lock (const ACE_File_Lock &); -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/File_Lock.inl" -#endif /* __ACE_INLINE__ */ - -#include /**/ "ace/post.h" -#endif /* ACE_FILE_LOCK_H */ diff --git a/modules/worldengine/deps/acelite/ace/File_Lock.inl b/modules/worldengine/deps/acelite/ace/File_Lock.inl deleted file mode 100644 index fb9ae6e0c1..0000000000 --- a/modules/worldengine/deps/acelite/ace/File_Lock.inl +++ /dev/null @@ -1,93 +0,0 @@ -// -*- C++ -*- -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_INLINE int -ACE_File_Lock::acquire_read (short whence, ACE_OFF_T start, ACE_OFF_T len) -{ -// ACE_TRACE ("ACE_File_Lock::acquire_read"); - return ACE_OS::flock_rdlock (&this->lock_, whence, start, len); -} - -ACE_INLINE int -ACE_File_Lock::tryacquire_read (short whence, ACE_OFF_T start, ACE_OFF_T len) -{ -// ACE_TRACE ("ACE_File_Lock::tryacquire_read"); - return ACE_OS::flock_tryrdlock (&this->lock_, whence, start, len); -} - -ACE_INLINE int -ACE_File_Lock::tryacquire_write (short whence, ACE_OFF_T start, ACE_OFF_T len) -{ -// ACE_TRACE ("ACE_File_Lock::tryacquire_write"); - return ACE_OS::flock_trywrlock (&this->lock_, whence, start, len); -} - -ACE_INLINE int -ACE_File_Lock::tryacquire_write_upgrade (short whence, - ACE_OFF_T start, - ACE_OFF_T len) -{ -// ACE_TRACE ("ACE_File_Lock::tryacquire_write_upgrade"); - return ACE_OS::flock_trywrlock (&this->lock_, whence, start, len); -} - -ACE_INLINE int -ACE_File_Lock::tryacquire (short whence, ACE_OFF_T start, ACE_OFF_T len) -{ -// ACE_TRACE ("ACE_File_Lock::tryacquire"); - return this->tryacquire_write (whence, start, len); -} - -ACE_INLINE int -ACE_File_Lock::acquire_write (short whence, ACE_OFF_T start, ACE_OFF_T len) -{ -// ACE_TRACE ("ACE_File_Lock::acquire_write"); - return ACE_OS::flock_wrlock (&this->lock_, whence, start, len); -} - -ACE_INLINE int -ACE_File_Lock::acquire (short whence, ACE_OFF_T start, ACE_OFF_T len) -{ -// ACE_TRACE ("ACE_File_Lock::acquire"); - return this->acquire_write (whence, start, len); -} - -ACE_INLINE int -ACE_File_Lock::release (short whence, ACE_OFF_T start, ACE_OFF_T len) -{ -// ACE_TRACE ("ACE_File_Lock::release"); - return ACE_OS::flock_unlock (&this->lock_, whence, start, len); -} - -ACE_INLINE int -ACE_File_Lock::remove (bool unlink_file) -{ -// ACE_TRACE ("ACE_File_Lock::remove"); - - int result = 0; - - if (!this->removed_) - { - this->removed_ = true; - result = ACE_OS::flock_destroy (&this->lock_, - unlink_file); - } - return result; -} - -ACE_INLINE ACE_HANDLE -ACE_File_Lock::get_handle (void) const -{ -// ACE_TRACE ("ACE_File_Lock::get_handle"); - return this->lock_.handle_; -} - -ACE_INLINE void -ACE_File_Lock::set_handle (ACE_HANDLE h) -{ -// ACE_TRACE ("ACE_File_Lock::set_handle"); - this->lock_.handle_ = h; - this->removed_ = false; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Filecache.cpp b/modules/worldengine/deps/acelite/ace/Filecache.cpp deleted file mode 100644 index d6da738642..0000000000 --- a/modules/worldengine/deps/acelite/ace/Filecache.cpp +++ /dev/null @@ -1,741 +0,0 @@ -#include "ace/Filecache.h" -#include "ace/Object_Manager.h" -#include "ace/Log_Category.h" -#include "ace/ACE.h" -#include "ace/Guard_T.h" -#include "ace/OS_NS_string.h" -#include "ace/OS_NS_time.h" -#include "ace/OS_NS_unistd.h" -#include "ace/OS_NS_fcntl.h" -#include "ace/Truncate.h" - -#if defined (ACE_WIN32) -// Specifies no sharing flags. -#define R_MASK ACE_DEFAULT_OPEN_PERMS -#define W_MASK 0 -#else -#define R_MASK S_IRUSR|S_IRGRP|S_IROTH -#define W_MASK S_IRUSR|S_IRGRP|S_IROTH|S_IWUSR|S_IWGRP|S_IWOTH -#endif /* ACE_WIN32 */ - -#if defined (ACE_WIN32) -// See if you can get rid of some of these. -#define READ_FLAGS (FILE_FLAG_SEQUENTIAL_SCAN | \ - FILE_FLAG_OVERLAPPED | \ - O_RDONLY) -// static const int RCOPY_FLAGS = (FILE_FLAG_SEQUENTIAL_SCAN | -// O_RDONLY); -#define WRITE_FLAGS (FILE_FLAG_SEQUENTIAL_SCAN | \ - FILE_FLAG_OVERLAPPED | \ - O_RDWR | O_CREAT | O_TRUNC) -// static const int WCOPY_FLAGS = (FILE_FLAG_SEQUENTIAL_SCAN | -// O_RDWR | O_CREAT | O_TRUNC); -#else -#define READ_FLAGS O_RDONLY -// static const int RCOPY_FLAGS = O_RDONLY; -#define WRITE_FLAGS (O_RDWR | O_CREAT | O_TRUNC) -// static const int WCOPY_FLAGS = O_RDWR | O_CREAT | O_TRUNC; -#endif /* ACE_WIN32 */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -// static data members -ACE_Filecache *ACE_Filecache::cvf_ = 0; - -void -ACE_Filecache_Handle::init (void) -{ - this->file_ = 0; - this->handle_ = ACE_INVALID_HANDLE; -} - -ACE_Filecache_Handle::ACE_Filecache_Handle (void) - : file_ (0), handle_ (0) -{ - this->init (); -} - -ACE_Filecache_Handle::ACE_Filecache_Handle (const ACE_TCHAR *filename, - ACE_Filecache_Flag mapit) - : file_ (0), handle_ (0) -{ - this->init (); - // Fetch the file from the Virtual_Filesystem let the - // Virtual_Filesystem do the work of cache coherency. - - // Filecache will also do the acquire, since it holds the lock at - // that time. - this->file_ = ACE_Filecache::instance ()->fetch (filename, mapit); -} - -ACE_Filecache_Handle::ACE_Filecache_Handle (const ACE_TCHAR *filename, - int size, - ACE_Filecache_Flag ) - : file_ (0), handle_ (0) -{ - this->init (); - - if (size == 0) - ACE_Filecache::instance ()->remove (filename); - else - { - // Since this is being opened for a write, simply create a new - // ACE_Filecache_Object now, and let the destructor add it into CVF - // later - - // Filecache will also do the acquire, since it holds the lock at - // that time. - this->file_ = ACE_Filecache::instance ()->create (filename, size); - } -} - -ACE_Filecache_Handle::~ACE_Filecache_Handle (void) -{ - if (this->handle_ != ACE_INVALID_HANDLE) - // this was dup ()'d - ACE_OS::close (this->handle_); - - ACE_Filecache::instance ()->finish (this->file_); -} - -void * -ACE_Filecache_Handle::address (void) const -{ - return this->file_ == 0 ? 0 : this->file_->address (); -} - -ACE_HANDLE -ACE_Filecache_Handle::handle (void) const -{ - if (this->handle_ == ACE_INVALID_HANDLE && this->file_ != 0) - { - ACE_Filecache_Handle *mutable_this = - const_cast (this); - mutable_this->handle_ = ACE_OS::dup (this->file_->handle ()); - } - return this->handle_; -} - -int -ACE_Filecache_Handle::error (void) const -{ - if (this->file_ == 0) - return -1; - else - return this->file_->error (); -} - -ACE_OFF_T -ACE_Filecache_Handle::size (void) const -{ - if (this->file_ == 0) - return -1; - else - return this->file_->size (); -} - -// ------------------ -// ACE_Filecache_Hash -// ------------------ - -#define ACE_Filecache_Hash \ - ACE_Hash_Map_Manager_Ex, ACE_Equal_To, ACE_Null_Mutex> -#define ACE_Filecache_Hash_Entry \ - ACE_Hash_Map_Entry - -template <> -ACE_Filecache_Hash_Entry::ACE_Hash_Map_Entry ( - const ACE_TCHAR *const &ext_id, - ACE_Filecache_Object *const &int_id, - ACE_Filecache_Hash_Entry *next, - ACE_Filecache_Hash_Entry *prev) - : ext_id_ (ext_id - ? ACE_OS::strdup (ext_id) - : ACE_OS::strdup (ACE_TEXT (""))), - int_id_ (int_id), - next_ (next), - prev_ (prev) -{ -} - -template <> -ACE_Filecache_Hash_Entry::ACE_Hash_Map_Entry (ACE_Filecache_Hash_Entry *next, - ACE_Filecache_Hash_Entry *prev) - : ext_id_ (0), - int_id_ (0), - next_ (next), - prev_ (prev) -{ -} - -template <> -ACE_Filecache_Hash_Entry::~ACE_Hash_Map_Entry (void) -{ - ACE_OS::free ((void *) ext_id_); -} - -// We need these template specializations since KEY is defined as a -// ACE_TCHAR*, which doesn't have a hash() or equal() method defined on it. - -template <> -unsigned long -ACE_Filecache_Hash::hash (const ACE_TCHAR *const &ext_id) -{ - return ACE::hash_pjw (ext_id); -} - -template <> -int -ACE_Filecache_Hash::equal (const ACE_TCHAR *const &id1, - const ACE_TCHAR *const &id2) -{ - return ACE_OS::strcmp (id1, id2) == 0; -} - -#undef ACE_Filecache_Hash -#undef ACE_Filecache_Hash_Entry - - -// ------------- -// ACE_Filecache -// ------------- - -ACE_Filecache * -ACE_Filecache::instance (void) -{ - // Double check locking pattern. - if (ACE_Filecache::cvf_ == 0) - { - ACE_SYNCH_RW_MUTEX &lock = - *ACE_Managed_Object::get_preallocated_object - (ACE_Object_Manager::ACE_FILECACHE_LOCK); - ACE_GUARD_RETURN (ACE_SYNCH_RW_MUTEX, ace_mon, lock, 0); - - // @@ James, please check each of the ACE_NEW_RETURN calls to - // make sure that it is safe to return if allocation fails. - if (ACE_Filecache::cvf_ == 0) - ACE_NEW_RETURN (ACE_Filecache::cvf_, - ACE_Filecache, - 0); - } - - return ACE_Filecache::cvf_; -} - -ACE_Filecache::ACE_Filecache (void) - : size_ (ACE_DEFAULT_VIRTUAL_FILESYSTEM_TABLE_SIZE), - hash_ (size_) -{ -} - -ACE_Filecache::~ACE_Filecache (void) -{ -} - -ACE_Filecache_Object * -ACE_Filecache::insert_i (const ACE_TCHAR *filename, - ACE_SYNCH_RW_MUTEX &filelock, - int mapit) -{ - ACE_Filecache_Object *handle = 0; - - if (this->hash_.find (filename, handle) == -1) - { - ACE_NEW_RETURN (handle, - ACE_Filecache_Object (filename, filelock, 0, mapit), - 0); - - // ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT (" (%t) CVF: creating %s\n"), filename)); - - if (this->hash_.bind (filename, handle) == -1) - { - delete handle; - handle = 0; - } - } - else - handle = 0; - - return handle; -} - -ACE_Filecache_Object * -ACE_Filecache::remove_i (const ACE_TCHAR *filename) -{ - ACE_Filecache_Object *handle = 0; - - // Disassociate file from the cache. - if (this->hash_.unbind (filename, handle) == 0) - { - handle->stale_ = 1; - - // Try a lock. If it succeeds, we can delete it now. - // Otherwise, it will clean itself up later. - if (handle->lock_.tryacquire_write () == 0) - { - delete handle; - handle = 0; - } - } - else - handle = 0; - - return handle; -} - -ACE_Filecache_Object * -ACE_Filecache::update_i (const ACE_TCHAR *filename, - ACE_SYNCH_RW_MUTEX &filelock, - int mapit) -{ - ACE_Filecache_Object *handle = 0; - - handle = this->remove_i (filename); - handle = this->insert_i (filename, filelock, mapit); - - return handle; -} - -int -ACE_Filecache::find (const ACE_TCHAR *filename) -{ - return this->hash_.find (filename); -} - - -ACE_Filecache_Object * -ACE_Filecache::remove (const ACE_TCHAR *filename) -{ - ACE_Filecache_Object *handle = 0; - - ACE_OFF_T loc = ACE::hash_pjw (filename) % this->size_; - ACE_SYNCH_RW_MUTEX &hashlock = this->hash_lock_[loc]; - // ACE_SYNCH_RW_MUTEX &filelock = this->file_lock_[loc]; - - if (this->hash_.find (filename, handle) != -1) - { - ACE_WRITE_GUARD_RETURN (ACE_SYNCH_RW_MUTEX, - ace_mon, - hashlock, - 0); - - return this->remove_i (filename); - } - - return 0; -} - - -ACE_Filecache_Object * -ACE_Filecache::fetch (const ACE_TCHAR *filename, int mapit) -{ - ACE_Filecache_Object *handle = 0; - - ACE_OFF_T loc = ACE::hash_pjw (filename) % this->size_; - ACE_SYNCH_RW_MUTEX &hashlock = this->hash_lock_[loc]; - ACE_SYNCH_RW_MUTEX &filelock = this->file_lock_[loc]; - - filelock.acquire_read (); - - if (this->hash_.find (filename, handle) == -1) - { - ACE_WRITE_GUARD_RETURN (ACE_SYNCH_RW_MUTEX, - ace_mon, - hashlock, - 0); - - // Second check in the method call - handle = this->insert_i (filename, filelock, mapit); - - if (handle == 0) - filelock.release (); - } - else - { - if (handle->update ()) - { - { - // Double check locking pattern - ACE_WRITE_GUARD_RETURN (ACE_SYNCH_RW_MUTEX, - ace_mon, - hashlock, - 0); - - // Second check in the method call - handle = this->update_i (filename, filelock, mapit); - - if (handle == 0) - filelock.release (); - } - } - // ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT (" (%t) CVF: found %s\n"), filename)); - } - - return handle; -} - -ACE_Filecache_Object * -ACE_Filecache::create (const ACE_TCHAR *filename, int size) -{ - ACE_Filecache_Object *handle = 0; - - ACE_OFF_T loc = ACE::hash_pjw (filename) % this->size_; - ACE_SYNCH_RW_MUTEX &filelock = this->file_lock_[loc]; - - ACE_NEW_RETURN (handle, - ACE_Filecache_Object (filename, size, filelock), - 0); - handle->acquire (); - - return handle; -} - -ACE_Filecache_Object * -ACE_Filecache::finish (ACE_Filecache_Object *&file) -{ - if (file == 0) - return file; - - ACE_OFF_T loc = ACE::hash_pjw (file->filename_) % this->size_; - ACE_SYNCH_RW_MUTEX &hashlock = this->hash_lock_[loc]; - - if (file != 0) - switch (file->action_) - { - case ACE_Filecache_Object::ACE_WRITING: - { - ACE_WRITE_GUARD_RETURN (ACE_SYNCH_RW_MUTEX, - ace_mon, - hashlock, - 0); - - file->release (); - - this->remove_i (file->filename_); -#if 0 - int result = this->hash_.bind (file->filename (), file); - - if (result == 0) - file->acquire (); -#else - // Last one using a stale file is resposible for deleting it. - if (file->stale_) - { - // Try a lock. If it succeds, we can delete it now. - // Otherwise, it will clean itself up later. - if (file->lock_.tryacquire_write () == 0) - { - delete file; - file = 0; - } - } -#endif - } - - break; - default: - file->release (); - - // Last one using a stale file is resposible for deleting it. - if (file->stale_) - { - // Try a lock. If it succeds, we can delete it now. - // Otherwise, it will clean itself up later. - if (file->lock_.tryacquire_write () == 0) - { - delete file; - file = 0; - } - } - - break; - } - - return file; -} - -void -ACE_Filecache_Object::init (void) -{ - this->filename_[0] = '\0'; - this->handle_ = ACE_INVALID_HANDLE; - this->error_ = ACE_SUCCESS; - this->tempname_ = 0; - this->size_ = 0; - - ACE_OS::memset (&(this->stat_), 0, sizeof (this->stat_)); -} - -ACE_Filecache_Object::ACE_Filecache_Object (void) - : tempname_ (0), - mmap_ (), - handle_ (0), - // stat_ (), - size_ (0), - action_ (0), - error_ (0), - stale_ (0), - // sa_ (), - junklock_ (), - lock_ (junklock_) -{ - this->init (); -} - -ACE_Filecache_Object::ACE_Filecache_Object (const ACE_TCHAR *filename, - ACE_SYNCH_RW_MUTEX &lock, - LPSECURITY_ATTRIBUTES sa, - int mapit) - : tempname_ (0), - mmap_ (), - handle_ (0), - // stat_ (), - size_ (0), - action_ (0), - error_ (0), - stale_ (0), - sa_ (sa), - junklock_ (), - lock_ (lock) -{ - this->init (); - - // ASSERT strlen(filename) < sizeof (this->filename_) - ACE_OS::strcpy (this->filename_, filename); - this->action_ = ACE_Filecache_Object::ACE_READING; - // place ourselves into the READING state - - // Can we access the file? - if (ACE_OS::access (this->filename_, R_OK) == -1) - { - this->error_i (ACE_Filecache_Object::ACE_ACCESS_FAILED); - return; - } - - // Can we stat the file? - if (ACE_OS::stat (this->filename_, &this->stat_) == -1) - { - this->error_i (ACE_Filecache_Object::ACE_STAT_FAILED); - return; - } - - this->size_ = ACE_Utils::truncate_cast (this->stat_.st_size); - this->tempname_ = this->filename_; - - // Can we open the file? - this->handle_ = ACE_OS::open (this->tempname_, - READ_FLAGS, R_MASK, this->sa_); - if (this->handle_ == ACE_INVALID_HANDLE) - { - this->error_i (ACE_Filecache_Object::ACE_OPEN_FAILED, - ACE_TEXT ("ACE_Filecache_Object::ctor: open")); - return; - } - - if (mapit) - { - // Can we map the file? - if (this->mmap_.map (this->handle_, static_cast (-1), - PROT_READ, ACE_MAP_PRIVATE, 0, 0, this->sa_) != 0) - { - this->error_i (ACE_Filecache_Object::ACE_MEMMAP_FAILED, - ACE_TEXT ("ACE_Filecache_Object::ctor: map")); - ACE_OS::close (this->handle_); - this->handle_ = ACE_INVALID_HANDLE; - return; - } - } - - // Ok, finished! - this->action_ = ACE_Filecache_Object::ACE_READING; -} - -ACE_Filecache_Object::ACE_Filecache_Object (const ACE_TCHAR *filename, - ACE_OFF_T size, - ACE_SYNCH_RW_MUTEX &lock, - LPSECURITY_ATTRIBUTES sa) - : stale_ (0), - sa_ (sa), - lock_ (lock) -{ - this->init (); - - this->size_ = size; - ACE_OS::strcpy (this->filename_, filename); - this->action_ = ACE_Filecache_Object::ACE_WRITING; - - // Can we access the file? - if (ACE_OS::access (this->filename_, R_OK|W_OK) == -1 - // Does it exist? - && ACE_OS::access (this->filename_, F_OK) != -1) - { - // File exists, but we cannot access it. - this->error_i (ACE_Filecache_Object::ACE_ACCESS_FAILED); - return; - } - - this->tempname_ = this->filename_; - - // Can we open the file? - this->handle_ = ACE_OS::open (this->tempname_, WRITE_FLAGS, W_MASK, this->sa_); - if (this->handle_ == ACE_INVALID_HANDLE) - { - this->error_i (ACE_Filecache_Object::ACE_OPEN_FAILED, - ACE_TEXT ("ACE_Filecache_Object::acquire: open")); - return; - } - - // Can we write? - if (ACE_OS::pwrite (this->handle_, "", 1, this->size_ - 1) != 1) - { - this->error_i (ACE_Filecache_Object::ACE_WRITE_FAILED, - ACE_TEXT ("ACE_Filecache_Object::acquire: write")); - ACE_OS::close (this->handle_); - return; - } - - // Can we map? - if (this->mmap_.map (this->handle_, this->size_, PROT_RDWR, MAP_SHARED, - 0, 0, this->sa_) != 0) - { - this->error_i (ACE_Filecache_Object::ACE_MEMMAP_FAILED, - ACE_TEXT ("ACE_Filecache_Object::acquire: map")); - ACE_OS::close (this->handle_); - } - - // Ok, done! -} - -ACE_Filecache_Object::~ACE_Filecache_Object (void) -{ - if (this->error_ == ACE_SUCCESS) - { - this->mmap_.unmap (); - ACE_OS::close (this->handle_); - this->handle_ = ACE_INVALID_HANDLE; - } - - this->lock_.release (); -} - -int -ACE_Filecache_Object::acquire (void) -{ - return this->lock_.tryacquire_read (); -} - -int -ACE_Filecache_Object::release (void) -{ - if (this->action_ == ACE_WRITING) - { - // We are safe since only one thread has a writable Filecache_Object - -#if 0 - ACE_HANDLE original = ACE_OS::open (this->filename_, WRITE_FLAGS, W_MASK, - this->sa_); - if (original == ACE_INVALID_HANDLE) - this->error_ = ACE_Filecache_Object::ACE_OPEN_FAILED; - else if (ACE_OS::write (original, this->mmap_.addr (), - this->size_) == -1) - { - this->error_ = ACE_Filecache_Object::ACE_WRITE_FAILED; - ACE_OS::close (original); - ACE_OS::unlink (this->filename_); - } - else if (ACE_OS::stat (this->filename_, &this->stat_) == -1) - this->error_ = ACE_Filecache_Object::ACE_STAT_FAILED; -#endif - - this->mmap_.unmap (); - ACE_OS::close (this->handle_); - this->handle_ = ACE_INVALID_HANDLE; - -#if 0 - // Leave the file in an acquirable state. - this->handle_ = ACE_OS::open (this->tempname_, READ_FLAGS, R_MASK); - if (this->handle_ == ACE_INVALID_HANDLE) - { - this->error_i (ACE_Filecache_Object::ACE_OPEN_FAILED, - "ACE_Filecache_Object::acquire: open"); - } - else if (this->mmap_.map (this->handle_, -1, - PROT_READ, - ACE_MAP_PRIVATE, - 0, - 0, - this->sa_) != 0) - { - this->error_i (ACE_Filecache_Object::ACE_MEMMAP_FAILED, - "ACE_Filecache_Object::acquire: map"); - ACE_OS::close (this->handle_); - this->handle_ = ACE_INVALID_HANDLE; - } - - this->action_ = ACE_Filecache_Object::ACE_READING; -#endif - } - - return this->lock_.release (); -} - -int -ACE_Filecache_Object::error (void) const -{ - // The existence of the object means a read lock is being held. - return this->error_; -} - -int -ACE_Filecache_Object::error_i (int error_value, const ACE_TCHAR *s) -{ - ACE_UNUSED_ARG (s); - ACELIB_ERROR ((LM_ERROR, ACE_TEXT ("%p.\n"), s)); - this->error_ = error_value; - return error_value; -} - -const ACE_TCHAR * -ACE_Filecache_Object::filename (void) const -{ - // The existence of the object means a read lock is being held. - return this->filename_; -} - -ACE_OFF_T -ACE_Filecache_Object::size (void) const -{ - // The existence of the object means a read lock is being held. - return this->size_; -} - -ACE_HANDLE -ACE_Filecache_Object::handle (void) const -{ - // The existence of the object means a read lock is being held. - return this->handle_; -} - -void * -ACE_Filecache_Object::address (void) const -{ - // The existence of the object means a read lock is being held. - return this->mmap_.addr (); -} - -int -ACE_Filecache_Object::update (void) const -{ - // The existence of the object means a read lock is being held. - int result; - ACE_stat statbuf; - - if (ACE_OS::stat (this->filename_, &statbuf) == -1) - result = 1; - else - result = ACE_OS::difftime (this->stat_.st_mtime, statbuf.st_mtime) < 0; - - return result; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Filecache.h b/modules/worldengine/deps/acelite/ace/Filecache.h deleted file mode 100644 index 995ae49cf7..0000000000 --- a/modules/worldengine/deps/acelite/ace/Filecache.h +++ /dev/null @@ -1,352 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Filecache.h - * - * @author James Hu - */ -//============================================================================= - - -#ifndef ACE_FILECACHE_H -#define ACE_FILECACHE_H - -#include /**/ "ace/pre.h" - -#include "ace/Mem_Map.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Hash_Map_Manager_T.h" -#include "ace/Null_Mutex.h" -#include "ace/Synch_Traits.h" -#include "ace/RW_Thread_Mutex.h" -#include "ace/OS_NS_sys_stat.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -enum ACE_Filecache_Flag -{ - ACE_NOMAP = 0, - ACE_MAPIT = 1 -}; - -class ACE_Filecache_Object; - -/** - * @class ACE_Filecache_Handle - * - * @brief - * Abstraction over a real file. This is meant to be the entry - * point into the Cached Virtual Filesystem. - * - * This is a cached filesystem implementation based loosely on the - * implementation of JAWS_File. The interfaces will be nearly the - * same. The under-the-hood implementation should hopefully be a - * much faster thing. - * These will be given their own implementations later. For now, we - * borrow the implementation provided by JAWS. - * On creation, the cache is checked, and reference count is - * incremented. On destruction, reference count is decremented. If - * the reference count is 0, the file is removed from the cache. - * E.g. 1, - * { - * ACE_Filecache_Handle foo("foo.html"); - * this->peer ().send (foo.address (), foo.size ()); - * } - * E.g. 2, - * { - * ACE_Filecache_Handle foo("foo.html"); - * io->transmitfile (foo.handle (), this->peer ().handle ()); - * } - * E.g. 3, - * { - * ACE_Filecache_Handle foo("foo.html", content_length); - * this->peer ().recv (foo.address (), content_length); - * } - * TODO: - */ -class ACE_Export ACE_Filecache_Handle -{ - // (1) Get rid of the useless copying of files when reading. - // Although it does make sure the file you send isn't being changed, - // it doesn't make sure the file is in a sensible state before - // sending it. - // - // Alternative: if the file get's trashed while it is being shipped, - // let the client request the file again. The cache should have an - // updated copy by that point. - // - // (2) Use hashing for locating files. This means I need a hastable - // implementation with buckets. - // - // (3) Only lock when absolutely necessary. JAWS_Virtual_Filesystem was - // rather conservative, but for some reason it still ran into problems. - // Since this design should be simpler, problems should be easier to spot. - // -public: - - /// Query cache for file, and acquire it. Assumes the file is being - /// opened for reading. - ACE_Filecache_Handle (const ACE_TCHAR *filename, - ACE_Filecache_Flag mapit = ACE_MAPIT); - - /** - * Create new entry, and acquire it. Presence of SIZE assumes the - * file is being opened for writing. If SIZE is zero, assumes the - * file is to be removed from the cache. - */ - ACE_Filecache_Handle (const ACE_TCHAR *filename, - int size, - ACE_Filecache_Flag mapit = ACE_MAPIT); - - /// Closes any open handles, release acquired file. - ~ACE_Filecache_Handle (void); - - /// Base address of memory mapped file. - void *address (void) const; - - /// A handle (e.g., UNIX file descriptor, or NT file handle). - ACE_HANDLE handle (void) const; - - /// Any associated error in handle creation and acquisition. - int error (void) const; - - /// The size of the file. - ACE_OFF_T size (void) const; - -protected: - /// Default do nothing constructor. Prevent it from being called. - ACE_Filecache_Handle (void); - - /// Common initializations for constructors. - void init (void); - -public: - /// These come from ACE_Filecache_Object, which is an internal class. - enum - { - ACE_SUCCESS = 0, - ACE_ACCESS_FAILED, - ACE_OPEN_FAILED, - ACE_COPY_FAILED, - ACE_STAT_FAILED, - ACE_MEMMAP_FAILED, - ACE_WRITE_FAILED - }; - -private: - /// A reference to the low level instance. - ACE_Filecache_Object *file_; - - /// A dup'd version of the one from file_. - ACE_HANDLE handle_; -}; - -typedef ACE_Hash_Map_Manager_Ex, ACE_Equal_To, ACE_Null_Mutex> - ACE_Filecache_Hash; - -typedef ACE_Hash_Map_Entry ACE_Filecache_Hash_Entry; - -/** - * @class ACE_Filecache - * - * @brief - * A hash table holding the information about entry point into - * the Cached Virtual Filesystem. On insertion, the reference - * count is incremented. On destruction, reference count is - * decremented. - */ -class ACE_Export ACE_Filecache -{ -public: - /// Singleton pattern. - static ACE_Filecache *instance (void); - - ~ACE_Filecache (void); - - /// Returns 0 if the file associated with ``filename'' is in the cache, - /// or -1 if not. - int find (const ACE_TCHAR *filename); - - /// Return the file associated with ``filename'' if it is in the cache, - /// or create if not. - ACE_Filecache_Object *fetch (const ACE_TCHAR *filename, int mapit = 1); - - /// Remove the file associated with ``filename'' from the cache. - ACE_Filecache_Object *remove (const ACE_TCHAR *filename); - - /// Create a new Filecache_Object, returns it. - ACE_Filecache_Object *create (const ACE_TCHAR *filename, int size); - - /// Release an acquired Filecache_Object, returns it again or NULL if it - /// was deleted. - ACE_Filecache_Object *finish (ACE_Filecache_Object *&new_file); - -protected: - ACE_Filecache_Object *insert_i (const ACE_TCHAR *filename, - ACE_SYNCH_RW_MUTEX &filelock, - int mapit); - ACE_Filecache_Object *remove_i (const ACE_TCHAR *filename); - ACE_Filecache_Object *update_i (const ACE_TCHAR *filename, - ACE_SYNCH_RW_MUTEX &filelock, - int mapit); - -public: - - enum - { - /// For this stupid implementation, use an array. Someday, use a - /// balanced search tree, or real hash table. - ACE_DEFAULT_VIRTUAL_FILESYSTEM_TABLE_SIZE = 512, - - /// This determines the highwater mark in megabytes for the cache. - /// This will be ignored for now. - ACE_DEFAULT_VIRTUAL_FILESYSTEM_CACHE_SIZE = 20 - }; - -protected: - /// Prevent it from being called. - ACE_Filecache (void); - -private: - ACE_OFF_T size_; - - /// The hash table - ACE_Filecache_Hash hash_; - - /// The reference to the instance - static ACE_Filecache *cvf_; - - // = Synchronization variables. - ACE_SYNCH_RW_MUTEX hash_lock_[ACE_DEFAULT_VIRTUAL_FILESYSTEM_TABLE_SIZE]; - ACE_SYNCH_RW_MUTEX file_lock_[ACE_DEFAULT_VIRTUAL_FILESYSTEM_TABLE_SIZE]; -}; - -/** - * @class ACE_Filecache_Object - * - * @brief - * Abstraction over a real file. This is what the Virtual - * Filesystem contains. This class is not intended for general - * consumption. Please consult a physician before attempting to - * use this class. - */ -class ACE_Export ACE_Filecache_Object -{ -public: - friend class ACE_Filecache; - - /// Creates a file for reading. - ACE_Filecache_Object (const ACE_TCHAR *filename, - ACE_SYNCH_RW_MUTEX &lock, - LPSECURITY_ATTRIBUTES sa = 0, - int mapit = 1); - - /// Creates a file for writing. - ACE_Filecache_Object (const ACE_TCHAR *filename, - ACE_OFF_T size, - ACE_SYNCH_RW_MUTEX &lock, - LPSECURITY_ATTRIBUTES sa = 0); - - /// Only if reference count is zero should this be called. - ~ACE_Filecache_Object (void); - - /// Increment the reference_count_. - int acquire (void); - - /// Decrement the reference_count_. - int release (void); - - // = error_ accessors - int error (void) const; - int error (int error_value, - const ACE_TCHAR *s = ACE_TEXT ("ACE_Filecache_Object")); - - /// filename_ accessor - const ACE_TCHAR *filename (void) const; - - /// handle_ accessor. - ACE_HANDLE handle (void) const; - - /// Base memory address for memory mapped file. - void *address (void) const; - - /// size_ accessor. - ACE_OFF_T size (void) const; - - /// True if file on disk is newer than cached file. - int update (void) const; - -protected: - /// Prevent from being called. - ACE_Filecache_Object (void); - - /// Common initialization code, - void init (void); - -private: - /// Internal error logging method, no locking. - int error_i (int error_value, - const ACE_TCHAR *s = ACE_TEXT ("ACE_Filecache_Object")); - -public: - - enum Creation_States - { - ACE_READING = 1, - ACE_WRITING = 2 - }; - - enum Error_Conditions - { - ACE_SUCCESS = 0, - ACE_ACCESS_FAILED, - ACE_OPEN_FAILED, - ACE_COPY_FAILED, - ACE_STAT_FAILED, - ACE_MEMMAP_FAILED, - ACE_WRITE_FAILED - }; - -private: - /// The temporary file name and the real file name. The real file is - /// copied into the temporary file for safety reasons. - ACE_TCHAR *tempname_; - ACE_TCHAR filename_[MAXPATHLEN + 1]; - - /// Holds the memory mapped version of the temporary file. - ACE_Mem_Map mmap_; - - /// The descriptor to the temporary file. - ACE_HANDLE handle_; - - /// Used to compare against the real file to test if an update is needed. - ACE_stat stat_; - ACE_OFF_T size_; - - /// Status indicators. - int action_; - int error_; - - /// If set to 1, means the object is flagged for removal. - int stale_; - - /// Security attribute object. - LPSECURITY_ATTRIBUTES sa_; - - /// The default initializer - ACE_SYNCH_RW_MUTEX junklock_; - - /// Provides a bookkeeping mechanism for users of this object. - ACE_SYNCH_RW_MUTEX &lock_; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#include /**/ "ace/post.h" - -#endif /* ACE_FILECACHE_H */ diff --git a/modules/worldengine/deps/acelite/ace/FlReactor/ACE_FlReactor.pc.in b/modules/worldengine/deps/acelite/ace/FlReactor/ACE_FlReactor.pc.in deleted file mode 100644 index c284481585..0000000000 --- a/modules/worldengine/deps/acelite/ace/FlReactor/ACE_FlReactor.pc.in +++ /dev/null @@ -1,11 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ - -Name: ACE_FlReactor -Description: ACE FlReactor Library -Requires: ACE -Version: @VERSION@ -Libs: -L${libdir} -lACE_FlReactor -Cflags: -I${includedir} diff --git a/modules/worldengine/deps/acelite/ace/FlReactor/ACE_FlReactor_export.h b/modules/worldengine/deps/acelite/ace/FlReactor/ACE_FlReactor_export.h deleted file mode 100644 index cb704d279a..0000000000 --- a/modules/worldengine/deps/acelite/ace/FlReactor/ACE_FlReactor_export.h +++ /dev/null @@ -1,57 +0,0 @@ - -// -*- C++ -*- -// Definition for Win32 Export directives. -// This file is generated automatically by generate_export_file.pl -s ACE_FlReactor -// ------------------------------ -#ifndef ACE_FLREACTOR_EXPORT_H -#define ACE_FLREACTOR_EXPORT_H - -#include /**/ "ace/config-all.h" - -#if defined (ACE_AS_STATIC_LIBS) && !defined (ACE_FLREACTOR_HAS_DLL) -# define ACE_FLREACTOR_HAS_DLL 0 -#endif /* ACE_AS_STATIC_LIBS && ACE_FLREACTOR_HAS_DLL */ - -#if !defined (ACE_FLREACTOR_HAS_DLL) -# define ACE_FLREACTOR_HAS_DLL 1 -#endif /* ! ACE_FLREACTOR_HAS_DLL */ - -#if defined (ACE_FLREACTOR_HAS_DLL) && (ACE_FLREACTOR_HAS_DLL == 1) -# if defined (ACE_FLREACTOR_BUILD_DLL) -# define ACE_FlReactor_Export ACE_Proper_Export_Flag -# define ACE_FLREACTOR_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T) -# define ACE_FLREACTOR_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# else /* ACE_FLREACTOR_BUILD_DLL */ -# define ACE_FlReactor_Export ACE_Proper_Import_Flag -# define ACE_FLREACTOR_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) -# define ACE_FLREACTOR_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -# endif /* ACE_FLREACTOR_BUILD_DLL */ -#else /* ACE_FLREACTOR_HAS_DLL == 1 */ -# define ACE_FlReactor_Export -# define ACE_FLREACTOR_SINGLETON_DECLARATION(T) -# define ACE_FLREACTOR_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -#endif /* ACE_FLREACTOR_HAS_DLL == 1 */ - -// Set ACE_FLREACTOR_NTRACE = 0 to turn on library specific tracing even if -// tracing is turned off for ACE. -#if !defined (ACE_FLREACTOR_NTRACE) -# if (ACE_NTRACE == 1) -# define ACE_FLREACTOR_NTRACE 1 -# else /* (ACE_NTRACE == 1) */ -# define ACE_FLREACTOR_NTRACE 0 -# endif /* (ACE_NTRACE == 1) */ -#endif /* !ACE_FLREACTOR_NTRACE */ - -#if (ACE_FLREACTOR_NTRACE == 1) -# define ACE_FLREACTOR_TRACE(X) -#else /* (ACE_FLREACTOR_NTRACE == 1) */ -# if !defined (ACE_HAS_TRACE) -# define ACE_HAS_TRACE -# endif /* ACE_HAS_TRACE */ -# define ACE_FLREACTOR_TRACE(X) ACE_TRACE_IMPL(X) -# include "ace/Trace.h" -#endif /* (ACE_FLREACTOR_NTRACE == 1) */ - -#endif /* ACE_FLREACTOR_EXPORT_H */ - -// End of auto generated file. diff --git a/modules/worldengine/deps/acelite/ace/FlReactor/FlReactor.cpp b/modules/worldengine/deps/acelite/ace/FlReactor/FlReactor.cpp deleted file mode 100644 index edbac9be35..0000000000 --- a/modules/worldengine/deps/acelite/ace/FlReactor/FlReactor.cpp +++ /dev/null @@ -1,326 +0,0 @@ -#include "ace/FlReactor/FlReactor.h" - -#include /**/ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_ALLOC_HOOK_DEFINE (ACE_FlReactor) - -// Must be called with lock held -ACE_FlReactor::ACE_FlReactor (size_t size, - bool restart, - ACE_Sig_Handler *h) - : ACE_Select_Reactor (size, restart, h) -{ - // When the ACE_Select_Reactor is constructed it creates the notify - // pipe and registers it with the register_handler_i() method. The - // FlReactor overloads this method BUT because the - // register_handler_i occurs when constructing the base class - // ACE_Select_Reactor, the ACE_Select_Reactor register_handler_i() - // is called not the FlReactor register_handler_i(). This means - // that the notify pipe is registered with the ACE_Select_Reactor - // event handling code not the FlReactor and so notfications don't - // work. To get around this we simply close and re-opened the - // notification handler in the constructor of the FlReactor. - -#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) - this->notify_handler_->close (); - this->notify_handler_->open (this, 0); -#endif /* ACE_MT_SAFE */ -} - -ACE_FlReactor::~ACE_FlReactor (void) -{ -} - -// This is just the from ace/Reactor.cpp -// but we use the Fl functions to wait for an event, not , just use the Fl mechanism - // to wait for one or more events... - - // Wait for something to happen. - double t = 0; - if (max_wait_time != 0) - t = max_wait_time->sec () + max_wait_time->usec () / 1000000.0F; - - while (t > 0) { - t = Fl::wait (t); - } - - // Reset the width, in case it changed during the upcalls. - width = this->handler_rep_.max_handlep1 (); - - // Now actually read the result needed by the - // using - -int -ACE_FoxReactor::wait_for_multiple_events (ACE_Select_Reactor_Handle_Set &handle_set, - ACE_Time_Value *max_wait_time) -{ - ACE_TRACE( "ACE_FoxReactor::wait_for_multiple_events" ); - - int nfound = 0; - do - { - max_wait_time = this->timer_queue_->calculate_timeout (max_wait_time); - size_t width = this->handler_rep_.max_handlep1 (); - handle_set.rd_mask_ = this->wait_set_.rd_mask_; - handle_set.wr_mask_ = this->wait_set_.wr_mask_; - handle_set.ex_mask_ = this->wait_set_.ex_mask_; - - nfound = FoxWaitForMultipleEvents (width, - handle_set, - max_wait_time); - - } while( nfound == -1 && this->handle_error () > 0 ); - - if (nfound > 0) - { -#if !defined (ACE_WIN32) - handle_set.rd_mask_.sync (this->handler_rep_.max_handlep1 ()); - handle_set.wr_mask_.sync (this->handler_rep_.max_handlep1 ()); - handle_set.ex_mask_.sync (this->handler_rep_.max_handlep1 ()); -#endif /* ACE_WIN32 */ - } - - return nfound; - // Timed out or input available -} - -int -ACE_FoxReactor::FoxWaitForMultipleEvents (int width, - ACE_Select_Reactor_Handle_Set &wait_set, - ACE_Time_Value */*max_wait_time*/) -{ - // Check to make sure our handle's are all usable. - ACE_Select_Reactor_Handle_Set temp_set = wait_set; - - if (ACE_OS::select (width, - temp_set.rd_mask_, - temp_set.wr_mask_, - temp_set.ex_mask_, - (ACE_Time_Value *) &ACE_Time_Value::zero ) == -1) - return -1; // Bad file arguments... - - // Qt processing. - this->fxapp->runOneEvent () ; - - // Reset the width, in case it changed during the upcalls. - width = handler_rep_.max_handlep1 (); - - // Now actually read the result needed by the using - // modifies the @c fd_set. - */ - void sync (ACE_HANDLE max); - - /// Returns a pointer to the underlying @c fd_set. Returns 0 if - /// there are no handle bits set ( == 0). - operator fd_set *(); - - /// Returns a pointer to the underlying @c fd_set. Returns 0 if - /// there are no handle bits set ( == 0). - fd_set *fdset (void); - -#if defined (ACE_HAS_BIG_FD_SET) - /// Assignment operator optimizes for cases where == 0. - ACE_Handle_Set & operator= (const ACE_Handle_Set &); -#endif /* ACE_HAS_BIG_FD_SET */ - - /// Dump the state of an object. - void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - -private: - /// Size of the set, i.e., a count of the number of enabled bits. - int size_; - - /// Current max handle. - ACE_HANDLE max_handle_; - -#if defined (ACE_HAS_BIG_FD_SET) - /// Current min handle. - ACE_HANDLE min_handle_; -#endif /* ACE_HAS_BIG_FD_SET */ - - /// Bitmask. - fd_set mask_; - - enum - { - WORDSIZE = NFDBITS, -#if !defined (ACE_WIN32) - NUM_WORDS = howmany (MAXSIZE, NFDBITS), -#endif /* ACE_WIN32 */ - NBITS = 256 - }; - - /// Counts the number of bits enabled in N. Uses a table lookup to - /// speed up the count. - static int count_bits (u_long n); - -#if defined (ACE_HAS_BIG_FD_SET) - /// Find the position of the bit counting from right to left. - static int bitpos (u_long bit); -#endif /* ACE_HAS_BIG_FD_SET */ - - /// Resets the after a clear of the original - /// . - void set_max (ACE_HANDLE max); - - /// Table that maps bytes to counts of the enabled bits in each value - /// from 0 to 255. - static const char nbits_[NBITS]; -}; - -/** - * @class ACE_Handle_Set_Iterator - * - * @brief Iterator for the ACE_Handle_Set abstraction. - */ -class ACE_Export ACE_Handle_Set_Iterator -{ -public: - /// Constructor. - ACE_Handle_Set_Iterator (const ACE_Handle_Set &hs); - - /// Default dtor. - ~ACE_Handle_Set_Iterator (void); - - /// Reset the state of the iterator by reinitializing the state - /// that we maintain. - void reset_state (void); - - /** - * "Next" operator. Returns the next unseen ACE_HANDLE in the - * up to ). When all the - * handles have been seen returns . Advances - * the iterator automatically, so you need not call - * (which is now obsolete). - */ - ACE_HANDLE operator () (void); - - /// Dump the state of an object. - void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - -private: - /// The Handle_Set we are iterating through. - const ACE_Handle_Set &handles_; - - /// Index of the bit we're examining in the current word_num_() word. -#if defined (ACE_WIN32) - u_int handle_index_; -#elif !defined (ACE_HAS_BIG_FD_SET) - int handle_index_; -#elif defined (ACE_HAS_BIG_FD_SET) - int handle_index_; - u_long oldlsb_; -#endif /* ACE_WIN32 */ - - /// Number of the word we're iterating over (typically between 0..7). - int word_num_; - -#if defined (ACE_HAS_BIG_FD_SET) - /// Number max of the words with a possible bit on. - int word_max_; -#endif /* ACE_HAS_BIG_FD_SET */ - -#if !defined (ACE_WIN32) && !defined (ACE_HAS_BIG_FD_SET) - /// Value of the bits in the word we're iterating on. - fd_mask word_val_; -#elif !defined (ACE_WIN32) && defined (ACE_HAS_BIG_FD_SET) - /// Value of the bits in the word we're iterating on. - u_long word_val_; -#endif /* !ACE_WIN32 && !ACE_HAS_BIG_FD_SET */ -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/Handle_Set.inl" -#endif /* __ACE_INLINE__ */ - -#include /**/ "ace/post.h" -#endif /* ACE_HANDLE_SET */ diff --git a/modules/worldengine/deps/acelite/ace/Handle_Set.inl b/modules/worldengine/deps/acelite/ace/Handle_Set.inl deleted file mode 100644 index c234bd79aa..0000000000 --- a/modules/worldengine/deps/acelite/ace/Handle_Set.inl +++ /dev/null @@ -1,180 +0,0 @@ -// -*- C++ -*- -#include "ace/Log_Category.h" - -// AIX defines bzero() in this odd file... used by FD_ZERO -#if defined (ACE_HAS_STRINGS) -# include "ace/os_include/os_strings.h" -#endif /* ACE_HAS_STRINGS */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -// Initialize the bitmask to all 0s and reset the associated fields. - -ACE_INLINE void -ACE_Handle_Set::reset (void) -{ - ACE_TRACE ("ACE_Handle_Set::reset"); - this->max_handle_ = - ACE_INVALID_HANDLE; -#if defined (ACE_HAS_BIG_FD_SET) - this->min_handle_ = - NUM_WORDS * WORDSIZE; -#endif /* ACE_HAS_BIG_FD_SET */ - this->size_ = 0; - // #if !defined (ACE_HAS_BIG_FD_SET) Why is this here? -Steve Huston - FD_ZERO (&this->mask_); - // #endif /* ACE_HAS_BIG_FD_SET */ -} - -#if defined (ACE_HAS_BIG_FD_SET) -ACE_INLINE ACE_Handle_Set & -ACE_Handle_Set::operator = (const ACE_Handle_Set &rhs) -{ - ACE_TRACE ("ACE_Handle_Set::operator ="); - - if (rhs.size_ > 0) - { - this->size_ = - rhs.size_; - this->max_handle_ = - rhs.max_handle_; - this->min_handle_ = - rhs.min_handle_; - this->mask_ = - rhs.mask_; - } - else - this->reset (); - - return *this; -} -#endif /* ACE_HAS_BIG_FD_SET */ - -// Returns the number of the large bit. - -ACE_INLINE ACE_HANDLE -ACE_Handle_Set::max_set (void) const -{ - ACE_TRACE ("ACE_Handle_Set::max_set"); - return this->max_handle_; -} - -// Checks whether handle is enabled. - -ACE_INLINE int -ACE_Handle_Set::is_set (ACE_HANDLE handle) const -{ - ACE_TRACE ("ACE_Handle_Set::is_set"); -#if defined (ACE_HAS_BIG_FD_SET) - return FD_ISSET (handle, - &this->mask_) - && this->size_ > 0; -#elif defined (ACE_HAS_NONCONST_FD_ISSET) - return FD_ISSET (handle, - const_cast (&this->mask_)); -#elif defined (ACE_VXWORKS) && ACE_VXWORKS >= 0x690 - return FD_ISSET (handle, &this->mask_) != 0; -#else - return FD_ISSET (handle, - &this->mask_); -#endif /* ACE_HAS_BIG_FD_SET */ -} - -// Enables the handle. - -ACE_INLINE void -ACE_Handle_Set::set_bit (ACE_HANDLE handle) -{ - ACE_TRACE ("ACE_Handle_Set::set_bit"); - if ((handle != ACE_INVALID_HANDLE) - && (!this->is_set (handle))) - { -#if defined (ACE_WIN32) - FD_SET ((SOCKET) handle, - &this->mask_); - ++this->size_; -#else /* ACE_WIN32 */ -#if defined (ACE_HAS_BIG_FD_SET) - if (this->size_ == 0) - FD_ZERO (&this->mask_); - - if (handle < this->min_handle_) - this->min_handle_ = handle; -#endif /* ACE_HAS_BIG_FD_SET */ - - FD_SET (handle, - &this->mask_); - ++this->size_; - - if (handle > this->max_handle_) - this->max_handle_ = handle; -#endif /* ACE_WIN32 */ - } -} - -// Disables the handle. - -ACE_INLINE void -ACE_Handle_Set::clr_bit (ACE_HANDLE handle) -{ - ACE_TRACE ("ACE_Handle_Set::clr_bit"); - - if ((handle != ACE_INVALID_HANDLE) && - (this->is_set (handle))) - { - FD_CLR ((ACE_SOCKET) handle, - &this->mask_); - --this->size_; - -#if !defined (ACE_WIN32) - if (handle == this->max_handle_) - this->set_max (this->max_handle_); -#endif /* !ACE_WIN32 */ - } -} - -// Returns a count of the number of enabled bits. - -ACE_INLINE int -ACE_Handle_Set::num_set (void) const -{ - ACE_TRACE ("ACE_Handle_Set::num_set"); -#if defined (ACE_WIN32) - return this->mask_.fd_count; -#else /* !ACE_WIN32 */ - return this->size_; -#endif /* ACE_WIN32 */ -} - -// Returns a pointer to the underlying fd_set. - -ACE_INLINE -ACE_Handle_Set::operator fd_set *() -{ - ACE_TRACE ("ACE_Handle_Set::operator fd_set *"); - - if (this->size_ > 0) - return (fd_set *) &this->mask_; - else - return (fd_set *) 0; -} - -// Returns a pointer to the underlying fd_set. - -ACE_INLINE fd_set * -ACE_Handle_Set::fdset (void) -{ - ACE_TRACE ("ACE_Handle_Set::fdset"); - - if (this->size_ > 0) - return (fd_set *) &this->mask_; - else - return (fd_set *) 0; -} - -ACE_INLINE -ACE_Handle_Set_Iterator::~ACE_Handle_Set_Iterator (void) -{ -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Hash_Cache_Map_Manager_T.cpp b/modules/worldengine/deps/acelite/ace/Hash_Cache_Map_Manager_T.cpp deleted file mode 100644 index e6f06570f8..0000000000 --- a/modules/worldengine/deps/acelite/ace/Hash_Cache_Map_Manager_T.cpp +++ /dev/null @@ -1,224 +0,0 @@ -#ifndef ACE_HASH_CACHE_MAP_MANAGER_T_CPP -#define ACE_HASH_CACHE_MAP_MANAGER_T_CPP - -#include "ace/Hash_Cache_Map_Manager_T.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -#pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#if !defined (__ACE_INLINE__) -#include "ace/Hash_Cache_Map_Manager_T.inl" -#endif /* __ACE_INLINE__ */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_ALLOC_HOOK_DEFINE(ACE_Hash_Cache_Map_Manager) - -template -ACE_Hash_Cache_Map_Manager::ACE_Hash_Cache_Map_Manager (CACHING_STRATEGY &caching_s, - size_t size, - ACE_Allocator *alloc) - : ACE_HCMM_BASE (caching_s, - size, - alloc) -{ -} - -template -ACE_Hash_Cache_Map_Manager::~ACE_Hash_Cache_Map_Manager (void) -{ -} - -template int -ACE_Hash_Cache_Map_Manager::bind (const KEY &key, - const VALUE &value, - CACHE_ENTRY *&entry) -{ - // Insert a entry which has the and the which is - // the combination of the and the attributes of the caching - // strategy. - CACHE_VALUE cache_value (value, - this->caching_strategy_.attributes ()); - - int bind_result = this->map_.bind (key, - cache_value, - entry); - - if (bind_result != -1) - { - - int result = this->caching_strategy_.notify_bind (bind_result, - cache_value.second); - - if (result == -1) - { - - this->map_.unbind (key); - - // Unless the notification goes thru the bind operation is - // not complete. - bind_result = -1; - - } - } - - return bind_result; -} - -template int -ACE_Hash_Cache_Map_Manager::rebind (const KEY &key, - const VALUE &value, - CACHE_ENTRY *&entry) -{ - CACHE_VALUE cache_value (value, - this->caching_strategy_.attributes ()); - - int rebind_result = this->map_.rebind (key, - cache_value, - entry); - - if (rebind_result != -1) - { - - int result = this->caching_strategy_.notify_rebind (rebind_result, - cache_value.second ()); - - if (result == -1) - { - - // Make sure the unbind operation is done only when the - // notification fails after a bind which is denoted by - // rebind_result = 0 - if (rebind_result == 0) - this->map_.unbind (key); - - // Unless the notification goes thru the rebind operation is - // not complete. - rebind_result = -1; - - } - - } - - return rebind_result; -} - -template int -ACE_Hash_Cache_Map_Manager::trybind (const KEY &key, - VALUE &value, - CACHE_ENTRY *&entry) -{ - CACHE_VALUE cache_value (value, - this->caching_strategy_.attributes ()); - - int trybind_result = this->map_.trybind (key, - cache_value, - entry); - - if (trybind_result != -1) - { - int result = this->caching_strategy_.notify_trybind (trybind_result, - cache_value.second ()); - - if (result == -1) - { - - // If the entry has got inserted into the map, it is removed - // due to failure. - if (trybind_result == 0) - this->map_.unbind (key); - - trybind_result = -1; - - } - else - { - - // If an attempt is made to bind an existing entry the value - // is overwritten with the value from the map. - if (trybind_result == 1) - value = cache_value.first (); - - } - - } - - return trybind_result; -} - -template int -ACE_Hash_Cache_Map_Manager::find (const KEY &key, - CACHE_ENTRY *&entry) -{ - // Lookup the key and populate the . - int find_result = this->map_.find (key, - entry); - - if (find_result != -1) - { - - int result = this->caching_strategy_.notify_find (find_result, - entry->int_id_.second); - - // Unless the find and notification operations go thru, this - // method is not successful. - if (result == -1) - find_result = -1; - else - find_result = 0; - - } - - return find_result; -} - -template int -ACE_Hash_Cache_Map_Manager::find (const KEY &key, - VALUE &value) -{ - CACHE_ENTRY *entry = 0; - - int result = this->find (key, - entry); - - if (result != -1) - { - value = entry->int_id_.first; - } - - return result; -} - -template int -ACE_Hash_Cache_Map_Manager::find (const KEY &key) -{ - CACHE_ENTRY *entry = 0; - - return this->find (key, - entry); -} - -template int -ACE_Hash_Cache_Map_Manager::unbind (CACHE_ENTRY *entry) -{ - // Remove the entry from the cache. - int unbind_result = this->map_.unbind (entry); - - if (unbind_result != -1) - { - - int result = this->caching_strategy_.notify_unbind (unbind_result, - entry->int_id_.second); - - if (result == -1) - unbind_result = -1; - - } - - return unbind_result; -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_HASH_CACHE_MAP_MANAGER_T_CPP */ diff --git a/modules/worldengine/deps/acelite/ace/Hash_Cache_Map_Manager_T.h b/modules/worldengine/deps/acelite/ace/Hash_Cache_Map_Manager_T.h deleted file mode 100644 index 80cbee984c..0000000000 --- a/modules/worldengine/deps/acelite/ace/Hash_Cache_Map_Manager_T.h +++ /dev/null @@ -1,208 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Hash_Cache_Map_Manager_T.h - * - * @author Kirthika Parameswaran - */ -//============================================================================= - - -#ifndef HASH_CACHE_MAP_MANAGER_T_H -#define HASH_CACHE_MAP_MANAGER_T_H - -#include /**/ "ace/pre.h" - -#include "ace/Hash_Map_Manager_T.h" -#include "ace/Cache_Map_Manager_T.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -#pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Null_Mutex.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -// Forward declaration. -class ACE_Allocator; - -#define ACE_CACHE_MAP_MANAGER \ - ACE_Cache_Map_Manager, HASH_KEY, COMPARE_KEYS, ACE_Null_Mutex>, \ - ACE_Hash_Map_Iterator_Ex, HASH_KEY, COMPARE_KEYS, ACE_Null_Mutex>, \ - ACE_Hash_Map_Reverse_Iterator_Ex, HASH_KEY, COMPARE_KEYS, ACE_Null_Mutex>, \ - CACHING_STRATEGY, \ - ATTRIBUTES> - - /** - * @class ACE_Hash_Cache_Map_Manager - * - * @brief Defines a abstraction which will purge entries from a map. - * The map considered is the ACE_Hash_Map_Manager_Ex. - * - * The Hash_Cache_Map_Manager will manage the map it contains - * and provide purging on demand from the map. The strategy for - * caching is decided by the user and provided to the Cache - * Manager. The Cache Manager acts as a agent and communicates - * between the Map and the Strategy for purging entries from the - * map. To tap the optimal methods like find(key,value,entry) - * present in the ACE_Hash_Map_Manager, - * Hash_Cache_Map_Manager provides extra functionality on top - * of the Cache_Map_Manager. - * No locking mechanism provided since locking at this level - * isn't efficient. Locking has to be provided by the - * application. - */ -template -class ACE_Hash_Cache_Map_Manager : public ACE_CACHE_MAP_MANAGER -{ - public: - - /** - * The actual value mapped to the key in the map. The - * are used by the strategy and is transparent to the user of this - * class. - */ - typedef std::pair CACHE_VALUE; - typedef ACE_Hash_Map_Manager_Ex HASH_MAP; - typedef ACE_Hash_Map_Entry CACHE_ENTRY; - typedef KEY key_type; - typedef VALUE mapped_type; - - // = Initialization and termination methods. - /// Initialize a with @a size entries. - ACE_Hash_Cache_Map_Manager (CACHING_STRATEGY &caching_s, - size_t size = ACE_DEFAULT_MAP_SIZE, - ACE_Allocator *alloc = 0); - - /// Close down a and release dynamically allocated - /// resources. - ~ACE_Hash_Cache_Map_Manager (void); - - /** - * Associate @a key with @a value. If @a key is already in the - * MAP then the ENTRY is not changed. Returns 0 if a new entry is - * bound successfully, returns 1 if an attempt is made to bind an - * existing entry, and returns -1 if failures occur. - */ - int bind (const KEY &key, - const VALUE &value); - - /** - * Same as a normal bind, except the cache entry is also passed back - * to the caller. The entry in this case will either be the newly - * created entry, or the existing one. - */ - int bind (const KEY &key, - const VALUE &value, - CACHE_ENTRY *&entry); - - /// Loopkup entry in the cache. - int find (const KEY &key, - VALUE &value); - - /// Is @a key in the cache? - int find (const KEY &key); - - /// Obtain the entry when the find succeeds. - int find (const KEY &key, - CACHE_ENTRY *&entry); - - /** - * Reassociate the @a key with @a value. If the @a key already exists - * in the cache then returns 1, on a new bind returns 0 and returns - * -1 in case of any failures. - */ - int rebind (const KEY &key, - const VALUE &value); - - /** - * Reassociate @a key with @a value, storing the old value into the - * "out" parameter @a old_value. The function fails if @a key is not - * in the cache for caches that do not allow user specified keys. - * However, for caches that allow user specified keys, if the key is - * not in the cache, a new @a key / @a value association is created. - */ - int rebind (const KEY &key, - const VALUE &value, - VALUE &old_value); - - /** - * Reassociate @a key with @a value, storing the old key and value - * into the "out" parameters @a old_key and @a old_value. The - * function fails if @a key is not in the cache for caches that do not - * allow user specified keys. However, for caches that allow user - * specified keys, if the key is not in the cache, a new @a key / @a value - * association is created. - */ - int rebind (const KEY &key, - const VALUE &value, - KEY &old_key, - VALUE &old_value); - - /** - * Same as a normal rebind, except the cache entry is also passed back - * to the caller. The entry in this case will either be the newly - * created entry, or the existing one. - */ - int rebind (const KEY &key, - const VALUE &value, - CACHE_ENTRY *&entry); - - /** - * Associate @a key with @a value if and only if @a key is not in the - * cache. If @a key is already in the cache, then the @a value parameter - * is overwritten with the existing value in the cache. Returns 0 if a - * new @a key / @a value association is created. Returns 1 if an - * attempt is made to bind an existing entry. This function fails - * for maps that do not allow user specified keys. - */ - int trybind (const KEY &key, - VALUE &value); - - /** - * Same as a normal trybind, except the cache entry is also passed - * back to the caller. The entry in this case will either be the - * newly created entry, or the existing one. - */ - int trybind (const KEY &key, - VALUE &value, - CACHE_ENTRY *&entry); - - /// Remove @a key from the cache. - int unbind (const KEY &key); - - /// Remove @a key from the cache, and return the @a value associated with - /// @a key. - int unbind (const KEY &key, - VALUE &value); - - /// Remove entry from map. - int unbind (CACHE_ENTRY *entry); - -protected: - /// Base class. - typedef ACE_CACHE_MAP_MANAGER ACE_HCMM_BASE; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - - -#if defined (__ACE_INLINE__) -#include "ace/Hash_Cache_Map_Manager_T.inl" -#endif /* __ACE_INLINE__ */ - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "ace/Hash_Cache_Map_Manager_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Hash_Cache_Map_Manager_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ - -#include /**/ "ace/post.h" - -#endif /* HASH_CACHE_MAP_MANAGER_T_H */ diff --git a/modules/worldengine/deps/acelite/ace/Hash_Cache_Map_Manager_T.inl b/modules/worldengine/deps/acelite/ace/Hash_Cache_Map_Manager_T.inl deleted file mode 100644 index 1d9de7a0d9..0000000000 --- a/modules/worldengine/deps/acelite/ace/Hash_Cache_Map_Manager_T.inl +++ /dev/null @@ -1,70 +0,0 @@ -// -*- C++ -*- -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -template -ACE_INLINE int -ACE_Hash_Cache_Map_Manager::bind ( - const KEY &key, - const VALUE &value) -{ - return ACE_HCMM_BASE::bind (key, value); -} - -template -ACE_INLINE int -ACE_Hash_Cache_Map_Manager::rebind ( - const KEY &key, - const VALUE &value) -{ - return ACE_HCMM_BASE::rebind (key, value); -} - -template -ACE_INLINE int -ACE_Hash_Cache_Map_Manager::rebind ( - const KEY &key, - const VALUE &value, - VALUE &old_value) -{ - return ACE_HCMM_BASE::rebind (key, value, old_value); -} - -template -ACE_INLINE int -ACE_Hash_Cache_Map_Manager::rebind ( - const KEY &key, - const VALUE &value, - KEY &old_key, - VALUE &old_value) -{ - return ACE_HCMM_BASE::rebind (key, - value, - old_key, - old_value); -} - -template -ACE_INLINE int -ACE_Hash_Cache_Map_Manager::trybind ( - const KEY &key, - VALUE &value) -{ - return ACE_HCMM_BASE::trybind (key, value); -} - -template -ACE_INLINE int -ACE_Hash_Cache_Map_Manager::unbind (const KEY &key) -{ - return ACE_HCMM_BASE::unbind (key); -} - -template -ACE_INLINE int -ACE_Hash_Cache_Map_Manager::unbind (const KEY &key, - VALUE &value) -{ - return ACE_HCMM_BASE::unbind (key, value); -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Hash_Map_Manager.h b/modules/worldengine/deps/acelite/ace/Hash_Map_Manager.h deleted file mode 100644 index d7d61b9276..0000000000 --- a/modules/worldengine/deps/acelite/ace/Hash_Map_Manager.h +++ /dev/null @@ -1,29 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Hash_Map_Manager.h - * - * Backward compatibility header. - * - * @author Douglas C. Schmidt - */ -//============================================================================= - -#ifndef ACE_HASH_MAP_MANAGER_H -#define ACE_HASH_MAP_MANAGER_H - -#include /**/ "ace/pre.h" - -#include /**/ "ace/config-all.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -// Include the templates here. -#include "ace/Hash_Map_Manager_T.h" - -#include /**/ "ace/post.h" - -#endif /* ACE_HASH_MAP_MANAGER_H */ diff --git a/modules/worldengine/deps/acelite/ace/Hash_Map_Manager_T.cpp b/modules/worldengine/deps/acelite/ace/Hash_Map_Manager_T.cpp deleted file mode 100644 index 7ad4310a1a..0000000000 --- a/modules/worldengine/deps/acelite/ace/Hash_Map_Manager_T.cpp +++ /dev/null @@ -1,540 +0,0 @@ - -//============================================================================= -/** - * @file Hash_Map_Manager_T.cpp - * - * @author Douglas C. Schmidt - */ -//============================================================================= - - -#ifndef ACE_HASH_MAP_MANAGER_T_CPP -#define ACE_HASH_MAP_MANAGER_T_CPP - -#include "ace/Hash_Map_Manager_T.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#if !defined (__ACE_INLINE__) -# include "ace/Hash_Map_Manager_T.inl" -#endif /* __ACE_INLINE__ */ - -#include "ace/Malloc_Base.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -template -ACE_Hash_Map_Entry::ACE_Hash_Map_Entry (ACE_Hash_Map_Entry *next, - ACE_Hash_Map_Entry *prev) - : next_ (next), - prev_ (prev) -{ -} - -template -ACE_Hash_Map_Entry::ACE_Hash_Map_Entry (const EXT_ID &ext_id, - const INT_ID &int_id, - ACE_Hash_Map_Entry *next, - ACE_Hash_Map_Entry *prev) - : ext_id_ (ext_id), - int_id_ (int_id), - next_ (next), - prev_ (prev) -{ -} - -template -ACE_Hash_Map_Entry::~ACE_Hash_Map_Entry (void) -{ -} - -template EXT_ID & -ACE_Hash_Map_Entry::key () -{ - return ext_id_; -} - -template const EXT_ID & -ACE_Hash_Map_Entry::key () const -{ - return ext_id_; -} - -template INT_ID & -ACE_Hash_Map_Entry::item () -{ - return int_id_; -} - -template const INT_ID & -ACE_Hash_Map_Entry::item () const -{ - return int_id_; -} - -template void -ACE_Hash_Map_Entry::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("next_ = %d"), this->next_)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("prev_ = %d"), this->prev_)); - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} - -template void -ACE_Hash_Map_Manager_Ex::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("total_size_ = %d\n"), this->total_size_)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("cur_size_ = %d\n"), this->cur_size_)); - this->table_allocator_->dump (); - this->entry_allocator_->dump (); - this->lock_.dump (); - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} - -template int -ACE_Hash_Map_Manager_Ex::create_buckets (size_t size) -{ - size_t bytes = size * sizeof (ACE_Hash_Map_Entry); - void *ptr = 0; - - ACE_ALLOCATOR_RETURN (ptr, - this->table_allocator_->malloc (bytes), - -1); - - this->table_ = (ACE_Hash_Map_Entry *) ptr; - - this->total_size_ = size; - - // Initialize each entry in the hash table to be a circular linked - // list with the dummy node in the front serving as the anchor of - // the list. - for (size_t i = 0; i < size; i++) - new (&this->table_[i]) ACE_Hash_Map_Entry (&this->table_[i], - &this->table_[i]); - return 0; -} - -template int -ACE_Hash_Map_Manager_Ex::open (size_t size, - ACE_Allocator *table_alloc, - ACE_Allocator *entry_alloc) -{ - ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1); - - // Calling this->close_i () to ensure we release previous allocated - // memory before allocating new one. - this->close_i (); - - if (table_alloc == 0) - table_alloc = ACE_Allocator::instance (); - - this->table_allocator_ = table_alloc; - - if (entry_alloc == 0) - entry_alloc = table_alloc; - - this->entry_allocator_ = entry_alloc; - - // This assertion is here to help track a situation that shouldn't - // happen, but did with Sun C++ 4.1 (before a change to this class - // was made: it used to have an enum that was supposed to be defined - // to be ACE_DEFAULT_MAP_SIZE, but instead was defined to be 0). - if (size == 0) - return -1; - - return this->create_buckets (size); -} - -template int -ACE_Hash_Map_Manager_Ex::close_i (void) -{ - // Protect against "double-deletion" in case the destructor also - // gets called. - if (this->table_ != 0) - { - // Remove all the entries. - this->unbind_all_i (); - - // Iterate through the buckets cleaning up the sentinels. - for (size_t i = 0; i < this->total_size_; i++) - { - // Destroy the dummy entry. - ACE_Hash_Map_Entry *entry = &this->table_[i]; - - // The second argument results in a no-op instead of - // deallocation. - ACE_DES_FREE_TEMPLATE2 (entry, ACE_NOOP, - ACE_Hash_Map_Entry, EXT_ID, INT_ID); - } - - // Reset size. - this->total_size_ = 0; - - // Free table memory. - this->table_allocator_->free (this->table_); - - // Should be done last... - this->table_ = 0; - } - - return 0; -} - -template int -ACE_Hash_Map_Manager_Ex::unbind_all_i (void) -{ - // Iterate through the entire map calling the destuctor of each - // . - for (size_t i = 0; i < this->total_size_; i++) - { - for (ACE_Hash_Map_Entry *temp_ptr = this->table_[i].next_; - temp_ptr != &this->table_[i]; - ) - { - ACE_Hash_Map_Entry *hold_ptr = temp_ptr; - temp_ptr = temp_ptr->next_; - - // Explicitly call the destructor. - ACE_DES_FREE_TEMPLATE2 (hold_ptr, this->entry_allocator_->free, - ACE_Hash_Map_Entry, EXT_ID, INT_ID); - } - - // Restore the sentinel. - this->table_[i].next_ = &this->table_[i]; - this->table_[i].prev_ = &this->table_[i]; - } - - this->cur_size_ = 0; - - return 0; -} - -template int -ACE_Hash_Map_Manager_Ex::bind_i (const EXT_ID &ext_id, - const INT_ID &int_id, - ACE_Hash_Map_Entry *&entry) -{ - size_t loc = 0; - if (this->shared_find (ext_id, entry, loc) == -1) - { - void *ptr = 0; - // Not found. - ACE_ALLOCATOR_RETURN (ptr, - this->entry_allocator_->malloc (sizeof (ACE_Hash_Map_Entry)), - -1); - - entry = new (ptr) ACE_Hash_Map_Entry (ext_id, - int_id, - this->table_[loc].next_, - &this->table_[loc]); - this->table_[loc].next_ = entry; - entry->next_->prev_ = entry; - ++this->cur_size_; - return 0; - } - else - return 1; -} - -template int -ACE_Hash_Map_Manager_Ex::trybind_i (const EXT_ID &ext_id, - INT_ID &int_id, - ACE_Hash_Map_Entry *&entry) -{ - size_t loc = 0; - if (this->shared_find (ext_id, entry, loc) == -1) - { - // Not found. - void *ptr = 0; - ACE_ALLOCATOR_RETURN (ptr, - this->entry_allocator_->malloc (sizeof (ACE_Hash_Map_Entry)), - -1); - - entry = new (ptr) ACE_Hash_Map_Entry (ext_id, - int_id, - this->table_[loc].next_, - &this->table_[loc]); - this->table_[loc].next_ = entry; - entry->next_->prev_ = entry; - ++this->cur_size_; - return 0; - } - else - return 1; -} - -template int -ACE_Hash_Map_Manager_Ex::unbind_i (const EXT_ID &ext_id, - INT_ID &int_id) -{ - ACE_Hash_Map_Entry *temp = 0; - - size_t loc = 0; - if (this->shared_find (ext_id, temp, loc) == -1) - { - errno = ENOENT; - return -1; - } - - int_id = temp->int_id_; - - return this->unbind_i (temp); -} - -template int -ACE_Hash_Map_Manager_Ex::unbind_i (ACE_Hash_Map_Entry *entry) -{ - entry->next_->prev_ = entry->prev_; - entry->prev_->next_ = entry->next_; - - // Explicitly call the destructor. - ACE_DES_FREE_TEMPLATE2 (entry, this->entry_allocator_->free, - ACE_Hash_Map_Entry, EXT_ID, INT_ID); - - --this->cur_size_; - return 0; -} - -template int -ACE_Hash_Map_Manager_Ex::shared_find (const EXT_ID &ext_id, - ACE_Hash_Map_Entry *&entry, - size_t &loc) -{ - if (this->total_size_ == 0) - { - errno = ENOENT; - return -1; - } - - loc = this->hash (ext_id) % this->total_size_; - - ACE_Hash_Map_Entry *temp = this->table_[loc].next_; - - while (temp != &this->table_[loc] && this->equal (temp->ext_id_, ext_id) == 0) - temp = temp->next_; - - if (temp == &this->table_[loc]) - { - errno = ENOENT; - return -1; - } - else - { - entry = temp; - return 0; - } -} - -template int -ACE_Hash_Map_Manager_Ex::rebind_i (const EXT_ID &ext_id, - const INT_ID &int_id, - ACE_Hash_Map_Entry *&entry) -{ - size_t dummy = 0; - if (this->shared_find (ext_id, entry, dummy) == -1) - return this->bind_i (ext_id, int_id); - else - { - entry->ext_id_ = ext_id; - entry->int_id_ = int_id; - return 1; - } -} - -template int -ACE_Hash_Map_Manager_Ex::rebind_i (const EXT_ID &ext_id, - const INT_ID &int_id, - INT_ID &old_int_id, - ACE_Hash_Map_Entry *&entry) -{ - size_t dummy = 0; - if (this->shared_find (ext_id, entry, dummy) == -1) - return this->bind_i (ext_id, int_id); - else - { - old_int_id = entry->int_id_; - entry->ext_id_ = ext_id; - entry->int_id_ = int_id; - return 1; - } -} - -template int -ACE_Hash_Map_Manager_Ex::rebind_i (const EXT_ID &ext_id, - const INT_ID &int_id, - EXT_ID &old_ext_id, - INT_ID &old_int_id, - ACE_Hash_Map_Entry *&entry) -{ - size_t dummy = 0; - if (this->shared_find (ext_id, entry, dummy) == -1) - return this->bind_i (ext_id, int_id); - else - { - old_ext_id = entry->ext_id_; - old_int_id = entry->int_id_; - entry->ext_id_ = ext_id; - entry->int_id_ = int_id; - return 1; - } -} - -// ------------------------------------------------------------ - -ACE_ALLOC_HOOK_DEFINE(ACE_Hash_Map_Iterator_Base_Ex) - -template void -ACE_Hash_Map_Iterator_Base_Ex::dump_i (void) const -{ - ACE_TRACE ("ACE_Hash_Map_Iterator_Base_Ex::dump_i"); - - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("index_ = %d "), this->index_)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("next_ = %x"), this->next_)); - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -} - -template int -ACE_Hash_Map_Iterator_Base_Ex::forward_i (void) -{ - ACE_TRACE ("ACE_Hash_Map_Iterator_Base_Ex::forward_i"); - - if (this->map_man_->table_ == 0) - return -1; - // Handle initial case specially. - else if (this->index_ == -1) - { - this->index_++; - return this->forward_i (); - } - else if (this->index_ >= static_cast (this->map_man_->total_size_)) - return 0; - - this->next_ = this->next_->next_; - if (this->next_ == &this->map_man_->table_[this->index_]) - { - while (++this->index_ < static_cast (this->map_man_->total_size_)) - { - this->next_ = this->map_man_->table_[this->index_].next_; - if (this->next_ != &this->map_man_->table_[this->index_]) - break; - } - } - - return this->index_ < static_cast (this->map_man_->total_size_); -} - -template int -ACE_Hash_Map_Iterator_Base_Ex::reverse_i (void) -{ - ACE_TRACE ("ACE_Hash_Map_Iterator_Base_Ex::reverse_i"); - - if (this->map_man_->table_ == 0) - return -1; - else if (this->index_ == static_cast (this->map_man_->total_size_)) - { - --this->index_; - return this->reverse_i (); - } - else if (this->index_ < 0) - return 0; - - this->next_ = this->next_->prev_; - if (this->next_ == &this->map_man_->table_[this->index_]) - { - while (--this->index_ >= 0) - { - this->next_ = this->map_man_->table_[this->index_].prev_; - if (this->next_ != &this->map_man_->table_[this->index_]) - break; - } - } - - return this->index_ >= 0; -} - -// ------------------------------------------------------------ - -ACE_ALLOC_HOOK_DEFINE(ACE_Hash_Map_Const_Iterator_Base_Ex) - -template void -ACE_Hash_Map_Const_Iterator_Base_Ex::dump_i (void) const -{ - ACE_TRACE ("ACE_Hash_Map_Const_Iterator_Base_Ex::dump_i"); - - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("index_ = %d "), this->index_)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("next_ = %x"), this->next_)); - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -} - -template int -ACE_Hash_Map_Const_Iterator_Base_Ex::forward_i (void) -{ - ACE_TRACE ("ACE_Hash_Map_Const_Iterator_Base_Ex::forward_i"); - - if (this->map_man_->table_ == 0) - return -1; - // Handle initial case specially. - else if (this->index_ == -1) - { - ++this->index_; - return this->forward_i (); - } - else if (this->index_ >= (ssize_t) this->map_man_->total_size_) - return 0; - - this->next_ = this->next_->next_; - if (this->next_ == &this->map_man_->table_[this->index_]) - { - while (++this->index_ < (ssize_t) this->map_man_->total_size_) - { - this->next_ = this->map_man_->table_[this->index_].next_; - if (this->next_ != &this->map_man_->table_[this->index_]) - break; - } - } - - return this->index_ < (ssize_t) this->map_man_->total_size_; -} - -template int -ACE_Hash_Map_Const_Iterator_Base_Ex::reverse_i (void) -{ - ACE_TRACE ("ACE_Hash_Map_Const_Iterator_Base_Ex::reverse_i"); - - if (this->map_man_->table_ == 0) - return -1; - else if (this->index_ == (ssize_t) this->map_man_->total_size_) - { - --this->index_; - return this->reverse_i (); - } - else if (this->index_ < 0) - return 0; - - this->next_ = this->next_->prev_; - if (this->next_ == &this->map_man_->table_[this->index_]) - { - while (--this->index_ >= 0) - { - this->next_ = this->map_man_->table_[this->index_].prev_; - if (this->next_ != &this->map_man_->table_[this->index_]) - break; - } - } - - return this->index_ >= 0; -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_HASH_MAP_MANAGER_T_CPP */ diff --git a/modules/worldengine/deps/acelite/ace/Hash_Map_Manager_T.h b/modules/worldengine/deps/acelite/ace/Hash_Map_Manager_T.h deleted file mode 100644 index eb3e2cbb46..0000000000 --- a/modules/worldengine/deps/acelite/ace/Hash_Map_Manager_T.h +++ /dev/null @@ -1,1304 +0,0 @@ -// // -*- C++ -*- - -//============================================================================= -/** - * @file Hash_Map_Manager_T.h - * - * @author Douglas C. Schmidt - */ -//============================================================================= - -#ifndef ACE_HASH_MAP_MANAGER_T_H -#define ACE_HASH_MAP_MANAGER_T_H -#include /**/ "ace/pre.h" - -#include /**/ "ace/config-all.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Default_Constants.h" -#include "ace/Functor_T.h" -#include "ace/Log_Category.h" -#include - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_Hash_Map_Entry - * - * @brief Define an entry in the hash table. - */ -template -class ACE_Hash_Map_Entry -{ -public: - // = Initialization and termination methods. - /// Constructor. - ACE_Hash_Map_Entry (const EXT_ID &ext_id, - const INT_ID &int_id, - ACE_Hash_Map_Entry *next = 0, - ACE_Hash_Map_Entry *prev = 0); - - /// Constructor. - ACE_Hash_Map_Entry (ACE_Hash_Map_Entry *next, - ACE_Hash_Map_Entry *prev); - - /// Destructor. - ~ACE_Hash_Map_Entry (void); - - /// Key accessor. - EXT_ID& key (void); - - /// Read-only key accessor. - const EXT_ID& key (void) const; - - /// Item accessor. - INT_ID& item (void); - - /// Read-only item accessor. - const INT_ID& item (void) const; - - /// Key used to look up an entry. - /// @deprecated Use key() - EXT_ID ext_id_; - - /// The contents of the entry itself. - /// @deprecated Use item() - INT_ID int_id_; - - /// Pointer to the next item in the bucket of overflow nodes. - ACE_Hash_Map_Entry *next_; - - /// Pointer to the prev item in the bucket of overflow nodes. - ACE_Hash_Map_Entry *prev_; - - /// Dump the state of an object. - void dump (void) const; -}; - -// Forward decl. -template -class ACE_Hash_Map_Iterator_Base_Ex; - -// Forward decl. -template -class ACE_Hash_Map_Const_Iterator_Base_Ex; - -// Forward decl. -template -class ACE_Hash_Map_Iterator_Ex; - -// Forward decl. -template -class ACE_Hash_Map_Const_Iterator_Ex; - -// Forward decl. -template -class ACE_Hash_Map_Reverse_Iterator_Ex; - -// Forward decl. -template -class ACE_Hash_Map_Const_Reverse_Iterator_Ex; - -// Forward decl. -template -class ACE_Hash_Map_Bucket_Iterator; - -// Forward decl. -class ACE_Allocator; - -/** - * @class ACE_Hash_Map_Manager_Ex - * - * @brief Define a map abstraction that efficiently associates - * @c EXT_ID type objects with @c INT_ID type objects. - * - * This implementation of a map uses a hash table. Key hashing - * is achieved through the @c HASH_KEY object and key comparison is - * achieved through the @c COMPARE_KEYS object. - * This class uses an ACE_Allocator to allocate memory. The - * user can make this a persistent class by providing an - * ACE_Allocator with a persistable memory pool. - */ - -template -class ACE_Hash_Map_Manager_Ex -{ -public: - friend class ACE_Hash_Map_Iterator_Base_Ex; - friend class ACE_Hash_Map_Iterator_Ex; - friend class ACE_Hash_Map_Const_Iterator_Base_Ex; - friend class ACE_Hash_Map_Const_Iterator_Ex; - friend class ACE_Hash_Map_Reverse_Iterator_Ex; - friend class ACE_Hash_Map_Const_Reverse_Iterator_Ex; - friend class ACE_Hash_Map_Bucket_Iterator; - - typedef EXT_ID - KEY; - typedef INT_ID - VALUE; - typedef ACE_LOCK lock_type; - typedef ACE_Hash_Map_Entry - ENTRY; - - // = ACE-style iterator typedefs. - typedef ACE_Hash_Map_Iterator_Ex - ITERATOR; - typedef ACE_Hash_Map_Const_Iterator_Ex - CONST_ITERATOR; - typedef ACE_Hash_Map_Reverse_Iterator_Ex - REVERSE_ITERATOR; - typedef ACE_Hash_Map_Const_Reverse_Iterator_Ex - CONST_REVERSE_ITERATOR; - - // = STL-style iterator typedefs. - typedef ACE_Hash_Map_Iterator_Ex - iterator; - typedef ACE_Hash_Map_Const_Iterator_Ex - const_iterator; - typedef ACE_Hash_Map_Reverse_Iterator_Ex - reverse_iterator; - typedef ACE_Hash_Map_Const_Reverse_Iterator_Ex - const_reverse_iterator; - - // = STL-style typedefs/traits. - typedef EXT_ID key_type; - typedef INT_ID data_type; - typedef ACE_Hash_Map_Entry value_type; - typedef value_type & reference; - typedef value_type const & const_reference; - typedef value_type * pointer; - typedef value_type const * const_pointer; - typedef ptrdiff_t difference_type; - typedef size_t size_type; - - // = Initialization and termination methods. - - /** - * Initialize an ACE_Hash_Map_Manager_Ex with a default number of elements. - * - * @param table_alloc is a pointer to a memory allocator used for - * table_, so it should supply size*sizeof (ACE_Hash_Map_Entry). - * If @a table_alloc is 0 it defaults to ACE_Allocator::instance(). - * @param entry_alloc is a pointer to an additional allocator for - * entries, so it should be able to allocate 'size' / chunks - * of sizeof(ACE_Hash_Map_Entry) bytes each. - * If @a entry_alloc is 0 it defaults to the same allocator as - * @a table_alloc. - */ - ACE_Hash_Map_Manager_Ex (ACE_Allocator *table_alloc = 0, - ACE_Allocator *entry_alloc = 0); - - /** - * Initialize an ACE_Hash_Map_Manager_Ex with @a size elements. - * - * @param table_alloc is a pointer to a memory allocator used for - * table_, so it should supply size*sizeof (ACE_Hash_Map_Entry). - * If @a table_alloc is 0 it defaults to ACE_Allocator::instance(). - * @param entry_alloc is a pointer to an additional allocator for - * entries, so it should be able to allocate 'size' / chunks - * of sizeof(ACE_Hash_Map_Entry) bytes each. - * If @a entry_alloc is 0 it defaults to the same allocator as - * @a table_alloc. - */ - ACE_Hash_Map_Manager_Ex (size_t size, - ACE_Allocator *table_alloc = 0, - ACE_Allocator *entry_alloc = 0); - - /** - * Initialize an ACE_Hash_Map_Manager_Ex with @a size elements. - * @param table_alloc is a pointer to a memory allocator used for - * table_, so it should supply size*sizeof (ACE_Hash_Map_Entry). - * If @a table_alloc is 0 it defaults to ACE_Allocator::instance(). - * @param entry_alloc is a pointer to an additional allocator for - * entries, so it should be able to allocate 'size' / chunks - * of sizeof(ACE_Hash_Map_Entry) bytes each. - * If @a entry_alloc is 0 then it defaults to the same allocator as - * @a table_alloc. - * @return -1 on failure, 0 on success - */ - - int open (size_t size = ACE_DEFAULT_MAP_SIZE, - ACE_Allocator *table_alloc = 0, - ACE_Allocator *entry_alloc = 0); - - /// Close down the ACE_Hash_Map_Manager_Ex and release dynamically allocated - /// resources. - int close (void); - - /// Removes all the entries in the ACE_Hash_Map_Manager_Ex. - int unbind_all (void); - - /// Cleanup the ACE_Hash_Map_Manager_Ex. - ~ACE_Hash_Map_Manager_Ex (void); - - /** - * Associate @a item with @a int_id. If @a item is already in the - * map then the map is not changed. - * - * @retval 0 if a new entry is bound successfully. - * @retval 1 if an attempt is made to bind an existing entry. - * @retval -1 if a failure occurs; check @c errno for more information. - */ - int bind (const EXT_ID &item, - const INT_ID &int_id); - - /** - * Same as a normal bind, except the map entry is also passed back - * to the caller. The entry in this case will either be the newly - * created entry, or the existing one. - */ - int bind (const EXT_ID &ext_id, - const INT_ID &int_id, - ACE_Hash_Map_Entry *&entry); - - /** - * Associate @a ext_id with @a int_id if and only if @a ext_id is not - * in the map. If @a ext_id is already in the map then the @a int_id - * parameter is assigned the existing value in the map. Returns 0 - * if a new entry is bound successfully, returns 1 if an attempt is - * made to bind an existing entry, and returns -1 if failures occur. - */ - int trybind (const EXT_ID &ext_id, - INT_ID &int_id); - - /** - * Same as a normal trybind, except the map entry is also passed - * back to the caller. The entry in this case will either be the - * newly created entry, or the existing one. - */ - int trybind (const EXT_ID &ext_id, - INT_ID &int_id, - ACE_Hash_Map_Entry *&entry); - - /** - * Reassociate @a ext_id with @a int_id. If @a ext_id is not in the - * map then behaves just like . Returns 0 if a new entry is - * bound successfully, returns 1 if an existing entry was rebound, - * and returns -1 if failures occur. - */ - int rebind (const EXT_ID &ext_id, - const INT_ID &int_id); - - /** - * Same as a normal rebind, except the map entry is also passed back - * to the caller. The entry in this case will either be the newly - * created entry, or the existing one. - */ - int rebind (const EXT_ID &ext_id, - const INT_ID &int_id, - ACE_Hash_Map_Entry *&entry); - - /** - * Associate @a ext_id with @a int_id. If @a ext_id is not in the map - * then behaves just like . Otherwise, store the old value of - * @a int_id into the "out" parameter and rebind the new parameters. - * Returns 0 if a new entry is bound successfully, returns 1 if an - * existing entry was rebound, and returns -1 if failures occur. - */ - int rebind (const EXT_ID &ext_id, - const INT_ID &int_id, - INT_ID &old_int_id); - - /** - * Same as a normal rebind, except the map entry is also passed back - * to the caller. The entry in this case will either be the newly - * created entry, or the existing one. - */ - int rebind (const EXT_ID &ext_id, - const INT_ID &int_id, - INT_ID &old_int_id, - ACE_Hash_Map_Entry *&entry); - - /** - * Associate @a ext_id with @a int_id. If @a ext_id is not in the map - * then behaves just like . Otherwise, store the old values - * of @a ext_id and @a int_id into the "out" parameters and rebind the - * new parameters. This is very useful if you need to have an - * atomic way of updating ACE_Hash_Map_Entrys and you also need - * full control over memory allocation. Returns 0 if a new entry is - * bound successfully, returns 1 if an existing entry was rebound, - * and returns -1 if failures occur. - */ - int rebind (const EXT_ID &ext_id, - const INT_ID &int_id, - EXT_ID &old_ext_id, - INT_ID &old_int_id); - - /** - * Same as a normal rebind, except the map entry is also passed back - * to the caller. The entry in this case will either be the newly - * created entry, or the existing one. - */ - int rebind (const EXT_ID &ext_id, - const INT_ID &int_id, - EXT_ID &old_ext_id, - INT_ID &old_int_id, - ACE_Hash_Map_Entry *&entry); - - /// Locate @a ext_id and pass out parameter via @a int_id. - /// Return 0 if found, returns -1 if not found. - int find (const EXT_ID &ext_id, - INT_ID &int_id) const; - - /// Returns 0 if the @a ext_id is in the mapping, otherwise -1. - int find (const EXT_ID &ext_id) const; - - /// Locate @a ext_id and pass out parameter via @a entry. If found, - /// return 0, returns -1 if not found. - int find (const EXT_ID &ext_id, - ACE_Hash_Map_Entry *&entry) const; - - /// Locate @a ext_id and pass out an iterator that points to its - /// corresponding value. - /** - * @param pos @a pos will be set to @c end() if not found. - */ - void find (EXT_ID const & ext_id, iterator & pos) const; - - /** - * Unbind (remove) the @a ext_id from the map. Don't return the - * @a int_id to the caller (this is useful for collections where the - * @a int_ids are *not* dynamically allocated...) - */ - int unbind (const EXT_ID &ext_id); - - /// Break any association of @a ext_id. Returns the value of @a int_id - /// in case the caller needs to deallocate memory. Return 0 if the - /// unbind was successful, and returns -1 if failures occur. - int unbind (const EXT_ID &ext_id, - INT_ID &int_id); - - /// Remove entry from map. - /** - * This unbind operation is fast relative to those that accept an - * external ID parameter since no map lookup is performed. - * - * @return 0 if the unbind was successful, and -1 if failures - * occur. - */ - int unbind (ACE_Hash_Map_Entry *entry); - - /// Remove entry from map pointed to by @c iterator @a pos. - /** - * This unbind operation is fast relative to those that accept an - * external ID parameter since no map lookup is performed. - * - * @return 0 if the unbind was successful, and -1 if failures - * occur. - */ - int unbind (iterator pos); - - /// Returns the current number of ACE_Hash_Map_Entry objects in the - /// hash table. - size_t current_size (void) const; - - /// Return the size of the array that's used to point to the - /// linked lists of ACE_Hash_Map_Entry objects in the hash table. - size_t total_size (void) const; - - /** - * Returns a reference to the underlying . This makes it - * possible to acquire the lock explicitly, which can be useful in - * some cases if you instantiate the ACE_Atomic_Op with an - * ACE_Recursive_Mutex or ACE_Process_Mutex, or if you need to - * guard the state of an iterator. - * @note The right name would be , but HP/C++ will choke on that! - */ - ACE_LOCK &mutex (void); - - /// Dump the state of an object. - void dump (void) const; - - // = STL styled iterator factory functions. - - /// Return forward iterator. - iterator begin (void); - iterator end (void); - const_iterator begin (void) const; - const_iterator end (void) const; - - /// Return reverse iterator. - reverse_iterator rbegin (void); - reverse_iterator rend (void); - const_reverse_iterator rbegin (void) const; - const_reverse_iterator rend (void) const; - -protected: - // = The following methods do the actual work. - - /// Returns 1 if == , else 0. This is defined as a - /// separate method to facilitate template specialization. - int equal (const EXT_ID &id1, const EXT_ID &id2); - - /// Compute the hash value of the @a ext_id. This is defined as a - /// separate method to facilitate template specialization. - u_long hash (const EXT_ID &ext_id); - - // = These methods assume locks are held by private methods. - - /// Performs bind. Must be called with locks held. - int bind_i (const EXT_ID &ext_id, - const INT_ID &int_id); - - /// Performs bind. Must be called with locks held. - int bind_i (const EXT_ID &ext_id, - const INT_ID &int_id, - ACE_Hash_Map_Entry *&entry); - - /// Performs trybind. Must be called with locks held. - int trybind_i (const EXT_ID &ext_id, - INT_ID &int_id); - - /// Performs trybind. Must be called with locks held. - int trybind_i (const EXT_ID &ext_id, - INT_ID &int_id, - ACE_Hash_Map_Entry *&entry); - - /// Performs rebind. Must be called with locks held. - int rebind_i (const EXT_ID &ext_id, - const INT_ID &int_id); - - /// Performs rebind. Must be called with locks held. - int rebind_i (const EXT_ID &ext_id, - const INT_ID &int_id, - ACE_Hash_Map_Entry *&entry); - - /// Performs rebind. Must be called with locks held. - int rebind_i (const EXT_ID &ext_id, - const INT_ID &int_id, - INT_ID &old_int_id); - - /// Performs rebind. Must be called with locks held. - int rebind_i (const EXT_ID &ext_id, - const INT_ID &int_id, - INT_ID &old_int_id, - ACE_Hash_Map_Entry *&entry); - - /// Performs rebind. Must be called with locks held. - int rebind_i (const EXT_ID &ext_id, - const INT_ID &int_id, - EXT_ID &old_ext_id, - INT_ID &old_int_id); - - /// Performs rebind. Must be called with locks held. - int rebind_i (const EXT_ID &ext_id, - const INT_ID &int_id, - EXT_ID &old_ext_id, - INT_ID &old_int_id, - ACE_Hash_Map_Entry *&entry); - - /// Performs a find of @a int_id using @a ext_id as the key. Must be - /// called with locks held. - int find_i (const EXT_ID &ext_id, - INT_ID &int_id); - - /// Performs a find using @a ext_id as the key. Must be called with - /// locks held. - int find_i (const EXT_ID &ext_id); - - /// Performs a find using @a ext_id as the key. Must be called with - /// locks held. - int find_i (const EXT_ID &ext_id, - ACE_Hash_Map_Entry *&entry); - - /// Performs unbind. Must be called with locks held. - int unbind_i (const EXT_ID &ext_id, - INT_ID &int_id); - - /// Performs unbind. Must be called with locks held. - int unbind_i (const EXT_ID &ext_id); - - /// Performs unbind. Must be called with locks held. - int unbind_i (ACE_Hash_Map_Entry *entry); - - /** - * Resize the map. Must be called with locks held. - * @note This method should never be called more than once or else all the - * hashing will get screwed up as the size will change. - */ - int create_buckets (size_t size); - - /// Close down a . Must be called with - /// locks held. - int close_i (void); - - /// Removes all the entries in . Must be called with - /// locks held. - int unbind_all_i (void); - - /// Pointer to a memory allocator used for table_, so it should - /// supply size*sizeof (ACE_Hash_Map_Entry), - ACE_Allocator *table_allocator_; - - /// Addidtional allocator for entries, so it should be able to - /// allocate 'size' / chunks of sizeof(ACE_Hash_Map_Entry) bytes each. - ACE_Allocator *entry_allocator_; - - /// Synchronization variable for the MT_SAFE - /// @c ACE_Hash_Map_Manager_Ex. - mutable ACE_LOCK lock_; - - /// Function object used for hashing keys. - HASH_KEY hash_key_; - - /// Function object used for comparing keys. - COMPARE_KEYS compare_keys_; - -protected: - /// Returns the ACE_Hash_Map_Entry that corresponds to @a ext_id. - int shared_find (const EXT_ID &ext_id, - ACE_Hash_Map_Entry *&entry, - size_t &loc); - - /// Accessor of the underlying table - ACE_Hash_Map_Entry *table (void); - -private: - /** - * Array of ACE_Hash_Map_Entry *s, each of which points to an - * ACE_Hash_Map_Entry that serves as the beginning of a linked - * list of s that hash to that bucket. - */ - ACE_Hash_Map_Entry *table_; - - /// Total size of the hash table. - size_t total_size_; - - /// Current number of entries in the table - /// @note That this can be larger than due to the - /// bucket chaining). - size_t cur_size_; - - // = Disallow these operations. - ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Hash_Map_Manager_Ex &)) - ACE_UNIMPLEMENTED_FUNC (ACE_Hash_Map_Manager_Ex (const ACE_Hash_Map_Manager_Ex &)) -}; - -/** - * @class ACE_Hash_Map_Iterator_Base_Ex - * - * @brief Base iterator for the ACE_Hash_Map_Manager_Ex - * - * This class factors out common code from its templatized - * subclasses. - */ -template -class ACE_Hash_Map_Iterator_Base_Ex -{ -public: - // = STL-style typedefs/traits. - typedef ACE_Hash_Map_Manager_Ex - container_type; - - // = std::iterator_traits typedefs/traits. - typedef typename container_type::value_type value_type; - typedef typename container_type::reference reference; - typedef typename container_type::pointer pointer; - typedef typename container_type::difference_type difference_type; - - // = Initialization method. - /// Contructor. - /** - * If @a head != @c false, the iterator constructed is positioned - * at the head of the map. It is positioned at the end otherwise. - * @par - */ - ACE_Hash_Map_Iterator_Base_Ex ( - ACE_Hash_Map_Manager_Ex &mm, - bool head); - - /// Contructor. - /** - * This constructor positions the iterator to the given @a entry. - */ - ACE_Hash_Map_Iterator_Base_Ex ( - ACE_Hash_Map_Manager_Ex & mm, - ACE_Hash_Map_Entry * entry, - size_t index); - - // = ITERATION methods. - - /// Pass back the next that hasn't been seen in the Set. - /// Returns 0 when all items have been seen, else 1. - int next (ACE_Hash_Map_Entry *&next_entry) const; - - /// Returns 1 when all items have been seen, else 0. - int done (void) const; - - /// Returns a reference to the interal element @c this is pointing to. - ACE_Hash_Map_Entry& operator* (void) const; - - /// Returns a pointer to the interal element @c this is pointing to. - ACE_Hash_Map_Entry* operator-> (void) const; - - /// Returns reference the Hash_Map_Manager_Ex that is being iterated - /// over. - ACE_Hash_Map_Manager_Ex& map (void); - - /// Check if two iterators point to the same position - bool operator== (const ACE_Hash_Map_Iterator_Base_Ex &) const; - bool operator!= (const ACE_Hash_Map_Iterator_Base_Ex &) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - -protected: - /// Move forward by one element in the set. Returns 0 when there's - /// no more item in the set after the current items, else 1. - int forward_i (void); - - /// Move backward by one element in the set. Returns 0 when there's - /// no more item in the set before the current item, else 1. - int reverse_i (void); - - /// Dump the state of an object. - void dump_i (void) const; - - /// Map we are iterating over. - ACE_Hash_Map_Manager_Ex *map_man_; - - /// Keeps track of how far we've advanced in the table. - ssize_t index_; - - /// Keeps track of how far we've advanced in a linked list in each - /// table slot. - ACE_Hash_Map_Entry *next_; -}; - -/** - * @class ACE_Hash_Map_Const_Iterator_Base_Ex - * - * @brief Base const iterator for the ACE_Hash_Map_Manager_Ex - * - * This class factors out common code from its templatized - * subclasses. - */ -template -class ACE_Hash_Map_Const_Iterator_Base_Ex -{ -public: - // = STL-style typedefs/traits. - typedef ACE_Hash_Map_Manager_Ex - container_type; - - // = std::iterator_traits typedefs/traits. - typedef typename container_type::value_type value_type; - typedef typename container_type::const_reference reference; - typedef typename container_type::const_pointer pointer; - typedef typename container_type::difference_type difference_type; - - // = Initialization method. - /// Contructor. If head the iterator constructed is positioned - /// at the head of the map, it is positioned at the end otherwise. - ACE_Hash_Map_Const_Iterator_Base_Ex (const ACE_Hash_Map_Manager_Ex &mm, - bool head); - - // = ITERATION methods. - - /// Pass back the next that hasn't been seen in the Set. - /// Returns 0 when all items have been seen, else 1. - int next (ACE_Hash_Map_Entry *&next_entry) const; - - /// Returns 1 when all items have been seen, else 0. - int done (void) const; - - /// Returns a reference to the interal element @c this is pointing to. - ACE_Hash_Map_Entry& operator* (void) const; - - /// Returns a pointer to the interal element @c this is pointing to. - ACE_Hash_Map_Entry* operator-> (void) const; - - /// Returns reference the Hash_Map_Manager_Ex that is being iterated - /// over. - const ACE_Hash_Map_Manager_Ex& map (void); - - /// Check if two iterators point to the same position - bool operator== (const ACE_Hash_Map_Const_Iterator_Base_Ex &) const; - bool operator!= (const ACE_Hash_Map_Const_Iterator_Base_Ex &) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - -protected: - /// Move forward by one element in the set. Returns 0 when there's - /// no more item in the set after the current items, else 1. - int forward_i (void); - - /// Move backward by one element in the set. Returns 0 when there's - /// no more item in the set before the current item, else 1. - int reverse_i (void); - - /// Dump the state of an object. - void dump_i (void) const; - - /// Map we are iterating over. - const ACE_Hash_Map_Manager_Ex *map_man_; - - /// Keeps track of how far we've advanced in the table. - ssize_t index_; - - /// Keeps track of how far we've advanced in a linked list in each - /// table slot. - ACE_Hash_Map_Entry *next_; -}; - -/** - * @class ACE_Hash_Map_Iterator_Ex - * - * @brief Forward iterator for the ACE_Hash_Map_Manager_Ex. - * - * This class does not perform any internal locking of the - * ACE_Hash_Map_Manager_Ex it is iterating upon since locking is - * inherently inefficient and/or error-prone within an STL-style - * iterator. If you require locking, you can explicitly use an - * ACE_GUARD or ACE_READ_GUARD on the ACE_Hash_Map_Manager_Ex's - * internal lock, which is accessible via its mutex() method. - */ -template -class ACE_Hash_Map_Iterator_Ex : public ACE_Hash_Map_Iterator_Base_Ex -{ -public: - // = STL-style traits/typedefs - typedef typename ACE_Hash_Map_Iterator_Base_Ex::container_type - container_type; - - // = STL-style traits/typedefs - typedef std::bidirectional_iterator_tag iterator_category; - typedef typename container_type::value_type value_type; - typedef typename container_type::reference reference; - typedef typename container_type::pointer pointer; - typedef typename container_type::difference_type difference_type; - - // = Initialization method. - ACE_Hash_Map_Iterator_Ex (ACE_Hash_Map_Manager_Ex &mm, - int tail = 0); - - /// Contructor. - /** - * This constructor positions the iterator to the given @a entry. - */ - ACE_Hash_Map_Iterator_Ex ( - ACE_Hash_Map_Manager_Ex & mm, - ACE_Hash_Map_Entry * entry, - size_t index); - - // = Iteration methods. - /// Move forward by one element in the set. Returns 0 when all the - /// items in the set have been seen, else 1. - int advance (void); - - /// Dump the state of an object. - void dump (void) const; - - // = STL styled iteration, compare, and reference functions. - - /// Prefix advance. - ACE_Hash_Map_Iterator_Ex &operator++ (void); - - /// Postfix advance. - ACE_Hash_Map_Iterator_Ex operator++ (int); - - /// Prefix reverse. - ACE_Hash_Map_Iterator_Ex &operator-- (void); - - /// Postfix reverse. - ACE_Hash_Map_Iterator_Ex operator-- (int); - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; -}; - -/** - * @class ACE_Hash_Map_Const_Iterator_Ex - * - * @brief Const forward iterator for the ACE_Hash_Map_Manager_Ex. - * - * This class does not perform any internal locking of the - * ACE_Hash_Map_Manager_Ex it is iterating upon since locking is - * inherently inefficient and/or error-prone within an STL-style - * iterator. If you require locking, you can explicitly use an - * ACE_GUARD or ACE_READ_GUARD on the ACE_Hash_Map_Manager_Ex's - * internal lock, which is accessible via its mutex() method. - */ -template -class ACE_Hash_Map_Const_Iterator_Ex : public ACE_Hash_Map_Const_Iterator_Base_Ex -{ -public: - // = STL-style traits/typedefs - typedef typename ACE_Hash_Map_Const_Iterator_Base_Ex::container_type - container_type; - - // = std::iterator_trait traits/typedefs - typedef std::bidirectional_iterator_tag iterator_category; - typedef typename container_type::value_type value_type; - typedef typename container_type::reference reference; - typedef typename container_type::pointer pointer; - typedef typename container_type::difference_type difference_type; - - // = Initialization method. - ACE_Hash_Map_Const_Iterator_Ex (const ACE_Hash_Map_Manager_Ex &mm, - int tail = 0); - - // = Iteration methods. - /// Move forward by one element in the set. Returns 0 when all the - /// items in the set have been seen, else 1. - int advance (void); - - /// Dump the state of an object. - void dump (void) const; - - // = STL styled iteration, compare, and reference functions. - - /// Prefix advance. - ACE_Hash_Map_Const_Iterator_Ex &operator++ (void); - - /// Postfix advance. - ACE_Hash_Map_Const_Iterator_Ex operator++ (int); - - /// Prefix reverse. - ACE_Hash_Map_Const_Iterator_Ex &operator-- (void); - - /// Postfix reverse. - ACE_Hash_Map_Const_Iterator_Ex operator-- (int); - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; -}; - -/** - * @class ACE_Hash_Map_Bucket_Iterator - * - * @brief Forward iterator for the ACE_Hash_Map_Manager_Ex which - * only traverses a particular bucket. The particular bucket is - * specified by the parameter specified in the constructor. - * - * This class does not perform any internal locking of the - * ACE_Hash_Map_Manager_Ex it is iterating upon since locking is - * inherently inefficient and/or error-prone within an STL-style - * iterator. If you require locking, you can explicitly use an - * ACE_GUARD or ACE_READ_GUARD on the ACE_Hash_Map_Manager_Ex's - * internal lock, which is accessible via its mutex() method. - * - * Note that a creation method for this new iterator cannot be added - * to the hash map, since this would require adding explicit template - * instantiations for bucket iterators on platforms with broken - * templates. - */ -template -class ACE_Hash_Map_Bucket_Iterator -{ -public: - // = STL-style traits/typedefs - typedef ACE_Hash_Map_Manager_Ex - container_type; - - // = std::iterator traits/typedefs - typedef std::bidirectional_iterator_tag iterator_category; - typedef typename container_type::value_type value_type; - typedef typename container_type::reference reference; - typedef typename container_type::pointer pointer; - typedef typename container_type::difference_type difference_type; - - // = Initialization method. - ACE_Hash_Map_Bucket_Iterator (ACE_Hash_Map_Manager_Ex &mm, - const EXT_ID &ext_id, - int tail = 0); - - // = STL styled iteration, compare, and reference functions. - - /// Prefix advance. - ACE_Hash_Map_Bucket_Iterator &operator++ (void); - - /// Postfix advance. - ACE_Hash_Map_Bucket_Iterator operator++ (int); - - /// Prefix reverse. - ACE_Hash_Map_Bucket_Iterator &operator-- (void); - - /// Postfix reverse. - ACE_Hash_Map_Bucket_Iterator operator-- (int); - - /// Returns a reference to the interal element @c this is pointing to. - ACE_Hash_Map_Entry& operator* (void) const; - - /// Returns a pointer to the interal element @c this is pointing to. - ACE_Hash_Map_Entry* operator-> (void) const; - - /// Returns reference the Hash_Map_Manager_Ex that is being iterated - /// over. - ACE_Hash_Map_Manager_Ex& map (void); - - /// Check if two iterators point to the same position - bool operator== (const ACE_Hash_Map_Bucket_Iterator &) const; - bool operator!= (const ACE_Hash_Map_Bucket_Iterator &) const; - -protected: - /// Move forward by one element in the set. Returns 0 when there's - /// no more item in the set after the current items, else 1. - int forward_i (void); - - /// Move backward by one element in the set. Returns 0 when there's - /// no more item in the set before the current item, else 1. - int reverse_i (void); - - /// Map we are iterating over. - ACE_Hash_Map_Manager_Ex *map_man_; - - /// Keeps track of how far we've advanced in the table. - ssize_t index_; - - /// Keeps track of how far we've advanced in a linked list in each - /// table slot. - ACE_Hash_Map_Entry *next_; -}; - -/** - * @class ACE_Hash_Map_Reverse_Iterator_Ex - * - * @brief Reverse iterator for the ACE_Hash_Map_Manager_Ex. - * - * This class does not perform any internal locking of the - * ACE_Hash_Map_Manager_Ex it is iterating upon since locking is - * inherently inefficient and/or error-prone within an STL-style - * iterator. If you require locking, you can explicitly use an - * ACE_GUARD or ACE_READ_GUARD on the ACE_Hash_Map_Manager_Ex's - * internal lock, which is accessible via its mutex() method. - */ -template -class ACE_Hash_Map_Reverse_Iterator_Ex : public ACE_Hash_Map_Iterator_Base_Ex -{ -public: - // = STL-style traits/typedefs - typedef typename ACE_Hash_Map_Iterator_Base_Ex::container_type - container_type; - - // = std::iterator_traits typedefs - typedef std::bidirectional_iterator_tag iterator_category; - typedef typename container_type::value_type value_type; - typedef typename container_type::reference reference; - typedef typename container_type::pointer pointer; - typedef typename container_type::difference_type difference_type; - - // = Initialization method. - ACE_Hash_Map_Reverse_Iterator_Ex (ACE_Hash_Map_Manager_Ex &mm, - bool head = false); - - // = Iteration methods. - /// Move forward by one element in the set. Returns 0 when all the - /// items in the set have been seen, else 1. - int advance (void); - - /// Dump the state of an object. - void dump (void) const; - - // = STL styled iteration, compare, and reference functions. - - /// Prefix reverse. - ACE_Hash_Map_Reverse_Iterator_Ex &operator++ (void); - - /// Postfix reverse. - ACE_Hash_Map_Reverse_Iterator_Ex operator++ (int); - - /// Prefix advance. - ACE_Hash_Map_Reverse_Iterator_Ex &operator-- (void); - - /// Postfix advance. - ACE_Hash_Map_Reverse_Iterator_Ex operator-- (int); - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; -}; - -/** - * @class ACE_Hash_Map_Const_Reverse_Iterator_Ex - * - * @brief Const reverse iterator for the ACE_Hash_Map_Manager_Ex. - * - * This class does not perform any internal locking of the - * ACE_Hash_Map_Manager_Ex it is iterating upon since locking is - * inherently inefficient and/or error-prone within an STL-style - * iterator. If you require locking, you can explicitly use an - * ACE_GUARD or ACE_READ_GUARD on the ACE_Hash_Map_Manager_Ex's - * internal lock, which is accessible via its method. - */ -template -class ACE_Hash_Map_Const_Reverse_Iterator_Ex : public ACE_Hash_Map_Const_Iterator_Base_Ex -{ -public: - // = STL-style traits/typedefs - typedef typename ACE_Hash_Map_Const_Iterator_Base_Ex::container_type - container_type; - - // = std::iterator_traits typedefs - typedef std::bidirectional_iterator_tag iterator_category; - typedef typename container_type::value_type value_type; - typedef typename container_type::reference reference; - typedef typename container_type::pointer pointer; - typedef typename container_type::difference_type difference_type; - - // = Initialization method. - ACE_Hash_Map_Const_Reverse_Iterator_Ex (const ACE_Hash_Map_Manager_Ex &mm, - bool head = false); - - // = Iteration methods. - /// Move forward by one element in the set. Returns 0 when all the - /// items in the set have been seen, else 1. - int advance (void); - - /// Dump the state of an object. - void dump (void) const; - - // = STL styled iteration, compare, and reference functions. - - /// Prefix reverse. - ACE_Hash_Map_Const_Reverse_Iterator_Ex &operator++ (void); - - /// Postfix reverse. - ACE_Hash_Map_Const_Reverse_Iterator_Ex operator++ (int); - - /// Prefix advance. - ACE_Hash_Map_Const_Reverse_Iterator_Ex &operator-- (void); - - /// Postfix advance. - ACE_Hash_Map_Const_Reverse_Iterator_Ex operator-- (int); - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; -}; - -/** - * @class ACE_Hash_Map_Manager - * - * @brief Wrapper for backward compatibility. - * - * This implementation of a map uses a hash table. This class - * expects that the contains a method called . - * In addition, the must support . Both of - * these constraints can be alleviated via template - * specialization, as shown in the $ACE_ROOT/tests/Conn_Test.cpp - * test. - * - * Requirements and Performance Characteristics - * - Internal Structure - * Hash Table - * - Duplicates allowed? - * No - * - Random access allowed? - * Yes - * - Search speed - * O(1) - * - Insert/replace speed - * O(1), can be longer if the hash map has to resize - * - Iterator still valid after change to container? - * Yes - * - Frees memory for removed elements? - * Yes - * - Items inserted by - * Value - * - Requirements for key type - * -# Default constructor - * -# Copy constructor - * -# operator= - * -# operator== - * - Requirements for object type - * -# Default constructor - * -# Copy constructor - * -# operator= - * -# operator< - */ -template -class ACE_Hash_Map_Manager : public ACE_Hash_Map_Manager_Ex, ACE_Equal_To, ACE_LOCK> -{ -public: - - /** - * Initialize a @c Hash_Map_Manager with default size elements. - * @param table_alloc is a pointer to a memory allocator used for - * table_, so it should supply size*sizeof (ACE_Hash_Map_Entry). - * @param entry_alloc is a pointer to an additional allocator for - * entries, so it should be able to allocate 'size' / chunks - * of sizeof(ACE_Hash_Map_Entry) bytes each. - * If @c table_alloc is 0 it defaults to @c ACE_Allocator::instance(). - * If @c entry_alloc is 0 then it defaults to the same allocator as - * @c table_alloc. - */ - ACE_Hash_Map_Manager (ACE_Allocator *table_alloc = 0, - ACE_Allocator *entry_alloc = 0); - - /** - * Initialize a @c Hash_Map_Manager with @c size elements. - * @param table_alloc is a pointer to a memory allocator used for - * table_, so it should supply size*sizeof (ACE_Hash_Map_Entry). - * @param entry_alloc is a pointer to an additional allocator for - * entries, so it should be able to allocate 'size' / chunks - * of sizeof(ACE_Hash_Map_Entry) bytes each. - * If @c table_alloc is 0 it defaults to @c ACE_Allocator::instance(). - * If @c entry_alloc is 0 then it defaults to the same allocator as - * @c table_alloc. - */ - ACE_Hash_Map_Manager (size_t size, - ACE_Allocator *table_alloc = 0, - ACE_Allocator *entry_alloc = 0); - - // = The following two are necessary for template specialization of - // ACE_Hash_Map_Manager to work. - int equal (const EXT_ID &id1, const EXT_ID &id2); - u_long hash (const EXT_ID &ext_id); -}; - -/** - * @class ACE_Hash_Map_Iterator - * - * @brief Wrapper for backward compatibility. - */ -template -class ACE_Hash_Map_Iterator : public ACE_Hash_Map_Iterator_Ex, ACE_Equal_To, ACE_LOCK> -{ -public: - // = STL-style traits/typedefs - typedef typename ACE_Hash_Map_Iterator_Ex, ACE_Equal_To, ACE_LOCK>::container_type - container_type; - - typedef typename ACE_Hash_Map_Iterator_Ex, ACE_Equal_To, ACE_LOCK>::iterator_category - iterator_category; - - typedef typename ACE_Hash_Map_Iterator_Ex, ACE_Equal_To, ACE_LOCK>::value_type - value_type; - - typedef typename ACE_Hash_Map_Iterator_Ex, ACE_Equal_To, ACE_LOCK>::reference - reference; - - typedef typename ACE_Hash_Map_Iterator_Ex, ACE_Equal_To, ACE_LOCK>::pointer - pointer; - - typedef typename ACE_Hash_Map_Iterator_Ex, ACE_Equal_To, ACE_LOCK>::difference_type - difference_type; - - // = Initialization method. - /// Construct from map - ACE_Hash_Map_Iterator (ACE_Hash_Map_Manager &mm, - int tail = 0); - - /// Construct from base - ACE_Hash_Map_Iterator (const ACE_Hash_Map_Iterator_Ex, ACE_Equal_To, ACE_LOCK> &base); - - /// Assignment from base - ACE_Hash_Map_Iterator & - operator= (const ACE_Hash_Map_Iterator_Ex, ACE_Equal_To, ACE_LOCK> &base); -}; - -/** - * @class ACE_Hash_Map_Const_Iterator - * - * @brief Wrapper for backward compatibility. - */ -template -class ACE_Hash_Map_Const_Iterator : public ACE_Hash_Map_Const_Iterator_Ex, ACE_Equal_To, ACE_LOCK> -{ -public: - // = STL-style traits/typedefs - typedef typename ACE_Hash_Map_Const_Iterator_Ex, ACE_Equal_To, ACE_LOCK>::container_type - container_type; - - // = std::iterator_traits typedefs - typedef typename ACE_Hash_Map_Const_Iterator_Ex, ACE_Equal_To, ACE_LOCK>::iterator_category - iterator_category; - - typedef typename ACE_Hash_Map_Const_Iterator_Ex, ACE_Equal_To, ACE_LOCK>::value_type - value_type; - - typedef typename ACE_Hash_Map_Const_Iterator_Ex, ACE_Equal_To, ACE_LOCK>::reference - reference; - - typedef typename ACE_Hash_Map_Const_Iterator_Ex, ACE_Equal_To, ACE_LOCK>::pointer - pointer; - - typedef typename ACE_Hash_Map_Const_Iterator_Ex, ACE_Equal_To, ACE_LOCK>::difference_type - difference_type; - - // = Initialization method. - /// Construct from map - ACE_Hash_Map_Const_Iterator (const ACE_Hash_Map_Manager &mm, - int tail = 0); - - /// Construct from base - ACE_Hash_Map_Const_Iterator (const ACE_Hash_Map_Const_Iterator_Ex, ACE_Equal_To, ACE_LOCK> &base); - - /// Assignment from base - ACE_Hash_Map_Const_Iterator & - operator= (const ACE_Hash_Map_Const_Iterator_Ex, ACE_Equal_To, ACE_LOCK> &base); -}; - -/** - * @class ACE_Hash_Map_Reverse_Iterator - * - * @brief Wrapper for backward compatibility. - */ -template -class ACE_Hash_Map_Reverse_Iterator : public ACE_Hash_Map_Reverse_Iterator_Ex, ACE_Equal_To, ACE_LOCK> -{ -public: - // = STL-style traits/typedefs - typedef typename ACE_Hash_Map_Reverse_Iterator_Ex, ACE_Equal_To, ACE_LOCK>::container_type - container_type; - - // = std::iterator_traits typedefs - typedef typename ACE_Hash_Map_Reverse_Iterator_Ex, ACE_Equal_To, ACE_LOCK>::iterator_category - iterator_category; - - typedef typename ACE_Hash_Map_Reverse_Iterator_Ex, ACE_Equal_To, ACE_LOCK>::value_type - value_type; - - typedef typename ACE_Hash_Map_Reverse_Iterator_Ex, ACE_Equal_To, ACE_LOCK>::reference - reference; - - typedef typename ACE_Hash_Map_Reverse_Iterator_Ex, ACE_Equal_To, ACE_LOCK>::pointer - pointer; - - typedef typename ACE_Hash_Map_Reverse_Iterator_Ex, ACE_Equal_To, ACE_LOCK>::difference_type - difference_type; - - // = Initialization method. - ACE_Hash_Map_Reverse_Iterator (ACE_Hash_Map_Manager &mm, - bool head = false); - - /// Construct from base - ACE_Hash_Map_Reverse_Iterator (const ACE_Hash_Map_Reverse_Iterator_Ex, ACE_Equal_To, ACE_LOCK> &base); - - /// Assignment from base - ACE_Hash_Map_Reverse_Iterator & - operator= (const ACE_Hash_Map_Reverse_Iterator_Ex, ACE_Equal_To, ACE_LOCK> &base); -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -# include "ace/Hash_Map_Manager_T.inl" -#endif /* __ACE_INLINE__ */ - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "ace/Hash_Map_Manager_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Hash_Map_Manager_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ - -#include /**/ "ace/post.h" -#endif /* ACE_HASH_MAP_MANAGER_T_H */ diff --git a/modules/worldengine/deps/acelite/ace/Hash_Map_Manager_T.inl b/modules/worldengine/deps/acelite/ace/Hash_Map_Manager_T.inl deleted file mode 100644 index c112e3d543..0000000000 --- a/modules/worldengine/deps/acelite/ace/Hash_Map_Manager_T.inl +++ /dev/null @@ -1,1243 +0,0 @@ -// -*- C++ -*- -#include "ace/Guard_T.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -template ACE_INLINE -ACE_Hash_Map_Manager_Ex::ACE_Hash_Map_Manager_Ex (size_t size, - ACE_Allocator *table_alloc, - ACE_Allocator *entry_alloc) - : table_allocator_ (table_alloc), - entry_allocator_ (entry_alloc), - table_ (0), - total_size_ (0), - cur_size_ (0) -{ - if (this->open (size, table_alloc, entry_alloc) == -1) - ACELIB_ERROR ((LM_ERROR, ACE_TEXT ("ACE_Hash_Map_Manager_Ex\n"))); -} - -template ACE_INLINE -ACE_Hash_Map_Manager_Ex::ACE_Hash_Map_Manager_Ex (ACE_Allocator *table_alloc, - ACE_Allocator *entry_alloc) - : table_allocator_ (table_alloc), - entry_allocator_ (entry_alloc), - table_ (0), - total_size_ (0), - cur_size_ (0) -{ - if (this->open (ACE_DEFAULT_MAP_SIZE, table_alloc, entry_alloc) == -1) - ACELIB_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), - ACE_TEXT ("ACE_Hash_Map_Manager_Ex open"))); -} - -template ACE_INLINE int -ACE_Hash_Map_Manager_Ex::close (void) -{ - ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1); - - return this->close_i (); -} - -template ACE_INLINE int -ACE_Hash_Map_Manager_Ex::unbind_all (void) -{ - ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1); - - return this->unbind_all_i (); -} - -template ACE_INLINE -ACE_Hash_Map_Manager_Ex::~ACE_Hash_Map_Manager_Ex (void) -{ - this->close (); -} - -template ACE_INLINE size_t -ACE_Hash_Map_Manager_Ex::current_size (void) const -{ - return this->cur_size_; -} - -template ACE_INLINE size_t -ACE_Hash_Map_Manager_Ex::total_size (void) const -{ - return this->total_size_; -} - -template ACE_INLINE ACE_LOCK & -ACE_Hash_Map_Manager_Ex::mutex (void) -{ - ACE_TRACE ("ACE_Hash_Map_Manager_Ex::mutex"); - return this->lock_; -} - -template ACE_INLINE u_long -ACE_Hash_Map_Manager_Ex::hash (const EXT_ID &ext_id) -{ - return this->hash_key_ (ext_id); -} - -template ACE_INLINE int -ACE_Hash_Map_Manager_Ex::equal (const EXT_ID &id1, - const EXT_ID &id2) -{ - return this->compare_keys_ (id1, id2); -} - -template ACE_INLINE int -ACE_Hash_Map_Manager_Ex::bind_i (const EXT_ID &ext_id, - const INT_ID &int_id) -{ - ACE_Hash_Map_Entry *temp; - - return this->bind_i (ext_id, int_id, temp); -} - -template ACE_INLINE int -ACE_Hash_Map_Manager_Ex::bind (const EXT_ID &ext_id, - const INT_ID &int_id) -{ - ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1); - - return this->bind_i (ext_id, int_id); -} - -template ACE_INLINE int -ACE_Hash_Map_Manager_Ex::bind (const EXT_ID &ext_id, - const INT_ID &int_id, - ACE_Hash_Map_Entry *&entry) -{ - ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1); - - return this->bind_i (ext_id, int_id, entry); -} - -template ACE_INLINE int -ACE_Hash_Map_Manager_Ex::trybind_i (const EXT_ID &ext_id, - INT_ID &int_id) -{ - ACE_Hash_Map_Entry *temp = 0; - - int result = this->trybind_i (ext_id, int_id, temp); - if (result == 1) - int_id = temp->int_id_; - return result; -} - -template ACE_INLINE int -ACE_Hash_Map_Manager_Ex::trybind (const EXT_ID &ext_id, - INT_ID &int_id) -{ - ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1); - - return this->trybind_i (ext_id, int_id); -} - -template ACE_INLINE int -ACE_Hash_Map_Manager_Ex::trybind (const EXT_ID &ext_id, - INT_ID &int_id, - ACE_Hash_Map_Entry *&entry) -{ - ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1); - - return this->trybind_i (ext_id, int_id, entry); -} - -template ACE_INLINE int -ACE_Hash_Map_Manager_Ex::unbind_i (const EXT_ID &ext_id) -{ - INT_ID int_id; - - return this->unbind_i (ext_id, int_id); -} - -template ACE_INLINE int -ACE_Hash_Map_Manager_Ex::unbind (const EXT_ID &ext_id, - INT_ID &int_id) -{ - ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1); - - return this->unbind_i (ext_id, int_id); -} - -template -ACE_INLINE int -ACE_Hash_Map_Manager_Ex::unbind ( - typename ACE_Hash_Map_Manager_Ex::iterator pos) -{ - return this->unbind (&(*pos)); -} - -template ACE_INLINE int -ACE_Hash_Map_Manager_Ex::unbind (const EXT_ID &ext_id) -{ - ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1); - - return this->unbind_i (ext_id) == -1 ? -1 : 0; -} - -template ACE_INLINE int -ACE_Hash_Map_Manager_Ex::unbind (ACE_Hash_Map_Entry *entry) -{ - ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1); - - return this->unbind_i (entry) == -1 ? -1 : 0; -} - -template ACE_INLINE int -ACE_Hash_Map_Manager_Ex::find_i (const EXT_ID &ext_id, - INT_ID &int_id) -{ - ACE_Hash_Map_Entry *entry = 0; - - size_t dummy; - if (this->shared_find (ext_id, entry, dummy) == -1) - return -1; - else - { - int_id = entry->int_id_; - return 0; - } -} - -template ACE_INLINE int -ACE_Hash_Map_Manager_Ex::find_i (const EXT_ID &ext_id) -{ - ACE_Hash_Map_Entry *entry; - - size_t dummy; - return this->shared_find (ext_id, entry, dummy); -} - -template ACE_INLINE int -ACE_Hash_Map_Manager_Ex::find (const EXT_ID &ext_id, - INT_ID &int_id) const -{ - ACE_Hash_Map_Manager_Ex *nc_this = - const_cast *> - (this); - - ACE_READ_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1); - - return nc_this->find_i (ext_id, int_id); -} - -template ACE_INLINE int -ACE_Hash_Map_Manager_Ex::find (const EXT_ID &ext_id) const -{ - ACE_Hash_Map_Manager_Ex *nc_this = - const_cast *> - (this); - - ACE_READ_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1); - - return nc_this->find_i (ext_id); -} - -template ACE_INLINE int -ACE_Hash_Map_Manager_Ex::find_i (const EXT_ID &ext_id, - ACE_Hash_Map_Entry *&entry) -{ - size_t dummy; - return this->shared_find (ext_id, entry, dummy); -} - -template ACE_INLINE int -ACE_Hash_Map_Manager_Ex::find (const EXT_ID &ext_id, - ACE_Hash_Map_Entry *&entry) const -{ - ACE_Hash_Map_Manager_Ex *nc_this = - const_cast *> - (this); - - ACE_READ_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1); - - return nc_this->find_i (ext_id, entry); -} - -template ACE_INLINE int -ACE_Hash_Map_Manager_Ex::rebind_i (const EXT_ID &ext_id, - const INT_ID &int_id) -{ - ACE_Hash_Map_Entry *node = 0; - - return this->rebind_i (ext_id, - int_id, - node); -} - -template ACE_INLINE int -ACE_Hash_Map_Manager_Ex::rebind_i (const EXT_ID &ext_id, - const INT_ID &int_id, - INT_ID &old_int_id) -{ - ACE_Hash_Map_Entry *node = 0; - - return this->rebind_i (ext_id, - int_id, - old_int_id, - node); -} - -template ACE_INLINE int -ACE_Hash_Map_Manager_Ex::rebind_i (const EXT_ID &ext_id, - const INT_ID &int_id, - EXT_ID &old_ext_id, - INT_ID &old_int_id) -{ - ACE_Hash_Map_Entry *node = 0; - - return this->rebind_i (ext_id, - int_id, - old_ext_id, - old_int_id, - node); -} - -template ACE_INLINE int -ACE_Hash_Map_Manager_Ex::rebind (const EXT_ID &ext_id, - const INT_ID &int_id) -{ - ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1); - - return this->rebind_i (ext_id, int_id); -} - -template ACE_INLINE int -ACE_Hash_Map_Manager_Ex::rebind (const EXT_ID &ext_id, - const INT_ID &int_id, - ACE_Hash_Map_Entry *&entry) -{ - ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1); - - return this->rebind_i (ext_id, int_id, entry); -} - -template ACE_INLINE int -ACE_Hash_Map_Manager_Ex::rebind (const EXT_ID &ext_id, - const INT_ID &int_id, - INT_ID &old_int_id) -{ - ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1); - - return this->rebind_i (ext_id, int_id, old_int_id); -} - -template ACE_INLINE int -ACE_Hash_Map_Manager_Ex::rebind (const EXT_ID &ext_id, - const INT_ID &int_id, - INT_ID &old_int_id, - ACE_Hash_Map_Entry *&entry) -{ - ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1); - - return this->rebind_i (ext_id, int_id, old_int_id, entry); -} - -template ACE_INLINE int -ACE_Hash_Map_Manager_Ex::rebind (const EXT_ID &ext_id, - const INT_ID &int_id, - EXT_ID &old_ext_id, - INT_ID &old_int_id) -{ - ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1); - - return this->rebind_i (ext_id, int_id, old_ext_id, old_int_id); -} - -template ACE_INLINE int -ACE_Hash_Map_Manager_Ex::rebind (const EXT_ID &ext_id, - const INT_ID &int_id, - EXT_ID &old_ext_id, - INT_ID &old_int_id, - ACE_Hash_Map_Entry *&entry) -{ - ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1); - - return this->rebind_i (ext_id, int_id, old_ext_id, old_int_id, entry); -} - -template ACE_INLINE -typename ACE_Hash_Map_Manager_Ex::iterator -ACE_Hash_Map_Manager_Ex::begin (void) -{ - return iterator (*this); -} - -template ACE_INLINE -typename ACE_Hash_Map_Manager_Ex::iterator -ACE_Hash_Map_Manager_Ex::end (void) -{ - return iterator (*this, 1); -} - -template ACE_INLINE -typename ACE_Hash_Map_Manager_Ex::const_iterator -ACE_Hash_Map_Manager_Ex::begin (void) const -{ - return const_iterator (*this); -} - -template ACE_INLINE -typename ACE_Hash_Map_Manager_Ex::const_iterator -ACE_Hash_Map_Manager_Ex::end (void) const -{ - return const_iterator (*this, 1); -} - -template ACE_INLINE -typename ACE_Hash_Map_Manager_Ex::reverse_iterator -ACE_Hash_Map_Manager_Ex::rbegin (void) -{ - return reverse_iterator (*this); -} - -template ACE_INLINE -typename ACE_Hash_Map_Manager_Ex::reverse_iterator -ACE_Hash_Map_Manager_Ex::rend (void) -{ - return reverse_iterator (*this, 1); -} - - template ACE_INLINE - typename ACE_Hash_Map_Manager_Ex::const_reverse_iterator - ACE_Hash_Map_Manager_Ex::rbegin (void) const - { - return const_reverse_iterator (*this); - } - - template ACE_INLINE - typename ACE_Hash_Map_Manager_Ex::const_reverse_iterator - ACE_Hash_Map_Manager_Ex::rend (void) const - { - return const_reverse_iterator (*this, 1); - } - -template ACE_INLINE -ACE_Hash_Map_Entry * -ACE_Hash_Map_Manager_Ex::table (void) -{ - return this->table_; -} - -template -ACE_INLINE void -ACE_Hash_Map_Manager_Ex::find ( - EXT_ID const &ext_id, - typename ACE_Hash_Map_Manager_Ex::iterator & pos) const -{ - ENTRY * entry = 0; - size_t index = 0; - - ACE_Hash_Map_Manager_Ex *nc_this = - const_cast *> - (this); - - ACE_READ_GUARD (ACE_LOCK, ace_mon, this->lock_); - - if (nc_this->shared_find (ext_id, entry, index) != -1) - pos = iterator (*nc_this, entry, index); - else - pos = nc_this->end (); -} - -// --------------------------------------------------------------------- - -template -ACE_INLINE -ACE_Hash_Map_Iterator_Base_Ex::ACE_Hash_Map_Iterator_Base_Ex ( - ACE_Hash_Map_Manager_Ex &mm, - bool head) - : map_man_ (&mm), - index_ (head ? -1 : (ssize_t) mm.total_size_), - next_ (0) -{ - if (mm.table_ != 0) - this->next_ = &mm.table_[head ? 0 : mm.total_size_ - 1]; -} - -template -ACE_INLINE -ACE_Hash_Map_Iterator_Base_Ex::ACE_Hash_Map_Iterator_Base_Ex ( - ACE_Hash_Map_Manager_Ex & mm, - ACE_Hash_Map_Entry * entry, - size_t index) - : map_man_ (&mm) - , index_ (static_cast (index)) - , next_ (entry) -{ -} - -template ACE_INLINE int -ACE_Hash_Map_Iterator_Base_Ex::next (ACE_Hash_Map_Entry *&entry) const -{ - ACE_TRACE ("ACE_Hash_Map_Iterator_Base_Ex::next"); - - if (this->map_man_->table_ != 0 - && this->index_ < static_cast (this->map_man_->total_size_) - && this->index_ >= 0 - && this->next_ != &this->map_man_->table_[this->index_]) - { - entry = this->next_; - return 1; - } - else - return 0; -} - -template ACE_INLINE int -ACE_Hash_Map_Iterator_Base_Ex::done (void) const -{ - ACE_TRACE ("ACE_Hash_Map_Iterator_Base_Ex::done"); - - return this->map_man_->table_ == 0 - || this->index_ >= static_cast (this->map_man_->total_size_) - || this->index_ < 0; -} - -template ACE_INLINE -ACE_Hash_Map_Entry & -ACE_Hash_Map_Iterator_Base_Ex::operator* (void) const -{ - ACE_TRACE ("ACE_Hash_Map_Iterator_Base_Ex::operator*"); - ACE_Hash_Map_Entry *retv = 0; - - int result = this->next (retv); - - ACE_UNUSED_ARG (result); - ACE_ASSERT (result != 0); - - return *retv; -} - -template ACE_INLINE -ACE_Hash_Map_Entry * -ACE_Hash_Map_Iterator_Base_Ex::operator-> (void) const -{ - ACE_TRACE ("ACE_Hash_Map_Iterator_Base_Ex::operator->"); - ACE_Hash_Map_Entry *retv = 0; - - int result = this->next (retv); - - ACE_UNUSED_ARG (result); - ACE_ASSERT (result != 0); - - return retv; -} - -// Returns the reference to the hash_map_manager_ex that is being -// iterated over. -template ACE_INLINE -ACE_Hash_Map_Manager_Ex& -ACE_Hash_Map_Iterator_Base_Ex::map (void) -{ - ACE_TRACE ("ACE_Hash_Map_Iterator_Base_Ex::map"); - return *this->map_man_; -} - -template ACE_INLINE bool -ACE_Hash_Map_Iterator_Base_Ex::operator== (const ACE_Hash_Map_Iterator_Base_Ex &rhs) const -{ - ACE_TRACE ("ACE_Hash_Map_Iterator_Base_Ex::operator=="); - return this->map_man_ == rhs.map_man_ - && this->index_ == rhs.index_ - && this->next_ == rhs.next_; -} - -template ACE_INLINE bool -ACE_Hash_Map_Iterator_Base_Ex::operator!= (const ACE_Hash_Map_Iterator_Base_Ex &rhs) const -{ - ACE_TRACE ("ACE_Hash_Map_Iterator_Base_Ex::operator!="); - return this->next_ != rhs.next_ - || this->index_ != rhs.index_ - || this->map_man_ != rhs.map_man_; -} - -template ACE_INLINE -ACE_Hash_Map_Const_Iterator_Base_Ex::ACE_Hash_Map_Const_Iterator_Base_Ex (const ACE_Hash_Map_Manager_Ex &mm, - bool head) - : map_man_ (&mm), - index_ (head ? -1 : (ssize_t) mm.total_size_), - next_ (0) -{ - ACE_TRACE ("ACE_Hash_Map_Const_Iterator_Base_Ex::ACE_Hash_Map_Const_Iterator_Base_Ex"); - - if (mm.table_ != 0) - this->next_ = &mm.table_[head ? 0 : mm.total_size_ - 1]; -} - -template ACE_INLINE int -ACE_Hash_Map_Const_Iterator_Base_Ex::next (ACE_Hash_Map_Entry *&entry) const -{ - ACE_TRACE ("ACE_Hash_Map_Const_Iterator_Base_Ex::next"); - - if (this->map_man_->table_ != 0 - && this->index_ < (ssize_t) this->map_man_->total_size_ - && this->index_ >= 0 - && this->next_ != &this->map_man_->table_[this->index_]) - { - entry = this->next_; - return 1; - } - else - return 0; -} - -template ACE_INLINE int -ACE_Hash_Map_Const_Iterator_Base_Ex::done (void) const -{ - ACE_TRACE ("ACE_Hash_Map_Const_Iterator_Base_Ex::done"); - - return this->map_man_->table_ == 0 - || this->index_ >= (ssize_t) this->map_man_->total_size_ - || this->index_ < 0; -} - -template ACE_INLINE -ACE_Hash_Map_Entry & -ACE_Hash_Map_Const_Iterator_Base_Ex::operator* (void) const -{ - ACE_TRACE ("ACE_Hash_Map_Const_Iterator_Base_Ex::operator*"); - ACE_Hash_Map_Entry *retv = 0; - - int result = this->next (retv); - - ACE_UNUSED_ARG (result); - ACE_ASSERT (result != 0); - - return *retv; -} - -template ACE_INLINE -ACE_Hash_Map_Entry * -ACE_Hash_Map_Const_Iterator_Base_Ex::operator-> (void) const -{ - ACE_TRACE ("ACE_Hash_Map_Const_Iterator_Base_Ex::operator->"); - ACE_Hash_Map_Entry *retv = 0; - - int result = this->next (retv); - - ACE_UNUSED_ARG (result); - ACE_ASSERT (result != 0); - - return retv; -} - -// Returns the reference to the hash_map_manager_ex that is being -// iterated over. -template ACE_INLINE -const ACE_Hash_Map_Manager_Ex& -ACE_Hash_Map_Const_Iterator_Base_Ex::map (void) -{ - ACE_TRACE ("ACE_Hash_Map_Const_Iterator_Base_Ex::map"); - return *this->map_man_; -} - -template ACE_INLINE bool -ACE_Hash_Map_Const_Iterator_Base_Ex::operator== (const ACE_Hash_Map_Const_Iterator_Base_Ex &rhs) const -{ - ACE_TRACE ("ACE_Hash_Map_Const_Iterator_Base_Ex::operator=="); - return this->map_man_ == rhs.map_man_ - && this->index_ == rhs.index_ - && this->next_ == rhs.next_; -} - -template ACE_INLINE bool -ACE_Hash_Map_Const_Iterator_Base_Ex::operator!= (const ACE_Hash_Map_Const_Iterator_Base_Ex &rhs) const -{ - ACE_TRACE ("ACE_Hash_Map_Const_Iterator_Base_Ex::operator!="); - return this->next_ != rhs.next_ - || this->index_ != rhs.index_ - || this->map_man_ != rhs.map_man_; -} - -ACE_ALLOC_HOOK_DEFINE(ACE_Hash_Map_Iterator_Ex) - -template ACE_INLINE void -ACE_Hash_Map_Iterator_Ex::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_Hash_Map_Iterator_Ex::dump"); - - this->dump_i (); -#endif /* ACE_HAS_DUMP */ -} - -template ACE_INLINE -ACE_Hash_Map_Iterator_Ex::ACE_Hash_Map_Iterator_Ex (ACE_Hash_Map_Manager_Ex &mm, - int tail) - : ACE_Hash_Map_Iterator_Base_Ex (mm, - tail == 0 ? 1 : 0) -{ - ACE_TRACE ("ACE_Hash_Map_Iterator_Ex::ACE_Hash_Map_Iterator_Ex"); - if (tail == 0) - this->forward_i (); -} - -template -ACE_INLINE -ACE_Hash_Map_Iterator_Ex::ACE_Hash_Map_Iterator_Ex ( - ACE_Hash_Map_Manager_Ex & mm, - ACE_Hash_Map_Entry * entry, - size_t index) - : ACE_Hash_Map_Iterator_Base_Ex (mm, - entry, - index) -{ -} - -template ACE_INLINE int -ACE_Hash_Map_Iterator_Ex::advance (void) -{ - ACE_TRACE ("ACE_Hash_Map_Iterator_Ex::advance"); - return this->forward_i (); -} - -template ACE_INLINE -ACE_Hash_Map_Iterator_Ex & -ACE_Hash_Map_Iterator_Ex::operator++ (void) -{ - ACE_TRACE ("ACE_Hash_Map_Iterator_Ex::operator++ (void)"); - - this->forward_i (); - return *this; -} - -template ACE_INLINE -ACE_Hash_Map_Iterator_Ex -ACE_Hash_Map_Iterator_Ex::operator++ (int) -{ - ACE_TRACE ("ACE_Hash_Map_Iterator_Ex::operator++ (int)"); - - ACE_Hash_Map_Iterator_Ex retv (*this); - ++*this; - return retv; -} - -template ACE_INLINE -ACE_Hash_Map_Iterator_Ex & -ACE_Hash_Map_Iterator_Ex::operator-- (void) -{ - ACE_TRACE ("ACE_Hash_Map_Iterator_Ex::operator-- (void)"); - - this->reverse_i (); - return *this; -} - -template ACE_INLINE -ACE_Hash_Map_Iterator_Ex -ACE_Hash_Map_Iterator_Ex::operator-- (int) -{ - ACE_TRACE ("ACE_Hash_Map_Iterator_Ex::operator-- (int)"); - - ACE_Hash_Map_Iterator_Ex retv (*this); - --*this; - return retv; -} - -ACE_ALLOC_HOOK_DEFINE(ACE_Hash_Map_Const_Iterator_Ex) - -template ACE_INLINE void -ACE_Hash_Map_Const_Iterator_Ex::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_Hash_Map_Const_Iterator_Ex::dump"); - - this->dump_i (); -#endif /* ACE_HAS_DUMP */ -} - -template ACE_INLINE -ACE_Hash_Map_Const_Iterator_Ex::ACE_Hash_Map_Const_Iterator_Ex (const ACE_Hash_Map_Manager_Ex &mm, - int tail) - : ACE_Hash_Map_Const_Iterator_Base_Ex (mm, - tail == 0 ? 1 : 0) -{ - ACE_TRACE ("ACE_Hash_Map_Const_Iterator_Ex::ACE_Hash_Map_Const_Iterator_Ex"); - if (tail == 0) - this->forward_i (); -} - -template ACE_INLINE int -ACE_Hash_Map_Const_Iterator_Ex::advance (void) -{ - ACE_TRACE ("ACE_Hash_Map_Const_Iterator_Ex::advance"); - return this->forward_i (); -} - -template ACE_INLINE -ACE_Hash_Map_Const_Iterator_Ex & -ACE_Hash_Map_Const_Iterator_Ex::operator++ (void) -{ - ACE_TRACE ("ACE_Hash_Map_Const_Iterator_Ex::operator++ (void)"); - - this->forward_i (); - return *this; -} - -template ACE_INLINE -ACE_Hash_Map_Const_Iterator_Ex -ACE_Hash_Map_Const_Iterator_Ex::operator++ (int) -{ - ACE_TRACE ("ACE_Hash_Map_Const_Iterator_Ex::operator++ (int)"); - - ACE_Hash_Map_Const_Iterator_Ex retv (*this); - ++*this; - return retv; -} - -template ACE_INLINE -ACE_Hash_Map_Const_Iterator_Ex & -ACE_Hash_Map_Const_Iterator_Ex::operator-- (void) -{ - ACE_TRACE ("ACE_Hash_Map_Const_Iterator_Ex::operator-- (void)"); - - this->reverse_i (); - return *this; -} - -template ACE_INLINE -ACE_Hash_Map_Const_Iterator_Ex -ACE_Hash_Map_Const_Iterator_Ex::operator-- (int) -{ - ACE_TRACE ("ACE_Hash_Map_Const_Iterator_Ex::operator-- (int)"); - - ACE_Hash_Map_Const_Iterator_Ex retv (*this); - --*this; - return retv; -} - -template ACE_INLINE -ACE_Hash_Map_Bucket_Iterator::ACE_Hash_Map_Bucket_Iterator (ACE_Hash_Map_Manager_Ex &mm, - const EXT_ID &ext_id, - int tail) - : map_man_ (&mm) -{ - ACE_TRACE ("ACE_Hash_Map_Bucket_Iterator::ACE_Hash_Map_Bucket_Iterator"); - - this->index_ = this->map_man_->hash (ext_id) % this->map_man_->total_size_; - this->next_ = &this->map_man_->table_[this->index_]; - - if (tail == 0) - this->forward_i (); -} - -template ACE_INLINE -ACE_Hash_Map_Bucket_Iterator & -ACE_Hash_Map_Bucket_Iterator::operator++ (void) -{ - ACE_TRACE ("ACE_Hash_Map_Bucket_Iterator::operator++ (void)"); - - this->forward_i (); - return *this; -} - -template ACE_INLINE -ACE_Hash_Map_Bucket_Iterator -ACE_Hash_Map_Bucket_Iterator::operator++ (int) -{ - ACE_TRACE ("ACE_Hash_Map_Bucket_Iterator::operator++ (int)"); - - ACE_Hash_Map_Bucket_Iterator retv (*this); - ++*this; - return retv; -} - -template ACE_INLINE -ACE_Hash_Map_Bucket_Iterator & -ACE_Hash_Map_Bucket_Iterator::operator-- (void) -{ - ACE_TRACE ("ACE_Hash_Map_Bucket_Iterator::operator-- (void)"); - - this->reverse_i (); - return *this; -} - -template ACE_INLINE -ACE_Hash_Map_Bucket_Iterator -ACE_Hash_Map_Bucket_Iterator::operator-- (int) -{ - ACE_TRACE ("ACE_Hash_Map_Bucket_Iterator::operator-- (int)"); - - ACE_Hash_Map_Bucket_Iterator retv (*this); - --*this; - return retv; -} - -template int -ACE_Hash_Map_Bucket_Iterator::forward_i (void) -{ - ACE_TRACE ("ACE_Hash_Map_Bucket_Iterator::forward_i"); - - this->next_ = this->next_->next_; - return this->next_ != &this->map_man_->table_[this->index_]; -} - -template int -ACE_Hash_Map_Bucket_Iterator::reverse_i (void) -{ - ACE_TRACE ("ACE_Hash_Map_Bucket_Iterator::reverse_i"); - - this->next_ = this->next_->prev_; - return this->next_ != &this->map_man_->table_[this->index_]; -} - -template ACE_INLINE -ACE_Hash_Map_Entry & -ACE_Hash_Map_Bucket_Iterator::operator* (void) const -{ - ACE_TRACE ("ACE_Hash_Map_Bucket_Iterator::operator*"); - - return *this->next_; -} - -template ACE_INLINE -ACE_Hash_Map_Entry * -ACE_Hash_Map_Bucket_Iterator::operator-> (void) const -{ - ACE_TRACE ("ACE_Hash_Map_Bucket_Iterator::operator->"); - - return this->next_; -} - -template ACE_INLINE -ACE_Hash_Map_Manager_Ex & -ACE_Hash_Map_Bucket_Iterator::map (void) -{ - ACE_TRACE ("ACE_Hash_Map_Bucket_Iterator::map"); - return *this->map_man_; -} - -template ACE_INLINE bool -ACE_Hash_Map_Bucket_Iterator::operator== (const ACE_Hash_Map_Bucket_Iterator &rhs) const -{ - ACE_TRACE ("ACE_Hash_Map_Bucket_Iterator::operator=="); - return this->map_man_ == rhs.map_man_ - && this->index_ == rhs.index_ - && this->next_ == rhs.next_; -} - -template ACE_INLINE bool -ACE_Hash_Map_Bucket_Iterator::operator!= (const ACE_Hash_Map_Bucket_Iterator &rhs) const -{ - ACE_TRACE ("ACE_Hash_Map_Bucket_Iterator::operator!="); - return this->next_ != rhs.next_ - || this->index_ != rhs.index_ - || this->map_man_ != rhs.map_man_; -} - -ACE_ALLOC_HOOK_DEFINE(ACE_Hash_Map_Reverse_Iterator_Ex) - -template ACE_INLINE void -ACE_Hash_Map_Reverse_Iterator_Ex::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_Hash_Map_Reverse_Iterator_Ex::dump"); - - this->dump_i (); -#endif /* ACE_HAS_DUMP */ -} - -template ACE_INLINE -ACE_Hash_Map_Reverse_Iterator_Ex::ACE_Hash_Map_Reverse_Iterator_Ex (ACE_Hash_Map_Manager_Ex &mm, bool head) - : ACE_Hash_Map_Iterator_Base_Ex (mm, head) -{ - ACE_TRACE ("ACE_Hash_Map_Reverse_Iterator_Ex::ACE_Hash_Map_Reverse_Iterator_Ex"); - if (!head) - this->reverse_i (); -} - -template ACE_INLINE int -ACE_Hash_Map_Reverse_Iterator_Ex::advance (void) -{ - ACE_TRACE ("ACE_Hash_Map_Reverse_Iterator_Ex::advance"); - return this->reverse_i (); -} - -template ACE_INLINE -ACE_Hash_Map_Reverse_Iterator_Ex & -ACE_Hash_Map_Reverse_Iterator_Ex::operator++ (void) -{ - ACE_TRACE ("ACE_Hash_Map_Reverse_Iterator_Ex::operator++ (void)"); - - this->reverse_i (); - return *this; -} - -template ACE_INLINE -ACE_Hash_Map_Reverse_Iterator_Ex -ACE_Hash_Map_Reverse_Iterator_Ex::operator++ (int) -{ - ACE_TRACE ("ACE_Hash_Map_Reverse_Iterator_Ex::operator++ (int)"); - - ACE_Hash_Map_Reverse_Iterator_Ex retv (*this); - ++*this; - return retv; -} - -template ACE_INLINE -ACE_Hash_Map_Reverse_Iterator_Ex & -ACE_Hash_Map_Reverse_Iterator_Ex::operator-- (void) -{ - ACE_TRACE ("ACE_Hash_Map_Reverse_Iterator_Ex::operator-- (void)"); - - this->forward_i (); - return *this; -} - -template ACE_INLINE -ACE_Hash_Map_Reverse_Iterator_Ex -ACE_Hash_Map_Reverse_Iterator_Ex::operator-- (int) -{ - ACE_TRACE ("ACE_Hash_Map_Reverse_Iterator_Ex::operator-- (int)"); - - ACE_Hash_Map_Reverse_Iterator_Ex retv (*this); - --*this; - return retv; -} - -ACE_ALLOC_HOOK_DEFINE(ACE_Hash_Map_Const_Reverse_Iterator_Ex) - -template ACE_INLINE void -ACE_Hash_Map_Const_Reverse_Iterator_Ex::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_Hash_Map_Const_Reverse_Iterator_Ex::dump"); - - this->dump_i (); -#endif /* ACE_HAS_DUMP */ -} - -template ACE_INLINE -ACE_Hash_Map_Const_Reverse_Iterator_Ex::ACE_Hash_Map_Const_Reverse_Iterator_Ex (const ACE_Hash_Map_Manager_Ex &mm, bool head) - : ACE_Hash_Map_Const_Iterator_Base_Ex (mm, head) -{ - ACE_TRACE ("ACE_Hash_Map_Const_Reverse_Iterator_Ex::ACE_Hash_Map_Const_Reverse_Iterator_Ex"); - if (!head) - this->reverse_i (); -} - -template ACE_INLINE int -ACE_Hash_Map_Const_Reverse_Iterator_Ex::advance (void) -{ - ACE_TRACE ("ACE_Hash_Map_Const_Reverse_Iterator_Ex::advance"); - return this->reverse_i (); -} - -template ACE_INLINE -ACE_Hash_Map_Const_Reverse_Iterator_Ex & -ACE_Hash_Map_Const_Reverse_Iterator_Ex::operator++ (void) -{ - ACE_TRACE ("ACE_Hash_Map_Const_Reverse_Iterator_Ex::operator++ (void)"); - - this->reverse_i (); - return *this; -} - -template ACE_INLINE -ACE_Hash_Map_Const_Reverse_Iterator_Ex -ACE_Hash_Map_Const_Reverse_Iterator_Ex::operator++ (int) -{ - ACE_TRACE ("ACE_Hash_Map_Const_Reverse_Iterator_Ex::operator++ (int)"); - - ACE_Hash_Map_Const_Reverse_Iterator_Ex retv (*this); - ++*this; - return retv; -} - -template ACE_INLINE -ACE_Hash_Map_Const_Reverse_Iterator_Ex & -ACE_Hash_Map_Const_Reverse_Iterator_Ex::operator-- (void) -{ - ACE_TRACE ("ACE_Hash_Map_Const_Reverse_Iterator_Ex::operator-- (void)"); - - this->forward_i (); - return *this; -} - -template ACE_INLINE -ACE_Hash_Map_Const_Reverse_Iterator_Ex -ACE_Hash_Map_Const_Reverse_Iterator_Ex::operator-- (int) -{ - ACE_TRACE ("ACE_Hash_Map_Const_Reverse_Iterator_Ex::operator-- (int)"); - - ACE_Hash_Map_Const_Reverse_Iterator_Ex retv (*this); - --*this; - return retv; -} - -template -ACE_Hash_Map_Manager::ACE_Hash_Map_Manager (ACE_Allocator *table_alloc, - ACE_Allocator *entry_alloc) - : ACE_Hash_Map_Manager_Ex, ACE_Equal_To, ACE_LOCK> (table_alloc, - entry_alloc) -{ -} - -template -ACE_Hash_Map_Manager::ACE_Hash_Map_Manager (size_t size, - ACE_Allocator *table_alloc, - ACE_Allocator *entry_alloc) - : ACE_Hash_Map_Manager_Ex, ACE_Equal_To, ACE_LOCK> (size, - table_alloc, - entry_alloc) -{ -} - -template int -ACE_Hash_Map_Manager::equal (const EXT_ID &id1, const EXT_ID &id2) -{ - return ACE_Hash_Map_Manager_Ex, ACE_Equal_To, ACE_LOCK>::equal (id1, id2); -} - -template u_long -ACE_Hash_Map_Manager::hash (const EXT_ID &ext_id) -{ - return ACE_Hash_Map_Manager_Ex, ACE_Equal_To, ACE_LOCK>::hash (ext_id); -} - -template -ACE_Hash_Map_Iterator::ACE_Hash_Map_Iterator (ACE_Hash_Map_Manager &mm, - int tail) - : ACE_Hash_Map_Iterator_Ex, ACE_Equal_To, ACE_LOCK> (mm, - tail) -{ -} - -template -ACE_Hash_Map_Iterator::ACE_Hash_Map_Iterator (const ACE_Hash_Map_Iterator_Ex, ACE_Equal_To, ACE_LOCK> &base) - : ACE_Hash_Map_Iterator_Ex, ACE_Equal_To, ACE_LOCK> (base) -{ -} - -template ACE_Hash_Map_Iterator & -ACE_Hash_Map_Iterator::operator= (const ACE_Hash_Map_Iterator_Ex, ACE_Equal_To, ACE_LOCK> &rhs) -{ - if (this != &rhs) - { - ACE_Hash_Map_Iterator_Ex, ACE_Equal_To, ACE_LOCK> &base = *this; - - base = rhs; - } - - return *this; -} - -template -ACE_Hash_Map_Const_Iterator::ACE_Hash_Map_Const_Iterator (const ACE_Hash_Map_Manager &mm, - int tail) - : ACE_Hash_Map_Const_Iterator_Ex, ACE_Equal_To, ACE_LOCK> (mm, - tail) -{ -} - -template -ACE_Hash_Map_Const_Iterator::ACE_Hash_Map_Const_Iterator (const ACE_Hash_Map_Const_Iterator_Ex, ACE_Equal_To, ACE_LOCK> &base) - : ACE_Hash_Map_Const_Iterator_Ex, ACE_Equal_To, ACE_LOCK> (base) -{ -} - -template ACE_Hash_Map_Const_Iterator & -ACE_Hash_Map_Const_Iterator::operator= (const ACE_Hash_Map_Const_Iterator_Ex, ACE_Equal_To, ACE_LOCK> &rhs) -{ - if (this != &rhs) - { - ACE_Hash_Map_Const_Iterator_Ex, ACE_Equal_To, ACE_LOCK> &base = *this; - - base = rhs; - } - - return *this; -} - -template -ACE_Hash_Map_Reverse_Iterator::ACE_Hash_Map_Reverse_Iterator (ACE_Hash_Map_Manager &mm, - bool head) - : ACE_Hash_Map_Reverse_Iterator_Ex, ACE_Equal_To, ACE_LOCK> (mm, - head) -{ -} - -template -ACE_Hash_Map_Reverse_Iterator::ACE_Hash_Map_Reverse_Iterator (const ACE_Hash_Map_Reverse_Iterator_Ex, ACE_Equal_To, ACE_LOCK> &base) - : ACE_Hash_Map_Reverse_Iterator_Ex, ACE_Equal_To, ACE_LOCK> (base) -{ -} - -template ACE_Hash_Map_Reverse_Iterator & -ACE_Hash_Map_Reverse_Iterator::operator= (const ACE_Hash_Map_Reverse_Iterator_Ex, ACE_Equal_To, ACE_LOCK> &rhs) -{ - ACE_Hash_Map_Reverse_Iterator_Ex, ACE_Equal_To, ACE_LOCK> &base = *this; - - base = rhs; - - return *this; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Hash_Map_With_Allocator_T.cpp b/modules/worldengine/deps/acelite/ace/Hash_Map_With_Allocator_T.cpp deleted file mode 100644 index 0f0a256f11..0000000000 --- a/modules/worldengine/deps/acelite/ace/Hash_Map_With_Allocator_T.cpp +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef ACE_HASH_MAP_WITH_ALLOCATOR_T_CPP -#define ACE_HASH_MAP_WITH_ALLOCATOR_T_CPP - -#include "ace/Hash_Map_With_Allocator_T.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#if !defined (__ACE_INLINE__) -#include "ace/Hash_Map_With_Allocator_T.inl" -#endif /* __ACE_INLINE__ */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -template -ACE_Hash_Map_With_Allocator::ACE_Hash_Map_With_Allocator (ACE_Allocator *alloc) - : ACE_Hash_Map_Manager_Ex, ACE_Equal_To, ACE_Null_Mutex> (alloc) -{ - ACE_TRACE ("ACE_Hash_Map_With_Allocator::ACE_Hash_Map_With_Allocator"); -} - -template -ACE_Hash_Map_With_Allocator::ACE_Hash_Map_With_Allocator (size_t size, - ACE_Allocator *alloc) - : ACE_Hash_Map_Manager_Ex, ACE_Equal_To, ACE_Null_Mutex> (size, alloc) -{ - ACE_TRACE ("ACE_Hash_Map_With_Allocator::ACE_Hash_Map_With_Allocator"); -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_HASH_MAP_WITH_ALLOCATOR_T_CPP */ diff --git a/modules/worldengine/deps/acelite/ace/Hash_Map_With_Allocator_T.h b/modules/worldengine/deps/acelite/ace/Hash_Map_With_Allocator_T.h deleted file mode 100644 index 21eaec5f6b..0000000000 --- a/modules/worldengine/deps/acelite/ace/Hash_Map_With_Allocator_T.h +++ /dev/null @@ -1,110 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Hash_Map_With_Allocator_T.h - * - * @author Marina Spivak - * @author Irfan Pyarali - */ -//============================================================================= - -#ifndef ACE_HASH_MAP_WITH_ALLOCATOR_T_H -#define ACE_HASH_MAP_WITH_ALLOCATOR_T_H -#include /**/ "ace/pre.h" - -#include "ace/Hash_Map_Manager_T.h" -#include "ace/Null_Mutex.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_Hash_Map_With_Allocator - * - * @brief This class is a thin wrapper around ACE_Hash_Map_Manager, - * which comes handy when ACE_Hash_Map_Manager is to be used with a - * non-nil ACE_Allocator. This wrapper insures that the appropriate - * allocator is in place for every operation that accesses or - * updates the hash map. - * - * If we use ACE_Hash_Map_Manager with a shared memory allocator - * (or memory-mapped file allocator, for example), the allocator - * pointer used by ACE_Hash_Map_Manager gets stored with it, in - * shared memory (or memory-mapped file). Naturally, this will - * cause horrible problems, since only the first process to set - * that pointer will be guaranteed the address of the allocator - * is meaningful! That is why we need this wrapper, which - * insures that appropriate allocator pointer is in place for - * each call. - * - * At some point it would be a good idea to update this class to - * use the new "two allocator" technique provided by @c - * ACE_Hash_Map_Manager_Ex. - */ -template -class ACE_Hash_Map_With_Allocator : - public ACE_Hash_Map_Manager_Ex, ACE_Equal_To, ACE_Null_Mutex> -{ -public: - /// Constructor. - ACE_Hash_Map_With_Allocator (ACE_Allocator *alloc); - - /// Constructor that specifies hash table size. - ACE_Hash_Map_With_Allocator (size_t size, - ACE_Allocator *alloc); - - // = The following methods are Proxies to the corresponding methods - // in ACE_Hash_Map_Manager. Each method sets the allocator to - // the one specified by the invoking entity, and then calls the - // corresponding method in ACE_Hash_Map_Manager to do the - // actual work. - - int bind (const EXT_ID &, - const INT_ID &, - ACE_Allocator *alloc); - - int unbind (const EXT_ID &, - INT_ID &, - ACE_Allocator *alloc); - - int unbind (const EXT_ID &, - ACE_Allocator *alloc); - - int rebind (const EXT_ID &, - const INT_ID &, - EXT_ID &, - INT_ID &, - ACE_Allocator *alloc); - - int find (const EXT_ID &, - INT_ID &, - ACE_Allocator *alloc); - - /// Returns 0 if the @a ext_id is in the mapping, otherwise -1. - int find (const EXT_ID &ext_id, - ACE_Allocator *alloc); - - int close (ACE_Allocator *alloc); -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/Hash_Map_With_Allocator_T.inl" -#endif /* __ACE_INLINE__ */ - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "ace/Hash_Map_With_Allocator_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Hash_Map_With_Allocator_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ - - -#include /**/ "ace/post.h" -#endif /* ACE_HASH_MAP_WITH_ALLOCATOR_T_H */ diff --git a/modules/worldengine/deps/acelite/ace/Hash_Map_With_Allocator_T.inl b/modules/worldengine/deps/acelite/ace/Hash_Map_With_Allocator_T.inl deleted file mode 100644 index 23214a7c29..0000000000 --- a/modules/worldengine/deps/acelite/ace/Hash_Map_With_Allocator_T.inl +++ /dev/null @@ -1,80 +0,0 @@ -// -*- C++ -*- - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -template ACE_INLINE int -ACE_Hash_Map_With_Allocator::close (ACE_Allocator *alloc) -{ - ACE_TRACE ("ACE_Hash_Map_With_Allocator::close"); - this->table_allocator_ = alloc; - this->entry_allocator_ = alloc; - return this->close_i (); -} - -template ACE_INLINE int -ACE_Hash_Map_With_Allocator::bind (const EXT_ID &ext_id, - const INT_ID &int_id, - ACE_Allocator *alloc) -{ - ACE_TRACE ("ACE_Hash_Map_With_Allocator::bind"); - this->table_allocator_ = alloc; - this->entry_allocator_ = alloc; - return this->bind_i (ext_id, int_id); -} - -template ACE_INLINE int -ACE_Hash_Map_With_Allocator::unbind (const EXT_ID &ext_id, - INT_ID &int_id, - ACE_Allocator *alloc) -{ - ACE_TRACE ("ACE_Hash_Map_With_Allocator::unbind"); - this->table_allocator_ = alloc; - this->entry_allocator_ = alloc; - return this->unbind_i (ext_id, int_id); -} - -template ACE_INLINE int -ACE_Hash_Map_With_Allocator::unbind (const EXT_ID &ext_id, - ACE_Allocator *alloc) -{ - ACE_TRACE ("ACE_Hash_Map_With_Allocator::unbind"); - this->table_allocator_ = alloc; - this->entry_allocator_ = alloc; - return this->unbind_i (ext_id); -} - -template ACE_INLINE int -ACE_Hash_Map_With_Allocator::rebind (const EXT_ID &ext_id, - const INT_ID &int_id, - EXT_ID &old_ext_id, - INT_ID &old_int_id, - ACE_Allocator *alloc) -{ - ACE_TRACE ("ACE_Hash_Map_With_Allocator::rebind"); - this->table_allocator_ = alloc; - this->entry_allocator_ = alloc; - return this->rebind_i (ext_id, int_id, old_ext_id, old_int_id); -} - -template ACE_INLINE int -ACE_Hash_Map_With_Allocator::find (const EXT_ID &ext_id, - INT_ID &int_id, - ACE_Allocator *alloc) -{ - ACE_TRACE ("ACE_Hash_Map_With_Allocator::find"); - this->table_allocator_ = alloc; - this->entry_allocator_ = alloc; - return this->find_i (ext_id, int_id); -} - -template ACE_INLINE int -ACE_Hash_Map_With_Allocator::find (const EXT_ID &ext_id, - ACE_Allocator *alloc) -{ - ACE_TRACE ("ACE_Hash_Map_With_Allocator::find"); - this->table_allocator_ = alloc; - this->entry_allocator_ = alloc; - return this->find_i (ext_id); -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Hash_Multi_Map_Manager_T.cpp b/modules/worldengine/deps/acelite/ace/Hash_Multi_Map_Manager_T.cpp deleted file mode 100644 index 21af83b76f..0000000000 --- a/modules/worldengine/deps/acelite/ace/Hash_Multi_Map_Manager_T.cpp +++ /dev/null @@ -1,599 +0,0 @@ - -//============================================================================= -/** - * @file Hash_Multi_Map_Manager_T.cpp - * - * @author Shanshan Jiang - */ -//============================================================================= - -#ifndef ACE_Hash_Multi_Map_Manager_T_CPP -#define ACE_Hash_Multi_Map_Manager_T_CPP - -#include "ace/Hash_Multi_Map_Manager_T.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#if !defined (__ACE_INLINE__) -# include "ace/Hash_Multi_Map_Manager_T.inl" -#endif /* __ACE_INLINE__ */ - -#include "ace/Malloc_Base.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -template -ACE_Hash_Multi_Map_Entry::ACE_Hash_Multi_Map_Entry (ACE_Hash_Multi_Map_Entry *next, - ACE_Hash_Multi_Map_Entry *prev) - : next_ (next), - prev_ (prev) -{ -} - -template -ACE_Hash_Multi_Map_Entry::ACE_Hash_Multi_Map_Entry (const EXT_ID &ext_id, - const ACE_Unbounded_Set &int_id_set, - ACE_Hash_Multi_Map_Entry *next, - ACE_Hash_Multi_Map_Entry *prev) - : ext_id_ (ext_id), - int_id_set_ (int_id_set), - next_ (next), - prev_ (prev) -{ -} - -template -ACE_Hash_Multi_Map_Entry::~ACE_Hash_Multi_Map_Entry (void) -{ -} - -template EXT_ID & -ACE_Hash_Multi_Map_Entry::key () -{ - return ext_id_; -} - -template ACE_Unbounded_Set & -ACE_Hash_Multi_Map_Entry::item () -{ - return int_id_set_; -} - -template void -ACE_Hash_Multi_Map_Entry::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("next_ = %d"), this->next_)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("prev_ = %d"), this->prev_)); - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} - -template void -ACE_Hash_Multi_Map_Manager::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("total_size_ = %d"), this->total_size_)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("\ncur_size_ = %d"), this->cur_size_)); - this->table_allocator_->dump (); - this->entry_allocator_->dump (); - this->lock_.dump (); - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} - -template int -ACE_Hash_Multi_Map_Manager::create_buckets (size_t size) -{ - size_t bytes = size * sizeof (ACE_Hash_Multi_Map_Entry); - void *ptr; - - ACE_ALLOCATOR_RETURN (ptr, - this->table_allocator_->malloc (bytes), - -1); - - this->table_ = (ACE_Hash_Multi_Map_Entry *) ptr; - - this->total_size_ = size; - - // Initialize each entry in the hash table to be a circular linked - // list with the dummy node in the front serving as the anchor of - // the list. - for (size_t i = 0; i < size; i++) - new (&this->table_[i]) ACE_Hash_Multi_Map_Entry (&this->table_[i], - &this->table_[i]); - return 0; -} - -template int -ACE_Hash_Multi_Map_Manager::open (size_t size, - ACE_Allocator *table_alloc, - ACE_Allocator *entry_alloc) -{ - ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1); - - // Calling this->close_i () to ensure we release previous allocated - // memory before allocating new one. - this->close_i (); - - if (table_alloc == 0) - table_alloc = ACE_Allocator::instance (); - - this->table_allocator_ = table_alloc; - - if (entry_alloc == 0) - entry_alloc = table_alloc; - - this->entry_allocator_ = entry_alloc; - - // This assertion is here to help track a situation that shouldn't - // happen, but did with Sun C++ 4.1 (before a change to this class - // was made: it used to have an enum that was supposed to be defined - // to be ACE_DEFAULT_MAP_SIZE, but instead was defined to be 0). - if (size == 0) - return -1; - - return this->create_buckets (size); -} - -template int -ACE_Hash_Multi_Map_Manager::close_i (void) -{ - // Protect against "double-deletion" in case the destructor also - // gets called. - if (this->table_ != 0) - { - // Remove all the entries. - this->unbind_all_i (); - - // Iterate through the buckets cleaning up the sentinels. - for (size_t i = 0; i < this->total_size_; i++) - { - // Destroy the dummy entry. - ACE_Hash_Multi_Map_Entry *entry = &this->table_[i]; - - // The second argument results in a no-op instead of - // deallocation. - ACE_DES_FREE_TEMPLATE2 (entry, ACE_NOOP, - ACE_Hash_Multi_Map_Entry, EXT_ID, INT_ID); - } - - // Reset size. - this->total_size_ = 0; - - // Free table memory. - this->table_allocator_->free (this->table_); - - // Should be done last... - this->table_ = 0; - } - - return 0; -} - -template int -ACE_Hash_Multi_Map_Manager::unbind_all_i (void) -{ - // Iterate through the entire map calling the destuctor of each - // . - for (size_t i = 0; i < this->total_size_; i++) - { - for (ACE_Hash_Multi_Map_Entry *temp_ptr = this->table_[i].next_; - temp_ptr != &this->table_[i]; - ) - { - ACE_Hash_Multi_Map_Entry *hold_ptr = temp_ptr; - temp_ptr = temp_ptr->next_; - - // Explicitly call the destructor. - ACE_DES_FREE_TEMPLATE2 (hold_ptr, this->entry_allocator_->free, - ACE_Hash_Multi_Map_Entry, EXT_ID, INT_ID); - } - - // Restore the sentinel. - this->table_[i].next_ = &this->table_[i]; - this->table_[i].prev_ = &this->table_[i]; - } - - this->cur_size_ = 0; - - return 0; -} - -template int -ACE_Hash_Multi_Map_Manager::bind_i (const EXT_ID &ext_id, - const INT_ID &int_id, - ACE_Hash_Multi_Map_Entry *&entry) -{ - size_t loc; - int result = this->shared_find (ext_id, entry, loc); - - ACE_Unbounded_Set int_id_set; - if (result == -1) - { - void *ptr; - // Not found. - ACE_ALLOCATOR_RETURN (ptr, - this->entry_allocator_->malloc (sizeof (ACE_Hash_Multi_Map_Entry)), - -1); - - int_id_set.insert (int_id); - - entry = new (ptr) ACE_Hash_Multi_Map_Entry (ext_id, - int_id_set, - this->table_[loc].next_, - &this->table_[loc]); - this->table_[loc].next_ = entry; - entry->next_->prev_ = entry; - this->cur_size_++; - return 0; - } - else - { - int_id_set = (*entry).int_id_set_; - - if (0 == int_id_set.insert (int_id)) - { - this->unbind_i (entry); - return this->bind_i (ext_id, int_id_set); - } - else - return 1; - } -} - -template int -ACE_Hash_Multi_Map_Manager::bind_i (const EXT_ID &ext_id, - const ACE_Unbounded_Set &int_id_set, - ACE_Hash_Multi_Map_Entry *&entry) -{ - size_t loc; - int result = this->shared_find (ext_id, entry, loc); - - if (result == -1) - { - void *ptr; - // Not found. - ACE_ALLOCATOR_RETURN (ptr, - this->entry_allocator_->malloc (sizeof (ACE_Hash_Multi_Map_Entry)), - -1); - - entry = new (ptr) ACE_Hash_Multi_Map_Entry (ext_id, - int_id_set, - this->table_[loc].next_, - &this->table_[loc]); - this->table_[loc].next_ = entry; - entry->next_->prev_ = entry; - this->cur_size_++; - return 0; - } - else - return 1; -} - -template int -ACE_Hash_Multi_Map_Manager::trybind_i (const EXT_ID &ext_id, - ACE_Unbounded_Set &int_id_set, - ACE_Hash_Multi_Map_Entry *&entry) -{ - size_t loc; - int result = this->shared_find (ext_id, entry, loc); - - if (result == -1) - { - // Not found. - void *ptr; - ACE_ALLOCATOR_RETURN (ptr, - this->entry_allocator_->malloc (sizeof (ACE_Hash_Multi_Map_Entry)), - -1); - - entry = new (ptr) ACE_Hash_Multi_Map_Entry (ext_id, - int_id_set, - this->table_[loc].next_, - &this->table_[loc]); - this->table_[loc].next_ = entry; - entry->next_->prev_ = entry; - this->cur_size_++; - return 0; - } - else - return 1; -} - -template int -ACE_Hash_Multi_Map_Manager::unbind_i (const EXT_ID &ext_id, - ACE_Unbounded_Set &int_id_set) -{ - ACE_Hash_Multi_Map_Entry *temp; - - size_t loc; - int result = this->shared_find (ext_id, temp, loc); - - if (result == -1) - { - errno = ENOENT; - return -1; - } - - int_id_set = temp->int_id_set_; - - return this->unbind_i (temp); -} - -template int -ACE_Hash_Multi_Map_Manager::unbind_i (ACE_Hash_Multi_Map_Entry *entry) -{ - entry->next_->prev_ = entry->prev_; - entry->prev_->next_ = entry->next_; - - // Explicitly call the destructor. - ACE_DES_FREE_TEMPLATE2 (entry, this->entry_allocator_->free, - ACE_Hash_Multi_Map_Entry, EXT_ID, INT_ID); - - this->cur_size_--; - return 0; -} - -template int -ACE_Hash_Multi_Map_Manager::unbind_i (const EXT_ID &ext_id, - const INT_ID &int_id) -{ - ACE_Hash_Multi_Map_Entry *temp; - - size_t loc; - int result = this->shared_find (ext_id, temp, loc); - - if (result == -1) - { - errno = ENOENT; - return -1; - } - - ACE_Unbounded_Set int_id_set = (*temp).int_id_set_; - if (0 == int_id_set.remove (int_id)) - { - this->unbind_i (temp); - - if (0 != int_id_set.size ()) - return this->bind_i (ext_id, int_id_set); - else - return 0; - } - else - return -1; -} - - -template int -ACE_Hash_Multi_Map_Manager::shared_find (const EXT_ID &ext_id, - ACE_Hash_Multi_Map_Entry *&entry, - size_t &loc) -{ - loc = this->hash (ext_id) % this->total_size_; - - ACE_Hash_Multi_Map_Entry *temp = this->table_[loc].next_; - - while (temp != &this->table_[loc] && this->equal (temp->ext_id_, ext_id) == 0) - temp = temp->next_; - - if (temp == &this->table_[loc]) - { - errno = ENOENT; - return -1; - } - else - { - entry = temp; - return 0; - } -} - -template int -ACE_Hash_Multi_Map_Manager::rebind_i (const EXT_ID &ext_id, - const ACE_Unbounded_Set &int_id_set, - ACE_Hash_Multi_Map_Entry *&entry) -{ - size_t dummy; - if (this->shared_find (ext_id, entry, dummy) == -1) - return this->bind_i (ext_id, int_id_set); - else - { - entry->ext_id_ = ext_id; - entry->int_id_set_ = int_id_set; - return 1; - } -} - -template int -ACE_Hash_Multi_Map_Manager::rebind_i (const EXT_ID &ext_id, - const ACE_Unbounded_Set &int_id_set, - ACE_Unbounded_Set &old_int_id_set, - ACE_Hash_Multi_Map_Entry *&entry) -{ - size_t dummy; - if (this->shared_find (ext_id, entry, dummy) == -1) - return this->bind_i (ext_id, int_id_set); - else - { - old_int_id_set = entry->int_id_set_; - entry->ext_id_ = ext_id; - entry->int_id_set_ = int_id_set; - return 1; - } -} - -template int -ACE_Hash_Multi_Map_Manager::rebind_i (const EXT_ID &ext_id, - const ACE_Unbounded_Set &int_id_set, - EXT_ID &old_ext_id, - ACE_Unbounded_Set &old_int_id_set, - ACE_Hash_Multi_Map_Entry *&entry) -{ - size_t dummy; - if (this->shared_find (ext_id, entry, dummy) == -1) - return this->bind_i (ext_id, int_id_set); - else - { - old_ext_id = entry->ext_id_; - old_int_id_set = entry->int_id_set_; - entry->ext_id_ = ext_id; - entry->int_id_set_ = int_id_set; - return 1; - } -} - -// ------------------------------------------------------------ - -ACE_ALLOC_HOOK_DEFINE(ACE_Hash_Multi_Map_Iterator_Base) - -template void -ACE_Hash_Multi_Map_Iterator_Base::dump_i (void) const -{ - ACE_TRACE ("ACE_Hash_Multi_Map_Iterator_Base::dump_i"); - - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("index_ = %d "), this->index_)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("next_ = %x"), this->next_)); - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -} - -template int -ACE_Hash_Multi_Map_Iterator_Base::forward_i (void) -{ - ACE_TRACE ("ACE_Hash_Multi_Map_Iterator_Base::forward_i"); - - if (this->map_man_->table_ == 0) - return -1; - // Handle initial case specially. - else if (this->index_ == -1) - { - this->index_++; - return this->forward_i (); - } - else if (this->index_ >= static_cast (this->map_man_->total_size_)) - return 0; - - this->next_ = this->next_->next_; - if (this->next_ == &this->map_man_->table_[this->index_]) - { - while (++this->index_ < static_cast (this->map_man_->total_size_)) - { - this->next_ = this->map_man_->table_[this->index_].next_; - if (this->next_ != &this->map_man_->table_[this->index_]) - break; - } - } - - return this->index_ < static_cast (this->map_man_->total_size_); -} - -template int -ACE_Hash_Multi_Map_Iterator_Base::reverse_i (void) -{ - ACE_TRACE ("ACE_Hash_Multi_Map_Iterator_Base::reverse_i"); - - if (this->map_man_->table_ == 0) - return -1; - else if (this->index_ == static_cast (this->map_man_->total_size_)) - { - this->index_--; - return this->reverse_i (); - } - else if (this->index_ < 0) - return 0; - - this->next_ = this->next_->prev_; - if (this->next_ == &this->map_man_->table_[this->index_]) - { - while (--this->index_ >= 0) - { - this->next_ = this->map_man_->table_[this->index_].prev_; - if (this->next_ != &this->map_man_->table_[this->index_]) - break; - } - } - - return this->index_ >= 0; -} - -// ------------------------------------------------------------ - -ACE_ALLOC_HOOK_DEFINE(ACE_Hash_Multi_Map_Const_Iterator_Base) - -template void -ACE_Hash_Multi_Map_Const_Iterator_Base::dump_i (void) const -{ - ACE_TRACE ("ACE_Hash_Multi_Map_Const_Iterator_Base::dump_i"); - - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("index_ = %d "), this->index_)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("next_ = %x"), this->next_)); - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -} - -template int -ACE_Hash_Multi_Map_Const_Iterator_Base::forward_i (void) -{ - ACE_TRACE ("ACE_Hash_Multi_Map_Const_Iterator_Base::forward_i"); - - if (this->map_man_->table_ == 0) - return -1; - // Handle initial case specially. - else if (this->index_ == -1) - { - this->index_++; - return this->forward_i (); - } - else if (this->index_ >= (ssize_t) this->map_man_->total_size_) - return 0; - - this->next_ = this->next_->next_; - if (this->next_ == &this->map_man_->table_[this->index_]) - { - while (++this->index_ < (ssize_t) this->map_man_->total_size_) - { - this->next_ = this->map_man_->table_[this->index_].next_; - if (this->next_ != &this->map_man_->table_[this->index_]) - break; - } - } - - return this->index_ < (ssize_t) this->map_man_->total_size_; -} - -template int -ACE_Hash_Multi_Map_Const_Iterator_Base::reverse_i (void) -{ - ACE_TRACE ("ACE_Hash_Multi_Map_Const_Iterator_Base::reverse_i"); - - if (this->map_man_->table_ == 0) - return -1; - else if (this->index_ == (ssize_t) this->map_man_->total_size_) - { - this->index_--; - return this->reverse_i (); - } - else if (this->index_ < 0) - return 0; - - this->next_ = this->next_->prev_; - if (this->next_ == &this->map_man_->table_[this->index_]) - { - while (--this->index_ >= 0) - { - this->next_ = this->map_man_->table_[this->index_].prev_; - if (this->next_ != &this->map_man_->table_[this->index_]) - break; - } - } - - return this->index_ >= 0; -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_Hash_Multi_Map_Manager_T_CPP */ diff --git a/modules/worldengine/deps/acelite/ace/Hash_Multi_Map_Manager_T.h b/modules/worldengine/deps/acelite/ace/Hash_Multi_Map_Manager_T.h deleted file mode 100644 index fefa3fb5ee..0000000000 --- a/modules/worldengine/deps/acelite/ace/Hash_Multi_Map_Manager_T.h +++ /dev/null @@ -1,964 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Hash_Multi_Map_Manager_T.h - * - * The code in Hash_Multi_Map_Manager_T.* was based on the code in - * Hash_Map_Manager_T.*. - * - * ACE_Hash_Multi_Map_Manager maps a key type to more than one value types. - * The template takes the key and value types as parameters. The bind and - * unbind operations can take a key and the value or the set of the values that - * is to be associated with that key. The find operation can take a key or a - * key and the value that is associated with the key. - * - * ACE_Hash_Multi_Map_Manager uses @c ACE_Unbounded_Set to store differet values - * with the same key. - * - * @author Shanshan Jiang - */ -//============================================================================= - -#ifndef ACE_HASH_MULTI_MAP_MANAGER_T_H -#define ACE_HASH_MULTI_MAP_MANAGER_T_H -#include /**/ "ace/pre.h" - -#include /**/ "ace/config-all.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Default_Constants.h" -#include "ace/Functor_T.h" -#include "ace/Log_Category.h" - -#include "ace/Unbounded_Set.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_Hash_Multi_Map_Entry - * - * @brief Define an entry in the hash table. - */ -template -class ACE_Hash_Multi_Map_Entry -{ -public: - friend class ACE_Unbounded_Set; - - typedef ACE_Unbounded_Set VALUE_SET; - typedef ACE_Unbounded_Set_Iterator VALUE_SET_ITERATOR; - - // = Initialization and termination methods. - /// Constructor. - ACE_Hash_Multi_Map_Entry (const EXT_ID &ext_id, - const ACE_Unbounded_Set &int_id_set, - ACE_Hash_Multi_Map_Entry *next = 0, - ACE_Hash_Multi_Map_Entry *prev = 0); - - /// Constructor. - ACE_Hash_Multi_Map_Entry (ACE_Hash_Multi_Map_Entry *next, - ACE_Hash_Multi_Map_Entry *prev); - - /// Destructor. - ~ACE_Hash_Multi_Map_Entry (void); - - /// Key accessor. - EXT_ID& key (void); - - /// Item accessor. - ACE_Unbounded_Set& item (void); - -public: - /// Key used to look up an entry. - /// @todo Should be private - EXT_ID ext_id_; - - /// The contents of the entry itself. - /// @todo Should be private - ACE_Unbounded_Set int_id_set_; - - /// Pointer to the next item in the bucket of overflow nodes. - ACE_Hash_Multi_Map_Entry *next_; - - /// Pointer to the prev item in the bucket of overflow nodes. - ACE_Hash_Multi_Map_Entry *prev_; - - /// Dump the state of an object. - void dump (void) const; -}; - -// Forward decl. -template -class ACE_Hash_Multi_Map_Iterator_Base; - -// Forward decl. -template -class ACE_Hash_Multi_Map_Const_Iterator_Base; - -// Forward decl. -template -class ACE_Hash_Multi_Map_Iterator; - -// Forward decl. -template -class ACE_Hash_Multi_Map_Const_Iterator; - -// Forward decl. -template -class ACE_Hash_Multi_Map_Reverse_Iterator; - -// Forward decl. -template -class ACE_Hash_Multi_Map_Bucket_Iterator; - -// Forward decl. -class ACE_Allocator; - -/** - * @class ACE_Hash_Multi_Map_Manager - * - * @brief Define a multi-map abstraction that efficiently associates the keys - * with their different values. - * - * This implementation of a multi-map uses a hash table. Key hashing - * is achieved through the @c HASH_KEY object and key comparison is - * achieved through the @c COMPARE_KEYS object. - * This class uses an @c ACE_Allocator to allocate memory. The - * user can make this a persistent class by providing an - * @c ACE_Allocator with a persistable memory pool. - */ - -template -class ACE_Hash_Multi_Map_Manager -{ -public: - friend class ACE_Hash_Multi_Map_Iterator_Base; - friend class ACE_Hash_Multi_Map_Iterator; - friend class ACE_Hash_Multi_Map_Const_Iterator_Base; - friend class ACE_Hash_Multi_Map_Const_Iterator; - friend class ACE_Hash_Multi_Map_Reverse_Iterator; - friend class ACE_Hash_Multi_Map_Bucket_Iterator; - - typedef EXT_ID - KEY; - typedef INT_ID - VALUE; - typedef ACE_LOCK lock_type; - typedef ACE_Hash_Multi_Map_Entry - ENTRY; - - // = ACE-style iterator typedefs. - typedef ACE_Hash_Multi_Map_Iterator - ITERATOR; - typedef ACE_Hash_Multi_Map_Const_Iterator - CONST_ITERATOR; - typedef ACE_Hash_Multi_Map_Reverse_Iterator - REVERSE_ITERATOR; - - // = STL-style iterator typedefs. - typedef ACE_Hash_Multi_Map_Iterator - iterator; - typedef ACE_Hash_Multi_Map_Const_Iterator - const_iterator; - typedef ACE_Hash_Multi_Map_Reverse_Iterator - reverse_iterator; - - // = Initialization and termination methods. - - /** - * Initialize a @c Hash_Multi_Map_Manager with default size elements. - * @param table_alloc is a pointer to a memory allocator used for - * table_, so it should supply size*sizeof ( - * ACE_Hash_Multi_Map_Entry<@c EXT_ID, @c INT_ID>). - * @param entry_alloc is a pointer to an additional allocator for - * entries, so it should be able to allocate 'size' / chunks - * of sizeof (ACE_Hash_Multi_Map_Entry<@c EXT_ID, @c INT_ID>) bytes - * each. - * If @a table_alloc is 0 it defaults to @c ACE_Allocator::instance(). - * If @a entry_alloc is 0 then it defaults to the same allocator as - * @a table_alloc. - */ - ACE_Hash_Multi_Map_Manager (ACE_Allocator *table_alloc = 0, - ACE_Allocator *entry_alloc = 0); - - /** - * Initialize a @c Hash_Multi_Map_Manager with @a size elements. - * @param size is the number of elements in a Hash_Multi_Map_Manager. - * @param table_alloc is a pointer to a memory allocator used for - * table_, so it should supply size*sizeof ( - * ACE_Hash_Multi_Map_Entry<@c EXT_ID, <@c INT_ID>). - * @param entry_alloc is a pointer to an additional allocator for - * entries, so it should be able to allocate 'size' / chunks - * of sizeof (ACE_Hash_Multi_Map_Entry<@c EXT_ID, @c INT_ID>) bytes - * each. - * If @a table_alloc is 0 it defaults to @c ACE_Allocator::instance(). - * If @a entry_alloc is 0 then it defaults to the same allocator as - * @a table_alloc. - */ - ACE_Hash_Multi_Map_Manager (size_t size, - ACE_Allocator *table_alloc = 0, - ACE_Allocator *entry_alloc = 0); - - /** - * Initialize a @c Hash_Multi_Map_Manager with @a size elements. - * @param size is the number of elements in a Hash_Multi_Map_Manager. - * @param table_alloc is a pointer to a memory allocator used for - * table_, so it should supply size*sizeof - * (ACE_Hash_Multi_Map_Entry<@c EXT_ID, <@c INT_ID>). - * @param entry_alloc is a pointer to an additional allocator for - * entries, so it should be able to allocate 'size' / chunks - * of sizeof (ACE_Hash_Multi_Map_Entry<@c EXT_ID, <@c INT_ID>) bytes - * each. - * If @a table_alloc is 0 it defaults to @c ACE_Allocator::instance(). - * If @a entry_alloc is 0 then it defaults to the same allocator as - * @a table_alloc. - * @return -1 on failure, 0 on success - */ - - int open (size_t size = ACE_DEFAULT_MAP_SIZE, - ACE_Allocator *table_alloc = 0, - ACE_Allocator *entry_alloc = 0); - - /// Close down a Hash_Multi_Map_Manager and release dynamically allocated - /// resources. - int close (void); - - /// Removes all the entries in Hash_Multi_Map_Manager. - int unbind_all (void); - - /// Cleanup the Hash_Multi_Map_Manager. - ~ACE_Hash_Multi_Map_Manager (void); - - /** - * Associate @a ext_id with @a int_id. If @a ext_id and @a int_id is already - * in the map then the @c ACE_Hash_Multi_Map_Entry is not changed. Returns 0 if - * a new entry is bound successfully, returns 1 if an attempt is made - * to bind an existing entry, and returns -1 if failures occur. - */ - int bind (const EXT_ID &ext_id, - const INT_ID &int_id); - - /** - * Same as a normal bind, except the map entry is also passed back - * to the caller. The entry in this case will either be the newly - * created entry, or the existing one. - */ - int bind (const EXT_ID &ext_id, - const INT_ID &int_id, - ACE_Hash_Multi_Map_Entry *&entry); - - /** - * Associate @a ext_id with @a int_id_set. If @a ext_id is already in the - * map then the @c ACE_Hash_Multi_Map_Entry is not changed. Returns 0 if a - * new entry is bound successfully, returns 1 if an attempt is made - * to bind an existing entry, and returns -1 if failures occur. - */ - int bind (const EXT_ID &ext_id, - const ACE_Unbounded_Set &int_id_set); - - /** - * Same as a normal bind, except the map entry is also passed back - * to the caller. The entry in this case will either be the newly - * created entry, or the existing one. - */ - int bind (const EXT_ID &ext_id, - const ACE_Unbounded_Set &int_id_set, - ACE_Hash_Multi_Map_Entry *&entry); - - /** - * Associate @a ext_id with @a int_id_set if and only if @a ext_id is - * not in the map. If @a ext_id is already in the map then the @a int_id_set - * parameter is assigned the existing value in the map. Returns 0 - * if a new entry is bound successfully, returns 1 if an attempt is - * made to bind an existing entry, and returns -1 if failures occur. - */ - int trybind (const EXT_ID &ext_id, - ACE_Unbounded_Set &int_id_set); - - /** - * Same as a normal trybind, except the map entry is also passed - * back to the caller. The entry in this case will either be the - * newly created entry, or the existing one. - */ - int trybind (const EXT_ID &ext_id, - ACE_Unbounded_Set &int_id_set, - ACE_Hash_Multi_Map_Entry *&entry); - - /** - * Reassociate @a ext_id with @a int_id_set. If @a ext_id is not in - * the map then behaves just like bind. Returns 0 if a new entry is - * bound successfully, returns 1 if an existing entry was rebound, - * and returns -1 if failures occur. - */ - int rebind (const EXT_ID &ext_id, - const ACE_Unbounded_Set &int_id_set); - - /** - * Same as a normal rebind, except the map entry is also passed back - * to the caller. The entry in this case will either be the newly - * created entry, or the existing one. - */ - int rebind (const EXT_ID &ext_id, - const ACE_Unbounded_Set &int_id_set, - ACE_Hash_Multi_Map_Entry *&entry); - - /** - * Associate @a ext_id with @a int_id_set. If @a ext_id is not in the map - * then behaves just like bind. Otherwise, store the old value of - * @a int_id_set into the "out" parameter and rebind the new parameters. - * Returns 0 if a new entry is bound successfully, returns 1 if an - * existing entry was rebound, and returns -1 if failures occur. - */ - int rebind (const EXT_ID &ext_id, - const ACE_Unbounded_Set &int_id_set, - ACE_Unbounded_Set &old_int_id_set); - - /** - * Same as a normal rebind, except the map entry is also passed back - * to the caller. The entry in this case will either be the newly - * created entry, or the existing one. - */ - int rebind (const EXT_ID &ext_id, - const ACE_Unbounded_Set &int_id_set, - ACE_Unbounded_Set &old_int_id_set, - ACE_Hash_Multi_Map_Entry *&entry); - - /** - * Associate @a ext_id with @a int_id_set. If @a ext_id is not in the map - * then behaves just like bind. Otherwise, store the old values - * of @a ext_id and @a int_id_set into the "out" parameters and rebind the - * new parameters. This is very useful if you need to have an - * atomic way of updating @c ACE_Hash_Multi_Map_Entry objects and you also - * need full control over memory allocation. Returns 0 if a new entry - * is bound successfully, returns 1 if an existing entry was rebound, - * and returns -1 if failures occur. - */ - int rebind (const EXT_ID &ext_id, - const ACE_Unbounded_Set &int_id_set, - EXT_ID &old_ext_id, - ACE_Unbounded_Set &old_int_id_set); - - /** - * Same as a normal rebind, except the map entry is also passed back - * to the caller. The entry in this case will either be the newly - * created entry, or the existing one. - */ - int rebind (const EXT_ID &ext_id, - const ACE_Unbounded_Set &int_id_set, - EXT_ID &old_ext_id, - ACE_Unbounded_Set &old_int_id_set, - ACE_Hash_Multi_Map_Entry *&entry); - - /// Locate @a ext_id and pass out parameter via @a int_id_set. - /// Return 0 if found, returns -1 if not found. - int find (const EXT_ID &ext_id, - ACE_Unbounded_Set &int_id_set) const; - - /// Locate @a ext_id and @a int_id. - /// Return 0 if found, returns -1 if not found. - int find (const EXT_ID &ext_id, - const INT_ID &int_id) const; - - /// Returns 0 if the @a ext_id is in the mapping, otherwise -1. - int find (const EXT_ID &ext_id) const; - - /// Locate @a ext_id and pass out parameter via @a entry. If found, - /// return 0, returns -1 if not found. - int find (const EXT_ID &ext_id, - ACE_Hash_Multi_Map_Entry *&entry) const; - - /** - * Unbind (remove) the @a ext_id from the map. Don't return the - * int_id to the caller (this is useful for collections where the - * int_ids are *not* dynamically allocated...) - */ - int unbind (const EXT_ID &ext_id); - - /// Break any association of @a ext_id. Returns the value of @a int_id_set - /// in case the caller needs to deallocate memory. Return 0 if the - /// unbind was successfully, and returns -1 if failures occur. - int unbind (const EXT_ID &ext_id, - ACE_Unbounded_Set &int_id_set); - - /// Break any association of @a ext_id and @a int_id. Return 0 if the - /// unbind was successfully, and returns -1 if failures occur. - int unbind (const EXT_ID &ext_id, - const INT_ID &int_id); - - /// Remove @a entry from map. Return 0 if the unbind was successfully, - /// and returns -1 if failures occur. - int unbind (ACE_Hash_Multi_Map_Entry *entry); - - /// Returns the current number of @c ACE_Hash_Multi_Map_Entry objects in the - /// hash table. - size_t current_size (void) const; - - /// Return the size of the array that's used to point to the - /// linked lists of @c ACE_Hash_Multi_Map_Entry objects in the hash table. - size_t total_size (void) const; - - /** - * Returns a reference to the underlying @c ACE_LOCK. This makes it - * possible to acquire the lock explicitly, which can be useful in - * some cases if you instantiate the @c ACE_Atomic_Op with an - * @c ACE_Recursive_Mutex or @c ACE_Process_Mutex, or if you need to - * guard the state of an iterator. - * @note The right name would be lock, but HP/C++ will choke on that! - */ - ACE_LOCK &mutex (void); - - /// Dump the state of an object. - void dump (void) const; - - // = STL styled iterator factory functions. - - /// Return forward iterator. - ACE_Hash_Multi_Map_Iterator begin (void); - ACE_Hash_Multi_Map_Iterator end (void); - - /// Return reverse iterator. - ACE_Hash_Multi_Map_Reverse_Iterator rbegin (void); - ACE_Hash_Multi_Map_Reverse_Iterator rend (void); - -protected: - // = The following methods do the actual work. - - /// Returns 1 if @a id1 == @a id2, else 0. This is defined as a - /// separate method to facilitate template specialization. - int equal (const EXT_ID &id1, const EXT_ID &id2); - - /// Compute the hash value of the @a ext_id. This is defined as a - /// separate method to facilitate template specialization. - u_long hash (const EXT_ID &ext_id); - - // = These methods assume locks are held by private methods. - - /// Performs bind. Must be called with locks held. - int bind_i (const EXT_ID &ext_id, - const INT_ID &int_id); - - /// Performs bind. Must be called with locks held. - int bind_i (const EXT_ID &ext_id, - const INT_ID &int_id, - ACE_Hash_Multi_Map_Entry *&entry); - - /// Performs bind. Must be called with locks held. - int bind_i (const EXT_ID &ext_id, - const ACE_Unbounded_Set &int_id_set); - - /// Performs bind. Must be called with locks held. - int bind_i (const EXT_ID &ext_id, - const ACE_Unbounded_Set &int_id_set, - ACE_Hash_Multi_Map_Entry *&entry); - - /// Performs trybind. Must be called with locks held. - int trybind_i (const EXT_ID &ext_id, - ACE_Unbounded_Set &int_id_set); - - /// Performs trybind. Must be called with locks held. - int trybind_i (const EXT_ID &ext_id, - ACE_Unbounded_Set &int_id_set, - ACE_Hash_Multi_Map_Entry *&entry); - - /// Performs rebind. Must be called with locks held. - int rebind_i (const EXT_ID &ext_id, - const ACE_Unbounded_Set &int_id_set); - - /// Performs rebind. Must be called with locks held. - int rebind_i (const EXT_ID &ext_id, - const ACE_Unbounded_Set &int_id_set, - ACE_Hash_Multi_Map_Entry *&entry); - - /// Performs rebind. Must be called with locks held. - int rebind_i (const EXT_ID &ext_id, - const ACE_Unbounded_Set &int_id_set, - ACE_Unbounded_Set &old_int_id); - - /// Performs rebind. Must be called with locks held. - int rebind_i (const EXT_ID &ext_id, - const ACE_Unbounded_Set &int_id_set, - ACE_Unbounded_Set &old_int_id_set, - ACE_Hash_Multi_Map_Entry *&entry); - - /// Performs rebind. Must be called with locks held. - int rebind_i (const EXT_ID &ext_id, - const ACE_Unbounded_Set &int_id_set, - EXT_ID &old_ext_id, - ACE_Unbounded_Set &old_int_id_set); - - /// Performs rebind. Must be called with locks held. - int rebind_i (const EXT_ID &ext_id, - const ACE_Unbounded_Set &int_id_set, - EXT_ID &old_ext_id, - ACE_Unbounded_Set &old_int_id_set, - ACE_Hash_Multi_Map_Entry *&entry); - - /// Performs a find of @a int_id_set using @a ext_id as the key. Must be - /// called with locks held. - int find_i (const EXT_ID &ext_id, - ACE_Unbounded_Set &int_id_set); - - /// Performs a find of @a ext_id and @a int_id. Must be - /// called with locks held. - int find_i (const EXT_ID &ext_id, - const INT_ID &int_id); - - /// Performs a find using @a ext_id as the key. Must be called with - /// locks held. - int find_i (const EXT_ID &ext_id); - - /// Performs a find using @a ext_id as the key. Must be called with - /// locks held. - int find_i (const EXT_ID &ext_id, - ACE_Hash_Multi_Map_Entry *&entry); - - /// Performs unbind. Must be called with locks held. - int unbind_i (const EXT_ID &ext_id, - ACE_Unbounded_Set &int_id_set); - - /// Performs unbind. Must be called with locks held. - int unbind_i (const EXT_ID &ext_id, - const INT_ID &int_id); - - /// Performs unbind. Must be called with locks held. - int unbind_i (const EXT_ID &ext_id); - - /// Performs unbind. Must be called with locks held. - int unbind_i (ACE_Hash_Multi_Map_Entry *entry); - - /** - * Resize the map. Must be called with locks held. - * @note This method should never be called more than once or else all the - * hashing will get screwed up as the size will change. - */ - int create_buckets (size_t size); - - /// Close down a Map_Manager. Must be called with - /// locks held. - int close_i (void); - - /// Removes all the entries in Map_Manager. Must be called with - /// locks held. - int unbind_all_i (void); - - /// Pointer to a memory allocator used for table_, so it should - /// supply size*sizeof (@c ACE_Hash_Multi_Map_Entry<@c EXT_ID, @c INT_ID>), - ACE_Allocator *table_allocator_; - - /// Addidtional allocator for entries, so it should be able to - /// allocate 'size' / chunks of sizeof - /// (@c ACE_Hash_Multi_Map_Entry<@c EXT_ID, @c INT_ID>) bytes each. - ACE_Allocator *entry_allocator_; - - /// Synchronization variable for the MT_SAFE - /// @c ACE_Hash_Multi_Map_Manager. - ACE_LOCK lock_; - - /// Function object used for hashing keys. - HASH_KEY hash_key_; - - /// Function object used for comparing keys. - COMPARE_KEYS compare_keys_; - -protected: - /// Returns the @c ACE_Hash_Multi_Map_Entry object that corresponds to - /// @a ext_id. - int shared_find (const EXT_ID &ext_id, - ACE_Hash_Multi_Map_Entry *&entry, - size_t &loc); - - /// Accessor of the underlying table - ACE_Hash_Multi_Map_Entry *table (void); - - /// Accessor of the current size attribute - size_t cur_size (void) const; - -private: - /** - * Array of the pointers to @c ACE_Hash_Multi_Map_Entry objects, each of - * which points to an @c ACE_Hash_Multi_Map_Entry that serves as the - * beginning of a linked list of @c EXT_ID that hash to that bucket. - */ - ACE_Hash_Multi_Map_Entry *table_; - - /// Total size of the hash table. - size_t total_size_; - - /// Current number of entries in the table - /// @note That this can be larger than total_size_ due to the - /// bucket chaining). - size_t cur_size_; - - // = Disallow these operations. - ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Hash_Multi_Map_Manager &)) - ACE_UNIMPLEMENTED_FUNC (ACE_Hash_Multi_Map_Manager (const ACE_Hash_Multi_Map_Manager &)) -}; - -/** - * @class ACE_Hash_Multi_Map_Iterator_Base - * - * @brief Base iterator for the @c ACE_Hash_Multi_Map_Manager - * - * This class factors out common code from its templatized - * subclasses. - */ -template -class ACE_Hash_Multi_Map_Iterator_Base -{ -public: - // = Initialization method. - /// Contructor. If @a head != 0, the iterator constructed is positioned - /// at the head of the map, it is positioned at the end otherwise. - ACE_Hash_Multi_Map_Iterator_Base (ACE_Hash_Multi_Map_Manager &mm, - int head); - - // = ITERATION methods. - - /// Pass back the @a next_entry that hasn't been seen in the Set. - /// Returns 0 when all items have been seen, else 1. - int next (ACE_Hash_Multi_Map_Entry *&next_entry) const; - - /// Returns 1 when all items have been seen, else 0. - int done (void) const; - - /// Returns a reference to the interal element this object is pointing to. - ACE_Hash_Multi_Map_Entry& operator* (void) const; - - /// Returns a pointer to the interal element this object is pointing to. - ACE_Hash_Multi_Map_Entry* operator-> (void) const; - - /// Returns reference the @c Hash_Multi_Map_Manager that is being iterated - /// over. - ACE_Hash_Multi_Map_Manager& map (void); - - /// Check if two iterators point to the same position - bool operator== (const ACE_Hash_Multi_Map_Iterator_Base &) const; - bool operator!= (const ACE_Hash_Multi_Map_Iterator_Base &) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - -protected: - /// Move forward by one element in the set. Returns 0 when there's - /// no more item in the set after the current items, else 1. - int forward_i (void); - - /// Move backward by one element in the set. Returns 0 when there's - /// no more item in the set before the current item, else 1. - int reverse_i (void); - - /// Dump the state of an object. - void dump_i (void) const; - - /// Map we are iterating over. - ACE_Hash_Multi_Map_Manager *map_man_; - - /// Keeps track of how far we've advanced in the table. - ssize_t index_; - - /// Keeps track of how far we've advanced in a linked list in each - /// table slot. - ACE_Hash_Multi_Map_Entry *next_; -}; - -/** - * @class ACE_Hash_Multi_Map_Const_Iterator_Base - * - * @brief Base const iterator for the @c ACE_Hash_Multi_Map_Manager - * - * This class factors out common code from its templatized - * subclasses. - */ -template -class ACE_Hash_Multi_Map_Const_Iterator_Base -{ -public: - // = Initialization method. - /// Contructor. If @a head != 0, the iterator constructed is positioned - /// at the head of the map, it is positioned at the end otherwise. - ACE_Hash_Multi_Map_Const_Iterator_Base (const ACE_Hash_Multi_Map_Manager &mm, - int head); - - // = ITERATION methods. - - /// Pass back the @a next_entry that hasn't been seen in the Set. - /// Returns 0 when all items have been seen, else 1. - int next (ACE_Hash_Multi_Map_Entry *&next_entry) const; - - /// Returns 1 when all items have been seen, else 0. - int done (void) const; - - /// Returns a reference to the interal element this object is pointing to. - ACE_Hash_Multi_Map_Entry& operator* (void) const; - - /// Returns a pointer to the interal element this object is pointing to. - ACE_Hash_Multi_Map_Entry* operator-> (void) const; - - /// Returns reference the @c Hash_Multi_Map_Manager that is being iterated - /// over. - const ACE_Hash_Multi_Map_Manager& map (void); - - /// Check if two iterators point to the same position - bool operator== (const ACE_Hash_Multi_Map_Const_Iterator_Base &) const; - bool operator!= (const ACE_Hash_Multi_Map_Const_Iterator_Base &) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - -protected: - /// Move forward by one element in the set. Returns 0 when there's - /// no more item in the set after the current items, else 1. - int forward_i (void); - - /// Move backward by one element in the set. Returns 0 when there's - /// no more item in the set before the current item, else 1. - int reverse_i (void); - - /// Dump the state of an object. - void dump_i (void) const; - - /// Map we are iterating over. - const ACE_Hash_Multi_Map_Manager *map_man_; - - /// Keeps track of how far we've advanced in the table. - ssize_t index_; - - /// Keeps track of how far we've advanced in a linked list in each - /// table slot. - ACE_Hash_Multi_Map_Entry *next_; -}; - -/** - * @class ACE_Hash_Multi_Map_Iterator - * - * @brief Forward iterator for the @c ACE_Hash_Multi_Map_Manager. - * - * This class does not perform any internal locking of the - * @c ACE_Hash_Multi_Map_Manager it is iterating upon since locking is - * inherently inefficient and/or error-prone within an STL-style - * iterator. If you require locking, you can explicitly use an - * @c ACE_GUARD or @c ACE_READ_GUARD on the @c ACE_Hash_Multi_Map_Manager's - * internal lock, which is accessible via its @c mutex method. - */ -template -class ACE_Hash_Multi_Map_Iterator : public ACE_Hash_Multi_Map_Iterator_Base -{ -public: - // = Initialization method. - ACE_Hash_Multi_Map_Iterator (ACE_Hash_Multi_Map_Manager &mm, - int tail = 0); - - // = Iteration methods. - /// Move forward by one element in the set. Returns 0 when all the - /// items in the set have been seen, else 1. - int advance (void); - - /// Dump the state of an object. - void dump (void) const; - - // = STL styled iteration, compare, and reference functions. - - /// Prefix advance. - ACE_Hash_Multi_Map_Iterator &operator++ (void); - - /// Postfix advance. - ACE_Hash_Multi_Map_Iterator operator++ (int); - - /// Prefix reverse. - ACE_Hash_Multi_Map_Iterator &operator-- (void); - - /// Postfix reverse. - ACE_Hash_Multi_Map_Iterator operator-- (int); - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; -}; - -/** - * @class ACE_Hash_Multi_Map_Const_Iterator - * - * @brief Const forward iterator for the @c ACE_Hash_Multi_Map_Manager. - * - * This class does not perform any internal locking of the - * @c ACE_Hash_Multi_Map_Manager it is iterating upon since locking is - * inherently inefficient and/or error-prone within an STL-style - * iterator. If you require locking, you can explicitly use an - * @c ACE_GUARD or @c ACE_READ_GUARD on the @c ACE_Hash_Multi_Map_Manager's - * internal lock, which is accessible via its @c mutex() method. - */ -template -class ACE_Hash_Multi_Map_Const_Iterator : public ACE_Hash_Multi_Map_Const_Iterator_Base -{ -public: - // = Initialization method. - ACE_Hash_Multi_Map_Const_Iterator (const ACE_Hash_Multi_Map_Manager &mm, - int tail = 0); - - // = Iteration methods. - /// Move forward by one element in the set. Returns 0 when all the - /// items in the set have been seen, else 1. - int advance (void); - - /// Dump the state of an object. - void dump (void) const; - - // = STL styled iteration, compare, and reference functions. - - /// Prefix advance. - ACE_Hash_Multi_Map_Const_Iterator &operator++ (void); - - /// Postfix advance. - ACE_Hash_Multi_Map_Const_Iterator operator++ (int); - - /// Prefix reverse. - ACE_Hash_Multi_Map_Const_Iterator &operator-- (void); - - /// Postfix reverse. - ACE_Hash_Multi_Map_Const_Iterator operator-- (int); - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; -}; - -/** - * @class ACE_Hash_Multi_Map_Bucket_Iterator - * - * @brief Forward iterator for the @c ACE_Hash_Multi_Map_Manager which - * only traverses a particular bucket. The particular bucket is - * specified by the @c EXT_ID parameter specified in the constructor. - * - * This class does not perform any internal locking of the - * @c ACE_Hash_Multi_Map_Manager it is iterating upon since locking is - * inherently inefficient and/or error-prone within an STL-style - * iterator. If you require locking, you can explicitly use an - * @c ACE_GUARD or @c ACE_READ_GUARD on the @c ACE_Hash_Multi_Map_Manager's - * internal lock, which is accessible via its @c mutex method. - * - * Note that a creation method for this new iterator cannot be added - * to the hash map, since this would require adding explicit template - * instantiations for bucket iterators on platforms with broken - * templates. - */ -template -class ACE_Hash_Multi_Map_Bucket_Iterator -{ -public: - // = Initialization method. - ACE_Hash_Multi_Map_Bucket_Iterator (ACE_Hash_Multi_Map_Manager &mm, - const EXT_ID &ext_id, - int tail = 0); - - // = STL styled iteration, compare, and reference functions. - - /// Prefix advance. - ACE_Hash_Multi_Map_Bucket_Iterator &operator++ (void); - - /// Postfix advance. - ACE_Hash_Multi_Map_Bucket_Iterator operator++ (int); - - /// Prefix reverse. - ACE_Hash_Multi_Map_Bucket_Iterator &operator-- (void); - - /// Postfix reverse. - ACE_Hash_Multi_Map_Bucket_Iterator operator-- (int); - - /// Returns a reference to the interal element this object is pointing to. - ACE_Hash_Multi_Map_Entry& operator* (void) const; - - /// Returns a pointer to the interal element this object is pointing to. - ACE_Hash_Multi_Map_Entry* operator-> (void) const; - - /// Returns reference the Hash_Multi_Map_Manager that is being iterated - /// over. - ACE_Hash_Multi_Map_Manager& map (void); - - /// Check if two iterators point to the same position - bool operator== (const ACE_Hash_Multi_Map_Bucket_Iterator &) const; - bool operator!= (const ACE_Hash_Multi_Map_Bucket_Iterator &) const; - -protected: - /// Move forward by one element in the set. Returns 0 when there's - /// no more item in the set after the current items, else 1. - int forward_i (void); - - /// Move backward by one element in the set. Returns 0 when there's - /// no more item in the set before the current item, else 1. - int reverse_i (void); - - /// Map we are iterating over. - ACE_Hash_Multi_Map_Manager *map_man_; - - /// Keeps track of how far we've advanced in the table. - ssize_t index_; - - /// Keeps track of how far we've advanced in a linked list in each - /// table slot. - ACE_Hash_Multi_Map_Entry *next_; -}; - -/** - * @class ACE_Hash_Multi_Map_Reverse_Iterator - * - * @brief Reverse iterator for the @c ACE_Hash_Multi_Map_Manager. - * - * This class does not perform any internal locking of the - * @c ACE_Hash_Multi_Map_Manager it is iterating upon since locking is - * inherently inefficient and/or error-prone within an STL-style - * iterator. If you require locking, you can explicitly use an - * @c ACE_GUARD or @c ACE_READ_GUARD on the @c ACE_Hash_Multi_Map_Manager's - * internal lock, which is accessible via its @c mutex method. - */ -template -class ACE_Hash_Multi_Map_Reverse_Iterator : public ACE_Hash_Multi_Map_Iterator_Base -{ -public: - // = Initialization method. - ACE_Hash_Multi_Map_Reverse_Iterator (ACE_Hash_Multi_Map_Manager &mm, - int head = 0); - - // = Iteration methods. - /// Move forward by one element in the set. Returns 0 when all the - /// items in the set have been seen, else 1. - int advance (void); - - /// Dump the state of an object. - void dump (void) const; - - // = STL styled iteration, compare, and reference functions. - - /// Prefix reverse. - ACE_Hash_Multi_Map_Reverse_Iterator &operator++ (void); - - /// Postfix reverse. - ACE_Hash_Multi_Map_Reverse_Iterator operator++ (int); - - /// Prefix advance. - ACE_Hash_Multi_Map_Reverse_Iterator &operator-- (void); - - /// Postfix advance. - ACE_Hash_Multi_Map_Reverse_Iterator operator-- (int); - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -# include "ace/Hash_Multi_Map_Manager_T.inl" -#endif /* __ACE_INLINE__ */ - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "ace/Hash_Multi_Map_Manager_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Hash_Multi_Map_Manager_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ - -#include /**/ "ace/post.h" -#endif /* ACE_HASH_MULTI_MAP_MANAGER_T_H */ diff --git a/modules/worldengine/deps/acelite/ace/Hash_Multi_Map_Manager_T.inl b/modules/worldengine/deps/acelite/ace/Hash_Multi_Map_Manager_T.inl deleted file mode 100644 index 0fc32da55b..0000000000 --- a/modules/worldengine/deps/acelite/ace/Hash_Multi_Map_Manager_T.inl +++ /dev/null @@ -1,991 +0,0 @@ -// -*- C++ -*- -#include "ace/Guard_T.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -template ACE_INLINE -ACE_Hash_Multi_Map_Manager::ACE_Hash_Multi_Map_Manager (size_t size, - ACE_Allocator *table_alloc, - ACE_Allocator *entry_alloc) - : table_allocator_ (table_alloc), - entry_allocator_ (entry_alloc), - table_ (0), - total_size_ (0), - cur_size_ (0) -{ - if (this->open (size, table_alloc, entry_alloc) == -1) - ACELIB_ERROR ((LM_ERROR, ACE_TEXT ("ACE_Hash_Multi_Map_Manager\n"))); -} - -template ACE_INLINE -ACE_Hash_Multi_Map_Manager::ACE_Hash_Multi_Map_Manager (ACE_Allocator *table_alloc, - ACE_Allocator *entry_alloc) - : table_allocator_ (table_alloc), - entry_allocator_ (entry_alloc), - table_ (0), - total_size_ (0), - cur_size_ (0) -{ - if (this->open (ACE_DEFAULT_MAP_SIZE, table_alloc, entry_alloc) == -1) - ACELIB_ERROR ((LM_ERROR, ACE_TEXT ("ACE_Hash_Multi_Map_Manager\n"))); -} - -template ACE_INLINE int -ACE_Hash_Multi_Map_Manager::close (void) -{ - ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1); - - return this->close_i (); -} - -template ACE_INLINE int -ACE_Hash_Multi_Map_Manager::unbind_all (void) -{ - ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1); - - return this->unbind_all_i (); -} - -template ACE_INLINE -ACE_Hash_Multi_Map_Manager::~ACE_Hash_Multi_Map_Manager (void) -{ - this->close (); -} - -template ACE_INLINE size_t -ACE_Hash_Multi_Map_Manager::current_size (void) const -{ - return this->cur_size_; -} - -template ACE_INLINE size_t -ACE_Hash_Multi_Map_Manager::total_size (void) const -{ - return this->total_size_; -} - -template ACE_INLINE ACE_LOCK & -ACE_Hash_Multi_Map_Manager::mutex (void) -{ - ACE_TRACE ("ACE_Hash_Multi_Map_Manager::mutex"); - return this->lock_; -} - -template ACE_INLINE u_long -ACE_Hash_Multi_Map_Manager::hash (const EXT_ID &ext_id) -{ - return this->hash_key_ (ext_id); -} - -template ACE_INLINE int -ACE_Hash_Multi_Map_Manager::equal (const EXT_ID &id1, - const EXT_ID &id2) -{ - return this->compare_keys_ (id1, id2); -} - -template ACE_INLINE int -ACE_Hash_Multi_Map_Manager::bind_i (const EXT_ID &ext_id, - const INT_ID &int_id) -{ - ACE_Hash_Multi_Map_Entry *temp = 0; - - return this->bind_i (ext_id, int_id, temp); -} - -template ACE_INLINE int -ACE_Hash_Multi_Map_Manager::bind_i (const EXT_ID &ext_id, - const ACE_Unbounded_Set &int_id_set) -{ - ACE_Hash_Multi_Map_Entry *temp; - - return this->bind_i (ext_id, int_id_set, temp); -} - -template ACE_INLINE int -ACE_Hash_Multi_Map_Manager::bind (const EXT_ID &ext_id, - const INT_ID &int_id) -{ - ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1); - - return this->bind_i (ext_id, int_id); -} - -template ACE_INLINE int -ACE_Hash_Multi_Map_Manager::bind (const EXT_ID &ext_id, - const INT_ID &int_id, - ACE_Hash_Multi_Map_Entry *&entry) -{ - ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1); - - return this->bind_i (ext_id, int_id, entry); -} - -template ACE_INLINE int -ACE_Hash_Multi_Map_Manager::bind (const EXT_ID &ext_id, - const ACE_Unbounded_Set &int_id_set) -{ - ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1); - - return this->bind_i (ext_id, int_id_set); -} - -template ACE_INLINE int -ACE_Hash_Multi_Map_Manager::bind (const EXT_ID &ext_id, - const ACE_Unbounded_Set &int_id_set, - ACE_Hash_Multi_Map_Entry *&entry) -{ - ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1); - - return this->bind_i (ext_id, int_id_set, entry); -} - -template ACE_INLINE int -ACE_Hash_Multi_Map_Manager::trybind_i (const EXT_ID &ext_id, - ACE_Unbounded_Set &int_id_set) -{ - ACE_Hash_Multi_Map_Entry *temp; - - int result = this->trybind_i (ext_id, int_id_set, temp); - if (result == 1) - int_id_set = temp->int_id_set_; - return result; -} - -template ACE_INLINE int -ACE_Hash_Multi_Map_Manager::trybind (const EXT_ID &ext_id, - ACE_Unbounded_Set &int_id_set) -{ - ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1); - - return this->trybind_i (ext_id, int_id_set); -} - -template ACE_INLINE int -ACE_Hash_Multi_Map_Manager::trybind (const EXT_ID &ext_id, - ACE_Unbounded_Set &int_id_set, - ACE_Hash_Multi_Map_Entry *&entry) -{ - ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1); - - return this->trybind_i (ext_id, int_id_set, entry); -} - -template ACE_INLINE int -ACE_Hash_Multi_Map_Manager::unbind_i (const EXT_ID &ext_id) -{ - ACE_Unbounded_Set int_id_set; - - return this->unbind_i (ext_id, int_id_set); -} - -template ACE_INLINE int -ACE_Hash_Multi_Map_Manager::unbind (const EXT_ID &ext_id, - ACE_Unbounded_Set &int_id_set) -{ - ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1); - - return this->unbind_i (ext_id, int_id_set); -} - -template ACE_INLINE int -ACE_Hash_Multi_Map_Manager::unbind (const EXT_ID &ext_id, - const INT_ID &int_id) -{ - ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1); - - return this->unbind_i (ext_id, int_id); -} - -template ACE_INLINE int -ACE_Hash_Multi_Map_Manager::unbind (const EXT_ID &ext_id) -{ - ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1); - - return this->unbind_i (ext_id) == -1 ? -1 : 0; -} - -template ACE_INLINE int -ACE_Hash_Multi_Map_Manager::unbind (ACE_Hash_Multi_Map_Entry *entry) -{ - ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1); - - return this->unbind_i (entry) == -1 ? -1 : 0; -} - -template ACE_INLINE int -ACE_Hash_Multi_Map_Manager::find_i (const EXT_ID &ext_id, - ACE_Unbounded_Set &int_id_set) -{ - ACE_Hash_Multi_Map_Entry *entry; - - size_t dummy; - if (this->shared_find (ext_id, entry, dummy) == -1) - return -1; - else - { - int_id_set = entry->int_id_set_; - return 0; - } -} - -template ACE_INLINE int -ACE_Hash_Multi_Map_Manager::find_i (const EXT_ID &ext_id, - const INT_ID &int_id) -{ - ACE_Hash_Multi_Map_Entry *entry; - - size_t dummy; - if (this->shared_find (ext_id, entry, dummy) == -1) - return -1; - else - { - if (0 == entry->int_id_set_.find (int_id)) - return 0; - else - return -1; - } -} - -template ACE_INLINE int -ACE_Hash_Multi_Map_Manager::find_i (const EXT_ID &ext_id) -{ - ACE_Hash_Multi_Map_Entry *entry; - - size_t dummy; - return this->shared_find (ext_id, entry, dummy); -} - -template ACE_INLINE int -ACE_Hash_Multi_Map_Manager::find (const EXT_ID &ext_id, - ACE_Unbounded_Set &int_id_set) const -{ - ACE_Hash_Multi_Map_Manager *nc_this = - const_cast *> - (this); - - ACE_READ_GUARD_RETURN (ACE_LOCK, ace_mon, nc_this->lock_, -1); - - return nc_this->find_i (ext_id, int_id_set); -} - -template ACE_INLINE int -ACE_Hash_Multi_Map_Manager::find (const EXT_ID &ext_id, - const INT_ID &int_id) const -{ - ACE_Hash_Multi_Map_Manager *nc_this = - const_cast *> - (this); - - ACE_READ_GUARD_RETURN (ACE_LOCK, ace_mon, nc_this->lock_, -1); - - return nc_this->find_i (ext_id, int_id); -} - -template ACE_INLINE int -ACE_Hash_Multi_Map_Manager::find (const EXT_ID &ext_id) const -{ - ACE_Hash_Multi_Map_Manager *nc_this = - const_cast *> - (this); - - ACE_READ_GUARD_RETURN (ACE_LOCK, ace_mon, nc_this->lock_, -1); - - return nc_this->find_i (ext_id); -} - -template ACE_INLINE int -ACE_Hash_Multi_Map_Manager::find_i (const EXT_ID &ext_id, - ACE_Hash_Multi_Map_Entry *&entry) -{ - size_t dummy; - return this->shared_find (ext_id, entry, dummy); -} - -template ACE_INLINE int -ACE_Hash_Multi_Map_Manager::find (const EXT_ID &ext_id, - ACE_Hash_Multi_Map_Entry *&entry) const -{ - ACE_Hash_Multi_Map_Manager *nc_this = - const_cast *> - (this); - - ACE_READ_GUARD_RETURN (ACE_LOCK, ace_mon, nc_this->lock_, -1); - - return nc_this->find_i (ext_id, entry); -} - -template ACE_INLINE int -ACE_Hash_Multi_Map_Manager::rebind_i (const EXT_ID &ext_id, - const ACE_Unbounded_Set &int_id_set) -{ - ACE_Hash_Multi_Map_Entry *node; - - return this->rebind_i (ext_id, - int_id_set, - node); -} - -template ACE_INLINE int -ACE_Hash_Multi_Map_Manager::rebind_i (const EXT_ID &ext_id, - const ACE_Unbounded_Set &int_id_set, - ACE_Unbounded_Set &old_int_id_set) -{ - ACE_Hash_Multi_Map_Entry *node; - - return this->rebind_i (ext_id, - int_id_set, - old_int_id_set, - node); -} - -template ACE_INLINE int -ACE_Hash_Multi_Map_Manager::rebind_i (const EXT_ID &ext_id, - const ACE_Unbounded_Set &int_id_set, - EXT_ID &old_ext_id, - ACE_Unbounded_Set &old_int_id_set) -{ - ACE_Hash_Multi_Map_Entry *node; - - return this->rebind_i (ext_id, - int_id_set, - old_ext_id, - old_int_id_set, - node); -} - -template ACE_INLINE int -ACE_Hash_Multi_Map_Manager::rebind (const EXT_ID &ext_id, - const ACE_Unbounded_Set &int_id_set) -{ - ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1); - - return this->rebind_i (ext_id, int_id_set); -} - -template ACE_INLINE int -ACE_Hash_Multi_Map_Manager::rebind (const EXT_ID &ext_id, - const ACE_Unbounded_Set &int_id_set, - ACE_Hash_Multi_Map_Entry *&entry) -{ - ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1); - - return this->rebind_i (ext_id, int_id_set, entry); -} - -template ACE_INLINE int -ACE_Hash_Multi_Map_Manager::rebind (const EXT_ID &ext_id, - const ACE_Unbounded_Set &int_id_set, - ACE_Unbounded_Set &old_int_id_set) -{ - ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1); - - return this->rebind_i (ext_id, int_id_set, old_int_id_set); -} - -template ACE_INLINE int -ACE_Hash_Multi_Map_Manager::rebind (const EXT_ID &ext_id, - const ACE_Unbounded_Set &int_id_set, - ACE_Unbounded_Set &old_int_id_set, - ACE_Hash_Multi_Map_Entry *&entry) -{ - ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1); - - return this->rebind_i (ext_id, int_id_set, old_int_id_set, entry); -} - -template ACE_INLINE int -ACE_Hash_Multi_Map_Manager::rebind (const EXT_ID &ext_id, - const ACE_Unbounded_Set &int_id_set, - EXT_ID &old_ext_id, - ACE_Unbounded_Set &old_int_id_set) -{ - ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1); - - return this->rebind_i (ext_id, int_id_set, old_ext_id, old_int_id_set); -} - -template ACE_INLINE int -ACE_Hash_Multi_Map_Manager::rebind (const EXT_ID &ext_id, - const ACE_Unbounded_Set &int_id_set, - EXT_ID &old_ext_id, - ACE_Unbounded_Set &old_int_id_set, - ACE_Hash_Multi_Map_Entry *&entry) -{ - ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1); - - return this->rebind_i (ext_id, int_id_set, old_ext_id, old_int_id_set, entry); -} - -template ACE_INLINE -ACE_Hash_Multi_Map_Iterator -ACE_Hash_Multi_Map_Manager::begin (void) -{ - return ACE_Hash_Multi_Map_Iterator (*this); -} - -template ACE_INLINE -ACE_Hash_Multi_Map_Iterator -ACE_Hash_Multi_Map_Manager::end (void) -{ - return ACE_Hash_Multi_Map_Iterator (*this, 1); -} - -template ACE_INLINE -ACE_Hash_Multi_Map_Reverse_Iterator -ACE_Hash_Multi_Map_Manager::rbegin (void) -{ - return ACE_Hash_Multi_Map_Reverse_Iterator (*this); -} - -template ACE_INLINE -ACE_Hash_Multi_Map_Reverse_Iterator -ACE_Hash_Multi_Map_Manager::rend (void) -{ - return ACE_Hash_Multi_Map_Reverse_Iterator (*this, 1); -} - -template ACE_INLINE -ACE_Hash_Multi_Map_Entry * -ACE_Hash_Multi_Map_Manager::table (void) -{ - return this->table_; -} - -template ACE_INLINE -size_t -ACE_Hash_Multi_Map_Manager::cur_size (void) const -{ - return this->cur_size_; -} - -template ACE_INLINE -ACE_Hash_Multi_Map_Iterator_Base::ACE_Hash_Multi_Map_Iterator_Base (ACE_Hash_Multi_Map_Manager &mm, - int head) - : map_man_ (&mm), - index_ (head != 0 ? -1 : (ssize_t) mm.total_size_), - next_ (0) -{ - ACE_TRACE ("ACE_Hash_Multi_Map_Iterator_Base::ACE_Hash_Multi_Map_Iterator_Base"); - - if (mm.table_ != 0) - this->next_ = &mm.table_[head != 0 ? 0 : mm.total_size_ - 1]; -} - -template ACE_INLINE int -ACE_Hash_Multi_Map_Iterator_Base::next (ACE_Hash_Multi_Map_Entry *&entry) const -{ - ACE_TRACE ("ACE_Hash_Multi_Map_Iterator_Base::next"); - - if (this->map_man_->table_ != 0 - && this->index_ < static_cast (this->map_man_->total_size_) - && this->index_ >= 0 - && this->next_ != &this->map_man_->table_[this->index_]) - { - entry = this->next_; - return 1; - } - else - return 0; -} - -template ACE_INLINE int -ACE_Hash_Multi_Map_Iterator_Base::done (void) const -{ - ACE_TRACE ("ACE_Hash_Multi_Map_Iterator_Base::done"); - - return this->map_man_->table_ == 0 - || this->index_ >= static_cast (this->map_man_->total_size_) - || this->index_ < 0; -} - -template ACE_INLINE -ACE_Hash_Multi_Map_Entry & -ACE_Hash_Multi_Map_Iterator_Base::operator* (void) const -{ - ACE_TRACE ("ACE_Hash_Multi_Map_Iterator_Base::operator*"); - ACE_Hash_Multi_Map_Entry *retv = 0; - - int result = this->next (retv); - - ACE_UNUSED_ARG (result); - ACE_ASSERT (result != 0); - - return *retv; -} - -template ACE_INLINE -ACE_Hash_Multi_Map_Entry * -ACE_Hash_Multi_Map_Iterator_Base::operator-> (void) const -{ - ACE_TRACE ("ACE_Hash_Multi_Map_Iterator_Base::operator->"); - ACE_Hash_Multi_Map_Entry *retv = 0; - - int result = this->next (retv); - - ACE_UNUSED_ARG (result); - ACE_ASSERT (result != 0); - - return retv; -} - -// Returns the reference to the Hash_Multi_Map_manager_ex that is being -// iterated over. -template ACE_INLINE -ACE_Hash_Multi_Map_Manager& -ACE_Hash_Multi_Map_Iterator_Base::map (void) -{ - ACE_TRACE ("ACE_Hash_Multi_Map_Iterator_Base::map"); - return *this->map_man_; -} - -template ACE_INLINE bool -ACE_Hash_Multi_Map_Iterator_Base::operator== (const ACE_Hash_Multi_Map_Iterator_Base &rhs) const -{ - ACE_TRACE ("ACE_Hash_Multi_Map_Iterator_Base::operator=="); - return this->map_man_ == rhs.map_man_ - && this->index_ == rhs.index_ - && this->next_ == rhs.next_; -} - -template ACE_INLINE bool -ACE_Hash_Multi_Map_Iterator_Base::operator!= (const ACE_Hash_Multi_Map_Iterator_Base &rhs) const -{ - ACE_TRACE ("ACE_Hash_Multi_Map_Iterator_Base::operator!="); - return this->next_ != rhs.next_ - || this->index_ != rhs.index_ - || this->map_man_ != rhs.map_man_; -} - -template ACE_INLINE -ACE_Hash_Multi_Map_Const_Iterator_Base::ACE_Hash_Multi_Map_Const_Iterator_Base (const ACE_Hash_Multi_Map_Manager &mm, - int head) - : map_man_ (&mm), - index_ (head != 0 ? -1 : (ssize_t) mm.total_size_), - next_ (0) -{ - ACE_TRACE ("ACE_Hash_Multi_Map_Const_Iterator_Base::ACE_Hash_Multi_Map_Const_Iterator_Base"); - - if (mm.table_ != 0) - this->next_ = &mm.table_[head != 0 ? 0 : mm.total_size_ - 1]; -} - -template ACE_INLINE int -ACE_Hash_Multi_Map_Const_Iterator_Base::next (ACE_Hash_Multi_Map_Entry *&entry) const -{ - ACE_TRACE ("ACE_Hash_Multi_Map_Const_Iterator_Base::next"); - - if (this->map_man_->table_ != 0 - && this->index_ < (ssize_t) this->map_man_->total_size_ - && this->index_ >= 0 - && this->next_ != &this->map_man_->table_[this->index_]) - { - entry = this->next_; - return 1; - } - else - return 0; -} - -template ACE_INLINE int -ACE_Hash_Multi_Map_Const_Iterator_Base::done (void) const -{ - ACE_TRACE ("ACE_Hash_Multi_Map_Const_Iterator_Base::done"); - - return this->map_man_->table_ == 0 - || this->index_ >= (ssize_t) this->map_man_->total_size_ - || this->index_ < 0; -} - -template ACE_INLINE -ACE_Hash_Multi_Map_Entry & -ACE_Hash_Multi_Map_Const_Iterator_Base::operator* (void) const -{ - ACE_TRACE ("ACE_Hash_Multi_Map_Const_Iterator_Base::operator*"); - ACE_Hash_Multi_Map_Entry *retv = 0; - - int result = this->next (retv); - - ACE_UNUSED_ARG (result); - ACE_ASSERT (result != 0); - - return *retv; -} - -template ACE_INLINE -ACE_Hash_Multi_Map_Entry * -ACE_Hash_Multi_Map_Const_Iterator_Base::operator-> (void) const -{ - ACE_TRACE ("ACE_Hash_Multi_Map_Const_Iterator_Base::operator->"); - ACE_Hash_Multi_Map_Entry *retv = 0; - - int result = this->next (retv); - - ACE_UNUSED_ARG (result); - ACE_ASSERT (result != 0); - - return retv; -} - -// Returns the reference to the Hash_Multi_Map_manager_ex that is being -// iterated over. -template ACE_INLINE -const ACE_Hash_Multi_Map_Manager& -ACE_Hash_Multi_Map_Const_Iterator_Base::map (void) -{ - ACE_TRACE ("ACE_Hash_Multi_Map_Const_Iterator_Base::map"); - return *this->map_man_; -} - -template ACE_INLINE bool -ACE_Hash_Multi_Map_Const_Iterator_Base::operator== (const ACE_Hash_Multi_Map_Const_Iterator_Base &rhs) const -{ - ACE_TRACE ("ACE_Hash_Multi_Map_Const_Iterator_Base::operator=="); - return this->map_man_ == rhs.map_man_ - && this->index_ == rhs.index_ - && this->next_ == rhs.next_; -} - -template ACE_INLINE bool -ACE_Hash_Multi_Map_Const_Iterator_Base::operator!= (const ACE_Hash_Multi_Map_Const_Iterator_Base &rhs) const -{ - ACE_TRACE ("ACE_Hash_Multi_Map_Const_Iterator_Base::operator!="); - return this->next_ != rhs.next_ - || this->index_ != rhs.index_ - || this->map_man_ != rhs.map_man_; -} - -ACE_ALLOC_HOOK_DEFINE(ACE_Hash_Multi_Map_Iterator) - -template ACE_INLINE void -ACE_Hash_Multi_Map_Iterator::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_Hash_Multi_Map_Iterator::dump"); - - this->dump_i (); -#endif /* ACE_HAS_DUMP */ -} - -template ACE_INLINE -ACE_Hash_Multi_Map_Iterator::ACE_Hash_Multi_Map_Iterator (ACE_Hash_Multi_Map_Manager &mm, - int tail) - : ACE_Hash_Multi_Map_Iterator_Base (mm, - tail == 0 ? 1 : 0) -{ - ACE_TRACE ("ACE_Hash_Multi_Map_Iterator::ACE_Hash_Multi_Map_Iterator"); - if (tail == 0) - this->forward_i (); -} - -template ACE_INLINE int -ACE_Hash_Multi_Map_Iterator::advance (void) -{ - ACE_TRACE ("ACE_Hash_Multi_Map_Iterator::advance"); - return this->forward_i (); -} - -template ACE_INLINE -ACE_Hash_Multi_Map_Iterator & -ACE_Hash_Multi_Map_Iterator::operator++ (void) -{ - ACE_TRACE ("ACE_Hash_Multi_Map_Iterator::operator++ (void)"); - - this->forward_i (); - return *this; -} - -template ACE_INLINE -ACE_Hash_Multi_Map_Iterator -ACE_Hash_Multi_Map_Iterator::operator++ (int) -{ - ACE_TRACE ("ACE_Hash_Multi_Map_Iterator::operator++ (int)"); - - ACE_Hash_Multi_Map_Iterator retv (*this); - ++*this; - return retv; -} - -template ACE_INLINE -ACE_Hash_Multi_Map_Iterator & -ACE_Hash_Multi_Map_Iterator::operator-- (void) -{ - ACE_TRACE ("ACE_Hash_Multi_Map_Iterator::operator-- (void)"); - - this->reverse_i (); - return *this; -} - -template ACE_INLINE -ACE_Hash_Multi_Map_Iterator -ACE_Hash_Multi_Map_Iterator::operator-- (int) -{ - ACE_TRACE ("ACE_Hash_Multi_Map_Iterator::operator-- (int)"); - - ACE_Hash_Multi_Map_Iterator retv (*this); - --*this; - return retv; -} - -ACE_ALLOC_HOOK_DEFINE(ACE_Hash_Multi_Map_Const_Iterator) - -template ACE_INLINE void -ACE_Hash_Multi_Map_Const_Iterator::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_Hash_Multi_Map_Const_Iterator::dump"); - - this->dump_i (); -#endif /* ACE_HAS_DUMP */ -} - -template ACE_INLINE -ACE_Hash_Multi_Map_Const_Iterator::ACE_Hash_Multi_Map_Const_Iterator (const ACE_Hash_Multi_Map_Manager &mm, - int tail) - : ACE_Hash_Multi_Map_Const_Iterator_Base (mm, - tail == 0 ? 1 : 0) -{ - ACE_TRACE ("ACE_Hash_Multi_Map_Const_Iterator::ACE_Hash_Multi_Map_Const_Iterator"); - if (tail == 0) - this->forward_i (); -} - -template ACE_INLINE int -ACE_Hash_Multi_Map_Const_Iterator::advance (void) -{ - ACE_TRACE ("ACE_Hash_Multi_Map_Const_Iterator::advance"); - return this->forward_i (); -} - -template ACE_INLINE -ACE_Hash_Multi_Map_Const_Iterator & -ACE_Hash_Multi_Map_Const_Iterator::operator++ (void) -{ - ACE_TRACE ("ACE_Hash_Multi_Map_Const_Iterator::operator++ (void)"); - - this->forward_i (); - return *this; -} - -template ACE_INLINE -ACE_Hash_Multi_Map_Const_Iterator -ACE_Hash_Multi_Map_Const_Iterator::operator++ (int) -{ - ACE_TRACE ("ACE_Hash_Multi_Map_Const_Iterator::operator++ (int)"); - - ACE_Hash_Multi_Map_Const_Iterator retv (*this); - ++*this; - return retv; -} - -template ACE_INLINE -ACE_Hash_Multi_Map_Const_Iterator & -ACE_Hash_Multi_Map_Const_Iterator::operator-- (void) -{ - ACE_TRACE ("ACE_Hash_Multi_Map_Const_Iterator::operator-- (void)"); - - this->reverse_i (); - return *this; -} - -template ACE_INLINE -ACE_Hash_Multi_Map_Const_Iterator -ACE_Hash_Multi_Map_Const_Iterator::operator-- (int) -{ - ACE_TRACE ("ACE_Hash_Multi_Map_Const_Iterator::operator-- (int)"); - - ACE_Hash_Multi_Map_Const_Iterator retv (*this); - --*this; - return retv; -} - -template ACE_INLINE -ACE_Hash_Multi_Map_Bucket_Iterator::ACE_Hash_Multi_Map_Bucket_Iterator (ACE_Hash_Multi_Map_Manager &mm, - const EXT_ID &ext_id, - int tail) - : map_man_ (&mm) -{ - ACE_TRACE ("ACE_Hash_Multi_Map_Bucket_Iterator::ACE_Hash_Multi_Map_Bucket_Iterator"); - - this->index_ = this->map_man_->hash (ext_id) % this->map_man_->total_size_; - this->next_ = &this->map_man_->table_[this->index_]; - - if (tail == 0) - this->forward_i (); -} - -template ACE_INLINE -ACE_Hash_Multi_Map_Bucket_Iterator & -ACE_Hash_Multi_Map_Bucket_Iterator::operator++ (void) -{ - ACE_TRACE ("ACE_Hash_Multi_Map_Bucket_Iterator::operator++ (void)"); - - this->forward_i (); - return *this; -} - -template ACE_INLINE -ACE_Hash_Multi_Map_Bucket_Iterator -ACE_Hash_Multi_Map_Bucket_Iterator::operator++ (int) -{ - ACE_TRACE ("ACE_Hash_Multi_Map_Bucket_Iterator::operator++ (int)"); - - ACE_Hash_Multi_Map_Bucket_Iterator retv (*this); - ++*this; - return retv; -} - -template ACE_INLINE -ACE_Hash_Multi_Map_Bucket_Iterator & -ACE_Hash_Multi_Map_Bucket_Iterator::operator-- (void) -{ - ACE_TRACE ("ACE_Hash_Multi_Map_Bucket_Iterator::operator-- (void)"); - - this->reverse_i (); - return *this; -} - -template ACE_INLINE -ACE_Hash_Multi_Map_Bucket_Iterator -ACE_Hash_Multi_Map_Bucket_Iterator::operator-- (int) -{ - ACE_TRACE ("ACE_Hash_Multi_Map_Bucket_Iterator::operator-- (int)"); - - ACE_Hash_Multi_Map_Bucket_Iterator retv (*this); - --*this; - return retv; -} - -template int -ACE_Hash_Multi_Map_Bucket_Iterator::forward_i (void) -{ - ACE_TRACE ("ACE_Hash_Multi_Map_Bucket_Iterator::forward_i"); - - this->next_ = this->next_->next_; - return this->next_ != &this->map_man_->table_[this->index_]; -} - -template int -ACE_Hash_Multi_Map_Bucket_Iterator::reverse_i (void) -{ - ACE_TRACE ("ACE_Hash_Multi_Map_Bucket_Iterator::reverse_i"); - - this->next_ = this->next_->prev_; - return this->next_ != &this->map_man_->table_[this->index_]; -} - -template ACE_INLINE -ACE_Hash_Multi_Map_Entry & -ACE_Hash_Multi_Map_Bucket_Iterator::operator* (void) const -{ - ACE_TRACE ("ACE_Hash_Multi_Map_Bucket_Iterator::operator*"); - - return *this->next_; -} - -template ACE_INLINE -ACE_Hash_Multi_Map_Entry * -ACE_Hash_Multi_Map_Bucket_Iterator::operator-> (void) const -{ - ACE_TRACE ("ACE_Hash_Multi_Map_Bucket_Iterator::operator->"); - - return this->next_; -} - -template ACE_INLINE -ACE_Hash_Multi_Map_Manager & -ACE_Hash_Multi_Map_Bucket_Iterator::map (void) -{ - ACE_TRACE ("ACE_Hash_Multi_Map_Bucket_Iterator::map"); - return *this->map_man_; -} - -template ACE_INLINE bool -ACE_Hash_Multi_Map_Bucket_Iterator::operator== (const ACE_Hash_Multi_Map_Bucket_Iterator &rhs) const -{ - ACE_TRACE ("ACE_Hash_Multi_Map_Bucket_Iterator::operator=="); - return this->map_man_ == rhs.map_man_ - && this->index_ == rhs.index_ - && this->next_ == rhs.next_; -} - -template ACE_INLINE bool -ACE_Hash_Multi_Map_Bucket_Iterator::operator!= (const ACE_Hash_Multi_Map_Bucket_Iterator &rhs) const -{ - ACE_TRACE ("ACE_Hash_Multi_Map_Bucket_Iterator::operator!="); - return this->next_ != rhs.next_ - || this->index_ != rhs.index_ - || this->map_man_ != rhs.map_man_; -} - -ACE_ALLOC_HOOK_DEFINE(ACE_Hash_Multi_Map_Reverse_Iterator) - -template ACE_INLINE void -ACE_Hash_Multi_Map_Reverse_Iterator::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_Hash_Multi_Map_Reverse_Iterator::dump"); - - this->dump_i (); -#endif /* ACE_HAS_DUMP */ -} - -template ACE_INLINE -ACE_Hash_Multi_Map_Reverse_Iterator::ACE_Hash_Multi_Map_Reverse_Iterator (ACE_Hash_Multi_Map_Manager &mm, int head) - : ACE_Hash_Multi_Map_Iterator_Base (mm, head) -{ - ACE_TRACE ("ACE_Hash_Multi_Map_Reverse_Iterator::ACE_Hash_Multi_Map_Reverse_Iterator"); - if (head == 0) - this->reverse_i (); -} - -template ACE_INLINE int -ACE_Hash_Multi_Map_Reverse_Iterator::advance (void) -{ - ACE_TRACE ("ACE_Hash_Multi_Map_Reverse_Iterator::advance"); - return this->reverse_i (); -} - -template ACE_INLINE -ACE_Hash_Multi_Map_Reverse_Iterator & -ACE_Hash_Multi_Map_Reverse_Iterator::operator++ (void) -{ - ACE_TRACE ("ACE_Hash_Multi_Map_Reverse_Iterator::operator++ (void)"); - - this->reverse_i (); - return *this; -} - -template ACE_INLINE -ACE_Hash_Multi_Map_Reverse_Iterator -ACE_Hash_Multi_Map_Reverse_Iterator::operator++ (int) -{ - ACE_TRACE ("ACE_Hash_Multi_Map_Reverse_Iterator::operator++ (int)"); - - ACE_Hash_Multi_Map_Reverse_Iterator retv (*this); - ++*this; - return retv; -} - -template ACE_INLINE -ACE_Hash_Multi_Map_Reverse_Iterator & -ACE_Hash_Multi_Map_Reverse_Iterator::operator-- (void) -{ - ACE_TRACE ("ACE_Hash_Multi_Map_Reverse_Iterator::operator-- (void)"); - - this->forward_i (); - return *this; -} - -template ACE_INLINE -ACE_Hash_Multi_Map_Reverse_Iterator -ACE_Hash_Multi_Map_Reverse_Iterator::operator-- (int) -{ - ACE_TRACE ("ACE_Hash_Multi_Map_Reverse_Iterator::operator-- (int)"); - - ACE_Hash_Multi_Map_Reverse_Iterator retv (*this); - --*this; - return retv; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Hashable.cpp b/modules/worldengine/deps/acelite/ace/Hashable.cpp deleted file mode 100644 index 547a3065f6..0000000000 --- a/modules/worldengine/deps/acelite/ace/Hashable.cpp +++ /dev/null @@ -1,28 +0,0 @@ -#include "ace/Hashable.h" - -#if !defined (__ACE_INLINE__) -#include "ace/Hashable.inl" -#endif /* __ACE_INLINE __ */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_Hashable::~ACE_Hashable (void) -{ -} - -unsigned long -ACE_Hashable::hash (void) const -{ - // In doing the check below, we take chance of paying a performance - // price when the hash value is zero. But, that will (hopefully) - // happen far less often than a non-zero value, so this caching - // strategy should pay off, esp. if hash computation is expensive - // relative to the simple comparison. - - if (this->hash_value_ == 0) - this->hash_value_ = this->hash_i (); - - return this->hash_value_; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Hashable.h b/modules/worldengine/deps/acelite/ace/Hashable.h deleted file mode 100644 index 6e9e332ad4..0000000000 --- a/modules/worldengine/deps/acelite/ace/Hashable.h +++ /dev/null @@ -1,63 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Hashable.h - * - * @author Doug Schmidt - */ -//============================================================================= - -#ifndef ACE_HASHABLE_H -#define ACE_HASHABLE_H - -#include /**/ "ace/pre.h" - -#include /**/ "ace/ACE_export.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_Hashable - * - * @brief ACE_Hashable - */ -class ACE_Export ACE_Hashable -{ -public: - - /// Destructor. - virtual ~ACE_Hashable (void); - - /// Computes and returns hash value. This "caches" the hash value to - /// improve performance. - virtual unsigned long hash (void) const; - -protected: - /// Protected constructor. - ACE_Hashable (void); - - /// This is the method that actually performs the non-cached hash - /// computation. - virtual unsigned long hash_i (void) const = 0; - -protected: - - /// Pre-computed hash-value. - mutable unsigned long hash_value_; - -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/Hashable.inl" -#endif /* __ACE_INLINE __ */ - -#include /**/ "ace/post.h" - -#endif /*ACE_HASHABLE_H*/ diff --git a/modules/worldengine/deps/acelite/ace/Hashable.inl b/modules/worldengine/deps/acelite/ace/Hashable.inl deleted file mode 100644 index ac9af977a3..0000000000 --- a/modules/worldengine/deps/acelite/ace/Hashable.inl +++ /dev/null @@ -1,10 +0,0 @@ -// -*- C++ -*- -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_INLINE -ACE_Hashable::ACE_Hashable (void) - : hash_value_ (0) -{ -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/High_Res_Timer.cpp b/modules/worldengine/deps/acelite/ace/High_Res_Timer.cpp deleted file mode 100644 index 13449b5981..0000000000 --- a/modules/worldengine/deps/acelite/ace/High_Res_Timer.cpp +++ /dev/null @@ -1,527 +0,0 @@ -// Be very carefull before changing the calculations inside -// ACE_High_Res_Timer. The precision matters and we are using integer -// calculations not floating point. Also look good at the emulated 64 -// bit int class (inside Basic_Types{h,i,cpp} before changing -// anything. It's operator/ only returns 32 bits not 64 bits, among -// other things. - -#include "ace/High_Res_Timer.h" - -#if !defined (__ACE_INLINE__) -#include "ace/High_Res_Timer.inl" -#endif /* __ACE_INLINE__ */ - -#include "ace/Stats.h" -#include "ace/OS_NS_stdio.h" -#include "ace/OS_NS_string.h" -#include "ace/OS_NS_sys_time.h" -#include "ace/OS_NS_time.h" -#include "ace/OS_NS_unistd.h" -#include "ace/OS_NS_stdlib.h" -#include "ace/Truncate.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_ALLOC_HOOK_DEFINE(ACE_High_Res_Timer) - -ACE_END_VERSIONED_NAMESPACE_DECL - -// For Intel platforms, a scale factor is required for -// ACE_OS::gethrtime. We'll still set this to one to prevent division -// by zero errors. -#if (defined (ACE_WIN32) || defined (ACE_HAS_POWERPC_TIMER) || \ - defined (ACE_HAS_PENTIUM) || defined (ACE_HAS_ALPHA_TIMER)) && \ - !defined (ACE_HAS_HI_RES_TIMER) - -# include "ace/Guard_T.h" -# include "ace/Recursive_Thread_Mutex.h" -# include "ace/Object_Manager.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/// Initialize the global_scale_factor_ to 1. The first -/// ACE_High_Res_Timer instance construction will override this -/// value. -/* static */ -ACE_High_Res_Timer::global_scale_factor_type ACE_High_Res_Timer::global_scale_factor_ = 1u; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#else /* ! (ACE_WIN32 || ACE_HAS_POWERPC_TIMER || \ - ACE_HAS_PENTIUM || ACE_HAS_ALPHA_TIMER) || - ACE_HAS_HI_RES_TIMER */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - - // A scale_factor of 1000 converts nanosecond ticks to microseconds. - // That is, on these platforms, 1 tick == 1 nanosecond. - /* static */ - ACE_UINT32 ACE_High_Res_Timer::global_scale_factor_ = 1000u; - -ACE_END_VERSIONED_NAMESPACE_DECL -#endif /* ! (ACE_WIN32 || ACE_HAS_POWERPC_TIMER || \ - ACE_HAS_PENTIUM || ACE_HAS_ALPHA_TIMER) || - ACE_HAS_HI_RES_TIMER */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/// This is used to tell if the global_scale_factor_ has been -/// set, and if high resolution timers are supported. -/* static */ -int ACE_High_Res_Timer::global_scale_factor_status_ = 0; - -#if defined (ACE_LINUX) -// Determine the apparent CPU clock speed from /proc/cpuinfo -ACE_UINT32 -ACE_High_Res_Timer::get_cpuinfo (void) -{ - ACE_UINT32 scale_factor = 1u; - - // Get the BogoMIPS from /proc/cpuinfo. It works fine on Alpha and - // Pentium Pro. For other CPUs, it will be necessary to interpret - // the BogoMips, as described in the BogoMips mini-HOWTO. Note that - // this code assumes an order to the /proc/cpuinfo contents. The - // BogoMips rating had better come after CPU type and model info. -#if !defined (__alpha__) - bool supported = false; -#endif /* __alpha__ */ - - FILE *cpuinfo = ACE_OS::fopen (ACE_TEXT ("/proc/cpuinfo"), - ACE_TEXT ("r")); - - if (cpuinfo != 0) - { - char buf[128]; - - // ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("\nReading /proc/cpuinfo..."))); - - while (ACE_OS::fgets (buf, sizeof buf, cpuinfo)) - { -#if defined (__alpha__) - ACE_UINT32 whole; - ACE_UINT32 fractional; - if (::sscanf (buf, - "BogoMIPS : %d.%d\n", - &whole, - &fractional) == 2 - || ::sscanf (buf, - "bogomips : %d.%d\n", - &whole, - &fractional) == 2) - { - scale_factor = whole; - break; - } -#else - double mhertz = 1; - double bmips = 1; - char arg[128]; - - // CPU type? - if (::sscanf (buf, "cpu : %s\n", arg) == 1) - { - // If this is an Alpha chip, then the BogoMips rating is - // usable... - if (ACE_OS::strncmp (arg, - "Alpha", - 5) == 0) - { - supported = true; - } - } - // Pentium CPU model? - else if (!supported - && ::sscanf (buf, "model name : Pentium %s\n", arg) == 1) - { - // But if we don't have the right kind of Intel chip, - // just quit. - if (ACE_OS::strcmp (arg, "II") == 0 - || ACE_OS::strcmp (arg, "III") == 0 - || ACE_OS::strcmp (arg, "IV") == 0 - || ACE_OS::strcmp (arg, "Pro") == 0) - { - supported = true; - } - } - else if (::sscanf (buf, "cpu MHz : %lf\n", &mhertz) == 1) - { - // If the line "cpu MHz : xxx" is present, then it's a - // reliable measure of the CPU speed - according to the - // kernel-source. It's possible to see a 0 value reported. - if (mhertz > 0.0) - { - scale_factor = (ACE_UINT32) (mhertz + 0.5); - break; - } - } - else if (::sscanf (buf, "bogomips : %lf\n", &bmips) == 1 - || ::sscanf (buf, "BogoMIPS : %lf\n", &bmips) == 1) - { - if (supported) - { - scale_factor = (ACE_UINT32) (bmips + 0.5); - // ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT (" setting the clock scale factor to %u"), scale_factor)); - } -#if 0 - else - { - ACELIB_DEBUG ((LM_DEBUG, - ACE_TEXT ("\nThe BogoMIPS metric is not supported on this platform" - "\n\tReport the results of the clock calibration and" - "\n\tthe contents of /proc/cpuinfo to the ace-users mailing list"))); - } -#endif /* 0 */ - break; - } -#endif /* __alpha__ */ - } - - // ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT (" (done)\n"))); - - ACE_OS::fclose (cpuinfo); - } - - return scale_factor; -} -#endif /* ACE_LINUX */ - - -ACE_High_Res_Timer::global_scale_factor_type -ACE_High_Res_Timer::global_scale_factor (void) -{ -#if (defined (ACE_WIN32) || defined (ACE_HAS_POWERPC_TIMER) || \ - defined (ACE_HAS_PENTIUM) || defined (ACE_HAS_ALPHA_TIMER)) && \ - !defined (ACE_HAS_HI_RES_TIMER) && \ - (defined (ACE_WIN32) || \ - defined (ghs) || defined (__GNUG__) || \ - defined (__INTEL_COMPILER)) - // Check if the global scale factor needs to be set, and do if so. - if (ACE_High_Res_Timer::global_scale_factor_status_ == 0) - { - // Grab ACE's static object lock. This doesn't have anything to - // do with static objects; it's just a convenient lock to use. - ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon, - *ACE_Static_Object_Lock::instance (), 0)); - - // Double check - if (ACE_High_Res_Timer::global_scale_factor_status_ == 0) - { -# if defined (ACE_WIN32) - // This a higher-precision version, specific for Windows systems - LARGE_INTEGER freq; - if (::QueryPerformanceFrequency (&freq)) - { - ACE_High_Res_Timer::global_scale_factor(freq.QuadPart); - - // Succeeded in setting the global scale factor - ACE_High_Res_Timer::global_scale_factor_status_ = 1; - } - else - { - // High-Res timers not supported - ACE_High_Res_Timer::global_scale_factor_status_ = -1; - } -# elif defined (ACE_LINUX) - ACE_High_Res_Timer::global_scale_factor (ACE_High_Res_Timer::get_cpuinfo ()); -# endif /* ! ACE_WIN32 && ! (ACE_LINUX && __alpha__) */ - -# if !defined (ACE_WIN32) - if (ACE_High_Res_Timer::global_scale_factor_ <= 1u) - // Failed to retrieve CPU speed from system, so calculate it. - ACE_High_Res_Timer::calibrate (); - - // We have set the global scale factor so set out status - // to 1, this way we only set the global_scale_factor_ once. - // Must be in the !ACE_WIN32 block to make sure that we - // not change a value of -1 (only done for ACE_WINC32) by accident - // to 1 - ACE_High_Res_Timer::global_scale_factor_status_ = 1; -# endif // (ACE_WIN32) - } - } - -#endif /* (ACE_WIN32 || ACE_HAS_POWERPC_TIMER || \ - ACE_HAS_PENTIUM || ACE_HAS_ALPHA_TIMER) && \ - ! ACE_HAS_HI_RES_TIMER && - ((WIN32 && ! WINCE) || ghs || __GNUG__) */ - - return ACE_High_Res_Timer::global_scale_factor_; -} - -ACE_High_Res_Timer::ACE_High_Res_Timer (void) -{ - ACE_TRACE ("ACE_High_Res_Timer::ACE_High_Res_Timer"); - - this->reset (); - - // Make sure that the global scale factor is set. - (void) global_scale_factor (); -} - -ACE_UINT32 -ACE_High_Res_Timer::calibrate (const ACE_UINT32 usec, - const u_int iterations) -{ - const ACE_Time_Value sleep_time (0, usec); - ACE_Stats delta_hrtime; - // In units of 100 usec, to avoid overflow. - ACE_Stats actual_sleeps; - - for (u_int i = 0; - i < iterations; - ++i) - { - ACE_Time_Value const actual_start = ACE_OS::gettimeofday (); - ACE_hrtime_t const start = ACE_OS::gethrtime (); - ACE_OS::sleep (sleep_time); - ACE_hrtime_t const stop = ACE_OS::gethrtime (); - ACE_Time_Value const actual_delta = - ACE_OS::gettimeofday () - actual_start; - - // Store the sample. - delta_hrtime.sample (ACE_Utils::truncate_cast (stop - start)); - actual_sleeps.sample (actual_delta.msec () * 100u); - } - - // Calculate the mean value of the samples, with no fractional - // precision. Use it for the global scale factor. - ACE_Stats_Value ticks (0); - delta_hrtime.mean (ticks); - - ACE_Stats_Value actual_sleep (0); - actual_sleeps.mean (actual_sleep); - - // The addition of 5 below rounds instead of truncates. - const ACE_UINT32 scale_factor = - (ticks.whole () / actual_sleep.whole () + 5) / - 10u /* usec/100 usec */; - ACE_High_Res_Timer::global_scale_factor (scale_factor); - - return scale_factor; -} - -void -ACE_High_Res_Timer::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_High_Res_Timer::dump"); - - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("\nglobal_scale_factor_: %u\n"), - global_scale_factor ())); - ACELIB_DEBUG ((LM_DEBUG, - ACE_TEXT (":\nstart_.hi (): %8x; start_.lo (): %8x;\n") - ACE_TEXT ("end_.hi (): %8x; end_.lo (): %8x;\n") - ACE_TEXT ("total_.hi (): %8x; total_.lo (): %8x;\n") - ACE_TEXT ("start_incr_.hi () %8x; start_incr_.lo (): %8x;\n"), - static_cast (start_ >> 32), - static_cast (start_ & 0xfffffffful), - static_cast (end_ >> 32), - static_cast (end_ & 0xfffffffful), - static_cast (total_ >> 32), - static_cast (total_ & 0xfffffffful), - static_cast (start_incr_ >> 32), - static_cast (start_incr_ & 0xfffffffful))); - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} - -void -ACE_High_Res_Timer::reset (void) -{ - ACE_TRACE ("ACE_High_Res_Timer::reset"); - - this->start_ = 0; - this->end_ = 0; - this->total_ = 0; - this->start_incr_ = 0; -} - -void -ACE_High_Res_Timer::elapsed_time (ACE_Time_Value &tv) const -{ - this->hrtime_to_tv (tv, - ACE_High_Res_Timer::elapsed_hrtime (this->end_, this->start_)); -} - -#if defined (ACE_HAS_POSIX_TIME) -// Note... Win32 does not have ACE_HAS_POSIX_TIME, so the scale factor -// does not need to take into account the different units on Win32. - -void -ACE_High_Res_Timer::elapsed_time (struct timespec &elapsed_time) const -{ - // This implementation should be cleaned up. - - // Just grab the nanoseconds. That is, leave off all values above - // microsecond. This equation is right! Don't mess with me! (It - // first strips off everything but the portion less than 1 usec. - // Then it converts that to nanoseconds by dividing by the scale - // factor to convert to usec, and multiplying by 1000.) The cast - // avoids a MSVC 4.1 compiler warning about narrowing. - ACE_hrtime_t elapsed = - ACE_High_Res_Timer::elapsed_hrtime (this->end_, this->start_); - u_long nseconds = static_cast (elapsed % - global_scale_factor () * 1000u / - global_scale_factor ()); - - // Get just the microseconds (dropping any left over nanoseconds). - ACE_UINT32 useconds = (ACE_UINT32) (elapsed / global_scale_factor ()); - - elapsed_time.tv_sec = (time_t) (useconds / ACE_ONE_SECOND_IN_USECS); - // Transforms one second in microseconds into nanoseconds. - elapsed_time.tv_nsec = (time_t) ((useconds % ACE_ONE_SECOND_IN_USECS) * 1000u + nseconds); -} -#endif /* ACE_HAS_POSIX_TIME */ - -void -ACE_High_Res_Timer::elapsed_time_incr (ACE_Time_Value &tv) const -{ - this->hrtime_to_tv (tv, total_); -} - -void -ACE_High_Res_Timer::elapsed_time (ACE_hrtime_t &nanoseconds) const -{ -#if !defined (ACE_WIN32) - // Please do _not_ rearrange this equation. It is carefully - // designed and tested to avoid overflow on machines that don't have - // native 64-bit ints. In particular, division can be a problem. - // For more background on this, please see bugzilla #1024. - nanoseconds = ACE_High_Res_Timer::elapsed_hrtime (this->end_, this->start_) - * (1024000u / ACE_High_Res_Timer::global_scale_factor ()); - // Caution - Borland has a problem with >>=, so resist the temptation. - nanoseconds = nanoseconds >> 10; - // Right shift is implemented for non native 64-bit ints - // operator/ only for a 32 bit result ! -#else - // This a higher-precision version, specific for Windows systems - nanoseconds = - (ACE_High_Res_Timer::elapsed_hrtime (this->end_, this->start_) * ACE_HR_SCALE_CONVERSION * 1000u) / - ACE_High_Res_Timer::global_scale_factor (); -#endif -} - -void -ACE_High_Res_Timer::elapsed_time_incr (ACE_hrtime_t &nanoseconds) const -{ -#if !defined (ACE_WIN32) - // Same as above. - nanoseconds = this->total_ - * (1024000u / ACE_High_Res_Timer::global_scale_factor ()); - // Caution - Borland has a problem with >>=, so resist the temptation. - nanoseconds = nanoseconds >> 10; -#else - // This a higher-precision version, specific for Windows systems - nanoseconds = - this->total_ * 1000000000u / - ACE_High_Res_Timer::global_scale_factor (); -#endif -} - -void -ACE_High_Res_Timer::print_ave (const ACE_TCHAR *str, - const int count, - ACE_HANDLE handle) const -{ - ACE_TRACE ("ACE_High_Res_Timer::print_ave"); - - // Get the total number of nanoseconds elapsed. - ACE_hrtime_t total_nanoseconds; - this->elapsed_time (total_nanoseconds); - - // Separate to seconds and nanoseconds. - u_long total_secs = - static_cast (total_nanoseconds / (ACE_UINT32) ACE_ONE_SECOND_IN_NSECS); - ACE_UINT32 extra_nsecs = - static_cast (total_nanoseconds % (ACE_UINT32) ACE_ONE_SECOND_IN_NSECS); - - ACE_TCHAR buf[100]; - if (count > 1) - { - ACE_hrtime_t avg_nsecs = total_nanoseconds / (ACE_UINT32) count; - ACE_OS::sprintf (buf, - ACE_TEXT (" count = %d, total (secs %lu, usecs %u), avg usecs = %lu\n"), - count, - total_secs, - (extra_nsecs + 500u) / 1000u, - (u_long) ((avg_nsecs + 500u) / 1000u)); - } - else - ACE_OS::sprintf (buf, - ACE_TEXT (" total %3lu.%06lu secs\n"), - total_secs, - (extra_nsecs + 500lu) / 1000lu); - - ACE_OS::write (handle, - str, - ACE_OS::strlen (str)); - ACE_OS::write (handle, - buf, - ACE_OS::strlen (buf)); -} - -void -ACE_High_Res_Timer::print_total (const ACE_TCHAR *str, - const int count, - ACE_HANDLE handle) const -{ - ACE_TRACE ("ACE_High_Res_Timer::print_total"); - - // Get the total number of nanoseconds elapsed. - ACE_hrtime_t total_nanoseconds; - this->elapsed_time (total_nanoseconds); - - // Separate to seconds and nanoseconds. - u_long total_secs = - static_cast (total_nanoseconds / (ACE_UINT32) ACE_ONE_SECOND_IN_NSECS); - ACE_UINT32 extra_nsecs = - static_cast (total_nanoseconds % (ACE_UINT32) ACE_ONE_SECOND_IN_NSECS); - - ACE_TCHAR buf[100]; - if (count > 1) - { - ACE_hrtime_t avg_nsecs = this->total_ / (ACE_UINT32) count; - - ACE_OS::sprintf (buf, - ACE_TEXT (" count = %d, total (secs %lu, usecs %u), avg usecs = %lu\n"), - count, - total_secs, - (extra_nsecs + 500u) / 1000u, - (u_long) ((avg_nsecs + 500u) / 1000u)); - } - else - ACE_OS::sprintf (buf, - ACE_TEXT (" total %3lu.%06u secs\n"), - total_secs, - (extra_nsecs + 500u) / 1000u); - - ACE_OS::write (handle, - str, - ACE_OS::strlen (str)); - ACE_OS::write (handle, - buf, - ACE_OS::strlen (buf)); -} - -int -ACE_High_Res_Timer::get_env_global_scale_factor (const ACE_TCHAR *env) -{ - if (env != 0) - { - const char *env_value = ACE_OS::getenv (ACE_TEXT_ALWAYS_CHAR (env)); - if (env_value != 0) - { - int const value = ACE_OS::atoi (env_value); - if (value > 0) - { - ACE_High_Res_Timer::global_scale_factor (value); - return 0; - } - } - } - - return -1; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/High_Res_Timer.h b/modules/worldengine/deps/acelite/ace/High_Res_Timer.h deleted file mode 100644 index 85d59a3c0e..0000000000 --- a/modules/worldengine/deps/acelite/ace/High_Res_Timer.h +++ /dev/null @@ -1,307 +0,0 @@ -// -*- C++ -*- - -//========================================================================== -/** - * @file High_Res_Timer.h - * - * @author Douglas C. Schmidt - */ -//========================================================================== - -#ifndef ACE_HIGH_RES_TIMER_H -#define ACE_HIGH_RES_TIMER_H -#include /**/ "ace/pre.h" - -#include /**/ "ace/ACE_export.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Basic_Types.h" -#include "ace/OS_NS_time.h" -#include "ace/Time_Value.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_High_Res_Timer - * - * @brief A high resolution timer class wrapper that encapsulates - * OS-specific high-resolution timers, such as those found on - * Solaris, AIX, Win32/Pentium, and VxWorks. - * - * Most of the member functions don't return values. The only - * reason that one would fail is if high-resolution time isn't - * supported on the platform. To avoid impacting performance - * and complicating the interface, in that case, - * is used instead. - * The global scale factor is required for platforms that have - * high-resolution timers that return units other than - * microseconds, such as clock ticks. It is represented as a - * static u_long, can only be accessed through static methods, - * and is used by all instances of High Res Timer. The member - * functions that return or print times use the global scale - * factor. They divide the "time" that they get from - * by global_scale_factor_ to obtain the - * time in microseconds. Its units are therefore 1/microsecond. - * On Windows the global_scale_factor_ units are 1/millisecond. - * There's a macro which gives the - * units/second. Because it's possible that the units/second - * changes in the future, it's recommended to use it instead - * of a "hard coded" solution. - * Dependent on the platform and used class members, there's a - * maximum elapsed period before overflow (which is not checked). - * Look at the documentation with some members functions. - * On some (most?) implementations it's not recommended to measure - * "long" timeperiods, because the error's can accumulate fast. - * This is probably not a problem profiling code, but could be - * on if the high resolution timer class is used to initiate - * actions after a "long" timeout. - * On Solaris, a scale factor of 1000 should be used because its - * high-resolution timer returns nanoseconds. However, on Intel - * platforms, we use RDTSC which returns the number of clock - * ticks since system boot. For a 200MHz cpu, each clock tick - * is 1/200 of a microsecond; the global_scale_factor_ should - * therefore be 200 or 200000 if it's in unit/millisecond. - * On Windows ::QueryPerformanceCounter() is used, which can be a - * different implementation depending on the used windows HAL - * (Hardware Abstraction Layer). On some it uses the PC "timer chip" - * while it uses RDTSC on others. - * @note The elapsed time calculations in the print methods use - * ACE_hrtime_t values. Those methods do _not_ check for overflow! - * @note Gabe raises this issue regarding - * : on multi-processors, the processor that - * you query for your @c timer.stop() value might not be the one - * you queried for @c timer.start(). Its not clear how much - * divergence there would be, if any. - * This issue is not mentioned in the Solaris 2.5.1 gethrtime - * man page. - * A RDTSC NOTE: RDTSC is the Intel Pentium read-time stamp counter - * and is actualy a 64 bit clock cycle counter, which is increased - * with every cycle. It has a low overhead and can be read within - * 16 (pentium) or 32 (pentium II,III,...) cycles, but it doesn't - * serialize the processor, which could give wrong timings when - * profiling very short code fragments. - * Problematic is that some power sensitive devices - * (laptops for example, but probably also embedded devices), - * do change the cycle rate while running. - * Some pentiums can run on (at least) two clock frequency's. - * Another problem arises with multiprocessor computers, there - * are reports that the different RDTSC's are not always kept - * in sync. - * A windows "timer chip" NOTE: (8254-compatible real-time clock) - * When ::QueryPerformanceCounter() uses the 8254 it has a - * frequency off about 1.193 Mhz (or sometimes 3.579 Mhz?) and - * reading it requires some time (several thousand cycles). - */ -class ACE_Export ACE_High_Res_Timer -{ -public: -#if !defined (ACE_WIN32) - typedef ACE_UINT32 global_scale_factor_type; -#else - typedef ACE_UINT64 global_scale_factor_type; -#endif - - /** - * global_scale_factor_ is set to @a gsf. All High_Res_Timers use - * global_scale_factor_. This allows applications to set the scale - * factor just once for all High_Res_Timers. Check - * High_Res_Timer.cpp for the default global_scale_factors for - * several platforms. For many platforms (e.g., Solaris), the - * global_scale_factor_ is set to 1000 so that need - * not be set. Careful, a of 0 will cause division - * by zero exceptions. - * Depending on the platform its units are 1/microsecond or - * 1/millisecond. Use @c ACE_HR_SCALE_CONVERSION inside calculations - * instead a hardcoded value. - */ - static void global_scale_factor (global_scale_factor_type gsf); - - /// Returns the global_scale_factor. - static global_scale_factor_type global_scale_factor (void); - -#ifndef ACE_HR_SCALE_CONVERSION -# define ACE_HR_SCALE_CONVERSION (ACE_ONE_SECOND_IN_USECS) -#endif /* ACE_HR_SCALE_CONVERSION */ - - /** - * Sets the global_scale_factor to the value in the @a env - * environment variable. Returns 0 on success, -1 on failure. - * @note If @a env points to string "0" (value zero), this call will fail. - * This is basically a no-op on CE because there is no concept of - * environment variable on CE. - */ - static int get_env_global_scale_factor (const ACE_TCHAR *env - = ACE_TEXT ("ACE_SCALE_FACTOR")); - - /** - * Set (and return, for info) the global scale factor by sleeping - * for @a usec and counting the number of intervening clock cycles. - * Average over @a iterations of @a usec each. On some platforms, - * such as Pentiums, this is called automatically during the first - * ACE_High_Res_Timer construction with the default parameter - * values. An application can override that by calling calibrate - * with any desired parameter values _prior_ to constructing the - * first ACE_High_Res_Timer instance. - * Beware for platforms that can change the cycle rate on the fly. - */ - static ACE_UINT32 calibrate (const ACE_UINT32 usec = 500000, - const u_int iterations = 10); - - /// Initialize the timer. - ACE_High_Res_Timer (void); - - /// Destructor. - ~ACE_High_Res_Timer (void); - - /// Reinitialize the timer. - void reset (void); - - /// Start timing. - void start (const ACE_OS::ACE_HRTimer_Op = ACE_OS::ACE_HRTIMER_GETTIME); - - /// Stop timing. - void stop (const ACE_OS::ACE_HRTimer_Op = ACE_OS::ACE_HRTIMER_GETTIME); - - /// Set @a tv to the number of microseconds elapsed. - void elapsed_time (ACE_Time_Value &tv) const; - - /// Set @a nanoseconds to the number of nanoseconds elapsed. - /** - * Will overflow when measuring more than 194 day's. - */ - void elapsed_time (ACE_hrtime_t &nanoseconds) const; - -#if defined (ACE_HAS_POSIX_TIME) - /// Returns the elapsed (stop - start) time in a struct timespec - /// (sec, nsec). - void elapsed_time (struct timespec &) const; -#endif /* ACE_HAS_POSIX_TIME */ - - /// Sets @a usecs to the elapsed (stop - start) time in microseconds. - /** - * Will overflow on windows when measuring more than appox. 2^^54 ticks. - * Is still more than 48 days with a 4 Ghz counter. - */ - void elapsed_microseconds (ACE_hrtime_t &usecs) const; - - /// Start incremental timing. - void start_incr (const ACE_OS::ACE_HRTimer_Op = ACE_OS::ACE_HRTIMER_GETTIME); - - /// Stop incremental timing. - void stop_incr (const ACE_OS::ACE_HRTimer_Op = ACE_OS::ACE_HRTIMER_GETTIME); - - /// Set @a tv to the number of microseconds elapsed between all calls - /// to start_incr and stop_incr. - void elapsed_time_incr (ACE_Time_Value &tv) const; - - /// Set @a nanoseconds to the number of nanoseconds elapsed between all calls - /// to start_incr and stop_incr. - void elapsed_time_incr (ACE_hrtime_t &nanoseconds) const; - - /// Print total time. - /// @note only use @c print_total if incremental timings had been used! - void print_total (const ACE_TCHAR *message, - const int iterations = 1, - ACE_HANDLE handle = ACE_STDOUT) const; - - /// Print average time. - void print_ave (const ACE_TCHAR *message, - const int iterations = 1, - ACE_HANDLE handle = ACE_STDOUT) const; - - /// Dump the state of an object. - void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - - /** - * Get the current "time" as the high resolution counter at this time. - * This is intended to be useful for supplying to a ACE_Timer_Queue - * as the gettimeofday function, thereby basing the timer calculations - * on the high res timer rather than wall clock time. - */ - static ACE_Time_Value gettimeofday_hr (void); - - /** - * @deprecated THIS FUNCTION IS DEPRECATED. PLEASE USE - * INSTEAD! Calls - * passing . This function can be used to parameterize - * objects such as . If - * is not set, and we're on a platform that - * requires (e.g., Win32), - * ACE_OS::gettimeofday will be used instead of . - * This allows applications on Intel to use even - * when is not set. However, setting the - * appropriately will result in the finest - * resolution possible. - */ - static ACE_Time_Value gettimeofday (const ACE_OS::ACE_HRTimer_Op = - ACE_OS::ACE_HRTIMER_GETTIME); - - /// Converts an @a hrt to @a tv using global_scale_factor_. - static void hrtime_to_tv (ACE_Time_Value &tv, - const ACE_hrtime_t hrt); - -#if defined (ACE_LINUX) - /** - * This is used to find out the Mhz of the machine for the scale - * factor. If there are any problems getting it, we just return 1 - * (the default). - */ - static ACE_UINT32 get_cpuinfo (void); -#endif /* defined (ACE_LINUX) */ - -private: - /** - * For internal use: gets the high-resolution time using - * . Except on platforms that require that the - * be set, such as ACE_WIN32, uses the - * low-resolution clock if the has not been - * set. - */ - static ACE_hrtime_t gettime (const ACE_OS::ACE_HRTimer_Op = - ACE_OS::ACE_HRTIMER_GETTIME); - - /// Calculate the difference between two ACE_hrtime_t values. It is assumed - /// that the end time is later than start time, so if end is a smaller - /// value, the time counter has wrapped around. - static ACE_hrtime_t elapsed_hrtime (const ACE_hrtime_t end, - const ACE_hrtime_t start); - - /// Starting time. - ACE_hrtime_t start_; - - /// Ending time. - ACE_hrtime_t end_; - - /// Total elapsed time. - ACE_hrtime_t total_; - - /// Start time of incremental timing. - ACE_hrtime_t start_incr_; - - /// Converts ticks to microseconds. That is, ticks / - /// global_scale_factor_ == microseconds. - static global_scale_factor_type global_scale_factor_; - - /** - * Indicates the status of the global scale factor, - * 0 = hasn't been set - * 1 = been set - * -1 = HR timer not supported - */ - static int global_scale_factor_status_; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/High_Res_Timer.inl" -#endif /* __ACE_INLINE__ */ - -#include /**/ "ace/post.h" -#endif /* ACE_HIGH_RES_TIMER_H */ diff --git a/modules/worldengine/deps/acelite/ace/High_Res_Timer.inl b/modules/worldengine/deps/acelite/ace/High_Res_Timer.inl deleted file mode 100644 index fd0a1e8b08..0000000000 --- a/modules/worldengine/deps/acelite/ace/High_Res_Timer.inl +++ /dev/null @@ -1,165 +0,0 @@ -// -*- C++ -*- */ -#include "ace/Global_Macros.h" - -#if defined (ACE_WIN32) -# include "ace/OS_NS_sys_time.h" -#endif /* ACE_WIN32 */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/// Be very careful before changing the calculations inside -/// ACE_High_Res_Timer. The precision matters and we are using integer -/// calculations not floating point. -ACE_INLINE void -ACE_High_Res_Timer::hrtime_to_tv (ACE_Time_Value &tv, - const ACE_hrtime_t hrt) -{ -#if !defined (ACE_WIN32) - // The following are based on the units of global_scale_factor_ - // being 1/microsecond. Therefore, dividing by it converts - // clock ticks to microseconds. - tv.sec ((time_t) (hrt / (ACE_UINT32) ACE_HR_SCALE_CONVERSION / - global_scale_factor ())); - - // hrt = (tv.sec * ACE_ONE_SECOND_IN_USECS + tv.usec) * global_scale_factor_ - // tv.usec = hrt / global_scale_factor_ - tv.sec * ACE_ONE_SECOND_IN_USECS - // That first term will be lossy, so factor out global_scale_factor_: - // tv.usec = (hrt - tv.sec * ACE_ONE_SECOND_IN_USECS * global_scale_factor_)/ - // global_scale_factor - ACE_hrtime_t tmp = tv.sec (); - tmp *= ((ACE_UINT32) ACE_HR_SCALE_CONVERSION * global_scale_factor ()); - tv.usec ((suseconds_t) ((hrt - tmp) / global_scale_factor ())); -#else - // This a higher-precision version, specific for Windows systems - // The following are based on the units of global_scale_factor_ - // being 1/microsecond. Therefore, dividing by it converts - // clock ticks to microseconds. - tv.sec ((time_t) (hrt / global_scale_factor () )); - - // Calculate usec, first calculate the seconds in hrtime - ACE_High_Res_Timer::global_scale_factor_type tmp = tv.sec (); - tmp *= global_scale_factor (); - tv.usec ((suseconds_t) ((hrt - tmp) * ACE_HR_SCALE_CONVERSION / global_scale_factor ())); -#endif -} - - -ACE_INLINE ACE_Time_Value -ACE_High_Res_Timer::gettimeofday (const ACE_OS::ACE_HRTimer_Op op) -{ -#if defined (ACE_WIN32) - // Get the global scale factor if there isn't one yet. - if (ACE_High_Res_Timer::global_scale_factor_status_ == 0) - ACE_High_Res_Timer::global_scale_factor (); - - // If there isn't a high-res timer, use gettimeofday (); - if (ACE_High_Res_Timer::global_scale_factor_status_ == -1) - return ACE_OS::gettimeofday (); -#endif /* ACE_WIN32 */ - - ACE_Time_Value tv; - ACE_High_Res_Timer::hrtime_to_tv (tv, ACE_OS::gethrtime (op)); - return tv; -} - -/// Get the current high res timer as the time of day. This is intended -/// to be used for a gettimeofday replacement in ACE_Timer_Queue and -/// derived classes so the timers will be based on high res timers rather -/// than wall clock time. It uses the ACE_High_Res_Timer::gettimeofday -/// function, which is deprecated. If it gets removed, please move the -/// code down here, intact. -ACE_INLINE ACE_Time_Value -ACE_High_Res_Timer::gettimeofday_hr (void) -{ - return ACE_High_Res_Timer::gettimeofday (); -} - - -ACE_INLINE ACE_hrtime_t -ACE_High_Res_Timer::gettime (const ACE_OS::ACE_HRTimer_Op op) -{ -#if defined (ACE_WIN32) - // Get the global scale factor if there isn't one yet. - if (ACE_High_Res_Timer::global_scale_factor_status_ == 0) - ACE_High_Res_Timer::global_scale_factor (); - - // If there isn't a high-res timer, use gettimeofday (); - if (ACE_High_Res_Timer::global_scale_factor_status_ == -1) - { - ACE_Time_Value const tv = ACE_OS::gettimeofday (); - // Return the time in microseconds because the global_scale_factor_ - // is 1. - return tv.sec () * ACE_ONE_SECOND_IN_USECS + tv.usec (); - } -#endif /* ACE_WIN32 */ - - return ACE_OS::gethrtime (op); -} - -ACE_INLINE ACE_hrtime_t -ACE_High_Res_Timer::elapsed_hrtime (const ACE_hrtime_t end, - const ACE_hrtime_t start) -{ - if (end > start) - return end - start; - return (~start + 1 + end); // Wrapped-around counter diff -} - -ACE_INLINE -ACE_High_Res_Timer::~ACE_High_Res_Timer (void) -{ -} - -ACE_INLINE void -ACE_High_Res_Timer::start (const ACE_OS::ACE_HRTimer_Op op) -{ - ACE_TRACE ("ACE_High_Res_Timer::start"); - this->start_ = ACE_High_Res_Timer::gettime (op); -} - -ACE_INLINE void -ACE_High_Res_Timer::stop (const ACE_OS::ACE_HRTimer_Op op) -{ - ACE_TRACE ("ACE_High_Res_Timer::stop"); - this->end_ = ACE_High_Res_Timer::gettime (op); -} - -ACE_INLINE void -ACE_High_Res_Timer::start_incr (const ACE_OS::ACE_HRTimer_Op op) -{ - ACE_TRACE ("ACE_High_Res_Timer::start_incr"); - this->start_incr_ = ACE_High_Res_Timer::gettime (op); -} - -ACE_INLINE void -ACE_High_Res_Timer::stop_incr (const ACE_OS::ACE_HRTimer_Op op) -{ - ACE_TRACE ("ACE_High_Res_Timer::stop_incr"); - this->total_ += - ACE_High_Res_Timer::elapsed_hrtime (ACE_High_Res_Timer::gettime (op), - this->start_incr_); -} - -ACE_INLINE void -ACE_High_Res_Timer::elapsed_microseconds (ACE_hrtime_t &usecs) const -{ - -#if !defined (ACE_WIN32) - ACE_hrtime_t elapsed = ACE_High_Res_Timer::elapsed_hrtime (this->end_, - this->start_); - usecs = (ACE_hrtime_t) (elapsed / global_scale_factor ()); -#else - usecs = (ACE_High_Res_Timer::elapsed_hrtime (this->end_, this->start_) * - ACE_HR_SCALE_CONVERSION) / - global_scale_factor (); -#endif -} - -ACE_INLINE void -ACE_High_Res_Timer::global_scale_factor ( - ACE_High_Res_Timer::global_scale_factor_type gsf) -{ - global_scale_factor_ = gsf; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/ICMP_Socket.cpp b/modules/worldengine/deps/acelite/ace/ICMP_Socket.cpp deleted file mode 100644 index c55493ada5..0000000000 --- a/modules/worldengine/deps/acelite/ace/ICMP_Socket.cpp +++ /dev/null @@ -1,179 +0,0 @@ -#include "ace/ICMP_Socket.h" - -#if defined (ACE_HAS_ICMP_SUPPORT) && (ACE_HAS_ICMP_SUPPORT == 1) - -#include "ace/ACE.h" -#include "ace/Sock_Connect.h" -#include "ace/Log_Category.h" -#include "ace/OS_NS_netdb.h" -#include "ace/OS_NS_sys_socket.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_ALLOC_HOOK_DEFINE (ACE_ICMP_Socket) - - -void -ACE_ICMP_Socket::dump (void) const -{ - ACE_TRACE ("ACE_ICMP_Socket::dump"); -} - -ACE_ICMP_Socket::ACE_ICMP_Socket (void) -{ - ACE_TRACE ("ACE_ICMP_Socket::ACE_ICMP_Socket"); -} - -ssize_t -ACE_ICMP_Socket::send (void const * buf, - size_t n, - ACE_Addr const & addr, - int flags) const -{ - ACE_TRACE ("ACE_ICMP_Socket::send"); - - return ACE_OS::sendto (this->get_handle (), - (char const *) buf, - n, - flags, - (sockaddr const *) addr.get_addr (), - addr.get_size ()); -} - -ssize_t -ACE_ICMP_Socket::recv (void * buf, - size_t n, - ACE_Addr & addr, - int flags) const -{ - ACE_TRACE ("ACE_ICMP_Socket::recv"); - - int addr_len = addr.get_size (); - ssize_t status = ACE_OS::recvfrom (this->get_handle (), - (char *) buf, - n, - flags, - (sockaddr *) addr.get_addr (), - (int*) &addr_len); - addr.set_size (addr_len); - - return status; -} - -ssize_t -ACE_ICMP_Socket::recv (void * buf, - size_t n, - int flags, - ACE_Time_Value const * timeout) const -{ - ACE_TRACE ("ACE_ICMP_Socket::recv"); - - return ACE::recv (this->get_handle (), - buf, - n, - flags, - timeout); -} - -int -ACE_ICMP_Socket::open (ACE_Addr const & local, - int protocol, - int reuse_addr) -{ - ACE_TRACE ("ACE_ICMP_Socket::open"); - - // Check if icmp protocol is supported on this host - int proto_number = -1; - protoent *proto = 0; - - if (! (proto = ACE_OS::getprotobyname ("icmp"))) - { - ACELIB_ERROR_RETURN - ((LM_ERROR, - ACE_TEXT ("(%P|%t) ACE_ICMP_Socket::open: %p; %s\n"), - ACE_TEXT ("getprotobyname"), - ACE_TEXT ("ICMP protocol is not properly configured ") - ACE_TEXT ("or not supported.")), - -1); - } - proto_number = proto->p_proto; - - if (proto_number != IPPROTO_ICMP || proto_number != protocol) - { - ACELIB_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("(%P|%t) ACE::ICMP_Socket::open - ") - ACE_TEXT ("only IPPROTO_ICMP protocol is ") - ACE_TEXT ("currently supported.\n")), - -1); - } - - if (ACE_SOCK::open (SOCK_RAW, - AF_INET, - protocol, - reuse_addr) == -1) - { - return -1; - } - - return this->shared_open (local); -} - -int -ACE_ICMP_Socket::shared_open (ACE_Addr const & local) -{ - ACE_TRACE ("ACE_ICMP_Socket::shared_open"); - - int error = 0; - if (local == ACE_Addr::sap_any) - { - if (ACE::bind_port (this->get_handle ()) == -1) - { - error = 1; - } - } - else if (ACE_OS::bind (this->get_handle (), - reinterpret_cast (local.get_addr ()), - local.get_size ()) == -1) - { - error = 1; - } - - if (error != 0) - { - this->close (); - } - - return error ? -1 : 0; -} - -unsigned short -ACE_ICMP_Socket::calculate_checksum (unsigned short * paddress, - int len) -{ - int nleft = len; - int sum = 0; - unsigned short * w = paddress; - unsigned short answer = 0; - while (nleft > 1) - { - sum += *w++; - nleft -= 2; - } - - if (nleft == 1) - { - *((unsigned char *) &answer) = *((unsigned char *) w); - sum += answer; - } - - // add back carry outs from top 16 bits to low 16 bits - sum = (sum >> 16) + (sum & 0xffff); // add hi 16 to low 16 - sum += (sum >> 16); // add carry - answer = ~sum; // truncate to 16 bits - - return (answer); -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_HAS_ICMP_SUPPORT == 1 */ diff --git a/modules/worldengine/deps/acelite/ace/ICMP_Socket.h b/modules/worldengine/deps/acelite/ace/ICMP_Socket.h deleted file mode 100644 index 70161ca63d..0000000000 --- a/modules/worldengine/deps/acelite/ace/ICMP_Socket.h +++ /dev/null @@ -1,108 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file ICMP_Socket.h - * - * @author Robert S. Iakobashvili - * @author Gonzalo A. Diethelm - */ -//============================================================================= - -#ifndef ACE_ICMP_SOCKET_H -#define ACE_ICMP_SOCKET_H - -#include /**/ "ace/pre.h" - -#include /**/ "ace/ACE_export.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#if defined (ACE_HAS_ICMP_SUPPORT) && (ACE_HAS_ICMP_SUPPORT == 1) - -#include "ace/SOCK.h" -#include "ace/Time_Value.h" -#include "ace/os_include/netinet/os_in.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_ICMP_Socket - * - * @brief An abstract class that forms the basis for usage of the ICMP - * protocol (that is, support for things such as ping). - */ -class ACE_Export ACE_ICMP_Socket : public ACE_SOCK -{ -public: - // = Initialization methods. - - /** - * @name Data transfer routines. - * - * Data transfer routines. - */ - //@{ - - /// Send an @a n byte @a buf to the datagram socket (uses - /// @c sendto(3) ). - ssize_t send (void const * buf, - size_t n, - ACE_Addr const & addr, - int flags = 0) const; - - /// Receive an @a n byte @a buf from the datagram socket - /// (uses @c recvfrom(3) ). - ssize_t recv (void * buf, - size_t n, - ACE_Addr & addr, - int flags = 0) const; - - /// TODO: comment - ssize_t recv (void * buf, - size_t n, - int flags, - ACE_Time_Value const * timeout) const; - - //@} - - /// Wrapper around the BSD-style @c socket system call (no QoS). - int open (ACE_Addr const & local = ACE_Addr::sap_any, - int protocol = IPPROTO_ICMP, - int reuse_addr = 0); - - /// Dump the state of object. - void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - -protected: - - // Protected constructors, so the class can only be derived from. - - /// Default constructor. - ACE_ICMP_Socket (void); - - /// Constructor that takes a local listening address. - ACE_ICMP_Socket (ACE_Addr const & local, - int protocol = IPPROTO_ICMP, - int reuse_addr = 0); - - /// Wrapper around BSD-style @c bind system call. - int shared_open (ACE_Addr const & local); - - /// Calculates check-sum. - unsigned short calculate_checksum (unsigned short* paddress, - int len); -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_HAS_ICMP_SUPPORT == 1 */ - -#include /**/ "ace/post.h" - -#endif /* ACE_ICMP_SOCKET_H */ diff --git a/modules/worldengine/deps/acelite/ace/INET_Addr.cpp b/modules/worldengine/deps/acelite/ace/INET_Addr.cpp deleted file mode 100644 index 9e8dfb22f3..0000000000 --- a/modules/worldengine/deps/acelite/ace/INET_Addr.cpp +++ /dev/null @@ -1,1212 +0,0 @@ -// Defines the Internet domain address family address format. - -#include "ace/INET_Addr.h" - -#if !defined (__ACE_INLINE__) -#include "ace/INET_Addr.inl" -#endif /* __ACE_INLINE__ */ - -#include "ace/Log_Category.h" -#include "ace/OS_NS_stdio.h" -#include "ace/OS_NS_errno.h" -#include "ace/OS_NS_stdlib.h" -#include "ace/OS_Memory.h" -#include "ace/OS_NS_arpa_inet.h" -#include "ace/OS_NS_netdb.h" -#include "ace/OS_NS_unistd.h" -#include "ace/OS_NS_sys_socket.h" -#include "ace/Truncate.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_ALLOC_HOOK_DEFINE(ACE_INET_Addr) - -// Transform the current address into string format. - -int -ACE_INET_Addr::addr_to_string (ACE_TCHAR s[], - size_t size, - int ipaddr_format) const -{ - ACE_TRACE ("ACE_INET_Addr::addr_to_string"); - - // XXX Can we (should we) include the scope id for IPv6 addresses? - char hoststr[MAXHOSTNAMELEN+1]; - - bool result = false; - if (ipaddr_format == 0) - result = (this->get_host_name (hoststr, MAXHOSTNAMELEN+1) == 0); - else - result = (this->get_host_addr (hoststr, MAXHOSTNAMELEN+1) != 0); - - if (!result) - return -1; - - size_t total_len = - ACE_OS::strlen (hoststr) - + 5 // ACE_OS::strlen ("65535"), Assuming the max port number. - + 1 // sizeof (':'), addr/port sep - + 1; // sizeof ('\0'), terminating NUL -#if !defined (ACE_WIN32) && defined (ACE_USES_WCHAR) - ACE_TCHAR const *format = ACE_TEXT("%ls:%d"); -#else - ACE_TCHAR const *format = ACE_TEXT("%s:%d"); -#endif /* !ACE_WIN32 && ACE_USES_WCHAR */ -#if defined (ACE_HAS_IPV6) - if (ACE_OS::strchr (hoststr, ACE_TEXT (':')) != 0) - { - total_len += 2; // ACE_OS::strlen ("[]") IPv6 addr frames -# if !defined (ACE_WIN32) && defined (ACE_USES_WCHAR) - format = ACE_TEXT("[%ls]:%d"); -# else - format = ACE_TEXT("[%s]:%d"); -# endif /* !ACE_WIN32 && ACE_USES_WCHAR */ - } -#endif // ACE_HAS_IPV6 - - if (size < total_len) - return -1; - else - ACE_OS::sprintf (s, format, - ACE_TEXT_CHAR_TO_TCHAR (hoststr), - this->get_port_number ()); - return 0; -} - -void -ACE_INET_Addr::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_INET_Addr::dump"); - - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - - ACE_TCHAR s[ACE_MAX_FULLY_QUALIFIED_NAME_LEN + 16]; - this->addr_to_string(s, ACE_MAX_FULLY_QUALIFIED_NAME_LEN + 16); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("%s"), s)); - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} - -// Compare two addresses for inequality. - -bool -ACE_INET_Addr::operator != (const ACE_INET_Addr &sap) const -{ - ACE_TRACE ("ACE_INET_Addr::operator !="); - return !((*this) == sap); -} - -// Compare two addresses for equality. - -bool -ACE_INET_Addr::operator == (const ACE_INET_Addr &sap) const -{ - ACE_TRACE ("ACE_INET_Addr::operator =="); - - if (this->get_type () != sap.get_type () - || this->get_size () != sap.get_size ()) - return false; - - return (ACE_OS::memcmp (&this->inet_addr_, - &sap.inet_addr_, - this->get_size ()) == 0); -} - -bool -ACE_INET_Addr::is_ip_equal (const ACE_INET_Addr &sap) const -{ - if (this->get_type () != sap.get_type () - || this->get_size () != sap.get_size ()) - return false; - -#if defined (ACE_HAS_IPV6) - if (this->get_type () == PF_INET6) - { - const unsigned int *addr = - reinterpret_cast(this->ip_addr_pointer()); - const unsigned int *saddr = - reinterpret_cast(sap.ip_addr_pointer()); - return (addr[0] == saddr[0] && - addr[1] == saddr[1] && - addr[2] == saddr[2] && - addr[3] == saddr[3]); - } - else -#endif /* ACE_HAS_IPV6 */ - return this->get_ip_address () == sap.get_ip_address(); -} - - -u_long -ACE_INET_Addr::hash (void) const -{ -#if defined (ACE_HAS_IPV6) - if (this->get_type () == PF_INET6) - { - const unsigned int *addr = (const unsigned int*)this->ip_addr_pointer(); - return addr[0] + addr[1] + addr[2] + addr[3] + this->get_port_number(); - } - else -#endif /* ACE_HAS_IPV6 */ - return this->get_ip_address () + this->get_port_number (); -} - -bool -ACE_INET_Addr::next (void) -{ - if (this->inet_addrs_.empty () || - this->inet_addrs_iter_ == this->inet_addrs_.end ()) - return false; - - union ip46 next_a = *this->inet_addrs_iter_++; - this->set_addr (&next_a, sizeof (next_a)); - return true; -} - -void -ACE_INET_Addr::reset (void) -{ - this->inet_addrs_iter_ = this->inet_addrs_.begin (); - this->next (); - return; -} - -ACE_INET_Addr::ACE_INET_Addr (void) - : ACE_Addr (determine_type (), sizeof (inet_addr_)) -{ - // ACE_TRACE ("ACE_INET_Addr::ACE_INET_Addr"); - this->reset_i (); -} - -ACE_INET_Addr & -ACE_INET_Addr::operator= (const ACE_INET_Addr& rhs) -{ - if (this != &rhs) - this->set (rhs); - return *this; -} - -int -ACE_INET_Addr::set (const ACE_INET_Addr &sa) -{ - ACE_TRACE ("ACE_INET_Addr::set"); - - if (sa.get_type () == AF_ANY) - // Ugh, this is really a base class, so don't copy it. - ACE_OS::memset (&this->inet_addr_, 0, sizeof (this->inet_addr_)); - else - { - // It's ok to make the copy. - ACE_OS::memcpy (&this->inet_addr_, - &sa.inet_addr_, - sa.get_size ()); - - this->set_type (sa.get_type()); - this->set_size (sa.get_size()); - this->inet_addrs_ = sa.inet_addrs_; - this->reset (); - } - - return 0; -} - -// Transform the string into the current addressing format. - -int -ACE_INET_Addr::string_to_addr (const char s[], int address_family) -{ - ACE_TRACE ("ACE_INET_Addr::string_to_addr"); - int result; - char *ip_buf = 0; - char *ip_addr = 0; - - // Need to make a duplicate since we'll be overwriting the string. - ACE_ALLOCATOR_RETURN (ip_buf, - ACE_OS::strdup (s), - -1); - ip_addr = ip_buf; - // We use strrchr because of IPv6 addresses. - char *port_p = ACE_OS::strrchr (ip_addr, ':'); -#if defined (ACE_HAS_IPV6) - // Check for extended IPv6 format : '[' ']' ':' - if (ip_addr[0] == '[') - { - // find closing bracket - char *cp_pos = ACE_OS::strchr (ip_addr, ']'); - // check for port separator after closing bracket - // if not found leave it, error will come later - if (cp_pos) - { - *cp_pos = '\0'; // blank out ']' - ++ip_addr; // skip over '[' - if (cp_pos[1] == ':') - port_p = cp_pos + 1; - else - port_p = cp_pos; // leads to error on missing port - } - } -#endif /* ACE_HAS_IPV6 */ - - if (port_p == 0) // Assume it's a port number. - { - char *endp = 0; - long const port = ACE_OS::strtol (ip_addr, &endp, 10); - - if (*endp == '\0') // strtol scanned the entire string - all digits - { - if (port < 0 || port > ACE_MAX_DEFAULT_PORT) - result = -1; - else - result = this->set (u_short (port), ACE_UINT32 (INADDR_ANY)); - } - else // port name - result = this->set (ip_addr, ACE_UINT32 (INADDR_ANY)); - } - else - { - *port_p = '\0'; ++port_p; // skip over ':' - - char *endp = 0; - long port = ACE_OS::strtol (port_p, &endp, 10); - - if (*endp == '\0') // strtol scanned the entire string - all digits - { - if (port < 0 || port > ACE_MAX_DEFAULT_PORT) - result = -1; - else - result = this->set (u_short (port), ip_addr, 1, address_family); - } - else - result = this->set (port_p, ip_addr); - } - - ACE_OS::free (ACE_MALLOC_T (ip_buf)); - return result; -} - -int -ACE_INET_Addr::set (const char address[], int address_family) -{ - ACE_TRACE ("ACE_INET_Addr::set"); - this->reset_i (); - return this->string_to_addr (address, address_family); -} - -ACE_INET_Addr::ACE_INET_Addr (const char address[], int address_family) - : ACE_Addr (determine_type (), sizeof (inet_addr_)) -{ - ACE_TRACE ("ACE_INET_Addr::ACE_INET_Addr"); - this->set (address, address_family); -} - -#if defined (ACE_HAS_WCHAR) -ACE_INET_Addr::ACE_INET_Addr (const wchar_t address[], int address_family) - : ACE_Addr (determine_type (), sizeof (inet_addr_)) -{ - ACE_TRACE ("ACE_INET_Addr::ACE_INET_Addr"); - this->set (address, address_family); -} - -#endif /* ACE_HAS_WCHAR */ - -// Copy constructor. - -ACE_INET_Addr::ACE_INET_Addr (const ACE_INET_Addr &sa) - : ACE_Addr (sa.get_type (), sa.get_size()) -{ - ACE_TRACE ("ACE_INET_Addr::ACE_INET_Addr"); - this->set (sa); -} - -// Initializes a ACE_INET_Addr from a PORT_NUMBER and a 32 bit Internet -// address. - -int -ACE_INET_Addr::set (u_short port_number, - ACE_UINT32 inet_address, - int encode, - int map) -{ - ACE_TRACE ("ACE_INET_Addr::set"); - this->reset_i (); - this->set_address (reinterpret_cast (&inet_address), - sizeof inet_address, - encode, map); - this->set_port_number (port_number, encode); - - return 0; -} - - -// Initializes a ACE_INET_Addr from a PORT_NUMBER and the remote -// HOST_NAME. - -int -ACE_INET_Addr::set (u_short port_number, - const char host_name[], - int encode, - int address_family) -{ - ACE_TRACE ("ACE_INET_Addr::set"); - - // Yow, someone gave us a NULL host_name! - if (host_name == 0) - { - errno = EINVAL; - return -1; - } - - this->reset_i (); - ACE_OS::memset ((void *) &this->inet_addr_, - 0, - sizeof this->inet_addr_); - -#if defined (ACE_HAS_IPV6) - // Let the IPv4 case fall through to the non-IPv6-capable section. - // We don't need the additional getaddrinfo() capability and the Linux - // getaddrinfo() is substantially slower than gethostbyname() w/ - // large vlans. -# if defined (ACE_USES_IPV4_IPV6_MIGRATION) - if (address_family == AF_UNSPEC && !ACE::ipv6_enabled ()) - address_family = AF_INET; -# endif /* ACE_USES_IPV4_IPV6_MIGRATION */ - if (address_family != AF_INET) - { -# if defined (ACE_HAS_GETHOSTBYNAME2) - hostent hentry; - hostent *hp; - ACE_HOSTENT_DATA buf; - int h_error = 0; // Not the same as errno! - - if (0 == ::gethostbyname2_r (host_name, AF_INET6, &hentry, - buf, sizeof(buf), &hp, &h_error)) - { - if (hp != 0) - { - this->set_type (hp->h_addrtype); - for (size_t i = 0; hp->h_addr_list[i]; ++i) - { - union ip46 next_addr; - struct sockaddr_in6 *next_addr_in6 = &next_addr.in6_; - (void) ACE_OS::memset (&next_addr, 0, sizeof (next_addr)); - next_addr_in6->sin6_family = AF_INET6; - next_addr_in6->sin6_port = - encode ? ACE_NTOHS (port_number) : port_number; -#ifdef ACE_HAS_SOCKADDR_IN6_SIN6_LEN - next_addr_in6_->sin6_len = hp->h_length; -#endif - (void) ACE_OS::memcpy ((void *) &next_addr_in6->sin6_addr, - hp->h_addr_list[i], - hp->h_length); - this->inet_addrs_.push_back (next_addr); - } - this->reset (); - - return 0; - } - } - errno = h_error; - if (address_family == AF_INET6) - return -1; -# else - struct addrinfo hints; - struct addrinfo *res = 0, *curr = 0; - int error = 0; - ACE_OS::memset (&hints, 0, sizeof (hints)); - hints.ai_family = AF_INET6; - // Note - specify the socktype here to avoid getting multiple entries - // returned with the same address for different socket types or - // protocols. If this causes a problem for some reason (an address that's - // available for TCP but not UDP, or vice-versa) this will need to change - // back to unrestricted hints and weed out the duplicate addresses by - // searching this->inet_addrs_ which would slow things down. - hints.ai_socktype = SOCK_STREAM; - if ((error = ::getaddrinfo (host_name, 0, &hints, &res)) == 0) - { - this->set_type (res->ai_family); - for (curr = res; curr; curr = curr->ai_next) - { - union ip46 next_addr; - if (curr->ai_family == AF_INET6) - { - ACE_OS::memcpy (&next_addr.in6_, - curr->ai_addr, - curr->ai_addrlen); - next_addr.in6_.sin6_port = - encode ? ACE_NTOHS (port_number) : port_number; - } - else - { - ACE_OS::memcpy (&next_addr.in4_, - curr->ai_addr, - curr->ai_addrlen); - next_addr.in4_.sin_port = - encode ? ACE_NTOHS (port_number) : port_number; - } - this->inet_addrs_.push_back (next_addr); - } - this->reset (); - ::freeaddrinfo (res); - return 0; - } - if (address_family == AF_INET6) - { - if (res) - ::freeaddrinfo(res); - errno = error; - return -1; - } -# endif /* ACE_HAS_GETHOSTBYNAME2 */ - // Let AF_UNSPEC try again w/ IPv4. - } -#endif /* ACE_HAS_IPV6 */ - - // IPv6 not supported... insure the family is set to IPv4 - address_family = AF_INET; - this->set_type (address_family); - this->inet_addr_.in4_.sin_family = static_cast (address_family); -#ifdef ACE_HAS_SOCKADDR_IN_SIN_LEN - this->inet_addr_.in4_.sin_len = sizeof (this->inet_addr_.in4_); -#endif - struct in_addr addrv4; - if (ACE_OS::inet_aton (host_name, - &addrv4) == 1) - { - this->inet_addrs_iter_ = this->inet_addrs_.end (); - return this->set (port_number, - encode ? ACE_NTOHL (addrv4.s_addr) : addrv4.s_addr, - encode); - } - - hostent hentry; - ACE_HOSTENT_DATA buf; - int h_error = 0; // Not the same as errno! - - hostent *hp = ACE_OS::gethostbyname_r (host_name, &hentry, - buf, &h_error); - if (hp == 0) - { - errno = h_error; - return -1; - } - - this->set_type (hp->h_addrtype); - for (size_t i = 0; hp->h_addr_list[i]; ++i) - { - union ip46 next_addr; - struct sockaddr_in *next_addr_in = (struct sockaddr_in *)&next_addr.in4_; - (void) ACE_OS::memset (&next_addr, 0, sizeof (next_addr)); - next_addr_in->sin_family = AF_INET; - next_addr_in->sin_port = encode ? ACE_NTOHS (port_number) : port_number; - (void) ACE_OS::memcpy ((void *) &next_addr_in->sin_addr, - hp->h_addr_list[i], - hp->h_length); - this->inet_addrs_.push_back (next_addr); - } - this->reset (); - return 0; -} - -// Helper function to get a port number from a port name. - -static int get_port_number_from_name (const char port_name[], - const char protocol[]) -{ - // Maybe port_name is directly a port number? - char *endp = 0; - long port_number = ACE_OS::strtol (port_name, &endp, 10); - - if (*endp == '\0') - { - // port_name was really a number, and nothing else. - - // Check for overflow. - if (port_number < 0 || port_number > ACE_MAX_DEFAULT_PORT) - return -1; - - // Return the port number. NOTE: this number must - // be returned in network byte order! - u_short n = static_cast (port_number); - n = ACE_HTONS (n); - return n; - } - - // We try to resolve port number from its name. - -#if defined (ACE_LACKS_GETSERVBYNAME) - port_number = 0; - ACE_UNUSED_ARG (port_name); - ACE_UNUSED_ARG (protocol); -#else - port_number = -1; - servent sentry; - ACE_SERVENT_DATA buf; - servent *sp = ACE_OS::getservbyname_r (port_name, - protocol, - &sentry, - buf); - if (sp != 0) - port_number = sp->s_port; -#endif /* ACE_LACKS_GETSERVBYNAME */ - - return port_number; -} - -// Initializes a ACE_INET_Addr from a and the remote -// . - -int -ACE_INET_Addr::set (const char port_name[], - const char host_name[], - const char protocol[]) -{ - ACE_TRACE ("ACE_INET_Addr::set"); - - this->reset_i (); - int const port_number = get_port_number_from_name (port_name, protocol); - if (port_number == -1) - { - ACE_NOTSUP_RETURN (-1); - } - - int address_family = PF_UNSPEC; -# if defined (ACE_HAS_IPV6) - if (ACE_OS::strcmp (protocol, "tcp6") == 0) - address_family = AF_INET6; -# endif /* ACE_HAS_IPV6 */ - - return this->set (static_cast (port_number), - host_name, 0, address_family); -} - -// Initializes a ACE_INET_Addr from a and a 32 bit -// Internet address. - -int -ACE_INET_Addr::set (const char port_name[], - ACE_UINT32 inet_address, - const char protocol[]) -{ - ACE_TRACE ("ACE_INET_Addr::set"); - - this->reset_i (); - int const port_number = get_port_number_from_name (port_name, protocol); - if (port_number == -1) - { - ACE_NOTSUP_RETURN (-1); - } - - return this->set (static_cast (port_number), - inet_address, 0); -} - -// Creates a ACE_INET_Addr from a PORT_NUMBER and the remote -// HOST_NAME. - -ACE_INET_Addr::ACE_INET_Addr (u_short port_number, - const char host_name[], - int address_family) - : ACE_Addr (determine_type (), sizeof (inet_addr_)) -{ - ACE_TRACE ("ACE_INET_Addr::ACE_INET_Addr"); - ACE_OS::memset (&this->inet_addr_, 0, sizeof (this->inet_addr_)); - if (this->set (port_number, - host_name, - 1, - address_family) == -1) - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("ACE_INET_Addr::ACE_INET_Addr: %p\n"), - ACE_TEXT_CHAR_TO_TCHAR ((host_name == 0) ? - "" : host_name))); -} - -#if defined (ACE_HAS_WCHAR) -ACE_INET_Addr::ACE_INET_Addr (u_short port_number, - const wchar_t host_name[], - int address_family) - : ACE_Addr (determine_type (), sizeof (inet_addr_)) -{ - ACE_TRACE ("ACE_INET_Addr::ACE_INET_Addr"); - ACE_OS::memset (&this->inet_addr_, 0, sizeof (this->inet_addr_)); - if (this->set (port_number, - host_name, - 1, - address_family) == -1) - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("ACE_INET_Addr::ACE_INET_Addr: %p\n"), - ACE_TEXT_WCHAR_TO_TCHAR ((host_name == 0) ? - ACE_TEXT_WIDE ("") : - host_name))); -} -#endif /* ACE_HAS_WCHAR */ - -// Creates a ACE_INET_Addr from a sockaddr_in structure. - -int -ACE_INET_Addr::set (const sockaddr_in *addr, int len) -{ - ACE_TRACE ("ACE_INET_Addr::set"); - - this->reset_i (); - if (addr->sin_family == AF_INET) - { - int maxlen = static_cast (sizeof (this->inet_addr_.in4_)); - if (len > maxlen) - len = maxlen; - ACE_OS::memcpy (&this->inet_addr_.in4_, addr, len); - this->base_set (AF_INET, len); - return 0; - } -#if defined (ACE_HAS_IPV6) - else if (addr->sin_family == AF_INET6) - { - int maxlen = static_cast (sizeof (this->inet_addr_.in6_)); - if (len > maxlen) - len = maxlen; - ACE_OS::memcpy (&this->inet_addr_.in6_, addr, len); - this->base_set (AF_INET6, len); - return 0; - } -#endif /* ACE_HAS_IPV6 */ - - errno = EAFNOSUPPORT; - return -1; -} - -// Return the address. - -void * -ACE_INET_Addr::get_addr (void) const -{ - ACE_TRACE ("ACE_INET_Addr::get_addr"); - return (void*)&this->inet_addr_; -} - -void -ACE_INET_Addr::set_addr (const void *addr, int len) -{ - this->set_addr (addr, len, 0); -} - -// Set a pointer to the address. -void -ACE_INET_Addr::set_addr (const void *addr, int /* len */, int map) -{ - ACE_TRACE ("ACE_INET_Addr::set_addr"); - const struct sockaddr_in *getfamily = - static_cast (addr); - - if (getfamily->sin_family == AF_INET) - { -#if defined (ACE_HAS_IPV6) - if (map) - this->set_type (AF_INET6); - else -#endif /* ACE_HAS_IPV6 */ - this->set_type (AF_INET); - this->set_port_number (getfamily->sin_port, 0); - this->set_address (reinterpret_cast (&getfamily->sin_addr), - sizeof (getfamily->sin_addr), - 0, map); - } -#if defined (ACE_HAS_IPV6) - else if (getfamily->sin_family == AF_INET6) - { - const struct sockaddr_in6 *in6 = - static_cast (addr); - this->set_port_number (in6->sin6_port, 0); - this->set_address (reinterpret_cast (&in6->sin6_addr), - sizeof (in6->sin6_addr), - 0); - this->inet_addr_.in6_.sin6_scope_id = in6->sin6_scope_id; - } -#endif // ACE_HAS_IPV6 -} - -// Creates a ACE_INET_Addr from a sockaddr_in structure. - -ACE_INET_Addr::ACE_INET_Addr (const sockaddr_in *addr, int len) - : ACE_Addr (determine_type (), sizeof (inet_addr_)) -{ - ACE_TRACE ("ACE_INET_Addr::ACE_INET_Addr"); - this->set (addr, len); -} - -// Creates a ACE_INET_Addr from a PORT_NUMBER and an Internet address. - -ACE_INET_Addr::ACE_INET_Addr (u_short port_number, - ACE_UINT32 inet_address) - : ACE_Addr (determine_type (), sizeof (inet_addr_)) -{ - ACE_TRACE ("ACE_INET_Addr::ACE_INET_Addr"); - if (this->set (port_number, inet_address) == -1) - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("%p\n"), - ACE_TEXT ("ACE_INET_Addr::ACE_INET_Addr"))); -} - -// Creates a ACE_INET_Addr from a PORT_NAME and the remote -// HOST_NAME. - -ACE_INET_Addr::ACE_INET_Addr (const char port_name[], - const char host_name[], - const char protocol[]) - : ACE_Addr (determine_type (), sizeof (inet_addr_)) -{ - ACE_TRACE ("ACE_INET_Addr::ACE_INET_Addr"); - if (this->set (port_name, - host_name, - protocol) == -1) - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("ACE_INET_Addr::ACE_INET_Addr"))); -} - -#if defined (ACE_HAS_WCHAR) -ACE_INET_Addr::ACE_INET_Addr (const wchar_t port_name[], - const wchar_t host_name[], - const wchar_t protocol[]) - : ACE_Addr (determine_type (), sizeof (inet_addr_)) -{ - ACE_TRACE ("ACE_INET_Addr::ACE_INET_Addr"); - if (this->set (port_name, - host_name, - protocol) == -1) - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("ACE_INET_Addr::ACE_INET_Addr"))); -} -#endif /* ACE_HAS_WCHAR */ - -// Creates a ACE_INET_Addr from a PORT_NAME and an Internet address. - -ACE_INET_Addr::ACE_INET_Addr (const char port_name[], - ACE_UINT32 inet_address, - const char protocol[]) - : ACE_Addr (determine_type (), sizeof (inet_addr_)) -{ - ACE_TRACE ("ACE_INET_Addr::ACE_INET_Addr"); - if (this->set (port_name, - ACE_HTONL (inet_address), - protocol) == -1) - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("ACE_INET_Addr::ACE_INET_Addr"))); -} - -#if defined (ACE_HAS_WCHAR) -ACE_INET_Addr::ACE_INET_Addr (const wchar_t port_name[], - ACE_UINT32 inet_address, - const wchar_t protocol[]) - : ACE_Addr (determine_type (), sizeof (inet_addr_)) -{ - ACE_TRACE ("ACE_INET_Addr::ACE_INET_Addr"); - if (this->set (port_name, - ACE_HTONL (inet_address), - protocol) == -1) - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("ACE_INET_Addr::ACE_INET_Addr"))); -} -#endif /* ACE_HAS_WCHAR */ - -ACE_INET_Addr::~ACE_INET_Addr (void) -{ -} - -int -ACE_INET_Addr::get_host_name (char hostname[], - size_t len) const -{ - ACE_TRACE ("ACE_INET_Addr::get_host_name"); - - int result; - if (len > 1) - { - result = this->get_host_name_i (hostname,len); - if (result < 0) - { - if (result == -2) - // We know that hostname is nul-terminated - result = -1; - else - { - //result == -1; - // This could be worse than hostname[len -1] = '\0'? - hostname[0] = '\0'; - } - } - } - else - { - if (len == 1) - hostname[0] = '\0'; - result = -1; - } - - return result; -} - -#if defined (ACE_HAS_WCHAR) -int -ACE_INET_Addr::get_host_name (wchar_t hostname[], - size_t len) const -{ - ACE_TRACE ("ACE_INET_Addr::get_host_name"); - - char char_hostname [MAXHOSTNAMELEN + 1]; - - // We have a build in limitation of MAXHOSTNAMELEN - if (len > MAXHOSTNAMELEN + 1) - len = MAXHOSTNAMELEN + 1; - - // Call the char version - int result = this->get_host_name (char_hostname, len); - - // And copy it over, if successful - if (result == 0) - ACE_OS::strcpy (hostname, - ACE_Ascii_To_Wide (char_hostname).wchar_rep ()); - - return result; -} -#endif /* ACE_HAS_WCHAR */ - -// Return the character representation of the hostname. - -const char * -ACE_INET_Addr::get_host_name (void) const -{ - ACE_TRACE ("ACE_INET_Addr::get_host_name"); - - static char name[MAXHOSTNAMELEN + 1]; - if (this->get_host_name (name, MAXHOSTNAMELEN + 1) == -1) - ACE_OS::strcpy (name, ""); - return name; -} - -void -ACE_INET_Addr::set_port_number (u_short port_number, - int encode) -{ - ACE_TRACE ("ACE_INET_Addr::set_port_number"); - - if (encode) - port_number = ACE_HTONS (port_number); - -#if defined (ACE_HAS_IPV6) - if (this->get_type () == AF_INET6) - this->inet_addr_.in6_.sin6_port = port_number; - else -#endif /* ACE_HAS_IPV6 */ - this->inet_addr_.in4_.sin_port = port_number; -} - -// returns -2 when the hostname is truncated -int -ACE_INET_Addr::get_host_name_i (char hostname[], size_t len) const -{ - ACE_TRACE ("ACE_INET_Addr::get_host_name_i"); - -#if defined (ACE_HAS_IPV6) - if ((this->get_type () == PF_INET6 && - 0 == ACE_OS::memcmp (&this->inet_addr_.in6_.sin6_addr, - &in6addr_any, - sizeof (this->inet_addr_.in6_.sin6_addr))) - || - (this->get_type () == PF_INET && - this->inet_addr_.in4_.sin_addr.s_addr == INADDR_ANY)) -#else - if (this->inet_addr_.in4_.sin_addr.s_addr == INADDR_ANY) -#endif /* ACE_HAS_IPV6 */ - { - if (ACE_OS::hostname (hostname, len) == -1) - return -1; - else - return 0; - } - else - { - void* addr = this->ip_addr_pointer (); - int size = this->ip_addr_size (); - int type = this->get_type (); - -# if defined (ACE_HAS_IPV6) && defined (ACE_HAS_BROKEN_GETHOSTBYADDR_V4MAPPED) - // Most OS can not handle IPv6-mapped-IPv4 addresses (even - // though they are meant to) so map them back to IPv4 addresses - // before trying to resolve them - in_addr demapped_addr; - if (type == PF_INET6 && - (this->is_ipv4_mapped_ipv6 () || this->is_ipv4_compat_ipv6 ())) - { - ACE_OS::memcpy (&demapped_addr.s_addr, &this->inet_addr_.in6_.sin6_addr.s6_addr[12], 4); - addr = &demapped_addr; - size = sizeof(demapped_addr); - type = PF_INET; - } -# endif /* ACE_HAS_IPV6 */ - - int h_error; // Not the same as errno! - hostent hentry; - ACE_HOSTENT_DATA buf; - hostent * const hp = - ACE_OS::gethostbyaddr_r (static_cast (addr), - size, - type, - &hentry, - buf, - &h_error); - - if (hp == 0 || hp->h_name == 0) - return -1; - - if (ACE_OS::strlen (hp->h_name) >= len) - { - // We know the length, so use memcpy - if (len > 0) - { - ACE_OS::memcpy (hostname, hp->h_name, len - 1); - hostname[len-1]= '\0'; - } - errno = ENOSPC; - return -2; // -2 Means that we have a good string - // Using errno looks ok, but ENOSPC could be set on - // other places. - } - - ACE_OS::strcpy (hostname, hp->h_name); - return 0; - } -} - -int ACE_INET_Addr::set_address (const char *ip_addr, - int len, - int encode /* = 1 */, - int map /* = 0 */) -{ - ACE_TRACE ("ACE_INET_Addr::set_address"); - // This is really intended for IPv4. If the object is IPv4, or the type - // hasn't been set but it's a 4-byte address, go ahead. If this is an - // IPv6 object and is requested, refuse. - if (encode && len != 4) - { - errno = EAFNOSUPPORT; - return -1; - } - - if (len == 4) - { - ACE_UINT32 ip4 = *reinterpret_cast (ip_addr); - if (encode) - ip4 = ACE_HTONL (ip4); - - - if (this->get_type () == AF_INET && map == 0) { - this->base_set (AF_INET, sizeof (this->inet_addr_.in4_)); -#ifdef ACE_HAS_SOCKADDR_IN_SIN_LEN - this->inet_addr_.in4_.sin_len = sizeof (this->inet_addr_.in4_); -#endif - this->inet_addr_.in4_.sin_family = AF_INET; - this->set_size (sizeof (this->inet_addr_.in4_)); - ACE_OS::memcpy (&this->inet_addr_.in4_.sin_addr, - &ip4, - len); - } -#if defined (ACE_HAS_IPV6) - else if (map == 0) - { - // this->set_type (AF_INET); - this->base_set (AF_INET, sizeof (this->inet_addr_.in4_)); -#ifdef ACE_HAS_SOCKADDR_IN_SIN_LEN - this->inet_addr_.in4_.sin_len = sizeof (this->inet_addr_.in4_); -#endif - this->inet_addr_.in4_.sin_family = AF_INET; - this->set_size (sizeof (this->inet_addr_.in4_)); - ACE_OS::memcpy (&this->inet_addr_.in4_.sin_addr, - &ip4, len); - } - // If given an IPv4 address to copy to an IPv6 object, map it to - // an IPv4-mapped IPv6 address. - else - { - this->base_set (AF_INET6, sizeof (this->inet_addr_.in6_)); -#ifdef ACE_HAS_SOCKADDR_IN6_SIN6_LEN - this->inet_addr_.in6_.sin6_len = sizeof (this->inet_addr_.in6_); -#endif - this->inet_addr_.in6_.sin6_family = AF_INET6; - this->set_size (sizeof (this->inet_addr_.in6_)); - if (ip4 == ACE_HTONL (INADDR_ANY)) - { - in6_addr const ip6 = in6addr_any; - ACE_OS::memcpy (&this->inet_addr_.in6_.sin6_addr, - &ip6, - sizeof (ip6)); - return 0; - } - else - { - // Build up a 128 bit address. An IPv4-mapped IPv6 address - // is defined as 0:0:0:0:0:ffff:IPv4_address. This is defined - // in RFC 1884 */ - ACE_OS::memset (&this->inet_addr_.in6_.sin6_addr, 0, 16); - this->inet_addr_.in6_.sin6_addr.s6_addr[10] = - this->inet_addr_.in6_.sin6_addr.s6_addr[11] = 0xff; - ACE_OS::memcpy - (&this->inet_addr_.in6_.sin6_addr.s6_addr[12], &ip4, 4); - } - } -#endif /* ACE_HAS_IPV6 */ - - return 0; - } /* end if (len == 4) */ -#if defined (ACE_HAS_IPV6) - else if (len == 16) - { - if (this->get_type () != PF_INET6) - { - errno = EAFNOSUPPORT; - return -1; - } - // We protect ourselves up above so IPv6 must be possible here. - this->base_set (AF_INET6, sizeof (this->inet_addr_.in6_)); - this->inet_addr_.in6_.sin6_family = AF_INET6; -#ifdef ACE_HAS_SOCKADDR_IN6_SIN6_LEN - this->inet_addr_.in6_.sin6_len = sizeof (this->inet_addr_.in6_); -#endif - ACE_OS::memcpy (&this->inet_addr_.in6_.sin6_addr, ip_addr, len); - return 0; - } /* end len == 16 */ -#endif /* ACE_HAS_IPV6 */ - - // Here with an unrecognized length. - errno = EAFNOSUPPORT; - return -1; - -} - -#if (defined (ACE_LINUX) || defined (ACE_WIN32)) && defined (ACE_HAS_IPV6) -int -ACE_INET_Addr::set_interface (const char *intf_name) -{ - if (this->get_type () == PF_INET6 && - (IN6_IS_ADDR_LINKLOCAL (&this->inet_addr_.in6_.sin6_addr) || - IN6_IS_ADDR_MC_LINKLOCAL (&this->inet_addr_.in6_.sin6_addr))) - { -#if defined (ACE_LINUX) - this->inet_addr_.in6_.sin6_scope_id = - ACE_OS::if_nametoindex (intf_name); -#else - this->inet_addr_.in6_.sin6_scope_id = - intf_name ? ACE_OS::atoi (intf_name) : 0; -#endif - // check to see if the interface lookup succeeded - if (this->inet_addr_.in6_.sin6_scope_id != 0) - return 0; - else - return -1; - } - else - return 0; - -} -#endif /* ACE_LINUX && ACE_HAS_IPV6 */ - -const char * -ACE_INET_Addr::get_host_addr (char *dst, int size) const -{ -#if defined (ACE_HAS_IPV6) - if (this->get_type () == AF_INET6) - { - // mcorino@remedy.nl - Aug-26, 2005 - // I don't think this should be done because it results in a decimal address - // representation which is not distinguishable from the IPv4 form which makes - // it impossible to resolve back to an IPv6 INET_Addr without prior knowledge - // that this was such an address to begin with. - - //if (IN6_IS_ADDR_V4MAPPED (&this->inet_addr_.in6_.sin6_addr)) - //{ - // ACE_UINT32 addr; - // addr = this->get_ip_address(); - // addr = ACE_HTONL (addr); - // return ACE_OS::inet_ntop (AF_INET, &addr, dst, size); - //} - -# if defined (ACE_WIN32) - if (0 == ::getnameinfo (reinterpret_cast (&this->inet_addr_.in6_), - this->get_size (), - dst, - size, - 0, 0, // Don't want service name - NI_NUMERICHOST)) - return dst; - ACE_OS::set_errno_to_wsa_last_error (); - return 0; -# else - const char *ch = ACE_OS::inet_ntop (AF_INET6, - &this->inet_addr_.in6_.sin6_addr, - dst, - size); -#if defined (ACE_LINUX) - if ((IN6_IS_ADDR_LINKLOCAL (&this->inet_addr_.in6_.sin6_addr) || - IN6_IS_ADDR_MC_LINKLOCAL (&this->inet_addr_.in6_.sin6_addr)) && - this->inet_addr_.in6_.sin6_scope_id != 0) - { - char scope_buf[32]; - ACE_OS::sprintf (scope_buf, "%%%u", this->inet_addr_.in6_.sin6_scope_id); - if ((ACE_OS::strlen (ch)+ACE_OS::strlen (scope_buf)) < (size_t)size) - { - ACE_OS::strcat (dst, scope_buf); - } - } -#endif - return ch; -# endif /* ACE_WIN32 */ - } -#endif /* ACE_HAS_IPV6 */ - - return ACE_OS::inet_ntop (AF_INET, - &this->inet_addr_.in4_.sin_addr, - dst, - size); -} - -// Return the dotted Internet address. -const char * -ACE_INET_Addr::get_host_addr (void) const -{ - ACE_TRACE ("ACE_INET_Addr::get_host_addr"); -#if defined (ACE_HAS_IPV6) - static char buf[INET6_ADDRSTRLEN]; - return this->get_host_addr (buf, INET6_ADDRSTRLEN); -#else /* ACE_HAS_IPV6 */ - static char buf[INET_ADDRSTRLEN]; - return this->get_host_addr (buf, INET_ADDRSTRLEN); -#endif /* !ACE_HAS_IPV6 */ -} - -// Return the 4-byte IP address, converting it into host byte order. -ACE_UINT32 -ACE_INET_Addr::get_ip_address (void) const -{ - ACE_TRACE ("ACE_INET_Addr::get_ip_address"); -#if defined (ACE_HAS_IPV6) - if (this->get_type () == AF_INET6) - { - if (IN6_IS_ADDR_V4MAPPED (&this->inet_addr_.in6_.sin6_addr) || - IN6_IS_ADDR_V4COMPAT (&this->inet_addr_.in6_.sin6_addr) ) - { - ACE_UINT32 addr; - // Return the last 32 bits of the address - char *thisaddrptr = (char*)this->ip_addr_pointer (); - thisaddrptr += 128/8 - 32/8; - ACE_OS::memcpy (&addr, thisaddrptr, sizeof (addr)); - return ACE_NTOHL (addr); - } - - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("ACE_INET_Addr::get_ip_address: address is a IPv6 address not IPv4\n"))); - errno = EAFNOSUPPORT; - return 0; - } -#endif /* ACE_HAS_IPV6 */ - return ACE_NTOHL (ACE_UINT32 (this->inet_addr_.in4_.sin_addr.s_addr)); -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/INET_Addr.h b/modules/worldengine/deps/acelite/ace/INET_Addr.h deleted file mode 100644 index c1a4055375..0000000000 --- a/modules/worldengine/deps/acelite/ace/INET_Addr.h +++ /dev/null @@ -1,418 +0,0 @@ -/* -*- C++ -*- */ - -//============================================================================= -/** - * @file INET_Addr.h - * - * @author Douglas C. Schmidt - */ -//============================================================================= - -#ifndef ACE_INET_ADDR_H -#define ACE_INET_ADDR_H -#include /**/ "ace/pre.h" - -#include "ace/Sock_Connect.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Addr.h" -#include - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_INET_Addr - * - * @brief Defines a C++ wrapper facade for the Internet domain address - * family format. - * - * ACE_INET_Addr can hold all of the IP addresses assigned to a single name. - * By default it refers only to the first, if there is more than one. The - * next() method can make the others available in turn. - */ -class ACE_Export ACE_INET_Addr : public ACE_Addr -{ -public: - // = Initialization methods. - - /// Default constructor. - ACE_INET_Addr (void); - - /// Copy constructor. - ACE_INET_Addr (const ACE_INET_Addr &); - - /// Creates an ACE_INET_Addr from a sockaddr_in structure. - ACE_INET_Addr (const sockaddr_in *addr, int len); - - /// Creates an ACE_INET_Addr from a @a port_number and the remote - /// @a host_name. The port number is assumed to be in host byte order. - /// To set a port already in network byte order, please @see set(). - /// Use address_family to select IPv6 (PF_INET6) vs. IPv4 (PF_INET). - ACE_INET_Addr (u_short port_number, - const char host_name[], - int address_family = AF_UNSPEC); - - /** - * Initializes an ACE_INET_Addr from the @a address, which can be - * "ip-number:port-number" (e.g., "tango.cs.wustl.edu:1234" or - * "128.252.166.57:1234"). If there is no ':' in the @a address it - * is assumed to be a port number, with the IP address being - * INADDR_ANY. - */ - explicit ACE_INET_Addr (const char address[], - int address_family = AF_UNSPEC); - - /** - * Creates an ACE_INET_Addr from a @a port_number and an Internet - * @a ip_addr. This method assumes that @a port_number and @a ip_addr - * are in host byte order. If you have addressing information in - * network byte order, @see set(). - */ - explicit ACE_INET_Addr (u_short port_number, - ACE_UINT32 ip_addr = INADDR_ANY); - - /// Uses getservbyname() to create an ACE_INET_Addr from a - /// @a port_name, the remote @a host_name, and the @a protocol. - ACE_INET_Addr (const char port_name[], - const char host_name[], - const char protocol[] = "tcp"); - - /** - * Uses getservbyname() to create an ACE_INET_Addr from a - * @a port_name, an Internet @a ip_addr, and the @a protocol. This - * method assumes that @a ip_addr is in host byte order. - */ - ACE_INET_Addr (const char port_name[], - ACE_UINT32 ip_addr, - const char protocol[] = "tcp"); - -#if defined (ACE_HAS_WCHAR) - ACE_INET_Addr (u_short port_number, - const wchar_t host_name[], - int address_family = AF_UNSPEC); - - explicit ACE_INET_Addr (const wchar_t address[], - int address_family = AF_UNSPEC); - - ACE_INET_Addr (const wchar_t port_name[], - const wchar_t host_name[], - const wchar_t protocol[] = ACE_TEXT_WIDE ("tcp")); - - ACE_INET_Addr (const wchar_t port_name[], - ACE_UINT32 ip_addr, - const wchar_t protocol[] = ACE_TEXT_WIDE ("tcp")); -#endif /* ACE_HAS_WCHAR */ - - /// Default dtor. - ~ACE_INET_Addr (void); - - // = Direct initialization methods. - - // These methods are useful after the object has been constructed. - - /// Assignment. In a more well-ordered world, member-wise assignment would - /// work fine. However, because of the class design feature that all of the - /// acceptor/connector-type classes that can be used in the - /// Acceptor-Connector framework take ACE_Addr objects instead of the - /// addressing class matching the family in use. The mechanism used to - /// enable this substitution to the more-appropriate class is - /// ACE_sap_any_cast, which casts the ACE_Addr to the more-specific class. - /// In this case, casting an ACE_Addr to ACE_INET_Addr then copying it. - /// Since adding multiple address support to ACE_INET_Addr, that cast-copy - /// operation ends up, in the member-wise case, copying a bogus vector - /// and doing lots of random damage. Thus, this operator is used to make - /// life ordered in this common scenario. - ACE_INET_Addr & operator= (const ACE_INET_Addr &rhs); - - /// Initializes from another ACE_INET_Addr. - int set (const ACE_INET_Addr &); - - /** - * Initializes an ACE_INET_Addr from a @a port_number and the - * remote @a host_name. If @a encode is non-zero then @a port_number is - * converted into network byte order, otherwise it is assumed to be - * in network byte order already and are passed straight through. - * address_family can be used to select IPv4/IPv6 if the OS has - * IPv6 capability (ACE_HAS_IPV6 is defined). To specify IPv6, use - * the value AF_INET6. To specify IPv4, use AF_INET. - */ - int set (u_short port_number, - const char host_name[], - int encode = 1, - int address_family = AF_UNSPEC); - - /** - * Initializes an ACE_INET_Addr from a @a port_number and an Internet - * @a ip_addr. If @a encode is non-zero then the port number and IP address - * are converted into network byte order, otherwise they are assumed to be - * in network byte order already and are passed straight through. - * - * If @a map is non-zero and IPv6 support has been compiled in, - * then this address will be set to the IPv4-mapped IPv6 address of it. - */ - int set (u_short port_number, - ACE_UINT32 ip_addr = INADDR_ANY, - int encode = 1, - int map = 0); - - /// Uses getservbyname() to initialize an ACE_INET_Addr from a - /// @a port_name, the remote @a host_name, and the @a protocol. - int set (const char port_name[], - const char host_name[], - const char protocol[] = "tcp"); - - /** - * Uses getservbyname() to initialize an ACE_INET_Addr from a - * @a port_name, an @a ip_addr, and the @a protocol. This assumes that - * @a ip_addr is already in network byte order. - */ - int set (const char port_name[], - ACE_UINT32 ip_addr, - const char protocol[] = "tcp"); - - /** - * Initializes an ACE_INET_Addr from the @a addr, which can be - * "ip-number:port-number" (e.g., "tango.cs.wustl.edu:1234" or - * "128.252.166.57:1234"). If there is no ':' in the @a address it - * is assumed to be a port number, with the IP address being - * INADDR_ANY. - */ - int set (const char addr[], int address_family = AF_UNSPEC); - - /// Creates an ACE_INET_Addr from a sockaddr_in structure. - int set (const sockaddr_in *, - int len); - -#if defined (ACE_HAS_WCHAR) - int set (u_short port_number, - const wchar_t host_name[], - int encode = 1, - int address_family = AF_UNSPEC); - - int set (const wchar_t port_name[], - const wchar_t host_name[], - const wchar_t protocol[] = ACE_TEXT_WIDE ("tcp")); - - int set (const wchar_t port_name[], - ACE_UINT32 ip_addr, - const wchar_t protocol[] = ACE_TEXT_WIDE ("tcp")); - - int set (const wchar_t addr[], int address_family = AF_UNSPEC); -#endif /* ACE_HAS_WCHAR */ - - /// Return a pointer to the underlying network address. - virtual void *get_addr (void) const; - int get_addr_size(void) const; - - /// Set a pointer to the address. - virtual void set_addr (const void *, int len); - - /// Set a pointer to the address. - virtual void set_addr (const void *, int len, int map); - - /** - * Transform the current ACE_INET_Addr address into string format. - * If @a ipaddr_format is true this produces "ip-number:port-number" - * (e.g., "128.252.166.57:1234"), whereas if @a ipaddr_format is false - * this produces "ip-name:port-number" (e.g., - * "tango.cs.wustl.edu:1234"). Returns -1 if the @a size of the - * @a buffer is too small, else 0. - */ - virtual int addr_to_string (ACE_TCHAR buffer[], - size_t size, - int ipaddr_format = 1) const; - - /** - * Initializes an ACE_INET_Addr from the @a address, which can be - * "ip-addr:port-number" (e.g., "tango.cs.wustl.edu:1234"), - * "ip-addr:port-name" (e.g., "tango.cs.wustl.edu:telnet"), - * "ip-number:port-number" (e.g., "128.252.166.57:1234"), or - * "ip-number:port-name" (e.g., "128.252.166.57:telnet"). If there - * is no ':' in the @a address it is assumed to be a port number, - * with the IP address being INADDR_ANY. - */ - virtual int string_to_addr (const char address[], - int address_family = AF_UNSPEC); - -#if defined (ACE_HAS_WCHAR) - /* - virtual int string_to_addr (const char address[]); - */ -#endif /* ACE_HAS_WCHAR */ - - /** - * Sets the port number without affecting the host name. If - * @a encode is enabled then @a port_number is converted into network - * byte order, otherwise it is assumed to be in network byte order - * already and are passed straight through. - */ - void set_port_number (u_short, - int encode = 1); - - /** - * Sets the address without affecting the port number. If - * @a encode is enabled then @a ip_addr is converted into network - * byte order, otherwise it is assumed to be in network byte order - * already and are passed straight through. The size of the address - * is specified in the @a len parameter. - * If @a map is non-zero, IPv6 support has been compiled in, and - * @a ip_addr is an IPv4 address, then this address is set to the IPv4-mapped - * IPv6 address of it. - */ - int set_address (const char *ip_addr, - int len, - int encode = 1, - int map = 0); - -#if (defined (ACE_LINUX) || defined (ACE_WIN32)) && defined (ACE_HAS_IPV6) - /** - * Sets the interface that should be used for this address. This only has - * an effect when the address is link local, otherwise it does nothing. - */ - int set_interface (const char *intf_name); -#endif /* (ACE_LINUX || ACE_WIN32) && ACE_HAS_IPV6 */ - - /// Return the port number, converting it into host byte-order. - u_short get_port_number (void) const; - - /** - * Return the character representation of the name of the host, - * storing it in the @a hostname (which is assumed to be - * @a hostnamelen bytes long). This version is reentrant. If - * @a hostnamelen is greater than 0 then @a hostname will be - * NUL-terminated even if -1 is returned. - */ - int get_host_name (char hostname[], - size_t hostnamelen) const; - -#if defined (ACE_HAS_WCHAR) - int get_host_name (wchar_t hostname[], - size_t hostnamelen) const; -#endif /* ACE_HAS_WCHAR */ - - /** - * Return the character representation of the hostname. This - * version is non-reentrant since it returns a pointer to a static - * data area. You should therefore either (1) do a "deep copy" of - * the address returned by get_host_name(), e.g., using strdup() or - * (2) use the "reentrant" version of get_host_name() described - * above. - */ - const char *get_host_name (void) const; - - /** - * Return the "dotted decimal" Internet address representation of - * the hostname storing it in the @a addr (which is assumed to be - * @a addr_size bytes long). This version is reentrant. - */ - const char *get_host_addr (char *addr, int addr_size) const; - - /** - * Return the "dotted decimal" Internet address representation of - * the hostname. This version is non-reentrant since it returns a - * pointer to a static data area. You should therefore either - * (1) do a "deep copy" of the address returned by get_host_addr(), e.g., - * using strdup() or (2) use the "reentrant" version of - * get_host_addr() described above. - */ - const char *get_host_addr (void) const; - - /// Return the 4-byte IP address, converting it into host byte - /// order. - ACE_UINT32 get_ip_address (void) const; - - /// Return @c true if the IP address is INADDR_ANY or IN6ADDR_ANY. - bool is_any (void) const; - - /// Return @c true if the IP address is IPv4/IPv6 loopback address. - bool is_loopback (void) const; - - /// Return @c true if the IP address is IPv4/IPv6 multicast address. - bool is_multicast (void) const; - -#if defined (ACE_HAS_IPV6) - /// Return @c true if the IP address is IPv6 linklocal address. - bool is_linklocal (void) const; - - /// Return @c true if the IP address is IPv4-mapped IPv6 address. - bool is_ipv4_mapped_ipv6 (void) const; - - /// Return @c true if the IP address is IPv4-compatible IPv6 address. - bool is_ipv4_compat_ipv6 (void) const; -#endif /* ACE_HAS_IPV6 */ - - /** - * Returns @c true if @c this is less than @a rhs. In this context, - * "less than" is defined in terms of IP address and TCP port - * number. This operator makes it possible to use @c ACE_INET_Addrs - * in STL maps. - */ - bool operator < (const ACE_INET_Addr &rhs) const; - - /// Compare two addresses for equality. The addresses are considered - /// equal if they contain the same IP address and port number. - bool operator == (const ACE_INET_Addr &SAP) const; - - /// Compare two addresses for inequality. - bool operator != (const ACE_INET_Addr &SAP) const; - - /// A variation of the equality operator, this method only compares the - /// IP address and ignores the port number. - bool is_ip_equal (const ACE_INET_Addr &SAP) const; - - /// Computes and returns hash value. - virtual u_long hash (void) const; - - /// If there is another address to examine, move to it and return true; - /// else return false. - bool next (void); - - /// Reset the set of address so they can be scanned again using next(). - void reset (void); - - /// Dump the state of an object. - void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - -private: - /// Insure that @a hostname is properly null-terminated. - int get_host_name_i (char hostname[], size_t hostnamelen) const; - - // Methods to gain access to the actual address of - // the underlying internet address structure. - void *ip_addr_pointer (void) const; - int ip_addr_size (void) const; - int determine_type (void) const; - - /// Initialize underlying inet_addr_ to default values - void reset_i (void); - - /// Underlying representation. - /// This union uses the knowledge that the two structures share the - /// first member, sa_family (as all sockaddr structures do). - union ip46 - { - sockaddr_in in4_; -#if defined (ACE_HAS_IPV6) - sockaddr_in6 in6_; -#endif /* ACE_HAS_IPV6 */ - } inet_addr_; - // If there is more than one address assigned to a given name, this - // holds all of them; one is always copied to inet_addr_. - std::vector inet_addrs_; - std::vector::iterator inet_addrs_iter_; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/INET_Addr.inl" -#endif /* __ACE_INLINE__ */ - -#include /**/ "ace/post.h" -#endif /* ACE_INET_ADDR_H */ diff --git a/modules/worldengine/deps/acelite/ace/INET_Addr.inl b/modules/worldengine/deps/acelite/ace/INET_Addr.inl deleted file mode 100644 index 3e7b18f3e4..0000000000 --- a/modules/worldengine/deps/acelite/ace/INET_Addr.inl +++ /dev/null @@ -1,252 +0,0 @@ -// -*- C++ -*- - -#include "ace/OS_NS_string.h" -#include "ace/Global_Macros.h" -#include "ace/OS_NS_arpa_inet.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_INLINE void -ACE_INET_Addr::reset_i (void) -{ - ACE_OS::memset (&this->inet_addr_, 0, sizeof (this->inet_addr_)); - if (this->get_type() == AF_INET) - { -#ifdef ACE_HAS_SOCKADDR_IN_SIN_LEN - this->inet_addr_.in4_.sin_len = sizeof (this->inet_addr_.in4_); -#endif - this->inet_addr_.in4_.sin_family = AF_INET; - } -#if defined (ACE_HAS_IPV6) - else if (this->get_type() == AF_INET6) - { -#ifdef ACE_HAS_SOCKADDR_IN6_SIN6_LEN - this->inet_addr_.in6_.sin6_len = sizeof (this->inet_addr_.in6_); -#endif - this->inet_addr_.in6_.sin6_family = AF_INET6; - } -#endif /* ACE_HAS_IPV6 */ - this->inet_addrs_.clear (); - this->inet_addrs_iter_ = this->inet_addrs_.end (); - -} - -ACE_INLINE int -ACE_INET_Addr::determine_type (void) const -{ -#if defined (ACE_HAS_IPV6) -# if defined (ACE_USES_IPV4_IPV6_MIGRATION) - return ACE::ipv6_enabled () ? AF_INET6 : AF_INET; -# else - return AF_INET6; -# endif /* ACE_USES_IPV4_IPV6_MIGRATION */ -#else - return AF_INET; -#endif /* ACE_HAS_IPV6 */ -} - -ACE_INLINE void * -ACE_INET_Addr::ip_addr_pointer (void) const -{ -#if defined (ACE_HAS_IPV6) - if (this->get_type () == PF_INET) - return (void*)&this->inet_addr_.in4_.sin_addr; - else - return (void*)&this->inet_addr_.in6_.sin6_addr; -#else - return (void*)&this->inet_addr_.in4_.sin_addr; -#endif -} - -ACE_INLINE int -ACE_INET_Addr::ip_addr_size (void) const -{ - // Since this size value is used to pass to other host db-type - // functions (gethostbyaddr, etc.) the length is of int type. - // Thus, cast all these sizes back to int. They're all well - // within the range of an int anyway. -#if defined (ACE_HAS_IPV6) - if (this->get_type () == PF_INET) - return static_cast (sizeof this->inet_addr_.in4_.sin_addr); - else - return static_cast (sizeof this->inet_addr_.in6_.sin6_addr); -#else - return static_cast (sizeof this->inet_addr_.in4_.sin_addr.s_addr); -#endif /* ACE_HAS_IPV6 */ -} - -// Return the port number, converting it into host byte order... - -ACE_INLINE u_short -ACE_INET_Addr::get_port_number (void) const -{ - ACE_TRACE ("ACE_INET_Addr::get_port_number"); -#if defined (ACE_HAS_IPV6) - if (this->get_type () == PF_INET) - return ACE_NTOHS (this->inet_addr_.in4_.sin_port); - else - return ACE_NTOHS (this->inet_addr_.in6_.sin6_port); -#else -# if defined (ACE_VXWORKS) && ACE_VXWORKS >= 0x690 - return static_cast (ACE_NTOHS (this->inet_addr_.in4_.sin_port)); -# else - return ACE_NTOHS (this->inet_addr_.in4_.sin_port); -# endif -#endif /* ACE_HAS_IPV6 */ -} - -ACE_INLINE int -ACE_INET_Addr::get_addr_size (void) const -{ - ACE_TRACE ("ACE_INET_Addr::get_addr_size"); -#if defined (ACE_HAS_IPV6) - if (this->get_type () == PF_INET) - return sizeof this->inet_addr_.in4_; - else - return sizeof this->inet_addr_.in6_; -#else - return sizeof this->inet_addr_.in4_; -#endif /* ACE_HAS_IPV6 */ -} - -ACE_INLINE bool -ACE_INET_Addr::operator < (const ACE_INET_Addr &rhs) const -{ -#if defined (ACE_HAS_IPV6) - if (this->get_type() != rhs.get_type()) - { - return this->get_type() < rhs.get_type(); - } - - if (this->get_type() == PF_INET6) - { - int memval = ACE_OS::memcmp (this->ip_addr_pointer(), - rhs.ip_addr_pointer(), - this->ip_addr_size()); - - return memval < 0 - || (memval == 0 - && (this->get_port_number() < rhs.get_port_number() - || (this->get_port_number() == rhs.get_port_number() - && this->inet_addr_.in6_.sin6_scope_id < - rhs.inet_addr_.in6_.sin6_scope_id))); - } -#endif - - return this->get_ip_address () < rhs.get_ip_address () - || (this->get_ip_address () == rhs.get_ip_address () - && this->get_port_number () < rhs.get_port_number ()); -} - -#if defined (ACE_HAS_WCHAR) -ACE_INLINE int -ACE_INET_Addr::set (u_short port_number, - const wchar_t host_name[], - int encode, - int address_family) -{ - return this->set (port_number, - ACE_Wide_To_Ascii (host_name).char_rep (), - encode, - address_family); -} - -ACE_INLINE int -ACE_INET_Addr::set (const wchar_t port_name[], - const wchar_t host_name[], - const wchar_t protocol[]) -{ - return this->set (ACE_Wide_To_Ascii (port_name).char_rep (), - ACE_Wide_To_Ascii (host_name).char_rep (), - ACE_Wide_To_Ascii (protocol).char_rep ()); -} - -ACE_INLINE int -ACE_INET_Addr::set (const wchar_t port_name[], - ACE_UINT32 ip_addr, - const wchar_t protocol[]) -{ - return this->set (ACE_Wide_To_Ascii (port_name).char_rep (), - ip_addr, - ACE_Wide_To_Ascii (protocol).char_rep ()); -} - -ACE_INLINE int -ACE_INET_Addr::set (const wchar_t addr[], int address_family) -{ - return this->set (ACE_Wide_To_Ascii (addr).char_rep (), address_family); -} - -#endif /* ACE_HAS_WCHAR */ - -// Return @c true if the IP address is INADDR_ANY or IN6ADDR_ANY. -ACE_INLINE bool -ACE_INET_Addr::is_any (void) const -{ -#if defined (ACE_HAS_IPV6) - if (this->get_type () == AF_INET6) - return IN6_IS_ADDR_UNSPECIFIED (&this->inet_addr_.in6_.sin6_addr); -#endif /* ACE_HAS_IPV6 */ - - return (this->inet_addr_.in4_.sin_addr.s_addr == INADDR_ANY); -} - -// Return @c true if the IP address is IPv4/IPv6 loopback address. -ACE_INLINE bool -ACE_INET_Addr::is_loopback (void) const -{ -#if defined (ACE_HAS_IPV6) - if (this->get_type () == AF_INET6) - return IN6_IS_ADDR_LOOPBACK (&this->inet_addr_.in6_.sin6_addr); -#endif /* ACE_HAS_IPV6 */ - - // RFC 3330 defines loopback as any address with 127.x.x.x - return ((this->get_ip_address () & 0XFF000000) == (INADDR_LOOPBACK & 0XFF000000)); -} - -// Return @c true if the IP address is IPv4/IPv6 multicast address. -ACE_INLINE bool -ACE_INET_Addr::is_multicast (void) const -{ -#if defined (ACE_HAS_IPV6) - if (this->get_type() == AF_INET6) - return this->inet_addr_.in6_.sin6_addr.s6_addr[0] == 0xFF; -#endif /* ACE_HAS_IPV6 */ - return - (*static_cast ( - static_cast (&this->inet_addr_.in4_.sin_addr.s_addr)) & 0xf0) == 0xe0; -} - -#if defined (ACE_HAS_IPV6) -// Return @c true if the IP address is IPv6 linklocal address. -ACE_INLINE bool -ACE_INET_Addr::is_linklocal (void) const -{ - if (this->get_type () == AF_INET6) - return IN6_IS_ADDR_LINKLOCAL (&this->inet_addr_.in6_.sin6_addr); - - return false; -} - -// Return @c true if the IP address is IPv4 mapped IPv6 address. -ACE_INLINE bool -ACE_INET_Addr::is_ipv4_mapped_ipv6 (void) const -{ - if (this->get_type () == AF_INET6) - return IN6_IS_ADDR_V4MAPPED (&this->inet_addr_.in6_.sin6_addr); - - return false; -} - -// Return @c true if the IP address is IPv4-compatible IPv6 address. -ACE_INLINE bool -ACE_INET_Addr::is_ipv4_compat_ipv6 (void) const -{ - if (this->get_type () == AF_INET6) - return IN6_IS_ADDR_V4COMPAT (&this->inet_addr_.in6_.sin6_addr); - - return false; -} -#endif /* ACE_HAS_IPV6 */ - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/IOStream.cpp b/modules/worldengine/deps/acelite/ace/IOStream.cpp deleted file mode 100644 index a4158b0014..0000000000 --- a/modules/worldengine/deps/acelite/ace/IOStream.cpp +++ /dev/null @@ -1,661 +0,0 @@ -#ifndef ACE_IOSTREAM_CPP -#define ACE_IOSTREAM_CPP - -#include "ace/IOStream.h" - -#if !defined (ACE_LACKS_ACE_IOSTREAM) - -# include "ace/OS_NS_errno.h" -# include "ace/OS_Memory.h" - -/////////////////////////////////////////////////////////////////////////// - -/* Here's a simple example of how iostream's non-virtual operators can - get you in a mess: - - class myiostream : public iostream - { - public: - myiostream& operator>> (String & s) - { - ... - } - }; - - ... - - int i; - String s; - myiostream foo (...); - - foo >> s; - // OK - // invokes myiostream::operator>> (String&) returning myiostream& - - foo >> i; - // OK - // invokes iostream::operator>> (int&) returning iostream& - - foo >> i >> s; - // BAD - // invokes iostream::operator>> (int&) then iostream::operator>> (String&) - // - // What has happened is that the first >> is invoked on the base class and returns - // a reference to iostream. The second >> has no idea of the ACE_IOStream and - // gets invoked on iostream. Probably NOT what you wanted! - - - // In order to make all of this work the way you want, you have to do this: - - class myiostream : public iostream - { - public: - myiostream& operator>> (int & i) - { - return ((myiostream&)iostream::operator>> (i)); - } - - myiostream& operator>> (String & s) - { - ... - } - }; - - ... - - int i; - String s; - myiostream foo (...); - - foo >> s; - // OK - // invokes myiostream::operator>> (String&) returning myiostream& - - foo >> i; - // OK - // invokes myiostream::operator>> (int&) returning myiostream& - - - foo >> i >> s; - // OK - // Because you provided operator>> (int&) in class myiostream, that - // function will be invoked by the first >>. Since it returns - // a myiostream&, the second >> will be invoked as desired. */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_HANDLE -ACE_Streambuf::get_handle (void) -{ - return 0; -} - -ACE_Time_Value * -ACE_Streambuf::recv_timeout (ACE_Time_Value *tv) -{ - ACE_Time_Value * rval = recv_timeout_; - if (tv) - { - recv_timeout_value_ = *tv; - recv_timeout_ = &recv_timeout_value_; - } - else - recv_timeout_ = 0; - - return rval; -} - -int -ACE_Streambuf::underflow (void) -{ - // If input mode is not set, any attempt to read from the stream is - // a failure. - - if (ACE_BIT_DISABLED (mode_, ios::in)) - return EOF; - - // If base () is empty then this is the first time any get/put - // operation has been attempted on the stream. - - if (!this->base ()) - { - // Set base () to use our private read buffer. The arguments are: - // beginning of the buffer (base ()) - // one-beyond the end of the buffer (ebase ()) - // should base () be deleted on destruction - // - // We have to say "no" to the third parameter because we want to - // explicitly handle deletion of the TWO buffers at destruction. - - setb (this->eback_saved_, - this->eback_saved_ + streambuf_size_, 0); - - // Remember that we are now in getMode. This will help us if - // we're called prior to a mode change as well as helping us - // when the mode does change. - this->cur_mode_ = this->get_mode_; - // Using the new values for base (), initialize the get area. - // This simply sets eback (), gptr () and egptr () described - // earlier. - setg (base (), base (), base ()); - - // Set the put buffer such that puts will be disabled. Any - // attempt to put data will now cause overflow to be invoked. - setp (0, 0); - } - else // base () has been initialized already... - { - // If we are in put_mode_ now, then it is time to switch to get_mode_ - // - // 1. get rid of any pending output - // 2. rearrange base () to use our half of the buffer - // 3. reset the mode - // - if (this->cur_mode_ == this->put_mode_) - { - // Dump any pending output to the peer. This is not really - // necessary because of the dual-buffer arrangement we've - // set up but intuitively it makes sense to send the pending - // data before we request data since the peer will probably - // need what we're sending before it can respond. - if (out_waiting () && syncout () == EOF) - return EOF; - - if( ! pbase() ) - { - delete [] pbase_saved_; - (void) reset_put_buffer(); - } - else - { - // We're about to disable put mode but before we do - // that, we want to preserve it's state. - this->pbase_saved_ = pbase (); - this->pptr_saved_ = pptr (); - this->epptr_saved_ = epptr (); - } - - // Disable put mode as described in the constructor. - setp (0, 0); - - // Like the case where base () is false, we now point base - // () to use our private get buffer. - setb (this->eback_saved_, - this->eback_saved_ + streambuf_size_, - 0); - - // And restore the previous state of the get pointers. - - setg (this->eback_saved_, this->gptr_saved_, - this->egptr_saved_); - - // Finally, set our mode so that we don't get back into this - // if () and so that overflow can operate correctly. - cur_mode_ = get_mode_; - } - - // There could be data in the input buffer if we switched to put - // mode before reading everything. In that case, we take this - // opportunity to feed it back to the iostream. - if (in_avail ()) - // Remember that we return an int so that we can give back - // EOF. The explicit cast prevents us from returning a signed - // char when we're not returning EOF. - return (u_char) *gptr (); - } - - // We really shouldn't be here unless there is a lack of data in the - // read buffer. So... go get some more data from the peer. - - int result = fillbuf (); - - // Fillbuf will give us EOF if there was an error with the peer. In - // that case, we can do no more input. - - if (EOF == result) - { - // Disable ourselves and return failure to the iostream. That - // should result in a call to have oursleves closed. - setg (0, 0, 0); - return EOF; - } - - // Return the next available character in the input buffer. Again, - // we protect against sign extension. - - return (u_char) *gptr (); -} - -// Much of this is similar to underflow. I'll just hit the highlights -// rather than repeating a lot of what you've already seen. - -int -ACE_Streambuf::overflow (int c) -{ - // Check to see if output is allowed at all. - if (! (mode_ & ios::out)) - return EOF; - - if (!base ()) - { - // Set base () to use put's private buffer. - // - setb (this->pbase_saved_, - this->pbase_saved_ + streambuf_size_, 0); - - // Set the mode for optimization. - this->cur_mode_ = this->put_mode_; - // Set the put area using the new base () values. - setp (base (), ebuf ()); - - // Disable the get area. - setg (0, 0, 0); - } - else // We're already reading or writing - { - // If we're coming out of get mode... - if (this->cur_mode_ == this->get_mode_) - { - // --> JCEJ 6/6/98 - if (! eback()) - { - /* Something has happened to cause the streambuf - to get rid of our get area. - We could probably do this a bit cleaner but - this method is sure to cleanup the bits and - pieces. - */ - delete [] eback_saved_; - (void) reset_get_buffer(); - } - else - { - // Save the current get mode values - this->eback_saved_ = eback (); - this->gptr_saved_ = gptr (); - this->egptr_saved_ = egptr (); - } - // <-- JCEJ 6/6/98 - - // then disable the get buffer - setg (0, 0, 0); - - // Reconfigure base () and restore the put pointers. - setb (pbase_saved_, pbase_saved_ + streambuf_size_, 0); - setp (base (), ebuf ()); - - // Save the new mode. - this->cur_mode_ = this->put_mode_; - } - - // If there is output to be flushed, do so now. We shouldn't - // get here unless this is the case... - - if (out_waiting () && EOF == syncout ()) - return EOF; - } - - // If we're not putting EOF, then we have to deal with the character - // that is being put. Perhaps we should do something special with EOF??? - - if (c != EOF) - { - // We've already written any data that may have been in the - // buffer, so we're guaranteed to have room in the buffer for - // this new information. So... we add it to the buffer and - // adjust our 'next' pointer acordingly. - *pptr () = (char) c; - pbump (1); - } - - return 0; -} - -// syncin - -int -ACE_Streambuf::syncin (void) -{ - // As discussed, there really isn't any way to sync input from a - // socket-like device. We specifially override this base-class - // function so that it won't do anything evil to us. - return 0; -} - -// syncout - -int -ACE_Streambuf::syncout (void) -{ - // Unlike syncin, syncout is a doable thing. All we have to do is - // write whatever is in the output buffer to the peer. flushbuf () - // is how we do it. - - if (flushbuf () == EOF) - return EOF; - else - return 0; -} - -int -ACE_Streambuf::sync (void) -{ - // sync () is fairly traditional in that it syncs both input and - // output. We could have omitted the call to syncin () but someday, - // we may want it to do something. - - syncin (); - - // Don't bother syncing the output unless there is data to be - // sent... - - if (out_waiting ()) - return syncout (); - else - return 0; -} - -// flushbuf - -int -ACE_Streambuf::flushbuf (void) -{ - // pptr () is one character beyond the last character put into the - // buffer. pbase () points to the beginning of the put buffer. - // Unless pptr () is greater than pbase () there is nothing to be - // sent to the peer. - - if (pptr () <= pbase ()) - return 0; - - // 4/12/97 -- JCEJ - // Kludge!!! - // If the remote side shuts down the connection, an attempt to send - // () to the remote will result in the message 'Broken Pipe' I think - // this is an OS message, I've tracked it down to the ACE_OS::write - // () function. That's the last one to be called before the - // message. I can only test this on Linux though, so I don't know - // how other systems will react. - // - // To get around this gracefully, I do a PEEK recv () with an - // immediate (nearly) timeout. recv () is much more graceful on - // it's failure. If we get -1 from recv () not due to timeout then - // we know we're SOL. - // - // Q: Is 'errno' threadsafe? Should the section below be a - // critical section? - // - // char tbuf[1]; - // ACE_Time_Value to (0,1); - // if (this->recv (tbuf, 1, MSG_PEEK, &to) == -1) - // { - // if (errno != ETIME) - // { - // perror ("OOPS preparing to send to peer"); - // return EOF; - // } - // } - // - // The correct way to handle this is for the application to trap - // (and ignore?) SIGPIPE. Thanks to Amos Shapira for reminding me - // of this. - - // Starting at the beginning of the buffer, send as much data as - // there is waiting. send guarantees that all of the data will be - // sent or an error will be returned. - - if (this->send (pbase (), pptr () - pbase ()) == -1) - return EOF; - - // Now that we've sent everything in the output buffer, we reset the - // buffer pointers to appear empty. - setp (base (), ebuf ()); - - return 0; -} - -int -ACE_Streambuf::get_one_byte (void) -{ - this->timeout_ = 0; - - // The recv function will return immediately if there is no data - // waiting. So, we use recv_n to wait for exactly one byte to come - // from the peer. Later, we can use recv to see if there is - // anything else in the buffer. (Ok, we could use flags to tell it - // to block but I like this better.) - - if (this->recv_n (base (), 1, MSG_PEEK, this->recv_timeout_) != 1) - { - if (errno == ETIME) - this->timeout_ = 1; - return EOF; - } - else - return 1; -} - -// This will be called when the read (get) buffer has been exhausted -// (ie -- gptr == egptr). - -int -ACE_Streambuf::fillbuf (void) -{ - // Invoke recv_n to get exactly one byte from the remote. This will - // block until something shows up. - - if (get_one_byte () == EOF) - return EOF; - - // Now, get whatever else may be in the buffer. This will return if - // there is nothing in the buffer. - - int bc = this->recv (base (), blen (), this->recv_timeout_); - - // recv will give us -1 if there was a problem. If there was - // nothing waiting to be read, it will give us 0. That isn't an - // error. - - if (bc < 0) - { - if (errno == ETIME) - this->timeout_ = 1; - return EOF; - } - - // Move the get pointer to reflect the number of bytes we just read. - - setg (base (), base (), base () + bc); - - // Return the byte-read-count including the one from . - return bc; -} - -ACE_Streambuf::ACE_Streambuf (u_int streambuf_size, int io_mode) - : eback_saved_ (0), // to avoid Purify UMR - pbase_saved_ (0), // to avoid Purify UMR - get_mode_ (1), - put_mode_ (2), - mode_ (io_mode), - streambuf_size_ (streambuf_size), - recv_timeout_ (0) -{ - (void)reset_get_buffer (); - (void)reset_put_buffer (); -} - -u_int -ACE_Streambuf::streambuf_size (void) -{ - return streambuf_size_; -} - -// Return the number of bytes not yet gotten. eback + get_waiting = -// gptr. - -u_int -ACE_Streambuf::get_waiting (void) -{ - return this->gptr_saved_ - this->eback_saved_; -} - -// Return the number of bytes in the get area (includes some already -// gotten); eback + get_avail = egptr. - -u_int -ACE_Streambuf::get_avail (void) -{ - return this->egptr_saved_ - this->eback_saved_; -} - -// Return the number of bytes to be 'put' onto the stream media. -// pbase + put_avail = pptr. - -u_int -ACE_Streambuf::put_avail (void) -{ - return this->pptr_saved_ - this->pbase_saved_; -} - -// Typical usage: -// -// u_int newGptr = otherStream->get_waiting (); -// u_int newEgptr = otherStream->get_avail (); -// char * newBuf = otherStream->reset_get_buffer (); -// char * oldgetbuf = myStream->reset_get_buffer (newBuf, otherStream->streambuf_size (), newGptr, newEgptr); -// -// 'myStream' now has the get buffer of 'otherStream' and can use it in any way. -// 'otherStream' now has a new, empty get buffer. - -char * -ACE_Streambuf::reset_get_buffer (char *newBuffer, - u_int _streambuf_size, - u_int _gptr, - u_int _egptr) -{ - char * rval = this->eback_saved_; - - // The get area is where the iostream will get data from. This is - // our read buffer. There are three pointers which describe the - // read buffer: - // - // eback () - The beginning of the buffer. Also the furthest - // point at which putbacks can be done. Hence the name. - // - // gptr () - Where the next character is to be got from. - // - // egptr () - One position beyond the last get-able character. - // - // So that we can switch quicky from read to write mode without - // any data copying, we keep copies of these three pointers in - // the variables below. Initially, they all point to the beginning - // of our read-dedicated buffer. - // - if (newBuffer) - { - if (streambuf_size_ != _streambuf_size) - return 0; - this->eback_saved_ = newBuffer; - } - else - ACE_NEW_RETURN (this->eback_saved_, - char[streambuf_size_], - 0); - - this->gptr_saved_ = this->eback_saved_ + _gptr; - this->egptr_saved_ = this->eback_saved_ + _egptr; - - // Disable the get area initially. This will cause underflow to be - // invoked on the first get operation. - setg (0, 0, 0); - - reset_base (); - - return rval; -} - -// Typical usage: -// -// u_int newPptr = otherStream->put_avail (); -// char * newBuf = otherStream->reset_put_buffer (); -// char * oldputbuf = otherStream->reset_put_buffer (newBuf, otherStream->streambuf_size (), newPptr); - -char * -ACE_Streambuf::reset_put_buffer (char *newBuffer, - u_int _streambuf_size, - u_int _pptr) -{ - char *rval = this->pbase_saved_; - - // The put area is where the iostream will put data that needs to be - // sent to the peer. This becomes our write buffer. The three - // pointers which maintain this area are: - // - // pbase () - The beginning of the put area. - // - // pptr () - Where the next character is to be put. - // - // epptr () - One beyond the last valid position for putting. - // - // Again to switch quickly between modes, we keep copies of - // these three pointers. - // - if (newBuffer) - { - if (streambuf_size_ != _streambuf_size) - return 0; - this->pbase_saved_ = newBuffer; - } - else - ACE_NEW_RETURN (this->pbase_saved_, - char[streambuf_size_], - 0); - - this->pptr_saved_ = this->pbase_saved_ + _pptr; - this->epptr_saved_ = this->pbase_saved_ + streambuf_size_; - - // Disable the put area. Overflow will be called by the first call - // to any put operator. - setp (0, 0); - - reset_base (); - - return rval; -} - -void -ACE_Streambuf::reset_base (void) -{ - // Until we experience the first get or put operation, we do not - // know what our current IO mode is. - this->cur_mode_ = 0; - - // The common area used for reading and writting is called "base". - // We initialize it this way so that the first get/put operation - // will have to "allocate" base. This allocation will set base to - // the appropriate specific buffer and set the mode to the correct - // value. - setb (0, 0); -} - -// If the default allocation strategey were used the common buffer -// would be deleted when the object destructs. Since we are providing -// separate read/write buffers, it is up to us to manage their memory. - -ACE_Streambuf::~ACE_Streambuf (void) -{ - delete [] this->eback_saved_; - delete [] this->pbase_saved_; -} - -u_char ACE_Streambuf::timeout (void) -{ - u_char rval = this->timeout_; - this->timeout_ = 0; - return rval; -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* !ACE_LACKS_ACE_IOSTREAM */ -#endif /* ACE_IOSTREAM_CPP */ diff --git a/modules/worldengine/deps/acelite/ace/IOStream.h b/modules/worldengine/deps/acelite/ace/IOStream.h deleted file mode 100644 index cd22e65e98..0000000000 --- a/modules/worldengine/deps/acelite/ace/IOStream.h +++ /dev/null @@ -1,502 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file IOStream.h - * - * @author James CE Johnson - * @author Jim Crossley - */ -//============================================================================= - -#ifndef ACE_IOSTREAM_H -#define ACE_IOSTREAM_H -#include /**/ "ace/pre.h" - -#include /**/ "ace/ACE_export.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -// Needed on Windows for streambuf -// FUZZ: disable check_for_streams_include -#include "ace/streams.h" - -// This is a temporary restriction - ACE_IOStream is only enabled if the -// compiler does not supply the standard C++ library (and standard iostreams) -// or, if it does, the platform is explicitly set to use old iostreams -// by its config.h file. -// This restriction is recorded in Bugzilla entry 857. -#if defined (ACE_HAS_STANDARD_CPP_LIBRARY) && (ACE_HAS_STANDARD_CPP_LIBRARY == 1) -# if !defined (ACE_USES_OLD_IOSTREAMS) && !defined (ACE_LACKS_ACE_IOSTREAM) -# define ACE_LACKS_ACE_IOSTREAM -# endif /* !ACE_USES_OLD_IOSTREAMS && !ACE_LACKS_ACE_IOSTREAM */ -#endif /* ACE_HAS_STANDARD_CPP_LIBRARY */ - -#if !defined (ACE_LACKS_ACE_IOSTREAM) - -# if defined (ACE_HAS_STRING_CLASS) -# if defined (ACE_WIN32) && defined (_MSC_VER) -ACE_BEGIN_VERSIONED_NAMESPACE_DECL -typedef CString ACE_IOStream_String; -ACE_END_VERSIONED_NAMESPACE_DECL -# else -# if !defined (ACE_HAS_STDCPP_STL_INCLUDES) -#include /**/ -ACE_BEGIN_VERSIONED_NAMESPACE_DECL -typedef String ACE_IOStream_String; -ACE_END_VERSIONED_NAMESPACE_DECL -# else -# include /**/ - -# if defined(ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB) -ACE_BEGIN_VERSIONED_NAMESPACE_DECL -typedef std::string ACE_IOStream_String; -ACE_END_VERSIONED_NAMESPACE_DECL -# else -ACE_BEGIN_VERSIONED_NAMESPACE_DECL -typedef string ACE_IOStream_String; -ACE_END_VERSIONED_NAMESPACE_DECL -# endif /* ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB */ -# endif /* ! ACE_HAS_STDCPP_STL_INCLUDES */ -# endif /* ACE_WIN32 && defined (_MSC_VER) */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -class ACE_Export ACE_Quoted_String : public ACE_IOStream_String -{ -public: - inline ACE_Quoted_String (void) { *this = ""; } - inline ACE_Quoted_String (const char *c) { *this = ACE_IOStream_String (c); } - inline ACE_Quoted_String (const ACE_IOStream_String &s) { *this = s; } - inline ACE_Quoted_String &operator= (const ACE_IOStream_String& s) - { - return (ACE_Quoted_String &) ACE_IOStream_String::operator= (s); - } - inline ACE_Quoted_String &operator = (const char c) { - return (ACE_Quoted_String &) ACE_IOStream_String::operator= (c); - } - inline ACE_Quoted_String &operator = (const char *c) { - return (ACE_Quoted_String &) ACE_IOStream_String::operator= (c); - } - inline bool operator < (const ACE_Quoted_String &s) const { - return *(ACE_IOStream_String *) this < (ACE_IOStream_String) s; - } -# if defined (ACE_WIN32) && defined (_MSC_VER) - inline int length (void) { return this->GetLength (); } -# endif /* ACE_WIN32 && defined (_MSC_VER) */ -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -# endif /* ACE_HAS_STRING_CLASS */ - -# include "ace/Time_Value.h" -# include "ace/os_include/sys/os_types.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_Streambuf - * - * @brief Create your custom streambuf by providing and ACE_*_Stream - * object to this template. I have tested it with - * ACE_SOCK_Stream and it should work fine for others as well. - * - * For any iostream object, the real work is done by the - * underlying streambuf class. That is what we create here. - * A streambuf has an internal buffer area into which data is - * read and written as the iostream requests and provides data. - * At some point during the read process, the iostream will - * realize that the streambuf has no more data. The underflow - * function of the streambuf is then called. - * Likewise, during the write process, the iostream will - * eventually notice that the streabuf's buffer has become full - * and will invoke the overflow function. - * The empty/full state of the read/write "buffers" are - * controled by two sets pointers. One set is dedicated to - * read, the other to write. These pointers, in turn, reference - * a common buffer that is to be shared by both read and write - * operations. It is this common buffer to which data is - * written and from which it is read. - * The common buffer is used by functions of the streambuf as - * well as the iostream. Because of this and the fact that it - * is "shared" by both read and write operators, there is a - * danger of data corruption if read and write operations are - * allowed to take place "at the same time". - * To prevent data corruption, we manipulate the read and write - * pointer sets so that the streambuf is in either a read-mode - * or write-mode at all times and can never be in both modes at - * the same time. - * In the constructor: set the read and write sets to NULL This - * causes the underflow or overflow operators to be invoked at - * the first IO activity of the iostream. - * In the underflow function we arrange for the common buffer to - * reference our read buffer and for the write pointer set to be - * disabled. If a write operation is performed by the iostream - * this will cause the overflow function to be invoked. - * In the overflow function we arrange for the common buffer to - * reference our write buffer and for the read pointer set to be - * disabled. This causes the underflow function to be invoked - * when the iostream "changes our mode". - * The overflow function will also invoke the send_n function to - * flush the buffered data to our peer. Similarly, the sync and - * syncout functions will cause send_n to be invoked to send the - * data. - * Since socket's and the like do not support seeking, there can - * be no method for "syncing" the input. However, since we - * maintain separate read/write buffers, no data is lost by - * "syncing" the input. It simply remains buffered. - */ -class ACE_Export ACE_Streambuf : public streambuf -{ -public: - - /** - * If the default allocation strategy were used the common buffer - * would be deleted when the object destructs. Since we are - * providing separate read/write buffers, it is up to us to manage - * their memory. - */ - virtual ~ACE_Streambuf (void); - - /// Get the current Time_Value pointer and provide a new one. - ACE_Time_Value *recv_timeout (ACE_Time_Value *tv = 0); - - /** - * Use this to allocate a new/different buffer for put operations. - * If you do not provide a buffer pointer, one will be allocated. - * That is the preferred method. If you do provide a buffer, the - * size must match that being used by the get buffer. If - * successful, you will receive a pointer to the current put buffer. - * It is your responsibility to delete this memory when you are done - * with it. - */ - char *reset_put_buffer (char *newBuffer = 0, - u_int _streambuf_size = 0, - u_int _pptr = 0 ); - - /// Return the number of bytes to be 'put' onto the stream media. - /// pbase + put_avail = pptr - u_int put_avail (void); - - /** - * Use this to allocate a new/different buffer for get operations. - * If you do not provide a buffer pointer, one will be allocated. - * That is the preferred method. If you do provide a buffer, the - * size must match that being used by the put buffer. If - * successful, you will receive a pointer to the current get buffer. - * It is your responsibility to delete this memory when you are done - * with it. - */ - char *reset_get_buffer (char *newBuffer = 0, - u_int _streambuf_size = 0, - u_int _gptr = 0, - u_int _egptr = 0); - - /// Return the number of bytes not yet gotten. eback + get_waiting = - /// gptr - u_int get_waiting (void); - - /// Return the number of bytes in the get area (includes some already - /// gotten); eback + get_avail = egptr - u_int get_avail (void); - - /// Query the streambuf for the size of its buffers. - u_int streambuf_size (void); - - /// Did we take an error because of an IO operation timeout? - /// @note Invoking this resets the flag. - u_char timeout (void); - -protected: - ACE_Streambuf (u_int streambuf_size, - int io_mode); - - /// Sync both input and output. See syncin/syncout below for - /// descriptions. - virtual int sync (void); - - // = Signatures for the underflow/overflow discussed above. - virtual int underflow (void); - - /// The overflow function receives the character which caused the - /// overflow. - virtual int overflow (int c = EOF); - - /// Resets the pointer and streambuf mode. This is used - /// internally when get/put buffers are allocatd. - void reset_base (void); - -protected: - // = Two pointer sets for manipulating the read/write areas. - char *eback_saved_; - char *gptr_saved_; - char *egptr_saved_; - char *pbase_saved_; - char *pptr_saved_; - char *epptr_saved_; - - // = With cur_mode_ we keep track of our current IO mode. - - // This helps us to optimize the underflow/overflow functions. - u_char cur_mode_; - const u_char get_mode_; - const u_char put_mode_; - - /// mode tells us if we're working for an istream, ostream, or - /// iostream. - int mode_; - - /// This defines the size of the input and output buffers. It can be - /// set by the object constructor. - const u_int streambuf_size_; - - /// Did we take an error because of an IO operation timeout? - u_char timeout_; - - /// We want to allow the user to provide Time_Value pointers to - /// prevent infinite blocking while waiting to receive data. - ACE_Time_Value recv_timeout_value_; - ACE_Time_Value *recv_timeout_; - - /** - * syncin is called when the input needs to be synced with the - * source file. In a filebuf, this results in the system - * call being used. We can't do that on socket-like connections, so - * this does basically nothing. That's safe because we have a - * separate read buffer to maintain the already-read data. In a - * filebuf, the single common buffer is used forcing the - * call. - */ - int syncin (void); - - /// syncout() is called when the output needs to be flushed. This is - /// easily done by calling the peer's send_n function. - int syncout (void); - - /// flushbuf() is the worker of syncout. It is a separate function - /// because it gets used sometimes in different context. - int flushbuf (void); - - /** - * fillbuf is called in a couple of places. This is the worker of - * underflow. It will attempt to fill the read buffer from the - * peer. - */ - int fillbuf (void); - - /** - * Used by fillbuf and others to get exactly one byte from the peer. - * recv_n is used to be sure we block until something is available. - * It is virtual because we really need to override it for - * datagram-derived objects. - */ - virtual int get_one_byte (void); - - /** - * Stream connections and "unconnected connections" (ie -- - * datagrams) need to work just a little differently. We derive - * custom Streambuf objects for them and provide these functions at - * that time. - */ - virtual ssize_t send (char *buf, - ssize_t len) = 0; - virtual ssize_t recv (char *buf, - ssize_t len, - ACE_Time_Value *tv = 0) = 0; - virtual ssize_t recv (char *buf, - ssize_t len, - int flags, - ACE_Time_Value *tv = 0) = 0; - virtual ssize_t recv_n (char *buf, - ssize_t len, - int flags = 0, - ACE_Time_Value *tv = 0) = 0; - - virtual ACE_HANDLE get_handle (void); - -# if defined (ACE_HAS_STANDARD_CPP_LIBRARY) && (ACE_HAS_STANDARD_CPP_LIBRARY != 0) && !defined (ACE_USES_OLD_IOSTREAMS) - char *base (void) const - { - return cur_mode_ == get_mode_ ? eback_saved_ - : cur_mode_ == put_mode_ ? pbase_saved_ - : 0; - } - char *ebuf (void) const - { - return cur_mode_ == 0 ? 0 : base () + streambuf_size_; - } - - int blen (void) const - { - return streambuf_size_; - } - - void setb (char* b, char* eb, int /* a */=0) - { - setbuf (b, (eb - b)); - } - - int out_waiting (void) - { - return pptr () - pbase (); - } -# endif /* ACE_HAS_STANDARD_CPP_LIBRARY */ -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -/////////////////////////////////////////////////////////////////////////// - -// These typedefs are provided by G++ (on some systems?) without the -// trailing '_'. Since we can't count on 'em, I've defined them to -// what GNU wants here. -// -typedef ios& (*__manip_)(ios&); -typedef istream& (*__imanip_)(istream&); -typedef ostream& (*__omanip_)(ostream&); - -// Trying to do something like is shown below instead of using the -// __*manip typedefs causes Linux do segfault when "< and functions are used. - -#define GET_SIG(MT,DT) inline virtual MT& operator>> (DT v) -# if (defined (__SUNPRO_CC) && __SUNPRO_CC > 0x510) -#define GET_CODE { \ - if (ipfx (0)) \ - { \ - (*((istream*)this)) >> (v); \ - } \ - isfx (); \ - return *this; \ - } -# else -#define GET_CODE { \ - if (ipfx (0)) \ - { \ - iostream::operator>> (v); \ - } \ - isfx (); \ - return *this; \ - } -# endif -#define GET_PROT(MT,DT,CODE) GET_SIG(MT,DT) CODE -#define GET_FUNC(MT,DT) GET_PROT(MT,DT,GET_CODE) - -// This macro defines the put operator for class MT into datatype DT. -// We will use it below to quickly override most (all?) iostream put -// operators. Notice how the and functions are used. - -#define PUT_SIG(MT,DT) inline virtual MT& operator<< (DT v) -# if (defined (__SUNPRO_CC) && __SUNPRO_CC > 0x510) -#define PUT_CODE { \ - if (opfx ()) \ - { \ - (*((ostream *) this)) << (v); \ - } \ - osfx (); \ - return *this; \ - } -# else -#define PUT_CODE { \ - if (opfx ()) \ - { \ - iostream::operator<< (v); \ - } \ - osfx (); \ - return *this; \ - } -# endif -#define PUT_PROT(MT,DT,CODE) PUT_SIG(MT,DT) CODE -#define PUT_FUNC(MT,DT) PUT_PROT(MT,DT,PUT_CODE) - - -// These are necessary in case somebody wants to derive from us and -// override one of these with a custom approach. - -# if defined (ACE_LACKS_CHAR_RIGHT_SHIFTS) -#define GET_FUNC_SET0(MT,CODE,CODE2) \ - GET_PROT(MT,short &,CODE) \ - GET_PROT(MT,u_short &,CODE) \ - GET_PROT(MT,int &,CODE) \ - GET_PROT(MT,u_int &,CODE) \ - GET_PROT(MT,long &,CODE) \ - GET_PROT(MT,u_long &,CODE) \ - GET_PROT(MT,float &,CODE) \ - GET_PROT(MT,double &,CODE) \ - inline virtual MT& operator>>(__omanip_ func) CODE2 \ - inline virtual MT& operator>>(__manip_ func) CODE2 -# else -#define GET_FUNC_SET0(MT,CODE,CODE2) \ - GET_PROT(MT,short &,CODE) \ - GET_PROT(MT,u_short &,CODE) \ - GET_PROT(MT,int &,CODE) \ - GET_PROT(MT,u_int &,CODE) \ - GET_PROT(MT,long &,CODE) \ - GET_PROT(MT,u_long &,CODE) \ - GET_PROT(MT,float &,CODE) \ - GET_PROT(MT,double &,CODE) \ - GET_PROT(MT,char &,CODE) \ - GET_PROT(MT,u_char &,CODE) \ - GET_PROT(MT,char *,CODE) \ - GET_PROT(MT,u_char *,CODE) \ - inline virtual MT& operator>>(__omanip_ func) CODE2 \ - inline virtual MT& operator>>(__manip_ func) CODE2 -# endif - -#define PUT_FUNC_SET0(MT,CODE,CODE2) \ - PUT_PROT(MT,short,CODE) \ - PUT_PROT(MT,u_short,CODE) \ - PUT_PROT(MT,int,CODE) \ - PUT_PROT(MT,u_int,CODE) \ - PUT_PROT(MT,long,CODE) \ - PUT_PROT(MT,u_long,CODE) \ - PUT_PROT(MT,float,CODE) \ - PUT_PROT(MT,double,CODE) \ - PUT_PROT(MT,char,CODE) \ - PUT_PROT(MT,u_char,CODE) \ - PUT_PROT(MT,const char *,CODE) \ - PUT_PROT(MT,u_char *,CODE) \ - PUT_PROT(MT,void *,CODE) \ - inline virtual MT& operator<<(__omanip_ func) CODE2 \ - inline virtual MT& operator<<(__manip_ func) CODE2 - -# if defined (ACE_LACKS_SIGNED_CHAR) - #define GET_FUNC_SET1(MT,CODE,CODE2) GET_FUNC_SET0(MT,CODE,CODE2) - #define PUT_FUNC_SET1(MT,CODE,CODE2) PUT_FUNC_SET0(MT,CODE,CODE2) -# else - #define GET_FUNC_SET1(MT,CODE,CODE2) \ - GET_PROT(MT,signed char &,CODE) \ - GET_PROT(MT,signed char *,CODE) \ - GET_FUNC_SET0(MT,CODE,CODE2) - - #define PUT_FUNC_SET1(MT,CODE,CODE2) \ - PUT_FUNC(MT,signed char) \ - PUT_FUNC(MT,const signed char *) \ - PUT_FUNC_SET0(MT,CODE,CODE2) -# endif /* ACE_LACKS_SIGNED_CHAR */ - -#define GET_MANIP_CODE { if (ipfx ()) { (*func) (*this); } isfx (); return *this; } -#define PUT_MANIP_CODE { if (opfx ()) { (*func) (*this); } osfx (); return *this; } - -#define GET_FUNC_SET(MT) GET_FUNC_SET1(MT,GET_CODE,GET_MANIP_CODE) -#define PUT_FUNC_SET(MT) PUT_FUNC_SET1(MT,PUT_CODE,PUT_MANIP_CODE) -#define GETPUT_FUNC_SET(MT) GET_FUNC_SET(MT) PUT_FUNC_SET(MT) - -#define GET_SIG_SET(MT) GET_FUNC_SET1(MT,= 0;,= 0;) -#define PUT_SIG_SET(MT) PUT_FUNC_SET1(MT,= 0;,= 0;) -#define GETPUT_SIG_SET(MT) GET_SIG_SET(MT) PUT_SIG_SET(MT) - -// Include the templates here. -# include "ace/IOStream_T.h" -#endif /* !ACE_LACKS_ACE_IOSTREAM && ACE_USES_OLD_IOSTREAMS */ - -#include /**/ "ace/post.h" -#endif /* ACE_IOSTREAM_H */ diff --git a/modules/worldengine/deps/acelite/ace/IOStream_T.cpp b/modules/worldengine/deps/acelite/ace/IOStream_T.cpp deleted file mode 100644 index 21b8e66263..0000000000 --- a/modules/worldengine/deps/acelite/ace/IOStream_T.cpp +++ /dev/null @@ -1,245 +0,0 @@ -#ifndef ACE_IOSTREAM_T_CPP -#define ACE_IOSTREAM_T_CPP - -#include "ace/IOStream_T.h" -#include "ace/OS_Memory.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#if !defined (ACE_LACKS_ACE_IOSTREAM) - -#if !defined (__ACE_INLINE__) -#include "ace/IOStream_T.inl" -#endif /* !__ACE_INLINE__ */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -// We will be given a STREAM by the iostream object which creates us. -// See the ACE_IOStream template for how that works. Like other -// streambuf objects, we can be input-only, output-only or both. - -template -ACE_Streambuf_T::ACE_Streambuf_T (STREAM *peer, - u_int streambuf_size, - int io_mode) - : ACE_Streambuf (streambuf_size, io_mode), - peer_ (peer) -{ - // A streambuf allows for unbuffered IO where every character is - // read as requested and written as provided. To me, this seems - // terribly inefficient for socket-type operations, so I've disabled - // it. All of the work would be done by the underflow/overflow - // functions anyway and I haven't implemented anything there to - // support unbuffered IO. - -#if !defined (ACE_LACKS_UNBUFFERED_STREAMBUF) - this->unbuffered (0); -#endif /* ! ACE_LACKS_UNBUFFERED_STREAMBUF */ - - // Linebuffered is similar to unbuffered. Again, I don't have any - // need for this and I don't see the advantage. I believe this - // would have to be supported by underflow/overflow to be effective. -#if !defined (ACE_LACKS_LINEBUFFERED_STREAMBUF) - this->linebuffered (0); -#endif /* ! ACE_LACKS_LINEBUFFERED_STREAMBUF */ -} - -template ssize_t -ACE_Streambuf_T::send (char *buf, ssize_t len) -{ - return peer_->send_n (buf,len); -} - -template ssize_t -ACE_Streambuf_T::recv (char *buf, - ssize_t len, - ACE_Time_Value *tv) -{ - return this->recv (buf, len, 0, tv); -} - -template ssize_t -ACE_Streambuf_T::recv (char *buf, - ssize_t len, - int flags, - ACE_Time_Value * tv) -{ - this->timeout_ = 0; - errno = ESUCCESS; - ssize_t rval = peer_->recv (buf, len, flags, tv); - if (errno == ETIME) - this->timeout_ = 1; - return rval; -} - -template ssize_t -ACE_Streambuf_T::recv_n (char *buf, - ssize_t len, - int flags, - ACE_Time_Value *tv) -{ - this->timeout_ = 0; - errno = ESUCCESS; - ssize_t rval = peer_->recv_n (buf, len, flags, tv); - if (errno == ETIME) - this->timeout_ = 1; - return rval; -} - -template ACE_HANDLE -ACE_Streambuf_T::get_handle (void) -{ - return peer_ ? peer_->get_handle () : 0; -} - -// The typical constructor. This will initiailze your STREAM and then -// setup the iostream baseclass to use a custom streambuf based on -// STREAM. - -template -ACE_IOStream::ACE_IOStream (STREAM &stream, - u_int streambuf_size) - : iostream (0), - STREAM (stream) -{ - ACE_NEW (streambuf_, - ACE_Streambuf_T ((STREAM *) this, - streambuf_size)); - iostream::init (this->streambuf_); -} - -template -ACE_IOStream::ACE_IOStream (u_int streambuf_size) - : iostream (0) -{ - ACE_NEW (this->streambuf_, - ACE_Streambuf_T ((STREAM *) this, - streambuf_size)); - iostream::init (this->streambuf_); -} - -// We have to get rid of the streambuf_ ourselves since we gave it to -// iostream () - -template -ACE_IOStream::~ACE_IOStream (void) -{ - delete this->streambuf_; -} - -// The only ambituity in the multiple inheritance is the close () -// function. - -template int -ACE_IOStream::close (void) -{ - return STREAM::close (); -} - -template ACE_IOStream & -ACE_IOStream::operator>> (ACE_Time_Value *&tv) -{ - ACE_Time_Value *old_tv = this->streambuf_->recv_timeout (tv); - tv = old_tv; - return *this; -} - -#if defined (ACE_HAS_STRING_CLASS) - -// A simple string operator. The base iostream has 'em for char* but -// that isn't always the best thing for a String. If we don't provide -// our own here, we may not get what we want. - -template ACE_IOStream & -ACE_IOStream::operator>> (ACE_IOStream_String &v) -{ - if (ipfx0 ()) - { - char c; - this->get (c); - - for (v = c; - this->get (c) && !isspace (c); - v += c) - continue; - } - - isfx (); - - return *this; -} - -template ACE_IOStream & -ACE_IOStream::operator<< (ACE_IOStream_String &v) -{ - if (opfx ()) - { -#if defined (ACE_WIN32) && defined (_MSC_VER) - for (int i = 0; i < v.GetLength (); ++i) -#else - for (u_int i = 0; i < (u_int) v.length (); ++i) -#endif /* ACE_WIN32 && defined (_MSC_VER) */ - this->put (v[i]); - } - - osfx (); - - return *this; -} - -// A more clever put operator for strings that knows how to deal with -// quoted strings containing back-quoted quotes. - -template STREAM & -operator>> (STREAM &stream, - ACE_Quoted_String &str) -{ - char c; - - if (!(stream >> c)) // eat space up to the first char - // stream.set (ios::eofbit|ios::failbit); - return stream; - - str = ""; // Initialize the string - - // if we don't have a quote, append until we see space - if (c != '"') - for (str = c; stream.get (c) && !isspace (c); str += c) - continue; - else - for (; stream.get (c) && c != '"'; str += c) - if (c == '\\') - { - stream.get (c); - if (c != '"') - str += '\\'; - } - - return stream; -} - -template STREAM & -operator<< (STREAM &stream, - ACE_Quoted_String &str) -{ - stream.put ('"'); - - for (u_int i = 0; i < str.length (); ++i) - { - if (str[i] == '"') - stream.put ('\\'); - stream.put (str[i]); - } - - stream.put ('"'); - - return stream; -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_HAS_STRING_CLASS */ -#endif /* ACE_LACKS_ACE_IOSTREAM */ -#endif /* ACE_IOSTREAM_T_CPP */ diff --git a/modules/worldengine/deps/acelite/ace/IOStream_T.h b/modules/worldengine/deps/acelite/ace/IOStream_T.h deleted file mode 100644 index d67e4ee41e..0000000000 --- a/modules/worldengine/deps/acelite/ace/IOStream_T.h +++ /dev/null @@ -1,295 +0,0 @@ -/* -*- C++ -*- */ - -//============================================================================= -/** - * @file IOStream_T.h - * - * @author James CE Johnson - * @author Jim Crossley - * - * This file should not be included directly by application - * code. Instead, it should include "ace/IOStream.h". That's because - * we only put some conditional compilations in that file. - */ -//============================================================================= - -#ifndef ACE_IOSTREAM_T_H -#define ACE_IOSTREAM_T_H -#include /**/ "ace/pre.h" - -#include "ace/IOStream.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#if !defined (ACE_LACKS_ACE_IOSTREAM) - -# include "ace/INET_Addr.h" -# include "ace/Global_Macros.h" - -# if defined (ACE_LACKS_IOSTREAM_FX) -# include "ace/os_include/os_ctype.h" -# endif /**/ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -# if defined (ACE_HAS_STRING_CLASS) -template STREAM & operator>> (STREAM &stream, ACE_Quoted_String &str); -template STREAM & operator<< (STREAM &stream, ACE_Quoted_String &str); -# endif /* defined (ACE_HAS_STRING_CLASS) */ - -template -class ACE_Streambuf_T : public ACE_Streambuf -{ -public: - /** - * We will be given a STREAM by the iostream object which creates - * us. See the ACE_IOStream template for how that works. Like - * other streambuf objects, we can be input-only, output-only or - * both. - */ - ACE_Streambuf_T (STREAM *peer, - u_int streambuf_size = ACE_STREAMBUF_SIZE, - int io_mode = ios::in | ios::out); - - virtual ssize_t send (char *buf, ssize_t len); - - virtual ssize_t recv (char *buf, - ssize_t len, - ACE_Time_Value *tv = 0); - - virtual ssize_t recv (char *buf, - ssize_t len, - int flags, - ACE_Time_Value * tv = 0); - - virtual ssize_t recv_n (char *buf, - ssize_t len, - int flags = 0, - ACE_Time_Value *tv = 0); - -protected: - virtual ACE_HANDLE get_handle (void); - - /// This will be our ACE_SOCK_Stream or similar object. - STREAM *peer_; -}; - -/** - * @class ACE_IOStream - * - * @brief A template adapter for creating an iostream-like object using - * an ACE IPC Stream for the actual I/O. Iostreams use an - * underlying streambuf object for the IO interface. The - * iostream class and derivatives provide you with a host of - * convenient operators that access the streambuf. - * - * We inherit all characteristics of iostream and your - * class. When you create a new class from this template, you - * can use it anywhere you would have used your original - * class. - * To create an iostream for your favorite ACE IPC class (e.g., - * ACE_SOCK_Stream), feed that class to this template's - * parameter, e.g., - * typedef ACE_Svc_Handler - * Service_Handler; - * Because the operators in the iostream class are not virtual, - * you cannot easily provide overloads in your custom - * ACE_IOStream classes. To make these things work correctly, - * you need to overload ALL operators of the ACE_IOStream you - * create. I've attempted to do that here to make things easier - * for you but there are no guarantees. - * In the iostream.cpp file is an example of why it is necessary - * to overload all of the get/put operators when you want to - * customize only one or two. - */ -template -class ACE_IOStream : public iostream, public STREAM -{ -public: - // = Initialization and termination methods. - ACE_IOStream (STREAM &stream, - u_int streambuf_size = ACE_STREAMBUF_SIZE); - - /** - * The default constructor. This will initialize your STREAM and - * then setup the iostream baseclass to use a custom streambuf based - * on STREAM. - */ - ACE_IOStream (u_int streambuf_size = ACE_STREAMBUF_SIZE); - - /// We have to get rid of the ourselves since we gave it - /// to the base class; - virtual ~ACE_IOStream (void); - - /// The only ambiguity in the multiple inheritance is the - /// function. - virtual int close (void); - - /** - * Returns 1 if we're at the end of the , i.e., if the - * connection has closed down or an error has occurred, else 0. - * Under the covers, calls the streambuf's @a timeout function - * which will reset the timeout flag. As as result, you should save - * the return of and check it instead of calling - * successively. - */ - int eof (void) const; - -# if defined (ACE_HAS_STRING_CLASS) - /** - * A simple string operator. The base has them for char* - * but that isn't always the best thing for a . If we don't - * provide our own here, we may not get what we want. - */ - virtual ACE_IOStream &operator>> (ACE_IOStream_String &v); - - /// The converse of the operator. - virtual ACE_IOStream &operator<< (ACE_IOStream_String &v); - -# endif /* ACE_HAS_STRING_CLASS */ - // = Using the macros to provide get/set operators. - GETPUT_FUNC_SET (ACE_IOStream) - -# if defined (ACE_LACKS_IOSTREAM_FX) - virtual int ipfx (int noskip = 0) - { - if (good ()) - { - if (tie () != 0) - tie ()->flush (); - if (!noskip && flags () & skipws) - { - int ch; - while (isspace (ch = rdbuf ()->sbumpc ())) - continue; - if (ch != EOF) - rdbuf ()->sputbackc (ch); - } - if (good ()) - return 1; - } -# if !defined (ACE_WIN32) - // MS VC++ 5.0 doesn't declare setstate. - setstate (failbit); -# endif /* !ACE_WIN32 */ - return (0); - } - virtual int ipfx0 (void) { return ipfx (0); } // Optimized ipfx(0) - virtual int ipfx1 (void) // Optimized ipfx(1) - { - if (good ()) - { - if (tie () != 0) - tie ()->flush (); - if (good ()) - return 1; - } -# if !defined (ACE_WIN32) - // MS VC++ 5.0 doesn't declare setstate. - setstate (failbit); -# endif /* !ACE_WIN32 */ - return (0); - } - virtual void isfx (void) { return; } - virtual int opfx (void) - { - if (good () && tie () != 0) - tie ()->flush (); - return good (); - } - virtual void osfx (void) { if (flags () & unitbuf) flush (); } -# else -# if defined (__GNUC__) - virtual int ipfx0 (void) { return iostream::ipfx0 (); } // Optimized ipfx(0) - virtual int ipfx1 (void) { return iostream::ipfx1 (); } // Optimized ipfx(1) -# else - virtual int ipfx0 (void) { return iostream::ipfx (0); } - virtual int ipfx1 (void) { return iostream::ipfx (1); } -# endif /* __GNUC__ */ - virtual int ipfx (int need = 0) { return iostream::ipfx (need); } - virtual void isfx (void) { iostream::isfx (); } - virtual int opfx (void) { return iostream::opfx (); } - virtual void osfx (void) { iostream::osfx (); } -# endif /* ACE_LACKS_IOSTREAM_FX */ - - /// Allow the programmer to provide a timeout for read operations. - /// Give it a pointer to NULL to block forever. - ACE_IOStream & operator>> (ACE_Time_Value *&tv); - -protected: - /// This is where all of the action takes place. The streambuf_ is - /// the interface to the underlying STREAM. - ACE_Streambuf_T *streambuf_; - -private: - // = Private methods. - - // We move these into the private section so that they cannot be - // used by the application programmer. This is necessary because - // streambuf_ will be buffering IO on the STREAM object. If these - // functions were used in your program, there is a danger of getting - // the datastream out of sync. - ACE_UNIMPLEMENTED_FUNC (ssize_t send (...)) - ACE_UNIMPLEMENTED_FUNC (ssize_t recv (...)) - ACE_UNIMPLEMENTED_FUNC (ssize_t send_n (...)) - ACE_UNIMPLEMENTED_FUNC (ssize_t recv_n (...)) -}; - -/** - * @class ACE_SOCK_Dgram_SC - * - * @brief "Dgram_SC" is short for "Datagram Self-Contained." - * - * Datagrams don't have the notion of a "peer". Each send and - * receive on a datagram can go to a different peer if you want. - * If you're using datagrams for stream activity, you probably - * want 'em all to go to (and come from) the same place. That's - * what this class is for. Here, we keep an address object so - * that we can remember who last sent us data. When we write - * back, we're then able to write back to that same address. - */ -template -class ACE_SOCK_Dgram_SC : public STREAM -{ -public: - ACE_SOCK_Dgram_SC (void); - ACE_SOCK_Dgram_SC (STREAM &source, - ACE_INET_Addr &dest); - ssize_t send_n (char *buf, ssize_t len); - ssize_t recv (char *buf, - ssize_t len, - ACE_Time_Value *tv = 0); - ssize_t recv (char *buf, - ssize_t len, - int flags, - ACE_Time_Value *tv = 0); - ssize_t recv_n (char *buf, - ssize_t len, - int flags = 0, - ACE_Time_Value *tv = 0); - int get_remote_addr (ACE_INET_Addr &addr) const; - -protected: - ACE_INET_Addr peer_; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -# if defined (__ACE_INLINE__) -# include "ace/IOStream_T.inl" -# endif /* __ACE_INLINE__ */ - -# if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -# include "ace/IOStream_T.cpp" -# endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -# if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -# pragma implementation ("IOStream_T.cpp") -# endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ -#endif /* ACE_LACKS_ACE_IOSTREAM */ - -#include /**/ "ace/post.h" -#endif /* ACE_IOSTREAM_T_H */ diff --git a/modules/worldengine/deps/acelite/ace/IOStream_T.inl b/modules/worldengine/deps/acelite/ace/IOStream_T.inl deleted file mode 100644 index 1797de613d..0000000000 --- a/modules/worldengine/deps/acelite/ace/IOStream_T.inl +++ /dev/null @@ -1,120 +0,0 @@ -// -*- C++ -*- -#include "ace/Handle_Set.h" -#include "ace/OS_NS_errno.h" -#include "ace/OS_NS_sys_select.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -template ACE_INLINE int -ACE_IOStream::eof (void) const -{ - // Get the timeout value of the streambuf - ACE_Time_Value *timeout = this->streambuf_->recv_timeout (0); - - // Reset the timeout value of the streambuf. - (void) this->streambuf_->recv_timeout (timeout); - - char c; - int rval = this->streambuf_->recv_n (&c, - sizeof c, - MSG_PEEK, - timeout); - - // Timeout, not an eof - if (this->streambuf_->timeout()) - return 0; - - // No timeout, got enough data: not eof - if (rval == sizeof(char)) - return 0; - - // No timeout, not enough data: definately eof - return 1; -} - -template ACE_INLINE -ACE_SOCK_Dgram_SC::ACE_SOCK_Dgram_SC (void) -{ -} - -template ACE_INLINE -ACE_SOCK_Dgram_SC::ACE_SOCK_Dgram_SC (STREAM &source, - ACE_INET_Addr &dest) - : STREAM (source), - peer_ (dest) -{ -} - -template ACE_INLINE ssize_t -ACE_SOCK_Dgram_SC::send_n (char *buf, - ssize_t len) -{ - return STREAM::send (buf, len, peer_); -} - -template ACE_INLINE ssize_t -ACE_SOCK_Dgram_SC::recv (char *buf, - ssize_t len, - ACE_Time_Value *tv) -{ - //FUZZ: disable check_for_lack_ACE_OS - return recv (buf, len, 0, tv); - //FUZZ: enable check_for_lack_ACE_OS -} - -template ACE_INLINE ssize_t -ACE_SOCK_Dgram_SC::recv (char *buf, - ssize_t len, - int flags, - ACE_Time_Value *tv) -{ - if (tv != 0) - { - ACE_HANDLE handle = this->get_handle (); - ACE_Handle_Set handle_set; - - handle_set.set_bit (handle); - - switch (ACE_OS::select (int (handle) + 1, - (fd_set *) handle_set, // read_fds. - (fd_set *) 0, // write_fds. - (fd_set *) 0, // exception_fds. - tv)) - { - case 0: - errno = ETIME; - case -1: - return -1; - default: - ; // Do the 'recv' below - } - } - - int rval = STREAM::recv (buf, len, peer_, flags); -#if defined (ACE_WIN32) - if (rval == SOCKET_ERROR) - if (::WSAGetLastError () == WSAEMSGSIZE) - if (ACE_BIT_ENABLED (flags, MSG_PEEK)) - rval = len; -#endif /* ACE_WIN32 */ - return rval < len ? rval : len; -} - -template ACE_INLINE ssize_t -ACE_SOCK_Dgram_SC::recv_n (char *buf, - ssize_t len, - int flags, - ACE_Time_Value *tv) -{ - int rval = this->recv (buf, len, flags, tv); - return rval; -} - -template ACE_INLINE int -ACE_SOCK_Dgram_SC::get_remote_addr (ACE_INET_Addr &addr) const -{ - addr = peer_; - return 0; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/IO_Cntl_Msg.cpp b/modules/worldengine/deps/acelite/ace/IO_Cntl_Msg.cpp deleted file mode 100644 index 3501a376cf..0000000000 --- a/modules/worldengine/deps/acelite/ace/IO_Cntl_Msg.cpp +++ /dev/null @@ -1,5 +0,0 @@ -#include "ace/IO_Cntl_Msg.h" - -#if !defined (__ACE_INLINE__) -#include "ace/IO_Cntl_Msg.inl" -#endif /* __ACE_INLINE__ */ diff --git a/modules/worldengine/deps/acelite/ace/IO_Cntl_Msg.h b/modules/worldengine/deps/acelite/ace/IO_Cntl_Msg.h deleted file mode 100644 index e4f2a2a5f1..0000000000 --- a/modules/worldengine/deps/acelite/ace/IO_Cntl_Msg.h +++ /dev/null @@ -1,110 +0,0 @@ -// -*- C++ -*- - -//========================================================================== -/** - * @file IO_Cntl_Msg.h - * - * @author Doug Schmidt - */ -//========================================================================== - - -#ifndef ACE_IO_CNTL_MSG_H -#define ACE_IO_CNTL_MSG_H - -#include /**/ "ace/pre.h" - -#include /**/ "ace/ACE_export.h" -#include "ace/os_include/os_stddef.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_IO_Cntl_Msg - * - * @brief Data format for IOCTL messages - */ -class ACE_Export ACE_IO_Cntl_Msg -{ -public: - enum - { - /// Set the low water mark. - SET_LWM = 1, - /// Get the low water mark. - GET_LWM = 2, - /// Set the high water mark. - SET_HWM = 3, - /// Get the high water mark. - GET_HWM = 4, - /// Link modules - MOD_LINK = 5, - /// Unlink modules - MOD_UNLINK = 6 - }; - - typedef unsigned short ACE_IO_Cntl_Cmds; - - // = Initialization method. - /// Initialize the control message. - ACE_IO_Cntl_Msg (ACE_IO_Cntl_Cmds c); - - // = Get/set methods - - /// Get command. - ACE_IO_Cntl_Cmds cmd (void); - - /// Set command. - void cmd (ACE_IO_Cntl_Cmds c); - - /// Get count. - size_t count (void); - - /// Set count. - void count (size_t c); - - /// Get error. - int error (void); - - /// Set error. - void error (int e); - - /// Get return value. - int rval (void); - - /// Set return value. - void rval (int r); - - /// Dump the state of an object. - void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - -private: - /// Command. - ACE_IO_Cntl_Cmds cmd_; - - /// Count. - size_t count_; - - /// Error. - int error_; - - /// Return value - int rval_; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/IO_Cntl_Msg.inl" -#endif /* __ACE_INLINE__ */ - -#include /**/ "ace/post.h" - -#endif /* ACE_IO_CNTL_MSG_H */ diff --git a/modules/worldengine/deps/acelite/ace/IO_Cntl_Msg.inl b/modules/worldengine/deps/acelite/ace/IO_Cntl_Msg.inl deleted file mode 100644 index 17f1dbcfb6..0000000000 --- a/modules/worldengine/deps/acelite/ace/IO_Cntl_Msg.inl +++ /dev/null @@ -1,61 +0,0 @@ -// -*- C++ -*- -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_INLINE -ACE_IO_Cntl_Msg::ACE_IO_Cntl_Msg (ACE_IO_Cntl_Cmds c) : - cmd_ (c), - count_ (0), - error_ (0), - rval_ (0) -{ -} - -ACE_INLINE ACE_IO_Cntl_Msg::ACE_IO_Cntl_Cmds -ACE_IO_Cntl_Msg::cmd (void) -{ - return this->cmd_; -} - -ACE_INLINE void -ACE_IO_Cntl_Msg::cmd (ACE_IO_Cntl_Cmds c) -{ - this->cmd_ = c; -} - -ACE_INLINE size_t -ACE_IO_Cntl_Msg::count (void) -{ - return this->count_; -} - -ACE_INLINE void -ACE_IO_Cntl_Msg::count (size_t c) -{ - this->count_ = c; -} - -ACE_INLINE int -ACE_IO_Cntl_Msg::error (void) -{ - return this->error_; -} - -ACE_INLINE void -ACE_IO_Cntl_Msg::error (int e) -{ - this->error_ = e; -} - -ACE_INLINE int -ACE_IO_Cntl_Msg::rval (void) -{ - return this->rval_; -} - -ACE_INLINE void -ACE_IO_Cntl_Msg::rval (int r) -{ - this->rval_ = r; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/IO_SAP.cpp b/modules/worldengine/deps/acelite/ace/IO_SAP.cpp deleted file mode 100644 index f31d0699d0..0000000000 --- a/modules/worldengine/deps/acelite/ace/IO_SAP.cpp +++ /dev/null @@ -1,131 +0,0 @@ -#include "ace/IO_SAP.h" - -#include "ace/Log_Category.h" -#include "ace/OS_NS_unistd.h" -#include "ace/OS_NS_errno.h" -#include "ace/OS_NS_fcntl.h" -#include "ace/os_include/os_signal.h" - -#if !defined (__ACE_INLINE__) -#include "ace/IO_SAP.inl" -#endif /* __ACE_INLINE__ */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_ALLOC_HOOK_DEFINE(ACE_IO_SAP) - -// This is the do-nothing constructor. It does not perform a -// ACE_OS::open system call. - -ACE_IO_SAP::ACE_IO_SAP (void) - : handle_ (ACE_INVALID_HANDLE) -{ - ACE_TRACE ("ACE_IO_SAP::ACE_IO_SAP"); -} - -void -ACE_IO_SAP::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_IO_SAP::dump"); - - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("handle_ = %d"), this->handle_)); - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} - -int -ACE_IO_SAP::enable (int value) const -{ - ACE_TRACE ("ACE_IO_SAP::enable"); - - switch (value) - { -#if defined (SIGURG) - case SIGURG: - case ACE_SIGURG: -#if defined (F_SETOWN) - return ACE_OS::fcntl (this->handle_, - F_SETOWN, - ACE_OS::getpid ()); -#else - ACE_NOTSUP_RETURN (-1); -#endif /* F_SETOWN */ -#endif /* SIGURG */ -#if defined (SIGIO) - case SIGIO: - case ACE_SIGIO: -#if defined (F_SETOWN) && defined (FASYNC) - if (ACE_OS::fcntl (this->handle_, - F_SETOWN, - ACE_OS::getpid ()) == -1 - || ACE::set_flags (this->handle_, - FASYNC) == -1) - return -1; - break; -#else - ACE_NOTSUP_RETURN (-1); -#endif /* F_SETOWN && FASYNC */ -#else // <== - ACE_NOTSUP_RETURN (-1); -#endif /* SIGIO <== */ - case ACE_NONBLOCK: - if (ACE::set_flags (this->handle_, - ACE_NONBLOCK) == -1) - return -1; - break; - default: - return -1; - } - - return 0; -} - -int -ACE_IO_SAP::disable (int value) const -{ - ACE_TRACE ("ACE_IO_SAP::disable"); - - switch (value) - { -#if defined (SIGURG) - case SIGURG: - case ACE_SIGURG: -#if defined (F_SETOWN) - if (ACE_OS::fcntl (this->handle_, - F_SETOWN, 0) == -1) - return -1; - break; -#else - ACE_NOTSUP_RETURN (-1); -#endif /* F_SETOWN */ -#endif /* SIGURG */ -#if defined (SIGIO) - case SIGIO: - case ACE_SIGIO: -#if defined (F_SETOWN) && defined (FASYNC) - if (ACE_OS::fcntl (this->handle_, - F_SETOWN, - 0) == -1 - || ACE::clr_flags (this->handle_, FASYNC) == -1) - return -1; - break; -#else - ACE_NOTSUP_RETURN (-1); -#endif /* F_SETOWN && FASYNC */ -#else // <== - ACE_NOTSUP_RETURN (-1); -#endif /* SIGIO <== */ - case ACE_NONBLOCK: - if (ACE::clr_flags (this->handle_, - ACE_NONBLOCK) == -1) - return -1; - break; - default: - return -1; - } - return 0; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/IO_SAP.h b/modules/worldengine/deps/acelite/ace/IO_SAP.h deleted file mode 100644 index f1183e638d..0000000000 --- a/modules/worldengine/deps/acelite/ace/IO_SAP.h +++ /dev/null @@ -1,91 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file IO_SAP.h - * - * @author Doug Schmidt - */ -//============================================================================= - - -#ifndef ACE_IO_SAP_H -#define ACE_IO_SAP_H -#include /**/ "ace/pre.h" - -#include "ace/Flag_Manip.h" -#include "ace/os_include/sys/os_types.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_IO_SAP - * - * @brief Defines the methods for the base class of the ACE_IO_SAP - * abstraction, which includes ACE_FILE and ACE_DEV. - */ -class ACE_Export ACE_IO_SAP -{ -public: - enum - { - /// Be consistent with Winsock - INVALID_HANDLE = -1 - }; - - /// Default dtor. - ~ACE_IO_SAP (void); - - /// Interface for ioctl. - int control (int cmd, void *) const; - - // = Common I/O handle options related to files. - - /** - * Enable asynchronous I/O (ACE_SIGIO), urgent data (ACE_SIGURG), - * non-blocking I/O (ACE_NONBLOCK), or close-on-exec (ACE_CLOEXEC), - * which is passed as the @a value. - */ - int enable (int value) const; - - /** - * Disable asynchronous I/O (ACE_SIGIO), urgent data (ACE_SIGURG), - * non-blocking I/O (ACE_NONBLOCK), or close-on-exec (ACE_CLOEXEC), - * which is passed as the @a value. - */ - int disable (int value) const; - - /// Get the underlying handle. - ACE_HANDLE get_handle (void) const; - - /// Set the underlying handle. - void set_handle (ACE_HANDLE handle); - - /// Dump the state of an object. - void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - -protected: - /// Ensure that ACE_IO_SAP is an abstract base class. - ACE_IO_SAP (void); - -private: - /// Underlying I/O handle. - ACE_HANDLE handle_; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/IO_SAP.inl" -#endif /* __ACE_INLINE__ */ - -#include /**/ "ace/post.h" -#endif /* ACE_IO_SAP_H */ diff --git a/modules/worldengine/deps/acelite/ace/IO_SAP.inl b/modules/worldengine/deps/acelite/ace/IO_SAP.inl deleted file mode 100644 index d3472bb974..0000000000 --- a/modules/worldengine/deps/acelite/ace/IO_SAP.inl +++ /dev/null @@ -1,39 +0,0 @@ -// -*- C++ -*- -#include "ace/OS_NS_stropts.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_INLINE -ACE_IO_SAP::~ACE_IO_SAP (void) -{ - ACE_TRACE ("ACE_IO_SAP::~ACE_IO_SAP"); -} - -// Used to return the underlying handle_. - -ACE_INLINE ACE_HANDLE -ACE_IO_SAP::get_handle (void) const -{ - ACE_TRACE ("ACE_IO_SAP::get_handle"); - return this->handle_; -} - -// Used to set the underlying handle_. - -ACE_INLINE void -ACE_IO_SAP::set_handle (ACE_HANDLE handle) -{ - ACE_TRACE ("ACE_IO_SAP::set_handle"); - this->handle_ = handle; -} - -// Provides access to the ACE_OS::ioctl system call. - -ACE_INLINE int -ACE_IO_SAP::control (int cmd, void *arg) const -{ - ACE_TRACE ("ACE_IO_SAP::control"); - return ACE_OS::ioctl (this->handle_, cmd, arg); -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/IPC_SAP.cpp b/modules/worldengine/deps/acelite/ace/IPC_SAP.cpp deleted file mode 100644 index 35287f2a06..0000000000 --- a/modules/worldengine/deps/acelite/ace/IPC_SAP.cpp +++ /dev/null @@ -1,183 +0,0 @@ -#include "ace/IPC_SAP.h" - -#include "ace/Log_Category.h" -#include "ace/OS_NS_unistd.h" -#include "ace/os_include/os_signal.h" -#include "ace/OS_NS_errno.h" -#include "ace/OS_NS_fcntl.h" - -#if !defined (__ACE_INLINE__) -#include "ace/IPC_SAP.inl" -#endif /* __ACE_INLINE__ */ - - - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_ALLOC_HOOK_DEFINE(ACE_IPC_SAP) - -void -ACE_IPC_SAP::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_IPC_SAP::dump"); - - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("handle_ = %d"), this->handle_)); - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} - -// This is the do-nothing constructor. It does not perform a -// ACE_OS::socket system call. - -ACE_IPC_SAP::ACE_IPC_SAP (void) - : handle_ (ACE_INVALID_HANDLE) -{ - // ACE_TRACE ("ACE_IPC_SAP::ACE_IPC_SAP"); -} - -int -ACE_IPC_SAP::enable (int value) const -{ - ACE_TRACE ("ACE_IPC_SAP::enable"); - -#if defined (ACE_WIN32) || defined (ACE_VXWORKS) - switch (value) - { - case ACE_NONBLOCK: - { - // nonblocking argument (1) - // blocking: (0) - int nonblock = 1; - return ACE_OS::ioctl (this->handle_, - FIONBIO, - &nonblock); - } - default: - ACE_NOTSUP_RETURN (-1); - } -#else /* ! ACE_WIN32 && ! ACE_VXWORKS */ - switch (value) - { -#if defined (SIGURG) - case SIGURG: - case ACE_SIGURG: -#if defined (F_SETOWN) - return ACE_OS::fcntl (this->handle_, - F_SETOWN, - ACE_OS::getpid ()); -#else - ACE_NOTSUP_RETURN (-1); -#endif /* F_SETOWN */ -#endif /* SIGURG */ -#if defined (SIGIO) - case SIGIO: - case ACE_SIGIO: -#if defined (F_SETOWN) && defined (FASYNC) - if (ACE_OS::fcntl (this->handle_, - F_SETOWN, - ACE_OS::getpid ()) == -1 - || ACE::set_flags (this->handle_, - FASYNC) == -1) - return -1; - break; -#else - ACE_NOTSUP_RETURN (-1); -#endif /* F_SETOWN && FASYNC */ -#endif /* SIGIO <== */ -#if defined (F_SETFD) - case ACE_CLOEXEC: - // Enables the close-on-exec flag. - if (ACE_OS::fcntl (this->handle_, - F_SETFD, - 1) == -1) - return -1; - break; -#endif /* F_SETFD */ - case ACE_NONBLOCK: - if (ACE::set_flags (this->handle_, - ACE_NONBLOCK) == ACE_INVALID_HANDLE) - return -1; - break; - default: - return -1; - } - return 0; -#endif /* ! ACE_WIN32 && ! ACE_VXWORKS */ - - /* NOTREACHED */ -} - -int -ACE_IPC_SAP::disable (int value) const -{ - ACE_TRACE ("ACE_IPC_SAP::disable"); - -#if defined (ACE_WIN32) || defined (ACE_VXWORKS) - switch (value) - { - case ACE_NONBLOCK: - // nonblocking argument (1) - // blocking: (0) - { - int nonblock = 0; - return ACE_OS::ioctl (this->handle_, - FIONBIO, - &nonblock); - } - default: - ACE_NOTSUP_RETURN (-1); - } -#else /* ! ACE_WIN32 && ! ACE_VXWORKS */ - switch (value) - { -#if defined (SIGURG) - case SIGURG: - case ACE_SIGURG: -#if defined (F_SETOWN) - return ACE_OS::fcntl (this->handle_, - F_SETOWN, - 0); -#else - ACE_NOTSUP_RETURN (-1); -#endif /* F_SETOWN */ -#endif /* SIGURG */ -#if defined (SIGIO) - case SIGIO: - case ACE_SIGIO: -#if defined (F_SETOWN) && defined (FASYNC) - if (ACE_OS::fcntl (this->handle_, - F_SETOWN, - 0) == -1 - || ACE::clr_flags (this->handle_, - FASYNC) == -1) - return -1; - break; -#else - ACE_NOTSUP_RETURN (-1); -#endif /* F_SETOWN && FASYNC */ -#endif /* SIGIO <== */ -#if defined (F_SETFD) - case ACE_CLOEXEC: - // Disables the close-on-exec flag. - if (ACE_OS::fcntl (this->handle_, - F_SETFD, - 0) == -1) - return -1; - break; -#endif /* F_SETFD */ - case ACE_NONBLOCK: - if (ACE::clr_flags (this->handle_, - ACE_NONBLOCK) == -1) - return -1; - break; - default: - return -1; - } - return 0; -#endif /* ! ACE_WIN32 && ! ACE_VXWORKS */ - /* NOTREACHED */ -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/IPC_SAP.h b/modules/worldengine/deps/acelite/ace/IPC_SAP.h deleted file mode 100644 index 43dc993024..0000000000 --- a/modules/worldengine/deps/acelite/ace/IPC_SAP.h +++ /dev/null @@ -1,91 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file IPC_SAP.h - * - * @author Douglas C. Schmidt - */ -//============================================================================= - -#ifndef ACE_IPC_SAP_H -#define ACE_IPC_SAP_H -#include /**/ "ace/pre.h" - -#include "ace/Flag_Manip.h" -#include "ace/os_include/sys/os_types.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_IPC_SAP - * - * @brief Defines the member functions for the base class of the - * ACE_IPC_SAP abstraction. - */ -class ACE_Export ACE_IPC_SAP -{ -public: - - /// Interface for . - int control (int cmd, void *) const; - - // = Common I/O handle options related to sockets. - - /** - * Enable asynchronous I/O (ACE_SIGIO), urgent data (ACE_SIGURG), - * non-blocking I/O (ACE_NONBLOCK), or close-on-exec (ACE_CLOEXEC), - * which is passed as the @a value. - */ - int enable (int value) const; - - /** - * Disable asynchronous I/O (ACE_SIGIO), urgent data (ACE_SIGURG), - * non-blocking I/O (ACE_NONBLOCK), or close-on-exec (ACE_CLOEXEC), - * which is passed as the @a value. - */ - int disable (int value) const; - - /// Get the underlying handle. - ACE_HANDLE get_handle (void) const; - - /// Set the underlying handle. - void set_handle (ACE_HANDLE handle); - - /// Dump the state of an object. - void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - -protected: - - // = Ensure that ACE_IPC_SAP is an abstract base class. - /// Default constructor. - ACE_IPC_SAP (void); - - /// Protected destructor. - /** - * Not a virtual destructor. Protected destructor to prevent - * operator delete() from being called through a base class - * ACE_IPC_SAP pointer/reference. - */ - ~ACE_IPC_SAP (void); - -private: - /// Underlying I/O handle. - ACE_HANDLE handle_; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/IPC_SAP.inl" -#endif /* __ACE_INLINE__ */ - -#include /**/ "ace/post.h" -#endif /* ACE_IPC_SAP_H */ diff --git a/modules/worldengine/deps/acelite/ace/IPC_SAP.inl b/modules/worldengine/deps/acelite/ace/IPC_SAP.inl deleted file mode 100644 index 8419609148..0000000000 --- a/modules/worldengine/deps/acelite/ace/IPC_SAP.inl +++ /dev/null @@ -1,37 +0,0 @@ -// -*- C++ -*- -#include "ace/OS_NS_stropts.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_INLINE -ACE_IPC_SAP::~ACE_IPC_SAP (void) -{ - // ACE_TRACE ("ACE_IPC_SAP::~ACE_IPC_SAP"); -} - -ACE_INLINE ACE_HANDLE -ACE_IPC_SAP::get_handle (void) const -{ - ACE_TRACE ("ACE_IPC_SAP::get_handle"); - return this->handle_; -} - -// Used to set the underlying handle_. - -ACE_INLINE void -ACE_IPC_SAP::set_handle (ACE_HANDLE handle) -{ - ACE_TRACE ("ACE_IPC_SAP::set_handle"); - this->handle_ = handle; -} - -// Provides access to the ACE_OS::ioctl system call. - -ACE_INLINE int -ACE_IPC_SAP::control (int cmd, void *arg) const -{ - ACE_TRACE ("ACE_IPC_SAP::control"); - return ACE_OS::ioctl (this->handle_, cmd, arg); -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/If_Then_Else.h b/modules/worldengine/deps/acelite/ace/If_Then_Else.h deleted file mode 100644 index 5b8d3e93f4..0000000000 --- a/modules/worldengine/deps/acelite/ace/If_Then_Else.h +++ /dev/null @@ -1,87 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file If_Then_Else.h - * - * @c ACE::If_Then_Else traits template based on the @c IfThenElse - * template described in the book "C++ Templates" by Vandevoorde and - * Josuttis. - * - * @author Ossama Othman - */ -//============================================================================= - -#ifndef ACE_IF_THEN_ELSE_H -#define ACE_IF_THEN_ELSE_H - -#include /**/ "ace/config-lite.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -namespace ACE -{ - - /** - * @struct If_Then_Else - * - * @brief Compile-time selection of type based on a boolean value. - * - * This primary template selects the second or third argument based - * on the value of the boolean first argument. - * - * Usage example: - * - * \code - * - * template - * class Foo - * { - * public: - * // Set "TheType" to be the larger of "T" and "int". - * typedef typename If_Then_Else<(sizeof (T) > sizeof (int)), - * T, - * int>::result_type TheType; - * }; - * - * \endcode - * - * @note This merely a forward declaration since we really only care - * about the partial specializations below. - */ - template - struct If_Then_Else; - - /** - * @struct If_Then_Else - * - * @brief Select of type @a Ta if boolean value is @c true. - * - * This partial specialization selects the type @a Ta if the boolean - * first argument is @c true. - */ - template - struct If_Then_Else - { - typedef Ta result_type; - }; - - /** - * @struct If_Then_Else - * - * @brief Select of type @a Tb if boolean value is @c false. - * - * This partial specialization selects the type @a Tb if the boolean - * first argument is @c false. - */ - template - struct If_Then_Else - { - typedef Tb result_type; - }; - -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_IF_THEN_ELSE_H */ diff --git a/modules/worldengine/deps/acelite/ace/Init_ACE.cpp b/modules/worldengine/deps/acelite/ace/Init_ACE.cpp deleted file mode 100644 index 9e07a8ab4c..0000000000 --- a/modules/worldengine/deps/acelite/ace/Init_ACE.cpp +++ /dev/null @@ -1,40 +0,0 @@ -#include "ace/Init_ACE.h" - -#include "ace/Object_Manager.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -unsigned int ACE::init_fini_count_ = 0; - -int -ACE::init (void) -{ - // Don't use ACE_TRACE, because Object_Manager might not have been - // instantiated yet. - // ACE_TRACE ("ACE::init"); - - ++ACE::init_fini_count_; - - return ACE_Object_Manager::instance ()->init (); -} - -int -ACE::fini (void) -{ - ACE_TRACE ("ACE::fini"); - - if (ACE::init_fini_count_ > 0) - { - if (--ACE::init_fini_count_ == 0) - return ACE_Object_Manager::instance ()->fini (); - else - // Wait for remaining fini () calls. - return 1; - } - else - // More ACE::fini () calls than ACE::init () calls. Bad - // application! - return -1; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Init_ACE.h b/modules/worldengine/deps/acelite/ace/Init_ACE.h deleted file mode 100644 index dbf06ead97..0000000000 --- a/modules/worldengine/deps/acelite/ace/Init_ACE.h +++ /dev/null @@ -1,68 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Init_ACE.h - * - * Initialize and finalize the ACE library services. You can - * generally execute the @a ACE::init() and @a ACE::fini() sequence - * multiple times, but be aware that nothing that ACE controls (e.g., - * singletons, thread-specific services, loaded services, etc.) will - * survive the @a ACE::fini(). - */ -//============================================================================= - - -#ifndef ACE_INIT_ACE_H -#define ACE_INIT_ACE_H - -#include /**/ "ace/pre.h" - -#include /**/ "ace/ACE_export.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -namespace ACE -{ - /** - * This method initializes the ACE library services and initializes - * ACE's internal resources. Applications should not instantiate - * ACE classes or call methods on objects of these classes until @a - * ACE::init() returns successfully. - - * @return Returns 0 on success, -1 on failure, and 1 if it had - * already been called. - */ - extern ACE_Export int init (void); - - /** - * Finalize the ACE library services and releases ACE's internal - * resources. In general, do not instantiate ACE classes or call - * methods on objects of these classes after @a ACE::fini() has been - * called. - * - * @return Returns 0 on success, -1 on failure, and 1 if it had already been - * called. - */ - extern ACE_Export int fini (void); - - // private: - // Used internally, so not exported. - - /** - * Counter to match init()/fini() calls. init() must increment it; - * fini() must decrement it. fini() then does nothing until it - * reaches 0. - */ - extern unsigned int init_fini_count_; -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#include /**/ "ace/post.h" - -#endif /* ACE_INIT_ACE_H */ diff --git a/modules/worldengine/deps/acelite/ace/Intrusive_Auto_Ptr.cpp b/modules/worldengine/deps/acelite/ace/Intrusive_Auto_Ptr.cpp deleted file mode 100644 index 4297cc719a..0000000000 --- a/modules/worldengine/deps/acelite/ace/Intrusive_Auto_Ptr.cpp +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef ACE_INTRUSIVE_AUTO_PTR_CPP -#define ACE_INTRUSIVE_AUTO_PTR_CPP - -#include "ace/Intrusive_Auto_Ptr.h" - -#if !defined (__ACE_INLINE__) -#include "ace/Intrusive_Auto_Ptr.inl" -#endif /* __ACE_INLINE __ */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -template -ACE_Intrusive_Auto_Ptr::~ACE_Intrusive_Auto_Ptr (void) -{ - reset (0); -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* !ACE_INTRUSIVE_AUTO_PTR_CPP */ diff --git a/modules/worldengine/deps/acelite/ace/Intrusive_Auto_Ptr.h b/modules/worldengine/deps/acelite/ace/Intrusive_Auto_Ptr.h deleted file mode 100644 index 61c52dd871..0000000000 --- a/modules/worldengine/deps/acelite/ace/Intrusive_Auto_Ptr.h +++ /dev/null @@ -1,163 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Intrusive_Auto_Ptr.h - * - * @author Iliyan Jeliazkov - * - * @note Modeled on http://www.boost.org/boost/intrusive_ptr.hpp - */ -//============================================================================= - -#ifndef ACE_INTRUSIVE_AUTO_PTR_H -#define ACE_INTRUSIVE_AUTO_PTR_H - -#include /**/ "ace/pre.h" - -#include "ace/Auto_Ptr.h" -#include "ace/Atomic_Op.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -// Forward decl. -template class ACE_Intrusive_Auto_Ptr; - -/** - * @class ACE_Intrusive_Auto_Ptr - * - * @brief This class implements support for a reference counted - * auto_ptr. It assumes reference counting abilities of the - * parameterizing class. - * - * Assigning or copying instances of an ACE_Intrusive_Auto_Ptr will - * automatically increment the reference count. When the last instance - * that references a ACE_Intrusive_Auto_Ptr instance is destroyed or - * overwritten, it will invoke delete on its underlying pointer. - * - * The ACE_Intrusive_Auto_Ptr works by maintaining a reference to a - * separate representation object, ACE_Intrusive_Auto_Ptr_Rep. That - * separate representation object contains the reference count and the - * actual pointer value. - */ -template -class ACE_Intrusive_Auto_Ptr -{ -protected: - - /// Used to define a proper boolean conversion for "if (sp) ..." - static void unspecified_bool(ACE_Intrusive_Auto_Ptr***){}; - typedef void (*unspecified_bool_type)(ACE_Intrusive_Auto_Ptr***); - -public: - - /// Enables "if (sp) ..." - operator unspecified_bool_type() const - { - return rep_ == 0 ? 0: unspecified_bool; - } - - - // = Initialization and termination methods. - - /// Constructor that initializes an ACE_Intrusive_Auto_Ptr to - /// the specified pointer value. - ACE_Intrusive_Auto_Ptr (X *p = 0, bool addref = true); - - /// Copy constructor binds the new ACE_Intrusive_Auto_Ptr to the - /// representation object referenced by @a r. - /// An ACE_Intrusive_Auto_Ptr_Rep is created if necessary. - ACE_Intrusive_Auto_Ptr (const ACE_Intrusive_Auto_Ptr &r); - - // Derived class copy ctor - template ACE_Intrusive_Auto_Ptr(const ACE_Intrusive_Auto_Ptr & rhs); - - /// Destructor. Releases the reference to the underlying representation. - /// If the release of that reference causes its reference count to reach 0, - /// the representation object will also be destroyed. - virtual ~ACE_Intrusive_Auto_Ptr (void); - - /// Assignment operator that binds the current object and @a r to the same - /// ACE_Intrusive_Auto_Ptr_Rep. An ACE_Intrusive_Auto_Ptr_Rep - /// is created if necessary. - void operator = (const ACE_Intrusive_Auto_Ptr &r); - - /// Redirection operator - X *operator-> (void) const; - - /// Accessor method. - X &operator *() const; - - /// Releases the reference to the underlying representation object. - /// @retval The pointer value prior to releasing it. - X *release (void); - - /// Releases the current pointer value and then sets a new - /// pointer value specified by @a p. - void reset (X *p = 0); - - /// Get the pointer value. - X *get (void) const; - - /// Get the reference count value. - long count (void) const; - - /// Returns @c true if this object does not contain a valid pointer. - // bool null (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - -protected: - - /// Protect operations on the ACE_Intrusive_Auto_Ptr. - X *rep_; -}; - - /// Equality operator that returns @c true if both - /// ACE_Intrusive_Auto_Ptr objects point to the same underlying - /// representation. It does not compare the actual pointers. - /** - * @note It also returns @c true if both objects have just been - * instantiated and not used yet. - */ -template -bool operator==(ACE_Intrusive_Auto_Ptr const & a, ACE_Intrusive_Auto_Ptr const & b); - -/// Inequality operator, which is the opposite of equality. -template -bool operator!=(ACE_Intrusive_Auto_Ptr const & a, ACE_Intrusive_Auto_Ptr const & b); - -template -bool operator==(ACE_Intrusive_Auto_Ptr const & a, U * b); - -template -bool operator!=(ACE_Intrusive_Auto_Ptr & a, U * b); - -template -bool operator==(T * a, ACE_Intrusive_Auto_Ptr const & b); - -template -bool operator!=(T * a, ACE_Intrusive_Auto_Ptr const & b); - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/Intrusive_Auto_Ptr.inl" -#endif /* __ACE_INLINE __ */ - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "ace/Intrusive_Auto_Ptr.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Intrusive_Auto_Ptr.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ - -#include /**/ "ace/post.h" - -#endif /* ACE_INTRUSIVE_AUTO_PTR_H */ diff --git a/modules/worldengine/deps/acelite/ace/Intrusive_Auto_Ptr.inl b/modules/worldengine/deps/acelite/ace/Intrusive_Auto_Ptr.inl deleted file mode 100644 index 7d353e316c..0000000000 --- a/modules/worldengine/deps/acelite/ace/Intrusive_Auto_Ptr.inl +++ /dev/null @@ -1,144 +0,0 @@ -// -*- C++ -*- -#include "ace/Guard_T.h" -#include "ace/Log_Category.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -template ACE_INLINE -ACE_Intrusive_Auto_Ptr::ACE_Intrusive_Auto_Ptr (X *p, bool addref) - : rep_ (p) -{ - if (rep_ != 0 && addref) - X::intrusive_add_ref (rep_); -} - -template ACE_INLINE -ACE_Intrusive_Auto_Ptr::ACE_Intrusive_Auto_Ptr (const ACE_Intrusive_Auto_Ptr &r) - : rep_ (r.rep_) -{ - if (rep_ != 0) - X::intrusive_add_ref (rep_); -} - -template ACE_INLINE X * -ACE_Intrusive_Auto_Ptr::operator-> (void) const -{ - return this->rep_; -} - -template ACE_INLINE X & -ACE_Intrusive_Auto_Ptr::operator *() const -{ - return *this->rep_; -} - -template ACE_INLINE X* -ACE_Intrusive_Auto_Ptr::get (void) const -{ - // We return the ACE_Future_rep. - return this->rep_; -} - -template ACE_INLINE X * -ACE_Intrusive_Auto_Ptr::release (void) -{ - X *p = this->rep_; - if (this->rep_ != 0) - X::intrusive_remove_ref (this->rep_); - - this->rep_ = 0; - return p; -} - -template ACE_INLINE void -ACE_Intrusive_Auto_Ptr::reset (X *p) -{ - // Avoid deleting the underlying auto_ptr if assigning the same actual - // pointer value. - if (this->rep_ == p) - return; - - X *old_rep = this->rep_; - this->rep_ = p; - - if (this->rep_ != 0) - X::intrusive_add_ref (this->rep_); - - if (old_rep != 0) - X::intrusive_remove_ref (old_rep); - - return; -} - -template ACE_INLINE void -ACE_Intrusive_Auto_Ptr::operator = (const ACE_Intrusive_Auto_Ptr &rhs) -{ - // do nothing when aliasing - if (this->rep_ == rhs.rep_) - return; - - // assign a zero - if (rhs.rep_ == 0) - { - X::intrusive_remove_ref (this->rep_); - this->rep_ = 0; - return; - } - - // bind to the same as . - X *old_rep = this->rep_; - this->rep_ = rhs.rep_; - X::intrusive_add_ref (this->rep_); - X::intrusive_remove_ref (old_rep); -} - -// Copy derived class constructor -template template ACE_INLINE -ACE_Intrusive_Auto_Ptr::ACE_Intrusive_Auto_Ptr (const ACE_Intrusive_Auto_Ptr & rhs) -{ - // note implicit cast from U* to T* so illegal copy will generate a - // compiler warning here - this->rep_ = rhs.operator-> (); - X::intrusive_add_ref(this->rep_); -} - - /// Equality operator that returns @c true if both - /// ACE_Intrusive_Auto_Ptr objects point to the same underlying - /// representation. It does not compare the actual pointers. - /** - * @note It also returns @c true if both objects have just been - * instantiated and not used yet. - */ -template ACE_INLINE bool operator==(ACE_Intrusive_Auto_Ptr const & a, ACE_Intrusive_Auto_Ptr const & b) -{ - return a.get() == b.get(); -} - - /// Inequality operator, which is the opposite of equality. - template ACE_INLINE bool operator!=(ACE_Intrusive_Auto_Ptr const & a, ACE_Intrusive_Auto_Ptr const & b) -{ - return a.get() != b.get(); -} - - template ACE_INLINE bool operator==(ACE_Intrusive_Auto_Ptr const & a, U * b) -{ - return a.get() == b; -} - - template ACE_INLINE bool operator!=(ACE_Intrusive_Auto_Ptr & a, U * b) -{ - return a.get() != b; -} - - template ACE_INLINE bool operator==(T * a, ACE_Intrusive_Auto_Ptr const & b) -{ - return a == b.get(); -} - - template ACE_INLINE bool operator!=(T * a, ACE_Intrusive_Auto_Ptr const & b) -{ - return a != b.get(); -} - - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Intrusive_List.cpp b/modules/worldengine/deps/acelite/ace/Intrusive_List.cpp deleted file mode 100644 index 0623adbe49..0000000000 --- a/modules/worldengine/deps/acelite/ace/Intrusive_List.cpp +++ /dev/null @@ -1,120 +0,0 @@ -#ifndef ACE_INTRUSIVE_LIST_CPP -#define ACE_INTRUSIVE_LIST_CPP - -#include "ace/Intrusive_List.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#if !defined (__ACE_INLINE__) -#include "ace/Intrusive_List.inl" -#endif /* __ACE_INLINE__ */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -template -ACE_Intrusive_List::ACE_Intrusive_List (void) - : head_ (0) - , tail_ (0) -{ -} - -template -ACE_Intrusive_List::~ACE_Intrusive_List (void) -{ -} - -template void -ACE_Intrusive_List::push_back (T *node) -{ - if (this->tail_ == 0) - { - this->tail_ = node; - this->head_ = node; - node->next (0); - node->prev (0); - } - else - { - this->tail_->next (node); - node->prev (this->tail_); - node->next (0); - this->tail_ = node; - } -} - -template void -ACE_Intrusive_List::push_front (T *node) -{ - if (this->head_ == 0) - { - this->tail_ = node; - this->head_ = node; - node->next (0); - node->prev (0); - } - else - { - this->head_->prev (node); - node->next (this->head_); - node->prev (0); - this->head_ = node; - } -} - -template T * -ACE_Intrusive_List::pop_front (void) -{ - T *node = this->head_; - if (node != 0) - { - this->unsafe_remove (node); - } - return node; -} - -template T * -ACE_Intrusive_List::pop_back (void) -{ - T *node = this->tail_; - if (node != 0) - { - this->unsafe_remove (node); - } - return node; -} - -template void -ACE_Intrusive_List::remove (T *node) -{ - for (T *i = this->head_; i != 0; i = i->next ()) - { - if (node == i) - { - this->unsafe_remove (node); - return; - } - } -} - -template void -ACE_Intrusive_List::unsafe_remove (T *node) -{ - if (node->prev () != 0) - node->prev ()->next (node->next ()); - else - this->head_ = node->next (); - - if (node->next () != 0) - node->next ()->prev (node->prev ()); - else - this->tail_ = node->prev (); - - node->next (0); - node->prev (0); -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_INTRUSIVE_LIST_CPP */ diff --git a/modules/worldengine/deps/acelite/ace/Intrusive_List.h b/modules/worldengine/deps/acelite/ace/Intrusive_List.h deleted file mode 100644 index 0bc823960c..0000000000 --- a/modules/worldengine/deps/acelite/ace/Intrusive_List.h +++ /dev/null @@ -1,137 +0,0 @@ -/* -*- C++ -*- */ - -//============================================================================= -/** - * @file Intrusive_List.h - * - * @author Carlos O'Ryan - */ -//============================================================================= - -#ifndef ACE_INTRUSIVE_LIST_H -#define ACE_INTRUSIVE_LIST_H -#include /**/ "ace/pre.h" - -#include /**/ "ace/config-lite.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_Intrusive_List - * - * @brief Implement an intrusive double linked list - * - * Intrusive lists assume that the elements they contain the pointers - * required to build the list. They are useful as light-weight - * containers and free-lists. - * - * The template argument T must implement the following methods: - * - * - T* T::next () const; - * - void T::next (T *); - * - T* T::prev () const; - * - void T::prev (T* ); - * - * A simple way to satisfy the Intrusive_List requirements would be to - * implement a helper class: - * - * class My_Object : public ACE_Intrusive_List_Node {
- * ....
- * };
- * - * typedef ACE_Intrusive_List My_Object_List; - * - * However, ACE is supported on platforms that would surely get - * confused using such templates. - * - * @todo The ACE_Message_Queue is an example of an intrusive list (or - * queue) but it is not implemented in terms of this class. - */ -template -class ACE_Intrusive_List -{ -public: - // = Initialization and termination methods. - /// Constructor. Use user specified allocation strategy - /// if specified. - ACE_Intrusive_List (void); - - /// Destructor. - ~ACE_Intrusive_List (void); - - // = Check boundary conditions. - - /// Returns true if the container is empty, otherwise returns false. - bool is_empty (void) const; - - /// Insert an element at the beginning of the list - void push_front (T *node); - - /// Insert an element at the end of the list - void push_back (T *node); - - /// Remove the element at the beginning of the list - T *pop_front (void); - - /// Remove the element at the end of the list - T *pop_back (void); - - /// Get the element at the head of the queue - T *head (void) const; - - /// Get the element at the tail of the queue - T *tail (void) const; - - /// Remove a element from the list - /** - * Verify that the element is still in the list before removing it. - */ - void remove (T *node); - - /// Swap two lists - void swap(ACE_Intrusive_List & rhs); - - /// Remove a element from the list without checking - /** - * No attempts are performed to check if T* really belongs to the - * list. The effects of removing an invalid element are unspecified - */ - void unsafe_remove (T *node); - -private: - /** @name Disallow copying - * - */ - //@{ - ACE_Intrusive_List (const ACE_Intrusive_List &); - ACE_Intrusive_List& operator= (const ACE_Intrusive_List &); - //@} - -private: - /// Head of the list - T *head_; - - /// Tail of the list - T *tail_; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/Intrusive_List.inl" -#endif /* __ACE_INLINE__ */ - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "ace/Intrusive_List.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Intrusive_List.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ - -#include /**/ "ace/post.h" -#endif /* ACE_INTRUSIVE_LIST_H */ diff --git a/modules/worldengine/deps/acelite/ace/Intrusive_List.inl b/modules/worldengine/deps/acelite/ace/Intrusive_List.inl deleted file mode 100644 index 17d7a15653..0000000000 --- a/modules/worldengine/deps/acelite/ace/Intrusive_List.inl +++ /dev/null @@ -1,31 +0,0 @@ -// -*- C++ -*- -#include - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -template ACE_INLINE bool -ACE_Intrusive_List::is_empty (void) const -{ - return this->head_ == 0; -} - -template ACE_INLINE T * -ACE_Intrusive_List::head (void) const -{ - return this->head_; -} - -template ACE_INLINE T * -ACE_Intrusive_List::tail (void) const -{ - return this->tail_; -} - -template ACE_INLINE void -ACE_Intrusive_List::swap(ACE_Intrusive_List & rhs) -{ - std::swap(head_, rhs.head_); - std::swap(tail_, rhs.tail_); -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Intrusive_List_Node.cpp b/modules/worldengine/deps/acelite/ace/Intrusive_List_Node.cpp deleted file mode 100644 index 830ea4b1ce..0000000000 --- a/modules/worldengine/deps/acelite/ace/Intrusive_List_Node.cpp +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef ACE_INTRUSIVE_LIST_NODE_CPP -#define ACE_INTRUSIVE_LIST_NODE_CPP - -#include "ace/Intrusive_List_Node.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#if !defined (__ACE_INLINE__) -#include "ace/Intrusive_List_Node.inl" -#endif /* __ACE_INLINE__ */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -template -ACE_Intrusive_List_Node::ACE_Intrusive_List_Node (void) - : prev_ (0) - , next_ (0) -{ -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_INTRUSIVE_LIST_NODE_CPP */ diff --git a/modules/worldengine/deps/acelite/ace/Intrusive_List_Node.h b/modules/worldengine/deps/acelite/ace/Intrusive_List_Node.h deleted file mode 100644 index 732a517924..0000000000 --- a/modules/worldengine/deps/acelite/ace/Intrusive_List_Node.h +++ /dev/null @@ -1,82 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Intrusive_List_Node.h - * - * @author Carlos O'Ryan - */ -//============================================================================= - -#ifndef ACE_INTRUSIVE_LIST_NODE_H -#define ACE_INTRUSIVE_LIST_NODE_H -#include /**/ "ace/pre.h" - -#include /**/ "ace/config-lite.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_Intrusive_List_Node - * - * @brief Implement the requirements for ACE_Intrusive_List - * - * The class should be used as follows: - * - * class My_Object : public ACE_Intrusive_List_Node {
- * ....
- * };
- * - * However, ACE is supported on platforms that would surely get - * confused using such templates, the class is provided as a helper - * for our lucky users that only need portability to modern C++ - * compilers. - */ -template -class ACE_Intrusive_List_Node -{ -public: - /** @name Accesors and modifiers to the next and previous pointers - * - */ - //@{ - T *prev (void) const; - void prev (T *); - T *next (void) const; - void next (T *); - //@} - -protected: - /// Constructor - /** - * The constructor is protected, because only derived classes should - * be instantiated. - */ - ACE_Intrusive_List_Node (void); - -private: - /// Head and tail of the list - T *prev_; - T *next_; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/Intrusive_List_Node.inl" -#endif /* __ACE_INLINE__ */ - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "ace/Intrusive_List_Node.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Intrusive_List_Node.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ - -#include /**/ "ace/post.h" -#endif /* ACE_INTRUSIVE_LIST_NODE_H */ diff --git a/modules/worldengine/deps/acelite/ace/Intrusive_List_Node.inl b/modules/worldengine/deps/acelite/ace/Intrusive_List_Node.inl deleted file mode 100644 index 220453adc4..0000000000 --- a/modules/worldengine/deps/acelite/ace/Intrusive_List_Node.inl +++ /dev/null @@ -1,28 +0,0 @@ -// -*- C++ -*- -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -template ACE_INLINE T* -ACE_Intrusive_List_Node::prev (void) const -{ - return this->prev_; -} - -template ACE_INLINE void -ACE_Intrusive_List_Node::prev (T *x) -{ - this->prev_ = x; -} - -template ACE_INLINE T* -ACE_Intrusive_List_Node::next (void) const -{ - return this->next_; -} - -template ACE_INLINE void -ACE_Intrusive_List_Node::next (T *x) -{ - this->next_ = x; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/LOCK_SOCK_Acceptor.cpp b/modules/worldengine/deps/acelite/ace/LOCK_SOCK_Acceptor.cpp deleted file mode 100644 index 65a5512ba8..0000000000 --- a/modules/worldengine/deps/acelite/ace/LOCK_SOCK_Acceptor.cpp +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef ACE_LOCK_SOCK_ACCEPTOR_CPP -#define ACE_LOCK_SOCK_ACCEPTOR_CPP - -#include "ace/Guard_T.h" -#include "ace/LOCK_SOCK_Acceptor.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -template int -ACE_LOCK_SOCK_Acceptor::accept (ACE_SOCK_Stream &stream, - ACE_Addr *remote_address, - ACE_Time_Value *timeout, - bool restart, - bool reset_new_handle) const -{ - ACE_GUARD_RETURN (ACE_LOCK, ace_mon, (ACE_LOCK &) this->lock_, -1); - - return ACE_SOCK_Acceptor::accept (stream, - remote_address, - timeout, - restart, - reset_new_handle); -} - -template ACE_LOCK & -ACE_LOCK_SOCK_Acceptor::lock (void) -{ - return this->lock_; -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_LOCK_SOCK_ACCEPTOR_CPP */ diff --git a/modules/worldengine/deps/acelite/ace/LOCK_SOCK_Acceptor.h b/modules/worldengine/deps/acelite/ace/LOCK_SOCK_Acceptor.h deleted file mode 100644 index 619e92f8a7..0000000000 --- a/modules/worldengine/deps/acelite/ace/LOCK_SOCK_Acceptor.h +++ /dev/null @@ -1,65 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file LOCK_SOCK_Acceptor.h - * - * @author James Hu and Irfan Pyarali - */ -//============================================================================= - - -#ifndef ACE_LOCK_SOCK_ACCEPTOR_H -#define ACE_LOCK_SOCK_ACCEPTOR_H -#include /**/ "ace/pre.h" - -#include "ace/SOCK_Acceptor.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_LOCK_SOCK_Acceptor - * - * @brief Specialize ACE_SOCK_Acceptor to lock around ; - * - * This class is necessary since some OS platforms (e.g., - * Solaris 2.5) do not allow multiple threads/processes to - * simultaneously call on the same listen-mode - * port/socket. Thus, we need to protect against multiple - * concurrent accesses by using the appropriate type of lock. - */ -template -class ACE_LOCK_SOCK_Acceptor : public ACE_SOCK_Acceptor -{ -public: - /// Accept the connection under the control of the . - int accept (ACE_SOCK_Stream &new_stream, - ACE_Addr *remote_addr = 0, - ACE_Time_Value *timeout = 0, - bool restart = true, - bool reset_new_handle = false) const; - - /// Return a reference to the lock. - ACE_LOCK &lock (void); - -protected: - /// Type of locking mechanism. - ACE_LOCK lock_; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "ace/LOCK_SOCK_Acceptor.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("LOCK_SOCK_Acceptor.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ - -#include /**/ "ace/post.h" -#endif /* ACE_LOCK_SOCK_ACCEPTOR_H */ diff --git a/modules/worldengine/deps/acelite/ace/LSOCK.cpp b/modules/worldengine/deps/acelite/ace/LSOCK.cpp deleted file mode 100644 index 60cc7711eb..0000000000 --- a/modules/worldengine/deps/acelite/ace/LSOCK.cpp +++ /dev/null @@ -1,183 +0,0 @@ -#include "ace/LSOCK.h" - - - -#if !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS) - -#include "ace/Log_Category.h" -#include "ace/OS_NS_sys_socket.h" - -#if !defined (__ACE_INLINE__) -#include "ace/LSOCK.inl" -#endif /* __ACE_INLINE__ */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_ALLOC_HOOK_DEFINE(ACE_LSOCK) - -void -ACE_LSOCK::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_LSOCK::dump"); - - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("aux_handle_ = %d"), this->aux_handle_)); - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} - -#if defined (ACE_HAS_MSG) -// This routine sends an open file descriptor to handle_>. - -ssize_t -ACE_LSOCK::send_handle (const ACE_HANDLE handle) const -{ - ACE_TRACE ("ACE_LSOCK::send_handle"); - u_char a[2]; - iovec iov; - msghdr send_msg; -#if defined (ACE_HAS_4_4BSD_SENDMSG_RECVMSG) - char cmsgbuf[ACE_BSD_CONTROL_MSG_LEN]; - cmsghdr *cmsgptr = (cmsghdr *) cmsgbuf; -#endif /* ACE_HAS_4_4BSD_SENDMSG_RECVMSG */ - - a[0] = 0xab; - a[1] = 0xcd; - iov.iov_base = (char *) a; - iov.iov_len = sizeof a; - send_msg.msg_iov = &iov; - send_msg.msg_iovlen = 1; - send_msg.msg_name = 0; - send_msg.msg_namelen = 0; - -#if defined (ACE_HAS_4_4BSD_SENDMSG_RECVMSG) - cmsgptr->cmsg_level = SOL_SOCKET; - cmsgptr->cmsg_type = SCM_RIGHTS; - cmsgptr->cmsg_len = sizeof cmsgbuf; - send_msg.msg_control = cmsgbuf; - send_msg.msg_controllen = sizeof cmsgbuf; - ACE_HANDLE *ph = (ACE_HANDLE *) CMSG_DATA (cmsgptr); - *ph = handle; - send_msg.msg_flags = 0; -#else - send_msg.msg_accrights = (char *) &handle; - send_msg.msg_accrightslen = sizeof handle; -#endif /* ACE_HAS_4_4BSD_SENDMSG_RECVMSG */ - - return ACE_OS::sendmsg (this->get_handle (), &send_msg, 0); -} - -// This file receives an open file descriptor from handle_>. -// Note, this routine returns -1 if problems occur, 0 if we recv a -// message that does not have file descriptor in it, and 1 otherwise. - -ssize_t -ACE_LSOCK::recv_handle (ACE_HANDLE &handle, char *pbuf, ssize_t *len) const -{ - ACE_TRACE ("ACE_LSOCK::recv_handle"); - u_char a[2]; - iovec iov; - msghdr recv_msg; - -#if defined (ACE_HAS_4_4BSD_SENDMSG_RECVMSG) - char cmsgbuf[ACE_BSD_CONTROL_MSG_LEN]; -#endif /* ACE_HAS_4_4BSD_SENDMSG_RECVMSG */ - - if (pbuf != 0 && len != 0) - { - iov.iov_base = pbuf; - iov.iov_len = *len; - } - else - { - iov.iov_base = (char *) a; - iov.iov_len = sizeof a; - } - - recv_msg.msg_iov = &iov; - recv_msg.msg_iovlen = 1; - recv_msg.msg_name = 0; - recv_msg.msg_namelen = 0; -#if defined (ACE_HAS_4_4BSD_SENDMSG_RECVMSG) - recv_msg.msg_control = cmsgbuf; - recv_msg.msg_controllen = sizeof cmsgbuf; -#else - recv_msg.msg_accrights = (char *) &handle; - recv_msg.msg_accrightslen = sizeof handle; -#endif /* ACE_HAS_4_4BSD_SENDMSG_RECVMSG */ - -#if defined (ACE_HAS_STREAMS) - - ssize_t nbytes = ACE_OS::recvmsg (this->get_handle (), &recv_msg, 0); - - if (nbytes != ACE_INVALID_HANDLE) - { - if (len != 0) - *len = nbytes; - - if (nbytes == sizeof a - && ((u_char *) iov.iov_base)[0] == 0xab - && ((u_char *) iov.iov_base)[1] == 0xcd) - { -#if defined (ACE_HAS_4_4BSD_SENDMSG_RECVMSG) - cmsghdr *cmsgptr = (cmsghdr *) cmsgbuf; - handle = *(ACE_HANDLE *) CMSG_DATA (cmsgptr); -#endif /* ACE_HAS_4_4BSD_SENDMSG_RECVMSG */ - return 1; - } - else - return 0; - } -#else - ssize_t nbytes = ACE_OS::recvmsg (this->get_handle (), - &recv_msg, - MSG_PEEK); - - if (nbytes != ACE_INVALID_HANDLE) - { - if (nbytes == sizeof a - && ((u_char *) iov.iov_base)[0] == 0xab - && ((u_char *) iov.iov_base)[1] == 0xcd) - { -#if defined (ACE_HAS_4_4BSD_SENDMSG_RECVMSG) - // Close down the socket that was returned by the MSG_PEEK. - cmsghdr *cmsgptr = (cmsghdr *) cmsgbuf; - ACE_HANDLE * ph = (ACE_HANDLE *) CMSG_DATA (cmsgptr); - ACE_OS::closesocket (*ph); - recv_msg.msg_control = cmsgbuf; - recv_msg.msg_controllen = sizeof cmsgbuf; -#else - recv_msg.msg_accrights = (char *) &handle; - recv_msg.msg_accrightslen = sizeof handle; -#endif /* ACE_HAS_4_4BSD_SENDMSG_RECVMSG */ - - if (ACE_OS::recvmsg (this->get_handle (), - &recv_msg, 0) == ACE_INVALID_HANDLE) - return ACE_INVALID_HANDLE; - else - { -#if defined (ACE_HAS_4_4BSD_SENDMSG_RECVMSG) - cmsghdr *cmsgptr = (cmsghdr *) cmsgbuf; - ACE_HANDLE * ph = (ACE_HANDLE *) CMSG_DATA (cmsgptr); - handle = *ph; -#endif /* ACE_HAS_4_4BSD_SENDMSG_RECVMSG */ - return 1; - } - } - else - { - if (len != 0) - *len = nbytes; - return 0; - } - } -#endif /* ACE_HAS_STREAMS */ - else - return ACE_INVALID_HANDLE; -} -#endif /* ACE_HAS_MSG */ - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */ diff --git a/modules/worldengine/deps/acelite/ace/LSOCK.h b/modules/worldengine/deps/acelite/ace/LSOCK.h deleted file mode 100644 index cb9603afd8..0000000000 --- a/modules/worldengine/deps/acelite/ace/LSOCK.h +++ /dev/null @@ -1,82 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file LSOCK.h - * - * @author Doug Schmidt - */ -//============================================================================= - - -#ifndef ACE_LOCAL_SOCK_H -#define ACE_LOCAL_SOCK_H - -#include /**/ "ace/pre.h" - -#include /**/ "ace/ACE_export.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#if !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS) - -#include "ace/SOCK.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_LSOCK - * - * @brief Create a Local ACE_SOCK, which is used for passing file - * descriptors. - */ -class ACE_Export ACE_LSOCK -{ -public: -#if defined (ACE_HAS_MSG) - /// Send an open FD to another process. - ssize_t send_handle (const ACE_HANDLE handle) const; - - /// Recv an open FD from another process. - ssize_t recv_handle (ACE_HANDLE &handles, - char *pbuf = 0, - ssize_t *len = 0) const; -#endif /* ACE_HAS_MSG */ - - /// Dump the state of an object. - void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - -protected: - // = Ensure that ACE_LSOCK is an abstract base class - - /// Default constructor. - ACE_LSOCK (void); - - /// Initialize based on @a handle. - ACE_LSOCK (ACE_HANDLE handle); - - /// Get handle. - ACE_HANDLE get_handle (void) const; - - /// Set handle. - void set_handle (ACE_HANDLE handle); - -private: - /// An auxiliary handle used to avoid virtual base classes... - ACE_HANDLE aux_handle_; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/LSOCK.inl" -#endif /* __ACE_INLINE__ */ - -#endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */ -#include /**/ "ace/post.h" -#endif /* ACE_LOCAL_SOCK_H */ diff --git a/modules/worldengine/deps/acelite/ace/LSOCK.inl b/modules/worldengine/deps/acelite/ace/LSOCK.inl deleted file mode 100644 index 9815783f32..0000000000 --- a/modules/worldengine/deps/acelite/ace/LSOCK.inl +++ /dev/null @@ -1,40 +0,0 @@ -// -*- C++ -*- -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -// Simple-minded constructor. - -ACE_INLINE -ACE_LSOCK::ACE_LSOCK (void) - : aux_handle_ (ACE_INVALID_HANDLE) -{ - ACE_TRACE ("ACE_LSOCK::ACE_LSOCK"); -} - -// Sets the underlying file descriptor. - -ACE_INLINE void -ACE_LSOCK::set_handle (ACE_HANDLE handle) -{ - ACE_TRACE ("ACE_LSOCK::set_handle"); - this->aux_handle_ = handle; -} - -// Gets the underlying file descriptor. - -ACE_INLINE ACE_HANDLE -ACE_LSOCK::get_handle (void) const -{ - ACE_TRACE ("ACE_LSOCK::get_handle"); - return this->aux_handle_; -} - -// Sets the underlying file descriptor. - -ACE_INLINE -ACE_LSOCK::ACE_LSOCK (ACE_HANDLE handle) - : aux_handle_ (handle) -{ - ACE_TRACE ("ACE_LSOCK::ACE_LSOCK"); -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/LSOCK_Acceptor.cpp b/modules/worldengine/deps/acelite/ace/LSOCK_Acceptor.cpp deleted file mode 100644 index 54c4e27bc0..0000000000 --- a/modules/worldengine/deps/acelite/ace/LSOCK_Acceptor.cpp +++ /dev/null @@ -1,141 +0,0 @@ -#include "ace/LSOCK_Acceptor.h" - -#if !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS) - -#include "ace/Log_Category.h" -#include "ace/OS_NS_unistd.h" -#include "ace/OS_NS_sys_socket.h" - - - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_ALLOC_HOOK_DEFINE(ACE_LSOCK_Acceptor) - -// Return the local endpoint address. - -int -ACE_LSOCK_Acceptor::get_local_addr (ACE_Addr &a) const -{ - ACE_TRACE ("ACE_LSOCK_Acceptor::get_local_addr"); - - ACE_UNIX_Addr& target = dynamic_cast (a); - - target = this->local_addr_; - - return 0; -} - -void -ACE_LSOCK_Acceptor::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_LSOCK_Acceptor::dump"); - - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - this->local_addr_.dump (); - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} - -// Do nothing routine for constructor. - -ACE_LSOCK_Acceptor::ACE_LSOCK_Acceptor (void) -{ - ACE_TRACE ("ACE_LSOCK_Acceptor::ACE_LSOCK_Acceptor"); -} - -int -ACE_LSOCK_Acceptor::open (const ACE_Addr &remote_sap, - int reuse_addr, - int protocol_family, - int backlog, - int protocol) -{ - ACE_TRACE ("ACE_LSOCK_Acceptor::open"); - this->local_addr_ = *((ACE_UNIX_Addr *) &remote_sap); // This is a gross hack... - return ACE_SOCK_Acceptor::open (remote_sap, reuse_addr, - protocol_family, backlog, protocol); -} - -// General purpose routine for performing server ACE_SOCK creation. - -ACE_LSOCK_Acceptor::ACE_LSOCK_Acceptor (const ACE_Addr &remote_sap, - int reuse_addr, - int protocol_family, - int backlog, - int protocol) -{ - ACE_TRACE ("ACE_LSOCK_Acceptor::ACE_LSOCK_Acceptor"); - if (this->open (remote_sap, - reuse_addr, - protocol_family, - backlog, - protocol) == -1) - ACELIB_ERROR ((LM_ERROR, - "ACE_LSOCK_Acceptor::ACE_LSOCK_Acceptor")); -} - -// General purpose routine for accepting new connections. - -int -ACE_LSOCK_Acceptor::accept (ACE_LSOCK_Stream &new_stream, - ACE_Addr *remote_addr, - ACE_Time_Value *timeout, - bool restart, - bool reset_new_handle) const -{ - ACE_TRACE ("ACE_LSOCK_Acceptor::accept"); - - int in_blocking_mode = 0; - if (this->shared_accept_start (timeout, - restart, - in_blocking_mode) == -1) - return -1; - else - { - sockaddr *addr = 0; - int len = 0; - - if (remote_addr != 0) - { - len = remote_addr->get_size (); - addr = (sockaddr *) remote_addr->get_addr (); - } - - do - new_stream.set_handle (ACE_OS::accept (this->get_handle (), - addr, - &len)); - while (new_stream.get_handle () == ACE_INVALID_HANDLE - && restart != 0 - && errno == EINTR - && timeout == 0); - - // Reset the size of the addr, which is only necessary for UNIX - // domain sockets. - if (new_stream.get_handle () != ACE_INVALID_HANDLE - && remote_addr != 0) - remote_addr->set_size (len); - } - - return this->shared_accept_finish (new_stream, - in_blocking_mode, - reset_new_handle); -} - -// Close down the UNIX domain stream and remove the rendezvous point -// from the file system. - -int -ACE_LSOCK_Acceptor::remove (void) -{ - ACE_TRACE ("ACE_LSOCK_Acceptor::remove"); - int result = this->close (); - return ACE_OS::unlink (this->local_addr_.get_path_name ()) == -1 - || result == -1 ? -1 : 0; -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */ diff --git a/modules/worldengine/deps/acelite/ace/LSOCK_Acceptor.h b/modules/worldengine/deps/acelite/ace/LSOCK_Acceptor.h deleted file mode 100644 index d15db52884..0000000000 --- a/modules/worldengine/deps/acelite/ace/LSOCK_Acceptor.h +++ /dev/null @@ -1,93 +0,0 @@ -/* -*- C++ -*- */ - -//============================================================================= -/** - * @file LSOCK_Acceptor.h - * - * @author Doug Schmidt - */ -//============================================================================= - - -#ifndef ACE_LOCAL_SOCK_ACCEPTOR_H -#define ACE_LOCAL_SOCK_ACCEPTOR_H -#include /**/ "ace/pre.h" - -#include /**/ "ace/config-all.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#if !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS) - -#include "ace/SOCK_Acceptor.h" -#include "ace/UNIX_Addr.h" -#include "ace/LSOCK_Stream.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -// Forward decl. -class ACE_Reactor; - -/** - * @class ACE_LSOCK_Acceptor - * - * @brief Defines the format and interface for the acceptor side of the - * local ACE_SOCK ACE_Stream. - */ -class ACE_Export ACE_LSOCK_Acceptor : public ACE_SOCK_Acceptor -{ -public: - // = Initialization methods. - /// Default constructor. - ACE_LSOCK_Acceptor (void); - - /// Initiate a passive mode socket. - ACE_LSOCK_Acceptor (const ACE_Addr &local_sap, - int reuse_addr = 0, - int protocol_family = PF_UNIX, - int backlog = ACE_DEFAULT_BACKLOG, - int protocol = 0); - - /// Initiate a passive mode socket. - int open (const ACE_Addr &local_sap, - int reuse_addr = 0, - int protocol_family = PF_UNIX, - int backlog = ACE_DEFAULT_BACKLOG, - int protocol = 0); - - /// Accept a new data transfer connection. - int accept (ACE_LSOCK_Stream &new_ipc_sap, - ACE_Addr * = 0, - ACE_Time_Value *timeout = 0, - bool restart = true, - bool reset_new_handle = false) const; - - /// Close down the ACE_LSOCK and remove the rendezvous point from the - /// file system. - int remove (void); - - /// Return the local endpoint address. - int get_local_addr (ACE_Addr &) const; - - // = Meta-type info - typedef ACE_UNIX_Addr PEER_ADDR; - typedef ACE_LSOCK_Stream PEER_STREAM; - - /// Dump the state of an object. - void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - -private: - /// Address of our rendezvous point. - ACE_UNIX_Addr local_addr_; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */ -#include /**/ "ace/post.h" -#endif /* ACE_LOCAL_SOCK_ACCEPTOR_H */ diff --git a/modules/worldengine/deps/acelite/ace/LSOCK_CODgram.cpp b/modules/worldengine/deps/acelite/ace/LSOCK_CODgram.cpp deleted file mode 100644 index d7bb336d04..0000000000 --- a/modules/worldengine/deps/acelite/ace/LSOCK_CODgram.cpp +++ /dev/null @@ -1,60 +0,0 @@ -#include "ace/LSOCK_CODgram.h" -#if !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS) - -#include "ace/Log_Category.h" - - - -#if !defined (__ACE_INLINE__) -#include "ace/LSOCK_CODgram.inl" -#endif /* __ACE_INLINE__ */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_ALLOC_HOOK_DEFINE(ACE_LSOCK_CODgram) - -void -ACE_LSOCK_CODgram::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_LSOCK_CODgram::dump"); - - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - ACE_SOCK_CODgram::dump (); - ACE_LSOCK::dump (); - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} - -/* Here's the general-purpose open routine. */ - -int -ACE_LSOCK_CODgram::open (const ACE_Addr &remote, - const ACE_Addr &local, - int protocol_family, - int protocol) -{ - ACE_TRACE ("ACE_LSOCK_CODgram::open"); - if (ACE_SOCK_CODgram::open (remote, local, protocol_family, - protocol) == -1) - return -1; - ACE_LSOCK::set_handle (this->get_handle ()); - return 0; -} - -/* Create a local ACE_SOCK datagram. */ - -ACE_LSOCK_CODgram::ACE_LSOCK_CODgram (const ACE_Addr &remote, - const ACE_Addr &local, - int protocol_family, - int protocol) -{ - ACE_TRACE ("ACE_LSOCK_CODgram::ACE_LSOCK_CODgram"); - if (this->open (remote, local, protocol_family, - protocol) == -1) - ACELIB_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("ACE_LSOCK_CODgram"))); -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */ diff --git a/modules/worldengine/deps/acelite/ace/LSOCK_CODgram.h b/modules/worldengine/deps/acelite/ace/LSOCK_CODgram.h deleted file mode 100644 index 2077b8fed9..0000000000 --- a/modules/worldengine/deps/acelite/ace/LSOCK_CODgram.h +++ /dev/null @@ -1,107 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file LSOCK_CODgram.h - * - * @author Douglas C. Schmidt - */ -//============================================================================= - - -#ifndef ACE_LOCAL_SOCK_CODGRAM_H -#define ACE_LOCAL_SOCK_CODGRAM_H -#include /**/ "ace/pre.h" - -#include /**/ "ace/config-all.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#if !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS) - -#include "ace/LSOCK.h" -#include "ace/SOCK_CODgram.h" -#include "ace/Addr.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_LSOCK_CODgram - * - * @brief Defines a fully specified (sometimes called "connected") UNIX-domain - * datagram abstraction. - * - * ACE_LSOCK_CODgram provides a way to use a UNIX-domain datagram socket in - * a situation where the local and peer addresses are fully known in advance. - * The "connection-oriented" part of "CODgram" is a misnomer. There is no - * connection used on this type of socket. It merely specifies that both - * endpoint addresses are known in advance of use. Furthermore, this class - * is more suited for use cases where a local endpoint wishes to communicate - * with a single, known peer and may or may not have a specified local address. - * - * If your use case requires receiving datagrams from multiple peers without - * previously known addresses, consider using ACE_LSOCK_Dgram instead. - */ -class ACE_Export ACE_LSOCK_CODgram : public ACE_SOCK_CODgram, public ACE_LSOCK -{ -public: - /// Default constructor; requires a call to open() prior to communication. - ACE_LSOCK_CODgram (void); - - /** - * @name Initialization methods - */ - //@{ - /** - * Initialize a fully-specified datagram socket. - * - * @param remote_sap Remote/peer address. This should be an ACE_UNIX_Addr - * object. It specifies where all sent datagrams will - * be sent to. - * @param local_sap Local address. The local address to receive datagrams - * at. If not specified, an unused address is selected. - * If specified, should be an ACE_UNIX_Addr object. - * - * @sa ACE_UNIX_Addr - */ - ACE_LSOCK_CODgram (const ACE_Addr &remote_sap, - const ACE_Addr &local_sap = ACE_Addr::sap_any, - int protocol_family = PF_UNIX, - int protocol = 0); - - /** - * Initialize a fully-specified datagram socket. - * - * @retval 0 if no error. - * @retval -1 on error; check errno for an error reason. - */ - int open (const ACE_Addr &remote_sap, - const ACE_Addr &local_sap = ACE_Addr::sap_any, - int protocol_family = PF_UNIX, - int protocol = 0); - //@} - - /// Get underlying handle. - ACE_HANDLE get_handle (void) const; - - /// Set underlying handle. - void set_handle (ACE_HANDLE); - - /// Dump the state of an object. - void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/LSOCK_CODgram.inl" -#endif /* __ACE_INLINE__ */ - -#endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */ -#include /**/ "ace/post.h" -#endif /* ACE_LOCAL_SOCK_CODGRAM_H */ diff --git a/modules/worldengine/deps/acelite/ace/LSOCK_CODgram.inl b/modules/worldengine/deps/acelite/ace/LSOCK_CODgram.inl deleted file mode 100644 index 1ebcf344bb..0000000000 --- a/modules/worldengine/deps/acelite/ace/LSOCK_CODgram.inl +++ /dev/null @@ -1,27 +0,0 @@ -// -*- C++ -*- -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -// Do nothing constructor. - -ACE_INLINE -ACE_LSOCK_CODgram::ACE_LSOCK_CODgram (void) -{ - ACE_TRACE ("ACE_LSOCK_CODgram::ACE_LSOCK_CODgram"); -} - -ACE_INLINE void -ACE_LSOCK_CODgram::set_handle (ACE_HANDLE h) -{ - ACE_TRACE ("ACE_LSOCK_CODgram::set_handle"); - this->ACE_SOCK_CODgram::set_handle (h); - this->ACE_LSOCK::set_handle (h); -} - -ACE_INLINE ACE_HANDLE -ACE_LSOCK_CODgram::get_handle (void) const -{ - ACE_TRACE ("ACE_LSOCK_CODgram::get_handle"); - return this->ACE_SOCK_CODgram::get_handle (); -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/LSOCK_Connector.cpp b/modules/worldengine/deps/acelite/ace/LSOCK_Connector.cpp deleted file mode 100644 index 9167773e23..0000000000 --- a/modules/worldengine/deps/acelite/ace/LSOCK_Connector.cpp +++ /dev/null @@ -1,57 +0,0 @@ -#include "ace/LSOCK_Connector.h" -#if !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS) - -#include "ace/Log_Category.h" - - - -#if !defined (__ACE_INLINE__) -#include "ace/LSOCK_Connector.inl" -#endif /* __ACE_INLINE__ */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_ALLOC_HOOK_DEFINE(ACE_LSOCK_Connector) - -void -ACE_LSOCK_Connector::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_LSOCK_Connector::dump"); - - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("\n"))); - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} - -ACE_LSOCK_Connector::ACE_LSOCK_Connector (void) -{ - ACE_TRACE ("ACE_LSOCK_Connector::ACE_LSOCK_Connector"); -} - -// Establish a connection. -ACE_LSOCK_Connector::ACE_LSOCK_Connector (ACE_LSOCK_Stream &new_stream, - const ACE_UNIX_Addr &remote_sap, - ACE_Time_Value *timeout, - const ACE_Addr &local_sap, - int reuse_addr, - int flags, - int perms) - : ACE_SOCK_Connector (new_stream, - remote_sap, - timeout, - local_sap, - reuse_addr, - flags, - perms) -{ - ACE_TRACE ("ACE_LSOCK_Connector::ACE_LSOCK_Connector"); - // This is necessary due to the weird inheritance relationships of - // ACE_LSOCK_Stream. - new_stream.set_handle (new_stream.get_handle ()); -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */ diff --git a/modules/worldengine/deps/acelite/ace/LSOCK_Connector.h b/modules/worldengine/deps/acelite/ace/LSOCK_Connector.h deleted file mode 100644 index 48af5e1a16..0000000000 --- a/modules/worldengine/deps/acelite/ace/LSOCK_Connector.h +++ /dev/null @@ -1,89 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file LSOCK_Connector.h - * - * @author Doug Schmidt - */ -//============================================================================= - -#ifndef ACE_LOCAL_SOCK_CONNECTOR_H -#define ACE_LOCAL_SOCK_CONNECTOR_H -#include /**/ "ace/pre.h" - -#include /**/ "ace/config-all.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#if !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS) - -#include "ace/SOCK_Connector.h" -#include "ace/LSOCK_Stream.h" -#include "ace/UNIX_Addr.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_LSOCK_Connector - * - * @brief Defines the format and interface for the connector side of - * the ACE_LSOCK_Stream. - */ -class ACE_Export ACE_LSOCK_Connector : public ACE_SOCK_Connector -{ -public: - // = Initialization methods. - /// Default constructor. - ACE_LSOCK_Connector (void); - - /** - * Actively connect and produce a @a new_stream if things go well. - * All arguments are relayed to the ACE_SOCK_Connector constructor - * for handling. - * @see ACE_SOCK_Connector(). - */ - ACE_LSOCK_Connector (ACE_LSOCK_Stream &new_stream, - const ACE_UNIX_Addr &remote_sap, - ACE_Time_Value *timeout = 0, - const ACE_Addr &local_sap = ACE_Addr::sap_any, - int reuse_addr = 0, - int flags = 0, - int perms = 0); - - /** - * Actively connect and produce a @a new_stream if things go well. - * The @c ACE_SOCK_Connector::connect() method is called to perform - * the actual connection attempt. - * @see ACE_SOCK_Connector::connect(). - */ - int connect (ACE_LSOCK_Stream &new_stream, - const ACE_UNIX_Addr &remote_sap, - ACE_Time_Value *timeout = 0, - const ACE_Addr &local_sap = ACE_Addr::sap_any, - int reuse_addr = 0, - int flags = 0, - int perms = 0); - - // = Meta-type info - typedef ACE_UNIX_Addr PEER_ADDR; - typedef ACE_LSOCK_Stream PEER_STREAM; - - /// Dump the state of an object. - void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/LSOCK_Connector.inl" -#endif /* __ACE_INLINE__ */ - -#endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */ -#include /**/ "ace/post.h" -#endif /* ACE_LOCAL_SOCK_CONNECTOR_H */ diff --git a/modules/worldengine/deps/acelite/ace/LSOCK_Connector.inl b/modules/worldengine/deps/acelite/ace/LSOCK_Connector.inl deleted file mode 100644 index fa519c2155..0000000000 --- a/modules/worldengine/deps/acelite/ace/LSOCK_Connector.inl +++ /dev/null @@ -1,24 +0,0 @@ -// -*- C++ -*- -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -// Establish a connection. -ACE_INLINE int -ACE_LSOCK_Connector::connect (ACE_LSOCK_Stream &new_stream, - const ACE_UNIX_Addr &remote_sap, - ACE_Time_Value *timeout, - const ACE_Addr &local_sap, - int reuse_addr, - int flags, - int perms) -{ - ACE_TRACE ("ACE_LSOCK_Connector::connect"); - int result = ACE_SOCK_Connector::connect (new_stream, remote_sap, - timeout, local_sap, - reuse_addr, flags, perms); - if (result != -1) - // This is necessary due to the weird inheritance relationships of ACE_LSOCK_Stream. - new_stream.set_handle (new_stream.get_handle ()); - return result; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/LSOCK_Dgram.cpp b/modules/worldengine/deps/acelite/ace/LSOCK_Dgram.cpp deleted file mode 100644 index 107c962db6..0000000000 --- a/modules/worldengine/deps/acelite/ace/LSOCK_Dgram.cpp +++ /dev/null @@ -1,69 +0,0 @@ -#include "ace/LSOCK_Dgram.h" -#if !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS) - -#include "ace/Log_Category.h" - - - -#if !defined (__ACE_INLINE__) -#include "ace/LSOCK_Dgram.inl" -#endif /* __ACE_INLINE__ */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_ALLOC_HOOK_DEFINE(ACE_LSOCK_Dgram) - -void -ACE_LSOCK_Dgram::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_LSOCK_Dgram::dump"); - - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - ACE_SOCK_Dgram::dump (); - ACE_LSOCK::dump (); - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} - -// The "do nothing" constructor. - -ACE_LSOCK_Dgram::ACE_LSOCK_Dgram (void) -{ - ACE_TRACE ("ACE_LSOCK_Dgram::ACE_LSOCK_Dgram"); -} - -// Here's the general-purpose open routine. - -int -ACE_LSOCK_Dgram::open (const ACE_Addr &local, - int protocol_family, - int protocol) -{ - ACE_TRACE ("ACE_LSOCK_Dgram::open"); - if (ACE_SOCK_Dgram::open (local, - protocol_family, - protocol) == -1) - return -1; - ACE_LSOCK::set_handle (this->ACE_SOCK_Dgram::get_handle ()); - return 0; -} - -// Create a local ACE_SOCK datagram. - -ACE_LSOCK_Dgram::ACE_LSOCK_Dgram (const ACE_Addr &local, - int protocol_family, - int protocol) -{ - ACE_TRACE ("ACE_LSOCK_Dgram::ACE_LSOCK_Dgram"); - if (this->open (local, - protocol_family, - protocol) == -1) - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("%p\n"), - ACE_TEXT ("ACE_LSOCK_Dgram"))); -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */ diff --git a/modules/worldengine/deps/acelite/ace/LSOCK_Dgram.h b/modules/worldengine/deps/acelite/ace/LSOCK_Dgram.h deleted file mode 100644 index d0843cd923..0000000000 --- a/modules/worldengine/deps/acelite/ace/LSOCK_Dgram.h +++ /dev/null @@ -1,72 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file LSOCK_Dgram.h - * - * @author Doug Schmidt - */ -//============================================================================= - - -#ifndef ACE_LOCAL_SOCK_DGRAM_H -#define ACE_LOCAL_SOCK_DGRAM_H -#include /**/ "ace/pre.h" - -#include /**/ "ace/config-all.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#if !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS) - -#include "ace/SOCK_Dgram.h" -#include "ace/LSOCK.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_LSOCK_Dgram - * - * @brief Create a Local ACE_SOCK datagram. - */ -class ACE_Export ACE_LSOCK_Dgram : public ACE_SOCK_Dgram, public ACE_LSOCK -{ -public: - // = Initialization methods. - /// Default constructor. - ACE_LSOCK_Dgram (void); - - /// Initiate a local dgram. - ACE_LSOCK_Dgram (const ACE_Addr &local, - int protocol_family = PF_UNIX, - int protocol = 0); - - /// Initiate a local dgram. - int open (const ACE_Addr &local, - int protocol_family = PF_UNIX, - int protocol = 0); - - /// Get handle. - ACE_HANDLE get_handle (void) const; - - /// Set handle. - void set_handle (ACE_HANDLE); - - /// Dump the state of an object. - void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/LSOCK_Dgram.inl" -#endif /* __ACE_INLINE__ */ - -#endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */ -#include /**/ "ace/post.h" -#endif /* ACE_LOCAL_SOCK_DGRAM_H */ diff --git a/modules/worldengine/deps/acelite/ace/LSOCK_Dgram.inl b/modules/worldengine/deps/acelite/ace/LSOCK_Dgram.inl deleted file mode 100644 index 6028a3586c..0000000000 --- a/modules/worldengine/deps/acelite/ace/LSOCK_Dgram.inl +++ /dev/null @@ -1,19 +0,0 @@ -// -*- C++ -*- -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_INLINE void -ACE_LSOCK_Dgram::set_handle (ACE_HANDLE h) -{ - ACE_TRACE ("ACE_LSOCK_Dgram::set_handle"); - this->ACE_SOCK_Dgram::set_handle (h); - this->ACE_LSOCK::set_handle (h); -} - -ACE_INLINE ACE_HANDLE -ACE_LSOCK_Dgram::get_handle (void) const -{ - ACE_TRACE ("ACE_LSOCK_Dgram::get_handle"); - return this->ACE_SOCK_Dgram::get_handle (); -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/LSOCK_Stream.cpp b/modules/worldengine/deps/acelite/ace/LSOCK_Stream.cpp deleted file mode 100644 index 7dbbfb8d3b..0000000000 --- a/modules/worldengine/deps/acelite/ace/LSOCK_Stream.cpp +++ /dev/null @@ -1,135 +0,0 @@ -#include "ace/LSOCK_Stream.h" -#if !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS) - -#include "ace/Log_Category.h" -#include "ace/OS_NS_sys_socket.h" - - - -#if !defined (__ACE_INLINE__) -#include "ace/LSOCK_Stream.inl" -#endif /* __ACE_INLINE__ */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_ALLOC_HOOK_DEFINE(ACE_LSOCK_Stream) - -int -ACE_LSOCK_Stream::get_local_addr (ACE_Addr &addr) const -{ - ACE_TRACE ("ACE_LSOCK_Stream::get_local_addr"); - - // Perform the downcast since had better be an - // . - ACE_UNIX_Addr *rhs_unix_addr = dynamic_cast (&addr); - ACE_UNIX_Addr lhs_unix_addr; - - if (rhs_unix_addr == 0) - return -1; - else if (ACE_SOCK::get_local_addr (lhs_unix_addr) == -1) - return -1; - else - { - *rhs_unix_addr = lhs_unix_addr; - return 0; - } -} - -int -ACE_LSOCK_Stream::get_remote_addr (ACE_Addr &addr) const -{ - ACE_TRACE ("ACE_LSOCK_Stream::get_remote_addr"); - - return this->get_local_addr (addr); -} - -void -ACE_LSOCK_Stream::dump (void) const -{ - ACE_TRACE ("ACE_LSOCK_Stream::dump"); - - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - ACE_SOCK_Stream::dump (); - ACE_LSOCK::dump (); - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -} - -#if defined (ACE_HAS_MSG) - -// Send a readv-style vector of buffers, along with an open I/O -// handle. - -ssize_t -ACE_LSOCK_Stream::send_msg (const iovec iov[], - size_t n, - ACE_HANDLE handle) -{ - ACE_TRACE ("ACE_LSOCK_Stream::send_msg"); - msghdr send_msg; -#if defined (ACE_HAS_4_4BSD_SENDMSG_RECVMSG) - char cmsgbuf[ACE_BSD_CONTROL_MSG_LEN]; - cmsghdr *cmsgptr = (cmsghdr *) cmsgbuf; -#endif /* ACE_HAS_4_4BSD_SENDMSG_RECVMSG */ - - send_msg.msg_iov = const_cast (iov); - send_msg.msg_iovlen = n; - send_msg.msg_name = 0; - send_msg.msg_namelen = 0; - -#if defined (ACE_HAS_4_4BSD_SENDMSG_RECVMSG) - cmsgptr->cmsg_level = SOL_SOCKET; - cmsgptr->cmsg_type = SCM_RIGHTS; - cmsgptr->cmsg_len = sizeof cmsgbuf; - send_msg.msg_control = cmsgbuf; - send_msg.msg_controllen = sizeof cmsgbuf; - *(ACE_HANDLE *) CMSG_DATA (cmsgptr) = handle; - send_msg.msg_flags = 0 ; -#else - send_msg.msg_accrights = (char *) &handle; - send_msg.msg_accrightslen = sizeof handle; -#endif /* ACE_HAS_4_4BSD_SENDMSG_RECVMSG */ - - return ACE_OS::sendmsg (this->ACE_SOCK_Stream::get_handle (), - &send_msg, 0); -} - -// Read a readv-style vector of buffers, along with an open I/O -// handle. - -ssize_t -ACE_LSOCK_Stream::recv_msg (iovec iov[], - size_t n, - ACE_HANDLE &handle) -{ - ACE_TRACE ("ACE_LSOCK_Stream::recv_msg"); - msghdr recv_msg; -#if defined (ACE_HAS_4_4BSD_SENDMSG_RECVMSG) - char cmsgbuf[ACE_BSD_CONTROL_MSG_LEN]; - cmsghdr *cmsgptr = (cmsghdr *) cmsgbuf; -#endif /* ACE_HAS_4_4BSD_SENDMSG_RECVMSG */ - - recv_msg.msg_iov = (iovec *) iov; - recv_msg.msg_iovlen = n; - recv_msg.msg_name = 0; - recv_msg.msg_namelen = 0; - -#if defined (ACE_HAS_4_4BSD_SENDMSG_RECVMSG) - recv_msg.msg_control = cmsgbuf; - recv_msg.msg_controllen = sizeof cmsgbuf; - ssize_t result = ACE_OS::recvmsg (this->ACE_SOCK_Stream::get_handle (), - &recv_msg, 0); - handle = *(ACE_HANDLE*) CMSG_DATA (cmsgptr) ; - return result; -#else - recv_msg.msg_accrights = (char *) &handle; - recv_msg.msg_accrightslen = sizeof handle; - - return ACE_OS::recvmsg (this->ACE_SOCK_Stream::get_handle (), - &recv_msg, 0); -#endif /* ACE_HAS_4_4BSD_SENDMSG_RECVMSG */ -} -#endif /* ACE_HAS_MSG */ - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */ diff --git a/modules/worldengine/deps/acelite/ace/LSOCK_Stream.h b/modules/worldengine/deps/acelite/ace/LSOCK_Stream.h deleted file mode 100644 index 54f87e1fd1..0000000000 --- a/modules/worldengine/deps/acelite/ace/LSOCK_Stream.h +++ /dev/null @@ -1,80 +0,0 @@ -/* -*- C++ -*- */ - -//============================================================================= -/** - * @file LSOCK_Stream.h - * - * @author Doug Schmidt - */ -//============================================================================= - - -#ifndef ACE_LOCAL_SOCK_STREAM_H -#define ACE_LOCAL_SOCK_STREAM_H -#include /**/ "ace/pre.h" - -#include /**/ "ace/config-all.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#if !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS) - -#include "ace/SOCK_Stream.h" -#include "ace/UNIX_Addr.h" -#include "ace/LSOCK.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_LSOCK_Stream - * - * @brief Create a Local ACE_SOCK stream. - */ -class ACE_Export ACE_LSOCK_Stream : public ACE_SOCK_Stream, public ACE_LSOCK -{ -public: - // = Send/recv methods. - /// Send iovecs via ::writev(). - ssize_t send_msg (const iovec iov[], - size_t n, - ACE_HANDLE handle); - - /// Send iovecs via ::writev(). - ssize_t recv_msg (iovec iov[], - size_t n, - ACE_HANDLE &handle); - - /// Get handle. - ACE_HANDLE get_handle (void) const; - - /// Overrides set_handle() from the base classes. - void set_handle (ACE_HANDLE fd); - - // = Meta-type info - typedef ACE_UNIX_Addr PEER_ADDR; - - /// Dump the state of an object. - void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - - /// This method simply returns the "local" addr. - int get_local_addr (ACE_Addr &) const; - - /// This method returns the "local" addr since it's the same value - /// for UNIX domain sockets. - int get_remote_addr (ACE_Addr &) const; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/LSOCK_Stream.inl" -#endif /* __ACE_INLINE__ */ - -#endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */ -#include /**/ "ace/post.h" -#endif /* ACE_LOCAL_SOCK_STREAM_H */ diff --git a/modules/worldengine/deps/acelite/ace/LSOCK_Stream.inl b/modules/worldengine/deps/acelite/ace/LSOCK_Stream.inl deleted file mode 100644 index 16b9489153..0000000000 --- a/modules/worldengine/deps/acelite/ace/LSOCK_Stream.inl +++ /dev/null @@ -1,22 +0,0 @@ -// -*- C++ -*- -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -// Sets both the file descriptors... Overrides handle from the base -// classes. - -ACE_INLINE void -ACE_LSOCK_Stream::set_handle (ACE_HANDLE fd) -{ - ACE_TRACE ("ACE_LSOCK_Stream::set_handle"); - this->ACE_SOCK_Stream::set_handle (fd); - this->ACE_LSOCK::set_handle (fd); -} - -ACE_INLINE ACE_HANDLE -ACE_LSOCK_Stream::get_handle (void) const -{ - ACE_TRACE ("ACE_LSOCK_Stream::get_handle"); - return this->ACE_SOCK_Stream::get_handle (); -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Lib_Find.cpp b/modules/worldengine/deps/acelite/ace/Lib_Find.cpp deleted file mode 100644 index 8c4cdaad8e..0000000000 --- a/modules/worldengine/deps/acelite/ace/Lib_Find.cpp +++ /dev/null @@ -1,774 +0,0 @@ -#include "ace/Lib_Find.h" -#include "ace/Log_Category.h" -#include "ace/OS_NS_string.h" -#include "ace/OS_NS_errno.h" -#include "ace/OS_NS_stdio.h" -#include "ace/OS_NS_unistd.h" -#include "ace/OS_NS_stdlib.h" -#include "ace/OS_Memory.h" -#include "ace/OS_NS_fcntl.h" - -#if defined (ACE_WIN32) -# include "ace/OS_NS_strings.h" -#endif /* ACE_WIN32 */ - -#if defined (ACE_OPENVMS) -#include "ace/RB_Tree.h" -#include "ace/Thread_Mutex.h" -#include "ace/Singleton.h" - -#include /**/ "descrip.h" -#include /**/ "chfdef.h" -#include /**/ "stsdef.h" -#include /**/ "libdef.h" - -extern "C" int LIB$FIND_IMAGE_SYMBOL(...); - -/** - * @internal - * - * Implements a class to register symbols and addresses for use with DLL - * symbol retrieval. - * - * OpenVMS restricts symbol length to 31 characters encoding any symbols - * longer than that. In these cases dlsym() only works with the encoded - * names. - * This creates serious problems for the service configurator framework - * where the factory method names often exceed 31 chars and where loading - * is based on retrieval of method pointers using the *full* name. - * For OpenVMS we therefor added this singleton class and the - * ACE_Dynamic_Svc_Registrar class which registers full names and function - * pointers with this singleton at the time the static ACE_Dynamic_Svc_Registrar - * object is created in a (service) DLL. - * By forcing the DLL to load using a common symbol ("NULL") we trigger static - * object creation *before* the full names are referenced. - * Symbol references will be resolved as follows on OpenVMS: - * - first try directly from DLL using the RTL dlsym() function and if that fails; - * - try to find symbol in singleton registry. - */ -class ACE_LD_Symbol_Registry -{ -public: - - typedef ACE_RB_Tree, - ACE_Thread_Mutex> - TREE; - - void register_symbol (const ACE_TCHAR* symname, void* symaddr); - - void* find_symbol (const ACE_TCHAR* symname); - - ACE_LD_Symbol_Registry () {} -private: - - TREE symbol_registry_; -}; - -void -ACE_LD_Symbol_Registry::register_symbol (const ACE_TCHAR* symname, - void* symaddr) -{ - int const result = symbol_registry_.bind (symname, symaddr); - if (result == 1) - { - ACELIB_DEBUG((LM_INFO, ACE_TEXT ("ACE_LD_Symbol_Registry:") - ACE_TEXT (" duplicate symbol %s registered\n"), - ACE_TEXT_ALWAYS_CHAR (symname))); - } - else if (result == -1) - { - ACELIB_ERROR((LM_ERROR, ACE_TEXT ("ACE_LD_Symbol_Registry:") - ACE_TEXT (" failed to register symbol %s\n"), - ACE_TEXT_ALWAYS_CHAR (symname))); - } -} - -void* -ACE_LD_Symbol_Registry::find_symbol (const ACE_TCHAR* symname) -{ - void* symaddr = 0; - int const result = symbol_registry_.find (symname, symaddr); - - return (result == 0 ? symaddr : 0); -} - -/// Declare a process wide singleton -ACE_SINGLETON_DECLARE (ACE_Singleton, - ACE_LD_Symbol_Registry, - ACE_Thread_Mutex) - -typedef ACE_Singleton - ACE_LD_SYMBOL_REGISTRY; - -ACE_SINGLETON_TEMPLATE_INSTANTIATE(ACE_Singleton, ACE_LD_Symbol_Registry, ACE_SYNCH_MUTEX); - - -#endif - - - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -int -ACE::ldfind (const ACE_TCHAR* filename, - ACE_TCHAR pathname[], - size_t maxpathnamelen) -{ - ACE_TRACE ("ACE::ldfind"); -#if defined (ACE_OPENVMS) - if (ACE_OS::strlen(filename) >= maxpathnamelen) - { - errno = ENOMEM; - return -1; - } - - dsc$descriptor nameDsc; - nameDsc.dsc$b_class = DSC$K_CLASS_S; - nameDsc.dsc$b_dtype = DSC$K_DTYPE_T; - nameDsc.dsc$w_length = ACE_OS::strlen(filename); - nameDsc.dsc$a_pointer = (char*)filename; - - char symbol[] = "NULL"; - dsc$descriptor symbolDsc; - symbolDsc.dsc$b_class = DSC$K_CLASS_S; - symbolDsc.dsc$b_dtype = DSC$K_DTYPE_T; - symbolDsc.dsc$w_length = ACE_OS::strlen(symbol); - symbolDsc.dsc$a_pointer = symbol; - - int symbolValue; - int result; - try - { - result = LIB$FIND_IMAGE_SYMBOL(&nameDsc, &symbolDsc, &symbolValue, 0, 0); - } - catch (chf$signal_array& sig) - { - result = sig.chf$l_sig_name; - } - - int severity = result & STS$M_SEVERITY; - int conditionId = result & STS$M_COND_ID; - if (severity == STS$K_SUCCESS || severity == STS$K_WARNING || severity == STS$K_INFO || - (severity == STS$K_ERROR && conditionId == (LIB$_KEYNOTFOU & STS$M_COND_ID))) - { - ACE_OS::strcpy(pathname, filename); - return 0; - } - - if (ACE_OS::strlen(filename) + ACE_OS::strlen(ACE_DLL_PREFIX) >= maxpathnamelen) - { - errno = ENOMEM; - return -1; - } - - - ACE_OS::strcpy(pathname, ACE_DLL_PREFIX); - ACE_OS::strcat(pathname, filename); - nameDsc.dsc$w_length = ACE_OS::strlen(pathname); - nameDsc.dsc$a_pointer = pathname; - try - { - result = LIB$FIND_IMAGE_SYMBOL(&nameDsc, &symbolDsc, &symbolValue, 0, 0); - } - catch (chf$signal_array& sig) - { - result = sig.chf$l_sig_name; - } - - severity = result & STS$M_SEVERITY; - conditionId = result & STS$M_COND_ID; - if (severity == STS$K_SUCCESS || severity == STS$K_WARNING || severity == STS$K_INFO || - (severity == STS$K_ERROR && conditionId == (LIB$_KEYNOTFOU & STS$M_COND_ID))) - { - return 0; - } - errno = ENOENT; - return -1; -#endif /* ACE_OPENVMS */ - -#if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) && \ - !defined (ACE_HAS_PHARLAP) - ACE_TCHAR expanded_filename[MAXPATHLEN]; - if (ACE_TEXT_ExpandEnvironmentStrings (filename, - expanded_filename, - sizeof expanded_filename - / sizeof (ACE_TCHAR))) - filename = expanded_filename; -#endif /* ACE_WIN32 && !ACE_HAS_WINCE && !ACE_HAS_PHARLAP */ - - ACE_TCHAR tempcopy[MAXPATHLEN + 1]; - ACE_TCHAR searchpathname[MAXPATHLEN + 1]; -#if defined (ACE_LD_DECORATOR_STR) && !defined (ACE_DISABLE_DEBUG_DLL_CHECK) - ACE_TCHAR decorator[] = ACE_LD_DECORATOR_STR; - ACE_TCHAR searchfilename[MAXPATHLEN + sizeof(decorator) / sizeof (ACE_TCHAR)]; -#else - ACE_TCHAR searchfilename[MAXPATHLEN + 1]; -#endif /* ACE_LD_DECORATOR_STR && !ACE_DISABLE_DEBUG_DLL_CHECK */ - - // Create a copy of filename to work with. - if (ACE_OS::strlen (filename) + 1 - > (sizeof tempcopy / sizeof (ACE_TCHAR))) - { - errno = ENOMEM; - return -1; - } - else - ACE_OS::strcpy (tempcopy, filename); - - // Insert canonical directory separators. - ACE_TCHAR *separator_ptr; - -#if (ACE_DIRECTORY_SEPARATOR_CHAR != '/') - // Make all the directory separators "canonical" to simplify - // subsequent code. - ACE::strrepl (tempcopy, ACE_DIRECTORY_SEPARATOR_CHAR, '/'); -#endif /* ACE_DIRECTORY_SEPARATOR_CHAR */ - - // Separate filename from pathname. - separator_ptr = ACE_OS::strrchr (tempcopy, '/'); - - // This is a relative path. - if (separator_ptr == 0) - { - searchpathname[0] = '\0'; - ACE_OS::strcpy (searchfilename, tempcopy); - } - else // This is an absolute path. - { - ACE_OS::strcpy (searchfilename, separator_ptr + 1); - separator_ptr[1] = '\0'; - ACE_OS::strcpy (searchpathname, tempcopy); - } - - bool has_suffix = false; - - // Check to see if this has an appropriate DLL suffix for the OS - // platform. - ACE_TCHAR *s = ACE_OS::strrchr (searchfilename, '.'); - - const ACE_TCHAR *dll_suffix = ACE_DLL_SUFFIX; - - if (s != 0) - { - // If we have a dot, we have a suffix - has_suffix = true; - - // Check whether this matches the appropriate platform-specific - // suffix. -#if defined (ACE_WIN32) - // Use on any platform with - // case-insensitive filenames. - if (ACE_OS::strcasecmp (s, dll_suffix) != 0) -#else - if (ACE_OS::strcmp (s, dll_suffix) != 0) -#endif /* ACE_WIN32 */ - { - ACELIB_ERROR ((LM_WARNING, - ACE_TEXT ("Warning: improper suffix for a ") - ACE_TEXT ("shared library on this platform: %s\n"), - s)); - } - } - - // Make sure we've got enough space in searchfilename. - if (ACE_OS::strlen (searchfilename) - + ACE_OS::strlen (ACE_DLL_PREFIX) - + (has_suffix ? 0 : ACE_OS::strlen (dll_suffix)) - >= (sizeof searchfilename / sizeof (ACE_TCHAR))) - { - errno = ENOMEM; - return -1; - } - -#if defined (ACE_LD_DECORATOR_STR) && !defined (ACE_DISABLE_DEBUG_DLL_CHECK) - size_t const len_searchfilename = ACE_OS::strlen (searchfilename); - if (!has_suffix) - ACE_OS::strcpy (searchfilename + len_searchfilename, decorator); - - for (int tag = 1; tag >= 0; tag --) - { - if (tag == 0) - searchfilename [len_searchfilename] = 0; - -#endif /* ACE_LD_DECORATOR_STR && !ACE_DISABLE_DEBUG_DLL_CHECK */ - // Use absolute pathname if there is one. - if (ACE_OS::strlen (searchpathname) > 0) - { - if (ACE_OS::strlen (searchfilename) - + ACE_OS::strlen (searchpathname) >= maxpathnamelen) - { - errno = ENOMEM; - return -1; - } - else - { -#if (ACE_DIRECTORY_SEPARATOR_CHAR != '/') - // Revert to native path name separators. - ACE::strrepl (searchpathname, - '/', - ACE_DIRECTORY_SEPARATOR_CHAR); -#endif /* ACE_DIRECTORY_SEPARATOR_CHAR */ - // First, try matching the filename *without* adding a - // prefix. - ACE_OS::sprintf (pathname, - ACE_TEXT ("%s%s%s"), - searchpathname, - searchfilename, - has_suffix ? ACE_TEXT ("") : dll_suffix); - if (ACE_OS::access (pathname, F_OK) == 0) - return 0; - - // Second, try matching the filename *with* adding a prefix. - ACE_OS::sprintf (pathname, - ACE_TEXT ("%s%s%s%s"), - searchpathname, - ACE_DLL_PREFIX, - searchfilename, - has_suffix ? ACE_TEXT ("") : dll_suffix); - if (ACE_OS::access (pathname, F_OK) == 0) - return 0; - } - } - - // Use relative filenames via LD_LIBRARY_PATH or PATH (depending on - // OS platform). - else - { -#if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) - ACE_TCHAR *file_component = 0; - DWORD pathlen = - ACE_TEXT_SearchPath (0, - searchfilename, - dll_suffix, - static_cast (maxpathnamelen), - pathname, - &file_component); - if (pathlen >= maxpathnamelen) - { - errno = ENOMEM; - return -1; - } - else if (pathlen > 0) - return 0; - - // In case not found we should try again with the ACE_DLL_PREFIX - // prefixed - ACE_OS::strcpy (searchfilename, ACE_DLL_PREFIX); - ACE_OS::strcat (searchfilename, tempcopy); - pathlen = - ACE_TEXT_SearchPath (0, - searchfilename, - dll_suffix, - static_cast (maxpathnamelen), - pathname, - &file_component); - if (pathlen >= maxpathnamelen) - { - errno = ENOMEM; - return -1; - } - else if (pathlen > 0) - return 0; -#else - ACE_TCHAR *ld_path = 0; -# if defined ACE_DEFAULT_LD_SEARCH_PATH - ld_path = const_cast (ACE_DEFAULT_LD_SEARCH_PATH); -# else -# if defined (ACE_WIN32) || !defined (ACE_USES_WCHAR) - ld_path = ACE_OS::getenv (ACE_LD_SEARCH_PATH); -# else - // Wide-char, non-Windows only offers char * getenv. So capture - // it, translate to wide-char, and continue. - ACE_Ascii_To_Wide wide_ldpath - (ACE_OS::getenv (ACE_TEXT_ALWAYS_CHAR (ACE_LD_SEARCH_PATH))); - ld_path = wide_ldpath.wchar_rep (); -# endif /* ACE_WIN32 || !ACE_USES_WCHAR */ -# endif /* ACE_DEFAULT_LD_SEARCH_PATH */ - -#if defined (ACE_HAS_WINCE) - ACE_TCHAR *ld_path_temp = 0; - if (ld_path != 0) - { - ld_path_temp = (ACE_TCHAR *) - ACE_OS::malloc ((ACE_OS::strlen (ld_path) + 2) - * sizeof (ACE_TCHAR)); - if (ld_path_temp != 0) - { - ACE_OS::strcpy (ld_path_temp, - ACE_LD_SEARCH_PATH_SEPARATOR_STR); - - ACE_OS::strcat (ld_path_temp, ld_path); - ld_path = ld_path_temp; - } - else - { - ACE_OS::free ((void *) ld_path_temp); - ld_path = ld_path_temp = 0; - } - } -#endif /* ACE_HAS_WINCE */ - - if (ld_path != 0 - && (ld_path = ACE_OS::strdup (ld_path)) != 0) - { - // strtok has the strange behavior of not separating the - // string ":/foo:/bar" into THREE tokens. One would expect - // that the first iteration the token would be an empty - // string, the second iteration would be "/foo", and the - // third iteration would be "/bar". However, this is not - // the case; one only gets two iterations: "/foo" followed - // by "/bar". - - // This is especially a problem in parsing Unix paths - // because it is permissible to specify 'the current - // directory' as an empty entry. So, we introduce the - // following special code to cope with this: - - // Look at each dynamic lib directory in the search path. - - ACE_TCHAR *nextholder = 0; - const ACE_TCHAR *path_entry = - ACE::strsplit_r (ld_path, - ACE_LD_SEARCH_PATH_SEPARATOR_STR, - nextholder); - int result = 0; - - for (;;) - { - // Check if at end of search path. - if (path_entry == 0) - { - errno = ENOENT; - result = -1; - break; - } - else if (ACE_OS::strlen (path_entry) - + 1 - + ACE_OS::strlen (searchfilename) - >= maxpathnamelen) - { - errno = ENOMEM; - result = -1; - break; - } - // This works around the issue where a path might have - // an empty component indicating 'current directory'. - // We need to do it here rather than anywhere else so - // that the loop condition will still work. - else if (path_entry[0] == '\0') - path_entry = ACE_TEXT ("."); - - // First, try matching the filename *without* adding a - // prefix. - ACE_OS::sprintf (pathname, - ACE_TEXT ("%s%c%s%s"), - path_entry, - ACE_DIRECTORY_SEPARATOR_CHAR, - searchfilename, - has_suffix ? ACE_TEXT ("") : dll_suffix); - if (ACE_OS::access (pathname, F_OK) == 0) - break; - - // Second, try matching the filename *with* adding a - // prefix. - ACE_OS::sprintf (pathname, - ACE_TEXT ("%s%c%s%s%s"), - path_entry, - ACE_DIRECTORY_SEPARATOR_CHAR, - ACE_DLL_PREFIX, - searchfilename, - has_suffix ? ACE_TEXT ("") : dll_suffix); - if (ACE_OS::access (pathname, F_OK) == 0) - break; - - // Fetch the next item in the path - path_entry = - ACE::strsplit_r (0, - ACE_LD_SEARCH_PATH_SEPARATOR_STR, - nextholder); - } - -#if defined (ACE_HAS_WINCE) - if (ld_path_temp != 0) - ACE_OS::free (ld_path_temp); -#endif /* ACE_HAS_WINCE */ - ACE_OS::free ((void *) ld_path); -#if defined (ACE_LD_DECORATOR_STR) && !defined (ACE_DISABLE_DEBUG_DLL_CHECK) - if (result == 0 || tag == 0) -#endif /* ACE_LD_DECORATOR_STR && !ACE_DISABLE_DEBUG_DLL_CHECK */ - return result; - } -#endif /* ACE_WIN32 && !ACE_HAS_WINCE */ - } -#if defined (ACE_LD_DECORATOR_STR) && !defined (ACE_DISABLE_DEBUG_DLL_CHECK) - } -#endif /* ACE_LD_DECORATOR_STR && !ACE_DISABLE_DEBUG_DLL_CHECK */ - - errno = ENOENT; - return -1; -} - -FILE * -ACE::ldopen (const ACE_TCHAR *filename, - const ACE_TCHAR *type) -{ - ACE_TRACE ("ACE::ldopen"); - - ACE_TCHAR buf[MAXPATHLEN + 1]; - if (ACE::ldfind (filename, - buf, - sizeof (buf) /sizeof (ACE_TCHAR)) == -1) - return 0; - else - return ACE_OS::fopen (buf, type); -} - -ACE_TCHAR * -ACE::ldname (const ACE_TCHAR *entry_point) -{ - ACE_TRACE ("ACE::ldname"); - -#if defined(ACE_NEEDS_DL_UNDERSCORE) - size_t size = - 1 // leading '_' - + ACE_OS::strlen (entry_point) - + 1; - - ACE_TCHAR *new_name; - ACE_NEW_RETURN (new_name, - ACE_TCHAR[size], - 0); - - ACE_OS::strcpy (new_name, ACE_TEXT ("_")); - ACE_OS::strcat (new_name, entry_point); - - return new_name; -#else /* ACE_NEEDS_DL_UNDERSCORE */ - size_t size = - ACE_OS::strlen (entry_point) - + 1; - - ACE_TCHAR *new_name; - ACE_NEW_RETURN (new_name, - ACE_TCHAR[size], - 0); - - ACE_OS::strcpy (new_name, entry_point); - return new_name; -#endif /* ACE_NEEDS_DL_UNDERSCORE */ -} - -#if defined (ACE_OPENVMS) -void -ACE::ldregister (const ACE_TCHAR *entry_point, - void* entry_addr) -{ - ACE_LD_SYMBOL_REGISTRY::instance ()->register_symbol (entry_point, - entry_addr); -} - -void * -ACE::ldsymbol (ACE_SHLIB_HANDLE sh, const ACE_TCHAR *entry_point) -{ - void* symaddr = ACE_OS::dlsym (sh, entry_point); - // if not found through dlsym() try registry - if (symaddr == 0) - symaddr = ACE_LD_SYMBOL_REGISTRY::instance ()->find_symbol (entry_point); - - return symaddr; -} -#endif - -int -ACE::get_temp_dir (ACE_TCHAR *buffer, size_t buffer_len) -{ - int result; -#if defined (ACE_WIN32) - result = ACE_TEXT_GetTempPath (static_cast (buffer_len), - buffer); - - // Make sure to return -1 if there is an error - if ((result == 0 && ::GetLastError () != ERROR_SUCCESS) - || (result > static_cast (buffer_len))) - result = -1; - -#else /* ACE_WIN32 */ - - // NOTE! Non-Windows platforms don't deal with wide chars for env. - // variables, so do this narrow-char and convert to wide for the - // caller if necessary. - - // On non-win32 platforms, check to see what the TMPDIR environment - // variable is defined to be. If it doesn't exist, just use /tmp - const char *tmpdir = ACE_OS::getenv ("TMPDIR"); - - if (tmpdir == 0) - { -#if defined (ACE_DEFAULT_TEMP_DIR) - tmpdir = ACE_DEFAULT_TEMP_DIR; -#else - tmpdir = "/tmp"; -#endif - } - - size_t len = ACE_OS::strlen (tmpdir); - - // Check to see if the buffer is large enough for the string, - // another /, and its null character (hence the + 2) - if ((len + 2) > buffer_len) - { - result = -1; - } - else - { - ACE_OS::strcpy (buffer, ACE_TEXT_CHAR_TO_TCHAR (tmpdir)); - - // Add a trailing slash because we cannot assume there is already one - // at the end. And having an extra one should not cause problems. - buffer[len] = ACE_TEXT ('/'); - buffer[len + 1] = 0; - result = 0; - } -#endif /* ACE_WIN32 */ - return result; -} - -ACE_HANDLE -ACE::open_temp_file (const ACE_TCHAR *name, int mode, int perm) -{ -#if defined (ACE_WIN32) - ACE_UNUSED_ARG (perm); - ACE_HANDLE handle = ACE_OS::open (name, - mode, - FILE_SHARE_READ - | FILE_SHARE_WRITE - | FILE_SHARE_DELETE); -#else - // Open it. - ACE_HANDLE handle = ACE_OS::open (name, mode, perm); -#endif /* ACE_WIN32 */ - - if (handle == ACE_INVALID_HANDLE) - return ACE_INVALID_HANDLE; - - // Unlink it so that the file will be removed automatically when the - // process goes away. - if (ACE_OS::unlink (name) == -1) - { - ACE_OS::close (handle); - return ACE_INVALID_HANDLE; - } - else - // Return the handle. - return handle; -} - -size_t -ACE::strrepl (char *s, char search, char replace) -{ - ACE_TRACE ("ACE::strrepl"); - - size_t replaced = 0; - - for (size_t i = 0; s[i] != '\0'; i++) - if (s[i] == search) - { - s[i] = replace; - ++replaced; - } - - return replaced; -} - - -// Split a string up into 'token'-delimited pieces, ala Perl's -// "split". - -char * -ACE::strsplit_r (char *str, - const char *token, - char *&next_start) -{ - char *result = 0; - - if (str != 0) - next_start = str; - - if (next_start != 0) - { - char *tok_loc = ACE_OS::strstr (next_start, token); - - if (tok_loc != 0) - { - // Return the beginning of the string. - result = next_start; - - // Insure it's terminated. - *tok_loc = '\0'; - next_start = tok_loc + ACE_OS::strlen (token); - } - else - { - result = next_start; - next_start = (char *) 0; - } - } - - return result; -} - -#if defined (ACE_HAS_WCHAR) -wchar_t * -ACE::strsplit_r (wchar_t *str, - const wchar_t *token, - wchar_t *&next_start) -{ - wchar_t *result = 0; - - if (str != 0) - next_start = str; - - if (next_start != 0) - { - wchar_t *tok_loc = ACE_OS::strstr (next_start, token); - - if (tok_loc != 0) - { - // Return the beginning of the string. - result = next_start; - - // Insure it's terminated. - *tok_loc = '\0'; - next_start = tok_loc + ACE_OS::strlen (token); - } - else - { - result = next_start; - next_start = (wchar_t *) 0; - } - } - - return result; -} - -size_t -ACE::strrepl (wchar_t *s, wchar_t search, wchar_t replace) -{ - ACE_TRACE ("ACE::strrepl"); - - size_t replaced = 0; - - for (size_t i = 0; s[i] != '\0'; i++) - if (s[i] == search) - { - s[i] = replace; - ++replaced; - } - - return replaced; -} -#endif /* ACE_HAS_WCHAR */ - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Lib_Find.h b/modules/worldengine/deps/acelite/ace/Lib_Find.h deleted file mode 100644 index 696dce03da..0000000000 --- a/modules/worldengine/deps/acelite/ace/Lib_Find.h +++ /dev/null @@ -1,129 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Lib_Find.h - * - * All the static function calls needed to search and open shared - * libraries. - */ -//============================================================================= - -#ifndef ACE_LIB_FIND_H -#define ACE_LIB_FIND_H -#include /**/ "ace/pre.h" - -#include /**/ "ace/config-all.h" -#include /**/ "ace/ACE_export.h" -#include "ace/os_include/os_stdio.h" -#if defined (ACE_OPENVMS) -# include "ace/OS_NS_dlfcn.h" -#endif - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -namespace ACE -{ - // = Methods for searching and opening shared libraries. - - /** - * Finds the file @a filename either using an absolute path or using - * a relative path in conjunction with ACE_LD_SEARCH_PATH (e.g., - * $LD_LIBRARY_PATH on UNIX or the directories scaned by Win32 API - * SearchPath on Win32). This function will add appropriate suffix - * (e.g., .dll on Win32 or .so on UNIX) according to the OS - * platform. In addition, this function will apply the appropriate - * prefix (e.g., "lib" on UNIX and "" on Win32) if the @a filename - * doesn't match directly. - */ - extern ACE_Export int ldfind (const ACE_TCHAR* filename, - ACE_TCHAR pathname[], - size_t maxpathnamelen); - - /** - * Uses @c ldfind to locate and open the appropriate @a filename and - * returns a pointer to the file, else it returns a NULL - * pointer. @a type specifies how the file should be open. - */ - extern ACE_Export FILE *ldopen (const ACE_TCHAR *filename, - const ACE_TCHAR *type); - - /** - * Transforms @a entry_point into a form that can be located in a - * dynamic library using . For example, with Win32/Borland - * extern "C" functions which use the default calling convention - * have a '_' prepended. Always returns a buffer that has been - * dynamically allocated using . - */ - extern ACE_Export ACE_TCHAR *ldname (const ACE_TCHAR *entry_point); - - -#if defined (ACE_OPENVMS) - /** - * Registers an @a entry_point and its address for later retrieval - * through the ACE::ldsymbol () method. - * For use in cases where the OS compiler encodes long symbolnames. - */ - extern ACE_Export void ldregister (const ACE_TCHAR *entry_point, - void* entry_addr); - - /** - * Looks up an @a entry_point address either from previously registered - * symbols or through ACE_OS::dlsym (). - * Returns 0 in case the entry_point is not found, otherwise nonzero. - * For use in cases where the OS compiler encodes long symbolnames. - */ - extern ACE_Export void *ldsymbol (ACE_SHLIB_HANDLE sh, - const ACE_TCHAR *entry_point); -#endif - - /** - * Returns the temporary directory including the trailing slash in - * @a buffer. Returns -1 for an error or if the buffer_len is not - * long enough. - */ - extern ACE_Export int get_temp_dir (ACE_TCHAR *buffer, size_t buffer_len); - - /// Opening the temp file. File is automagically unlinked when it is - /// closed. This is useful for have temp files. - extern ACE_Export ACE_HANDLE open_temp_file (const ACE_TCHAR *name, - int mode, - int perm = 0); - - // @@ Though the following functions dont come under the same category as - // above, these are used only in the functions in this class. So it makes - // more sense to move these functions too to this class. - // - /// Replace all instances of @a search in @a s with @a replace. Returns - /// the number of replacements made. - extern ACE_Export size_t strrepl (char *s, char search, char replace); - - /** - * Splits string @a s into pieces separated by the string @a token. - * @a next_start is an opaque cookie handed back by the call to store - * its state for the next invocation, thus making it re-entrant. - * This operates very similar to Perl's @c split function except that - * it returns pieces one at a time instead of into an array. - */ - extern ACE_Export char *strsplit_r (char *s, - const char *token, - char *&next_start); - -#if defined (ACE_HAS_WCHAR) - /// As strrepl, but for wide characters. - extern ACE_Export size_t strrepl (wchar_t *s, - wchar_t search, - wchar_t replace); - - /// As strsplit_r, but for wide characters. - extern ACE_Export wchar_t *strsplit_r (wchar_t *s, - const wchar_t *token, - wchar_t *&next_start); -#endif /* ACE_HAS_WCHAR */ -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#include /**/ "ace/post.h" -#endif /* ACE_LIB_FIND_H */ - diff --git a/modules/worldengine/deps/acelite/ace/Local_Memory_Pool.cpp b/modules/worldengine/deps/acelite/ace/Local_Memory_Pool.cpp deleted file mode 100644 index 6d56e2500b..0000000000 --- a/modules/worldengine/deps/acelite/ace/Local_Memory_Pool.cpp +++ /dev/null @@ -1,142 +0,0 @@ -// Local_Memory_Pool.cpp -#include "ace/Local_Memory_Pool.h" -#include "ace/Auto_Ptr.h" -#include "ace/OS_Memory.h" -#include "ace/Log_Category.h" - - - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_ALLOC_HOOK_DEFINE(ACE_Local_Memory_Pool) - -void -ACE_Local_Memory_Pool::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_Local_Memory_Pool::dump"); -#endif /* ACE_HAS_DUMP */ -} - -ACE_Local_Memory_Pool::ACE_Local_Memory_Pool (const ACE_TCHAR *, - const OPTIONS *) -{ - ACE_TRACE ("ACE_Local_Memory_Pool::ACE_Local_Memory_Pool"); -} - -ACE_Local_Memory_Pool::~ACE_Local_Memory_Pool (void) -{ - // Free up all memory allocated by this pool. - this->release (); -} - -// Ask system for initial chunk of local memory. -void * -ACE_Local_Memory_Pool::init_acquire (size_t nbytes, - size_t &rounded_bytes, - int &first_time) -{ - ACE_TRACE ("ACE_Local_Memory_Pool::init_acquire"); - // Note that we assume that when ACE_Local_Memory_Pool is used, - // ACE_Malloc's constructor will only get called once. If this - // assumption doesn't hold, we are in deep trouble! - - first_time = 1; - return this->acquire (nbytes, rounded_bytes); -} - -void * -ACE_Local_Memory_Pool::acquire (size_t nbytes, - size_t &rounded_bytes) -{ - ACE_TRACE ("ACE_Local_Memory_Pool::acquire"); - rounded_bytes = this->round_up (nbytes); - - char *temp = 0; - ACE_NEW_RETURN (temp, - char[rounded_bytes], - 0); - - ACE_Auto_Basic_Array_Ptr cp (temp); - - if (this->allocated_chunks_.insert (cp.get ()) != 0) - ACELIB_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("(%P|%t) insertion into set failed\n")), - 0); - - return cp.release (); -} - -int -ACE_Local_Memory_Pool::release (int) -{ - ACE_TRACE ("ACE_Local_Memory_Pool::release"); - - // Zap the memory we allocated. - for (ACE_Unbounded_Set::iterator i = this->allocated_chunks_.begin (); - i != this->allocated_chunks_.end (); - ++i) - delete [] *i; - this->allocated_chunks_.reset (); - return 0; -} - -int -ACE_Local_Memory_Pool::sync (ssize_t, int) -{ - ACE_TRACE ("ACE_Local_Memory_Pool::sync"); - return 0; -} - -int -ACE_Local_Memory_Pool::sync (void *, size_t, int) -{ - ACE_TRACE ("ACE_Local_Memory_Pool::sync"); - return 0; -} - -int -ACE_Local_Memory_Pool::protect (ssize_t, int) -{ - ACE_TRACE ("ACE_Local_Memory_Pool::protect"); - return 0; -} - -int -ACE_Local_Memory_Pool::protect (void *, size_t, int) -{ - ACE_TRACE ("ACE_Local_Memory_Pool::protect"); - return 0; -} - -#if defined (ACE_WIN32) -int -ACE_Local_Memory_Pool::seh_selector (void *) -{ - return 0; - // Continue propagate the structural exception up. -} -#endif /* ACE_WIN32 */ - -int -ACE_Local_Memory_Pool::remap (void *) -{ - return 0; - // Not much can be done. -} - -void * -ACE_Local_Memory_Pool::base_addr (void) const -{ - return 0; -} - -// Let the underlying new operator figure out the alignment... -size_t -ACE_Local_Memory_Pool::round_up (size_t nbytes) -{ - ACE_TRACE ("ACE_Local_Memory_Pool::round_up"); - return ACE::round_to_pagesize (nbytes); -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Local_Memory_Pool.h b/modules/worldengine/deps/acelite/ace/Local_Memory_Pool.h deleted file mode 100644 index a346af36db..0000000000 --- a/modules/worldengine/deps/acelite/ace/Local_Memory_Pool.h +++ /dev/null @@ -1,131 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Local_Memory_Pool.h - * - * @author Dougls C. Schmidt - * @author Prashant Jain - */ -//============================================================================= - -#ifndef ACE_LOCAL_MEMORY_POOL_H -#define ACE_LOCAL_MEMORY_POOL_H -#include /**/ "ace/pre.h" - -#include "ace/os_include/sys/os_mman.h" /* Need PROT_RDWR */ -#include "ace/ACE.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Unbounded_Set.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_Local_Memory_Pool_Options - * - * @brief Helper class for Local Memory Pool constructor options. - * - * This should be a nested class, but that breaks too many - * compilers. - */ -class ACE_Export ACE_Local_Memory_Pool_Options -{ -}; - -/** - * @class ACE_Local_Memory_Pool - * - * @brief Make a memory pool that is based on C++ new/delete. This is - * useful for integrating existing components that use new/delete - * into the ACE Malloc scheme... - */ -class ACE_Export ACE_Local_Memory_Pool -{ -public: - typedef ACE_Local_Memory_Pool_Options OPTIONS; - - /// Initialize the pool. - ACE_Local_Memory_Pool (const ACE_TCHAR *backing_store_name = 0, - const OPTIONS *options = 0); - - virtual ~ACE_Local_Memory_Pool (void); - - /// Ask system for initial chunk of local memory. - virtual void *init_acquire (size_t nbytes, - size_t &rounded_bytes, - int &first_time); - - /// Acquire at least @a nbytes from the memory pool. @a rounded_bytes is - /// the actual number of bytes allocated. - virtual void *acquire (size_t nbytes, - size_t &rounded_bytes); - - /// Instruct the memory pool to release all of its resources. - virtual int release (int destroy = 1); - - /** - * Sync @a len bytes of the memory region to the backing store - * starting at base_addr_>. If @a len == -1 then sync the - * whole region. - */ - virtual int sync (ssize_t len = -1, int flags = MS_SYNC); - - /// Sync @a len bytes of the memory region to the backing store - /// starting at @a add_. - virtual int sync (void *addr, size_t len, int flags = MS_SYNC); - - /** - * Change the protection of the pages of the mapped region to @a prot - * starting at base_addr_> up to @a len bytes. If @a len == -1 - * then change protection of all pages in the mapped region. - */ - virtual int protect (ssize_t len = -1, int prot = PROT_RDWR); - - /// Change the protection of the pages of the mapped region to @a prot - /// starting at @a addr up to @a len bytes. - virtual int protect (void *addr, size_t len, int prot = PROT_RDWR); - -#if defined (ACE_WIN32) - /** - * Win32 Structural exception selector. The return value decides - * how to handle memory pool related structural exceptions. Returns - * 1, 0, or , -1. - */ - virtual int seh_selector (void *); -#endif /* ACE_WIN32 */ - - /** - * Try to extend the virtual address space so that @a addr is now - * covered by the address mapping. Always returns 0 since we can't - * remap a local memory pool. - */ - virtual int remap (void *addr); - - /// Return the base address of this memory pool, 0 if base_addr - /// never changes. - virtual void *base_addr (void) const; - - /// Dump the state of an object. - virtual void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - -protected: - /// List of memory that we have allocated. - ACE_Unbounded_Set allocated_chunks_; - - /// Implement the algorithm for rounding up the request to an - /// appropriate chunksize. - virtual size_t round_up (size_t nbytes); - -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#include /**/ "ace/post.h" -#endif /* ACE_LOCAL_MEMORY_POOL_H */ diff --git a/modules/worldengine/deps/acelite/ace/Local_Name_Space.cpp b/modules/worldengine/deps/acelite/ace/Local_Name_Space.cpp deleted file mode 100644 index 4ced48dae5..0000000000 --- a/modules/worldengine/deps/acelite/ace/Local_Name_Space.cpp +++ /dev/null @@ -1,165 +0,0 @@ -#include "ace/Local_Name_Space.h" -#include "ace/ACE.h" -#include "ace/RW_Process_Mutex.h" -#include "ace/SString.h" -#include "ace/OS_NS_string.h" -#include "ace/Truncate.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_NS_String::~ACE_NS_String (void) -{ - if (this->delete_rep_) - delete [] this->rep_; -} - -ACE_WCHAR_T * -ACE_NS_String::fast_rep (void) const -{ - ACE_TRACE ("ACE_NS_String::fast_rep"); - return this->rep_; -} - -ACE_NS_String::operator ACE_NS_WString () const -{ - ACE_TRACE ("ACE_NS_String::operator ACE_NS_WString"); - return ACE_NS_WString (this->rep_, - (this->len_ / sizeof (ACE_WCHAR_T)) - 1); -} - -size_t -ACE_NS_String::len (void) const -{ - ACE_TRACE ("ACE_NS_String::len"); - return this->len_; -} - -char * -ACE_NS_String::char_rep (void) const -{ - ACE_TRACE ("ACE_NS_String::char_rep"); - ACE_NS_WString w_string (this->rep_, - (this->len_ / sizeof (ACE_WCHAR_T)) - 1); - return w_string.char_rep (); -} - -ACE_NS_String::ACE_NS_String (void) - : len_ (0), - rep_ (0), - delete_rep_ (false) -{ - ACE_TRACE ("ACE_NS_String::ACE_NS_String"); -} - -ACE_NS_String::ACE_NS_String (const ACE_NS_WString &s) - : len_ ((s.length () + 1) * sizeof (ACE_WCHAR_T)), - rep_ (s.rep ()), - delete_rep_ (true) -{ - ACE_TRACE ("ACE_NS_String::ACE_NS_String"); -} - -int -ACE_NS_String::strstr (const ACE_NS_String &s) const -{ - ACE_TRACE ("ACE_NS_String::strstr"); - - if (this->len_ < s.len_) - // If they're larger than we are they can't be a substring of us! - return -1; - else if (this->len_ == s.len_) - // Check if we're equal. - return *this == s ? 0 : -1; - else - { - // They're smaller than we are... - const size_t len = (this->len_ - s.len_) / sizeof (ACE_WCHAR_T); - const size_t pat_len = s.len_ / sizeof (ACE_WCHAR_T) - 1; - - for (size_t i = 0; i <= len; ++i) - { - size_t j; - - for (j = 0; j < pat_len; ++j) - if (this->rep_[i + j] != s.rep_[j]) - break; - - if (j == pat_len) - // Found a match! Return the index. - return ACE_Utils::truncate_cast (i); - } - - return -1; - } -} - -bool -ACE_NS_String::operator == (const ACE_NS_String &s) const -{ - ACE_TRACE ("ACE_NS_String::operator =="); - return this->len_ == s.len_ - && ACE_OS::memcmp ((void *) this->rep_, - (void *) s.rep_, this->len_) == 0; -} - -bool -ACE_NS_String::operator != (const ACE_NS_String &s) const -{ - ACE_TRACE ("ACE_NS_String::operator !="); - return !this->operator == (s); -} - -ACE_NS_String::ACE_NS_String (ACE_WCHAR_T *dst, - const ACE_WCHAR_T *src, - size_t bytes) - : len_ (bytes), - rep_ (dst), - delete_rep_ (false) -{ - ACE_TRACE ("ACE_NS_String::ACE_NS_String"); - ACE_OS::memcpy (this->rep_, src, bytes); -} - -u_long -ACE_NS_String::hash (void) const -{ - return ACE::hash_pjw - (reinterpret_cast (const_cast (this->rep_)), - this->len_); -} - -ACE_NS_Internal::ACE_NS_Internal (void) - : value_ (), - type_ () -{ -} - -ACE_NS_Internal::ACE_NS_Internal (ACE_NS_String &value, const char *type) - : value_ (value), - type_ (type) -{ - ACE_TRACE ("ACE_NS_Internal::ACE_NS_Internal"); -} - -bool -ACE_NS_Internal::operator == (const ACE_NS_Internal &s) const -{ - ACE_TRACE ("ACE_NS_Internal::operator =="); - return this->value_ == s.value_; -} - -ACE_NS_String -ACE_NS_Internal::value (void) -{ - ACE_TRACE ("ACE_NS_Internal::value"); - return this->value_; -} - -const char * -ACE_NS_Internal::type (void) -{ - ACE_TRACE ("ACE_NS_Internal::type"); - return this->type_; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Local_Name_Space.h b/modules/worldengine/deps/acelite/ace/Local_Name_Space.h deleted file mode 100644 index b750c16dd5..0000000000 --- a/modules/worldengine/deps/acelite/ace/Local_Name_Space.h +++ /dev/null @@ -1,130 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Local_Name_Space.h - * - * @author Prashant Jain (pjain@cs.wustl.edu) - * @author Irfan Pyarali (irfan@wuerl.wustl.edu) - * @author Douglas C. Schmidt (schmidt@cs.wustl.edu). - */ -//============================================================================= - -#ifndef ACE_LOCAL_NAME_SPACE_H -#define ACE_LOCAL_NAME_SPACE_H - -#include /**/ "ace/pre.h" - -#include "ace/Malloc_T.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -class ACE_NS_WString; - -/** - * @class ACE_NS_String - * - * @brief This class and ACE_NS_Internal are used as Adapters to work - * with the Map_Manager. - * - * In order to work correctly, this class must be able to - * convert back and forth with . - */ -class ACE_Export ACE_NS_String -{ -public: - // = Initialization. - /// Default "no-op" constructor. - ACE_NS_String (void); - - /// Initialization method. - ACE_NS_String (ACE_WCHAR_T *dst, - const ACE_WCHAR_T *src, - size_t len); - - /// Converts an ACE_NS_WString to an ACE_NS_String; - ACE_NS_String (const ACE_NS_WString &); - - /// Destructor - ~ACE_NS_String (void); - - /// Converts an ACE_NS_String to fresh copy of an ACE_NS_WString; - operator ACE_NS_WString () const; - - /// Return the ASCII character representation. - char *char_rep (void) const; - - /// Matches on substrings. - int strstr (const ACE_NS_String &) const; - - /// Compare an ACE_NS_String. - bool operator == (const ACE_NS_String &) const; - - /// Compare an ACE_NS_String. - bool operator != (const ACE_NS_String &) const; - - /// Returns length of the string - size_t len (void) const; - - /// Returns the underlying representation. - ACE_WCHAR_T *fast_rep (void) const; - - /// Returns a hash value for this string. - u_long hash (void) const; - -private: - /// Length of the string. - size_t len_; - - /// This actually points into shared/persistent memory. - ACE_WCHAR_T *rep_; - - /// Should rep_ be deleted when destructed (only used - /// for WString conversions) - bool delete_rep_; -}; - -/** - * @class ACE_NS_Internal - * - * @brief This class and ACE_NS_String are used as Adapters to work - * with the Map_Manager. - */ -class ACE_Export ACE_NS_Internal -{ -public: - /// No-op constructor. - ACE_NS_Internal (void); - - /// Constructor. - ACE_NS_Internal (ACE_NS_String &value, const char *type); - - /// Compare an ACE_NS_Internal - bool operator == (const ACE_NS_Internal &) const; - - /// Return value. - ACE_NS_String value (void); - - /// Return type. - const char *type (void); - -private: - /// Contains the value of the string. - ACE_NS_String value_; - - /// Contains the type of the string. - const char *type_; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -// Include the ACE_Local_Name_Space templates stuff at this point. -#include "ace/Local_Name_Space_T.h" - -#include /**/ "ace/post.h" - -#endif /* ACE_LOCAL_NAME_SPACE_H */ diff --git a/modules/worldengine/deps/acelite/ace/Local_Name_Space_T.cpp b/modules/worldengine/deps/acelite/ace/Local_Name_Space_T.cpp deleted file mode 100644 index 4ab4fc01b3..0000000000 --- a/modules/worldengine/deps/acelite/ace/Local_Name_Space_T.cpp +++ /dev/null @@ -1,967 +0,0 @@ -#ifndef ACE_LOCAL_NAME_SPACE_T_CPP -#define ACE_LOCAL_NAME_SPACE_T_CPP - -#include "ace/ACE.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Local_Name_Space.h" -#include "ace/Auto_Ptr.h" -#include "ace/Guard_T.h" -#include "ace/OS_NS_regex.h" -#include "ace/OS_NS_string.h" -#include "ace/OS_NS_unistd.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -template -ACE_Name_Space_Map::ACE_Name_Space_Map (ALLOCATOR *alloc) - : MAP_MANAGER (alloc) -{ - ACE_TRACE ("ACE_Name_Space_Map::ACE_Name_Space_Map"); -} - -template int -ACE_Name_Space_Map::close (ALLOCATOR *alloc) -{ - ACE_TRACE ("ACE_Name_Space_Map::close"); - - this->table_allocator_ = alloc; - this->entry_allocator_ = alloc; - return this->close_i (); -} - -template int -ACE_Name_Space_Map::bind (const ACE_NS_String &ext_id, - const ACE_NS_Internal &int_id, - ALLOCATOR *alloc) -{ - ACE_TRACE ("ACE_Name_Space_Map::bind"); - - this->table_allocator_ = alloc; - this->entry_allocator_ = alloc; - return this->bind_i (ext_id, int_id); -} - -template int -ACE_Name_Space_Map::unbind (const ACE_NS_String &ext_id, - ACE_NS_Internal &int_id, - ALLOCATOR *alloc) -{ - ACE_TRACE ("ACE_Name_Space_Map::unbind"); - - this->table_allocator_ = alloc; - this->entry_allocator_ = alloc; - return this->unbind_i (ext_id, int_id); -} - -template int -ACE_Name_Space_Map::rebind (const ACE_NS_String &ext_id, - const ACE_NS_Internal &int_id, - ACE_NS_String &old_ext_id, - ACE_NS_Internal &old_int_id, - ALLOCATOR *alloc) -{ - ACE_TRACE ("ACE_Name_Space_Map::rebind"); - - this->table_allocator_ = alloc; - this->entry_allocator_ = alloc; - return this->rebind_i (ext_id, int_id, old_ext_id, old_int_id); -} - -template int -ACE_Name_Space_Map::find (const ACE_NS_String &ext_id, - ACE_NS_Internal &int_id, - ALLOCATOR *alloc) -{ - ACE_TRACE ("ACE_Name_Space_Map::find"); - - this->table_allocator_ = alloc; - this->entry_allocator_ = alloc; - return this->find_i (ext_id, int_id); -} - -#if defined (ACE_WIN32) -template int -ACE_Local_Name_Space::remap (EXCEPTION_POINTERS *ep) -{ - ACE_TRACE ("ACE_Local_Name_Space::remap"); - - void *addr = (void *) ep->ExceptionRecord->ExceptionInformation[1]; - - // The following requires Memory Pool to have ::remap() - // defined. Thus currently this will only work for - // ACE_MMap_Memory_Pool. - if (this->allocator_->alloc ().memory_pool ().remap (addr) == -1) - // Kick it upstairs... - return EXCEPTION_CONTINUE_SEARCH; - -#if __X86__ - // This is 80x86-specific. - ep->ContextRecord->Edi = (DWORD) addr; -#elif __MIPS__ - ep->ContextRecord->IntA0 = - ep->ContextRecord->IntV0 = (DWORD) addr; - ep->ContextRecord->IntT5 = ep->ContextRecord->IntA0 + 3; -#endif /* __X86__ */ - // Resume execution at the original point of "failure." - return EXCEPTION_CONTINUE_EXECUTION; -} -#endif /* ACE_WIN32 */ - -template int -ACE_Local_Name_Space::shared_bind ( - const ACE_NS_WString &name, - const ACE_NS_WString &value, - const char *type, - int rebind) -{ - // Note that we *must* use structured exception handling here - // because (1) we may need to commit virtual memory pages and (2) - // C++ exception handling doesn't support resumption. - int result = 0; - ACE_SEH_TRY - { - result = this->shared_bind_i (name, value, type, rebind); - } - ACE_SEH_EXCEPT (this->remap (GetExceptionInformation ())) - { - } - return result; -} - -template int -ACE_Local_Name_Space::shared_bind_i ( - const ACE_NS_WString &name, - const ACE_NS_WString &value, - const char *type, - int rebind) -{ - - ACE_TRACE ("ACE_Local_Name_Space::shared_bind_i"); - const size_t name_len = (name.length () + 1) * sizeof (ACE_WCHAR_T); - const size_t value_len = (value.length () + 1) * sizeof (ACE_WCHAR_T); - const size_t type_len = ACE_OS::strlen (type) + 1; - const size_t total_len = name_len + value_len + type_len; - char *ptr = (char *) this->allocator_->malloc (total_len); - - if (ptr == 0) - return -1; - else - { - // Note that the value_rep *must* come first to make sure we can - // retrieve this pointer later on in unbind(). - ACE_WCHAR_T *value_rep = (ACE_WCHAR_T *) (ptr); - ACE_WCHAR_T *name_rep = (ACE_WCHAR_T *) (ptr + value_len); - char *new_type = (char *) (ptr + value_len + name_len); - - ACE_Auto_Basic_Array_Ptr name_urep (name.rep ()); - ACE_Auto_Basic_Array_Ptr value_urep (value.rep ()); - ACE_NS_String new_name (name_rep, name_urep.get (), name_len); - ACE_NS_String new_value (value_rep, value_urep.get (), value_len); - - ACE_OS::strcpy (new_type, type); - ACE_NS_Internal new_internal (new_value, new_type); - int result = -1; - - if (rebind == 0) - { - // Do a normal bind. This will fail if there's already an - // with the same name. - result = this->name_space_map_->bind (new_name, - new_internal, - this->allocator_); - - if (result == 1) - { - // Entry already existed so bind failed. Free our - // dynamically allocated memory. - this->allocator_->free ((void *) ptr); - return result; - } - } - else - { - // Do a rebind. If there's already any entry, this will - // return the existing and and - // overwrite the existing name binding. - ACE_NS_String old_name; - ACE_NS_Internal old_internal; - - result = this->name_space_map_->rebind (new_name, new_internal, - old_name, old_internal, - this->allocator_); - if (result == 1) - { - // Free up the memory we allocated in shared_bind(). - // Note that this assumes that the "value" pointer comes - // first and that the value, name, and type are - // contiguously allocated (see above for details) - this->allocator_->free ((void *) (old_internal.value ()).fast_rep ()); - } - } - - if (result == -1) - // Free our dynamically allocated memory. - this->allocator_->free ((void *) ptr); - else - // If bind() or rebind() succeed, they will automatically sync - // up the map manager entry. However, we must sync up our - // name/value memory. - this->allocator_->sync (ptr, total_len); - - return result; - } -} - -template int -ACE_Local_Name_Space::unbind ( - const ACE_NS_WString &name) -{ - // Note that we *must* use structured exception handling here - // because (1) we may need to commit virtual memory pages and (2) - // C++ exception handling doesn't support resumption. - int result = 0; - ACE_SEH_TRY - { - result = this->unbind_i (name); - } - ACE_SEH_EXCEPT (this->remap (GetExceptionInformation ())) - { - } - return result; - -} - -template int -ACE_Local_Name_Space::unbind_i ( - const ACE_NS_WString &name) -{ - ACE_TRACE ("ACE_Local_Name_Space::unbind_i"); - - ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, *this->lock_, -1); - ACE_NS_String ns_name (name); - ACE_NS_Internal ns_internal; - if (this->name_space_map_->unbind (ns_name, - ns_internal, - this->allocator_) != 0) - return -1; - - // Free up the memory we allocated in shared_bind(). Note that this - // assumes that the "value" pointer comes first and that the value, - // name and type are contiguously allocated (see shared_bind() for - // details) - this->allocator_->free ((void *) (ns_internal.value ()).fast_rep ()); - return 0; -} - -template int -ACE_Local_Name_Space::bind ( - const ACE_NS_WString &name, - const ACE_NS_WString &value, - const char *type) -{ - ACE_TRACE ("ACE_Local_Name_Space::bind"); - ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, *this->lock_, -1); - - return this->shared_bind (name, value, type, 0); -} - -template int -ACE_Local_Name_Space::rebind ( - const ACE_NS_WString &name, - const ACE_NS_WString &value, - const char *type) -{ - ACE_TRACE ("ACE_Local_Name_Space::rebind"); - ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, *this->lock_, -1); - - return this->shared_bind (name, value, type, 1); -} - -template int -ACE_Local_Name_Space::resolve ( - const ACE_NS_WString &name, - ACE_NS_WString &value, - char *&type) -{ - // Note that we *must* use structured exception handling here - // because (1) we may need to commit virtual memory pages and (2) - // C++ exception handling doesn't support resumption. - int result = 0; - ACE_SEH_TRY - { - result = this->resolve_i (name, value, type); - } - ACE_SEH_EXCEPT (this->remap (GetExceptionInformation ())) - { - } - return result; -} - - -template int -ACE_Local_Name_Space::resolve_i ( - const ACE_NS_WString &name, - ACE_NS_WString &value, - char *&type) -{ - ACE_TRACE ("ACE_Local_Name_Space::resolve_i"); - ACE_READ_GUARD_RETURN (ACE_LOCK, ace_mon, *this->lock_, -1); - - ACE_NS_String ns_name (name); - ACE_NS_Internal ns_internal; - ACE_NS_String nbc_string; // Note the classy variable name! :) - - if (this->name_space_map_->find (ns_name, - ns_internal, - this->allocator_) != 0) - return -1; - - // Calls conversion operator and then calls the ACE_NS_WString - // assignment operator to get a fresh copy. (*#*(@#&!*@!!*@&( HP - // compiler causes us to add an extra copy explicitly !! :) - nbc_string = ns_internal.value (); - value = nbc_string; - - // Gets type and then the actual reprsentation which is a - // ACE_WCHAR_T - const char *temp = ns_internal.type (); - - size_t len = ACE_OS::strlen (ns_internal.type ()); - // Makes a copy here. Caller needs to call delete to free up - // memory. - char *new_type = 0; - ACE_NEW_RETURN (new_type, - char [len + 1], - -1); - - ACE_OS::strsncpy (new_type, temp, len + 1); - type = new_type; - return 0; -} - -template int -ACE_Local_Name_Space::open ( - ACE_Naming_Context::Context_Scope_Type scope_in) -{ - ACE_TRACE ("ACE_Local_Name_Space::open"); - this->ns_scope_ = scope_in; - - return this->create_manager (); -} - -template -ACE_Local_Name_Space::ACE_Local_Name_Space (void) - : allocator_ (0), - name_space_map_ (0), - name_options_ (0) -{ - ACE_TRACE ("ACE_Local_Name_Space::ACE_Local_Name_Space"); -} - -template -ACE_Local_Name_Space::ACE_Local_Name_Space ( - ACE_Naming_Context::Context_Scope_Type scope_in, - ACE_Name_Options *name_options) - : allocator_ (0), - name_space_map_ (0), - name_options_ (name_options), - lock_ (0) -{ - ACE_TRACE ("ACE_Local_Name_Space::ACE_Local_Name_Space"); - if (this->open (scope_in) == -1) - ACELIB_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("ACE_Local_Name_Space::ACE_Local_Name_Space"))); -} - -template -ACE_Local_Name_Space::~ACE_Local_Name_Space (void) -{ - ACE_TRACE ("ACE_Local_Name_Space::~ACE_Local_Name_Space"); - - // Remove the map. - delete this->allocator_; - delete this->lock_; -} - -template int -ACE_Local_Name_Space::create_manager (void) -{ - // Note that we *must* use structured exception handling here - // because (1) we may need to commit virtual memory pages and (2) - // C++ exception handling doesn't support resumption. - int result = 0; - ACE_SEH_TRY - { - result = this->create_manager_i (); - } - ACE_SEH_EXCEPT (this->remap (GetExceptionInformation ())) - { - } - return result; -} - - -template int -ACE_Local_Name_Space::create_manager_i (void) -{ - ACE_TRACE ("ACE_Local_Name_Space::create_manager_i"); - // Get directory name - const ACE_TCHAR *dir = this->name_options_->namespace_dir (); - const ACE_TCHAR *database = this->name_options_->database (); - - // Use process name as the file name. - size_t len = ACE_OS::strlen (dir); - len += ACE_OS::strlen (ACE_DIRECTORY_SEPARATOR_STR); - len += ACE_OS::strlen (database) + 1; - - if (len >= MAXNAMELEN + MAXPATHLEN) - { - errno = ENAMETOOLONG; - return -1; - } - - ACE_OS::strcpy (this->context_file_, dir); - ACE_OS::strcat (this->context_file_, ACE_DIRECTORY_SEPARATOR_STR); - ACE_OS::strcat (this->context_file_, database); - - ACE_MEM_POOL_OPTIONS options (this->name_options_->base_address ()); - - ACE_TCHAR lock_name_for_local_name_space [MAXNAMELEN + MAXPATHLEN]; - ACE_TCHAR lock_name_for_backing_store [MAXPATHLEN + MAXNAMELEN]; - const ACE_TCHAR *postfix = database; - - size_t length = 0; - length = sizeof lock_name_for_local_name_space / sizeof (ACE_TCHAR); - ACE_OS::strsncpy (lock_name_for_local_name_space, - dir, - length); - - ACE_OS::strncat (lock_name_for_local_name_space, - ACE_DIRECTORY_SEPARATOR_STR, - length - ACE_OS::strlen (lock_name_for_local_name_space)); - ACE_OS::strncat (lock_name_for_local_name_space, - ACE_TEXT ("name_space_"), - length - ACE_OS::strlen (lock_name_for_local_name_space)); - ACE_OS::strncat (lock_name_for_local_name_space, - postfix, - length - ACE_OS::strlen (lock_name_for_local_name_space)); - - length = sizeof lock_name_for_backing_store / sizeof (ACE_TCHAR); - ACE_OS::strsncpy (lock_name_for_backing_store, - dir, - length); - ACE_OS::strncat (lock_name_for_backing_store, - ACE_DIRECTORY_SEPARATOR_STR, - length - ACE_OS::strlen (lock_name_for_backing_store)); - ACE_OS::strncat (lock_name_for_backing_store, - ACE_TEXT ("backing_store_"), - length - ACE_OS::strlen (lock_name_for_backing_store)); - ACE_OS::strncat (lock_name_for_backing_store, - postfix, - length - ACE_OS::strlen (ACE_TEXT ("backing_store_"))); - - // Create the allocator with the appropriate options. - ACE_NEW_RETURN (this->allocator_, - ALLOCATOR (this->context_file_, - lock_name_for_backing_store, - &options), -1); - - if (ACE_LOG_MSG->op_status ()) - ACELIB_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("Allocator::Allocator\n")), - -1); - - ACE_NEW_RETURN (this->lock_, - ACE_LOCK (lock_name_for_local_name_space), - -1); - -#if !defined (ACE_LACKS_ACCESS) - // Now check if the backing store has been created successfully - if (ACE_OS::access (this->context_file_, F_OK) != 0) - ACELIB_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("create_manager\n")), - -1); -#endif /* ACE_LACKS_ACCESS */ - - void *ns_map = 0; - - // This is the easy case since if we find the Name Server Map - // Manager we know it's already initialized. - if (this->allocator_->find (ACE_NAME_SERVER_MAP, ns_map) == 0) - { - this->name_space_map_ = (ACE_Name_Space_Map *) ns_map; - if (ACE::debug ()) - ACELIB_DEBUG ((LM_DEBUG, - ACE_TEXT ("name_space_map_ = %@, ns_map = %@\n"), - this->name_space_map_, ns_map)); - } - - // This is the hard part since we have to avoid potential race - // conditions... We will use the double check here - else - { - ACE_GUARD_RETURN (ACE_LOCK, ace_mon, *this->lock_, -1); - - // This is the easy case since if we find the Name Server Map - // Manager we know it's already initialized. - if (this->allocator_->find (ACE_NAME_SERVER_MAP, ns_map) == 0) - { - this->name_space_map_ = (ACE_Name_Space_Map *) ns_map; - if (ACE::debug ()) - ACELIB_DEBUG ((LM_DEBUG, - ACE_TEXT ("name_space_map_ = %@, ns_map = %@\n"), - this->name_space_map_, ns_map)); - } - else - { - size_t map_size = sizeof *this->name_space_map_; - ns_map = this->allocator_->malloc (map_size); - - // Initialize the map into its memory location (e.g., shared memory). - this->name_space_map_ = - new (ns_map) ACE_Name_Space_Map (this->allocator_); - - if (this->allocator_->bind (ACE_NAME_SERVER_MAP, ns_map) == -1) - ACELIB_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("create_manager\n")), -1); - } - - if (ACE::debug ()) - ACELIB_DEBUG ((LM_DEBUG, - ACE_TEXT ("name_space_map_ = %@, ns_map = %@\n"), - this->name_space_map_, ns_map)); - } - - return 0; -} - -template int -ACE_Local_Name_Space::list_names_i ( - ACE_WSTRING_SET &set, - const ACE_NS_WString &pattern) -{ - ACE_TRACE ("ACE_Local_Name_Space::list_names_i"); - ACE_READ_GUARD_RETURN (ACE_LOCK, ace_mon, *this->lock_, -1); - - MAP_MANAGER::ITERATOR map_iterator (*this->name_space_map_); - MAP_MANAGER::ENTRY *map_entry; - - int result = 1; - - for (map_entry = 0; - map_iterator.next (map_entry) != 0; - map_iterator.advance()) - { - if (map_entry->ext_id_.strstr (pattern) != -1) - { - ACE_NS_WString entry (map_entry->ext_id_ ); - - if (set.insert (entry) == -1) - { - result = -1; - break; - } - else - result = 0; - } - } - - return result; -} - -template int -ACE_Local_Name_Space::list_values_i ( - ACE_WSTRING_SET &set, - const ACE_NS_WString &pattern) -{ - ACE_TRACE ("ACE_Local_Name_Space::list_values_i"); - ACE_READ_GUARD_RETURN (ACE_LOCK, ace_mon, *this->lock_, -1); - - MAP_MANAGER::ITERATOR map_iterator (*this->name_space_map_); - MAP_MANAGER::ENTRY *map_entry; - - int result = 1; - - for (map_entry = 0; - map_iterator.next (map_entry) != 0; - map_iterator.advance ()) - { - if (map_entry->int_id_.value ().strstr (pattern) != -1) - { - ACE_NS_WString entry (map_entry->int_id_.value ()); - - if (set.insert (entry) == -1) - { - result = -1; - break; - } - else - result = 0; - } - } - - return result; -} - -template int -ACE_Local_Name_Space::list_types_i ( - ACE_WSTRING_SET &set, - const ACE_NS_WString &pattern) -{ - ACE_TRACE ("ACE_Local_Name_Space::list_types_i"); - ACE_READ_GUARD_RETURN (ACE_LOCK, ace_mon, *this->lock_, -1); - - MAP_MANAGER::ITERATOR map_iterator (*this->name_space_map_); - MAP_MANAGER::ENTRY *map_entry; - - char *compiled_regexp = 0; - - // Note that char_rep() allocates memory so we need to delete it - char *pattern_rep = pattern.char_rep (); - - // Check for wildcard case first. - if (ACE_OS::strcmp ("", pattern_rep) == 0) - ACE_ALLOCATOR_RETURN (compiled_regexp, - ACE_OS::strdup (""), - -1); - else - // Compile the regular expression (the 0's cause ACE_OS::compile - // to allocate space). -#if defined (ACE_HAS_REGEX) - compiled_regexp = ACE_OS::compile (pattern_rep, 0, 0); -#else - // If we don't have regular expressions just use the pattern - // directly. - compiled_regexp = pattern_rep; -#endif /* ACE_HAS_REGEX */ - - int result = 1; - - for (map_entry = 0; - map_iterator.next (map_entry) != 0; - map_iterator.advance ()) - { - // Get the type - const char *type = map_entry->int_id_.type (); - - // Everything matches the wildcard. - if (ACE_OS::strcmp ("", pattern_rep) == 0 -#if defined (ACE_HAS_REGEX) - || ACE_OS::step (type, compiled_regexp) != 0) -#else - // If we don't have regular expressions just use strstr() for - // substring matching. - || ACE_OS::strstr (type, compiled_regexp) != 0) -#endif /* ACE_HAS_REGEX */ - - { - ACE_NS_WString entry (type); - - if (set.insert (entry) == -1) - { - result = -1; - break; - } - else - result = 0; - } - } -#if defined (ACE_HAS_REGEX) - if (compiled_regexp) - ACE_OS::free ((void *) compiled_regexp); -#endif /* ACE_HAS_REGEX */ - delete [] pattern_rep; // delete pattern_rep; - return result; -} - -template int -ACE_Local_Name_Space ::list_name_entries_i ( - ACE_BINDING_SET &set, - const ACE_NS_WString &pattern) -{ - ACE_TRACE ("ACE_Local_Name_Space::list_name_entries_i"); - ACE_READ_GUARD_RETURN (ACE_LOCK, ace_mon, *this->lock_, -1); - - MAP_MANAGER::ITERATOR map_iterator (*this->name_space_map_); - MAP_MANAGER::ENTRY *map_entry; - - for (map_entry = 0; - map_iterator.next (map_entry) != 0; - map_iterator.advance()) - { - if (map_entry->ext_id_.strstr (pattern) != -1) - { - ACE_Name_Binding entry (map_entry->ext_id_, - map_entry->int_id_.value (), - map_entry->int_id_.type ()); - - if (set.insert (entry) == -1) - return -1; - } - } - - return 0; -} - -template int -ACE_Local_Name_Space::list_value_entries_i ( - ACE_BINDING_SET &set, - const ACE_NS_WString &pattern) -{ - ACE_TRACE ("ACE_Local_Name_Space::list_value_entries_i"); - ACE_READ_GUARD_RETURN (ACE_LOCK, ace_mon, *this->lock_, -1); - - MAP_MANAGER::ITERATOR map_iterator (*this->name_space_map_); - MAP_MANAGER::ENTRY *map_entry; - - for (map_entry = 0; - map_iterator.next (map_entry) != 0; - map_iterator.advance ()) - { - if (map_entry->int_id_.value ().strstr (pattern) != -1) - { - ACE_Name_Binding entry (map_entry->ext_id_, - map_entry->int_id_.value (), - map_entry->int_id_.type ()); - - if (set.insert (entry) == -1) - return -1; - } - } - return 0; -} - -template int -ACE_Local_Name_Space::list_type_entries_i ( - ACE_BINDING_SET &set, - const ACE_NS_WString &pattern) -{ - ACE_TRACE ("ACE_Local_Name_Space::list_type_entries_i"); - ACE_READ_GUARD_RETURN (ACE_LOCK, ace_mon, *this->lock_, -1); - - MAP_MANAGER::ITERATOR map_iterator (*this->name_space_map_); - MAP_MANAGER::ENTRY *map_entry; - - char *compiled_regexp = 0; - // Note that char_rep() allocates memory so we need to delete it - char *pattern_rep = pattern.char_rep (); - - // Check for wildcard case first. - if (ACE_OS::strcmp ("", pattern_rep) == 0) - compiled_regexp = ACE_OS::strdup (""); - else - // Compile the regular expression (the 0's cause ACE_OS::compile - // to allocate space). -#if defined (ACE_HAS_REGEX) - compiled_regexp = ACE_OS::compile (pattern_rep, 0, 0); -#else /* If we don't have regular expressions just the pattern - directly. */ - compiled_regexp = pattern_rep; -#endif /* ACE_HAS_REGEX */ - - for (map_entry = 0; - map_iterator.next (map_entry) != 0; - map_iterator.advance ()) - { - // Get the type. - const char *type = map_entry->int_id_.type (); - - if (ACE_OS::strcmp ("", pattern_rep) == 0 // Everything matches - // the wildcard. -#if defined (ACE_HAS_REGEX) - || ACE_OS::step (type, compiled_regexp) != 0) -#else /* If we don't have regular expressions just use strstr() for - substring matching. */ - || ACE_OS::strstr (type, compiled_regexp) != 0) -#endif /* ACE_HAS_REGEX */ - { - ACE_Name_Binding entry (map_entry->ext_id_, - map_entry->int_id_.value (), - map_entry->int_id_.type ()); - - if (set.insert (entry) == -1) - return -1; - } - } -#if defined (ACE_HAS_REGEX) - if (compiled_regexp) - ACE_OS::free ((void *) compiled_regexp); -#endif /* ACE_HAS_REGEX */ - delete [] pattern_rep; // delete pattern_rep; - return 0; -} - -template void -ACE_Local_Name_Space::dump_i (void) const -{ - ACE_TRACE ("ACE_Local_Name_Space::dump_i"); - - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - - MAP_MANAGER::ITERATOR map_iterator (*this->name_space_map_); - MAP_MANAGER::ENTRY *map_entry; - - for (map_entry = 0; - map_iterator.next (map_entry) != 0; - map_iterator.advance()) - { - char *key = map_entry->ext_id_.char_rep (); - char *value = map_entry->int_id_.value ().char_rep (); -#if !defined (ACE_NLOGGING) - const char *type = map_entry->int_id_.type (); -#endif /* ! ACE_NLOGGING */ - - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("key=%C\nvalue=%C\ntype=%C\n"), - key, value, type)); - // We need to delete key and value since char_rep allocates - // memory for them - delete [] key; - delete [] value; - } - - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -} - -template int -ACE_Local_Name_Space::list_names ( - ACE_WSTRING_SET &set, - const ACE_NS_WString &pattern) -{ - // Note that we *must* use structured exception handling here - // because (1) we may need to commit virtual memory pages and (2) - // C++ exception handling doesn't support resumption. - int result = 0; - ACE_SEH_TRY - { - result = this->list_names_i (set, pattern); - } - ACE_SEH_EXCEPT (this->remap (GetExceptionInformation ())) - { - } - return result; -} - -template int -ACE_Local_Name_Space::list_values ( - ACE_WSTRING_SET &set, - const ACE_NS_WString &pattern) -{ - // Note that we *must* use structured exception handling here - // because (1) we may need to commit virtual memory pages and (2) - // C++ exception handling doesn't support resumption. - int result = 0; - ACE_SEH_TRY - { - result = this->list_values_i (set, pattern); - } - ACE_SEH_EXCEPT (this->remap (GetExceptionInformation ())) - { - } - return result; -} - -template int -ACE_Local_Name_Space::list_types ( - ACE_WSTRING_SET &set, - const ACE_NS_WString &pattern) -{ - // Note that we *must* use structured exception handling here - // because (1) we may need to commit virtual memory pages and (2) - // C++ exception handling doesn't support resumption. - int result = 0; - ACE_SEH_TRY - { - result = this->list_types_i (set, pattern); - } - ACE_SEH_EXCEPT (this->remap (GetExceptionInformation ())) - { - } - return result; -} - -template int -ACE_Local_Name_Space ::list_name_entries ( - ACE_BINDING_SET &set, - const ACE_NS_WString &pattern) -{ - // Note that we *must* use structured exception handling here - // because (1) we may need to commit virtual memory pages and (2) - // C++ exception handling doesn't support resumption. - int result = 0; - ACE_SEH_TRY - { - result = this->list_name_entries_i (set, pattern); - } - ACE_SEH_EXCEPT (this->remap (GetExceptionInformation ())) - { - } - return result; -} - -template int -ACE_Local_Name_Space::list_value_entries ( - ACE_BINDING_SET &set, - const ACE_NS_WString &pattern) -{ - // Note that we *must* use structured exception handling here - // because (1) we may need to commit virtual memory pages and (2) - // C++ exception handling doesn't support resumption. - int result = 0; - ACE_SEH_TRY - { - result = this->list_value_entries_i (set, pattern); - } - ACE_SEH_EXCEPT (this->remap (GetExceptionInformation ())) - { - } - return result; -} - -template int -ACE_Local_Name_Space::list_type_entries ( - ACE_BINDING_SET &set, - const ACE_NS_WString &pattern) -{ - // Note that we *must* use structured exception handling here - // because (1) we may need to commit virtual memory pages and (2) - // C++ exception handling doesn't support resumption. - int result = 0; - ACE_SEH_TRY - { - result = this->list_type_entries_i (set, pattern); - } - ACE_SEH_EXCEPT (this->remap (GetExceptionInformation ())) - { - } - return result; -} - -template void -ACE_Local_Name_Space::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - // Note that we *must* use structured exception handling here - // because (1) we may need to commit virtual memory pages and (2) - // C++ exception handling doesn't support resumption. - - // This should really be a const cast - ACE_Local_Name_Space *fake_this = - (ACE_Local_Name_Space *) this; - ACE_UNUSED_ARG (fake_this); - - ACE_SEH_TRY - { - this->dump_i (); - } - ACE_SEH_EXCEPT (fake_this->remap (GetExceptionInformation ())) - { - } -#endif /* ACE_HAS_DUMP */ -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_LOCAL_NAME_SPACE_T_CPP */ diff --git a/modules/worldengine/deps/acelite/ace/Local_Name_Space_T.h b/modules/worldengine/deps/acelite/ace/Local_Name_Space_T.h deleted file mode 100644 index 13d533771b..0000000000 --- a/modules/worldengine/deps/acelite/ace/Local_Name_Space_T.h +++ /dev/null @@ -1,265 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Local_Name_Space_T.h - * - * @author Prashant Jain - * @author Irfan Pyarali and - * @author Douglas C. Schmidt - */ -//============================================================================= - -#ifndef ACE_LOCAL_NAME_SPACE_T_H -#define ACE_LOCAL_NAME_SPACE_T_H -#include /**/ "ace/pre.h" - -#include "ace/Name_Space.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Naming_Context.h" -#include "ace/SString.h" -#include "ace/Local_Name_Space.h" -#include "ace/Null_Mutex.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/// A short-hand name for our set of name/value/type tuples passed back -/// to callers. -typedef ACE_Unbounded_Set ACE_WSTRING_SET; - -ACE_END_VERSIONED_NAMESPACE_DECL - -# include "ace/Hash_Map_Manager_T.h" -ACE_BEGIN_VERSIONED_NAMESPACE_DECL -typedef ACE_Hash_Map_Manager_Ex, ACE_Equal_To, ACE_Null_Mutex> MAP_MANAGER; -ACE_END_VERSIONED_NAMESPACE_DECL - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_Name_Space_Map - * - * @brief This class serves as a Proxy that ensures our process always - * has the appropriate allocator in place for every operation - * that accesses or updates the Map Manager. - * - * We need this class because otherwise the ALLOCATOR - * pointer will be stored in the Map_Manager that resides within - * shared memory. Naturally, this will cause horrible problems - * since only the first process to set that pointer will be - * guaranteed the address of the ALLOCATOR is meaningful! - */ -template -class ACE_Name_Space_Map : public MAP_MANAGER -{ -public: - /// Constructor. - ACE_Name_Space_Map (ALLOCATOR *alloc); - - // = The following methods are Proxies to the underlying methods - // provided by ACE_Hash_Map_Manager. When they are called, they - // acquire the lock, set the allocator to the one specific to this - // process, and then call down to perform the intended operation. - int bind (const ACE_NS_String &, - const ACE_NS_Internal &, - ALLOCATOR *alloc); - - int unbind (const ACE_NS_String &, - ACE_NS_Internal &, - ALLOCATOR *alloc); - - int rebind (const ACE_NS_String &, - const ACE_NS_Internal &, - ACE_NS_String &, - ACE_NS_Internal &, - ALLOCATOR *alloc); - - int find (const ACE_NS_String &, - ACE_NS_Internal &, - ALLOCATOR *alloc); - - int close (ALLOCATOR *alloc); -}; - -/** - * @class ACE_Local_Name_Space - * - * @brief Maintaining accesses Local Name Server Database. Allows to - * add NameBindings, change them, remove them and resolve - * NameBindings. - * - * Manages a Naming Service for a local name space which - * includes bindings for node_local and host_local naming - * contexts. All strings are stored in wide character format. - * A Name Binding consists of a name (that's the key), a value - * string and an optional type string (no wide chars). - */ -template -class ACE_Local_Name_Space : public ACE_Name_Space -{ -public: - // = Initialization and termination methods. - /// "Do-nothing" constructor. - ACE_Local_Name_Space (void); - - /** - * Specifies the scope of this namespace, opens and memory-maps the - * associated file (if accessible) or contacts the dedicated name - * server process for NET_LOCAL namespace. - */ - ACE_Local_Name_Space (ACE_Naming_Context::Context_Scope_Type scope_in, - ACE_Name_Options *name_options); - - /** - * Specifies the scope of this namespace, opens and memory-maps the - * associated file (if accessible) or contacts the dedicated name - * server process for NET_LOCAL namespace. - */ - int open (ACE_Naming_Context::Context_Scope_Type scope_in); - - /// Destructor, do some cleanup :TBD: last dtor should "compress" - /// file - ~ACE_Local_Name_Space (void); - - /// Bind a new name to a naming context (Wide character strings). - virtual int bind (const ACE_NS_WString &name, - const ACE_NS_WString &value, - const char *type = ""); - - /** - * Overwrite the value or type of an existing name in a - * ACE_Local_Name_Space or bind a new name to the context, if it - * didn't exist yet. (Wide character strings interface). - */ - virtual int rebind (const ACE_NS_WString &name, - const ACE_NS_WString &value, - const char *type = ""); - - /// Delete a name from a ACE_Local_Name_Space (Wide character strings - /// Interface). - virtual int unbind (const ACE_NS_WString &name); - virtual int unbind_i (const ACE_NS_WString &name); - - /// Get value and type of a given name binding (Wide chars). The - /// caller is responsible for deleting @a type! - virtual int resolve (const ACE_NS_WString &name, - ACE_NS_WString &value, - char *&type); - virtual int resolve_i (const ACE_NS_WString &name, - ACE_NS_WString &value, - char *&type); - - /// Get a set of names matching a specified pattern (wchars). Matching - /// means the names must begin with the pattern string. - virtual int list_names (ACE_WSTRING_SET &set, - const ACE_NS_WString &pattern); - virtual int list_names_i (ACE_WSTRING_SET &set, - const ACE_NS_WString &pattern); - - /// Get a set of values matching a specified pattern (wchars). Matching - /// means the values must begin with the pattern string. - virtual int list_values (ACE_WSTRING_SET &set, - const ACE_NS_WString &pattern); - virtual int list_values_i (ACE_WSTRING_SET &set, - const ACE_NS_WString &pattern); - - /// Get a set of types matching a specified pattern (wchars). Matching - /// means the types must begin with the pattern string. - virtual int list_types (ACE_WSTRING_SET &set, - const ACE_NS_WString &pattern); - virtual int list_types_i (ACE_WSTRING_SET &set, - const ACE_NS_WString &pattern); - - /** - * Get a set of names matching a specified pattern (wchars). Matching - * means the names must begin with the pattern string. Returns the - * complete binding associated each pattern match. - */ - virtual int list_name_entries (ACE_BINDING_SET &set, - const ACE_NS_WString &pattern); - virtual int list_name_entries_i (ACE_BINDING_SET &set, - const ACE_NS_WString &pattern); - - /** - * Get a set of values matching a specified pattern (wchars). Matching - * means the values must begin with the pattern string. Returns the - * complete binding associated each pattern match. - */ - virtual int list_value_entries (ACE_BINDING_SET &set, - const ACE_NS_WString &pattern); - virtual int list_value_entries_i (ACE_BINDING_SET &set, - const ACE_NS_WString &pattern); - - /** - * Get a set of types matching a specified pattern (wchars). Matching - * means the types must begin with the pattern string. Returns the - * complete binding associated each pattern match. - */ - virtual int list_type_entries (ACE_BINDING_SET &set, - const ACE_NS_WString &pattern); - virtual int list_type_entries_i (ACE_BINDING_SET &set, - const ACE_NS_WString &pattern); - - /// Dump the state of the object - virtual void dump (void) const; - virtual void dump_i (void) const; - - // = I just know this is going to cause problems on some platform... - typedef ACE_Allocator_Adapter > - ALLOCATOR; - -private: -#if defined (ACE_WIN32) - /// Remap the backing store - int remap (EXCEPTION_POINTERS *ep); -#endif /* ACE_WIN32 */ - - /// Factor out code from bind() and rebind(). - int shared_bind (const ACE_NS_WString &name, - const ACE_NS_WString &value, - const char *type, int rebind); - int shared_bind_i (const ACE_NS_WString &name, - const ACE_NS_WString &value, - const char *type, int rebind); - - /// Allocate the appropriate type of map manager that stores the - /// key/value binding. - int create_manager (void); - int create_manager_i (void); - - /// Pointer to the allocator - ALLOCATOR *allocator_; - - /// Pointer to the allocated map manager. - ACE_Name_Space_Map *name_space_map_; - - /// Scope of this naming context (e.g., PROC_LOCAL, NODE_LOCAL, or - /// NET_LOCAL). - ACE_Naming_Context::Context_Scope_Type ns_scope_; - - /// Keep track of the options such as database name etc - ACE_Name_Options *name_options_; - - /// Name of the file used as the backing store. - ACE_TCHAR context_file_[MAXPATHLEN + MAXNAMELEN]; - - /// Synchronization variable. - ACE_LOCK *lock_; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "ace/Local_Name_Space_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Local_Name_Space_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ - -#include /**/ "ace/post.h" -#endif /* ACE_LOCAL_NAME_SPACE_T_H */ diff --git a/modules/worldengine/deps/acelite/ace/Local_Tokens.cpp b/modules/worldengine/deps/acelite/ace/Local_Tokens.cpp deleted file mode 100644 index 7a1ebe981f..0000000000 --- a/modules/worldengine/deps/acelite/ace/Local_Tokens.cpp +++ /dev/null @@ -1,1617 +0,0 @@ -#include "ace/Local_Tokens.h" - -#if defined (ACE_HAS_TOKENS_LIBRARY) - -#include "ace/Thread.h" -#include "ace/Token_Manager.h" -#include "ace/OS_NS_unistd.h" - -#if !defined (__ACE_INLINE__) -#include "ace/Local_Tokens.inl" -#endif /* __ACE_INLINE__ */ - - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -void -ACE_Tokens::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_Tokens::dump"); - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_Tokens::dump:\n") - ACE_TEXT (" reference_cont_ = %d\n") - ACE_TEXT (" token_name_ = %s\n"), - reference_count_, token_name_)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("waiters_\n"))); - this->waiters_.dump (); - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} - -ACE_Tokens::ACE_Tokens (void) - : visited_ (0), - reference_count_ (0) -{ - ACE_TRACE ("ACE_Tokens::ACE_Tokens"); -} - -ACE_Tokens::~ACE_Tokens (void) -{ -} - -void -ACE_Tokens::make_owner (ACE_TPQ_Entry *caller) -{ - this->waiters_.remove (caller); - this->waiters_.enqueue (caller, 0); -} - -ACE_Token_Proxy_Queue * -ACE_Tokens::waiters () -{ - ACE_TRACE ("ACE_Tokens::waiters"); - return &this->waiters_; -} - -int -ACE_Tokens::no_of_waiters () -{ - ACE_TRACE ("ACE_Tokens::no_of_waiters"); - return this->waiters_.size (); -} - -#if defined (ACE_LACKS_INLINE_FUNCTIONS) -ACE_Null_Token::ACE_Null_Token (void) -{ -} - -ACE_Null_Token::~ACE_Null_Token (void) -{ -} -#endif /* ACE_LACKS_INLINE_FUNCTIONS */ - -void -ACE_TPQ_Entry::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_TPQ_Entry::dump"); - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - ACELIB_DEBUG ((LM_DEBUG, - ACE_TEXT ("ACE_TPQ_Entry::dump:\n") - ACE_TEXT (" nesting_level_ = %d\n") - ACE_TEXT (" client_id_ = %s\n"), - nesting_level_, - client_id_)); - - if (next_ != 0) - { - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("next:.\n"))); - next_->dump (); - } - - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_TPQ_Entry::dump end.\n"))); - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} - -ACE_TPQ_Entry::ACE_TPQ_Entry (const ACE_Token_Proxy *new_proxy, - const ACE_TCHAR *client_id) - : cond_var_ (lock_), - next_ (0), - // This const typecast is safe. - proxy_ ((ACE_Token_Proxy *) new_proxy), - nesting_level_ (0), - sleep_hook_ (0) -{ - ACE_TRACE ("ACE_TPQ_Entry::ACE_TPQ_Entry"); - - if (client_id != 0) - this->client_id (client_id); - else - { - // Just make sure we have enough space. - ACE_TCHAR host_name[MAXHOSTNAMELEN]; - ACE_TCHAR name[(sizeof host_name / sizeof (ACE_TCHAR)) + 256]; - ACE_OS::hostname (host_name, sizeof host_name); - - ACE_thread_t thread_id = ACE_Thread::self (); - - // The cast is an attempt to get this to compile (and run, - // hopefully) regardless of the type of ACE_thread_t. - ACE_OS::sprintf (name, - ACE_TEXT ("/%s/%u/%lu"), - host_name, - static_cast (ACE_OS::getpid ()), - *reinterpret_cast (&thread_id)); - - this->client_id (name); - } -} - -ACE_TPQ_Entry::ACE_TPQ_Entry (void) - : cond_var_ (lock_), - proxy_ (0), - nesting_level_ (0), - sleep_hook_ (0) -{ - ACE_TRACE ("ACE_TPQ_Entry::ACE_TPQ_Entry null const."); -} - -ACE_TPQ_Entry::ACE_TPQ_Entry (const ACE_TPQ_Entry &rhs) -: cond_var_ (lock_) -{ - ACE_TRACE ("ACE_TPQ_Entry::ACE_TPQ_Entry copy const."); - *this = rhs; -} - -ACE_TPQ_Entry::~ACE_TPQ_Entry (void) -{ - ACE_TRACE ("ACE_TPQ_Entry::~ACE_TPQ_Entry"); -} - -void -ACE_TPQ_Entry::operator= (const ACE_TPQ_Entry& rhs) -{ - ACE_TRACE ("ACE_TPQ_Entry::operator="); - if (&rhs == this) - return; - this->proxy_ = rhs.proxy (); - this->nesting_level_ = rhs.nesting_level (); - this->client_id (rhs.client_id ()); - this->sleep_hook_ = rhs.sleep_hook (); -} - -void -ACE_TPQ_Entry::client_id (const ACE_TCHAR *id) -{ - ACE_TRACE ("ACE_TPQ_Entry::client_id"); - - if (id == 0) - return; - - ACE_OS::strsncpy (this->client_id_, - (ACE_TCHAR *) id, - ACE_MAXCLIENTIDLEN); -} - -ACE_TSS_TPQ_Entry::~ACE_TSS_TPQ_Entry (void) -{ -} - -void -ACE_TSS_TPQ_Entry::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_TSS_TPQ_Entry::dump"); - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_TSS_TPQ_Entry::dump:\n") - ACE_TEXT (" client_id_ = %s\n"), - client_id_ == 0 ? ACE_TEXT ("0") : client_id_)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("base:\n"))); - ACE_TPQ_ENTRY::dump (); - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} - -ACE_TSS_TPQ_Entry::ACE_TSS_TPQ_Entry (const ACE_Token_Proxy *proxy, - const ACE_TCHAR *client_id) -: proxy_ (proxy), - client_id_ (client_id) -{ - ACE_TRACE ("ACE_TSS_TPQ_Entry::ACE_TSS_TPQ_Entry"); -} - -ACE_TPQ_Entry * -ACE_TSS_TPQ_Entry::make_TSS_TYPE (void) const -{ - ACE_TRACE ("ACE_TSS_TPQ_Entry::make_TSS_TYPE"); - ACE_TPQ_Entry *temp; - - ACE_NEW_RETURN (temp, - ACE_TPQ_Entry (this->proxy_, - this->client_id_), - 0); - return temp; -} - -ACE_TSS_TPQ_Entry::operator ACE_TPQ_Entry * (void) -{ -#if !defined (ACE_NO_TSS_TOKENS) - return (ACE_TPQ_Entry *) (*((ACE_TSS *) this)); -#else - // Not sure this is the right thing to do, but it seems to work. - // The base class ALSO has a proxy_ and client_id_ members (weird?) - // which don't get initialised. The following two lines make this - // the same as the subclass, so that the slicing works . - ACE_TPQ_ENTRY::proxy ((ACE_Token_Proxy *)(this->proxy_)); - ACE_TPQ_ENTRY::client_id (this->client_id_); - return (ACE_TPQ_Entry *) this;; -#endif /* !ACE_NO_TSS_TOKENS */ -} - -ACE_TPQ_Iterator::ACE_TPQ_Iterator (ACE_Token_Proxy_Queue &q) - : current_ (q.head_) -{ - ACE_TRACE ("ACE_TPQ_Iterator::ACE_TPQ_Iterator"); -} - -int -ACE_TPQ_Iterator::next (ACE_TPQ_Entry *&next_item) -{ - ACE_TRACE ("ACE_TPQ_Iterator::next"); - - next_item = this->current_; - - return current_ != 0; -} - -int -ACE_TPQ_Iterator::done (void) const -{ - ACE_TRACE ("ACE_TPQ_Iterator::done"); - - return this->current_ == 0; -} - -void -ACE_TPQ_Iterator::advance (void) -{ - ACE_TRACE ("ACE_TPQ_Iterator::advance"); - - if (current_ != 0) - this->current_ = this->current_->next_; -} - -void -ACE_TPQ_Iterator::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_TPQ_Iterator::dump"); - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_TPQ_Iterator::dump:\n") - ACE_TEXT (" current_ = %d\n"), - (long) this->current_)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("head_ and tail_\n"))); - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} - -void -ACE_Token_Proxy_Queue::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_Token_Proxy_Queue::dump"); - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_Token_Proxy_Queue::dump:\n") - ACE_TEXT (" size_ = %d\n"), - size_)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("head_ and tail_\n"))); - if (this->head_ != 0) - this->head_->dump (); - - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_Token_Proxy_Queue::dump end.\n"))); - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} - -ACE_Token_Proxy_Queue::ACE_Token_Proxy_Queue (void) - : head_ (0), - tail_ (0), - size_ (0) -{ - ACE_TRACE ("ACE_Token_Proxy_Queue::ACE_Token_Proxy_Queue"); -} - -void -ACE_Token_Proxy_Queue::enqueue (ACE_TPQ_Entry *tpq, - int position) -{ - ACE_TRACE ("ACE_Token_Proxy_Queue::enqueue"); - tpq->next_ = 0; - - ++this->size_; - - if (this->head_ == 0) - { - // make tpq the entire list - this->head_ = this->tail_ = tpq; - return; - } - - if (position == 0) - { - // make head of list - tpq->next_ = this->head_; - this->head_ = tpq; - return; - } - - if (position == -1) - { - // stick at back of list - this->tail_->next_ = tpq; - this->tail_ = tpq; - return; - } - - // walk through list to insertion point - ACE_TPQ_Entry *temp = head_; - - for (int x = position; - x > 1; - --x) - { - // end of queue? - if (temp->next_ == 0) - break; - // advance pointer - else - temp = temp->next_; - } - - // insert new tpq after temp - tpq->next_ = temp->next_; - temp->next_ = tpq; -} - -void -ACE_Token_Proxy_Queue::dequeue (void) -{ - ACE_TRACE ("ACE_Token_Proxy_Queue::dequeue"); - - if (head_ == 0) - return; - - ACE_TPQ_Entry *temp = this->head_; - - this->head_ = this->head_->next_; - - temp->next_ = 0; - - --this->size_; - - if (this->head_ == 0 && this->size_ != 0) - ACELIB_ERROR ((LM_ERROR, - ACE_TEXT ("incorrect size = %d\n"), - this->size_)); -} - -/* -int -ACE_Token_Proxy_Queue::member (const ACE_TCHAR *id) -{ - ACE_TRACE ("ACE_Token_Proxy_Queue::member"); - - for (ACE_TPQ_Entry *temp = this->head_; - temp != 0; - temp = temp->next_) - if (ACE_OS::strcmp (temp->client_id (), id) == 0) - // We found it! - return 1; - - // We didn't find it :-( - return 0; -} -*/ - -void -ACE_Token_Proxy_Queue::remove (const ACE_TPQ_Entry *remove_me) -{ - ACE_TRACE ("ACE_Token_Proxy_Queue::remove"); - // sanity - if ((remove_me == 0) || (this->head_ == 0)) - return; - - // is it the head? - if (this->head_ == remove_me) // pointer comparison. - { - this->head_ = this->head_->next_; - if (this->head_ == 0) - this->tail_ = 0; - - --this->size_; - return; - } - - ACE_TPQ_Entry *temp = this->head_; - ACE_TPQ_Entry *previous = 0; - - // is it in the middle or tail? - while (temp != 0) - { - if (temp == remove_me) - { - // previous should never be null since the first if - // conditional should always be false - previous->next_ = temp->next_; - // is it the tail? - if (this->tail_ == temp) - this->tail_ = previous; - - --this->size_; - return; - } - - previous = temp; - temp = temp->next_; - } - - // it wasn't in the list. - return; -} - -void -ACE_Mutex_Token::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_Mutex_Token::dump"); - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_Mutex_Token::dump:\n"))); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("lock_\n"))); - lock_.dump (); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("base:\n"))); - ACE_Tokens::dump (); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_Mutex_Token::dump end.\n"))); - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} - -ACE_Mutex_Token::ACE_Mutex_Token (const ACE_TCHAR *name) -{ - ACE_TRACE ("ACE_Mutex_Token::ACE_Mutex_Token"); - - ACE_OS::strsncpy (this->token_name_, - name, - ACE_MAXTOKENNAMELEN); -} - -ACE_Mutex_Token::~ACE_Mutex_Token (void) -{ - ACE_TRACE ("ACE_Mutex_Token::~ACE_Mutex_Token"); -} - -int -ACE_Mutex_Token::acquire (ACE_TPQ_Entry *caller, - int ignore_deadlock, - int notify) -{ - ACE_TRACE ("ACE_Mutex_Token::acquire"); - // We need to acquire two locks. This one to ensure that only one - // thread uses this token at a time. - ACE_GUARD_RETURN (ACE_TOKEN_CONST::MUTEX, ace_mon1, this->lock_, -1); - // This one to ensure an atomic transaction across all tokens. Note - // that this order is crucial too. It's resource coloring for other - // threads which may be calling this same token. - ACE_GUARD_RETURN (ACE_TOKEN_CONST::MUTEX, ace_mon2, ACE_Token_Manager::instance ()->mutex (), -1); - - // Does _anyone_ own the token? - if (this->owner () == 0) - { - // there are no waiters, so queue as the first waiter (the owner.) - this->waiters_.enqueue (caller, -1); - return 0; // success - } - - // Does the caller already own it? - if (this->is_owner (caller->client_id ())) - { - // Recursive acquisition. - caller->nesting_level (1); - return 0; // success - } - - // Check for deadlock. - if (!ignore_deadlock - && ACE_Token_Manager::instance ()->check_deadlock (caller->proxy ()) == 1) - { - errno = EDEADLK; - ACE_RETURN (-1); - } - - // Someone owns it. Sorry, you're getting queued up at the end of - // the waiter queue. - this->waiters_.enqueue (caller, -1); - - if (notify) - this->owner ()->call_sleep_hook (); - - errno = EWOULDBLOCK; - ACE_RETURN (-1); - - ACE_NOTREACHED (return -1); -} - -int -ACE_Mutex_Token::tryacquire (ACE_TPQ_Entry *caller) -{ - ACE_TRACE ("ACE_Mutex_Token::tryacquire"); - // We need to acquire two locks. This one to ensure that only one - // thread uses this token at a time. - ACE_GUARD_RETURN (ACE_TOKEN_CONST::MUTEX, ace_mon1, this->lock_, -1); - // This one to ensure an atomic transaction across all tokens. Note - // that this order is crucial too. It's resource coloring for other - // threads which may be calling this same token. - ACE_GUARD_RETURN (ACE_TOKEN_CONST::MUTEX, ace_mon2, ACE_Token_Manager::instance ()->mutex (), -1); - - // Does _anyone_ own the token? - if (this->owner () == 0) - { - this->waiters_.enqueue (caller, -1); - return 0; // success - } - // Does the caller already own it? - if (this->is_owner (caller->client_id ())) - { - // recursive acquisition - caller->nesting_level (1); - return 0; // success - } - else - // Someone owns it. Fail. - { - errno = EWOULDBLOCK; - ACE_RETURN (-1); - } - - ACE_NOTREACHED (return -1); -} - -int -ACE_Mutex_Token::renew (ACE_TPQ_Entry *caller, - int requeue_position) -{ - ACE_TRACE ("ACE_Mutex_Token::renew"); - ACE_GUARD_RETURN (ACE_TOKEN_CONST::MUTEX, ace_mon, this->lock_, -1); - - // Verify that the caller is the owner. - if (this->is_owner (caller->client_id ()) == 0) - { - errno = EACCES; - ACE_RETURN (-1); - } - - // The caller is the owner, so check to see if there are any - // waiters. If not, we just keep the token. == 1 means that there - // is only the owner. - if (this->waiters_.size () == 1 || requeue_position == 0) - return 0; - - // Requeue the caller. - this->waiters_.dequeue (); - - this->waiters_.enqueue (caller, requeue_position); - - // Notify new owner. - if (this->owner () != 0) - this->owner ()->proxy ()->token_acquired (this->owner ()); - - // Tell the caller that the operation would block. - errno = EWOULDBLOCK; - ACE_RETURN (-1); - - ACE_NOTREACHED (return -1); -} - -// Release the current holder of the token (which had -// better be the caller's thread!). - -int -ACE_Mutex_Token::release (ACE_TPQ_Entry *caller) -{ - ACE_TRACE ("ACE_Mutex_Token::release"); - ACE_GUARD_RETURN (ACE_TOKEN_CONST::MUTEX, ace_mon, this->lock_, -1); - - // Does anyone own the token? - if (this->owner () == 0) - { - errno = EACCES; - ACE_RETURN (-1); - } - - // Is the caller the owner. - if (this->is_owner (caller->client_id ())) - { - // Check the nesting level. - if (caller->nesting_level () > 0) - caller->nesting_level (-1); - else - { - this->waiters_.dequeue (); - // Notify new owner. - if (this->owner () != 0) - this->owner ()->proxy ()->token_acquired (this->owner ()); - } - } - else - this->remove (caller); - - return 0; -} - -int -ACE_Mutex_Token::owners (OWNER_STACK &stack, - const ACE_TCHAR *id) -{ - ACE_TRACE ("ACE_Mutex_Token::owners"); - if (this->owner () != 0) - { - stack.push (this->owner ()); - // If an is specified, return whether it is the owner being - // returned. - if (id != 0) - return this->owner ()->equal_client_id (id); - } - - return 0; -} - -int -ACE_Mutex_Token::is_waiting_for (const ACE_TCHAR *id) -{ - ACE_TRACE ("ACE_Mutex_Token::is_waiting_for"); - // If there is no owner, or is the owner, return false. - if ((this->owner () == 0) || this->is_owner (id)) - return 0; - - // Step through each waiter looking for . - ACE_TPQ_Iterator iterator (waiters_); - iterator.advance (); - for (ACE_TPQ_Entry *temp = 0; - iterator.next (temp) != 0; - iterator.advance ()) - { - if (temp->equal_client_id (id)) - return 1; - } - - return 0; -} - -int -ACE_Mutex_Token::is_owner (const ACE_TCHAR *id) -{ - ACE_TRACE ("ACE_Mutex_Token::is_owner"); - // If there is an owner, return whether it is . - if ((this->owner () != 0) && - this->owner ()->equal_client_id (id)) - return 1; - else - return 0; -} - -int -ACE_Mutex_Token::type (void) const -{ - ACE_TRACE ("ACE_Mutex_Token::type"); - return (int) ACE_Tokens::MUTEX; -} - -// ************************************************************ - -int -ACE_RW_Token::type (void) const -{ - ACE_TRACE ("ACE_RW_Token::type"); - return (int) ACE_Tokens::RWLOCK; -} - -void -ACE_RW_Token::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_RW_Token::dump"); - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_RW_Token::dump:\n") - ACE_TEXT ("num_writers_ = %d\n"), num_writers_)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("lock_\n"))); - this->lock_.dump (); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("base:\n"))); - ACE_Tokens::dump (); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_RW_Token::dump end.\n"))); - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} - -ACE_RW_Token::ACE_RW_Token (const ACE_TCHAR *name) -: num_writers_ (0) -{ - ACE_TRACE ("ACE_RW_Token::ACE_RW_Token"); - - ACE_OS::strsncpy (this->token_name_, - name, - ACE_MAXTOKENNAMELEN); -} - -ACE_RW_Token::~ACE_RW_Token (void) -{ - ACE_TRACE ("ACE_RW_Token::~ACE_RW_Token"); -} - -int -ACE_RW_Token::acquire (ACE_TPQ_Entry *caller, - int ignore_deadlock, - int notify) -{ - ACE_TRACE ("ACE_RW_Token::acquire"); - // We need to acquire two locks. This one to ensure that only one - // thread uses this token at a time. - ACE_GUARD_RETURN (ACE_TOKEN_CONST::MUTEX, ace_mon1, this->lock_, -1); - // This one to ensure an atomic transaction across all tokens. Note - // that this order is crucial too. It's resource coloring for other - // threads which may be calling this same token. - ACE_GUARD_RETURN (ACE_TOKEN_CONST::MUTEX, ace_mon2, ACE_Token_Manager::instance ()->mutex (), -1); - - if (caller->proxy ()->type () == ACE_RW_Token::WRITER) - this->num_writers_++; - - // Does _anyone_ own the token? - if (this->owner () == 0) - { - // There are no waiters, so queue as the first waiter (the owner). - this->waiters_.enqueue (caller, -1); - return 0; - } - - // Check for recursive acquisition. - if (this->is_owner (caller->client_id ())) - { - caller->nesting_level (1); - return 0; // Success. - } - - // Reader. - if (caller->proxy ()->type () == ACE_RW_Token::READER) - { - // Are there any writers? - if (this->num_writers_ == 0) - { - // Queue the caller at the end of the queue. - this->waiters_.enqueue (caller, -1); - return 0; - } - // Else failure. - } - - // Failure code. - - // Check for deadlock. - if (!ignore_deadlock && - ACE_Token_Manager::instance ()->check_deadlock (caller->proxy ()) == 1) - { - if (caller->proxy ()->type () == ACE_RW_Token::WRITER) - this->num_writers_--; - errno = EDEADLK; - ACE_RETURN (-1); - } - - // Queue the caller at the end of the queue. - this->waiters_.enqueue (caller, -1); - - if (notify) - { - // If it's a writer, just notify it. - if (this->owner ()->proxy ()->type () == ACE_RW_Token::WRITER) - this->owner ()->call_sleep_hook (); - else - { - // Call back all reader owners. - ACE_TPQ_Entry *temp = this->owner (); - do - { - temp->call_sleep_hook (); - temp = temp->next_; - } - while (temp != 0 && - temp->proxy ()->type () == ACE_RW_Token::READER); - } - } - - errno = EWOULDBLOCK; - ACE_RETURN (-1); - - ACE_NOTREACHED (return -1); -} - -int -ACE_RW_Token::tryacquire (ACE_TPQ_Entry *caller) -{ - ACE_TRACE ("ACE_RW_Token::tryacquire"); - // We need to acquire two locks. This one to ensure that only one - // thread uses this token at a time. - ACE_GUARD_RETURN (ACE_TOKEN_CONST::MUTEX, ace_mon1, this->lock_, -1); - // This one to ensure an atomic transaction across all tokens. Note - // that this order is crucial too. It's resource coloring for other - // threads which may be calling this same token. - ACE_GUARD_RETURN (ACE_TOKEN_CONST::MUTEX, ace_mon2, ACE_Token_Manager::instance ()->mutex (), -1); - - if (caller->proxy ()->type () == ACE_RW_Token::WRITER) - { - this->num_writers_++; - } - - // Does _anyone_ own the token? - if (this->owner () == 0) - { - // There are no waiters, so queue as the first waiter (the owner). - this->waiters_.enqueue (caller, -1); - return 0; - } - - // Check for recursive acquisition. - if (this->is_owner (caller->client_id ())) - { - caller->nesting_level (1); - return 0; // Success. - } - - // Reader. - if (caller->proxy ()->type () == ACE_RW_Token::READER) - { - // Are there any writers? - if (this->num_writers_ == 0) - { - // queue the caller at the end of the queue. - this->waiters_.enqueue (caller, -1); - return 0; - } - // Else, fail. - } - else // Writer. - // We're going to fail, so decrement the num_writers. - { - this->num_writers_--; - } - - - errno = EWOULDBLOCK; - ACE_RETURN (-1); - - ACE_NOTREACHED (return -1); -} - -int -ACE_RW_Token::renew (ACE_TPQ_Entry *caller, - int requeue_position) -{ - ACE_TRACE ("ACE_RW_Token::renew"); - ACE_GUARD_RETURN (ACE_TOKEN_CONST::MUTEX, ace_mon, this->lock_, -1); - - // Werify that the caller is the owner - if (this->is_owner (caller->client_id ()) == 0) - { - errno = EACCES; - ACE_RETURN (-1); - } - - // The caller is the owner, so check to see if there are any - // waiters. If not, we just keep the token. - if (this->waiters_.size () == 1 || requeue_position == 0) - return 0; - - // There are waiters, so remove the caller. - this->remove (caller); - - // Requeue the caller. - this->waiters_.enqueue (caller, requeue_position); - - if (caller->proxy ()->type () == ACE_RW_Token::READER) - { - // If the caller got queued before any writers, the caller is - // still the owner. - if (this->is_owner (caller->client_id ())) - return 0; // success - // else fallthrough and return would block. - } - // Writers will always have to block since waiters_.size () == 1 or - // requeue_position == 0. - - // Get a new owner. - this->notify_new_owner (caller); - - // Tell the caller that the operation would block. - errno = EWOULDBLOCK; - ACE_RETURN (-1); - - ACE_NOTREACHED (return -1); -} - -int -ACE_RW_Token::release (ACE_TPQ_Entry *caller) -{ - ACE_TRACE ("ACE_RW_Token::release"); - ACE_GUARD_RETURN (ACE_TOKEN_CONST::MUTEX, ace_mon, this->lock_, -1); - - // Check for errors. - if ((this->owner () == 0) || - (this->is_owner (caller->client_id ()) == 0)) - { - errno = EACCES; - ACE_RETURN (-1); - } - - if (caller->proxy ()->type () == ACE_RW_Token::WRITER) - num_writers_--; - - // Recursive release. - if (caller->nesting_level () > 0) - { - caller->nesting_level (-1); - return 0; - } - - // Remove the caller and notify the new owner(s). - this->remove (caller); - this->notify_new_owner (caller); - - return 0; -} - -void -ACE_RW_Token::notify_new_owner (ACE_TPQ_Entry *old_owner) -{ - ACE_TRACE ("ACE_RW_Token::notify_new_owner"); - - if (this->owner () == 0) - return; - - if (this->owner ()->proxy ()->type () == ACE_RW_Token::READER) - { - if (old_owner->proxy ()->type () == ACE_RW_Token::READER) - // the owners already know that they're owners - return; - - // The current owner is a reader and the previous owner was a - // writer, so notify all waiting readers up to the first writer. - // call back all reader owners. - ACE_TPQ_Iterator iterator (waiters_); - for (ACE_TPQ_Entry *temp = 0; - iterator.next (temp) != 0; - iterator.advance ()) - { - if (temp->proxy ()->type () == WRITER) - // We've gone through all the readers. - break; - - temp->proxy ()->token_acquired (temp); - } - } - else // writer - this->owner ()->proxy ()->token_acquired (this->owner ()); -} - - -int -ACE_RW_Token::owners (OWNER_STACK &stack, - const ACE_TCHAR *id) -{ - ACE_TRACE ("ACE_RW_Token::owners"); - - if (this->owner () == 0) - return 0; - - int id_is_owner = 0; - - // The first waiter is a writer, so there is only one owner. - if (this->owner ()->proxy ()->type () == WRITER) - { - stack.push (this->owner ()); - // If an is specified, return whether it is the owner being - // returned. - if ((id != 0) && - (ACE_OS::strcmp (id, this->owner ()->client_id ()) == 0)) - id_is_owner = 1; - } - // The first waiter is a reader, so there can be multiple owning - // readers. - else - { - ACE_TPQ_Iterator iterator (waiters_); - for (ACE_TPQ_Entry *temp = 0; - iterator.next (temp) != 0; - iterator.advance ()) - { - if (temp->proxy ()->type () == WRITER) - // We've gone through all the readers. - break; - - stack.push (temp); - - if (!id_is_owner && (id != 0) && - (ACE_OS::strcmp (id, temp->client_id ()) == 0)) - id_is_owner = 1; - } - } - - return id_is_owner; -} - -int -ACE_RW_Token::is_waiting_for (const ACE_TCHAR *id) -{ - ACE_TRACE ("ACE_RW_Token::is_waiting_for"); - // If there is no owner, or is the owner, return false. - if ((this->owner () == 0) || - this->is_owner (id)) - return 0; - - // Step through each waiter looking for . - ACE_TPQ_Iterator iterator (waiters_); - iterator.advance (); - for (ACE_TPQ_Entry *temp = 0; - iterator.next (temp) != 0; - iterator.advance ()) - { - if (temp->equal_client_id (id)) - return 1; - } - - return 0; -} - -int -ACE_RW_Token::is_owner (const ACE_TCHAR *id) -{ - ACE_TRACE ("ACE_RW_Token::is_owner"); - // If there is no owner, return false. - if (this->owner () == 0) - return 0; - - // A writer owns us. - if (this->owner ()->proxy ()->type () == ACE_RW_Token::WRITER) - return this->owner ()->equal_client_id (id); - - // Readers own us. - // Step through each owning reader looking for . - ACE_TPQ_Iterator iterator (waiters_); - for (ACE_TPQ_Entry *temp = 0; - iterator.next (temp) != 0; - iterator.advance ()) - { - if (temp->proxy ()->type () != ACE_RW_Token::READER) - break; - - if (temp->equal_client_id (id)) - return 1; - } - - return 0; -} - -void -ACE_Token_Proxy::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_Token_Proxy::dump"); - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_Token_Proxy::dump:\n") - ACE_TEXT (" type = %d\n") - ACE_TEXT (" ignore_deadlock_ = %d\n") - ACE_TEXT (" debug_ = %d\n"), - (int) this->type (), ignore_deadlock_, debug_)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("mutex_, and waiter_\n"))); - - if (this->token_ != 0) - this->token_->dump (); - - this->waiter_.dump (); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_Token_Proxy::dump end.\n"))); - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} - -const ACE_TCHAR * -ACE_Token_Proxy::client_id (void) const -{ - ACE_TRACE ("ACE_Token_Proxy::client_id"); - // Thread-specific. - const ACE_TPQ_Entry *temp = this->waiter_.operator->(); - const ACE_TCHAR *id = temp->client_id (); - - if (id == 0) - return ACE_TEXT ("ERROR NO CLIENT ID"); - else - return id; -} - -void -ACE_Token_Proxy::client_id (const ACE_TCHAR *client_id) -{ - ACE_TRACE ("ACE_Token_Proxy::client_id"); - this->waiter_->client_id (client_id); -} - -const ACE_TCHAR * -ACE_Token_Proxy::owner_id (void) -{ - ACE_TRACE ("ACE_Token_Proxy::owner_id"); - return this->token_->owner_id (); -} - -const ACE_TCHAR * -ACE_Token_Proxy::name (void) const -{ - ACE_TRACE ("ACE_Token_Proxy::name"); - return this->token_->name (); -} - -#if defined (ACE_WIN32_VC8) -# pragma warning (push) -# pragma warning (disable:4355) /* Use of 'this' in initializer list */ -#endif -ACE_Token_Proxy::ACE_Token_Proxy (void) -: token_ (0), - waiter_ (this, 0) -{ - ACE_TRACE ("ACE_Token_Proxy::ACE_Token_Proxy"); -} - -// Notice the token_ (0). Do *not* copy the token pointer. This must -// be obtained through the token manager. Also, we don't copy any -// waiter info. A copied Proxy does *not* inherit client_id. - -ACE_Token_Proxy::ACE_Token_Proxy (const ACE_Token_Proxy &) - : token_ (0), - waiter_ (this, 0) -{ - ACE_TRACE ("ACE_Token_Proxy::ACE_Token_Proxy"); -} -#if defined (ACE_WIN32_VC8) -# pragma warning (pop) -#endif - -// @@ should I do a mutex_->release ()? -ACE_Token_Proxy::~ACE_Token_Proxy (void) -{ - ACE_TRACE ("ACE_Token_Proxy::~ACE_Token_Proxy"); - - if (token_ != 0) - // notify token manager that we are done with it so it can - // free it if necessary - ACE_Token_Manager::instance ()->release_token (token_); -} - -int -ACE_Token_Proxy::open (const ACE_TCHAR *token_name, - int ignore_deadlock, - int debug) -{ - ACE_TRACE ("ACE_Token_Proxy::open"); - - // Store some parameters. - this->ignore_deadlock_ = ignore_deadlock; - this->debug_ = debug; - - // Used in case a name was not specified. - ACE_TCHAR name[BUFSIZ]; - - // We must have a name. - if (token_name == 0) - { - ACE_OS::sprintf (name, ACE_TEXT ("token %lx"), - reinterpret_cast (this)); - token_name = name; - } - - // Get or create the underlying token. The Token Manager will call - // us back to set token_. - ACE_Token_Manager::instance ()->get_token (this, token_name); - - // Check for failed get or failed new. - if (this->token_ == 0) - { - errno = ENOMEM; - ACELIB_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("Can't allocate mutex")), -1); - } - - return 0; -} - -int -ACE_Token_Proxy::acquire (int notify, - void (*sleep_hook)(void *), - ACE_Synch_Options &options) -{ - ACE_TRACE ("ACE_Token_Proxy::acquire"); - if (this->token_ == 0) - { - errno = ENOENT; - ACELIB_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("Not open.\n")), -1); - } - - // Make sure no one calls our token_acquired until we have a chance - // to sleep first! If after we call an EWOULDBLOCK - // mutex_->acquire() below, but before we enter handle_options to - // wait on the cond_var, a thread tries to give take us off the - // waiter queue and signal us, IT WILL FIRST HAVE TO ACQUIRE THIS - // cond_var.mutex (). _This_ is why we acquire it. - this->waiter_->cond_var_.mutex ().acquire (); - - this->waiter_->sleep_hook (sleep_hook); - - if (this->token_->acquire (this->waiter_, this->ignore_deadlock_, notify) == -1) - // acquire failed - { - switch (errno) - { - case EDEADLK : - if (!ignore_deadlock_) - { - waiter_->cond_var_.mutex ().release (); - errno = EDEADLK; - ACE_RETURN (-1); - } - // Else, fallthrough and block! - - case EWOULDBLOCK : - if (this->debug_) - ACELIB_DEBUG ((LM_DEBUG, - ACE_TEXT ("(%t) waiting for %s, owner is %s, ") - ACE_TEXT ("total waiters == %d\n"), - this->name (), - this->token_->owner_id (), - token_->no_of_waiters ())); - - // no error, but would block, if error, return error (-1), - // otherwise, return whether we called the holder or not. - int return_value; - if (this->handle_options (options, - waiter_->cond_var_) == -1) - return_value = -1; - else - return_value = notify == 1; - - errno = EWOULDBLOCK; - ACE_RETURN (return_value); - - default : - waiter_->cond_var_.mutex ().release (); - ACELIB_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("%p\n"), - ACE_TEXT ("Token Proxy acquire.")), - -1); - } - } - else - // we have the token - { - if (debug_) - ACELIB_DEBUG ((LM_DEBUG, - ACE_TEXT ("(%t) acquired %s\n"), - this->name ())); - waiter_->cond_var_.mutex ().release (); - } - - return 0; -} - -int -ACE_Token_Proxy::tryacquire (void (*sleep_hook)(void *)) -{ - ACE_TRACE ("ACE_Token_Proxy::tryacquire"); - if (this->token_ == 0) - { - errno = ENOENT; - ACELIB_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("Not open.\n")), - -1); - } - - this->waiter_->sleep_hook (sleep_hook); - - return this->token_->tryacquire (waiter_); -} - -int -ACE_Token_Proxy::renew (int requeue_position, - ACE_Synch_Options &options) -{ - ACE_TRACE ("ACE_Token_Proxy::renew"); - if (this->token_ == 0) - { - errno = ENOENT; - ACELIB_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("Not open.\n")), - -1); - } - - // Make sure no one calls our token_acquired until we have a chance - // to sleep first! - this->waiter_->cond_var_.mutex ().acquire (); - - if (this->token_->renew (this->waiter_, requeue_position) == -1) - { - // check for error - if (errno != EWOULDBLOCK) - ACELIB_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("%p renew failed\n"), ACE_TEXT ("ACE_Token_Proxy")), -1); - - if (this->debug_) - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) renew blocking for %s, owner is %s\n"), - this->name (), - token_->owner_id ())); - - // no error, but would block, so block or return - return this->handle_options (options, waiter_->cond_var_); - } - else - // we have the token - { - if (this->debug_) - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) renewed %s\n"), - this->name ())); - waiter_->cond_var_.mutex ().release (); - return 0; - } -} - -int -ACE_Token_Proxy::handle_options (ACE_Synch_Options &options, - ACE_TOKEN_CONST::COND_VAR &cv) -{ - // Some operation failed with EWOULDBLOCK. - ACE_TRACE ("ACE_Token_Proxy::handle_options"); - - if (options[ACE_Synch_Options::USE_REACTOR] == 1) - // Asynchronous. - { - // Save/restore errno. - ACE_Errno_Guard error (errno); - cv.mutex ().release (); - ACE_RETURN (-1); - } - else - // Synchronous. - { - // Block on condition variable. - while (cv.wait ((ACE_Time_Value *) options.time_value ()) == -1) - { - // Note, this should obey whatever thread-specific - // interrupt policy is currently in place... - if (errno == EINTR) - continue; - // We come here if a timeout occurs or some serious - // ACE_Condition object error. - cv.mutex ().release (); - ACELIB_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("condition variable wait") - ACE_TEXT (" bombed.")), -1); - } - - if (this->debug_) - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) unblocking %s.\n"), - this->client_id ())); - cv.mutex ().release (); - return 0; // operation succeeded - } -} - -int -ACE_Token_Proxy::release (ACE_Synch_Options &) -{ - ACE_TRACE ("ACE_Token_Proxy::release"); - - if (this->token_ == 0) - { - errno = ENOENT; - if (debug_) - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("Must open before releasing.\n"))); - ACE_RETURN (-1); - } - - if (this->token_->release (waiter_) != 0) - { - // Release failed. - this->token_->remove (this->waiter_); - if (debug_) - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) %p.\n"), ACE_TEXT ("release failed"))); - return -1; - } - else - { - if (this->debug_) - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) released %s, owner is %s\n"), - this->name (), - token_->owner_id ())); - - return 0; - } -} - -int -ACE_Token_Proxy::remove (ACE_Synch_Options &) -{ - ACE_TRACE ("ACE_Token_Proxy::remove"); - return 0; -} - -void -ACE_Token_Proxy::sleep_hook (void) -{ - ACE_TRACE ("ACE_Token_Proxy::sleep_hook"); - // Somebody wants our token! (Let'em wait...) - return; -} - -void -ACE_Token_Proxy::token_acquired (ACE_TPQ_Entry *e) -{ - ACE_TRACE ("ACE_Token_Proxy::token_acquired"); - e->cond_var_.mutex ().acquire (); - // We've been taken off the waiters list and given the token! - // This implementation signals the internal condition - // variable. Thus, if asynchronous acquires are used, this must be - // overriden to do something more useful! - e->cond_var_.signal (); - e->cond_var_.mutex ().release (); - - return; -} - -int -ACE_Token_Proxy::type (void) const -{ - ACE_TRACE ("ACE_Token_Proxy::type"); - return 0; -} - -int -ACE_Token_Proxy::acquire_read (int notify, - void (*sleep_hook)(void *), - ACE_Synch_Options &options) -{ - return this->acquire (notify, - sleep_hook, - options); -} - -int -ACE_Token_Proxy::acquire_write (int notify, - void (*sleep_hook)(void *), - ACE_Synch_Options &options) -{ - return this->acquire (notify, - sleep_hook, - options); -} - -int -ACE_Token_Proxy::tryacquire_read (void (*sleep_hook)(void *)) -{ - return this->tryacquire (sleep_hook); -} - -int -ACE_Token_Proxy::tryacquire_write (void (*sleep_hook)(void *)) -{ - return this->tryacquire (sleep_hook); -} - -ACE_Token_Name::ACE_Token_Name (const ACE_TCHAR *token_name) -{ - ACE_TRACE ("ACE_Token_Name::ACE_Token_Name"); - this->name (token_name); -} - -ACE_Token_Name::ACE_Token_Name (const ACE_Token_Name &rhs) -{ - ACE_TRACE ("ACE_Token_Name::ACE_Token_Name"); - this->name (rhs.name ()); -} - -ACE_Token_Name::~ACE_Token_Name () -{ - ACE_TRACE ("ACE_Token_Name::~ACE_Token_Name"); -} - -void -ACE_Token_Name::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_Token_Name::dump"); - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("ACE_Token_Name::dump:\n") - ACE_TEXT (" token_name_ = %s\n"), - token_name_ == 0 ? ACE_TEXT ("no name") : token_name_)); - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} - -// ************************************************************ - -ACE_Token_Proxy * -ACE_Local_Mutex::clone (void) const -{ - ACE_Token_Proxy *temp = 0; - ACE_NEW_RETURN (temp, - ACE_Local_Mutex (token_->name (), - ignore_deadlock_, - debug_), - 0); - return temp; -} - -ACE_Tokens * -ACE_Local_Mutex::create_token (const ACE_TCHAR *name) -{ - ACE_Tokens *temp = 0; - ACE_NEW_RETURN (temp, - ACE_Mutex_Token (name), - 0); - return temp; -} - -ACE_Local_Mutex::~ACE_Local_Mutex (void) -{ -} - -// ************************************************************ - -ACE_Local_RLock::~ACE_Local_RLock (void) -{ -} - -ACE_Tokens * -ACE_Local_RLock::create_token (const ACE_TCHAR *name) -{ - ACE_Tokens *temp = 0; - ACE_NEW_RETURN (temp, - ACE_RW_Token (name), - 0); - return temp; -} - -int -ACE_Local_RLock::type (void) const -{ - return ACE_RW_Token::READER; -} - -ACE_Token_Proxy * -ACE_Local_RLock::clone (void) const -{ - ACE_Token_Proxy *temp = 0; - ACE_NEW_RETURN (temp, - ACE_Local_RLock (token_->name (), - ignore_deadlock_, - debug_), - 0); - return temp; -} - -// ************************************************************ - -ACE_Local_WLock::~ACE_Local_WLock (void) -{ -} - -ACE_Tokens * -ACE_Local_WLock::create_token (const ACE_TCHAR *name) -{ - ACE_Tokens *temp = 0; - ACE_NEW_RETURN (temp, - ACE_RW_Token (name), - 0); - return temp; -} - -int -ACE_Local_WLock::type (void) const -{ - return ACE_RW_Token::WRITER; -} - -ACE_Token_Proxy * -ACE_Local_WLock::clone (void) const -{ - ACE_Token_Proxy *temp = 0; - ACE_NEW_RETURN (temp, - ACE_Local_WLock (token_->name (), - ignore_deadlock_, - debug_), - 0); - return temp; -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_HAS_TOKENS_LIBRARY */ diff --git a/modules/worldengine/deps/acelite/ace/Local_Tokens.h b/modules/worldengine/deps/acelite/ace/Local_Tokens.h deleted file mode 100644 index 40403938a0..0000000000 --- a/modules/worldengine/deps/acelite/ace/Local_Tokens.h +++ /dev/null @@ -1,1119 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Local_Tokens.h - * - * @author Karl-Heinz Dorn - * @author Douglas C. Schmidt - * @author Tim Harrison - * - * This file contains definitions for the following classes: - * - * public: - * 7. ACE_Token_Proxy - * 8. ACE_Null_Token : public ACE_Token_Proxy - * 9. ACE_Local_Mutex : public ACE_Token_Proxy - * *. ACE_Local_RLock : public ACE_Local_Mutex - * &. ACE_Local_WLock : public ACE_Local_Mutex - * private: - * 1. ACE_TOKEN_CONST - * 3. ACE_TPQ_Entry - * b. ACE_TSS_TPQ_Entry - * c. ACE_TPQ_Iterator - * 4. ACE_Token_Proxy_Queue - * 5. ACE_Tokens - * 6. ACE_Mutex_Token : public ACE_Tokens - * 12. ACE_RW_Token : public ACE_Tokens - * a. ACE_Token_Name - * - * Note that the locking classes defined in this file are *not* - * intended to be used as general-purpose synchronization - * mechanisms, such as mutexes or semaphores. Instead, you should - * use the ACE_Recursive_Thread_Mutex, ACE_Thread_Mutex, - * ACE_Thread_Semaphore, etc., that are defined in - * $ACE_ROOT/ace/Synch.h or the - * ACE_Token that's defined in $ACE_ROOT/ace/Token.h. - */ -//============================================================================= - -#ifndef ACE_LOCAL_MUTEX_H -#define ACE_LOCAL_MUTEX_H -#include /**/ "ace/pre.h" - -#include /**/ "ace/config-all.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#if defined (ACE_HAS_TOKENS_LIBRARY) - -#include "ace/Synch_Traits.h" -#include "ace/Condition_Thread_Mutex.h" -#include "ace/TSS_T.h" -#include "ace/Containers.h" -#include "ace/Synch_Options.h" -#include "ace/Map_Manager.h" -#include "ace/Log_Category.h" -#include "ace/OS_NS_string.h" -#include "ace/os_include/os_netdb.h" - -#if !(defined (ACE_HAS_THREADS) && defined (ACE_HAS_THREAD_SPECIFIC_STORAGE)) -# define ACE_NO_TSS_TOKENS 1 -#endif /* !(defined (ACE_HAS_THREADS) && defined (ACE_HAS_THREAD_SPECIFIC_STORAGE)) */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -// 1. -/** - * @class ACE_TOKEN_CONST - * - * @brief Not a public interface. - * - * Constant definitions and typedefs for Token library. Mostly, - * this class is necessary to fight the compiler with order of - * declaration errors. - */ -// FUZZ: disable check_for_ACE_Guard -namespace ACE_TOKEN_CONST -{ -#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) - // ACE platform supports some form of threading. - typedef ACE_Condition_Thread_Mutex COND_VAR; - typedef ACE_Thread_Mutex MUTEX; - typedef ACE_Guard GUARD; -#else - typedef ACE_Null_Condition COND_VAR; - typedef ACE_Null_Mutex MUTEX; - typedef ACE_Guard GUARD; -#endif /* ACE_HAS_THREADS */ -} -// FUZZ: enable check_for_ACE_Guard - -// Forward decl. -class ACE_Token_Proxy; - -// 3.. -/** - * @class ACE_TPQ_Entry - * - * @brief Token Proxy Queue entry. Used in the ACE_Token_Proxy_Queue - * - * Not a public interface. - */ -class ACE_Export ACE_TPQ_Entry -{ - friend class ACE_Token_Manager; -public: - typedef void (*PTVF) (void *); - - /// Null constructor. - ACE_TPQ_Entry (void); - - /// Constructor. - ACE_TPQ_Entry (const ACE_Token_Proxy *proxy, - const ACE_TCHAR *client_id); - - /// Copy constructor. - ACE_TPQ_Entry (const ACE_TPQ_Entry &rhs); - - /// Destructor. - ~ACE_TPQ_Entry (void); - - /// Copy operator use by the queue. - void operator= (const ACE_TPQ_Entry &rhs); - - /// Get top of the queue. - ACE_Token_Proxy *proxy (void) const; - - /// Set top of the queue. - void proxy (ACE_Token_Proxy *); - - /// Get nesting level of the entry. - int nesting_level (void) const; - - /// Delta nesting level of the entry. - void nesting_level (int delta); - - /// Get client_id of the entry. - const ACE_TCHAR *client_id (void) const; - - /// Set client_id of the entry. - void client_id (const ACE_TCHAR *); - - /// Returns 1 if @a id == client id. Does not check for @a id == 0. - int equal_client_id (const ACE_TCHAR *id); - - /// One method for arg and sleep_hook. - void set (void (*sleep_hook)(void *)); - - /// Set sleep hook of the entry. - void sleep_hook (void (*sh)(void *)); - - /// Get sleep hook of the entry. - PTVF sleep_hook (void) const; - - /// Call the sleep hook function or method passing arg. - void call_sleep_hook (void); - - /// Dump the state of the class. - void dump (void) const; - - // = Used to block the thread if an acquire fails with EWOULDBLOCK. - ACE_TOKEN_CONST::COND_VAR cond_var_; - ACE_TOKEN_CONST::MUTEX lock_; - - /// Pointer to next in list. - ACE_TPQ_Entry *next_; - - /// Get whether this client is blocked waiting for a token. - int waiting (void) const; - - /// Set whether this client is blocked waiting for a token. - void waiting (int w); - -private: - /// This client is waiting for a token. - int waiting_; - - /// Proxy. - ACE_Token_Proxy *proxy_; - - /// Nesting level. - int nesting_level_; - - /// Arg. - void *arg_; - - /// Client id. - ACE_TCHAR client_id_[ACE_MAXCLIENTIDLEN]; - - /// Sleep hook. - void (*sleep_hook_)(void *); -}; - -// b.. -#if defined (ACE_NO_TSS_TOKENS) -typedef ACE_TPQ_Entry ACE_TPQ_ENTRY; -#else -typedef ACE_TSS ACE_TPQ_ENTRY; -#endif /* ACE_NO_TSS_TOKENS */ - -/** - * @class ACE_TSS_TPQ_Entry - * - * @brief ACE_TSS_TPQ_Entry - * - * Not a public interface. - */ -class ACE_Export ACE_TSS_TPQ_Entry : public ACE_TPQ_ENTRY -{ -public: - /// These are passed to the constructor of ACE_TPQ_Entry in - /// make_TSS_TYPE - ACE_TSS_TPQ_Entry (const ACE_Token_Proxy *proxy, - const ACE_TCHAR *client_id); - - /// Destructor. - virtual ~ACE_TSS_TPQ_Entry (void); - - /// Allows us to pass args to the construction of the TSS object. - virtual ACE_TPQ_Entry *make_TSS_TYPE (void) const; - - /// Operator overloading and inheritance don't mix. - operator ACE_TPQ_Entry *(void); - - /// Dump the state of the class. - void dump (void) const; - -#if defined (ACE_NO_TSS_TOKENS) - ACE_TPQ_Entry *operator-> (void) - { - return (ACE_TPQ_Entry *) this; - } -#endif /* ACE_NO_TSS_TOKENS */ - -private: - /// Private: should not be used - ACE_TSS_TPQ_Entry (const ACE_TSS_TPQ_Entry &); - void operator= (const ACE_TSS_TPQ_Entry &); - - // = These are passed to the constructor of ACE_TPQ_Entry in - // make_TSS_TYPE - - /// Proxy. - const ACE_Token_Proxy *proxy_; - - /// Client_id. - const ACE_TCHAR *client_id_; -}; - -class ACE_Token_Proxy_Queue; - -// c.. -/** - * @class ACE_TPQ_Iterator - * - * @brief Iterates through ACE_Token_Proxy_Queues. - * - * Not a public interface. - */ -class ACE_Export ACE_TPQ_Iterator -{ -public: - /// Constructor. - ACE_TPQ_Iterator (ACE_Token_Proxy_Queue &q); - - /// Destructor. - ~ACE_TPQ_Iterator (void); - - /// Pass back the @a next_item. - int next (ACE_TPQ_Entry *&next_item); - - /// Returns 1 when all items have been seen, else 0. - int done (void) const; - - /// Move forward by one element in the queue. - void advance (void); - - /// Dump the state of an object. - void dump (void) const; - -private: - ACE_TPQ_Entry *current_; -}; - -// 4.. -/** - * @class ACE_Token_Proxy_Queue - * - * @brief Token waiter list. - * - * Not a public interface. - * This queue holds all the token proxies waiting for ownership - * of a token. Along with the proxy reference, it also stores - * the nesting level, client id, and a magic cookie from the - * proxy. This queue stores the ACE_TPQ_Entries by pointer - * values. It DOES NOT make copies. Thus, the user is - * responsible to ensure that the TPQ's stick around. This is - * motivated by the need to reduce dynamic memory allocation. - */ -class ACE_Export ACE_Token_Proxy_Queue -{ -public: - friend class ACE_TPQ_Iterator; - - /// Constructor. - ACE_Token_Proxy_Queue (void); - - /// Destructor. - ~ACE_Token_Proxy_Queue (void); - - /** - * Enqueue a proxy, nesting level, client_id, and a magic cookie at - * the given position in the list. If the position is -1, we - * enqueue at the end of the list (I think). - */ - void enqueue (ACE_TPQ_Entry* new_entry, - int position); - - /// Top of the queue. - const ACE_TPQ_Entry* head (void); - -// int member (const ACE_TCHAR *id); - // Is this id in the waiter list? - - /// Remove the top waiter. - void dequeue (void); - - /// Remove the waiter whose proxy ref matches @a remove_me. - void remove (const ACE_TPQ_Entry *remove_me); - - /// The number of waiters. - int size (void); - - /// Dump the state of the class. - void dump (void) const; - -protected: - /// Head. - ACE_TPQ_Entry *head_; - - /// Tail. - ACE_TPQ_Entry *tail_; - - /// Size. - int size_; -}; - -// 5.. -/** - * @class ACE_Tokens - * - * @brief Abstract representation of ACE tokens. - * - * Not a public interface. - * Currently, I don't see a reason for providing an abstract - * interface at this level of the library. As of yet, no one - * uses ACE_Tokens derivatives through this abstract interface - * except for ACE_Token_Manager. It only uses the statistical - * methods which are shared by all Tokens. For that reason, it - * still makes since to have a common base class. However, - * acquire, renew, and release do not need to have matching - * interfaces throughout all Tokens. - * To add a new type of token (e.g. semaphore), this class must - * be subtyped to define the new semantics. See - * ACE_Token_Manager for details. - */ -class ACE_Export ACE_Tokens -{ -public: - - /// Null constructor. - ACE_Tokens (void); - - /// Destructor - virtual ~ACE_Tokens (void); - - /// No implementation. - virtual int acquire (ACE_TPQ_Entry *caller, - int ignore_deadlock, - int notify) = 0; - - /// No implementation. - virtual int tryacquire (ACE_TPQ_Entry *caller) = 0; - - /// No implementation. - virtual int renew (ACE_TPQ_Entry *caller, - int requeue_position) = 0; - - /// No implementation. - virtual int release (ACE_TPQ_Entry *caller) = 0; - - /// Move the caller to the front of the waiter list. This is for use - /// with remote mutexes and shadow mutexes. - void make_owner (ACE_TPQ_Entry *caller); - - /// Remove the caller from the waiter list. - void remove (ACE_TPQ_Entry *caller); - - // = Accessor methods. - - /// Stack of owners. - typedef ACE_Unbounded_Stack OWNER_STACK; - - /// Returns a stack of the current owners. Returns -1 on error, 0 on - /// success. If @a id is non-zero, returns 1 if id is an owner. - virtual int owners (OWNER_STACK &o, const ACE_TCHAR *id) = 0; - - /// Returns 1 if @a id is waiting for this token. 0 otherwise. - virtual int is_waiting_for (const ACE_TCHAR *id) = 0; - - /// Returns 1 if @a id is an owner of this token. 0 otherwise. - virtual int is_owner (const ACE_TCHAR *id) = 0; - - /// Return the queue of waiters. - virtual ACE_Token_Proxy_Queue *waiters (void); - - /// Return the number of proxies that are currently waiting to get - /// the token. - virtual int no_of_waiters (void); - - /// The current owner. - const ACE_TCHAR *owner_id (void); - - /// Token name. - const ACE_TCHAR* name (void); - - // = Reference counting. These are only called by the - // Token_Manager. - void inc_reference (void); - int dec_reference (void); - - /// Dump the state of the class. - void dump (void) const; - - /** - * These are the Token types supported by the library at ship time. - * There is no restriction on the number of Token types added by - * "3rd parties." These are only necessary for the Token Server. - */ - enum TOKEN_TYPES { MUTEX, RWLOCK }; - - /** - * Provides a manual RTTI mechanism. This method is used only by - * ACE_Token_Request so that the type of a token can be sent to a - * remote Token Server. - */ - virtual int type (void) const = 0; - - // = The following methods allow the deadlock detection algorithm to - // check if this token has been visited. - - /// Mark or unmark the token as visited. - void visit (int v); - - /// Check if the token has been visited. - int visited (void); - - /// All the data of the current owner. - ACE_TPQ_Entry *owner (void); - -protected: - - /// For the deadlock detection algorithm. - int visited_; - - /// Reference count. - int reference_count_; - - /// List of client's owning and waiting the token. - ACE_Token_Proxy_Queue waiters_; - - /// Name of token. - ACE_TCHAR token_name_[ACE_MAXTOKENNAMELEN]; -}; - -class ACE_Local_Mutex; - -// 6.. -/** - * @class ACE_Mutex_Token - * - * @brief Class that acquires, renews, and releases a process-local - * synchronization token. - * - * Not a public interface. - * This class is a more general-purpose synchronization mechanism - * than SunOS 5.x mutexes. For example, it implements "recursive - * mutex" semantics, where a thread that owns the token can - * reacquire it without deadlocking. In addition, threads that - * are blocked awaiting the token are serviced in strict FIFO - * order as other threads release the token (SunOS 5.x mutexes - * don't strictly enforce an acquisition order). - */ -class ACE_Export ACE_Mutex_Token : public ACE_Tokens -{ -public: - /// Constructor - explicit ACE_Mutex_Token (const ACE_TCHAR* name); - - /// Destructor - virtual ~ACE_Mutex_Token (void); - - // = Synchronization operations. - // With acquire, renew, and release, the caller must be specified so - // that multiple proxies (e.g. ACE_Local_Mutex) can use the same - // token. - - /** - * Returns 0 on success, -1 on failure with as - * the reason. If errnum == EWOULDBLOCK, and notify == 1, - * has been called on the current - * owner of the token. If ignore_deadlock is passed as 1 and errnum - * == EDEADLK, then deadlock was detected via ace_token_manager. - */ - virtual int acquire (ACE_TPQ_Entry *caller, - int ignore_deadlock, - int notify); - - /// Same as acquire, but fails if would block - virtual int tryacquire (ACE_TPQ_Entry *caller); - - /** - * An optimized method that efficiently reacquires the token if no - * other threads are waiting. This is useful for situations where - * you don't want to degrade the quality of service if there are - * other threads waiting to get the token. If == - * -1 and there are other threads waiting to obtain the token we are - * queued at the end of the list of waiters. If - * > -1 then it indicates how many entries to skip over before - * inserting our thread into the list of waiters (e.g., - * == 0 means "insert at front of the queue"). - * Renew has the rather odd semantics such that if there are other - * waiting threads it will give up the token even if the - * nesting_level_ > 1. I'm not sure if this is really the right - * thing to do (since it makes it possible for shared data to be - * changed unexpectedly) so use with caution... Returns 0 on - * success, -1 on failure with as the reason. - * If errnum == EWOULDBLOCK, and notify == 1, - * has been called on the current - * owner of the token. - */ - virtual int renew (ACE_TPQ_Entry *caller, - int requeue_position); - - /** - * Relinquish the token. If there are any waiters then the next one - * in line gets it. If the caller is not the owner, caller is - * removed from the waiter list. - */ - virtual int release (ACE_TPQ_Entry *caller); - - /// Dump the state of the class. - void dump (void) const; - - /// Returns ACE_Tokens::MUTEX. - virtual int type (void) const; - - /// Returns a stack of the current owners. Returns -1 on error, 0 on - /// success. If @a id is non-zero, returns 1 if id is an owner. - virtual int owners (OWNER_STACK &o, const ACE_TCHAR *id); - - /// Returns 1 if @a id is waiting for this token. 0 otherwise. - virtual int is_waiting_for (const ACE_TCHAR *id); - - /// Returns 1 if @a id is an owner of this token. 0 otherwise. - virtual int is_owner (const ACE_TCHAR *id); - -private: - /// ACE_Mutex_Token used to lock internal data structures. - ACE_TOKEN_CONST::MUTEX lock_; -}; - -// 12.. -/** - * @class ACE_RW_Token - * - * @brief Class that acquires, renews, and releases a process-local - * synchronization token. - * - * Not a public interface. - * This class is a more general-purpose synchronization mechanism - * than SunOS 5.x mutexes. For example, it implements "recursive - * mutex" semantics, where a thread that owns the token can - * reacquire it without deadlocking. In addition, threads that are - * blocked awaiting the token are serviced in strict FIFO order as - * other threads release the token (SunOS 5.x mutexes don't strictly - * enforce an acquisition order). - */ -class ACE_Export ACE_RW_Token : public ACE_Tokens -{ -public: - /// Constructor. - explicit ACE_RW_Token (const ACE_TCHAR* name); - - /// Destructor. - virtual ~ACE_RW_Token (void); - - // = Synchronization operations. - // With acquire, renew, and release, the caller must be specified so - // that multiple proxies (e.g. ACE_Local_Mutex) can use the same - // token. - - /** - * Returns 0 on success, -1 on failure with as - * the reason. If errnum == EWOULDBLOCK, and notify == 1, - * has been called on the current - * owner of the token. If @a ignore_deadlock is passed as 1 and errnum - * == EDEADLK, then deadlock was detected via ACE_Token_Manager. - */ - virtual int acquire (ACE_TPQ_Entry *caller, - int ignore_deadlock, - int notify); - - /// Same as acquire except fails on would block - virtual int tryacquire (ACE_TPQ_Entry *caller); - - /** - * An optimized method that efficiently reacquires the token if no - * other threads are waiting. This is useful for situations where - * you don't want to degrade the quality of service if there are - * other threads waiting to get the token. If == - * -1 and there are other threads waiting to obtain the token we are - * queued at the end of the list of waiters. If - * > -1 then it indicates how many entries to skip over before - * inserting our thread into the list of waiters (e.g., - * == 0 means "insert at front of the queue"). - * Renew has the rather odd semantics such that if there are other - * waiting threads it will give up the token even if the - * nesting_level_ > 1. I'm not sure if this is really the right - * thing to do (since it makes it possible for shared data to be - * changed unexpectedly) so use with caution... Returns 0 on - * success, -1 on failure with as the reason. - * If errnum == EWOULDBLOCK, and notify == 1, - * has been called on the current - * owner of the token. - */ - virtual int renew (ACE_TPQ_Entry *caller, - int requeue_position); - - /** - * Relinquish the token. If there are any waiters then the next one - * in line gets it. If the caller is not the owner, caller is - * removed from the waiter list. - */ - virtual int release (ACE_TPQ_Entry *caller); - - /// Dump the state of the class. - void dump (void) const; - - /// These are the types that proxies can be. - enum PROXY_TYPE { READER, WRITER }; - - /// Returns READER or WRITER. - virtual int type (void) const; - - /// Returns a stack of the current owners. Returns -1 on error, 0 on - /// success. If @a id is non-zero, returns 1 if id is an owner. - virtual int owners (OWNER_STACK &o, const ACE_TCHAR *id); - - /// Returns 1 if @a id is waiting for this token. 0 otherwise. - virtual int is_waiting_for (const ACE_TCHAR *id); - - /// Returns 1 if @a id is an owner of this token. 0 otherwise. - virtual int is_owner (const ACE_TCHAR *id); - -protected: - /// The number of waiting writers. - int num_writers_; - - /// ACE_Mutex_Token used to lock internal data structures. - ACE_TOKEN_CONST::MUTEX lock_; - - /// Sets the new owner. - void notify_new_owner (ACE_TPQ_Entry *caller); -}; - -// a.. -/** - * @class ACE_Token_Name - * - * @brief Allows Token_Manger to identify tokens. - * - * For now, this is just a string. We need a string class - * anyway to use in ACE_Map_Manager. Having this class - * (instead of ) allows us to easily change if - * needed. For instance, we may choose to identify tokens by - * name and *type* in the future. - */ -class ACE_Export ACE_Token_Name -{ -public: - /// Construction. - ACE_Token_Name (const ACE_TCHAR *token_name = 0); - - /// Copy construction. - ACE_Token_Name (const ACE_Token_Name &rhs); - - /// Destructor. - virtual ~ACE_Token_Name (void); - - /// Copy. - void operator= (const ACE_Token_Name &rhs); - - /// Comparison. - bool operator== (const ACE_Token_Name &rhs) const; - - /// Get the token name. - const ACE_TCHAR *name (void) const; - - /// Set the token name. - void name (const ACE_TCHAR *new_name); - - /// Dump the state of the class. - void dump (void) const; - -private: - /// Name of the token. - ACE_TCHAR token_name_[ACE_MAXTOKENNAMELEN]; -}; - -// 7.. -/** - * @class ACE_Token_Proxy - * - * @brief Abstract representation of ACE tokens. - * - * Interface for all Tokens in ACE. This class implements the - * synchronization needed for tokens (condition variables etc.) - * The algorithms for the operations (acquire, release, etc.) - * operate on the generic ACE_Tokens interface. Thus, the _type_ - * of token (mutex, rwlock) can be set at construction of - * ACE_Token_Proxy. You can use all Tokens in ACE through the - * ACE_Token_Proxy by passing the proper values at construction. - * Alternatively, there are class definitions which "know" how to - * do this (ACE_Local_Mutex, ACE_Local_RLock, ACE_Local_WLock). - * To add a new type of token (e.g. semaphore), this class is not - * changed. See ACE_Token_Manager for details. - * Tokens (e.g. ACE_Mutex_Token) assume that it can always call - * on a new token owner. This - * is not a problem for synchronous use of token proxies (that is, - * when acquires block until successful.) However, for - * implementations of the Token Server, which may use asynch - * operations, the proxy can not go away after an acquire until - * the token is acquired. This is not really a problem, but - * should be understood. - */ -class ACE_Export ACE_Token_Proxy -{ -public: - friend class ACE_Token_Manager; - friend class ACE_Token_Invariant_Manager; // For testing. - - // Initialization and termination methods. - /// Construction. - ACE_Token_Proxy (void); - - /// Destructor. - virtual ~ACE_Token_Proxy (void); - - /** - * Open the . - * @param name The string uniquely identifying the token. - * @param ignore_deadlock Can be 1 to disable deadlock notifications. - * @param debug Prints debug messages. - */ - virtual int open (const ACE_TCHAR *name, - int ignore_deadlock = 0, - int debug = 0); - - // = The following methods have implementations which are - // independent of the token semantics (mutex, rwlock, etc.) They - // forward operations to the underlying token and perform the - // necessary blocking semantics for operations (condition variables - // etc.) This allows reuse of the blocking code as well as having - // multiple proxies to the same token. - - /// Calls acquire on the token. Blocks the calling thread if would - /// block. - virtual int acquire (int notify = 0, - void (*sleep_hook)(void *) = 0, - ACE_Synch_Options &options = - ACE_Synch_Options::defaults); - - /// Calls renew on the token. Blocks the calling thread if would block. - virtual int renew (int requeue_position = -1, - ACE_Synch_Options &options = - ACE_Synch_Options::defaults); - - /// Calls renew on the token. - virtual int tryacquire (void (*sleep_hook)(void *) = 0); - - /// Calls release on the token. - virtual int release (ACE_Synch_Options &options = - ACE_Synch_Options::defaults); - - /// Calls remove on the token. - virtual int remove (ACE_Synch_Options &options = - ACE_Synch_Options::defaults); - - /// Since the locking mechanism doesn't support read locks then this - /// just calls . - virtual int acquire_read (int notify = 0, - void (*sleep_hook)(void *) = 0, - ACE_Synch_Options &options = - ACE_Synch_Options::defaults); - - /// Since the locking mechanism doesn't support write locks then this - /// just calls . - virtual int acquire_write (int notify = 0, - void (*sleep_hook)(void *) = 0, - ACE_Synch_Options &options = - ACE_Synch_Options::defaults); - - /// Since the locking mechanism doesn't support read locks then this - /// just calls . - virtual int tryacquire_read (void (*sleep_hook)(void *) = 0); - - /// Since the locking mechanism doesn't support write locks then this - /// just calls . - virtual int tryacquire_write (void (*sleep_hook)(void *) = 0); - - // = Utility methods. - - /// Get the client id of the proxy. This is implemented as - /// thread-specific data. - virtual const ACE_TCHAR *client_id (void) const; - - /** - * Set the client_id for the calling thread. I strongly recommend - * that this not be used unless you really know what you're doing. - * I use this in the Token Server, and it caused many headaches. - */ - virtual void client_id (const ACE_TCHAR *client_id); - - /** - * Return the name of the token. This is important for use within - * the token servers (local and remote) as well as with token - * collections. So, all derivations of ACE_Token_Proxy must be able to - * stringify some name. The name must uniquely identify a token. - * So, for instance, the token within the reactor should probably be - * called "Reactor Token." - */ - virtual const ACE_TCHAR *name (void) const; - - /** - * This should really be called . This is called - * by ACE_Token_xx's when another proxy enters the waiting list and - * requests that the current token holder be notified. - */ - virtual void sleep_hook (void); - - /// This is called when a queued (waiting) proxy is removed from the - /// waiters list and given the token. - virtual void token_acquired (ACE_TPQ_Entry *); - - /// The client id of the current token holder - virtual const ACE_TCHAR *owner_id (void); - - /// Return a dynamically allocated clone of the derived class. - virtual ACE_Token_Proxy *clone (void) const = 0; - - /// Dump the state of the class. - void dump (void) const; - - /** - * This method can be used be Tokens (e.g. Readers/Writer Tokens) to - * distinguish between Proxy types. For instance a Reader proxy - * should return a different type value than a Writer proxy. The - * default implementation returns 0. - */ - virtual int type (void) const; - -protected: - /// Duplication. - ACE_Token_Proxy (const ACE_Token_Proxy &); - - /// If this is set, we ignore deadlock. - int ignore_deadlock_; - - /// Print a bunch of debug messages. - int debug_; - - /// Reference to the actual logical token. Many ACE_Local_Mutex - /// proxies can reference the same ACE_Mutex_Token. - ACE_Tokens *token_; - - /// Handles cond_var waits. - int handle_options (ACE_Synch_Options &options, - ACE_TOKEN_CONST::COND_VAR &cv); - - /// Waiter info used for asynchronous transactions. - ACE_TSS_TPQ_Entry waiter_; - - /// Make the correct type of ACE_Tokens. This is called by the Token - /// Manager. - virtual ACE_Tokens *create_token (const ACE_TCHAR *name) = 0; -}; - -// 8.. -/** - * @class ACE_Null_Token - * - * @brief No op class for nonthreaded platform protocols. - */ -class ACE_Export ACE_Null_Token : public ACE_Token_Proxy -{ -public: -#if defined (ACE_LACKS_INLINE_FUNCTIONS) - // @@ Hopefully, we can remove this ridicules ifdef when CE's compiler becomes more normal. - /// Construction. - ACE_Null_Token (void); - - /// Destructor. - ~ACE_Null_Token (void); -#endif /* ACE_LACKS_INLINE_FUNCTION */ - - /// Acquire. - virtual int acquire (int /* notify */ = 0, - void (* /* sleep_hook */ )(void *) = 0, - ACE_Synch_Options & /* options */ = - ACE_Synch_Options::defaults) { return 0; } - - /// Renew. - virtual int renew (int /* requeue_position */ = -1, - ACE_Synch_Options & /* options */ = - ACE_Synch_Options::defaults) { return 0; } - - /// Try acquire. - virtual int tryacquire (void (* /* sleep_hook */)(void *) = 0) { return 0; } - - /// Release. - virtual int release (ACE_Synch_Options & /* options */ = - ACE_Synch_Options::defaults) { return 0; } - - /// Remove. - virtual int remove (ACE_Synch_Options & /* options */ = - ACE_Synch_Options::defaults) { return 0; } - - /// Return a dynamically allocated clone of the derived class. - virtual ACE_Token_Proxy *clone (void) const { return new ACE_Null_Token; } - - /// Dump the state of the class. - void dump (void) const; - - /// Do not allow the Token Manager to create us. - virtual ACE_Tokens *create_token (const ACE_TCHAR *) { return 0; } -}; - -// 9.. -/** - * @class ACE_Local_Mutex - * - * @brief Class that acquires, renews, and releases a synchronization - * token local to the process. - * - * This class is a more general-purpose synchronization mechanism - * than SunOS 5.x mutexes. For example, it implements "recursive - * mutex" semantics, where a thread that owns the token can - * reacquire it without deadlocking. In addition, threads that - * are blocked awaiting the token are serviced in strict FIFO - * order as other threads release the token (SunOS 5.x mutexes - * don't strictly enforce an acquisition order). Lastly, - * ACE_Local_Mutex performs deadlock detection on acquire calls. - * The interfaces for acquire, tryacquire, renew, release, - * etc. are defined in ACE_Token_Proxy. The semantics for - * ACE_Local_Mutex are that of a mutex. - */ -class ACE_Export ACE_Local_Mutex : public ACE_Token_Proxy -{ -public: - /** - * Constructor. - * @param token_name Uniquely id's the token. - * @param ignore_deadlock Will allow deadlock to occur (useful for testing). - * @param debug Prints a bunch of messages. - */ - ACE_Local_Mutex (const ACE_TCHAR *token_name = 0, - int ignore_deadlock = 0, - int debug = 0); - - /// Destructor - ~ACE_Local_Mutex (void); - - /// Dump the state of the class. - void dump (void) const; - - /// Return deep copy. - virtual ACE_Token_Proxy *clone (void) const; - -protected: - /// Return a new ACE_Local_Mutex. - virtual ACE_Tokens *create_token (const ACE_TCHAR *name); -}; - -// *. -/** - * @class ACE_Local_RLock - * - * @brief Class that acquires, renews, and releases a readers lock that - * is local to the process. - * - * This class implements the reader interface to canonical - * readers/writer locks. Multiple readers can hold the lock - * simultaneously when no writers have the lock. Alternatively, - * when a writer holds the lock, no other participants (readers - * or writers) may hold the lock. This class is a more - * general-purpose synchronization mechanism than SunOS 5.x - * RLocks. For example, it implements "recursive RLock" - * semantics, where a thread that owns the token can reacquire it - * without deadlocking. In addition, threads that are blocked - * awaiting the token are serviced in strict FIFO order as other - * threads release the token (SunOS 5.x RLockes don't strictly - * enforce an acquisition order). - * The interfaces for acquire, tryacquire, renew, release, - * etc. are defined in ACE_Token_Proxy. The semantics for - * ACE_Local_RLock are that of a readers/writers lock. Acquire - * for this class implies a reader acquisition. That is, - * multiple clients may acquire a lock for read only. - */ -class ACE_Export ACE_Local_RLock : public ACE_Token_Proxy -{ -public: - // = Initialization and termination. - - /** - * Constructor. - * @param token_name Uniquely id's the token. - * @param ignore_deadlock Will allow deadlock to occur (useful for testing). - * @param debug Prints a bunch of messages. - */ - ACE_Local_RLock (const ACE_TCHAR *token_name = 0, - int ignore_deadlock = 0, - int debug = 0); - - /// Destructor - ~ACE_Local_RLock (void); - - /// Dump the state of the class. - void dump (void) const; - - /// Returns ACE_RW_Token::RLOCK. - virtual int type (void) const; - - /// Return deep copy. - virtual ACE_Token_Proxy *clone (void) const; - -protected: - /// Return a new ACE_Local_Mutex. - virtual ACE_Tokens *create_token (const ACE_TCHAR *name); -}; - -// *. -/** - * @class ACE_Local_WLock - * - * @brief Class that acquires, renews, and releases a writer lock that - * is local to the process. - * - * This class implements the writer interface to canonical - * readers/writer locks. Multiple readers can hold the lock - * simultaneously when no writers have the lock. Alternatively, - * when a writer holds the lock, no other participants (readers - * or writers) may hold the lock. This class is a more - * general-purpose synchronization mechanism than SunOS 5.x - * WLock. For example, it implements "recursive WLock" - * semantics, where a thread that owns the token can reacquire it - * without deadlocking. In addition, threads that are blocked - * awaiting the token are serviced in strict FIFO order as other - * threads release the token (SunOS 5.x WLocks don't strictly - * enforce an acquisition order). - * The interfaces for acquire, tryacquire, renew, release, - * etc. are defined in ACE_Token_Proxy. The semantics for - * ACE_Local_WLock are that of a readers/writers lock. Acquire - * for this class implies a writer acquisition. That is, only - * one client may hold the lock for writing. - */ -class ACE_Export ACE_Local_WLock : public ACE_Token_Proxy -{ -public: - // = Initialization and termination. - - /** - * Constructor. - * @param token_name Uniquely id's the token. - * @param ignore_deadlock Will allow deadlock to occur (useful for testing). - * @param debug Prints a bunch of messages. - */ - ACE_Local_WLock (const ACE_TCHAR *token_name = 0, - int ignore_deadlock = 0, - int debug = 0); - - /// Destructor - ~ACE_Local_WLock (void); - - /// Dump the state of the class. - void dump (void) const; - - /// Returns ACE_RW_Token::WLOCK. - virtual int type (void) const; - - /// Return deep copy. - virtual ACE_Token_Proxy *clone (void) const; - -protected: - /// Return a new ACE_Local_Mutex. - ACE_Tokens *create_token (const ACE_TCHAR *name); -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_HAS_TOKENS_LIBRARY */ - -#if defined (__ACE_INLINE__) -#include "ace/Local_Tokens.inl" -#endif /* __ACE_INLINE__ */ -#include /**/ "ace/post.h" -#endif /* ACE_LOCAL_MUTEX_H */ diff --git a/modules/worldengine/deps/acelite/ace/Local_Tokens.inl b/modules/worldengine/deps/acelite/ace/Local_Tokens.inl deleted file mode 100644 index 23dc5d8679..0000000000 --- a/modules/worldengine/deps/acelite/ace/Local_Tokens.inl +++ /dev/null @@ -1,272 +0,0 @@ -// -*- C++ -*- -#if defined (ACE_HAS_TOKENS_LIBRARY) - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -// ************************************************************ - -ACE_INLINE int -ACE_Token_Proxy_Queue::size (void) -{ - ACE_TRACE ("ACE_Token_Proxy_Queue::size"); - return this->size_; -} - -// ************************************************************ - -ACE_INLINE int -ACE_TPQ_Entry::waiting (void) const -{ - ACE_TRACE ("ACE_TPQ_Entry::waiting"); - return waiting_; -} - -ACE_INLINE void -ACE_TPQ_Entry::waiting (int v) -{ - ACE_TRACE ("ACE_TPQ_Entry::waiting"); - waiting_ = v; -} - -ACE_INLINE const ACE_TCHAR * -ACE_TPQ_Entry::client_id (void) const -{ - ACE_TRACE ("ACE_TPQ_Entry::client_id"); - return this->client_id_; -} - -ACE_INLINE ACE_Token_Proxy * -ACE_TPQ_Entry::proxy (void) const -{ - ACE_TRACE ("ACE_TPQ_Entry::proxy"); - return this->proxy_; -} - -ACE_INLINE void -ACE_TPQ_Entry::proxy (ACE_Token_Proxy *proxy) -{ - ACE_TRACE ("ACE_TPQ_Entry::proxy"); - this->proxy_ = proxy; -} - -ACE_INLINE -ACE_TPQ_Iterator::~ACE_TPQ_Iterator (void) -{ -} - -ACE_INLINE -ACE_Token_Proxy_Queue::~ACE_Token_Proxy_Queue (void) -{ -} - -ACE_INLINE void -ACE_Tokens::remove (ACE_TPQ_Entry *caller) -{ - this->waiters_.remove (caller); -} - -ACE_INLINE int -ACE_Tokens::dec_reference (void) -{ - ACE_TRACE ("ACE_Tokens::dec_reference"); - if (this->reference_count_ == 0) - { - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("dec_reference already zero"))); - return 0; - } - - return --this->reference_count_; -} - -ACE_INLINE void -ACE_Tokens::inc_reference (void) -{ - ACE_TRACE ("ACE_Tokens::inc_reference"); - ++this->reference_count_; -} - -ACE_INLINE const ACE_TPQ_Entry * -ACE_Token_Proxy_Queue::head (void) -{ - ACE_TRACE ("ACE_Token_Proxy_Queue::head"); - if (this->head_ == 0) - return 0; - else - return this->head_; -} - -// ************************************************** -// ************************************************** -// ************************************************** - -ACE_INLINE void -ACE_Tokens::visit (int v) -{ - ACE_TRACE ("ACE_Tokens::visit"); - visited_ = v; -} - -ACE_INLINE int -ACE_Tokens::visited (void) -{ - ACE_TRACE ("ACE_Tokens::visited"); - return visited_; -} - -ACE_INLINE ACE_TPQ_Entry * -ACE_Tokens::owner (void) -{ - ACE_TRACE ("ACE_Tokens::owner"); - return (ACE_TPQ_Entry *) this->waiters_.head (); -} - -ACE_INLINE const ACE_TCHAR* -ACE_Tokens::owner_id () -{ - ACE_TRACE ("ACE_Tokens::owner_id"); - if (this->owner () == 0) - return ACE_TEXT ("no owner"); - else - return this->owner ()->client_id (); -} - -ACE_INLINE const ACE_TCHAR* -ACE_Tokens::name (void) -{ - ACE_TRACE ("ACE_Tokens::name"); - return this->token_name_; -} - -// ************************************************************ - -ACE_INLINE int -ACE_TPQ_Entry::nesting_level (void) const -{ - ACE_TRACE ("ACE_TPQ_Entry::nesting_level"); - return this->nesting_level_; -} - -ACE_INLINE void -ACE_TPQ_Entry::nesting_level (int delta) -{ - ACE_TRACE ("ACE_TPQ_Entry::nesting_level"); - this->nesting_level_ += delta; -} - -ACE_INLINE ACE_TPQ_Entry::PTVF -ACE_TPQ_Entry::sleep_hook (void) const -{ - ACE_TRACE ("ACE_TPQ_Entry::sleep_hook"); - return this->sleep_hook_; -} - -ACE_INLINE void -ACE_TPQ_Entry::sleep_hook (void (*sh)(void *)) -{ - ACE_TRACE ("ACE_TPQ_Entry::sleep_hook"); - this->sleep_hook_ = sh; -} - -ACE_INLINE void -ACE_TPQ_Entry::call_sleep_hook (void) -{ - ACE_TRACE ("ACE_TPQ_Entry::call_sleep_hook"); - - // if a function has been registered, call it. - if (this->sleep_hook () != 0) - this->sleep_hook () ((void *) this->proxy ()); - else - // otherwise, call back the sleep_hook method - this->proxy ()->sleep_hook (); -} - -ACE_INLINE int -ACE_TPQ_Entry::equal_client_id (const ACE_TCHAR *id) -{ - ACE_TRACE ("ACE_TPQ_Entry::equal_client_id"); - return (ACE_OS::strcmp (this->client_id (), id) == 0); -} - -// ************************************************************ -// ************************************************************ -// ************************************************************ - -ACE_INLINE -ACE_Local_Mutex::ACE_Local_Mutex (const ACE_TCHAR *token_name, - int ignore_deadlock, - int debug) -{ - ACE_TRACE ("ACE_Local_Mutex::ACE_Local_Mutex"); - this->open (token_name, ignore_deadlock, debug); -} - -ACE_INLINE void -ACE_Token_Name::name (const ACE_TCHAR *new_name) -{ - ACE_TRACE ("ACE_Token_Name::name"); - - if (new_name == 0) - new_name = ACE_TEXT ("no name"); - - size_t n = ACE_OS::strlen (new_name) + 1; - - if (n >= ACE_MAXTOKENNAMELEN) - n = ACE_MAXTOKENNAMELEN - 1; - - ACE_OS::strsncpy (this->token_name_, (ACE_TCHAR *) new_name, n); -} - -ACE_INLINE const ACE_TCHAR* -ACE_Token_Name::name (void) const -{ - ACE_TRACE ("ACE_Token_Name::name"); - return this->token_name_; -} - -// ************************************************************ - -ACE_INLINE -ACE_Local_RLock::ACE_Local_RLock (const ACE_TCHAR *token_name, - int ignore_deadlock, - int debug) -{ - ACE_TRACE ("ACE_Local_RLock::ACE_Local_RLock"); - this->open (token_name, ignore_deadlock, debug); -} - -// ************************************************************ - -ACE_INLINE -ACE_Local_WLock::ACE_Local_WLock (const ACE_TCHAR *token_name, - int ignore_deadlock, - int debug) -{ - ACE_TRACE ("ACE_Local_WLock::ACE_Local_WLock"); - this->open (token_name, ignore_deadlock, debug); -} - -// ************************************************************ - - -ACE_INLINE void -ACE_Token_Name::operator= (const ACE_Token_Name &rhs) -{ - ACE_TRACE ("ACE_Token_Name::operator="); - if (&rhs == this) - return; - else - this->name (rhs.name ()); -} - -ACE_INLINE bool -ACE_Token_Name::operator== (const ACE_Token_Name &rhs) const -{ - ACE_TRACE ("ACE_Token_Name::operator=="); - - // the name and type must be the same - return (ACE_OS::strcmp (this->token_name_, rhs.name ()) == 0); -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_HAS_TOKENS_LIBRARY */ diff --git a/modules/worldengine/deps/acelite/ace/Lock.cpp b/modules/worldengine/deps/acelite/ace/Lock.cpp deleted file mode 100644 index ada3e97f3e..0000000000 --- a/modules/worldengine/deps/acelite/ace/Lock.cpp +++ /dev/null @@ -1,86 +0,0 @@ -#include "ace/Lock.h" - -#if !defined (__ACE_INLINE__) -#include "ace/Lock.inl" -#endif /* __ACE_INLINE__ */ - - - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_Lock::~ACE_Lock (void) -{ -} - -ACE_Adaptive_Lock::ACE_Adaptive_Lock (void) - : lock_ (0) -{ -} - -ACE_Adaptive_Lock::~ACE_Adaptive_Lock (void) -{ -} - -int -ACE_Adaptive_Lock::remove (void) -{ - return this->lock_->remove (); -} - -int -ACE_Adaptive_Lock::acquire (void) -{ - return this->lock_->acquire (); -} - -int -ACE_Adaptive_Lock::tryacquire (void) -{ - return this->lock_->tryacquire (); -} - -int -ACE_Adaptive_Lock::release (void) -{ - return this->lock_->release (); -} - -int -ACE_Adaptive_Lock::acquire_read (void) -{ - return this->lock_->acquire_read (); -} - -int -ACE_Adaptive_Lock::acquire_write (void) -{ - return this->lock_->acquire_write (); -} - -int -ACE_Adaptive_Lock::tryacquire_read (void) -{ - return this->lock_->tryacquire_read (); -} - -int -ACE_Adaptive_Lock::tryacquire_write (void) -{ - return this->lock_->tryacquire_write (); -} - -int -ACE_Adaptive_Lock::tryacquire_write_upgrade (void) -{ - return this->lock_->tryacquire_write_upgrade (); -} - -void -ACE_Adaptive_Lock::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - // return this->lock_->dump (); -#endif /* ACE_HAS_DUMP */ -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Lock.h b/modules/worldengine/deps/acelite/ace/Lock.h deleted file mode 100644 index bfb10b9c25..0000000000 --- a/modules/worldengine/deps/acelite/ace/Lock.h +++ /dev/null @@ -1,159 +0,0 @@ -// -*- C++ -*- - -//========================================================================== -/** - * @file Lock.h - * - * Moved from Synch.h. - * - * @author Douglas C. Schmidt - */ -//========================================================================== - -#ifndef ACE_LOCK_H -#define ACE_LOCK_H -#include /**/ "ace/pre.h" - -#include /**/ "ace/ACE_export.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_Lock - * - * @brief This is the abstract base class that contains the uniform - * locking API that is supported by all the ACE synchronization - * mechanisms. - * - * This class is typically used in conjunction with the - * ACE_Lock_Adapter in order to provide a polymorphic - * interface to the ACE synchronization mechanisms (e.g., - * ACE_Mutex, ACE_Semaphore, ACE_RW_Mutex, etc). Note that - * the reason that all of ACE doesn't use polymorphic locks is - * that (1) they add ~20% extra overhead for virtual function - * calls and (2) objects with virtual functions can't be placed - * into shared memory. - */ -class ACE_Export ACE_Lock -{ -public: - /// CE needs a default constructor here. - ACE_Lock (void); - - /// Noop virtual destructor - virtual ~ACE_Lock (void); - - /** - * Explicitly destroy the lock. Note that only one thread should - * call this method since it doesn't protect against race - * conditions. - */ - virtual int remove (void) = 0; - - /// Block the thread until the lock is acquired. Returns -1 on - /// failure. - virtual int acquire (void) = 0; - - /** - * Conditionally acquire the lock (i.e., won't block). Returns -1 - * on failure. If we "failed" because someone else already had the - * lock, @c errno is set to @c EBUSY. - */ - virtual int tryacquire (void) = 0; - - /// Release the lock. Returns -1 on failure. - virtual int release (void) = 0; - - /** - * Block until the thread acquires a read lock. If the locking - * mechanism doesn't support read locks then this just calls - * acquire(). Returns -1 on failure. - */ - virtual int acquire_read (void) = 0; - - /** - * Block until the thread acquires a write lock. If the locking - * mechanism doesn't support read locks then this just calls - * acquire(). Returns -1 on failure. - */ - virtual int acquire_write (void) = 0; - - /** - * Conditionally acquire a read lock. If the locking mechanism - * doesn't support read locks then this just calls acquire(). - * Returns -1 on failure. If we "failed" because someone else - * already had the lock, @c errno is set to @c EBUSY. - */ - virtual int tryacquire_read (void) = 0; - - /** - * Conditionally acquire a write lock. If the locking mechanism - * doesn't support read locks then this just calls acquire(). - * Returns -1 on failure. If we "failed" because someone else - * already had the lock, @c errno is set to @c EBUSY. - */ - virtual int tryacquire_write (void) = 0; - - /** - * Conditionally try to upgrade a lock held for read to a write lock. - * If the locking mechanism doesn't support read locks then this just - * calls acquire(). Returns 0 on success, -1 on failure. - */ - virtual int tryacquire_write_upgrade (void) = 0; -}; - -/** - * @class ACE_Adaptive_Lock - * - * @brief An adaptive general locking class that defers the decision of - * lock type to run time. - * - * This class, as ACE_Lock, provide a set of general locking APIs. - * However, it defers our decision of what kind of lock to use - * to the run time and delegates all locking operations to the actual - * lock. Users must define a constructor in their subclass to - * initialize @c lock_. - */ -class ACE_Export ACE_Adaptive_Lock : public ACE_Lock -{ -public: - /// You must also override the destructor function to match with how - /// you construct the underneath @c lock_. - virtual ~ACE_Adaptive_Lock (void); - - // = Lock/unlock operations. - - virtual int remove (void); - virtual int acquire (void); - virtual int tryacquire (void); - virtual int release (void); - virtual int acquire_read (void); - virtual int acquire_write (void); - virtual int tryacquire_read (void); - virtual int tryacquire_write (void); - virtual int tryacquire_write_upgrade (void); - void dump (void) const; - -protected: - /** - * Create and initialize create the actual lock used in the class. - * The default constructor simply set the @c lock_ to 0 (null). You - * must overwrite this method for this class to work. - */ - ACE_Adaptive_Lock (void); - - ACE_Lock *lock_; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/Lock.inl" -#endif /* __ACE_INLINE__ */ - -#include /**/ "ace/post.h" -#endif /* ACE_LOCK_H */ diff --git a/modules/worldengine/deps/acelite/ace/Lock.inl b/modules/worldengine/deps/acelite/ace/Lock.inl deleted file mode 100644 index 43b4bac089..0000000000 --- a/modules/worldengine/deps/acelite/ace/Lock.inl +++ /dev/null @@ -1,9 +0,0 @@ -// -*- C++ -*- -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_INLINE -ACE_Lock::ACE_Lock (void) -{ -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Lock_Adapter_T.cpp b/modules/worldengine/deps/acelite/ace/Lock_Adapter_T.cpp deleted file mode 100644 index 0068e8ae0d..0000000000 --- a/modules/worldengine/deps/acelite/ace/Lock_Adapter_T.cpp +++ /dev/null @@ -1,104 +0,0 @@ -#ifndef ACE_LOCK_ADAPTER_T_CPP -#define ACE_LOCK_ADAPTER_T_CPP - -#include "ace/Lock_Adapter_T.h" -#include "ace/OS_Memory.h" // for ACE_NEW - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#if !defined (__ACE_INLINE__) -#include "ace/Lock_Adapter_T.inl" -#endif /* __ACE_INLINE__ */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -template -ACE_Lock_Adapter::~ACE_Lock_Adapter (void) -{ - if (this->delete_lock_) - delete this->lock_; -} - -// Explicitly destroy the lock. -template int -ACE_Lock_Adapter::remove (void) -{ - return this->lock_->remove (); -} - -// Block the thread until the lock is acquired. -template int -ACE_Lock_Adapter::acquire (void) -{ - return this->lock_->acquire (); -} - -// Conditionally acquire the lock (i.e., won't block). - -template int -ACE_Lock_Adapter::tryacquire (void) -{ - return this->lock_->tryacquire (); -} - -// Release the lock. - -template int -ACE_Lock_Adapter::release (void) -{ - return this->lock_->release (); -} - -// Block until the thread acquires a read lock. If the locking -// mechanism doesn't support read locks then this just calls -// . - -template int -ACE_Lock_Adapter::acquire_read (void) -{ - return this->lock_->acquire_read (); -} - -// Block until the thread acquires a write lock. If the locking -// mechanism doesn't support read locks then this just calls -// . - -template int -ACE_Lock_Adapter::acquire_write (void) -{ - return this->lock_->acquire_write (); -} - -// Conditionally acquire a read lock. If the locking mechanism -// doesn't support read locks then this just calls . - -template int -ACE_Lock_Adapter::tryacquire_read (void) -{ - return this->lock_->tryacquire_read (); -} - -// Conditionally acquire a write lock. If the locking mechanism -// doesn't support write locks then this just calls . - -template int -ACE_Lock_Adapter::tryacquire_write (void) -{ - return this->lock_->tryacquire_write (); -} - -// Conditionally try to upgrade a lock held for read to a write lock. -// If the locking mechanism doesn't support read locks then this just -// calls . Returns 0 on success, -1 on failure. - -template int -ACE_Lock_Adapter::tryacquire_write_upgrade (void) -{ - return this->lock_->tryacquire_write_upgrade (); -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_LOCK_ADAPTER_T_CPP */ diff --git a/modules/worldengine/deps/acelite/ace/Lock_Adapter_T.h b/modules/worldengine/deps/acelite/ace/Lock_Adapter_T.h deleted file mode 100644 index 0dc88e813a..0000000000 --- a/modules/worldengine/deps/acelite/ace/Lock_Adapter_T.h +++ /dev/null @@ -1,121 +0,0 @@ -// -*- C++ -*- - -//========================================================================== -/** - * @file Lock_Adapter_T.h - * - * Moved from Synch.h. - * - * @author Douglas C. Schmidt - */ -//========================================================================== - -#ifndef ACE_LOCK_ADAPTER_T_H -#define ACE_LOCK_ADAPTER_T_H -#include /**/ "ace/pre.h" - -#include "ace/Lock.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_Lock_Adapter - * - * @brief This is an adapter that allows applications to transparently - * combine the ACE_Lock abstract base class (which contains - * pure virtual methods) with any of the other concrete ACE - * synchronization classes (e.g., ACE_Mutex, ACE_Semaphore, - * ACE_RW_Mutex, etc.). - * - * This class uses a form of the Adapter pattern. - */ -template -class ACE_Lock_Adapter : public ACE_Lock -{ -public: - typedef ACE_LOCKING_MECHANISM ACE_LOCK; - - // = Initialization/Finalization methods. - - /// Constructor. All locking requests will be forwarded to @a lock. - ACE_Lock_Adapter (ACE_LOCKING_MECHANISM &lock); - - /// Constructor. Since no lock is provided by the user, one will be - /// created internally. - ACE_Lock_Adapter (void); - - /// Destructor. If @c lock_ was not passed in by the user, it will be - /// deleted. - virtual ~ACE_Lock_Adapter (void); - - // = Lock accessors. - /// Block the thread until the lock is acquired. - virtual int acquire (void); - - /// Conditionally acquire the lock (i.e., won't block). - virtual int tryacquire (void); - - /// Release the lock. - virtual int release (void); - - /** - * Block until the thread acquires a read lock. If the locking - * mechanism doesn't support read locks then this just calls - * acquire(). - */ - virtual int acquire_read (void); - - /** - * Block until the thread acquires a write lock. If the locking - * mechanism doesn't support read locks then this just calls - * acquire(). - */ - virtual int acquire_write (void); - - /// Conditionally acquire a read lock. If the locking mechanism - /// doesn't support read locks then this just calls acquire(). - virtual int tryacquire_read (void); - - /// Conditionally acquire a write lock. If the locking mechanism - /// doesn't support read locks then this just calls acquire(). - virtual int tryacquire_write (void); - - /** - * Conditionally try to upgrade a lock held for read to a write lock. - * If the locking mechanism doesn't support read locks then this just - * calls acquire(). Returns 0 on success, -1 on failure. - */ - virtual int tryacquire_write_upgrade (void); - - /// Explicitly destroy the lock. - virtual int remove (void); - -private: - /// The concrete locking mechanism that all the methods delegate to. - ACE_LOCKING_MECHANISM *lock_; - - /// This flag keep track of whether we are responsible for deleting - /// the lock - bool delete_lock_; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/Lock_Adapter_T.inl" -#endif /* __ACE_INLINE__ */ - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "ace/Lock_Adapter_T.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("Lock_Adapter_T.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ - -#include /**/ "ace/post.h" -#endif /* ACE_LOCK_ADAPTER_T_H */ diff --git a/modules/worldengine/deps/acelite/ace/Lock_Adapter_T.inl b/modules/worldengine/deps/acelite/ace/Lock_Adapter_T.inl deleted file mode 100644 index 5de19ea5b2..0000000000 --- a/modules/worldengine/deps/acelite/ace/Lock_Adapter_T.inl +++ /dev/null @@ -1,25 +0,0 @@ -// -*- C++ -*- -#include "ace/OS_Memory.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -template -ACE_INLINE -ACE_Lock_Adapter::ACE_Lock_Adapter ( - ACE_LOCKING_MECHANISM &lock) - : lock_ (&lock), - delete_lock_ (false) -{ -} - -template -ACE_INLINE -ACE_Lock_Adapter::ACE_Lock_Adapter (void) - : lock_ (0), - delete_lock_ (true) -{ - ACE_NEW (this->lock_, - ACE_LOCKING_MECHANISM); -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Log_Category.cpp b/modules/worldengine/deps/acelite/ace/Log_Category.cpp deleted file mode 100644 index b92e4cd977..0000000000 --- a/modules/worldengine/deps/acelite/ace/Log_Category.cpp +++ /dev/null @@ -1,135 +0,0 @@ -#include "ace/Log_Msg.h" -#include "ace/Log_Category.h" -#include "ace/Atomic_Op.h" -#include "ace/OS_NS_Thread.h" - - -#if !defined (__ACE_INLINE__) -#include "ace/Log_Category.inl" -#endif /* __ACE_INLINE__ */ - - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -#if defined (ACE_HAS_THREADS) -extern "C" void -ACE_Log_Category_tss_destroy(void * p) -{ - delete static_cast(p); -} -#endif // defined (ACE_HAS_THREADS) - - -ACE_Log_Category::ACE_Log_Category(const char* name) - : name_(name) - , id_(0) -/// Default per-process priority mask -/// By default, all priorities are enabled. - , priority_mask_(LM_SHUTDOWN - | LM_TRACE - | LM_DEBUG - | LM_INFO - | LM_NOTICE - | LM_WARNING - | LM_STARTUP - | LM_ERROR - | LM_CRITICAL - | LM_ALERT - | LM_EMERGENCY) -#if defined (ACE_HAS_THREADS) - , key_(ACE_OS::NULL_key) -#else - , per_thr_obj_(this, 0) -#endif -{ -} - -ACE_Log_Category::~ACE_Log_Category() -{ -#if defined (ACE_HAS_THREADS) - ACE_GUARD (ACE_Thread_Mutex, ace_mon, this->keylock_); - - if (this->id_ > 0) - { - void *temp = 0; - if (ACE_OS::thr_getspecific (this->key_, &temp) == -1) - { - return; // This should not happen! - } - if (temp != 0) { - delete static_cast (temp); - ACE_OS::thr_setspecific (this->key_, 0); - } - ACE_OS::thr_keyfree (this->key_); - } -#endif -} - -ACE_Log_Category_TSS::ACE_Log_Category_TSS(ACE_Log_Category* category, ACE_Log_Msg* logger) - : category_(category) - , logger_(logger) - , priority_mask_(0) -{ -} - -ACE_Log_Category_TSS* -ACE_Log_Category::per_thr_obj() -{ -#if defined (ACE_HAS_THREADS) - { - // Ensure that we are serialized! - ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->keylock_, 0); - - // make sure we only create the key once! - if (this->id_ == 0) - { - static ACE_Atomic_Op log_category_id_assigner(1); - id_ = log_category_id_assigner++; // for atomic integers, post increment is more efficient - - if (ACE_OS::thr_keycreate (&this->key_, - &ACE_Log_Category_tss_destroy) != 0) - return 0; // Major problems, this should *never* happen! - } - } - - void *temp = 0; - if (ACE_OS::thr_getspecific (this->key_, &temp) == -1) - { - return 0; // This should not happen! - } - if (temp != 0) - return static_cast (temp); - - ACE_Log_Category_TSS * result; - - ACE_NEW_RETURN(result, - ACE_Log_Category_TSS(this, ACE_Log_Msg::instance()), - 0); - - if (ACE_OS::thr_setspecific (this->key_, - result) != 0) - { - return 0; - } - - return result; -#else // defined (ACE_HAS_THREADS) - if (this->id_ == 0) { - static unsigned int log_category_id_assigner = 0; - id_ = log_category_id_assigner++; - per_thr_obj_.logger_ = ACE_Log_Msg::instance(); - } - return &per_thr_obj_; -#endif // defined (ACE_HAS_THREADS) -} - - - -ACE_Log_Category& -ACE_Log_Category::ace_lib() -{ - static ACE_Log_Category ace_lib_category("ACE"); - return ace_lib_category; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Log_Category.h b/modules/worldengine/deps/acelite/ace/Log_Category.h deleted file mode 100644 index 5723d9429d..0000000000 --- a/modules/worldengine/deps/acelite/ace/Log_Category.h +++ /dev/null @@ -1,275 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Log_Category.h - * - * @author Huang-Ming Huang - */ -//============================================================================= - -#ifndef ACE_LOG_CATEGORY_H -#define ACE_LOG_CATEGORY_H - -#include /**/ "ace/pre.h" - -#include "ace/Log_Priority.h" -#include "ace/Log_Msg.h" -#include "ace/Thread_Mutex.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -#if defined (ACE_NLOGGING) -#if !defined (ACELIB_HEX_DUMP) -# define ACELIB_HEX_DUMP(X) do {} while (0) -#endif -#if !defined (ACELIB_RETURN) -# define ACELIB_RETURN(Y) do { return (Y); } while (0) -#endif -#if !defined (ACELIB_ERROR_RETURN) -# define ACELIB_ERROR_RETURN(X, Y) return (Y) -#endif -#if !defined (ACELIB_ERROR_BREAK) -# define ACELIB_ERROR_BREAK(X) { break; } -#endif -#if !defined (ACELIB_ERROR) -# define ACELIB_ERROR(X) do {} while (0) -#endif -#if !defined (ACELIB_DEBUG) -# define ACELIB_DEBUG(X) do {} while (0) -#endif -#if !defined (ACELIB_ERROR_INIT) -# define ACELIB_ERROR_INIT(VALUE, FLAGS) -#endif -#else -#if !defined (ACELIB_HEX_DUMP) -#define ACELIB_HEX_DUMP(X) \ - do { \ - int const __ace_error = ACE_Log_Msg::last_error_adapter (); \ - ACE_Log_Category_TSS *ace___ = ACE_Log_Category::ace_lib().per_thr_obj(); \ - if (ace___ == 0) break;\ - ace___->conditional_set (__FILE__, __LINE__, 0, __ace_error); \ - ace___->log_hexdump X; \ - } while (0) -#endif -#if !defined (ACELIB_RETURN) -#define ACELIB_RETURN(Y) \ - do { \ - int const __ace_error = ACE_Log_Msg::last_error_adapter (); \ - ACE_Log_Msg *ace___ = ACE_Log_Msg::instance(); \ - ace___->set (__FILE__, __LINE__, Y, __ace_error, ace___->restart (), \ - ace___->msg_ostream (), ace___->msg_callback ()); \ - return Y; \ - } while (0) -#endif -#if !defined (ACELIB_ERROR_RETURN) -#define ACELIB_ERROR_RETURN(X, Y) \ - do { \ - int const __ace_error = ACE_Log_Msg::last_error_adapter (); \ - ACE_Log_Category_TSS *ace___ = ACE_Log_Category::ace_lib().per_thr_obj(); \ - if (ace___ == 0) return Y;\ - ace___->conditional_set (__FILE__, __LINE__, Y, __ace_error); \ - ace___->log X; \ - return Y; \ - } while (0) -#endif -#if !defined (ACELIB_ERROR) -#define ACELIB_ERROR(X) \ - do { \ - int const __ace_error = ACE_Log_Msg::last_error_adapter (); \ - ACE_Log_Category_TSS *ace___ = ACE_Log_Category::ace_lib().per_thr_obj(); \ - if (ace___ == 0) break;\ - ace___->conditional_set (__FILE__, __LINE__, -1, __ace_error); \ - ace___->log X; \ - } while (0) -#endif -#if !defined (ACELIB_DEBUG) -#define ACELIB_DEBUG(X) \ - do { \ - int const __ace_error = ACE_Log_Msg::last_error_adapter (); \ - ACE_Log_Category_TSS *ace___ = ACE_Log_Category::ace_lib().per_thr_obj(); \ - if (ace___ == 0) break;\ - ace___->conditional_set (__FILE__, __LINE__, 0, __ace_error); \ - ace___->log X; \ - } while (0) -#endif -#if !defined (ACELIB_ERROR_BREAK) -#define ACELIB_ERROR_BREAK(X) { ACELIB_ERROR (X); break; } -#endif -#endif /* ACE_NLOGGING */ - - -class ACE_Log_Msg; -class ACE_Log_Category; - - -/** - * @class ACE_Log_Category_TSS - * - * @brief The thread specific object for a ACE_Log_Categy object. - * - * @see ACE_Log_Categy - */ - -class ACE_Export ACE_Log_Category_TSS -{ -public: - ACE_Log_Category_TSS(ACE_Log_Category* category, ACE_Log_Msg* logger); - - const char* name(); - unsigned int id(); - - ACE_Log_Msg* logger(); - /// Get the current ACE_Log_Priority mask. - u_long priority_mask (); - - /// Set the ACE_Log_Priority mask, returns original mask. - u_long priority_mask (u_long); - /// Return true if the requested priority is enabled. - int log_priority_enabled (ACE_Log_Priority log_priority); - - /** - * Set the line number, file name, operational status, error number, - * restart flag, ostream, and the callback object. This combines - * all the other set methods into a single method. - */ - void set (const char *file, - int line, - int op_status = -1, - int errnum = 0); - - /// These values are only actually set if the requested priority is - /// enabled. - void conditional_set (const char *file, - int line, - int op_status, - int errnum); - - ssize_t log (ACE_Log_Priority priority, const ACE_TCHAR *format, ...); - -#if defined (ACE_HAS_WCHAR) - ssize_t log (ACE_Log_Priority priority, const ACE_ANTI_TCHAR *format, ...); -#endif /* ACE_HAS_WCHAR */ - - ssize_t log (const ACE_TCHAR *format, - ACE_Log_Priority priority, - va_list argp); - - /** - * Method to log hex dump. This is useful for debugging. Calls - * log() to do the actual print, but formats first to make the chars - * printable. - */ - int log_hexdump (ACE_Log_Priority log_priority, - const char * buffer, - size_t size, - const ACE_TCHAR *text = 0); - -private: - friend class ACE_Log_Category; - ACE_Log_Category* category_; - ACE_Log_Msg* logger_; - u_long priority_mask_; -}; - -/** - * @class ACE_Log_Category - * - * @brief Provides a categorized message logging - * abstraction. - * - * This class added another level of abstraction to - * @c ACE_Log_Msg to separate log messages into different - * categories. Logs in different categories can be independently - * enabled or disabled. However, they will all be affected by the - * priority_mask setting in ACE_Log_Msg. That is to say, if a - * given priority level is disabled using @c ACE_Log_Msg::priority_mask(), - * all messages of that priority level logged via any @c ACE_Log_Category - * object would also be disabled regardless of the @c priority_mask - * setting in the @c ACE_Log_Category object. - * - * Each cateogry can have a name which - * is fixed at construction. The name is not used for - * formating the messages. However, it can be used by a - * message backend object for identification and reformat - * accordingly. - * - * To log a message into a category. Create a new @c ACE_Log_Category - * and then use @c per_thr_obj() for logging. For example, - * - * \code{.cpp} - * ACE_Log_Category test_catogory("Test"); - * test_cateogry.per_thr_obj()->log(LM_DEBUG, "Log into the Test category."); - * - * // set the process wide priority mask - * test_catogory.priority_mask(LM_DEBUG|LM_ERROR); - * - * // set the thread specific priority mask - * test_cateogry.per_thr_obj()->priority_mask(LM_DEBUG); - * \endcode - */ -class ACE_Export ACE_Log_Category -{ -public: - - /** - * Initialize the logger with a name. - * - * Notice that ACE_Log_Category does not - * deep copy the passed \a name; therefore, - * you must keep the lifetime of \a name - * longer than the newly create ACE_Log_Category - * object. The rational for the design is to avoid - * static initialization problem when the ACE_Log_Category - * is created in static storage. - */ - ACE_Log_Category(const char* name); - ~ACE_Log_Category(); - - unsigned int id(); - const char* name(); - - ACE_Log_Category_TSS* per_thr_obj(); - - /// Get the process ACE_Log_Priority mask. - u_long priority_mask (); - - /// Set the process ACE_Log_Priority mask, returns original mask. - u_long priority_mask (u_long); - - - static ACE_Log_Category& ace_lib(); - -private: - friend class ACE_Log_Category_TSS; - - // disable copying - ACE_Log_Category(const ACE_Log_Category&); - ACE_Log_Category& operator = (const ACE_Log_Category&); - - const char* name_; - unsigned int id_; - u_long priority_mask_; - - /// we couldn't directly use ACE_TSS because it would - /// create circular dependency -#if defined (ACE_HAS_THREADS) - /// Avoid race conditions during initialization. - ACE_Thread_Mutex keylock_; - /// "First time in" flag. - /// Key for the thread-specific error data. - ACE_thread_key_t key_; -#else // defined (ACE_HAS_THREADS) - ACE_Log_Category_TSS per_thr_obj_; -#endif // defined (ACE_HAS_THREADS) -}; - - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (__ACE_INLINE__) -#include "ace/Log_Category.inl" -#endif /* __ACE_INLINE__ */ - -#include /**/ "ace/post.h" -#endif /* ACE_LOG_CATEGORY_H */ diff --git a/modules/worldengine/deps/acelite/ace/Log_Category.inl b/modules/worldengine/deps/acelite/ace/Log_Category.inl deleted file mode 100644 index 8fac70ac0d..0000000000 --- a/modules/worldengine/deps/acelite/ace/Log_Category.inl +++ /dev/null @@ -1,156 +0,0 @@ -// -*- C++ -*- -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_INLINE unsigned int -ACE_Log_Category::id() -{ - return id_; -} - -ACE_INLINE const char* -ACE_Log_Category::name () -{ - return name_; -} - -ACE_INLINE unsigned int -ACE_Log_Category_TSS::id() -{ - return category_->id_; -} - -ACE_INLINE const char* -ACE_Log_Category_TSS::name () -{ - return category_->name_; -} - -ACE_INLINE ACE_Log_Msg* -ACE_Log_Category_TSS::logger () -{ - return logger_; -} - -/// Get the current ACE_Log_Priority mask. -ACE_INLINE u_long -ACE_Log_Category_TSS::priority_mask () -{ - return priority_mask_; -} - -/// Set the ACE_Log_Priority mask, returns original mask. -ACE_INLINE u_long -ACE_Log_Category_TSS::priority_mask (u_long n_mask) -{ - u_long o_mask = this->priority_mask_; - this->priority_mask_ = n_mask; - return o_mask; -} -/// Return true if the requested priority is enabled. -ACE_INLINE int -ACE_Log_Category_TSS::log_priority_enabled (ACE_Log_Priority log_priority) -{ - return ACE_BIT_ENABLED (this->priority_mask_ | - category_->priority_mask(), - log_priority); -} - -ACE_INLINE void -ACE_Log_Category_TSS::set (const char *file, - int line, - int op_status, - int errnum) -{ - logger_->set(file, line, op_status, errnum, logger_->restart (), logger_->msg_ostream (), logger_->msg_callback ()); -} - -/// These values are only actually set if the requested priority is -/// enabled. -ACE_INLINE -void ACE_Log_Category_TSS::conditional_set (const char *file, - int line, - int op_status, - int errnum) -{ - logger_->conditional_set(file, line, op_status, errnum); -} - -ACE_INLINE ssize_t -ACE_Log_Category_TSS::log (ACE_Log_Priority priority, const ACE_TCHAR *format_str, ...) -{ - // Start of variable args section. - va_list argp; - - va_start (argp, format_str); - - ssize_t const result = this->log (format_str, - priority, - argp); - va_end (argp); - - return result; -} - -#if defined (ACE_HAS_WCHAR) -ACE_INLINE ssize_t -ACE_Log_Category_TSS::log (ACE_Log_Priority priority, const ACE_ANTI_TCHAR *format_str, ...) -{ - // Start of variable args section. - va_list argp; - - va_start (argp, format_str); - - ssize_t const result = this->log (ACE_TEXT_ANTI_TO_TCHAR (format_str), - priority, - argp); - va_end (argp); - - return result; -} -#endif /* ACE_HAS_WCHAR */ - -/** - * An alternative logging mechanism that makes it possible to - * integrate variable argument lists from other logging mechanisms - * into the ACE mechanism. - */ - -ACE_INLINE ssize_t -ACE_Log_Category_TSS::log (const ACE_TCHAR *format, - ACE_Log_Priority priority, - va_list argp) -{ - if (this->log_priority_enabled (priority) == 0) - return 0; - return logger_->log(format, priority, argp, this); -} - - -ACE_INLINE int -ACE_Log_Category_TSS::log_hexdump (ACE_Log_Priority priority, - const char *buffer, - size_t size, - const ACE_TCHAR *text) -{ - if (this->log_priority_enabled (priority) == 0) - return 0; - return logger_->log_hexdump(priority, buffer, size, text, this); -} - -/// Get the current ACE_Log_Priority mask. -ACE_INLINE u_long -ACE_Log_Category::priority_mask () -{ - return priority_mask_; -} - -/// Set the ACE_Log_Priority mask, returns original mask. -ACE_INLINE u_long -ACE_Log_Category::priority_mask (u_long n_mask) -{ - u_long o_mask = this->priority_mask_; - this->priority_mask_ = n_mask; - return o_mask; -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Log_Msg.cpp b/modules/worldengine/deps/acelite/ace/Log_Msg.cpp deleted file mode 100644 index df31f6e286..0000000000 --- a/modules/worldengine/deps/acelite/ace/Log_Msg.cpp +++ /dev/null @@ -1,2623 +0,0 @@ -// We need this to get the status of ACE_NTRACE... -#include "ace/config-all.h" - -// Turn off tracing for the duration of this file. -#if defined (ACE_NTRACE) -# undef ACE_NTRACE -#endif /* ACE_NTRACE */ -#define ACE_NTRACE 1 - -#include "ace/ACE.h" -#include "ace/Thread_Manager.h" -#include "ace/Guard_T.h" -#include "ace/OS_NS_stdio.h" -#include "ace/OS_NS_errno.h" -#include "ace/OS_NS_sys_time.h" -#include "ace/OS_NS_wchar.h" -#include "ace/OS_NS_signal.h" -#include "ace/os_include/os_typeinfo.h" - -#if !defined (ACE_MT_SAFE) || (ACE_MT_SAFE != 0) -# include "ace/Object_Manager_Base.h" -#endif /* ! ACE_MT_SAFE */ - -#if !defined (ACE_LACKS_IOSTREAM_TOTALLY) -// FUZZ: disable check_for_streams_include -# include "ace/streams.h" -#endif /* ! ACE_LACKS_IOSTREAM_TOTALLY */ - -#if defined (ACE_HAS_TRACE) -# include "ace/Trace.h" -#endif /* ACE_HAS_TRACE */ - -#include "ace/Log_Msg.h" -#include "ace/Log_Msg_Callback.h" -#include "ace/Log_Msg_IPC.h" -#include "ace/Log_Msg_NT_Event_Log.h" -#include "ace/Log_Msg_UNIX_Syslog.h" -#include "ace/Log_Record.h" -#include "ace/Recursive_Thread_Mutex.h" -#include "ace/Stack_Trace.h" -#include "ace/Atomic_Op.h" - -#if !defined (__ACE_INLINE__) -#include "ace/Log_Msg.inl" -#endif /* __ACE_INLINE__ */ - - - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_ALLOC_HOOK_DEFINE(ACE_Log_Msg) - -#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) - bool ACE_Log_Msg::key_created_ = 0; -# if defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) || \ - defined (ACE_HAS_TSS_EMULATION) - -static ACE_thread_key_t the_log_msg_tss_key = 0; - -ACE_thread_key_t *log_msg_tss_key (void) -{ - return &the_log_msg_tss_key; -} - -# endif /* ACE_HAS_THREAD_SPECIFIC_STORAGE || ACE_HAS_TSS_EMULATION */ -#else -static ACE_Cleanup_Adapter* log_msg_cleanup = 0; -class ACE_Msg_Log_Cleanup: public ACE_Cleanup_Adapter -{ -public: - virtual ~ACE_Msg_Log_Cleanup (void) { - if (this == log_msg_cleanup) - log_msg_cleanup = 0; - } -}; -#endif /* ACE_MT_SAFE */ - -#if defined (ACE_WIN32) && !defined (ACE_HAS_WINCE) && !defined (ACE_HAS_PHARLAP) -# define ACE_LOG_MSG_SYSLOG_BACKEND ACE_Log_Msg_NT_Event_Log -#elif !defined (ACE_LACKS_UNIX_SYSLOG) && !defined (ACE_HAS_WINCE) -# define ACE_LOG_MSG_SYSLOG_BACKEND ACE_Log_Msg_UNIX_Syslog -#else -# define ACE_LOG_MSG_SYSLOG_BACKEND ACE_Log_Msg_IPC -#endif /* ! ACE_WIN32 */ - -// When doing ACE_OS::s[n]printf() calls in log(), we need to update -// the space remaining in the output buffer based on what's returned from -// the output function. If we could rely on more modern compilers, this -// would be in an unnamed namespace, but it's a macro instead. -// count is a size_t, len is an int and assumed to be non-negative. -#define ACE_UPDATE_COUNT(COUNT, LEN) \ - do { if (static_cast (LEN) > COUNT) COUNT = 0; \ - else COUNT -= static_cast (LEN); \ - } while (0) - -/// Instance count for Log_Msg - used to know when dynamically -/// allocated storage (program name and host name) can be safely -/// deleted. -int ACE_Log_Msg::instance_count_ = 0; - -/** - * @class ACE_Log_Msg_Manager - * - * @brief Synchronize output operations. - * - * Provides global point of contact for all ACE_Log_Msg instances - * in a process. - * - * For internal use by ACE, only! - */ -class ACE_Log_Msg_Manager -{ -public: - static ACE_Log_Msg_Backend *log_backend_; - static ACE_Log_Msg_Backend *custom_backend_; - - static u_long log_backend_flags_; - - static int init_backend (const u_long *flags = 0); - -#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) - //FUZZ: disable check_for_lack_ACE_OS - static void close (void) ACE_GCC_DESTRUCTOR_ATTRIBUTE; - //FUZZ: enable check_for_lack_ACE_OS - - static ACE_Recursive_Thread_Mutex *get_lock (void); - -private: - static ACE_Recursive_Thread_Mutex *lock_; -#endif /* ! ACE_MT_SAFE */ -}; - -ACE_Log_Msg_Backend *ACE_Log_Msg_Manager::log_backend_ = 0; -ACE_Log_Msg_Backend *ACE_Log_Msg_Manager::custom_backend_ = 0; - -u_long ACE_Log_Msg_Manager::log_backend_flags_ = 0; - -int ACE_Log_Msg_Manager::init_backend (const u_long *flags) -{ - // If flags have been supplied, and they are different from the flags - // we had last time, then we may have to re-create the backend as a - // different type. - if (flags) - { - // Sanity check for custom backend. - if (ACE_BIT_ENABLED (*flags, ACE_Log_Msg::CUSTOM) && - ACE_Log_Msg_Manager::custom_backend_ == 0) - { - return -1; - } - - if ((ACE_BIT_ENABLED (*flags, ACE_Log_Msg::SYSLOG) - && ACE_BIT_DISABLED (ACE_Log_Msg_Manager::log_backend_flags_, ACE_Log_Msg::SYSLOG)) - || (ACE_BIT_DISABLED (*flags, ACE_Log_Msg::SYSLOG) - && ACE_BIT_ENABLED (ACE_Log_Msg_Manager::log_backend_flags_, ACE_Log_Msg::SYSLOG))) - { - delete ACE_Log_Msg_Manager::log_backend_; - ACE_Log_Msg_Manager::log_backend_ = 0; - } - - ACE_Log_Msg_Manager::log_backend_flags_ = *flags; - } - - if (ACE_Log_Msg_Manager::log_backend_ == 0) - { - ACE_NO_HEAP_CHECK; - -#if (defined (WIN32) || !defined (ACE_LACKS_UNIX_SYSLOG)) && !defined (ACE_HAS_WINCE) && !defined (ACE_HAS_PHARLAP) - // Allocate the ACE_Log_Msg_Backend instance. - if (ACE_BIT_ENABLED (ACE_Log_Msg_Manager::log_backend_flags_, ACE_Log_Msg::SYSLOG)) - ACE_NEW_RETURN (ACE_Log_Msg_Manager::log_backend_, - ACE_LOG_MSG_SYSLOG_BACKEND, - -1); - else -#endif /* defined (WIN32) && !defined (ACE_HAS_WINCE) && !defined (ACE_HAS_PHARLAP) */ - ACE_NEW_RETURN (ACE_Log_Msg_Manager::log_backend_, - ACE_Log_Msg_IPC, - -1); - } - - return 0; -} - -#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) -ACE_Recursive_Thread_Mutex *ACE_Log_Msg_Manager::lock_ = 0; - -ACE_Recursive_Thread_Mutex * -ACE_Log_Msg_Manager::get_lock (void) -{ - // This function is called by the first thread to create an ACE_Log_Msg - // instance. It makes the call while holding a mutex, so we don't have - // to grab another one here. - if (ACE_Log_Msg_Manager::lock_ == 0) - { - ACE_NO_HEAP_CHECK; - - ACE_NEW_RETURN (ACE_Log_Msg_Manager::lock_, - ACE_Recursive_Thread_Mutex, - 0); - } - - if (init_backend () == -1) - return 0; - - return ACE_Log_Msg_Manager::lock_; -} - -void -ACE_Log_Msg_Manager::close (void) -{ -#if defined (ACE_HAS_STHREADS) && ! defined (ACE_HAS_TSS_EMULATION) && ! defined (ACE_HAS_EXCEPTIONS) - // Delete the (main thread's) Log_Msg instance. I think that this - // is only "necessary" if exception handling is not enabled. - // Without exception handling, main thread TSS destructors don't - // seem to be called. It's not really necessary anyways, because - // this one leak is harmless on Solaris. - delete ACE_Log_Msg::instance (); -#endif /* ACE_HAS_STHREADS && ! TSS_EMULATION && ! ACE_HAS_EXCEPTIONS */ - - // Ugly, ugly, but don't know a better way. - delete ACE_Log_Msg_Manager::lock_; - ACE_Log_Msg_Manager::lock_ = 0; - - delete ACE_Log_Msg_Manager::log_backend_; - ACE_Log_Msg_Manager::log_backend_ = 0; - - // we are never responsible for custom backend - ACE_Log_Msg_Manager::custom_backend_ = 0; -} - -# if defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) || \ - defined (ACE_HAS_TSS_EMULATION) -/* static */ -# if defined (ACE_HAS_THR_C_DEST) -# define LOCAL_EXTERN_PREFIX extern "C" -# else -# define LOCAL_EXTERN_PREFIX -# endif /* ACE_HAS_THR_C_DEST */ -LOCAL_EXTERN_PREFIX -void -ACE_TSS_CLEANUP_NAME (void *ptr) -{ - // Delegate to thr_desc if this not has terminated - ACE_Log_Msg* log_msg = (ACE_Log_Msg*) ptr; - if (log_msg->thr_desc()!=0) - log_msg->thr_desc()->log_msg_cleanup(log_msg); - else - delete log_msg; -} -# endif /* ACE_HAS_THREAD_SPECIFIC_STORAGE || ACE_HAS_TSS_EMULATION */ -#endif /* ! ACE_MT_SAFE */ - -/* static */ -int -ACE_Log_Msg::exists (void) -{ -#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) -# if defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) || \ - defined (ACE_HAS_TSS_EMULATION) - void *tss_log_msg = 0; // The actual type is ACE_Log_Msg*, but we need this - // void to keep G++ from complaining. - - // Get the tss_log_msg from thread-specific storage. - return ACE_Log_Msg::key_created_ - && ACE_Thread::getspecific (*(log_msg_tss_key ()), &tss_log_msg) != -1 - && tss_log_msg != 0; -# else -# error "Platform must support thread-specific storage if threads are used." -# endif /* ACE_HAS_THREAD_SPECIFIC_STORAGE || ACE_HAS_TSS_EMULATION */ -#else /* ! ACE_MT_SAFE */ - return 1; -#endif /* ! ACE_MT_SAFE */ -} - -ACE_Log_Msg * -ACE_Log_Msg::instance (void) -{ -#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) -# if defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) || \ - defined (ACE_HAS_TSS_EMULATION) - // TSS Singleton implementation. - - if (!ACE_Log_Msg::key_created_) - { - ACE_thread_mutex_t *lock = - reinterpret_cast ( - ACE_OS_Object_Manager::preallocated_object - [ACE_OS_Object_Manager::ACE_LOG_MSG_INSTANCE_LOCK]); - - if (1 == ACE_OS_Object_Manager::starting_up()) - //This function is called before ACE_OS_Object_Manager is - //initialized. So the lock might not be valid. Assume it's - //single threaded and so don't need the lock. - ; - else - ACE_OS::thread_mutex_lock (lock); - - if (!ACE_Log_Msg::key_created_) - { - // Allocate the Singleton lock. - ACE_Log_Msg_Manager::get_lock (); - - { - ACE_NO_HEAP_CHECK; - if (ACE_Thread::keycreate (log_msg_tss_key (), - &ACE_TSS_CLEANUP_NAME) != 0) - { - if (1 == ACE_OS_Object_Manager::starting_up()) - //This function is called before ACE_OS_Object_Manager is - //initialized. So the lock might not be valid. Assume it's - //single threaded and so don't need the lock. - ; - else - ACE_OS::thread_mutex_unlock (lock); - return 0; // Major problems, this should *never* happen! - } - } - - ACE_Log_Msg::key_created_ = true; - } - - if (1 == ACE_OS_Object_Manager::starting_up()) - //This function is called before ACE_OS_Object_Manager is - //initialized. So the lock might not be valid. Assume it's - //single threaded and so don't need the lock. - ; - else - ACE_OS::thread_mutex_unlock (lock); - } - - ACE_Log_Msg *tss_log_msg = 0; - void *temp = 0; - - // Get the tss_log_msg from thread-specific storage. - if (ACE_Thread::getspecific (*(log_msg_tss_key ()), &temp) == -1) - return 0; // This should not happen! - - tss_log_msg = static_cast (temp); - - // Check to see if this is the first time in for this thread. - if (tss_log_msg == 0) - { - // Allocate memory off the heap and store it in a pointer in - // thread-specific storage (on the stack...). Stop heap - // checking, the memory will always be freed by the thread - // rundown because of the TSS callback set up when the key was - // created. This prevents from getting these blocks reported as - // memory leaks. - { - ACE_NO_HEAP_CHECK; - - ACE_NEW_RETURN (tss_log_msg, - ACE_Log_Msg, - 0); - // Store the dynamically allocated pointer in thread-specific - // storage. It gets deleted via the ACE_TSS_cleanup function - // when the thread terminates. - - if (ACE_Thread::setspecific (*(log_msg_tss_key()), - reinterpret_cast (tss_log_msg)) - != 0) - return 0; // Major problems, this should *never* happen! - } - } - - return tss_log_msg; -# else -# error "Platform must support thread-specific storage if threads are used." -# endif /* ACE_HAS_THREAD_SPECIFIC_STORAGE || ACE_HAS_TSS_EMULATION */ -#else /* ! ACE_MT_SAFE */ - // We don't have threads, we cannot call - // ACE_Log_Msg_Manager::get_lock () to initialize the logger - // callback, so instead we do it here. - if (ACE_Log_Msg_Manager::init_backend () == -1) - return 0; - - // Singleton implementation. - - if (log_msg_cleanup == 0) - { - ACE_NEW_RETURN (log_msg_cleanup, ACE_Msg_Log_Cleanup, 0); - // Register the instance for destruction at program termination. - ACE_Object_Manager::at_exit (log_msg_cleanup, - 0, - typeid (*log_msg_cleanup).name ()); - } - - return &log_msg_cleanup->object (); -#endif /* ! ACE_MT_SAFE */ -} - -// Not inlined to help prevent having to include OS.h just to -// get ACELIB_DEBUG, et al, macros. -int -ACE_Log_Msg::last_error_adapter (void) -{ - return ACE_OS::last_error (); -} - -// Sets the flag in the default priority mask used to initialize -// ACE_Log_Msg instances, as well as the current per-thread instance. - -void -ACE_Log_Msg::enable_debug_messages (ACE_Log_Priority priority) -{ - ACE_SET_BITS (ACE_Log_Msg::default_priority_mask_, priority); - ACE_Log_Msg *i = ACE_Log_Msg::instance (); - i->priority_mask (i->priority_mask () | priority); -} - -// Clears the flag in the default priority mask used to initialize -// ACE_Log_Msg instances, as well as the current per-thread instance. - -void -ACE_Log_Msg::disable_debug_messages (ACE_Log_Priority priority) -{ - ACE_CLR_BITS (ACE_Log_Msg::default_priority_mask_, priority); - ACE_Log_Msg *i = ACE_Log_Msg::instance (); - i->priority_mask (i->priority_mask () & ~priority); -} - -const ACE_TCHAR * -ACE_Log_Msg::program_name (void) -{ - return ACE_Log_Msg::program_name_; -} - -/// Name of the local host. -const ACE_TCHAR *ACE_Log_Msg::local_host_ = 0; - -/// Records the program name. -const ACE_TCHAR *ACE_Log_Msg::program_name_ = 0; - -/// Default is to use stderr. -u_long ACE_Log_Msg::flags_ = ACE_Log_Msg::STDERR; - -/// Current offset of msg_[]. -ptrdiff_t ACE_Log_Msg::msg_off_ = 0; - -/// Default per-thread priority mask -/// By default, no priorities are enabled. -u_long ACE_Log_Msg::default_priority_mask_ = 0; - -/// Default per-process priority mask -/// By default, all priorities are enabled. -u_long ACE_Log_Msg::process_priority_mask_ = LM_SHUTDOWN - | LM_TRACE - | LM_DEBUG - | LM_INFO - | LM_NOTICE - | LM_WARNING - | LM_STARTUP - | LM_ERROR - | LM_CRITICAL - | LM_ALERT - | LM_EMERGENCY; - -void -ACE_Log_Msg::close (void) -{ - // This call needs to go here to avoid memory leaks. - ACE_MT (ACE_Log_Msg_Manager::close ()); - - // Please note that this will be called by a statement that is - // harded coded into the ACE_Object_Manager's shutdown sequence, in - // its destructor. - -#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) && \ - (defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) || \ - defined (ACE_HAS_TSS_EMULATION)) - - if (ACE_Log_Msg::key_created_) - { - ACE_thread_mutex_t *lock = - reinterpret_cast - (ACE_OS_Object_Manager::preallocated_object - [ACE_OS_Object_Manager::ACE_LOG_MSG_INSTANCE_LOCK]); - if (lock) - ACE_OS::thread_mutex_lock (lock); - - if (ACE_Log_Msg::key_created_) - { - // Clean up this ACE_Log_Msg instance and reset the TSS to - // prevent any future cleanup attempts via TSS mechanisms at - // thread exit. Otherwise in the event of a dynamic library - // unload of libACE, by a program not linked with libACE, - // ACE_TSS_cleanup will be invoked after libACE has been unloaded. - // See Bugzilla 2980 for lots of details. - ACE_Log_Msg *tss_log_msg = 0; - void *temp = 0; - - // Get the tss_log_msg from thread-specific storage. - if (ACE_Thread::getspecific (*(log_msg_tss_key ()), &temp) != -1 - && temp) - { - tss_log_msg = static_cast (temp); - // we haven't been cleaned up - ACE_TSS_CLEANUP_NAME(tss_log_msg); - if (ACE_Thread::setspecific(*(log_msg_tss_key()), - reinterpret_cast (0)) != 0) - ACE_OS::printf ("ACE_Log_Msg::close failed to ACE_Thread::setspecific to 0\n"); - } - - // The key is not needed any longer; ACE_Log_Msg is closing - // and will need to be reopened if this process wishes to use - // logging again. So delete the key. - ACE_Thread::keyfree (*(log_msg_tss_key())); - ACE_Log_Msg::key_created_ = false; - } - - if (lock) - ACE_OS::thread_mutex_unlock (lock); - } -#endif /* (ACE_HAS_THREAD_SPECIFIC_STORAGE || ACE_HAS_TSS_EMULATION) && ACE_MT_SAFE */ -} - -void -ACE_Log_Msg::sync_hook (const ACE_TCHAR *prg_name) -{ - ACE_LOG_MSG->sync (prg_name); -} - -ACE_OS_Thread_Descriptor * -ACE_Log_Msg::thr_desc_hook (void) -{ - return ACE_LOG_MSG->thr_desc (); -} - -// Call after a fork to resynchronize the PID and PROGRAM_NAME -// variables. -void -ACE_Log_Msg::sync (const ACE_TCHAR *prog_name) -{ - ACE_TRACE ("ACE_Log_Msg::sync"); - - if (prog_name) - { - // Must free if already allocated!!! - ACE_OS::free ((void *) ACE_Log_Msg::program_name_); - - // Stop heap checking, block will be freed by the destructor when - // the last ACE_Log_Msg instance is deleted. - // Heap checking state will be restored when the block is left. - { - ACE_NO_HEAP_CHECK; - - ACE_Log_Msg::program_name_ = ACE_OS::strdup (prog_name); - } - } - - ACE_Log_Msg::msg_off_ = 0; -} - -u_long -ACE_Log_Msg::flags (void) -{ - ACE_TRACE ("ACE_Log_Msg::flags"); - u_long result; - ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon, - *ACE_Log_Msg_Manager::get_lock (), 0)); - - result = ACE_Log_Msg::flags_; - return result; -} - -void -ACE_Log_Msg::set_flags (u_long flgs) -{ - ACE_TRACE ("ACE_Log_Msg::set_flags"); - ACE_MT (ACE_GUARD (ACE_Recursive_Thread_Mutex, ace_mon, - *ACE_Log_Msg_Manager::get_lock ())); - - ACE_SET_BITS (ACE_Log_Msg::flags_, flgs); -} - -void -ACE_Log_Msg::clr_flags (u_long flgs) -{ - ACE_TRACE ("ACE_Log_Msg::clr_flags"); - ACE_MT (ACE_GUARD (ACE_Recursive_Thread_Mutex, ace_mon, - *ACE_Log_Msg_Manager::get_lock ())); - - ACE_CLR_BITS (ACE_Log_Msg::flags_, flgs); -} - -int -ACE_Log_Msg::acquire (void) -{ - ACE_TRACE ("ACE_Log_Msg::acquire"); -#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) - return ACE_Log_Msg_Manager::get_lock ()->acquire (); -#else /* ! ACE_MT_SAFE */ - return 0; -#endif /* ! ACE_MT_SAFE */ -} - -u_long -ACE_Log_Msg::priority_mask (u_long n_mask, MASK_TYPE mask_type) -{ - u_long o_mask; - - if (mask_type == THREAD) - { - o_mask = this->priority_mask_; - this->priority_mask_ = n_mask; - } - else - { - o_mask = ACE_Log_Msg::process_priority_mask_; - ACE_Log_Msg::process_priority_mask_ = n_mask; - } - - return o_mask; -} - -int -ACE_Log_Msg::release (void) -{ - ACE_TRACE ("ACE_Log_Msg::release"); - -#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) - return ACE_Log_Msg_Manager::get_lock ()->release (); -#else /* ! ACE_MT_SAFE */ - return 0; -#endif /* ! ACE_MT_SAFE */ -} - -ACE_Log_Msg::ACE_Log_Msg (void) - : status_ (0), - errnum_ (0), - linenum_ (0), - msg_ (0), - restart_ (1), // Restart by default... - ostream_ (0), - ostream_refcount_ (0), - msg_callback_ (0), - trace_depth_ (0), - trace_active_ (false), - tracing_enabled_ (true), // On by default? - thr_desc_ (0), - priority_mask_ (default_priority_mask_), - timestamp_ (0) -{ - // ACE_TRACE ("ACE_Log_Msg::ACE_Log_Msg"); - - ACE_MT (ACE_GUARD (ACE_Recursive_Thread_Mutex, ace_mon, - *ACE_Log_Msg_Manager::get_lock ())); - ++instance_count_; - - if (this->instance_count_ == 1) - ACE_Base_Thread_Adapter::set_log_msg_hooks (ACE_Log_Msg::init_hook, - ACE_Log_Msg::inherit_hook, - ACE_Log_Msg::close, - ACE_Log_Msg::sync_hook, - ACE_Log_Msg::thr_desc_hook); - - this->conditional_values_.is_set_ = false; - - char *timestamp = ACE_OS::getenv ("ACE_LOG_TIMESTAMP"); - if (timestamp != 0) - { - // If variable is set or is set to date tag so we print date and time. - if (ACE_OS::strcmp (timestamp, "TIME") == 0) - { - this->timestamp_ = 1; - } - else if (ACE_OS::strcmp (timestamp, "DATE") == 0) - { - this->timestamp_ = 2; - } - } - - ACE_NEW_NORETURN (this->msg_, ACE_TCHAR[ACE_MAXLOGMSGLEN+1]); -} - -ACE_Log_Msg::~ACE_Log_Msg (void) -{ -#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) - - int instance_count = 0; - - // Only hold the guard while updating the instance_count_. - // If ACE_Log_Msg_Manager::close () is called, the lock will - // be deleted. - { - ACE_MT (ACE_GUARD (ACE_Recursive_Thread_Mutex, ace_mon, - *ACE_Log_Msg_Manager::get_lock ())); - instance_count = --instance_count_; - } - // Release the guard. - -#else /* ! ACE_MT_SAFE */ - int instance_count = --instance_count_; -#endif /* ! ACE_MT_SAFE */ - - // If this is the last instance then cleanup. Only the last - // thread to destroy its ACE_Log_Msg instance should execute - // this block. - if (instance_count == 0) - { - // Destroy the message queue instance. - if (ACE_Log_Msg_Manager::log_backend_ != 0) - ACE_Log_Msg_Manager::log_backend_->close (); - - // Close down custom backend - if (ACE_Log_Msg_Manager::custom_backend_ != 0) - ACE_Log_Msg_Manager::custom_backend_->close (); - -# if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) -# if defined (ACE_HAS_TSS_EMULATION) - ACE_Log_Msg_Manager::close (); -# endif /* ACE_HAS_TSS_EMULATION */ -# endif /* ACE_MT_SAFE */ - - if (ACE_Log_Msg::program_name_) - { - ACE_OS::free ((void *) ACE_Log_Msg::program_name_); - ACE_Log_Msg::program_name_ = 0; - } - - if (ACE_Log_Msg::local_host_) - { - ACE_OS::free ((void *) ACE_Log_Msg::local_host_); - ACE_Log_Msg::local_host_ = 0; - } - } - - this->cleanup_ostream (); - - delete[] this->msg_; -} - -void -ACE_Log_Msg::cleanup_ostream () -{ - if (this->ostream_refcount_) - { - if (--*this->ostream_refcount_ == 0) - { - delete this->ostream_refcount_; -#if defined (ACE_LACKS_IOSTREAM_TOTALLY) - ACE_OS::fclose (this->ostream_); -#else - delete this->ostream_; - this->ostream_ = 0; -#endif - } - this->ostream_refcount_ = 0; - } -} - -// Open the sender-side of the message queue. - -int -ACE_Log_Msg::open (const ACE_TCHAR *prog_name, - u_long flags, - const ACE_TCHAR *logger_key) -{ - ACE_TRACE ("ACE_Log_Msg::open"); - ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon, - *ACE_Log_Msg_Manager::get_lock (), -1)); - - if (prog_name) - { - ACE_OS::free ((void *) ACE_Log_Msg::program_name_); - - // Stop heap checking, block will be freed by the destructor. - { - ACE_NO_HEAP_CHECK; - - ACE_ALLOCATOR_RETURN (ACE_Log_Msg::program_name_, - ACE_OS::strdup (prog_name), - -1); - } - } - else if (ACE_Log_Msg::program_name_ == 0) - { - // Stop heap checking, block will be freed by the destructor. - ACE_NO_HEAP_CHECK; - ACE_ALLOCATOR_RETURN (ACE_Log_Msg::program_name_, - ACE_OS::strdup (ACE_TEXT ("")), - -1); - } - - int status = 0; - - // Be sure that there is a message_queue_, with multiple threads. - ACE_MT (ACE_Log_Msg_Manager::init_backend (&flags)); - - // Always close the current handle before doing anything else. - if (ACE_Log_Msg_Manager::log_backend_ != 0) - ACE_Log_Msg_Manager::log_backend_->reset (); - - if (ACE_Log_Msg_Manager::custom_backend_ != 0) - ACE_Log_Msg_Manager::custom_backend_->reset (); - - // Note that if we fail to open the message queue the default action - // is to use stderr (set via static initialization in the - // Log_Msg.cpp file). - - if (ACE_BIT_ENABLED (flags, ACE_Log_Msg::LOGGER) - || ACE_BIT_ENABLED (flags, ACE_Log_Msg::SYSLOG)) - { - // The SYSLOG backends (both NT and UNIX) can get along fine - // without the logger_key - they will default to prog_name if - // logger key is 0. - if (logger_key == 0 && ACE_BIT_ENABLED (flags, ACE_Log_Msg::LOGGER)) - status = -1; - else - status = ACE_Log_Msg_Manager::log_backend_->open (logger_key); - - if (status == -1) - ACE_SET_BITS (ACE_Log_Msg::flags_, ACE_Log_Msg::STDERR); - else - { - if (ACE_BIT_ENABLED (flags, ACE_Log_Msg::LOGGER)) - ACE_SET_BITS (ACE_Log_Msg::flags_, ACE_Log_Msg::LOGGER); - if (ACE_BIT_ENABLED (flags, ACE_Log_Msg::SYSLOG)) - ACE_SET_BITS (ACE_Log_Msg::flags_, ACE_Log_Msg::SYSLOG); - } - } - else if (ACE_BIT_ENABLED (ACE_Log_Msg::flags_, ACE_Log_Msg::LOGGER) - || ACE_BIT_ENABLED (ACE_Log_Msg::flags_, ACE_Log_Msg::SYSLOG)) - { - // If we are closing down logger, redirect logging to stderr. - ACE_CLR_BITS (ACE_Log_Msg::flags_, ACE_Log_Msg::LOGGER); - ACE_CLR_BITS (ACE_Log_Msg::flags_, ACE_Log_Msg::SYSLOG); - ACE_SET_BITS (ACE_Log_Msg::flags_, ACE_Log_Msg::STDERR); - } - - if (ACE_BIT_ENABLED (flags, ACE_Log_Msg::CUSTOM)) - { - status = - ACE_Log_Msg_Manager::custom_backend_->open (logger_key); - - if (status != -1) - ACE_SET_BITS (ACE_Log_Msg::flags_, ACE_Log_Msg::CUSTOM); - } - - // Remember, ACE_Log_Msg::STDERR bit is on by default... - if (status != -1 - && ACE_BIT_ENABLED (flags, - ACE_Log_Msg::STDERR) == 0) - ACE_CLR_BITS (ACE_Log_Msg::flags_, - ACE_Log_Msg::STDERR); - - // VERBOSE takes precedence over VERBOSE_LITE... - if (ACE_BIT_ENABLED (flags, - ACE_Log_Msg::VERBOSE_LITE)) - ACE_SET_BITS (ACE_Log_Msg::flags_, - ACE_Log_Msg::VERBOSE_LITE); - else if (ACE_BIT_ENABLED (flags, - ACE_Log_Msg::VERBOSE)) - ACE_SET_BITS (ACE_Log_Msg::flags_, - ACE_Log_Msg::VERBOSE); - - if (ACE_BIT_ENABLED (flags, - ACE_Log_Msg::OSTREAM)) - { - ACE_SET_BITS (ACE_Log_Msg::flags_, - ACE_Log_Msg::OSTREAM); - // Only set this to cerr if it hasn't already been set. - if (this->msg_ostream () == 0) - this->msg_ostream (ACE_DEFAULT_LOG_STREAM); - } - - if (ACE_BIT_ENABLED (flags, - ACE_Log_Msg::MSG_CALLBACK)) - ACE_SET_BITS (ACE_Log_Msg::flags_, - ACE_Log_Msg::MSG_CALLBACK); - - if (ACE_BIT_ENABLED (flags, - ACE_Log_Msg::SILENT)) - ACE_SET_BITS (ACE_Log_Msg::flags_, - ACE_Log_Msg::SILENT); - - return status; -} - -/** - * Valid Options (prefixed by '%', as in printf format strings) include: - * 'A': print an ACE_timer_t value - * 'a': exit the program at this point (var-argument is the exit status!) - * 'b': print a ssize_t value - * 'B': print a size_t value - * 'c': print a character - * 'C': print a character string - * 'i', 'd': print a decimal number - * 'I', indent according to nesting depth - * 'e', 'E', 'f', 'F', 'g', 'G': print a double - * 'l', print line number where an error occurred. - * 'M': print the name of the priority of the message. - * 'm': Return the message corresponding to errno value, e.g., as done by - * 'N': print file name where the error occurred. - * 'n': print the name of the program (or "" if not set) - * 'o': print as an octal number - * 'P': format the current process id - * 'p': format the appropriate errno message from sys_errlist, e.g., as done by - * 'Q': print out the uint64 number - * 'q': print out the int64 number - * '@': print a void* pointer (in hexadecimal) - * 'r': call the function pointed to by the corresponding argument - * 'R': print return status - * 'S': print out the appropriate signal message corresponding - * to var-argument, e.g., as done by strsignal() - * 's': format a character string - * 'T': print timestamp in hour:minute:sec:usec format. - * 'D': print timestamp in month/day/year hour:minute:sec:usec format. - * 't': print thread id (1 if single-threaded) - * 'u': print as unsigned int - * 'x': print as a hex number - * 'X': print as a hex number - * 'w': print a wide character - * 'W': print out a wide character string. - * 'z': print an ACE_OS::WChar character - * 'Z': print an ACE_OS::WChar character string - * ':': print a time_t value as an integral number - * '%': format a single percent sign, '%' - */ -ssize_t -ACE_Log_Msg::log (ACE_Log_Priority log_priority, - const ACE_TCHAR *format_str, ...) -{ - ACE_TRACE ("ACE_Log_Msg::log"); - - // Start of variable args section. - va_list argp; - - va_start (argp, format_str); - - ssize_t const result = this->log (format_str, - log_priority, - argp); - va_end (argp); - - return result; -} - -#if defined (ACE_HAS_WCHAR) -/** - * Since this is the ANTI_TCHAR version, we need to convert - * the format string over. - */ -ssize_t -ACE_Log_Msg::log (ACE_Log_Priority log_priority, - const ACE_ANTI_TCHAR *format_str, ...) -{ - ACE_TRACE ("ACE_Log_Msg::log"); - - // Start of variable args section. - va_list argp; - - va_start (argp, format_str); - - ssize_t const result = this->log (ACE_TEXT_ANTI_TO_TCHAR (format_str), - log_priority, - argp); - va_end (argp); - - return result; -} -#endif /* ACE_HAS_WCHAR */ - -ssize_t -ACE_Log_Msg::log (const ACE_TCHAR *format_str, - ACE_Log_Priority log_priority, - va_list argp, - ACE_Log_Category_TSS* category) -{ - ACE_TRACE ("ACE_Log_Msg::log"); - // External decls. - - typedef void (*PTF)(...); - - // Check if there were any conditional values set. - bool const conditional_values = this->conditional_values_.is_set_; - - // Reset conditional values. - this->conditional_values_.is_set_ = false; - - // Only print the message if hasn't been reset to - // exclude this logging priority. - if (this->log_priority_enabled (log_priority) == 0) - return 0; - - // If conditional values were set and the log priority is correct, - // then the values are actually set. - if (conditional_values) - this->set (this->conditional_values_.file_, - this->conditional_values_.line_, - this->conditional_values_.op_status_, - this->conditional_values_.errnum_, - this->restart (), - this->msg_ostream (), - this->msg_callback ()); - - // Logging is supposed to be a benign activity (i.e., not interfer - // with normal application operations), so don't inadvertently smash - // errno! - ACE_Errno_Guard guard (errno); - - ACE_Log_Record log_record (log_priority, - ACE_OS::gettimeofday (), - this->getpid ()); - - log_record.category(category); - - // bp is pointer to where to put next part of logged message. - // bspace is the number of characters remaining in msg_. - ACE_TCHAR *bp = const_cast (this->msg ()); - size_t bspace = ACE_MAXLOGMSGLEN; // Leave room for Nul term. - if (this->msg_off_ <= ACE_Log_Record::MAXLOGMSGLEN) - bspace -= static_cast (this->msg_off_); - - // If this platform has snprintf() capability to prevent overrunning the - // output buffer, use it. To avoid adding a maintenance-hassle compile- - // time couple between here and OS.cpp, don't try to figure this out at - // compile time. Instead, do a quick check now; if we get a -1 return, - // the platform doesn't support the length-limiting capability. - ACE_TCHAR test[2]; - bool can_check = ACE_OS::snprintf (test, 1, ACE_TEXT ("x")) != -1; - - bool abort_prog = false; - int exit_value = 0; - - // Retrieve the flags in a local variable on the stack, it is - // accessed by multiple threads and within this operation we - // check it several times, so this way we only lock once - u_long flags = this->flags (); - - if (ACE_BIT_ENABLED (flags, ACE_Log_Msg::VERBOSE)) - { - // Prepend the program name onto this message - if (ACE_Log_Msg::program_name_ != 0) - { - for (const ACE_TCHAR *s = ACE_Log_Msg::program_name_; - bspace > 1 && (*bp = *s) != '\0'; - ++s, --bspace) - bp++; - - *bp++ = '|'; - --bspace; - } - } - - if (timestamp_ > 0) - { - ACE_TCHAR day_and_time[27]; - const ACE_TCHAR *s = 0; - if (timestamp_ == 1) - { - // Print just the time - s = ACE::timestamp (day_and_time, - sizeof (day_and_time) / sizeof (ACE_TCHAR), - true); - } - else - { - // Print time and date - ACE::timestamp (day_and_time, - sizeof (day_and_time) / sizeof (ACE_TCHAR)); - s = day_and_time; - } - - for (; bspace > 1 && (*bp = *s) != '\0'; ++s, --bspace) - ++bp; - - *bp++ = '|'; - --bspace; - } - - while (*format_str != '\0' && bspace > 0) - { - // Copy input to output until we encounter a %, however a - // % followed by another % is not a format specification. - - if (*format_str != '%') - { - *bp++ = *format_str++; - --bspace; - } - else if (format_str[1] == '%') // An "escaped" '%' (just print one '%'). - { - *bp++ = *format_str++; // Store first % - ++format_str; // but skip second % - --bspace; - } - else - { - // This is most likely a format specification that ends with - // one of the valid options described previously. To enable full - // use of all sprintf capabilities, save the format specifier - // from the '%' up to the format letter in a new char array. - // This allows the full sprintf capability for padding, field - // widths, alignment, etc. Any width/precision requiring a - // caller-supplied argument is extracted and placed as text - // into the format array. Lastly, we convert the caller-supplied - // format specifier from the ACE_Log_Msg-supported list to the - // equivalent sprintf specifier, and run the new format spec - // through sprintf, adding it to the bp string. - - const ACE_TCHAR *abort_str = ACE_TEXT ("Aborting..."); - const ACE_TCHAR *start_format = format_str; - ACE_TCHAR format[128]; // Converted format string - ACE_OS::memset (format, '\0', 128); // Set this string to known values. - ACE_TCHAR *fp = 0; // Current format pointer - int wp = 0; // Width/precision extracted from args - bool done = false; - bool skip_nul_locate = false; - int this_len = 0; // How many chars s[n]printf wrote - - fp = format; - *fp++ = *format_str++; // Copy in the % - - // Initialization to satisfy VC6 - int tmp_indent = 0; - // Work through the format string to copy in the format - // from the caller. While it's going across, extract ints - // for '*' width/precision values from the argument list. - // When the real format specifier is located, change it to - // one recognized by sprintf, if needed, and do the sprintf - // call. - - while (!done) - { - done = true; // Unless a conversion spec changes it - - switch (*format_str) - { - // The initial set of cases are the conversion - // specifiers. Copy them in to the format array. - // Note we don't use 'l', a normal conversion spec, - // as a conversion because it is a ACE_Log_Msg format - // specifier. - case '-': - case '+': - case '0': - case ' ': - case '#': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - case '.': - case 'L': - case 'h': - *fp++ = *format_str; - done = false; - break; - - case '*': - wp = va_arg (argp, int); - ACE_OS::sprintf (fp, ACE_TEXT ("%d"), wp); - fp += ACE_OS::strlen (fp); - done = false; - break; - - case 'A': // ACE_timer_t - { - ACE_OS::strcpy (fp, ACE_TEXT ("f")); - double const value = va_arg (argp, double); - if (can_check) - this_len = ACE_OS::snprintf (bp, bspace, format, value); - else - this_len = ACE_OS::sprintf (bp, format, value); - ACE_UPDATE_COUNT (bspace, this_len); - } - break; - - case 'a': // Abort program after handling all of format string. - abort_prog = true; - exit_value = va_arg (argp, int); - ACE_OS::strsncpy (bp, abort_str, bspace); - if (bspace > ACE_OS::strlen (abort_str)) - bspace -= ACE_OS::strlen (abort_str); - else - bspace = 0; - break; - - case 'l': // Source file line number - ACE_OS::strcpy (fp, ACE_TEXT ("d")); - if (can_check) - this_len = ACE_OS::snprintf (bp, - bspace, - format, - this->linenum ()); - else - this_len = ACE_OS::sprintf (bp, format, this->linenum ()); - ACE_UPDATE_COUNT (bspace, this_len); - break; - - case 'N': // Source file name -#if !defined (ACE_WIN32) && defined (ACE_USES_WCHAR) - ACE_OS::strcpy (fp, ACE_TEXT ("ls")); -#else - ACE_OS::strcpy (fp, ACE_TEXT ("s")); -#endif - if (can_check) - this_len = ACE_OS::snprintf (bp, bspace, format, - this->file () ? - ACE_TEXT_CHAR_TO_TCHAR (this->file ()) - : ACE_TEXT ("")); - else - this_len = ACE_OS::sprintf (bp, format, - this->file () ? - ACE_TEXT_CHAR_TO_TCHAR (this->file ()) - : ACE_TEXT ("")); - ACE_UPDATE_COUNT (bspace, this_len); - break; - - case 'n': // Program name -#if !defined (ACE_WIN32) && defined (ACE_USES_WCHAR) - ACE_OS::strcpy (fp, ACE_TEXT ("ls")); -#else /* ACE_WIN32 && ACE_USES_WCHAR */ - ACE_OS::strcpy (fp, ACE_TEXT ("s")); -#endif - if (can_check) - this_len = ACE_OS::snprintf (bp, bspace, format, - ACE_Log_Msg::program_name_ ? - ACE_Log_Msg::program_name_ : - ACE_TEXT ("")); - else - this_len = ACE_OS::sprintf (bp, format, - ACE_Log_Msg::program_name_ ? - ACE_Log_Msg::program_name_ : - ACE_TEXT ("")); - ACE_UPDATE_COUNT (bspace, this_len); - break; - - case 'P': // Process ID -#if defined (ACE_OPENVMS) - // Print the process id in hex on OpenVMS. - ACE_OS::strcpy (fp, ACE_TEXT ("x")); -#else - ACE_OS::strcpy (fp, ACE_TEXT ("d")); -#endif - if (can_check) - this_len = ACE_OS::snprintf - (bp, bspace, format, - static_cast (this->getpid ())); - else - this_len = ACE_OS::sprintf - (bp, format, static_cast (this->getpid ())); - ACE_UPDATE_COUNT (bspace, this_len); - break; - - case 'p': // string, ala perror() - { - errno = 0; - char *msg = ACE_OS::strerror (ACE::map_errno (this->errnum ())); - // Windows can try to translate the errnum using - // system calls if strerror() doesn't get anything useful. -#if defined (ACE_WIN32) - if (errno == 0) - { -#endif - -#if !defined (ACE_WIN32) && defined (ACE_USES_WCHAR) - ACE_OS::strcpy (fp, ACE_TEXT ("ls: %ls")); - wchar_t *str = va_arg (argp, wchar_t *); -#else - ACE_OS::strcpy (fp, ACE_TEXT ("s: %s")); - ACE_TCHAR *str = va_arg (argp, ACE_TCHAR *); -#endif - if (can_check) - this_len = ACE_OS::snprintf - (bp, bspace, format, - str ? str : ACE_TEXT ("(null)"), - ACE_TEXT_CHAR_TO_TCHAR (msg)); - else - this_len = ACE_OS::sprintf - (bp, format, - str ? str : ACE_TEXT ("(null)"), - ACE_TEXT_CHAR_TO_TCHAR (msg)); -#if defined (ACE_WIN32) - } - else - { - errno = ACE::map_errno (this->errnum ()); - ACE_TCHAR *lpMsgBuf = 0; - - // PharLap can't do FormatMessage, so try for socket - // error. -# if !defined (ACE_HAS_PHARLAP) - ACE_TEXT_FormatMessage (FORMAT_MESSAGE_ALLOCATE_BUFFER - | FORMAT_MESSAGE_MAX_WIDTH_MASK - | FORMAT_MESSAGE_FROM_SYSTEM, - 0, - errno, - MAKELANGID (LANG_NEUTRAL, - SUBLANG_DEFAULT), - // Default language - (ACE_TCHAR *) &lpMsgBuf, - 0, - 0); -# endif /* ACE_HAS_PHARLAP */ - - // If we don't get a valid response from - // , we'll assume this is a - // WinSock error and so we'll try to convert - // it into a string. If this doesn't work it - // returns "unknown error" which is fine for - // our purposes. - ACE_TCHAR *str = va_arg (argp, ACE_TCHAR *); - if (lpMsgBuf == 0) - { - const ACE_TCHAR *message = - ACE::sock_error (errno); - ACE_OS::strcpy (fp, ACE_TEXT ("s: %s")); - if (can_check) - this_len = ACE_OS::snprintf - (bp, bspace, format, - str ? str : ACE_TEXT ("(null)"), - message); - else - this_len = ACE_OS::sprintf - (bp, format, - str ? str : ACE_TEXT ("(null)"), - message); - } - else - { - ACE_OS::strcpy (fp, ACE_TEXT ("s: %s")); - if (can_check) - this_len = ACE_OS::snprintf - (bp, bspace, format, - str ? str : ACE_TEXT ("(null)"), - lpMsgBuf); - else - this_len = ACE_OS::sprintf - (bp, format, - str ? str : ACE_TEXT ("(null)"), - lpMsgBuf); - // Free the buffer. - ::LocalFree (lpMsgBuf); - } - } -#endif /* ACE_WIN32 */ - ACE_UPDATE_COUNT (bspace, this_len); - break; - } - - case 'M': // Print the name of the priority of the message. - - // Look at the format precision specifier. .1 is interpreted - // as a single character printout, otherwise we print the name of - // the priority. - - // So, did we find a .1 specifier? Do we need to override it? - if (format[1] == ACE_TEXT('.') && - format[2] == ACE_TEXT('1')) - { - // Yup. - // Print a single character signifying the severity of the message - fp = format; - fp++; - -# if defined (ACE_USES_WCHAR) - -# if defined (ACE_WIN32) // Windows uses 'c' for a wide character - ACE_OS::strcpy (fp, ACE_TEXT ("c")); -# else // Other platforms behave differently -# if defined (HPUX) // HP-Unix compatible - ACE_OS::strcpy (fp, ACE_TEXT ("C")); -# else // Other - ACE_OS::strcpy (fp, ACE_TEXT ("lc")); -# endif /* HPUX */ -# endif - -# else /* ACE_USES_WCHAR */ - - // Non-unicode builds simply use a standard character format specifier - ACE_OS::strcpy (fp, ACE_TEXT ("c")); - -# endif /* ACE_USES_WCHAR */ - - // Below is an optimized (binary search based) - // version of the following simple piece of code: - // - // log_priority == LM_SHUTDOWN ? 'S' : // Shutdown - // log_priority == LM_TRACE ? 'T' : // Trace - // log_priority == LM_DEBUG ? 'D' : // Debug - // log_priority == LM_INFO ? 'I' : // Info - // log_priority == LM_NOTICE ? 'N' : // Notice - // log_priority == LM_WARNING ? 'W' : // Warning - // log_priority == LM_STARTUP ? 'U' : // Startup - // log_priority == LM_ERROR ? 'E' : // Error - // log_priority == LM_CRITICAL ? 'C' : // Critical - // log_priority == LM_ALERT ? 'A' : // Alert - // log_priority == LM_EMERGENCY ? '!' : // Emergency - // '?' // Unknown - - if (can_check) - { - this_len = ACE_OS::snprintf - (bp, bspace, format, -#if !defined (ACE_USES_WCHAR) || defined (ACE_WIN32) - (int) -#else - (wint_t) -#endif - (log_priority <= LM_WARNING) ? - (log_priority <= LM_DEBUG) ? - (log_priority <= LM_TRACE) ? - (log_priority == LM_SHUTDOWN) ? - ACE_TEXT('S') : ACE_TEXT('T') : ACE_TEXT('D') : - (log_priority <= LM_NOTICE) ? - (log_priority == LM_INFO) ? - ACE_TEXT('I') : ACE_TEXT('N') : ACE_TEXT('W') : - (log_priority <= LM_CRITICAL) ? - (log_priority <= LM_ERROR) ? - (log_priority == LM_STARTUP) ? - ACE_TEXT('U') : ACE_TEXT('E') : ACE_TEXT('C') : - (log_priority <= LM_EMERGENCY) ? - (log_priority == LM_ALERT) ? - ACE_TEXT('A') : ACE_TEXT('!') : ACE_TEXT('?')); - } - else - { - this_len = ACE_OS::sprintf - (bp, format, -#if !defined (ACE_USES_WCHAR) || defined (ACE_WIN32) - (int) -#else - (wint_t) -#endif - (log_priority <= LM_WARNING) ? - (log_priority <= LM_DEBUG) ? - (log_priority <= LM_TRACE) ? - (log_priority == LM_SHUTDOWN) ? - ACE_TEXT('S') : ACE_TEXT('T') : ACE_TEXT('D') : - (log_priority <= LM_NOTICE) ? - (log_priority == LM_INFO) ? - ACE_TEXT('I') : ACE_TEXT('N') : ACE_TEXT('W') : - (log_priority <= LM_CRITICAL) ? - (log_priority <= LM_ERROR) ? - (log_priority == LM_STARTUP) ? - ACE_TEXT('U') : ACE_TEXT('E') : ACE_TEXT('C') : - (log_priority <= LM_EMERGENCY) ? - (log_priority == LM_ALERT) ? - ACE_TEXT('A') : ACE_TEXT('!') : ACE_TEXT('?')); - } - - ACE_UPDATE_COUNT (bspace, this_len); - } - else - { - // Nope, print out standard priority_name() string - -#if !defined (ACE_WIN32) && defined (ACE_USES_WCHAR) - ACE_OS::strcpy (fp, ACE_TEXT ("ls")); -#else - ACE_OS::strcpy (fp, ACE_TEXT ("s")); -#endif - if (can_check) - this_len = ACE_OS::snprintf - (bp, bspace, format, - ACE_Log_Record::priority_name (log_priority)); - else - this_len = ACE_OS::sprintf - (bp, format, - ACE_Log_Record::priority_name (log_priority)); - ACE_UPDATE_COUNT (bspace, this_len); - } - break; - - case 'm': // Format the string assocated with the errno value. - { - errno = 0; - char *msg = ACE_OS::strerror (ACE::map_errno (this->errnum ())); - // Windows can try to translate the errnum using - // system calls if strerror() doesn't get anything useful. -#if defined (ACE_WIN32) - if (errno == 0) - { -#endif - -#if !defined (ACE_WIN32) && defined (ACE_USES_WCHAR) - ACE_OS::strcpy (fp, ACE_TEXT ("ls")); -#else /* ACE_WIN32 && ACE_USES_WCHAR */ - ACE_OS::strcpy (fp, ACE_TEXT ("s")); -#endif - if (can_check) - this_len = ACE_OS::snprintf - (bp, bspace, format, ACE_TEXT_CHAR_TO_TCHAR (msg)); - else - this_len = ACE_OS::sprintf - (bp, format, ACE_TEXT_CHAR_TO_TCHAR (msg)); -#if defined (ACE_WIN32) - } - else - { - errno = ACE::map_errno (this->errnum ()); - ACE_TCHAR *lpMsgBuf = 0; - - // PharLap can't do FormatMessage, so try for socket - // error. -# if !defined (ACE_HAS_PHARLAP) - ACE_TEXT_FormatMessage (FORMAT_MESSAGE_ALLOCATE_BUFFER - | FORMAT_MESSAGE_MAX_WIDTH_MASK - | FORMAT_MESSAGE_FROM_SYSTEM, - 0, - errno, - MAKELANGID (LANG_NEUTRAL, - SUBLANG_DEFAULT), - // Default language - (ACE_TCHAR *) &lpMsgBuf, - 0, - 0); -# endif /* ACE_HAS_PHARLAP */ - - // If we don't get a valid response from - // , we'll assume this is a - // WinSock error and so we'll try to convert - // it into a string. If this doesn't work it - // returns "unknown error" which is fine for - // our purposes. - if (lpMsgBuf == 0) - { - const ACE_TCHAR *message = - ACE::sock_error (errno); - ACE_OS::strcpy (fp, ACE_TEXT ("s")); - if (can_check) - this_len = ACE_OS::snprintf - (bp, bspace, format, message); - else - this_len = ACE_OS::sprintf (bp, format, message); - } - else - { - ACE_OS::strcpy (fp, ACE_TEXT ("s")); - if (can_check) - this_len = ACE_OS::snprintf - (bp, bspace, format, lpMsgBuf); - else - this_len = ACE_OS::sprintf - (bp, format, lpMsgBuf); - // Free the buffer. - ::LocalFree (lpMsgBuf); - } - } -#endif /* ACE_WIN32 */ - ACE_UPDATE_COUNT (bspace, this_len); - break; - } - - case 'R': // Format the return status of the operation. - this->op_status (va_arg (argp, int)); - ACE_OS::strcpy (fp, ACE_TEXT ("d")); - if (can_check) - this_len = ACE_OS::snprintf - (bp, bspace, format, this->op_status ()); - else - this_len = ACE_OS::sprintf - (bp, format, this->op_status ()); - ACE_UPDATE_COUNT (bspace, this_len); - break; - - case '{': // Increment the trace_depth, then indent - skip_nul_locate = true; - (void) this->inc (); - break; - - case '}': // indent, then decrement trace_depth - skip_nul_locate = true; - (void) this->dec (); - break; - - case '$': // insert a newline, then indent the next line - // according to %I - *bp++ = '\n'; - --bspace; - /* fallthrough */ - - case 'I': // Indent with nesting_depth*width spaces - // Caller can do %*I to override nesting indent, and - // if %*I was done, wp has the extracted width. -#if defined (ACE_HAS_TRACE) - if (0 == wp) - wp = ACE_Trace::get_nesting_indent (); -#else - if (0 == wp) - wp = 4; -#endif /* ACE_HAS_TRACE */ - wp *= this->trace_depth_; - if (static_cast (wp) > bspace) - wp = static_cast (bspace); - for (tmp_indent = wp; - tmp_indent; - --tmp_indent) - *bp++ = ' '; - - *bp = '\0'; - bspace -= static_cast (wp); - skip_nul_locate = true; - break; - - case 'r': // Run (invoke) this subroutine. - { - ptrdiff_t const osave = ACE_Log_Msg::msg_off_; - - if (ACE_BIT_ENABLED (flags, - ACE_Log_Msg::SILENT) && - bspace > 1) - { - *bp++ = '{'; - --bspace; - } - ACE_Log_Msg::msg_off_ = bp - this->msg_; - - (*va_arg (argp, PTF))(); - - if (ACE_BIT_ENABLED (flags, - ACE_Log_Msg::SILENT) && - bspace > (1 + ACE_OS::strlen (bp))) - { - bspace -= (ACE_OS::strlen (bp) + 1); - bp += ACE_OS::strlen (bp); - *bp++ = '}'; - } - *bp = '\0'; - skip_nul_locate = true; - ACE_Log_Msg::msg_off_ = osave; - break; - } - - case 'S': // format the string for with this signal number. - { - const int sig = va_arg (argp, int); - ACE_OS::strcpy (fp, ACE_TEXT ("s")); - if (can_check) - this_len = ACE_OS::snprintf - (bp, bspace, format, ACE_OS::strsignal(sig)); - else - this_len = ACE_OS::sprintf - (bp, format, ACE_OS::strsignal(sig)); - ACE_UPDATE_COUNT (bspace, this_len); - break; - } - - case 'D': // Format the timestamp in format: - // yyyy-mm-dd hour:minute:sec.usec - // This is a maximum of 27 characters - // including terminator. - { - ACE_TCHAR day_and_time[27]; - // Did we find the flag indicating a time value argument - if (format[1] == ACE_TEXT('#')) - { - ACE_Time_Value* time_value = va_arg (argp, ACE_Time_Value*); - ACE::timestamp (*time_value, - day_and_time, - sizeof (day_and_time) / sizeof (ACE_TCHAR)); - } - else - { - ACE::timestamp (day_and_time, - sizeof (day_and_time) / sizeof (ACE_TCHAR)); - } -#if !defined (ACE_WIN32) && defined (ACE_USES_WCHAR) - ACE_OS::strcpy (fp, ACE_TEXT ("ls")); -#else - ACE_OS::strcpy (fp, ACE_TEXT ("s")); -#endif - if (can_check) - this_len = ACE_OS::snprintf - (bp, bspace, format, day_and_time); - else - this_len = ACE_OS::sprintf (bp, format, day_and_time); - ACE_UPDATE_COUNT (bspace, this_len); - break; - } - - case 'T': // Format the timestamp in - // hour:minute:sec.usec format. - { - ACE_TCHAR day_and_time[27]; -#if !defined (ACE_WIN32) && defined (ACE_USES_WCHAR) - ACE_OS::strcpy (fp, ACE_TEXT ("ls")); -#else - ACE_OS::strcpy (fp, ACE_TEXT ("s")); -#endif - // Did we find the flag indicating a time value argument - if (format[1] == ACE_TEXT('#')) - { - ACE_Time_Value* time_value = va_arg (argp, ACE_Time_Value*); - if (can_check) - this_len = ACE_OS::snprintf - (bp, bspace, format, - ACE::timestamp (*time_value, - day_and_time, - sizeof day_and_time / sizeof (ACE_TCHAR))); - else - this_len = ACE_OS::sprintf - (bp, format, ACE::timestamp (*time_value, - day_and_time, - sizeof day_and_time / sizeof (ACE_TCHAR))); - } - else - { - if (can_check) - this_len = ACE_OS::snprintf - (bp, bspace, format, - ACE::timestamp (day_and_time, sizeof day_and_time / sizeof (ACE_TCHAR))); - else - this_len = ACE_OS::sprintf - (bp, format, ACE::timestamp (day_and_time, - sizeof day_and_time / sizeof (ACE_TCHAR))); - } - ACE_UPDATE_COUNT (bspace, this_len); - break; - } - - case 't': // Format thread id. -#if defined (ACE_WIN32) - ACE_OS::strcpy (fp, ACE_TEXT ("u")); - if (can_check) - this_len = ACE_OS::snprintf - (bp, bspace, format, - static_cast (ACE_Thread::self ())); - else - this_len = - ACE_OS::sprintf (bp, - format, - static_cast (ACE_Thread::self ())); -#else - ACE_hthread_t t_id; - ACE_OS::thr_self (t_id); - - // Yes, this is an ugly C-style cast, but the correct - // C++ cast is different depending on whether the t_id - // is an integral type or a pointer type. FreeBSD uses - // a pointer type, but doesn't have a _np function to - // get an integral type, like the OSes above. - ACE_OS::strcpy (fp, ACE_TEXT ("lu")); - if (can_check) - this_len = ACE_OS::snprintf - (bp, bspace, format, (unsigned long)t_id); - else - this_len = ACE_OS::sprintf - (bp, format, (unsigned long)t_id); - -#endif /* ACE_WIN32 */ - ACE_UPDATE_COUNT (bspace, this_len); - break; - - case 's': // String - { -#if !defined (ACE_WIN32) && defined (ACE_USES_WCHAR) - wchar_t *str = va_arg (argp, wchar_t *); - ACE_OS::strcpy (fp, ACE_TEXT ("ls")); -#else /* ACE_WIN32 && ACE_USES_WCHAR */ - ACE_TCHAR *str = va_arg (argp, ACE_TCHAR *); - ACE_OS::strcpy (fp, ACE_TEXT ("s")); -#endif /* ACE_WIN32 && ACE_USES_WCHAR */ - if (can_check) - this_len = ACE_OS::snprintf - (bp, bspace, format, str ? str : ACE_TEXT ("(null)")); - else - this_len = ACE_OS::sprintf - (bp, format, str ? str : ACE_TEXT ("(null)")); - ACE_UPDATE_COUNT (bspace, this_len); - } - break; - - case 'C': // Narrow-char string - { - char *cstr = va_arg (argp, char *); -#if defined (ACE_WIN32) && defined (ACE_USES_WCHAR) - ACE_OS::strcpy (fp, ACE_TEXT ("S")); -#else /* ACE_WIN32 && ACE_USES_WCHAR */ - ACE_OS::strcpy (fp, ACE_TEXT ("s")); -#endif /* ACE_WIN32 && ACE_USES_WCHAR */ - if (can_check) - this_len = ACE_OS::snprintf - (bp, bspace, format, cstr ? cstr : "(null)"); - else - this_len = ACE_OS::sprintf - (bp, format, cstr ? cstr : "(null)"); - ACE_UPDATE_COUNT (bspace, this_len); - } - break; - - case 'W': - { -#if defined (ACE_HAS_WCHAR) - wchar_t *wchar_str = va_arg (argp, wchar_t *); -# if defined (HPUX) - ACE_OS::strcpy (fp, ACE_TEXT ("S")); -# elif defined (ACE_WIN32) -# if defined (ACE_USES_WCHAR) - ACE_OS::strcpy (fp, ACE_TEXT ("s")); -# else /* ACE_USES_WCHAR */ - ACE_OS::strcpy (fp, ACE_TEXT ("S")); -# endif /* ACE_USES_WCHAR */ -# else - ACE_OS::strcpy (fp, ACE_TEXT ("ls")); -# endif /* HPUX */ - if (can_check) - this_len = ACE_OS::snprintf - (bp, bspace, format, wchar_str ? wchar_str : ACE_TEXT_WIDE("(null)")); - else - this_len = ACE_OS::sprintf - (bp, format, wchar_str ? wchar_str : ACE_TEXT_WIDE("(null)")); -#endif /* ACE_HAS_WCHAR */ - ACE_UPDATE_COUNT (bspace, this_len); - } - break; - - case 'w': // Wide character -#if defined (ACE_WIN32) -# if defined (ACE_USES_WCHAR) - ACE_OS::strcpy (fp, ACE_TEXT ("c")); -# else /* ACE_USES_WCHAR */ - ACE_OS::strcpy (fp, ACE_TEXT ("C")); -# endif /* ACE_USES_WCHAR */ - if (can_check) - this_len = ACE_OS::snprintf - (bp, bspace, format, va_arg (argp, int)); - else - this_len = ACE_OS::sprintf - (bp, format, va_arg (argp, int)); -#elif defined (ACE_USES_WCHAR) -# if defined (HPUX) - ACE_OS::strcpy (fp, ACE_TEXT ("C")); -# else - ACE_OS::strcpy (fp, ACE_TEXT ("lc")); -# endif /* HPUX */ - if (can_check) - this_len = ACE_OS::snprintf - (bp, bspace, format, va_arg (argp, wint_t)); - else - this_len = ACE_OS::sprintf - (bp, format, va_arg (argp, wint_t)); -#else /* ACE_WIN32 */ - ACE_OS::strcpy (fp, ACE_TEXT ("u")); - if (can_check) - this_len = ACE_OS::snprintf - (bp, bspace, format, va_arg (argp, int)); - else - this_len = ACE_OS::sprintf - (bp, format, va_arg (argp, int)); -#endif /* ACE_WIN32 */ - ACE_UPDATE_COUNT (bspace, this_len); - break; - - case 'z': // ACE_OS::WChar character - { - // On some platforms sizeof (wchar_t) can be 2 - // on the others 4 ... - wchar_t wtchar = - static_cast (va_arg (argp, int)); -#if defined (ACE_WIN32) -# if defined (ACE_USES_WCHAR) - ACE_OS::strcpy (fp, ACE_TEXT ("c")); -# else /* ACE_USES_WCHAR */ - ACE_OS::strcpy (fp, ACE_TEXT ("C")); -# endif /* ACE_USES_WCHAR */ -#elif defined (ACE_USES_WCHAR) -# if defined (HPUX) - ACE_OS::strcpy (fp, ACE_TEXT ("C")); -# else - ACE_OS::strcpy (fp, ACE_TEXT ("lc")); -# endif /* HPUX */ -#else /* ACE_WIN32 */ - ACE_OS::strcpy (fp, ACE_TEXT ("u")); -#endif /* ACE_WIN32 */ - if (can_check) - this_len = ACE_OS::snprintf (bp, bspace, format, wtchar); - else - this_len = ACE_OS::sprintf (bp, format, wtchar); - ACE_UPDATE_COUNT (bspace, this_len); - break; - } - - case 'Z': // ACE_OS::WChar character string - { - ACE_OS::WChar *wchar_str = va_arg (argp, ACE_OS::WChar*); - if (wchar_str == 0) - break; - - wchar_t *wchar_t_str = 0; - if (sizeof (ACE_OS::WChar) != sizeof (wchar_t)) - { - size_t len = ACE_OS::wslen (wchar_str) + 1; - ACE_NEW_NORETURN(wchar_t_str, wchar_t[len]); - if (wchar_t_str == 0) - break; - - for (size_t i = 0; i < len; ++i) - { - wchar_t_str[i] = wchar_str[i]; - } - } - - if (wchar_t_str == 0) - { - wchar_t_str = reinterpret_cast (wchar_str); - } -#if defined (ACE_WIN32) -# if defined (ACE_USES_WCHAR) - ACE_OS::strcpy (fp, ACE_TEXT ("s")); -# else /* ACE_USES_WCHAR */ - ACE_OS::strcpy (fp, ACE_TEXT ("S")); -# endif /* ACE_USES_WCHAR */ -#elif defined (ACE_HAS_WCHAR) -# if defined (HPUX) - ACE_OS::strcpy (fp, ACE_TEXT ("S")); -# else - ACE_OS::strcpy (fp, ACE_TEXT ("ls")); -# endif /* HPUX */ -#endif /* ACE_WIN32 / ACE_HAS_WCHAR */ - if (can_check) - this_len = ACE_OS::snprintf - (bp, bspace, format, wchar_t_str); - else - this_len = ACE_OS::sprintf (bp, format, wchar_t_str); - if(sizeof(ACE_OS::WChar) != sizeof(wchar_t)) - { - delete [] wchar_t_str; - } - ACE_UPDATE_COUNT (bspace, this_len); - break; - } - - case 'c': -#if defined (ACE_WIN32) && defined (ACE_USES_WCHAR) - ACE_OS::strcpy (fp, ACE_TEXT ("C")); -#else - ACE_OS::strcpy (fp, ACE_TEXT ("c")); -#endif /* ACE_WIN32 && ACE_USES_WCHAR */ - if (can_check) - this_len = ACE_OS::snprintf - (bp, bspace, format, va_arg (argp, int)); - else - this_len = ACE_OS::sprintf - (bp, format, va_arg (argp, int)); - ACE_UPDATE_COUNT (bspace, this_len); - break; - - case 'd': case 'i': case 'o': - case 'u': case 'x': case 'X': - fp[0] = *format_str; - fp[1] = '\0'; - if (can_check) - this_len = ACE_OS::snprintf - (bp, bspace, format, va_arg (argp, int)); - else - this_len = ACE_OS::sprintf - (bp, format, va_arg (argp, int)); - ACE_UPDATE_COUNT (bspace, this_len); - break; - - case 'F': case 'f': case 'e': case 'E': - case 'g': case 'G': - fp[0] = *format_str; - fp[1] = '\0'; - if (can_check) - this_len = ACE_OS::snprintf - (bp, bspace, format, va_arg (argp, double)); - else - this_len = ACE_OS::sprintf - (bp, format, va_arg (argp, double)); - ACE_UPDATE_COUNT (bspace, this_len); - break; - - case 'Q': - { - const ACE_TCHAR *fmt = ACE_UINT64_FORMAT_SPECIFIER; - ACE_OS::strcpy (fp, &fmt[1]); // Skip leading % - if (can_check) - this_len = ACE_OS::snprintf (bp, bspace, - format, - va_arg (argp, ACE_UINT64)); - else - this_len = ACE_OS::sprintf (bp, - format, - va_arg (argp, ACE_UINT64)); - } - ACE_UPDATE_COUNT (bspace, this_len); - break; - - case 'q': - { - const ACE_TCHAR *fmt = ACE_INT64_FORMAT_SPECIFIER; - ACE_OS::strcpy (fp, &fmt[1]); // Skip leading % - if (can_check) - this_len = ACE_OS::snprintf (bp, bspace, - format, - va_arg (argp, ACE_INT64)); - else - this_len = ACE_OS::sprintf (bp, - format, - va_arg (argp, ACE_INT64)); - } - ACE_UPDATE_COUNT (bspace, this_len); - break; - - case 'b': - { - const ACE_TCHAR *fmt = ACE_SSIZE_T_FORMAT_SPECIFIER; - ACE_OS::strcpy (fp, &fmt[1]); // Skip leading % - } - if (can_check) - this_len = ACE_OS::snprintf (bp, bspace, - format, - va_arg (argp, ssize_t)); - else - this_len = ACE_OS::sprintf (bp, - format, - va_arg (argp, ssize_t)); - ACE_UPDATE_COUNT (bspace, this_len); - break; - - case 'B': - { - const ACE_TCHAR *fmt = ACE_SIZE_T_FORMAT_SPECIFIER; - ACE_OS::strcpy (fp, &fmt[1]); // Skip leading % - } - if (can_check) - this_len = ACE_OS::snprintf (bp, bspace, - format, - va_arg (argp, size_t)); - else - this_len = ACE_OS::sprintf (bp, - format, - va_arg (argp, size_t)); - ACE_UPDATE_COUNT (bspace, this_len); - break; - - case ':': - { - // Assume a 32 bit time_t and change if needed. - const ACE_TCHAR *fmt = ACE_TEXT ("%d"); - if (sizeof (time_t) == 8) - fmt = ACE_INT64_FORMAT_SPECIFIER; - - ACE_OS::strcpy (fp, &fmt[1]); // Skip leading % - } - if (can_check) - this_len = ACE_OS::snprintf (bp, bspace, - format, - va_arg (argp, time_t)); - else - this_len = ACE_OS::sprintf (bp, - format, - va_arg (argp, time_t)); - ACE_UPDATE_COUNT (bspace, this_len); - break; - - case '@': - ACE_OS::strcpy (fp, ACE_TEXT ("p")); - if (can_check) - this_len = ACE_OS::snprintf - (bp, bspace, format, va_arg (argp, void*)); - else - this_len = ACE_OS::sprintf - (bp, format, va_arg (argp, void*)); - ACE_UPDATE_COUNT (bspace, this_len); - break; - - case '?': - // Stack trace up to this point - { - // skip the frame that we're currently in - ACE_Stack_Trace t(2); -#if defined (ACE_WIN32) && defined (ACE_USES_WCHAR) - ACE_OS::strcpy (fp, ACE_TEXT ("S")); -#else /* ACE_WIN32 && ACE_USES_WCHAR */ - ACE_OS::strcpy (fp, ACE_TEXT ("s")); -#endif /* ACE_WIN32 && ACE_USES_WCHAR */ - if (can_check) - this_len = ACE_OS::snprintf - (bp, bspace, format, t.c_str ()); - else - this_len = ACE_OS::sprintf - (bp, format, t.c_str ()); - ACE_UPDATE_COUNT (bspace, this_len); - break; - } - - - default: - // So, it's not a legit format specifier after all... - // Copy from the original % to where we are now, then - // continue with whatever comes next. - while (start_format != format_str && bspace > 0) - { - *bp++ = *start_format++; - --bspace; - } - if (bspace > 0) - { - *bp++ = *format_str; - --bspace; - } - break; - } - - // Bump to the next char in the caller's format_str - ++format_str; - } - - if (!skip_nul_locate) - while (*bp != '\0') // Locate end of bp. - ++bp; - } - } - - *bp = '\0'; // Terminate bp, but don't auto-increment this! - - ssize_t result = 0; - - // Check that memory was not corrupted, if it corrupted we can't log anything - // anymore because all our members could be corrupted. - if (bp >= (this->msg_ + ACE_MAXLOGMSGLEN+1)) - { - abort_prog = true; - ACE_OS::fprintf (stderr, - "The following logged message is too long!\n"); - } - else - { - // Copy the message from thread-specific storage into the transfer - // buffer (this can be optimized away by changing other code...). - log_record.msg_data (this->msg ()); - - // Write the to the appropriate location. - result = this->log (log_record, - abort_prog); - } - - if (abort_prog) - { - // Since we are now calling abort instead of exit, this value is - // not used. - ACE_UNUSED_ARG (exit_value); - - // *Always* print a message to stderr if we're aborting. We - // don't use verbose, however, to avoid recursive aborts if - // something is hosed. - log_record.print (ACE_Log_Msg::local_host_, 0, stderr); - ACE_OS::abort (); - } - - return result; -} - -#if !defined (ACE_WIN32) -/** - * @class ACE_Log_Msg_Sig_Guard - * - * @brief For use only by ACE_Log_Msg. - * - * Doesn't require the use of global variables or global - * functions in an application). - */ -class ACE_Log_Msg_Sig_Guard -{ -private: - ACE_Log_Msg_Sig_Guard (void); - ~ACE_Log_Msg_Sig_Guard (void); - - /// Original signal mask. - sigset_t omask_; - - friend ssize_t ACE_Log_Msg::log (ACE_Log_Record &log_record, - int suppress_stderr); -}; - -ACE_Log_Msg_Sig_Guard::ACE_Log_Msg_Sig_Guard (void) -{ -#if !defined (ACE_LACKS_UNIX_SIGNALS) - ACE_OS::sigemptyset (&this->omask_); - -# if defined (ACE_LACKS_PTHREAD_THR_SIGSETMASK) - ACE_OS::sigprocmask (SIG_BLOCK, - ACE_OS_Object_Manager::default_mask (), - &this->omask_); -# else - ACE_OS::thr_sigsetmask (SIG_BLOCK, - ACE_OS_Object_Manager::default_mask (), - &this->omask_); -# endif /* ACE_LACKS_PTHREAD_THR_SIGSETMASK */ -#endif /* ACE_LACKS_UNIX_SIGNALS */ -} - -ACE_Log_Msg_Sig_Guard::~ACE_Log_Msg_Sig_Guard (void) -{ -#if !defined (ACE_LACKS_UNIX_SIGNALS) -# if defined (ACE_LACKS_PTHREAD_THR_SIGSETMASK) - ACE_OS::sigprocmask (SIG_SETMASK, - &this->omask_, - 0); -# else - ACE_OS::thr_sigsetmask (SIG_SETMASK, - &this->omask_, - 0); -# endif /* ACE_LACKS_PTHREAD_THR_SIGSETMASK */ -#endif /* ! ACE_LACKS_UNIX_SIGNALS */ -} -#endif /* ! ACE_WIN32 */ - -ssize_t -ACE_Log_Msg::log (ACE_Log_Record &log_record, - int suppress_stderr) -{ - ssize_t result = 0; - - // Retrieve the flags in a local variable on the stack, it is - // accessed by multiple threads and within this operation we - // check it several times, so this way we only lock once - u_long flags = this->flags (); - - // Format the message and print it to stderr and/or ship it off to - // the log_client daemon, and/or print it to the ostream. Of - // course, only print the message if "SILENT" mode is disabled. - if (ACE_BIT_DISABLED (flags, ACE_Log_Msg::SILENT)) - { - bool tracing = this->tracing_enabled (); - this->stop_tracing (); - -#if !defined (ACE_WIN32) - // Make this block signal-safe. - ACE_Log_Msg_Sig_Guard sb; -#endif /* !ACE_WIN32 */ - - // Do the callback, if needed, before acquiring the lock - // to avoid holding the lock during the callback so we don't - // have deadlock if the callback uses the logger. - if (ACE_BIT_ENABLED (flags, ACE_Log_Msg::MSG_CALLBACK) - && this->msg_callback () != 0) - { - this->msg_callback ()->log (log_record); - } - - // Make sure that the lock is held during all this. - ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon, - *ACE_Log_Msg_Manager::get_lock (), - -1)); - - if (ACE_BIT_ENABLED (flags, - ACE_Log_Msg::STDERR) - && !suppress_stderr) // This is taken care of by our caller. - log_record.print (ACE_Log_Msg::local_host_, - flags, - stderr); - - if (ACE_BIT_ENABLED (flags, ACE_Log_Msg::CUSTOM) || - ACE_BIT_ENABLED (flags, ACE_Log_Msg::SYSLOG) || - ACE_BIT_ENABLED (flags, ACE_Log_Msg::LOGGER)) - { - // Be sure that there is a message_queue_, with multiple threads. - ACE_MT (ACE_Log_Msg_Manager::init_backend ()); - } - - if (ACE_BIT_ENABLED (flags, ACE_Log_Msg::LOGGER) || - ACE_BIT_ENABLED (flags, ACE_Log_Msg::SYSLOG)) - { - result = - ACE_Log_Msg_Manager::log_backend_->log (log_record); - } - - if (ACE_BIT_ENABLED (flags, ACE_Log_Msg::CUSTOM) && - ACE_Log_Msg_Manager::custom_backend_ != 0) - { - result = - ACE_Log_Msg_Manager::custom_backend_->log (log_record); - } - - // This must come last, after the other two print operations - // (see the method for details). - if (ACE_BIT_ENABLED (flags, - ACE_Log_Msg::OSTREAM) - && this->msg_ostream () != 0) - log_record.print (ACE_Log_Msg::local_host_, - flags, -#if defined (ACE_LACKS_IOSTREAM_TOTALLY) - static_cast (this->msg_ostream ()) -#else /* ! ACE_LACKS_IOSTREAM_TOTALLY */ - *this->msg_ostream () -#endif /* ! ACE_LACKS_IOSTREAM_TOTALLY */ - ); - - if (tracing) - this->start_tracing (); - } - - return result; -} - -// Calls log to do the actual print, but formats first. - -int -ACE_Log_Msg::log_hexdump (ACE_Log_Priority log_priority, - const char *buffer, - size_t size, - const ACE_TCHAR *text, - ACE_Log_Category_TSS* category) -{ - // Only print the message if hasn't been reset to - // exclude this logging priority. - if (this->log_priority_enabled (log_priority) == 0) - return 0; - - size_t text_sz = 0; - if (text) - text_sz = ACE_OS::strlen (text); - - size_t const total_buffer_size = - ACE_Log_Record::MAXLOGMSGLEN - ACE_Log_Record::VERBOSE_LEN + text_sz; - - ACE_Array msg_buf(total_buffer_size); - if (msg_buf.size() == 0) - return -1; - - ACE_TCHAR* end_ptr = &msg_buf[0] + total_buffer_size; - ACE_TCHAR* wr_ptr = &msg_buf[0]; - msg_buf[0] = 0; // in case size = 0 - - if (text) - wr_ptr += ACE_OS::snprintf (wr_ptr, - end_ptr - wr_ptr, -#if !defined (ACE_WIN32) && defined (ACE_USES_WCHAR) - ACE_TEXT ("%ls - "), -#else - ACE_TEXT ("%s - "), -#endif - text); - - wr_ptr += ACE_OS::snprintf (wr_ptr, - end_ptr - wr_ptr, - ACE_TEXT ("HEXDUMP ") - ACE_SIZE_T_FORMAT_SPECIFIER - ACE_TEXT (" bytes"), - size); - - // estimate how many bytes can be output - // We can fit 16 bytes output in text mode per line, 4 chars per byte; - // i.e. we need 68 bytes of buffer per line. - size_t hexdump_size = (end_ptr - wr_ptr -58)/68*16; - - if (hexdump_size < size) { - wr_ptr += ACE_OS::snprintf (wr_ptr, - end_ptr - wr_ptr, - ACE_TEXT (" (showing first ") - ACE_SIZE_T_FORMAT_SPECIFIER - ACE_TEXT (" bytes)"), - hexdump_size); - size = hexdump_size; - } - - *wr_ptr++ = '\n'; - ACE::format_hexdump(buffer, size, wr_ptr, end_ptr - wr_ptr); - - // Now print out the formatted buffer. - ACE_Log_Record log_record (log_priority, - ACE_OS::gettimeofday (), - this->getpid ()); - - log_record.category(category); - log_record.msg_data(&msg_buf[0]); - - this->log (log_record, false); - return 0; -} - -void -ACE_Log_Msg::set (const char *file, - int line, - int op_status, - int errnum, - bool restart, - ACE_OSTREAM_TYPE *os, - ACE_Log_Msg_Callback *c) -{ - ACE_TRACE ("ACE_Log_Msg::set"); - this->file (file); - this->linenum (line); - this->op_status (op_status); - this->errnum (errnum); - this->restart (restart); - this->msg_ostream (os); - this->msg_callback (c); -} - -void -ACE_Log_Msg::conditional_set (const char *filename, - int line, - int status, - int err) -{ - this->conditional_values_.is_set_ = true; - this->conditional_values_.file_ = filename; - this->conditional_values_.line_ = line; - this->conditional_values_.op_status_ = status; - this->conditional_values_.errnum_ = err; -} - -void -ACE_Log_Msg::dump (void) const -{ -#if defined (ACE_HAS_DUMP) - ACE_TRACE ("ACE_Log_Msg::dump"); - - ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("status_ = %d\n"), this->status_)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("\nerrnum_ = %d\n"), this->errnum_)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("\nlinenum_ = %d\n"), this->linenum_)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("\nfile_ = %C\n"), this->file_)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("\nmsg_ = %s\n"), this->msg_)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("\nrestart_ = %d\n"), this->restart_)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("\nostream_ = %@\n"), this->ostream_)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("\nmsg_callback_ = %@\n"), - this->msg_callback_)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("\nprogram_name_ = %s\n"), - this->program_name_ ? this->program_name_ - : ACE_TEXT (""))); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("\nlocal_host_ = %s\n"), - this->local_host_ ? this->local_host_ - : ACE_TEXT (""))); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("\nflags_ = 0x%x\n"), this->flags_)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("\ntrace_depth_ = %d\n"), - this->trace_depth_)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("\ntrace_active_ = %d\n"), - this->trace_active_)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("\ntracing_enabled_ = %d\n"), - this->tracing_enabled_)); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("\npriority_mask_ = 0x%x\n"), - this->priority_mask_)); - if (this->thr_desc_ != 0 && this->thr_desc_->state () != 0) - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("\nthr_state_ = %d\n"), - this->thr_desc_->state ())); - ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("\nmsg_off_ = %d\n"), this->msg_off_)); - - // Be sure that there is a message_queue_, with multiple threads. - ACE_MT (ACE_Log_Msg_Manager::init_backend ()); - - ACE_MT (ACE_Log_Msg_Manager::get_lock ()->dump ()); - // Synchronize output operations. - - ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP)); -#endif /* ACE_HAS_DUMP */ -} - -void -ACE_Log_Msg::thr_desc (ACE_Thread_Descriptor *td) -{ - this->thr_desc_ = td; - - if (td != 0) - td->acquire_release (); -} - -ACE_Log_Msg_Backend * -ACE_Log_Msg::msg_backend (ACE_Log_Msg_Backend *b) -{ - ACE_TRACE ("ACE_Log_Msg::msg_backend"); - ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon, - *ACE_Log_Msg_Manager::get_lock (), 0)); - - ACE_Log_Msg_Backend *tmp = ACE_Log_Msg_Manager::custom_backend_; - ACE_Log_Msg_Manager::custom_backend_ = b; - return tmp; -} - -ACE_Log_Msg_Backend * -ACE_Log_Msg::msg_backend (void) -{ - ACE_TRACE ("ACE_Log_Msg::msg_backend"); - ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon, - *ACE_Log_Msg_Manager::get_lock (), 0)); - - return ACE_Log_Msg_Manager::custom_backend_; -} - -void -ACE_Log_Msg::msg_ostream (ACE_OSTREAM_TYPE *m, bool delete_ostream) -{ - if (this->ostream_ == m) - { - // Same stream, allow user to change the delete_ostream "flag" - if (delete_ostream && !this->ostream_refcount_) - { - ACE_NEW (this->ostream_refcount_, Atomic_ULong (1)); - } - else if (!delete_ostream && this->ostream_refcount_) - { - if (--*this->ostream_refcount_ == 0) - { - delete this->ostream_refcount_; - } - this->ostream_refcount_ = 0; - } - // The other two cases are no-ops, the user has requested the same - // state that's already present. - return; - } - - this->cleanup_ostream (); - - if (delete_ostream) - { - ACE_NEW (this->ostream_refcount_, Atomic_ULong (1)); - } - - this->ostream_ = m; -} - -void -ACE_Log_Msg::local_host (const ACE_TCHAR *s) -{ - if (s) - { - ACE_OS::free ((void *) ACE_Log_Msg::local_host_); - { - ACE_NO_HEAP_CHECK; - - ACE_ALLOCATOR (ACE_Log_Msg::local_host_, ACE_OS::strdup (s)); - } - } -} - -int -ACE_Log_Msg::log_priority_enabled (ACE_Log_Priority log_priority, - const char *, - ...) -{ - return this->log_priority_enabled (log_priority); -} - -#if defined (ACE_USES_WCHAR) -int -ACE_Log_Msg::log_priority_enabled (ACE_Log_Priority log_priority, - const wchar_t *, - ...) -{ - return this->log_priority_enabled (log_priority); -} -#endif /* ACE_USES_WCHAR */ - -// **************************************************************** - -void -ACE_Log_Msg::init_hook (ACE_OS_Log_Msg_Attributes &attributes -# if defined (ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS) - , ACE_SEH_EXCEPT_HANDLER selector - , ACE_SEH_EXCEPT_HANDLER handler -# endif /* ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS */ - ) -{ -# if defined (ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS) - attributes.seh_except_selector_ = selector; - attributes.seh_except_handler_ = handler; -# endif /* ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS */ - if (ACE_Log_Msg::exists ()) - { - ACE_Log_Msg *inherit_log = ACE_LOG_MSG; - attributes.ostream_ = inherit_log->msg_ostream (); - if (attributes.ostream_ && inherit_log->ostream_refcount_) - { - ++*inherit_log->ostream_refcount_; - attributes.ostream_refcount_ = inherit_log->ostream_refcount_; - } - else - { - attributes.ostream_refcount_ = 0; - } - attributes.priority_mask_ = inherit_log->priority_mask (); - attributes.tracing_enabled_ = inherit_log->tracing_enabled (); - attributes.restart_ = inherit_log->restart (); - attributes.trace_depth_ = inherit_log->trace_depth (); - } -} - -void -ACE_Log_Msg::inherit_hook (ACE_OS_Thread_Descriptor *thr_desc, - ACE_OS_Log_Msg_Attributes &attributes) -{ -#if !defined (ACE_THREADS_DONT_INHERIT_LOG_MSG) && \ - !defined (ACE_HAS_MINIMAL_ACE_OS) - // Inherit the logging features if the parent thread has an - // . Note that all of the following operations occur - // within thread-specific storage. - ACE_Log_Msg *new_log = ACE_LOG_MSG; - - // Note that we do not inherit the callback because this might have - // been allocated off of the stack of the original thread, in which - // case all hell would break loose... - - if (attributes.ostream_) - { - new_log->ostream_ = attributes.ostream_; - new_log->ostream_refcount_ = - static_cast (attributes.ostream_refcount_); - - new_log->priority_mask (attributes.priority_mask_); - - if (attributes.tracing_enabled_) - new_log->start_tracing (); - - new_log->restart (attributes.restart_); - new_log->trace_depth (attributes.trace_depth_); - } - - // @@ Now the TSS Log_Msg has been created, cache my thread - // descriptor in. - - if (thr_desc != 0) - // This downcast is safe. We do it to avoid having to #include - // ace/Thread_Manager.h. - new_log->thr_desc (static_cast (thr_desc)); - // Block the thread from proceeding until - // thread manager has thread descriptor ready. -#endif /* ! ACE_THREADS_DONT_INHERIT_LOG_MSG && ! ACE_HAS_MINIMAL_ACE_OS */ -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Log_Msg.h b/modules/worldengine/deps/acelite/ace/Log_Msg.h deleted file mode 100644 index 4281ece641..0000000000 --- a/modules/worldengine/deps/acelite/ace/Log_Msg.h +++ /dev/null @@ -1,750 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Log_Msg.h - * - * @author Douglas C. Schmidt - */ -//============================================================================= - -#ifndef ACE_LOG_MSG_H -#define ACE_LOG_MSG_H -#include /**/ "ace/pre.h" - -// This stuff must come first to avoid problems with circular -// headers... -// ... but ACE_NDEBUG and ACE_NLOGGING can come from the config.h file, so -// pull that one early. -#include /**/ "ace/config-all.h" -#include /**/ "ace/ACE_export.h" -#include "ace/Global_Macros.h" -#include "ace/Default_Constants.h" -#include "ace/Log_Priority.h" -#include "ace/os_include/os_limits.h" -#include "ace/Synch_Traits.h" - -// The ACE_ASSERT macro used to be defined here, include ace/Assert.h -// for backwards compatibility. -#include "ace/Assert.h" - -#if defined (ACE_NLOGGING) -#if !defined (ACE_HEX_DUMP) -# define ACE_HEX_DUMP(X) do {} while (0) -#endif -#if !defined (ACE_RETURN) -# define ACE_RETURN(Y) do { return (Y); } while (0) -#endif -#if !defined (ACE_ERROR_RETURN) -# define ACE_ERROR_RETURN(X, Y) return (Y) -#endif -#if !defined (ACE_ERROR_BREAK) -# define ACE_ERROR_BREAK(X) { break; } -#endif -#if !defined (ACE_ERROR) -# define ACE_ERROR(X) do {} while (0) -#endif -#if !defined (ACE_DEBUG) -# define ACE_DEBUG(X) do {} while (0) -#endif -#if !defined (ACE_ERROR_INIT) -# define ACE_ERROR_INIT(VALUE, FLAGS) -#endif -#else -#if !defined (ACE_HEX_DUMP) -#define ACE_HEX_DUMP(X) \ - do { \ - int const __ace_error = ACE_Log_Msg::last_error_adapter (); \ - ACE_Log_Msg *ace___ = ACE_Log_Msg::instance (); \ - ace___->conditional_set (__FILE__, __LINE__, 0, __ace_error); \ - ace___->log_hexdump X; \ - } while (0) -#endif -#if !defined (ACE_RETURN) -#define ACE_RETURN(Y) \ - do { \ - int const __ace_error = ACE_Log_Msg::last_error_adapter (); \ - ACE_Log_Msg *ace___ = ACE_Log_Msg::instance (); \ - ace___->set (__FILE__, __LINE__, Y, __ace_error, ace___->restart (), \ - ace___->msg_ostream (), ace___->msg_callback ()); \ - return Y; \ - } while (0) -#endif -#if !defined (ACE_ERROR_RETURN) -#define ACE_ERROR_RETURN(X, Y) \ - do { \ - int const __ace_error = ACE_Log_Msg::last_error_adapter (); \ - ACE_Log_Msg *ace___ = ACE_Log_Msg::instance (); \ - ace___->conditional_set (__FILE__, __LINE__, Y, __ace_error); \ - ace___->log X; \ - return Y; \ - } while (0) -#endif -#if !defined (ACE_ERROR) -#define ACE_ERROR(X) \ - do { \ - int const __ace_error = ACE_Log_Msg::last_error_adapter (); \ - ACE_Log_Msg *ace___ = ACE_Log_Msg::instance (); \ - ace___->conditional_set (__FILE__, __LINE__, -1, __ace_error); \ - ace___->log X; \ - } while (0) -#endif -#if !defined (ACE_DEBUG) -#define ACE_DEBUG(X) \ - do { \ - int const __ace_error = ACE_Log_Msg::last_error_adapter (); \ - ACE_Log_Msg *ace___ = ACE_Log_Msg::instance (); \ - ace___->conditional_set (__FILE__, __LINE__, 0, __ace_error); \ - ace___->log X; \ - } while (0) -#endif -#if !defined (ACE_ERROR_INIT) -#define ACE_ERROR_INIT(VALUE, FLAGS) \ - do { \ - ACE_Log_Msg *ace___ = ACE_Log_Msg::instance (); \ - ace___->set_flags (FLAGS); \ - ace___->op_status (VALUE); \ - } while (0) -#endif -#if !defined (ACE_ERROR_BREAK) -#define ACE_ERROR_BREAK(X) { ACE_ERROR (X); break; } -#endif -#endif /* ACE_NLOGGING */ - -#include "ace/OS_Log_Msg_Attributes.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -// These workarounds are necessary for nasty libraries or platforms -// that #define STDERR or THREAD (e.g. LynxOS). We simply #undef -// these macros as there is no way to save the macro definition using -// the pre-processor. See Bugzilla Bug #299 for more info. -#if defined (STDERR) -# undef STDERR -#endif /* STDERR */ - -#if defined (THREAD) -# undef THREAD -#endif /* THREAD */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -class ACE_Log_Msg_Callback; -class ACE_Log_Msg_Backend; - -// **************************************************************** - -#define ACE_LOG_MSG ACE_Log_Msg::instance () - -// Forward declaration -class ACE_Thread_Descriptor; -class ACE_Log_Record; -class ACE_Log_Category_TSS; -template class ACE_Atomic_Op; - -/** - * @class ACE_Log_Msg - * - * @brief Provides a variable length argument message logging - * abstraction. - * - * This class is very flexible since it allows formatted error - * messages to be printed in a thread-safe manner to various - * locations, such as stderr, cerr, a distributed logger, etc. The - * current message is also kept in a thread-specific storage location - * (threads spawned using ACE_Thread_Manager automatically get an - * ACE_Log_Msg object that inherits the spawning thread's settings), - * which can be used to communicate errors between framework methods - * and callers. A message is logged by the log() method, only if the - * message priority is currently enabled. Moreover, only the current - * log message is stored here -- it will be overwritten by the - * subsequent call to log(). - * - * The ACE_Log_Msg class uses two priority masks to control its - * logging behavior. The @c priority_mask_ object attribute is - * thread- specific and specifies the priority levels logged by the - * thread. The @c process_priority_mask_ class attribute is not - * thread-specific and specifies the priority levels that will be - * logged by all threads in the process. By default, all levels are - * disabled for @c priority_mask_ and all levels are enabled for @c - * process_priority_mask_ (i.e. the process-wide mask controls the - * settings, and each instance can expand on it if desired). Both - * priority masks can be modified using the priority_mask() method of - * this class. - */ -class ACE_Export ACE_Log_Msg -{ -public: - // Logger Flags. - enum - { - /// Write messages to stderr. - STDERR = 1, - /// Write messages to the local client logger daemon. - LOGGER = 2, - /// Write messages to the ostream * stored in thread-specific - /// storage. - OSTREAM = 4, - /// Write messages to the callback object. - MSG_CALLBACK = 8, - /// Display messages in a verbose manner. - VERBOSE = 16, - /// Display messages in a less verbose manner (i.e., only print - /// information that can change between calls). - VERBOSE_LITE = 32, - /// Do not print messages at all (just leave in thread-specific - /// storage for later inspection). - SILENT = 64, - /// Write messages to the system's event log. - SYSLOG = 128, - /// Write messages to the user provided backend - CUSTOM = 256 - }; - - // = Initialization and termination routines. - - /// Returns a pointer to the Singleton. - static ACE_Log_Msg *instance (void); - - /// Returns last error. - static int last_error_adapter (void); - - /// Returns non-null if an ACE_Log_Msg exists for the calling thread. - static int exists (void); - - /// Returns the current program name used for logging. - static const ACE_TCHAR * program_name (void); - - /// Clears the flag from the default priority mask used to - /// initialize ACE_Log_Msg instances. - static void disable_debug_messages (ACE_Log_Priority priority = LM_DEBUG); - - /// Sets the flag in the default priority mask used to initialize - /// ACE_Log_Msg instances. - static void enable_debug_messages (ACE_Log_Priority priority = LM_DEBUG); - - /// Initialize logger. - ACE_Log_Msg (void); - - /// cleanup logger. - ~ACE_Log_Msg (void); - - /// Initialize the ACE logging facility. - /** - * Initialize the ACE logging facility. Supplies the program name - * that is available to each logging message call. Default arguments - * set up logging to STDERR only. - * - * @param prog_name The name of the calling program. - * @param options_flags A bitwise-or of options flags used to set the - * initial behavior and logging sink(s). (see the - * enum above for the valid values). - * @param logger_key The name of ACE_FIFO rendezvous point where the - * local client logger daemon is listening for logging - * messages if the LOGGER bit is set in the @a flags - * argument. If the SYSLOG bit is set in @a flags, - * @a logger_key is the source/program name specified - * in the syslog facility (UNIX/Linux) or the Windows - * event log (Windows). In the SYSLOG case, if - * @a logger_key is 0, @a prog_name is used. - */ - int open (const ACE_TCHAR *prog_name, - u_long options_flags = ACE_Log_Msg::STDERR, - const ACE_TCHAR *logger_key = 0); - - // = Set/get the options flags. - - /** - * Enable the bits in the logger's options flags. - */ - void set_flags (u_long f); - - /** - * Disable the bits in the logger's options flags. - */ - void clr_flags (u_long f); - - /** - * Return the bits in the logger's options flags. - */ - u_long flags (void); - - /** @name Allow apps to acquire and release internal synchronization - * lock - * - * This lock is used internally by the ACE_Log_Msg - * implementation. By exporting the lock, applications can hold the - * lock atomically over a number of calls to ACE_Log_Msg. - */ - //@{ - - /// Acquire the internal lock. - int acquire (void); - - /// Release the internal lock. - int release (void); - //@} - - /// Call after doing a @c fork() to resynchronize the process id and - /// @c program_name_ variables. - void sync (const ACE_TCHAR *program_name); - - // = Set/get methods. Note that these are non-static and thus will - // be thread-specific. - - /// Set the result of the operation status (by convention, -1 means - /// error). - void op_status (int status); - - /// Get the result of the operation status (by convention, -1 means - /// error). - int op_status (void) const; - - /// Set the value of the errnum (by convention this corresponds to - /// errno). - void errnum (int); - - /// Get the value of the errnum (by convention this corresponds to - /// errno). - int errnum (void) const; - - /// Set the line number where an error occurred. - void linenum (int); - - /// Get the line number where an error occurred. - int linenum (void) const; - - /// Set the file name where an error occurred. - void file (const char *); - - /// Get the file name where an error occurred. - const char *file (void); - - /// Set the message that describes what type of error occurred. - void msg (const ACE_TCHAR *); - - /// Get the message that describes what type of error occurred. - const ACE_TCHAR *msg (void); - - /// Set the field that indicates whether interrupted calls should be - /// restarted. - void restart (bool r); - - /// Get the field that indicates whether interrupted calls should be - /// restarted. - bool restart (void) const; - - // = Notice that the following two function is equivalent to - // "void msg_ostream (HANDLE)" and "HANDLE msg_ostream (void)" - // on Windows CE. There is no support on CE. - - /// Update the ostream without overwriting the delete_ostream_ flag. - void msg_ostream (ACE_OSTREAM_TYPE *); - - /** - * delete_stream == true, forces Log_Msg.h to delete the stream in - * its own ~dtor (assumes control of the stream) - * use only with proper ostream (eg: fstream), not (cout, cerr) - */ - void msg_ostream (ACE_OSTREAM_TYPE *, bool delete_ostream); - - /// Get the ostream that is used to print error messages. - ACE_OSTREAM_TYPE *msg_ostream (void) const; - - /** - * Set a new callback object and return the existing callback to - * allow "chaining". Note that ACE_Log_Msg_Callback objects are not - * inherited when spawning a new thread, so you'll need to reset - * them in each thread. - */ - ACE_Log_Msg_Callback *msg_callback (ACE_Log_Msg_Callback *c); - ACE_Log_Msg_Callback *msg_callback (void) const; - - /** - * Set a new backend object and return the existing backend to - * allow "chaining". Note that as opposed to ACE_Log_Msg_Callback, - * ACE_Log_Msg_Backend is a per-process entity. - * - * @note Be aware that because of the current architecture there is - * no guarantee that open (), reset () and close () will be called - * on a backend object. - * - */ - static ACE_Log_Msg_Backend *msg_backend (ACE_Log_Msg_Backend *b); - static ACE_Log_Msg_Backend *msg_backend (void); - - /// Nesting depth increment. - int inc (void); - - /// Nesting depth decrement. - int dec (void); - - /// Get trace depth. - int trace_depth (void) const; - - /// Set trace depth. - void trace_depth (int); - - /// Get trace active status. - bool trace_active (void) const; - - /// Set trace active status. - void trace_active (bool value); - - /// Get the TSS thread descriptor. - ACE_Thread_Descriptor *thr_desc (void) const; - - /** - * Set the TSS thread descriptor. This method will call - * td->acquire_release to block execution until this call - * return. - */ - void thr_desc (ACE_Thread_Descriptor *td); - - /// Stop tracing status on a per-thread basis... - void stop_tracing (void); - - /// Start tracing status on a per-thread basis... - void start_tracing (void); - - /// Query tracing status on a per-thread basis... - bool tracing_enabled (void) const; - - typedef enum - { - PROCESS = 0, - THREAD = 1 - } MASK_TYPE; - - // = Get/set the priority mask. - /// Get the current ACE_Log_Priority mask. - u_long priority_mask (MASK_TYPE = THREAD); - - /// Set the ACE_Log_Priority mask, returns original mask. - u_long priority_mask (u_long, MASK_TYPE = THREAD); - - /// Return true if the requested priority is enabled. - int log_priority_enabled (ACE_Log_Priority log_priority); - - /// Return true if the requested priority is enabled. - int log_priority_enabled (ACE_Log_Priority log_priority, - const char *, - ...); - -#if defined (ACE_USES_WCHAR) - // We are not using ACE_TCHAR for this since ACE_HEX_DUMP - // doesn't take in a ACE_TCHAR. log_hexdump takes in a char - // string, so this must be able to take in a char string even - // when using ACE_USES_WCHAR. - /// Return true if the requested priority is enabled. - int log_priority_enabled (ACE_Log_Priority log_priority, - const wchar_t *, - ...); -#endif /* ACE_USES_WCHAR */ - - /// Optimize reading of the pid (avoids a system call if the value is - /// cached...). - pid_t getpid (void) const; - - /// Get the name of the local host. - const ACE_TCHAR *local_host (void) const; - - /// Set the name of the local host. - void local_host (const ACE_TCHAR *); - - /** - * Set the line number, file name, operational status, error number, - * restart flag, ostream, and the callback object. This combines - * all the other set methods into a single method. - */ - void set (const char *file, - int line, - int op_status = -1, - int errnum = 0, - bool restart = true, - ACE_OSTREAM_TYPE *os = 0, - ACE_Log_Msg_Callback *c = 0); - - /// These values are only actually set if the requested priority is - /// enabled. - void conditional_set (const char *file, - int line, - int op_status, - int errnum); - - /** - * Format a message to the thread-safe ACE logging mechanism. Valid - * options (prefixed by '%', as in printf format strings) include: - * - 'A': print an ACE_timer_t value (which could be either double - * or ACE_UINT32.) - * - 'a': abort the program at this point abruptly. - * - 'b': print a ssize_t value - * - 'B': print a size_t value - * - 'c': print a character - * - 'C': print a char* character string (also see s and W) - * - 'i', 'd': print a decimal number - * - 'I': indent according to nesting depth (obtained from - * ACE_Trace::get_nesting_indent()). - * - 'e', 'E', 'f', 'F', 'g', 'G': print a double - * - 'l': print line number where an error occurred. - * - 'M': print the name of the priority of the message. - * - 'm': return the message corresponding to errno value, e.g., as - * done by strerror() - * - 'N': print file name where the error occurred. - * - 'n': print the name of the program (or "" if not set) - * - 'o': print as an octal number - * - 'P': print out the current process id - * - 'p': print out the appropriate errno message from sys_errlist, - * e.g., as done by perror() - * - 'Q': print out the uint64 number - * - 'q': print out the int64 number - * - '@': print a void* pointer (in hexadecimal) - * - 'r': call the function pointed to by the corresponding argument - * - 'R': print return status - * - 'S': print out the appropriate signal message corresponding - * to var-argument, e.g., as done by strsignal() - * - 's': prints a ACE_TCHAR* character string (also see C and W) - * - 'T': print timestamp in hour:minute:sec:usec format (plain option, - * i.e. without any flags, prints system supplied timestamp; - * with '#' flag added expects ACE_Time_Value* in argument list) - * - 'D': print timestamp as Weekday Month day year hour:minute:sec.usec - * (plain option, i.e. without any flags, prints system supplied - * timestamp; with '#' flag added expects ACE_Time_Value* in - * argument list) - * - 't': print thread id (1 if single-threaded) - * - 'u': print as unsigned int - * - 'w': prints a wide character - * - 'W': prints a wchar_t* character string (also see C and s) - * - 'x': print as a hex number - * - 'X': print as a hex number - * - 'z': print an ACE_OS::WChar character - * - 'Z': print an ACE_OS::WChar character string - * - ':': print a time_t value as an integral number - * - '%': print out a single percent sign, '%' - * - '?': print out stack trace (see Stack_Trace.h header comments) - */ - ssize_t log (ACE_Log_Priority priority, const ACE_TCHAR *format, ...); - -#if defined (ACE_HAS_WCHAR) - ssize_t log (ACE_Log_Priority priority, const ACE_ANTI_TCHAR *format, ...); -#endif /* ACE_HAS_WCHAR */ - - /** - * An alternative logging mechanism that makes it possible to - * integrate variable argument lists from other logging mechanisms - * into the ACE mechanism. - */ - ssize_t log (const ACE_TCHAR *format, - ACE_Log_Priority priority, - va_list argp, - ACE_Log_Category_TSS* category=0); - - /// Log a custom built log record to the currently enabled logging - /// sinks. - ssize_t log (ACE_Log_Record &log_record, - int suppress_stderr = 0); - - /** - * Method to log hex dump. This is useful for debugging. Calls - * log() to do the actual print, but formats first to make the chars - * printable. - */ - int log_hexdump (ACE_Log_Priority log_priority, - const char *buffer, - size_t size, - const ACE_TCHAR *text = 0, - ACE_Log_Category_TSS* category=0); - - /** - * Init hook, create a Log_Msg_Attribute object, initialize its - * attributes from the TSS Log_Msg and save the object in the - * @a attributes argument - */ - static void init_hook (ACE_OS_Log_Msg_Attributes &attributes -# if defined (ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS) - , ACE_SEH_EXCEPT_HANDLER selector = 0 - , ACE_SEH_EXCEPT_HANDLER handler = 0 -# endif /* ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS */ - ); - - /** - * Inherit hook, the @a attributes field is a ACE_OS_Log_Msg_Attributes - * object, invoke the inherit_log_msg() method on it, then destroy - * it and set the @a attribute argument to 0. - */ - static void inherit_hook (ACE_OS_Thread_Descriptor *thr_desc, - ACE_OS_Log_Msg_Attributes &attributes); - - /// Dump the state of an object. - void dump (void) const; - - /// Declare the dynamic allocation hooks. - ACE_ALLOC_HOOK_DECLARE; - -private: - void cleanup_ostream (); - - /// Status of operation (-1 means failure, >= 0 means success). - int status_; - - /// Type of error that occurred (see ). - int errnum_; - - /// Line number where the error occurred. - int linenum_; - - /// File where the error occurred. - char file_[MAXPATHLEN + 1]; - - /// The log message, which resides in thread-specific storage. Note - /// that only the current log message is stored here -- it will be - /// overwritten by the subsequent call to log(). - ACE_TCHAR* msg_; // Add one for NUL-terminator. - - /// Indicates whether we should restart system calls that are - /// interrupted. - bool restart_; - - /// The ostream where logging messages can be written. - ACE_OSTREAM_TYPE *ostream_; - - /// This pointer is 0 if we are not reference counting (the user has not - /// passed "true" for the delete_ostream argument to msg_ostream). - /// If we are reference counting, this points to a shared count that will - /// be deleted when it reaches zero. Since we want optional but shared - /// ownership neither std::auto_ptr nor ACE_Strong_Bound_Ptr have the right - /// semantics. *Bound_Ptr also doesn't take advantage of Atomic_Op. - typedef ACE_Atomic_Op Atomic_ULong; - Atomic_ULong *ostream_refcount_; - - /// The callback object. - ACE_Log_Msg_Callback *msg_callback_; - - /// Depth of the nesting for printing traces. - int trace_depth_; - - /// Are we already within an ACE_Trace constructor call? - bool trace_active_; - - /// Are we allowing tracing in this thread? - bool tracing_enabled_; - - /** - * If we're running in the context of an ACE_Thread_Manager this - * will point to the thread descriptor adapter which holds the - * thread descriptor of the thread. This can be used to rapidly - * access all thread data kept in ACE_Thread_Descriptor. - */ - ACE_Thread_Descriptor *thr_desc_; - - /** - * Keeps track of all the per-thread ACE_Log_Priority values that - * are currently enabled. Default is for all logging priorities to - * be disabled. - */ - u_long priority_mask_; - - /// Always timestamp? - int timestamp_; - - // = The following fields are *not* kept in thread-specific storage. - - // We only want one instance for the entire process! - - /** - * Keeps track of all the per-process ACE_Log_Priority values that - * are currently enabled. Default is for all logging priorities to - * be enabled. - */ - static u_long process_priority_mask_; - - /// Records the program name. - static const ACE_TCHAR *program_name_; - - /// Name of the local host (used when printing messages). - static const ACE_TCHAR *local_host_; - - /// Options flags used to hold the logger flag options, e.g., - /// STDERR, LOGGER, OSTREAM, MSG_CALLBACK, etc. - static u_long flags_; - - /// Offset of msg_[]. - static ptrdiff_t msg_off_; - - /** - * Number of existing ACE_Log_Msg instances; when 0, delete program/host - * names - */ - static int instance_count_; - - /** - * Priority mask to use for each new instance - */ - static u_long default_priority_mask_; - - /// Anonymous struct since there will only be one instance. This - /// struct keeps information stored away in case we actually end up - /// calling log() if the log priority is correct. - struct - { - bool is_set_; - const char *file_; - int line_; - int op_status_; - int errnum_; - } conditional_values_; - -#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) - static bool key_created_; -#endif /* ACE_MT_SAFE */ - - /// For cleanup, at program termination. - static void close (void); - - /// Decouple the OS layer from the ACE_Log_Msg layer. - static void sync_hook (const ACE_TCHAR *prg_name); - - /// Return the TSS singleton thread descriptor - static ACE_OS_Thread_Descriptor *thr_desc_hook (void); - - //friend void ACE_OS::cleanup_tss (const u_int); - - // = Disallow these operations. - ACE_Log_Msg &operator= (const ACE_Log_Msg &); - ACE_Log_Msg (const ACE_Log_Msg &); -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) -# if defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) || \ - defined (ACE_HAS_TSS_EMULATION) -/* static */ -# if defined (ACE_HAS_THR_C_DEST) -# define LOCAL_EXTERN_PREFIX extern "C" -# else -# define LOCAL_EXTERN_PREFIX -# endif /* ACE_HAS_THR_C_DEST */ - -#if (defined (ACE_HAS_VERSIONED_NAMESPACE) && ACE_HAS_VERSIONED_NAMESPACE == 1) -# define ACE_TSS_CLEANUP_NAME ACE_PREPROC_CONCATENATE(ACE_,ACE_PREPROC_CONCATENATE(ACE_VERSIONED_NAMESPACE_NAME, _TSS_cleanup)) -#else -# define ACE_TSS_CLEANUP_NAME ACE_TSS_cleanup -#endif /* ACE_HAS_VERSIONED_NAMESPACE == 1 */ - - -LOCAL_EXTERN_PREFIX -void -ACE_TSS_CLEANUP_NAME (void *ptr); -# endif /* ACE_HAS_THREAD_SPECIFIC_STORAGE || ACE_HAS_TSS_EMULATION */ -#endif /* ACE_MT_SAFE */ - - -#if defined (__ACE_INLINE__) -#include "ace/Log_Msg.inl" -#endif /* __ACE_INLINE__ */ - -#include /**/ "ace/post.h" -#endif /* ACE_LOG_MSG_H */ diff --git a/modules/worldengine/deps/acelite/ace/Log_Msg.inl b/modules/worldengine/deps/acelite/ace/Log_Msg.inl deleted file mode 100644 index 1062c15c6b..0000000000 --- a/modules/worldengine/deps/acelite/ace/Log_Msg.inl +++ /dev/null @@ -1,226 +0,0 @@ -// -*- C++ -*- -#include "ace/OS_NS_string.h" -#include "ace/OS_NS_unistd.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_INLINE -u_long -ACE_Log_Msg::priority_mask (MASK_TYPE mask_type) -{ - return mask_type == THREAD - ? this->priority_mask_ - : ACE_Log_Msg::process_priority_mask_; -} - -ACE_INLINE -int -ACE_Log_Msg::log_priority_enabled (ACE_Log_Priority log_priority) -{ - return ACE_BIT_ENABLED (this->priority_mask_ | - ACE_Log_Msg::process_priority_mask_, - log_priority); -} - -ACE_INLINE -void -ACE_Log_Msg::op_status (int status) -{ - this->status_ = status; -} - -ACE_INLINE -int -ACE_Log_Msg::op_status (void) const -{ - return this->status_; -} - -ACE_INLINE -void -ACE_Log_Msg::restart (bool r) -{ - this->restart_ = r; -} - -ACE_INLINE -bool -ACE_Log_Msg::restart (void) const -{ - return this->restart_; -} - -ACE_INLINE -int -ACE_Log_Msg::errnum (void) const -{ - return this->errnum_; -} - -ACE_INLINE -void -ACE_Log_Msg::errnum (int e) -{ - this->errnum_ = e; -} - -ACE_INLINE -int -ACE_Log_Msg::linenum (void) const -{ - return this->linenum_; -} - -ACE_INLINE -void -ACE_Log_Msg::linenum (int l) -{ - this->linenum_ = l; -} - -ACE_INLINE -int -ACE_Log_Msg::inc (void) -{ - return this->trace_depth_++; -} - -ACE_INLINE -int -ACE_Log_Msg::dec (void) -{ - return this->trace_depth_ == 0 ? 0 : --this->trace_depth_; -} - -ACE_INLINE -int -ACE_Log_Msg::trace_depth (void) const -{ - return this->trace_depth_; -} - -ACE_INLINE -void -ACE_Log_Msg::trace_depth (int depth) -{ - this->trace_depth_ = depth; -} - -ACE_INLINE -bool -ACE_Log_Msg::trace_active (void) const -{ - return this->trace_active_; -} - -ACE_INLINE -void -ACE_Log_Msg::trace_active (bool value) -{ - this->trace_active_ = value; -} - -ACE_INLINE -ACE_Thread_Descriptor * -ACE_Log_Msg::thr_desc (void) const -{ - return this->thr_desc_; -} - -/// Enable the tracing facility on a per-thread basis. -ACE_INLINE -void -ACE_Log_Msg::start_tracing (void) -{ - this->tracing_enabled_ = true; -} - -/// Disable the tracing facility on a per-thread basis. -ACE_INLINE -void -ACE_Log_Msg::stop_tracing (void) -{ - this->tracing_enabled_ = false; -} - -ACE_INLINE -bool -ACE_Log_Msg::tracing_enabled (void) const -{ - return this->tracing_enabled_; -} - -ACE_INLINE -const char * -ACE_Log_Msg::file (void) -{ - return this->file_; -} - -ACE_INLINE -void -ACE_Log_Msg::file (const char *s) -{ - ACE_OS::strsncpy (this->file_, s, sizeof this->file_); -} - -ACE_INLINE -const ACE_TCHAR * -ACE_Log_Msg::msg (void) -{ - return this->msg_ + ACE_Log_Msg::msg_off_; -} - -ACE_INLINE -void -ACE_Log_Msg::msg (const ACE_TCHAR *m) -{ - ACE_OS::strsncpy (this->msg_, m, - ((ACE_MAXLOGMSGLEN+1) / sizeof (ACE_TCHAR))); -} - -ACE_INLINE -ACE_Log_Msg_Callback * -ACE_Log_Msg::msg_callback (void) const -{ - return this->msg_callback_; -} - -ACE_INLINE -ACE_Log_Msg_Callback * -ACE_Log_Msg::msg_callback (ACE_Log_Msg_Callback *c) -{ - ACE_Log_Msg_Callback *old = this->msg_callback_; - this->msg_callback_ = c; - return old; -} - -ACE_INLINE -ACE_OSTREAM_TYPE * -ACE_Log_Msg::msg_ostream (void) const -{ - return this->ostream_; -} - -ACE_INLINE -void -ACE_Log_Msg::msg_ostream (ACE_OSTREAM_TYPE *m) -{ - this->ostream_ = m; -} - -ACE_INLINE -const ACE_TCHAR * -ACE_Log_Msg::local_host (void) const -{ - return ACE_Log_Msg::local_host_; -} - -ACE_INLINE -pid_t -ACE_Log_Msg::getpid (void) const -{ - return ACE_OS::getpid (); -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Log_Msg_Backend.cpp b/modules/worldengine/deps/acelite/ace/Log_Msg_Backend.cpp deleted file mode 100644 index 95fd1a6a7d..0000000000 --- a/modules/worldengine/deps/acelite/ace/Log_Msg_Backend.cpp +++ /dev/null @@ -1,12 +0,0 @@ -#include "ace/Log_Msg_Backend.h" - - - - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_Log_Msg_Backend::~ACE_Log_Msg_Backend (void) -{ -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Log_Msg_Backend.h b/modules/worldengine/deps/acelite/ace/Log_Msg_Backend.h deleted file mode 100644 index 91a01b8123..0000000000 --- a/modules/worldengine/deps/acelite/ace/Log_Msg_Backend.h +++ /dev/null @@ -1,86 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Log_Msg_Backend.h - * - * @author Douglas C. Schmidt - */ -//============================================================================= - - -#ifndef ACE_LOG_MSG_BACKEND_H -#define ACE_LOG_MSG_BACKEND_H -#include /**/ "ace/pre.h" - -#include /**/ "ace/ACE_export.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/os_include/sys/os_types.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -class ACE_Log_Record; - -/** - * @class ACE_Log_Msg_Backend - * - * @brief Defines the interface for ACE_Log_Msg back end processing. - * - * The ACE_Log_Msg class uses ACE_Log_Msg_Backend as the target interface - * for back end log record procesing. In addition to the classes ACE - * derives from this (ACE_Log_Msg_NT_Event_Log, ACE_Log_Msg_UNIX_Syslog, and - * ACE_Log_Msg_IPC) users can derive classes from ACE_Log_Msg_Backend for - * use as a custom logger back end. - */ -class ACE_Export ACE_Log_Msg_Backend -{ -public: - /// No-op virtual destructor. - virtual ~ACE_Log_Msg_Backend (void); - - /** - * Open the back end object. Perform any actions needed to prepare - * the object for later logging operations. - * - * @param logger_key The character string passed to ACE_Log_Msg::open(). - * If the @c LOGGER logging destination is not being - * used, any string can be passed through to the back end. - * - * @retval 0 for success. - * @retval -1 for failure. - */ - virtual int open (const ACE_TCHAR *logger_key) = 0; - - /** - * Reset the backend. If ACE_Log_Msg is reopened during execution, this - * hook will be called. This method should perform any needed cleanup - * activity (similar to close()) because this object won't be reopened - * if the new open call does not specify use of this back end being reset. - * - * @retval Currently ignored, but to be safe, return 0 for success; - * -1 for failure. - */ - virtual int reset (void) = 0; - - /// Close the backend completely. - virtual int close (void) = 0; - - /** - * Process a log record. - * - * @param log_record The ACE_Log_Record to process. - * - * @retval -1 for failure; else it is customarily the number of bytes - * processed, but can also be 0 to signify success. - */ - virtual ssize_t log (ACE_Log_Record &log_record) = 0; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#include /**/ "ace/post.h" -#endif /* ACE_LOG_MSG_BACKEND_H */ diff --git a/modules/worldengine/deps/acelite/ace/Log_Msg_Callback.cpp b/modules/worldengine/deps/acelite/ace/Log_Msg_Callback.cpp deleted file mode 100644 index 5586c7470f..0000000000 --- a/modules/worldengine/deps/acelite/ace/Log_Msg_Callback.cpp +++ /dev/null @@ -1,13 +0,0 @@ -#include "ace/Log_Msg_Callback.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_Log_Msg_Callback::ACE_Log_Msg_Callback (void) -{ -} - -ACE_Log_Msg_Callback::~ACE_Log_Msg_Callback (void) -{ -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Log_Msg_Callback.h b/modules/worldengine/deps/acelite/ace/Log_Msg_Callback.h deleted file mode 100644 index 1f07976eef..0000000000 --- a/modules/worldengine/deps/acelite/ace/Log_Msg_Callback.h +++ /dev/null @@ -1,70 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Log_Msg_Callback.h - * - * @author Douglas C. Schmidt - */ -//============================================================================= - -#ifndef ACE_LOG_MSG_CALLBACK_H -#define ACE_LOG_MSG_CALLBACK_H -#include /**/ "ace/pre.h" - -#include /**/ "ace/ACE_export.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -class ACE_Log_Record; - -/** - * @class ACE_Log_Msg_Callback - * - * @brief An interface class used to get logging callbacks. - * - * Users who are interested in getting the logging messages - * directly, can subclass this interface and override the log() - * method. They must then register their subclass with the - * Log_Msg class and make sure that they turn on the - * ACE_Log_Msg::MSG_CALLBACK flag. - * - * Your log() routine is called with an instance of - * ACE_Log_Record. From this class, you can get the log - * message, the verbose log message, message type, message - * priority, and so on. - * - * Remember that there is one Log_Msg object per thread. - * Therefore, you may need to register your callback object with - * many ACE_Log_Msg objects (and have the correct - * synchronization in the log() method) or have a separate - * callback object per Log_Msg object. Moreover, - * ACE_Log_Msg_Callbacks are not inherited when a new thread - * is spawned because it might have been allocated off of the - * stack of the original thread, in which case all hell would - * break loose... Therefore, you'll need to reset these in each - * new thread. - */ -class ACE_Export ACE_Log_Msg_Callback -{ -public: - /// Default constructor - ACE_Log_Msg_Callback (void); - - /// No-op virtual destructor. - virtual ~ACE_Log_Msg_Callback (void); - - /// Callback routine. This is called when we want to log a message. - /// Since this routine is pure virtual, it must be overwritten by the - /// subclass. - virtual void log (ACE_Log_Record &log_record) = 0; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#include /**/ "ace/post.h" -#endif /* ACE_LOG_MSG_CALLBACK_H */ diff --git a/modules/worldengine/deps/acelite/ace/Log_Msg_IPC.cpp b/modules/worldengine/deps/acelite/ace/Log_Msg_IPC.cpp deleted file mode 100644 index 713facea85..0000000000 --- a/modules/worldengine/deps/acelite/ace/Log_Msg_IPC.cpp +++ /dev/null @@ -1,112 +0,0 @@ -#include "ace/Log_Msg_IPC.h" -#include "ace/Log_Record.h" -#include "ace/CDR_Stream.h" -#include "ace/Truncate.h" - - - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_Log_Msg_IPC::ACE_Log_Msg_IPC (void) -{ -} - -ACE_Log_Msg_IPC::~ACE_Log_Msg_IPC (void) -{ - (void) this->close (); -} - -int -ACE_Log_Msg_IPC::open (const ACE_TCHAR *logger_key) -{ - ACE_LOG_MSG_IPC_CONNECTOR con; - return con.connect (this->message_queue_, - ACE_LOG_MSG_IPC_ADDR (logger_key)); -} - -int -ACE_Log_Msg_IPC::reset (void) -{ - if (this->message_queue_.get_handle () != ACE_INVALID_HANDLE) - { - // If we don't do this, handles aren't reused on Win32 and the - // server eventually crashes! - return this->close (); - } - return 0; -} - -int -ACE_Log_Msg_IPC::close (void) -{ - return this->message_queue_.close (); -} - -ssize_t -ACE_Log_Msg_IPC::log (ACE_Log_Record &log_record) -{ - // Serialize the log record using a CDR stream, allocate enough - // space for the complete . - size_t const max_payload_size = - 4 // type - + 4 // pid - + 12 // timestamp - + 4 // process id - + 4 // data length -#if defined (ACE_USES_WCHAR) - + (log_record.msg_data_len () * ACE_OutputCDR::wchar_maxbytes()) // message -#else - + log_record.msg_data_len () // message -#endif - + ACE_CDR::MAX_ALIGNMENT; // padding; - - // Insert contents of into payload stream. - ACE_OutputCDR payload (max_payload_size); - if (!(payload << log_record)) - return -1; - - // Get the number of bytes used by the CDR stream. If it becomes desireable - // to support payloads more than 4GB, this field will need to be changed - // to a 64-bit value. - ACE_CDR::ULong const length = - ACE_Utils::truncate_cast (payload.total_length ()); - - // Send a header so the receiver can determine the byte order and - // size of the incoming CDR stream. - ACE_OutputCDR header (ACE_CDR::MAX_ALIGNMENT + 8); - if (!(header << ACE_OutputCDR::from_boolean (ACE_CDR_BYTE_ORDER))) - return -1; - - // Store the size of the payload that follows - if (!(header << ACE_CDR::ULong (length))) - return -1; - - // Use an iovec to send both buffer and payload simultaneously. - iovec iov[2]; - iov[0].iov_base = header.begin ()->rd_ptr (); - iov[0].iov_len = 8; - iov[1].iov_base = payload.begin ()->rd_ptr (); - iov[1].iov_len = length; - -#if (ACE_HAS_STREAM_LOG_MSG_IPC == 1) - // Use the API if supported to ensure correct message - // queueing according to priority. - - ACE_Str_Buf header_msg (static_cast (header.begin ()->rd_ptr ()), - static_cast (8)); - - ACE_Str_Buf payload_msg (static_cast (payload.begin ()->rd_ptr ()), - static_cast (length)); - - return this->message_queue_.send (&header_msg, - &payload_msg, - static_cast (log_record.priority ()), - MSG_BAND); -#else - // We're running over sockets, so send header and payload - // efficiently using "gather-write". - return this->message_queue_.sendv_n (iov, 2); -#endif /* ACE_HAS_STREAM_LOG_MSG_IPC */ -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/modules/worldengine/deps/acelite/ace/Log_Msg_IPC.h b/modules/worldengine/deps/acelite/ace/Log_Msg_IPC.h deleted file mode 100644 index 8761df6ace..0000000000 --- a/modules/worldengine/deps/acelite/ace/Log_Msg_IPC.h +++ /dev/null @@ -1,79 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Log_Msg_IPC.h - * - * @author Carlos O'Ryan - */ -//============================================================================= - -#ifndef ACE_LOG_MSG_LOGGER_H -#define ACE_LOG_MSG_LOGGER_H -#include /**/ "ace/pre.h" - -#include "ace/Log_Msg_Backend.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#include "ace/Default_Constants.h" - -// IPC conduit between sender and client daemon. This should be -// included in the ACE_Log_Msg class, but due to "order of include" -// problems it can't be... -#if (ACE_HAS_STREAM_LOG_MSG_IPC == 1) -# include "ace/SPIPE_Connector.h" -ACE_BEGIN_VERSIONED_NAMESPACE_DECL -typedef ACE_SPIPE_Stream ACE_LOG_MSG_IPC_STREAM; -typedef ACE_SPIPE_Connector ACE_LOG_MSG_IPC_CONNECTOR; -typedef ACE_SPIPE_Addr ACE_LOG_MSG_IPC_ADDR; -ACE_END_VERSIONED_NAMESPACE_DECL -#else -# include "ace/SOCK_Connector.h" -ACE_BEGIN_VERSIONED_NAMESPACE_DECL -typedef ACE_SOCK_Stream ACE_LOG_MSG_IPC_STREAM; -typedef ACE_SOCK_Connector ACE_LOG_MSG_IPC_CONNECTOR; -typedef ACE_INET_Addr ACE_LOG_MSG_IPC_ADDR; -ACE_END_VERSIONED_NAMESPACE_DECL -#endif /* ACE_HAS_STREAM_PIPES */ - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/// Defines the interfaces for ACE_Log_Msg backend. -/** - * Implement an ACE_Log_Msg_Backend that logs to a remote logging - * process. - */ -class ACE_Export ACE_Log_Msg_IPC : public ACE_Log_Msg_Backend -{ -public: - /// Constructor - ACE_Log_Msg_IPC (void); - - /// Destructor - virtual ~ACE_Log_Msg_IPC (void); - - /// Open a new connection - virtual int open (const ACE_TCHAR *logger_key); - - /** - * Reset the backend. When changing the logging destination the - * backend may need to properly disconnect from the remote logging - * daemon and reclaim some local resources. But we try to reduce - * the number of local allocations/deallocations. - */ - virtual int reset (void); - - virtual int close (void); - virtual ssize_t log (ACE_Log_Record &log_record); - -private: - ACE_LOG_MSG_IPC_STREAM message_queue_; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#include /**/ "ace/post.h" -#endif /* ACE_LOG_MSG_H */ diff --git a/modules/worldengine/deps/acelite/ace/Log_Msg_NT_Event_Log.cpp b/modules/worldengine/deps/acelite/ace/Log_Msg_NT_Event_Log.cpp deleted file mode 100644 index f9d0d141de..0000000000 --- a/modules/worldengine/deps/acelite/ace/Log_Msg_NT_Event_Log.cpp +++ /dev/null @@ -1,168 +0,0 @@ -#include "ace/config-all.h" - -#if defined (ACE_HAS_LOG_MSG_NT_EVENT_LOG) - -#include "ace/Log_Msg_NT_Event_Log.h" -#include "ace/Log_Category.h" -#include "ace/Log_Record.h" -#include "ace/OS_NS_stdio.h" -#include "ace/OS_NS_string.h" - - - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_Log_Msg_NT_Event_Log::ACE_Log_Msg_NT_Event_Log (void) - : evlog_handle_(0) -{ -} - -ACE_Log_Msg_NT_Event_Log::~ACE_Log_Msg_NT_Event_Log (void) -{ - this->close (); -} - -int -ACE_Log_Msg_NT_Event_Log::open (const ACE_TCHAR *logger_key) -{ - // ACE's "resource module" contains the message resource required - // for event logging. - ACE_TCHAR msg_file [MAXPATHLEN]; - - if (!ACE_TEXT_GetModuleFileName (ACE_OS::get_win32_resource_module (), - msg_file, - MAXPATHLEN)) - return -1; - DWORD msg_file_length = - static_cast ((ACE_OS::strlen (msg_file) + 1) * sizeof (ACE_TCHAR)); - - // If a logger_key has been supplied then we use that as the event - // source name, otherwise we default to the program name. - const ACE_TCHAR *event_source_name = logger_key ? logger_key : ACE_Log_Msg::program_name (); - - // Information is stored in the registry at a location based on the - // program name. - ACE_TCHAR reg_key [MAXPATHLEN]; - ACE_OS::strcpy (reg_key, - ACE_TEXT ("SYSTEM\\CurrentControlSet\\Services\\EventLog\\Application\\")); - size_t reg_key_length = ACE_OS::strlen(reg_key); - ACE_OS::strncat (reg_key, - event_source_name, - MAXPATHLEN - reg_key_length); - - // Add the event source to the registry. Note that if this fails it - // is not fatal. The application will still be able to write entries - // to the event log, they just won't be formatted correctly. - HKEY hkey; - ACE_TEXT_RegCreateKey (HKEY_LOCAL_MACHINE, - reg_key, - &hkey); - DWORD flags = EVENTLOG_ERROR_TYPE | EVENTLOG_WARNING_TYPE | EVENTLOG_INFORMATION_TYPE; - ACE_TEXT_RegSetValueEx (hkey, - ACE_TEXT ("TypesSupported"), - 0, - REG_DWORD, - (LPBYTE) &flags, - sizeof (DWORD)); - ACE_TEXT_RegSetValueEx (hkey, - ACE_TEXT ("EventMessageFile"), - 0, - REG_SZ, - (LPBYTE) msg_file, - msg_file_length); - RegCloseKey (hkey); - - // Obtain a handle to the event source. - this->evlog_handle_ = ACE_TEXT_RegisterEventSource (0, - event_source_name); - return this->evlog_handle_ ? 0 : -1; -} - -int -ACE_Log_Msg_NT_Event_Log::reset (void) -{ - return this->close (); -} - -int -ACE_Log_Msg_NT_Event_Log::close (void) -{ - if (this->evlog_handle_ == 0 - || DeregisterEventSource (this->evlog_handle_)) - { - this->evlog_handle_ = 0; - return 0; - } - else - return -1; -} - -ssize_t -ACE_Log_Msg_NT_Event_Log::log (ACE_Log_Record &log_record) -{ - // Make a copy of the log text and replace any newlines with - // CR-LF. Newline characters on their own do not appear correctly in - // the event viewer. We allow for a doubling in the size of the msg - // data for the worst case of all newlines. - const ACE_TCHAR *src_msg_data = log_record.msg_data (); - ACE_TCHAR msg_data [(ACE_Log_Record::MAXLOGMSGLEN * 2) + 1]; - - size_t maxlen = ACE_Log_Record::MAXLOGMSGLEN; - if (ACE_Log_Record::MAXLOGMSGLEN > log_record.msg_data_len ()) - maxlen = log_record.msg_data_len (); - - size_t end = 0; - for (size_t i = 0, j = 0; - i < maxlen; - ++i) - { - if (src_msg_data[i] == '\n') - { - msg_data[j++] = '\r'; - msg_data[j++] = '\n'; - } - else - msg_data[j++] = src_msg_data[i]; - - end = j; - } - msg_data[end] = '\0'; - - // Map the ACE log record type to an event log type. - WORD event_type; - switch (log_record.type ()) - { - case LM_STARTUP: - case LM_SHUTDOWN: - case LM_TRACE: - case LM_DEBUG: - case LM_INFO: - event_type = EVENTLOG_INFORMATION_TYPE; - break; - case LM_NOTICE: - case LM_WARNING: - event_type = EVENTLOG_WARNING_TYPE; - break; - case LM_ERROR: - case LM_CRITICAL: - case LM_ALERT: - case LM_EMERGENCY: - default: - event_type = EVENTLOG_ERROR_TYPE; - break; - } - - // Send the log message to the system event log. - const ACE_TCHAR* msgs [1]; - msgs[0] = msg_data; - - if (ACE_TEXT_ReportEvent (this->evlog_handle_, - event_type, 0, 0, 0, 1, 0, msgs, 0) == 0) - return -1; - else - return 0; -} - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_HAS_LOG_MSG_NT_EVENT_LOG */ diff --git a/modules/worldengine/deps/acelite/ace/Log_Msg_NT_Event_Log.h b/modules/worldengine/deps/acelite/ace/Log_Msg_NT_Event_Log.h deleted file mode 100644 index d234923a54..0000000000 --- a/modules/worldengine/deps/acelite/ace/Log_Msg_NT_Event_Log.h +++ /dev/null @@ -1,70 +0,0 @@ -// -*- C++ -*- - -//============================================================================= -/** - * @file Log_Msg_NT_Event_Log.h - * - * @author Christopher Kohlhoff - */ -//============================================================================= - -#ifndef ACE_LOG_MSG_NT_EVENT_LOG_H -#define ACE_LOG_MSG_NT_EVENT_LOG_H -#include /**/ "ace/pre.h" - -#include /**/ "ace/config-all.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -#if defined ACE_HAS_LOG_MSG_NT_EVENT_LOG - -#include "ace/Log_Msg_Backend.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -/** - * @class ACE_Log_Msg_NT_Event_Log - * - * @brief Implements an ACE_Log_Msg_Backend that logs to the WinNT system - * event log. - */ -class ACE_Export ACE_Log_Msg_NT_Event_Log : public ACE_Log_Msg_Backend -{ -public: - /// Constructor - ACE_Log_Msg_NT_Event_Log (void); - - /// Destructor - virtual ~ACE_Log_Msg_NT_Event_Log (void); - - /// Open a new event log. - /** - * Initialize the event logging facility. - * @param logger_key The name of the calling program. This name is - * used in the Source field of the event log. If - * it is 0 (no name), the application name as - * returned from ACE_Log_Msg::program_name() is used. - */ - virtual int open (const ACE_TCHAR *logger_key); - - /// Reset the backend. - virtual int reset (void); - - /// Close the backend completely. - virtual int close (void); - - /// This is called when we want to log a message. - virtual ssize_t log (ACE_Log_Record &log_record); - -private: - HANDLE evlog_handle_; -}; - -ACE_END_VERSIONED_NAMESPACE_DECL - -#endif /* ACE_HAS_LOG_MSG_NT_EVENT_LOG */ - -#include /**/ "ace/post.h" -#endif /* ACE_LOG_MSG_NT_EVENT_LOG_H */ diff --git a/modules/worldengine/deps/acelite/ace/Log_Msg_UNIX_Syslog.cpp b/modules/worldengine/deps/acelite/ace/Log_Msg_UNIX_Syslog.cpp deleted file mode 100644 index ab5d271605..0000000000 --- a/modules/worldengine/deps/acelite/ace/Log_Msg_UNIX_Syslog.cpp +++ /dev/null @@ -1,205 +0,0 @@ -#include "ace/config-all.h" - -#if !defined (ACE_LACKS_UNIX_SYSLOG) - -#include "ace/ACE.h" -#include "ace/Log_Category.h" -#include "ace/Log_Msg_UNIX_Syslog.h" -#include "ace/Log_Record.h" -#include "ace/OS_NS_string.h" -#include "ace/os_include/os_syslog.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -// NOTE: -// The ACE_Log_Msg_UNIX_Syslog class can use the openlog(), -// setlogmask(), syslog() and closelog() routines in a thread safe -// manner (versus using openlog_r(), et. al.), as the ACE_Log_Msg -// class uses the lock provided by its local ACE_Log_Msg_Manager -// class when calling the methods of the backend classes. As a -// result, logging semantics with respect to the UNIX syslog -// facility, will be the same for all threads in a process. This -// should not be too limiting, as the ACE_Log_Msg class itself can -// be used to control thread specific logging behavior. - -ACE_Log_Msg_UNIX_Syslog::ACE_Log_Msg_UNIX_Syslog (void) -{ -} - -ACE_Log_Msg_UNIX_Syslog::~ACE_Log_Msg_UNIX_Syslog (void) -{ - (void) this->close (); -} - -int -ACE_Log_Msg_UNIX_Syslog::open (const ACE_TCHAR * logger_key) -{ - if (logger_key == 0) - logger_key = ACE_Log_Msg::program_name (); - - // Initialize the UNIX syslog facility. Default the syslog log - // options LOG_CONS and LOG_PID to be set. There really should be a - // logging strategy option to control the syslog log options, - // however, we'll take the easy way out for now. -#if defined (ACE_USES_WCHAR) - openlog (ACE_TEXT_ALWAYS_CHAR (logger_key), - LOG_CONS|LOG_PID, - ACE_DEFAULT_SYSLOG_FACILITY); -#else - openlog (const_cast (logger_key), - LOG_CONS|LOG_PID, - ACE_DEFAULT_SYSLOG_FACILITY); -#endif /* ACE_USES_WCHAR */ - - // Enable logging of all syslog priorities. If logging of all - // priorities is not desired, use the ACE_Log_Msg::priority_mask() - // method to control the log output sent to the syslog daemon via - // the log() method, or use the system's syslog.conf file to select - // desired level of information. - -#if !defined (ACE_LACKS_SETLOGMASK) - (void) setlogmask (LOG_UPTO (LOG_DEBUG)); -#endif /* ACE_LACKS_SETLOGMASK */ - - return 0; -} - -int -ACE_Log_Msg_UNIX_Syslog::reset (void) -{ - return this->close (); -} - -int -ACE_Log_Msg_UNIX_Syslog::close (void) -{ - closelog(); - return 0; -} - -ssize_t -ACE_Log_Msg_UNIX_Syslog::log (ACE_Log_Record &log_record) -{ - int syslog_priority = this->convert_log_priority (log_record.type ()); - u_long flags = ACE_LOG_MSG->flags (); - - // The UNIX syslog() facility does not support multi-line messages. - // Break up the message data into separate lines and send each line - // to the syslog daemon. - - ACE_TCHAR message[ACE_Log_Record::MAXVERBOSELOGMSGLEN]; - ACE_OS::strcpy (message, log_record.msg_data ()); - ACE_TCHAR *strtokp = 0; - - for (ACE_TCHAR *line = ACE_OS::strtok_r (message, - ACE_TEXT ("\n"), - &strtokp); - line != 0; - line = ACE_OS::strtok_r (0, - ACE_TEXT ("\n"), - &strtokp)) - { - // Format the message line. Note that the processing for - // VERBOSE is the same as for VERBOSE_LITE, since syslog() - // already provides us with the hostname and PID. However, the - // timestamp is duplicated (albeit a shortened version) to - // provide a timestamp with greater precision than that provided - // by syslog(). - if (ACE_BIT_ENABLED (flags, ACE_Log_Msg::VERBOSE) - || ACE_BIT_ENABLED (flags, ACE_Log_Msg::VERBOSE_LITE)) - { - ACE_TCHAR date_and_time[27]; - if (0 == ACE::timestamp (date_and_time, sizeof (date_and_time), 1)) - ACE_OS::strcpy (date_and_time, ACE_TEXT ("