Core/Requeriments: Updated Core to be compiled in Visual studio 2019, the ACE has been updated to 7.0.

This commit is contained in:
d3athbl0w 2022-01-15 13:24:40 -04:00
parent 5bda91097c
commit d431f48088
1815 changed files with 72880 additions and 42819 deletions

2
.gitignore vendored
View file

@ -1,2 +1,4 @@
*.ini
.vscode*/
/out/build
/.vs

16
CMakeSettings.json Normal file
View file

@ -0,0 +1,16 @@
{
"configurations": [
{
"name": "x64-Release",
"generator": "Visual Studio 16 2019 Win64",
"configurationType": "RelWithDebInfo",
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"inheritEnvironments": [ "msvc_x64_x64" ],
"variables": []
}
]
}

View file

@ -4,11 +4,14 @@
## Requirements
+ Platform: Linux, Windows or Mac
+ Processor with SSE2 support
+ Boost 1.70.0 (msvc 14.1 x64)
+ MySQL = 5.7.0
+ CMake 3.19.4 (x64)
+ OpenSSL 1.0.2d (x64)
+ MS Visual Studio 15 (2017) (Windows only)
+ ACE = 7.0.0 (included for Windows)
+ MySQL = 5.7
+ CMake ≥ 3.14 (latest stable recommended)
+ OpenSSL = 1.x.x
+ Boost ≥ 1.70 (latest stable recommended)
+ Windows SDK version 10
+ MS Visual Studio (Community) ≥ 16.4 (2019) (Desktop) (Not previews)
+ GCC = 4.7.2 (Linux only)
## Copyright
License: GPL 3.0

View file

@ -29,9 +29,9 @@ if(CMAKE_SYSTEM_NAME MATCHES "Windows")
if(TOOLS)
add_subdirectory(bzip2)
endif()
add_subdirectory(zlib)
endif()
add_subdirectory(zlib)
add_subdirectory(g3dlite)
add_subdirectory(recastnavigation)

3144
dep/acelite/ACE-INSTALL.html Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,12 +1,12 @@
Douglas C. Schmidt
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
Department of Electrical Engineering and Computer Science
Senior Researcher at the Institute for Software Integrated Systems (ISIS)
Vanderbilt University
Nashville, TN 37203
Vanderbilt University
Nashville, TN 37203
www.dre.vanderbilt.edu/~schmidt
TEL: (615) 343-8197

View file

@ -1,5 +1,5 @@
# Copyright (C) 2011-2016 Project SkyFire <http://www.projectskyfire.org/
# Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/>
# Copyright (C) 2011-2020 Project SkyFire <http://www.projectskyfire.org/
# Copyright (C) 2008-2021 TrinityCore <http://www.trinitycore.org/>
#
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without

View file

@ -8,7 +8,7 @@
(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-2012, all rights reserved. Since DOC
University, Copyright (c) 1993-2019, 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
@ -86,26 +86,26 @@
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
1. https://www.dre.vanderbilt.edu/~schmidt/ACE.html
2. https://www.dre.vanderbilt.edu/~schmidt/TAO.html
3. https://www.dre.vanderbilt.edu/CIAO/
4. https://www.dre.vanderbilt.edu/cosmic/
5. https://www.dre.vanderbilt.edu/~schmidt/
6. https://www.dre.vanderbilt.edu/~schmidt/ACE-members.html
7. https://www.wustl.edu/
8. https://www.uci.edu/
9. https://www.vanderbilt.edu/
10. mailto:d.schmidt@vanderbilt.edu
11. https://www.dre.vanderbilt.edu/~schmidt/ACE-users.html
12. https://www.dre.vanderbilt.edu/~schmidt/ACE.html
13. https://www.dre.vanderbilt.edu/~schmidt/TAO.html
14. https://www.dre.vanderbilt.edu/CIAO/
15. https://www.dre.vanderbilt.edu/~schmidt/DOC_ROOT/DAnCE/
16. https://www.dre.vanderbilt.edu/cosmic/
17. https://www.dre.vanderbilt.edu/
18. https://www.isis.vanderbilt.edu/
19. https://www.cs.wustl.edu/~schmidt/doc-center.html
20. https://www.dre.vanderbilt.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
22. https://www.dre.vanderbilt.edu/~schmidt/
23. https://www.dre.vanderbilt.edu/~schmidt/ACE.html

File diff suppressed because it is too large Load diff

View file

@ -1,3 +1,639 @@
USER VISIBLE CHANGES BETWEEN ACE-6.5.12 and ACE-7.0.0
=====================================================
. C++11 is now a mandatory compiler feature which is
required for ACE. Cleaned up part of the support for compilers
that lack C++11 support
. When valgrind is enabled we don't disable dlclose anymore,
this reduces the amount of leaks reported related to dlclose.
When you unload your shared libraries before the end of your program
you can use `--keep-debuginfo=yes` as valgrind options as alternative
or you can disable dlclose yourself by adding
`#define ACE_LACKS_DLCLOSE` to your ace/config.h file
. Removed `ACE_OS::readdir_r`. `readdir_r` was marked as depracated in glibc
and FreeBSD libc. Also removed `ACE_Dirent::read (ACE_DIRENT *, ACE_DIRENT **)`
which used it. `ACE_LACKS_READDIR_R` will now always be defined.
. Modernized part of the code using clang-type, added override, use nullptr,
use unique_ptr, remove redundant void, use bool, simplify boolean expressions,
make use of std::atomic, use using
. New Latest_ACE7TAO3_ branches which can be used to always checkout the
latest ACE7/TAO3 micro/minor release
. Android Support:
. `gnuace` no longer supports Android NDKs before r18. This means only clang
is now supported when building for Android.
. Support for building with the Android NDK r19 or later directly instead of
having to use a generated standalone toolchain. See `ACE-INSTALL.html` for
details. Using a standalone toolchain is still supported.
. Made it easier to use `gnuace`-built libraries in as imported libraries in
CMake-based Android Studio native projects.
. Removed support for old `ANDROID_ARCH` make variable. Replaced
`ANDROID_ABI` with `android_abi`, but kept the former as an alias of the
later for compatibility. Also will no longer default to 32-bit ARM, so
`android_abi` or `ANDROID_ABI` must be defined.
. As recommend by Google, building with neon support is now the default when
`android_abi` is `armeabi-v7a`. If support for these processors without
NEON extensions is needed, put `androind_neon := 0` in
`platform_macros.GNU`.
. As recommend by Google, `gnuace` will start using LLD, the LLVM linker,
instead of the default GNU linkers. If the NDK being used doesn't default
to LLD and you want to use the GNU linkers, put `androind_set_lld := 0` in
`platform_macros.GNU`.
. Removed support for the Alpha CPU
USER VISIBLE CHANGES BETWEEN ACE-6.5.11 and ACE-6.5.12
======================================================
. Fixed some C++11 warnings
. Fixed compile problem on AIX
. Removed c++0x and c++1y as GNU make variables, use c++11 and c++14 as
alternatives
. Moved all CI builds to github actions
. Added ACE_GCC_NO_RETURN to fix fall through warnings
. Fix ACE_Thread_Manager::join memory leak and potential deadlock
USER VISIBLE CHANGES BETWEEN ACE-6.5.10 and ACE-6.5.11
======================================================
. Latest_{Major,Minor,Micro,Beta} tags have been replaced with
branches because tags are not intended to move where branches are
. Removed emulated operations in ACE_OS which are not used anymore
. Resolved some compile warnings when using C++11 or newer
. Integrated debian packaging changes
. Visual Studio 2015 solutions are not part of the release
packaging anymore. When you require these you need to generate
them locally using MPC
. Improve multicast join by interface name on Windows
. Fixed ACE_INT64_FORMAT_SPECIFIER (and similar) preprocessor macros
on macOS (Apple-clang) with -std=c++11 or higher
. On Windows, use unnamed kernel objects (Events and Semaphores)
for thread-scoped reader-write mutexes in ACE_OS::rwlock_init
USER VISIBLE CHANGES BETWEEN ACE-6.5.9 and ACE-6.5.10
=====================================================
. Add support for Embarcadero C++ Builder 10.4 Sydney using the
classic compiler. ACE/TAO compile with the new 32/64 bit clang
compilers but runtime tests show several runtime problems which
makes them not safe to use
. Make a change in the ACE Process Manager to resolve an internal
compiler error with Visual Studio 2019 16.5.x compilers
. Android enhancements for if_nameindex
USER VISIBLE CHANGES BETWEEN ACE-6.5.8 and ACE-6.5.9
====================================================
. On Windows, ACE no longer defines _WIN32_WINNT. ACE wrappers for
if_nametoindex and if_indextoname are available if the version of the
Windows SDK supports them.
. IPv6 extended datagram receive info now supported on macOS.
. ACE_(U)INT8/16/32/64 map to (u)int8/16/32/64_t when C++11 has been
enabled.
. CDR_Base uses ACE_INT64 for LongLong, all old emulated support
has been removed
. Updated debian and rpm packaging support
USER VISIBLE CHANGES BETWEEN ACE-6.5.7 and ACE-6.5.8
====================================================
. Added instructions to ACE-INSTALL.html for building ACE/TAO for Android on
Windows.
. Embarcadero C++ Builder Rio fixes
. Renamed `VERSION` file to `VERSION.txt` to avoid conflicting with the
`version` standard header.
USER VISIBLE CHANGES BETWEEN ACE-6.5.6 and ACE-6.5.7
====================================================
. Fixed compile problem with glibc 2.30 and newer
. gnuace makefiles: Updated handling of generated files and
use requires/avoids to make postbuild steps conditional
. Removed references to the ACE_LACKS_MONOTONIC_TIME preprocessor macro because
it was equivalent to ACE_LACKS_CLOCK_MONOTONIC.
. Exposed support status of monotonic times features using preprocessor macros.
See "Testing for Monotonic Time Support" in docs/ACE-monotonic-timer.html for
details.
. Added support for ARM and ARM64 stack traces with Microsoft Visual C++.
. The "optional argument for the receive address in ACE_SOCK_Dgram::recv"
feature from ACE-6.5.5 is now supported on Windows. This includes enhanced
support for sendmsg/recvmsg on Windows.
USER VISIBLE CHANGES BETWEEN ACE-6.5.5 and ACE-6.5.6
====================================================
. On Linux, the ACE_Log_Msg format specifier `%t` is now replaced with the
system thread id provided by gettid(), instead of the much longer pthread id.
. Added support for MQX
. Enhanced Android support
USER VISIBLE CHANGES BETWEEN ACE-6.5.4 and ACE-6.5.5
====================================================
. Fixed several broken links due to the removal of
Douglas Schmidt website at WashU
. On Android:
. ACE_Log_Msg (and therefore ACE_DEBUG and ACE_ERROR) now uses
Android's logging system (aka Logcat) by default in addition to stderr
because stdout and stderr are discarded under normal circumstances.
To disable this at runtime, run:
ACE_LOG_MSG->clr_flags (ACE_Log_Msg::SYSLOG)
To disable this at compile time include these lines in config.h:
#define ACE_DEFAULT_LOG_FLAGS ACE_Log_Msg::STDERR
#define ACE_DEFAULT_LOG_BACKEND_FLAGS 0
. When statically linking to OpenSSL, prevent usage of the preloaded and
unpredictable system SSL library when using ace_openssl.
. minizip has been moved from ACE to DANCE
. Add initial support for Visual Studio 2019
. Validated ACE for usage SLES15.0 x86_64 using 32bit g++ compiler
. Add optional argument for the receive address in ACE_SOCK_Dgram::recv
USER VISIBLE CHANGES BETWEEN ACE-6.5.3 and ACE-6.5.4
====================================================
. Fix ACE_Vector::end(), which now correctly
represents the end of the elements of the vector
instead of the end of the base array.
USER VISIBLE CHANGES BETWEEN ACE-6.5.2 and ACE-6.5.3
====================================================
. Enhance Android support
. Fix AIX and Solaris linking rpath errors
. Add support for SSL_INCDIR/SSL_LIBDIR and XERCESC_INCDIR/XERCESC_LIBDIR
to specify a custom include/lib dir as required for vcpkg versions of
openssl/xercesc
USER VISIBLE CHANGES BETWEEN ACE-6.5.1 and ACE-6.5.2
====================================================
. Enhanced C++Builder XE2 support
. ACE_QtReactor can be built with Qt version 5 using the qt5 MPC feature
USER VISIBLE CHANGES BETWEEN ACE-6.5.0 and ACE-6.5.1
====================================================
. At the moment C++11 or newer is enabled ACE_Strong_Bound_Ptr
doesn't provide the convenience functions to use a
std::auto_ptr anymore
. Optimized CDR std::(w)string insertion and extraction
when C++11 or newer is enabled
. Solved Visual Studio 2017 solution loading due to duplicate
files generated in a project file
USER VISIBLE CHANGES BETWEEN ACE-6.4.8 and ACE-6.5.0
====================================================
. The ACE core libraries now use std::unique_ptr instead
of std::auto_ptr when C++11 or newer is enabled
USER VISIBLE CHANGES BETWEEN ACE-6.4.7 and ACE-6.4.8
====================================================
. Enhanced Embarcadero C++ Builder support
. ACE XML_Utils enhancements
. Debian packaging enhancements
. Support for clang6 and gcc8
. Enhanced Android support
. Remove addr_any restriction from ipv6_only UDP
USER VISIBLE CHANGES BETWEEN ACE-6.4.6 and ACE-6.4.7
====================================================
. Added a new, optional argument named ipv6_only to:
ACE_Acceptor::ACE_Acceptor
ACE_Acceptor::open
ACE_SOCK_Dgram::ACE_SOCK_Dgram
ACE_SOCK_Dgram::open
If ipv6_only is 0/false (the default) the socket will accept
both IPv6 and IPv4 connections/datagrams. If ipv6_only is
1/true the socket will only accept IPv6.
This behavior only applies when ACE_HAS_IPV6 is true and the
local-side IP address is the generic localhost IP address.
. Integrated some changes from XSC into XML Utils
. Enable ACE_HAS_CPP11 when we have clang with C++11 enabled
. Added support for cross compiling using MinGW on a Linux host
. Added support for FreeBSD 11
. Fixed issue ACE_Singleton was broken after ACE::fini, ACE::init (GitHub #554)
USER VISIBLE CHANGES BETWEEN ACE-6.4.5 and ACE-6.4.6
====================================================
. Fixed some Codacy and C++ Core guidelines reported issues
. VxWorks 7 (SR0510) support
. Support make install on newer Apple MacOS versions
USER VISIBLE CHANGES BETWEEN ACE-6.4.4 and ACE-6.4.5
====================================================
. Add support for OpenSSL 1.1. ACE users on Windows have
to add openssl11=1 to their default.features file so
that the correct OpenSSL library names are used.
USER VISIBLE CHANGES BETWEEN ACE-6.4.3 and ACE-6.4.4
====================================================
. Enhanced support for Embarcadero C++ Builder 10.2 (Tokyo).
Support for bcc32/bcc64/bcc32c has been enhanced and by
default the clang based versions are used. When the old
bcc32 has to be used set the CLASSIC environment variable
to 1. At this moment runtime test results for bcc64/bcc32c
show some structural problems
. Add support for Oracle Studio 12.5
. Removed usage of ACE_REGISTER and register keyword because
they trigger deprecated warnings with newer gcc and clang
versions
. Add support for gcc 7
. Enhanced Android support
. Fix ACE_INET_Addr::set(domain_name, AF_UNSPEC) to be set to IPv4 address
when IPv6 is enabled and the domain_name could be resolved to IPv4 address.
USER VISIBLE CHANGES BETWEEN ACE-6.4.2 and ACE-6.4.3
====================================================
. Enhancements for Visual Studio 2017
. Enhancements for Android
USER VISIBLE CHANGES BETWEEN ACE-6.4.1 and ACE-6.4.2
====================================================
. Added support for Mac OS X on x86_64 to get the network adapter
address in ACE_OS::getmacaddress().
. Added support for the December 2016 updates to VxWorks 7.
USER VISIBLE CHANGES BETWEEN ACE-6.4.0 and ACE-6.4.1
====================================================
. The ACE_DEBUG environment variable can again be used to set the
internal debug flag. This used to work but was mistakenly changed
in an earlier release.
. Corrected usage of ACE_Singleton and template instantation to be
valid C++ (GCC cross-compiler arm-linux-gnueabihf-g++ requires it).
. Added support for detecting the Mac OS X version when configured with
ace/config-macosx.h and include/makeinclude/platform_macosx.GNU.
Also on 10.11 El Capitan, use rpath to avoid a problem with SIP.
. Added support for Android NDK r12b (Platform API 24) and improved
cross compilation support
USER VISIBLE CHANGES BETWEEN ACE-6.3.4 and ACE-6.4.0
====================================================
. Added support for obtaining the micro version number
. Reduced include of ace/Auto_Ptr.h in header files
USER VISIBLE CHANGES BETWEEN ACE-6.3.3 and ACE-6.3.4
====================================================
. ACE_SSL_Context::set_mode() can no longer be used to select a specific
SSL/TLS protocol version, use ACE_SSL_Context::filter_versions() for that.
This follows general advice by the OpenSSL project to go through
SSL_CTX_set_options() to limit the list of protocols available. The purpose
of ACE_SSL_Context::set_mode() is now limited to explicitly restricting
behaviour to client or server (defaults to both).
. Improve Oracle Studio support
. CIAO and DAnCE are forked to their own github repositories
and are not part anymore of the ACE+TAO release packages
. Fixed several Coverity reported issues
. Added ACE configuration for FACE safety profiles (see config-face-safety.h).
FACE, or Future Airborne Capability Environment http://www.opengroup.org/face,
specifies a restricted subset of OS functions and rules for controlling
dynamic memory allocation. When built in this configuration on a platform
that supports it, ACE conforms to the FACE requirements.
. ACE uses new netdb.h functions (getaddrinfo/getnameinfo) if they are
available, in place of deprecated functions (gethostbyname/addr).
USER VISIBLE CHANGES BETWEEN ACE-6.3.2 and ACE-6.3.3
====================================================
. Visual Studio 2015 has adequate C++11 support, because of this
ACE_HAS_CPP11 is now defined with this compiler. A large amount
of warnings given by this new compiler have been fixed
. As part of the release script we generate vc12 and vc14
solution files which are packaged as part of the release
. Added support for VxWorks 7 (kernel mode and RTP).
See the comments in include/makeinclude/platform_vxworks7.0.GNU for details.
. Ended daily maintenance for OpenVMS
. Fixed a defect in ACE_INET_Addr when there is a non-empty interface
address list and set_port_number() is called.
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<T>() 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 maintenance 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
====================================================

View file

@ -0,0 +1,87 @@
[Please use the PRF form below to submit bug reports, problem reports,
etc., to the ACE developers and interested users. Send it to
ace-bugs@list.isis.vanderbilt.edu, you must be subscribed to the list
in order to be able to post to it. If you are using OCI, MicroFocus, or
Riverace's versions of ACE do not send bugs to this mailing list, but
instead contact those companies for support. Please also send your
PRF as plain ASCII text, _not_ uuencoded or as an attachment.
We prefer that all bug reports be submitted through github issues.
See https://github.com/DOCGroup/ACE_TAO/issues for more information
about how to do this. If you are unsure as to whether your problem
is a real bug or not then please submit your question to the mailing
list using the following form. Not using the problem report form
will make it harder or impossible to identify the problem, and in
many cases we will be unable to help at all. Also please try to
browse the existing github isssues and the ChangeLog files to find
out if your problem has been solved in a more recent version of ACE.
To subscribe to the list see
https://www.dre.vanderbilt.edu/~schmidt/ACE-mail.html
Replace/remove all the explanatory text in brackets before mailing.
Please send this form as ASCII text only. Do _not_ send it as an
attachment, or as tar'ed, compressed and/or uuencoded text. And
limit line lengths to less than 80 characters.
PLEASE make your Subject: line as descriptive as possible.
Subjects like "ACE bug" or "bug report" are not helpful!
Also, do _not_ include the word "help" in the Subject!]
When including your config.h and platform_macros.GNU files as requested
below, only include the contents if you use the recommended method of
including the platform-specific file in your file. If you use a link
to the platform-specific file, simply state which one - DO NOT
include an entire platform-specific configuration file in the form.
8<----------8<----------8<----------8<----------8<----------8<----------8<----
To: ace-bugs@list.isis.vanderbilt.edu
Subject: [area]: [synopsis]
ACE VERSION: 7.0.0
HOST MACHINE and OPERATING SYSTEM:
If on Windows based OS's, which version of WINSOCK do you
use?:
TARGET MACHINE and OPERATING SYSTEM, if different from HOST:
COMPILER NAME AND VERSION (AND PATCHLEVEL):
THE $ACE_ROOT/ace/config.h FILE [if you use a link to a platform-
specific file, simply state which one]:
THE $ACE_ROOT/include/makeinclude/platform_macros.GNU FILE [if you
use a link to a platform-specific file, simply state which one
(unless this isn't used in this case, e.g., with Microsoft Visual
C++)]:
CONTENTS OF $ACE_ROOT/bin/MakeProjectCreator/config/default.features
(used by MPC when you generate your own makefiles):
AREA/CLASS/EXAMPLE AFFECTED:
[What example failed? What module failed to compile?]
DOES THE PROBLEM AFFECT:
COMPILATION?
LINKING?
On Unix systems, did you run make realclean first?
EXECUTION?
OTHER (please specify)?
[Please indicate whether ACE, your application, or both are affected.]
SYNOPSIS:
[Brief description of the problem]
DESCRIPTION:
[Detailed description of problem. Don't just say "<blah>
doesn't work, here's a fix," explain what your program does
to get to the <blah> state. ]
REPEAT BY:
[What you did to get the error; include test program or session
transcript if at all possible. ]
SAMPLE FIX/WORKAROUND:
[If available ]

View file

@ -1,11 +1,9 @@
$Id: README 94611 2011-10-06 11:54:28Z msmit $
This document is also available at the following URL:
http://www.cs.wustl.edu/~schmidt/ACE.html
https://www.dre.vanderbilt.edu/~schmidt/ACE.html
All software and documentation is available via both anonymous ftp and
the World Wide Web.]
http.
THE ADAPTIVE COMMUNICATION ENVIRONMENT (ACE)
@ -45,7 +43,7 @@ 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
http://www.dre.vanderbilt.edu/~schmidt/commercial-support.html
----------------------------------------
@ -55,28 +53,28 @@ 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;
. 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;
. 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;
. 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;
. 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;
. 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.
. 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.
@ -91,25 +89,25 @@ 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 Reactor
-- Supports both Reactive and Proactive I/O;
. The Service Configurator
-- Support dynamic (re)configuration of objects;
. 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;
. The ADAPTIVE Service Executive
-- A user-level implementation of System V STREAMS,
that supports modular integration of
hierarchically-related communication services;
. Concurrency
-- Various types of higher-level concurrency
control and synchronization patterns (such as
Polymorphic Futures and Active Objects);
. 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;
. Shared Malloc
-- Components for managing dynamically allocation
of shared and local memory;
----------------------------------------
@ -119,13 +117,13 @@ 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.
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.
2. They illustrate how to utilize ACE features such as the
Reactor, Service Configurator, Service Initialization,
Concurrency, and IPC components.
----------------------------------------
@ -138,28 +136,26 @@ 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.
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.
2. JAWS -- JAWS is a high-performance, adaptive Web server
built using the components in ACE.
----------------------------------------
OBTAINING ACE
The current ACE release is provided as a tar file that is around 3 Meg
compressed using GNU gzip. ACE may be obtained electronically from
http://www.cs.wustl.edu/~schmidt/ACE-obtain.html. 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 and at Washington
University, St. Louis.
ACE may be obtained electronically from
https://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
http://www.cs.wustl.edu/~schmidt/TAO.html.
You can get The ACE ORB (TAO) in a companion release at the same URL.
----------------------------------------
@ -170,51 +166,47 @@ 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
ftp://wuarchive.wustl.edu/languages/c++/ACE/ACE-documentation. This
directory contains postscript versions of various papers that describe
different aspects of ACE.
I update these papers periodically to reflect changes to the ACE
architecture. Therefore, you might want to check the date on the
files to make sure that you have read the most recent versions of
these papers.
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.cs.wustl.edu/~schmidt/ACE.html
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.cs.wustl.edu/~schmidt/ACE-mail.html for details on how to
subscribe to the mailing list.
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. 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.cs.wustl.edu/~schmidt/ACE-install.html
file for information on how to build and test the ACE wrappers. The
Please refer to the $ACE_ROOT/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@cs.wustl.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:
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.
1) Subscribe to the ace-users mail list, by sending email with
contents "subscribe ace-users" to
ace-users-request@list.isis.vanderbilt.edu.
----------------------------------------

View file

@ -2061,7 +2061,7 @@ Sandro Santos Andrade <sandros at dcc dot ufba dot br>
Richard Spence <richard dot spence dot extern at icn dot siemens dot de>
Thomas E Lackey <telackey at bozemanpass dot com>
luxi78 at gmail dot com
John Lilley <jlilley at datalever dot com>
John Lilley <john dot lilley at redpoint dot net>
Abdullah Sowayan <abdullah dot sowayan at lmco dot com>
Nathan Bamford <nbamford at datalever dot com>
Zoltan Molnar <zolmol at isis dot vanderbilt dot edu>
@ -2324,7 +2324,7 @@ Tim Pinkawa <tpinkawa at eagleseven dot com>
Ed Blackmond <ed dot blackmond at themis dot com>
Dave <dwh0403 at 163 dot com>
Inma Perea <inma dot perea dot fdz at gmail dot com>
David Ward <dpward at mit dot edu>
David Ward <david dot ward at ll dot mit dot edu>
Anatoli Sakhnik <sakhnik at gmail dot com>
Max Zhou <earthdog at 126 dot com>
Daynesh Mangal <daynesh at gmail dot com>
@ -2369,6 +2369,32 @@ Deux deVille <dev2 at weitling dot net>
Mohsin Zaidi <mohsinrzaidi at gmail dot com>
Milind Pangarkar <Milind dot Pangarkar at amdocs dot com>
Ali Akbar Zarezadeh <akzare at cs dot uni-potsdam dot de>
Andrés Senac González <andres at senac dot es>
Peng Xu <pengxu7 at gmail dot com>
Sergey Onuchin <sonuchin at parallels dot com>
Michael Ganz <michael_ganz at t-online dot de>
Phillip LaBanca <labancap at ociweb dot com>
Journeyer J. Joh <oosaprogrammer at gmail dot com>
Rudy Pot <rpot at aweta dot nl>
Neil Youngman <ny at youngman dot org dot uk>
Andreas Florath <andreas at florath dot org>
Clyde Gerber <clyde_gerber at symantec dot com>
George Chen <ace dot gc dot pthzfoldr at gmail dot com>
Piotr Kow <pkow88776 at onet dot pl>
Yogesh Sharma <Yogesh dot Sharma at saabsensis dot com>
Mike McKnerney <michael dot mcknerney at baesystems dot com>
Mike Ketchen <mketchen at broadsoft dot com>
Erik Sohns <erik dot sohns at web dot de>
Winston Jenks <Winston dot JENKS at capesoftware dot com>
Colin Shen <cshen at manh dot com>
Alexey Zubko <alexey dot zubko at gmail dot com>
Michael Dille <mdille3 at andrew dot cmu dot edu>
Sebastian Perk <Sebastian dot Perk at hydrometer dot de>
David Lifshitz <dlifshitz at macadamian dot com>
Milo H. Fields <mfields at paladin-sys dot com>
Thomas Schmidt <TC dot Schmidt at gmx dot net>
Joe Zendle <jzendle at gmail dot com>
Cesar Mello <cmello at gmail dot com>
I would particularly like to thank Paul Stephenson, who worked with me
at Ericsson in the early 1990's. Paul devised the recursive Makefile

View file

@ -1,8 +1,8 @@
This is ACE version 6.1.4, released Wed Aug 29 08:16:04 CEST 2012
This is ACE version 7.0.0, released Mon Jan 25 09:55:22 CET 2021
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.cs.wustl.edu/~schmidt/ACE-mail.html
See http://www.dre.vanderbilt.edu/~schmidt/ACE-mail.html

View file

@ -1,418 +0,0 @@
diff --git a/dep/acelite/ace/CMakeLists.txt b/dep/acelite/ace/CMakeLists.txt
new file mode 100644
index 0000000..acd3d5a
--- /dev/null
+++ b/dep/acelite/ace/CMakeLists.txt
@@ -0,0 +1,348 @@
+# Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
+#
+# 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
+ PrecompiledHeaders/WinAcePCH.cpp
+ 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_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
+ 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_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
+ 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}/dep/acelite
+ ${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders
+ ${CMAKE_SOURCE_DIR}/dep/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}
+)
+
+# 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/dep/acelite/ace/PrecompiledHeaders/WinAcePCH.cpp b/dep/acelite/ace/PrecompiledHeaders/WinAcePCH.cpp
new file mode 100644
index 0000000..139597f
--- /dev/null
+++ b/dep/acelite/ace/PrecompiledHeaders/WinAcePCH.cpp
@@ -0,0 +1,2 @@
+
+
diff --git a/dep/acelite/ace/PrecompiledHeaders/WinAcePCH.h b/dep/acelite/ace/PrecompiledHeaders/WinAcePCH.h
new file mode 100644
index 0000000..6ff97bf
--- /dev/null
+++ b/dep/acelite/ace/PrecompiledHeaders/WinAcePCH.h
@@ -0,0 +1,17 @@
+
+#ifndef WIN_ACE_PCH
+#define WIN_ACE_PCH
+
+#include "ace/ACE.h"
+
+#include "ace/Synch_Traits.h"
+#include "ace/Svc_Handler.h"
+#include "ace/SOCK_Stream.h"
+#include "ace/SOCK_Acceptor.h"
+#include "ace/Acceptor.h"
+#include "ace/Thread_Mutex.h"
+#include "ace/Guard_T.h"
+#include "ace/Unbounded_Queue.h"
+#include "ace/Message_Block.h"
+
+#endif
diff --git a/dep/acelite/ace/config-macros.h b/dep/acelite/ace/config-macros.h
index f18c8e0..32e5894 100644
--- a/dep/acelite/ace/config-macros.h
+++ b/dep/acelite/ace/config-macros.h
@@ -21,7 +21,11 @@
#ifndef ACE_CONFIG_MACROS_H
#define ACE_CONFIG_MACROS_H
-#include "ace/config.h"
+#ifdef _WIN32
+ #include "ace/config-win32.h"
+#else
+ #include "ace/config.h"
+#endif
#include "ace/Version.h"
#include "ace/Versioned_Namespace.h"
diff --git a/dep/acelite/ace/config-win32-common.h b/dep/acelite/ace/config-win32-common.h
index 50645a1..098ddbd 100644
--- a/dep/acelite/ace/config-win32-common.h
+++ b/dep/acelite/ace/config-win32-common.h
@@ -527,9 +527,9 @@
# else
# pragma comment(lib, "ws2_32.lib")
# pragma comment(lib, "mswsock.lib")
-# if defined (ACE_HAS_IPV6)
+// # if defined (ACE_HAS_IPV6)
# pragma comment(lib, "iphlpapi.lib")
-# endif
+// # endif
# endif /* ACE_HAS_WINCE */
# endif /* _MSC_VER */

View file

@ -1,15 +0,0 @@
diff --git a/dep/acelite/ace/CMakeLists.txt b/dep/acelite/ace/CMakeLists.txt
index eb0f6dd..1f9ffa6 100644
--- a/dep/acelite/ace/CMakeLists.txt
+++ b/dep/acelite/ace/CMakeLists.txt
@@ -341,6 +341,10 @@ add_library(ace SHARED
${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})

View file

@ -1,142 +0,0 @@
diff --git a/dep/acelite/ace/config-win32-msvc-11.h b/dep/acelite/ace/config-win32-msvc-11.h
new file mode 100644
index 0000000..8078ffa
--- /dev/null
+++ b/dep/acelite/ace/config-win32-msvc-11.h
@@ -0,0 +1,30 @@
+/* -*- C++ -*- */
+//=============================================================================
+/**
+ * @file config-win32-msvc-11.h
+ *
+ * @brief Microsoft Visual C++ 11.0 configuration file.
+ *
+ * This file is the ACE configuration file for Microsoft Visual C++ version 11.
+ *
+ * @note Do not include this file directly, include config-win32.h instead.
+ */
+//=============================================================================
+
+#ifndef ACE_CONFIG_WIN32_MSVC_11_H
+#define ACE_CONFIG_WIN32_MSVC_11_H
+#include /**/ "ace/pre.h"
+
+#ifndef ACE_CONFIG_WIN32_H
+#error Use config-win32.h in config.h instead of this header
+#endif /* ACE_CONFIG_WIN32_H */
+
+#ifndef ACE_WIN32_VC11
+# define ACE_WIN32_VC11
+#endif
+
+// Until we have specific msvc11 settings, include the msvc10 file
+#include "ace/config-win32-msvc-10.h"
+
+#include /**/ "ace/post.h"
+#endif /* ACE_CONFIG_WIN32_MSVC_10_H */
diff --git a/dep/acelite/ace/config-win32-msvc-12.h b/dep/acelite/ace/config-win32-msvc-12.h
new file mode 100644
index 0000000..0b59cd4
--- /dev/null
+++ b/dep/acelite/ace/config-win32-msvc-12.h
@@ -0,0 +1,30 @@
+/* -*- C++ -*- */
+//=============================================================================
+/**
+ * @file config-win32-msvc-12.h
+ *
+ * @brief Microsoft Visual C++ 12.0 configuration file.
+ *
+ * This file is the ACE configuration file for Microsoft Visual C++ version 12.
+ *
+ * @note Do not include this file directly, include config-win32.h instead.
+ */
+//=============================================================================
+
+#ifndef ACE_CONFIG_WIN32_MSVC_12_H
+#define ACE_CONFIG_WIN32_MSVC_12_H
+#include /**/ "ace/pre.h"
+
+#ifndef ACE_CONFIG_WIN32_H
+#error Use config-win32.h in config.h instead of this header
+#endif /* ACE_CONFIG_WIN32_H */
+
+#ifndef ACE_WIN32_VC12
+# define ACE_WIN32_VC12
+#endif
+
+// Until we have specific msvc12 settings, include the msvc11 file
+#include "ace/config-win32-msvc-11.h"
+
+#include /**/ "ace/post.h"
+#endif /* ACE_CONFIG_WIN32_MSVC_10_H */
diff --git a/dep/acelite/ace/config-win32-msvc-14.h b/dep/acelite/ace/config-win32-msvc-14.h
new file mode 100644
index 0000000..0670cb2
--- /dev/null
+++ b/dep/acelite/ace/config-win32-msvc-14.h
@@ -0,0 +1,45 @@
+/* -*- C++ -*- */
+//=============================================================================
+/**
+ * @file config-win32-msvc-14.h
+ *
+ * @brief Microsoft Visual C++ 14.0 configuration file.
+ *
+ * This file is the ACE configuration file for Microsoft Visual C++ version 2015.
+ *
+ * @note Do not include this file directly, include config-win32.h instead.
+ */
+//=============================================================================
+
+#ifndef ACE_CONFIG_WIN32_MSVC_14_H
+#define ACE_CONFIG_WIN32_MSVC_14_H
+#include /**/ "ace/pre.h"
+
+#ifndef ACE_CONFIG_WIN32_H
+#error Use config-win32.h in config.h instead of this header
+#endif /* ACE_CONFIG_WIN32_H */
+
+#ifndef ACE_WIN32_VC14
+# define ACE_WIN32_VC14
+#endif
+
+// Until we have specific msvc14 settings, include the msvc12 file
+#include "ace/config-win32-msvc-12.h"
+
+#define ACE_HAS_POSIX_TIME 1
+#define ACE_LACKS_TIMESPEC_T 1
+
+// According to MS the Visual Studio 2015 C-runtime has a
+// C99 compliant vsnprintf/vsnwprintf, this is a change compared to
+// previous versions
+#define ACE_HAS_C99_VSNPRINTF
+#define ACE_HAS_C99_VSNWPRINTF
+
+// Visual Studio 2015 has 3 parameter wcstok
+#define ACE_HAS_3_PARAM_WCSTOK
+
+// Visual Studio 2015 has adequate C++11 support
+#define ACE_HAS_CPP11
+
+#include /**/ "ace/post.h"
+#endif /* ACE_CONFIG_WIN32_MSVC_14_H */
diff --git a/dep/acelite/ace/config-win32-msvc.h b/dep/acelite/ace/config-win32-msvc.h
index d6ec650..5091ec7 100644
--- a/dep/acelite/ace/config-win32-msvc.h
+++ b/dep/acelite/ace/config-win32-msvc.h
@@ -40,7 +40,13 @@
#endif /* _WIN32_WCE */
//FUZZ: disable check_for_msc_ver
-#if (_MSC_VER >= 1600)
+#if (_MSC_VER >= 1900)
+#include "ace/config-win32-msvc-14.h"
+#elif (_MSC_VER >= 1800)
+#include "ace/config-win32-msvc-12.h"
+#elif (_MSC_VER >= 1700)
+# include "ace/config-win32-msvc-11.h"
+#elif (_MSC_VER >= 1600)
# include "ace/config-win32-msvc-10.h"
#elif (_MSC_VER >= 1500)
# include "ace/config-win32-msvc-9.h"

View file

@ -1,5 +1,3 @@
// $Id: ACE.cpp 96017 2012-08-08 22:18:09Z mitza $
#include "ace/ACE.h"
#include "ace/Basic_Types.h"
@ -8,7 +6,8 @@
#include "ace/SString.h"
#include "ace/Version.h"
#include "ace/Message_Block.h"
#include "ace/Log_Msg.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"
@ -92,25 +91,31 @@ ACE::out_of_handles (int error)
}
u_int
ACE::major_version (void)
ACE::major_version ()
{
return ACE_MAJOR_VERSION;
}
u_int
ACE::minor_version (void)
ACE::minor_version ()
{
return ACE_MINOR_VERSION;
}
u_int
ACE::beta_version (void)
ACE::beta_version ()
{
return ACE_BETA_VERSION;
return ACE_MICRO_VERSION;
}
u_int
ACE::micro_version ()
{
return ACE_MICRO_VERSION;
}
const ACE_TCHAR *
ACE::compiler_name (void)
ACE::compiler_name ()
{
#ifdef ACE_CC_NAME
return ACE_CC_NAME;
@ -120,7 +125,7 @@ ACE::compiler_name (void)
}
u_int
ACE::compiler_major_version (void)
ACE::compiler_major_version ()
{
#ifdef ACE_CC_MAJOR_VERSION
return ACE_CC_MAJOR_VERSION;
@ -130,7 +135,7 @@ ACE::compiler_major_version (void)
}
u_int
ACE::compiler_minor_version (void)
ACE::compiler_minor_version ()
{
#ifdef ACE_CC_MINOR_VERSION
return ACE_CC_MINOR_VERSION;
@ -140,7 +145,7 @@ ACE::compiler_minor_version (void)
}
u_int
ACE::compiler_beta_version (void)
ACE::compiler_beta_version ()
{
#ifdef ACE_CC_BETA_VERSION
return ACE_CC_BETA_VERSION;
@ -157,9 +162,11 @@ ACE::nibble2hex (u_int n)
}
bool
ACE::debug (void)
ACE::debug ()
{
static const char* debug = ACE_OS::getenv ("ACE_DEBUG");
//FUZZ: disable check_for_ace_log_categories
static const char *debug = ACE_OS::getenv ("ACE_DEBUG");
//FUZZ: enable check_for_ace_log_categories
return (ACE::debug_ != 0) ? ACE::debug_ : (debug != 0 ? (*debug != '0') : false);
}
@ -910,7 +917,7 @@ ACE::recv_n_i (ACE_HANDLE handle,
// 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!
#if !defined (ACE_LACKS_VA_FUNCTIONS)
ssize_t
ACE::recv (ACE_HANDLE handle, size_t n, ...)
{
@ -920,9 +927,16 @@ ACE::recv (ACE_HANDLE handle, size_t n, ...)
#if defined (ACE_HAS_ALLOCA)
iovp = (iovec *) alloca (total_tuples * sizeof (iovec));
#else
# ifdef ACE_HAS_ALLOC_HOOKS
ACE_ALLOCATOR_RETURN (iovp, (iovec *)
ACE_Allocator::instance ()->malloc (total_tuples *
sizeof (iovec)),
-1);
# else
ACE_NEW_RETURN (iovp,
iovec[total_tuples],
-1);
# endif /* ACE_HAS_ALLOC_HOOKS */
#endif /* !defined (ACE_HAS_ALLOCA) */
va_start (argp, n);
@ -935,11 +949,17 @@ ACE::recv (ACE_HANDLE handle, size_t n, ...)
ssize_t const result = ACE_OS::recvv (handle, iovp, total_tuples);
#if !defined (ACE_HAS_ALLOCA)
# ifdef ACE_HAS_ALLOC_HOOKS
ACE_Allocator::instance ()->free (iovp);
# else
delete [] iovp;
# endif /* ACE_HAS_ALLOC_HOOKS */
#endif /* !defined (ACE_HAS_ALLOCA) */
va_end (argp);
return result;
}
#endif /* ACE_LACKS_VA_FUNCTIONS */
ssize_t
ACE::recvv (ACE_HANDLE handle,
@ -994,7 +1014,6 @@ ACE::recvv_n_i (ACE_HANDLE handle,
if (result != -1)
{
// Blocking subsided. Continue data transfer.
n = 0;
continue;
}
}
@ -1013,7 +1032,8 @@ ACE::recvv_n_i (ACE_HANDLE handle,
{
char *base = static_cast<char *> (iov[s].iov_base);
iov[s].iov_base = base + n;
iov[s].iov_len = iov[s].iov_len - n;
// This blind cast is safe because n < iov_len, after above loop.
iov[s].iov_len = iov[s].iov_len - static_cast<u_long> (n);
}
}
@ -1057,7 +1077,6 @@ ACE::recvv_n_i (ACE_HANDLE handle,
{
// Blocking subsided in <timeout> period. Continue
// data transfer.
n = 0;
continue;
}
}
@ -1079,7 +1098,8 @@ ACE::recvv_n_i (ACE_HANDLE handle,
{
char *base = reinterpret_cast<char *> (iov[s].iov_base);
iov[s].iov_base = base + n;
iov[s].iov_len = iov[s].iov_len - n;
// This blind cast is safe because n < iov_len, after above loop.
iov[s].iov_len = iov[s].iov_len - static_cast<u_long> (n);
}
}
@ -1528,7 +1548,7 @@ ACE::t_snd_n_i (ACE_HANDLE handle,
{
// Check for possible blocking.
if (n == -1 &&
errno == EWOULDBLOCK || errno == ENOBUFS)
(errno == EWOULDBLOCK || errno == ENOBUFS))
{
// Wait upto <timeout> for the blocking to subside.
int const rtn = ACE::handle_write_ready (handle, timeout);
@ -1683,7 +1703,7 @@ ACE::send_n_i (ACE_HANDLE handle,
// 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!
#if !defined (ACE_LACKS_VA_FUNCTIONS)
ssize_t
ACE::send (ACE_HANDLE handle, size_t n, ...)
{
@ -1693,9 +1713,16 @@ ACE::send (ACE_HANDLE handle, size_t n, ...)
#if defined (ACE_HAS_ALLOCA)
iovp = (iovec *) alloca (total_tuples * sizeof (iovec));
#else
# ifdef ACE_HAS_ALLOC_HOOKS
ACE_ALLOCATOR_RETURN (iovp, (iovec *)
ACE_Allocator::instance ()->malloc (total_tuples *
sizeof (iovec)),
-1);
# else
ACE_NEW_RETURN (iovp,
iovec[total_tuples],
-1);
# endif /* ACE_HAS_ALLOC_HOOKS */
#endif /* !defined (ACE_HAS_ALLOCA) */
va_start (argp, n);
@ -1708,11 +1735,16 @@ ACE::send (ACE_HANDLE handle, size_t n, ...)
ssize_t result = ACE_OS::sendv (handle, iovp, total_tuples);
#if !defined (ACE_HAS_ALLOCA)
# ifdef ACE_HAS_ALLOC_HOOKS
ACE_Allocator::instance ()->free (iovp);
# else
delete [] iovp;
# endif /* ACE_HAS_ALLOC_HOOKS */
#endif /* !defined (ACE_HAS_ALLOCA) */
va_end (argp);
return result;
}
#endif /* ACE_LACKS_VA_FUNCTIONS */
ssize_t
ACE::sendv (ACE_HANDLE handle,
@ -1772,7 +1804,6 @@ ACE::sendv_n_i (ACE_HANDLE handle,
if (result != -1)
{
// Blocking subsided. Continue data transfer.
n = 0;
continue;
}
}
@ -1791,7 +1822,8 @@ ACE::sendv_n_i (ACE_HANDLE handle,
{
char *base = reinterpret_cast<char *> (iov[s].iov_base);
iov[s].iov_base = base + n;
iov[s].iov_len = iov[s].iov_len - n;
// This blind cast is safe because n < iov_len, after above loop.
iov[s].iov_len = iov[s].iov_len - static_cast<u_long> (n);
}
}
@ -1841,7 +1873,6 @@ ACE::sendv_n_i (ACE_HANDLE handle,
{
// Blocking subsided in <timeout> period. Continue
// data transfer.
n = 0;
continue;
}
}
@ -1863,7 +1894,8 @@ ACE::sendv_n_i (ACE_HANDLE handle,
{
char *base = reinterpret_cast<char *> (iov[s].iov_base);
iov[s].iov_base = base + n;
iov[s].iov_len = iov[s].iov_len - n;
// This blind cast is safe because n < iov_len, after above loop.
iov[s].iov_len = iov[s].iov_len - static_cast<u_long> (n);
}
}
@ -2105,7 +2137,8 @@ ACE::readv_n (ACE_HANDLE handle,
{
char *base = reinterpret_cast<char *> (iov[s].iov_base);
iov[s].iov_base = base + n;
iov[s].iov_len = iov[s].iov_len - n;
// This blind cast is safe because n < iov_len, after above loop.
iov[s].iov_len = iov[s].iov_len - static_cast<u_long> (n);
}
}
@ -2147,7 +2180,8 @@ ACE::writev_n (ACE_HANDLE handle,
{
char *base = reinterpret_cast<char *> (iov[s].iov_base);
iov[s].iov_base = base + n;
iov[s].iov_len = iov[s].iov_len - n;
// This blind cast is safe because n < iov_len, after above loop.
iov[s].iov_len = iov[s].iov_len - static_cast<u_long> (n);
}
}
@ -2157,9 +2191,9 @@ ACE::writev_n (ACE_HANDLE handle,
int
ACE::handle_ready (ACE_HANDLE handle,
const ACE_Time_Value *timeout,
int read_ready,
int write_ready,
int exception_ready)
bool read_ready,
bool write_ready,
bool exception_ready)
{
#if defined (ACE_HAS_POLL)
ACE_UNUSED_ARG (exception_ready);
@ -2280,6 +2314,7 @@ ACE::format_hexdump (const char *buffer,
// We can fit 16 bytes output in text mode per line, 4 chars per byte.
size_t maxlen = (obuf_sz / 68) * 16;
const ACE_TCHAR *const obuf_start = obuf;
if (size > maxlen)
size = maxlen;
@ -2294,22 +2329,20 @@ ACE::format_hexdump (const char *buffer,
for (j = 0 ; j < 16; j++)
{
c = (u_char) buffer[(i << 4) + j]; // or, buffer[i*16+j]
ACE_OS::sprintf (obuf,
ACE_OS::snprintf (obuf, obuf_sz - (obuf - obuf_start),
ACE_TEXT ("%02x "),
c);
obuf += 3;
if (j == 7)
{
ACE_OS::sprintf (obuf,
ACE_TEXT (" "));
++obuf;
*obuf++ = ACE_TEXT (' ');
}
textver[j] = ACE_OS::ace_isprint (c) ? c : u_char ('.');
}
textver[j] = 0;
ACE_OS::sprintf (obuf,
ACE_OS::snprintf (obuf, obuf_sz - (obuf - obuf_start),
#if !defined (ACE_WIN32) && defined (ACE_USES_WCHAR)
ACE_TEXT (" %ls\n"),
#else
@ -2326,35 +2359,31 @@ ACE::format_hexdump (const char *buffer,
for (i = 0 ; i < size % 16; i++)
{
c = (u_char) buffer[size - size % 16 + i];
ACE_OS::sprintf (obuf,
ACE_OS::snprintf (obuf, obuf_sz - (obuf - obuf_start),
ACE_TEXT ("%02x "),
c);
obuf += 3;
if (i == 7)
{
ACE_OS::sprintf (obuf,
ACE_TEXT (" "));
++obuf;
*obuf++ = ACE_TEXT (' ');
}
textver[i] = ACE_OS::ace_isprint (c) ? c : u_char ('.');
}
for (i = size % 16; i < 16; i++)
{
ACE_OS::sprintf (obuf,
ACE_OS::snprintf (obuf, obuf_sz - (obuf - obuf_start),
ACE_TEXT (" "));
obuf += 3;
if (i == 7)
{
ACE_OS::sprintf (obuf,
ACE_TEXT (" "));
++obuf;
*obuf++ = ACE_TEXT (' ');
}
textver[i] = ' ';
}
textver[i] = 0;
ACE_OS::sprintf (obuf,
ACE_OS::snprintf (obuf, obuf_sz - (obuf - obuf_start),
#if !defined (ACE_WIN32) && defined (ACE_USES_WCHAR)
ACE_TEXT (" %ls\n"),
#else
@ -2365,11 +2394,10 @@ ACE::format_hexdump (const char *buffer,
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.
/// 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,
@ -2381,13 +2409,12 @@ ACE::timestamp (ACE_TCHAR date_and_time[],
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<nul>
/// 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<nul>
ACE_TCHAR *
ACE::timestamp (const ACE_Time_Value& time_value,
ACE_TCHAR date_and_time[],
@ -2424,8 +2451,7 @@ ACE::timestamp (const ACE_Time_Value& time_value,
return &date_and_time[10 + (return_pointer_to_first_digit != 0)];
}
// This function rounds the request to a multiple of the page size.
/// This function rounds the request to a multiple of the page size.
size_t
ACE::round_to_pagesize (size_t len)
{
@ -2548,7 +2574,13 @@ ACE::handle_timed_complete (ACE_HANDLE h,
else
# if defined (ACE_HAS_POLL)
need_to_check = (fds.revents & POLLIN);
{
// 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 */
@ -2601,8 +2633,7 @@ ACE::handle_timed_complete (ACE_HANDLE h,
return h;
}
// Wait up to <timeout> amount of time to accept a connection.
/// Wait up to @a timeout amount of time to accept a connection.
int
ACE::handle_timed_accept (ACE_HANDLE listener,
ACE_Time_Value *timeout,
@ -2671,9 +2702,8 @@ ACE::handle_timed_accept (ACE_HANDLE listener,
}
}
// Make the current process a UNIX daemon. This is based on Stevens
// code from APUE.
/// 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,
@ -2759,7 +2789,7 @@ ACE::fork (const ACE_TCHAR *program_name,
{
case 0: // grandchild returns 0.
return 0;
case -1: // assumes all errnos are < 256
case static_cast<pid_t>(-1): // assumes all errnos are < 256
ACE_OS::_exit (errno);
default: // child terminates, orphaning grandchild
ACE_OS::_exit (0);
@ -2789,7 +2819,7 @@ ACE::fork (const ACE_TCHAR *program_name,
}
int
ACE::max_handles (void)
ACE::max_handles ()
{
ACE_TRACE ("ACE::max_handles");
#if defined (RLIMIT_NOFILE) && !defined (ACE_LACKS_RLIMIT)
@ -2805,7 +2835,7 @@ ACE::max_handles (void)
# endif /* RLIM_INFINITY */
#endif /* RLIMIT_NOFILE && !ACE_LACKS_RLIMIT */
#if defined (_SC_OPEN_MAX)
#if defined (_SC_OPEN_MAX) && !defined (ACE_LACKS_SYSCONF)
return static_cast<int> (ACE_OS::sysconf (_SC_OPEN_MAX));
#elif defined (FD_SETSIZE)
return FD_SETSIZE;
@ -2877,7 +2907,7 @@ ACE::set_handle_limit (int new_limit,
return 0;
}
// Euclid's greatest common divisor algorithm.
/// Euclid's greatest common divisor algorithm.
u_long
ACE::gcd (u_long x, u_long y)
{
@ -2892,7 +2922,7 @@ ACE::gcd (u_long x, u_long y)
}
// Calculates the minimum enclosing frame size for the given values.
/// Calculates the minimum enclosing frame size for the given values.
u_long
ACE::minimum_frame_size (u_long period1, u_long period2)
{
@ -3093,7 +3123,9 @@ ACE::sock_error (int error)
return ACE_TEXT ("destination address required");
/* NOTREACHED */
default:
ACE_OS::sprintf (unknown_msg, ACE_TEXT ("unknown error: %d"), error);
ACE_OS::snprintf (unknown_msg,
sizeof unknown_msg / sizeof unknown_msg[0],
ACE_TEXT ("unknown error: %d"), error);
return unknown_msg;
/* NOTREACHED */
}
@ -3177,9 +3209,15 @@ ACE::strndup (const char *str, size_t n)
continue;
char *s;
#if defined (ACE_HAS_ALLOC_HOOKS)
ACE_ALLOCATOR_RETURN (s,
(char *) ACE_Allocator::instance()->malloc (len + 1),
0);
#else
ACE_ALLOCATOR_RETURN (s,
(char *) ACE_OS::malloc (len + 1),
0);
#endif /* ACE_HAS_ALLOC_HOOKS */
return ACE_OS::strsncpy (s, str, len + 1);
}
@ -3198,11 +3236,18 @@ ACE::strndup (const wchar_t *str, size_t n)
len++)
continue;
wchar_t *s;
size_t const size = (len + 1) * sizeof (wchar_t);
wchar_t *s = 0;
#if defined (ACE_HAS_ALLOC_HOOKS)
ACE_ALLOCATOR_RETURN (s,
static_cast<wchar_t *> (
ACE_OS::malloc ((len + 1) * sizeof (wchar_t))),
static_cast<wchar_t*> (
ACE_Allocator::instance ()->malloc (size)),
0);
#else
ACE_ALLOCATOR_RETURN (s,
static_cast<wchar_t*> (ACE_OS::malloc (size)),
0);
#endif /* ACE_HAS_ALLOC_HOOKS */
return ACE_OS::strsncpy (s, str, len + 1);
}
#endif /* ACE_HAS_WCHAR */
@ -3222,9 +3267,17 @@ ACE::strnnew (const char *str, size_t n)
continue;
char *s;
#if defined (ACE_HAS_ALLOC_HOOKS)
ACE_ALLOCATOR_RETURN (s,
static_cast<char*> (ACE_Allocator::instance ()->malloc (sizeof (char) * (len + 1))),
0);
#else
ACE_NEW_RETURN (s,
char[len + 1],
0);
#endif /* ACE_HAS_ALLOC_HOOKS */
return ACE_OS::strsncpy (s, str, len + 1);
}
@ -3277,9 +3330,16 @@ ACE::strnew (const char *s)
if (s == 0)
return 0;
char *t = 0;
#if defined (ACE_HAS_ALLOC_HOOKS)
ACE_ALLOCATOR_RETURN (t,
static_cast<char*> (ACE_Allocator::instance ()->malloc (sizeof (char) * (ACE_OS::strlen (s) + 1))),
0);
#else
ACE_NEW_RETURN (t,
char [ACE_OS::strlen (s) + 1],
0);
#endif /* ACE_HAS_ALLOC_HOOKS */
return ACE_OS::strcpy (t, s);
}
@ -3289,10 +3349,19 @@ ACE::strnew (const wchar_t *s)
{
if (s == 0)
return 0;
size_t const n = ACE_OS::strlen (s) + 1;
wchar_t *t = 0;
ACE_NEW_RETURN (t,
wchar_t[ACE_OS::strlen (s) + 1],
0);
#if defined (ACE_HAS_ALLOC_HOOKS)
ACE_ALLOCATOR_RETURN (t,
static_cast<wchar_t*> (
ACE_Allocator::instance ()->malloc (
sizeof (wchar_t) * (n))),
0);
#else
ACE_NEW_RETURN (t, wchar_t[n], 0);
#endif /* ACE_HAS_ALLOC_HOOKS */
return ACE_OS::strcpy (t, s);
}
#endif /* ACE_HAS_WCHAR */

View file

@ -4,8 +4,6 @@
/**
* @file ACE.h
*
* $Id: ACE.h 93276 2011-02-04 20:03:53Z olli $
*
* This file contains value added ACE functions that extend the
* behavior of the UNIX and Win32 OS calls.
*
@ -13,7 +11,7 @@
* 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 <schmidt@cs.wustl.edu>
* @author Douglas C. Schmidt <d.schmidt@vanderbilt.edu>
*/
//=============================================================================
@ -22,18 +20,13 @@
#include /**/ "ace/pre.h"
#include "ace/config-lite.h"
#include /**/ "ace/config-lite.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
#include "ace/OS_NS_math.h"
#include "ace/Flag_Manip.h"
#include "ace/Handle_Ops.h"
#include "ace/Lib_Find.h"
#include "ace/Init_ACE.h"
#include "ace/Sock_Connect.h"
#include "ace/Basic_Types.h"
#include "ace/Default_Constants.h"
#if defined (ACE_EXPORT_MACRO)
@ -61,28 +54,32 @@ class ACE_Handle_Set;
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 "6" in ACE 6.3.4
extern ACE_Export u_int major_version ();
/// e.g., the "1" in ACE 5.1.12.
extern ACE_Export u_int minor_version (void);
/// e.g., the "3" in ACE 6.3.4
extern ACE_Export u_int minor_version ();
/// e.g., the "12" in ACE 5.1.12.
/// Returns 0 for "stable" (non-beta) releases.
extern ACE_Export u_int beta_version (void);
/// e.g., the "4" in ACE 6.3.4
/// Returns 0 for "stable" (non-micro) releases.
extern ACE_Export u_int micro_version ();
/// e.g., the "4" in ACE 6.3.4
/// Returns 0 for "stable" (non-micro) releases.
extern ACE_Export u_int beta_version ();
// = C++ compiler version information.
/// E.g., the "SunPro C++" in SunPro C++ 4.32.0
extern ACE_Export const ACE_TCHAR * compiler_name (void);
extern ACE_Export const ACE_TCHAR * compiler_name ();
/// E.g., the "4" in SunPro C++ 4.32.0
extern ACE_Export u_int compiler_major_version (void);
extern ACE_Export u_int compiler_major_version ();
/// E.g., the "32" in SunPro C++ 4.32.0
extern ACE_Export u_int compiler_minor_version (void);
extern ACE_Export u_int compiler_minor_version ();
/// E.g., the "0" in SunPro C++ 4.32.0
extern ACE_Export u_int compiler_beta_version (void);
extern ACE_Export u_int compiler_beta_version ();
/// Check if error indicates the process being out of handles (file
/// descriptors).
@ -218,7 +215,9 @@ namespace ACE
*
* @return -1 on error, else total number of bytes received.
*/
#if !defined (ACE_LACKS_VA_FUNCTIONS)
extern ACE_Export ssize_t recv (ACE_HANDLE handle, size_t n, ...);
#endif /* ACE_LACKS_VA_FUNCTIONS */
extern ACE_Export ssize_t recvv (ACE_HANDLE handle,
iovec *iov,
@ -299,7 +298,9 @@ namespace ACE
size_t *bytes_transferred = 0);
/// Varargs variant.
#if !defined (ACE_LACKS_VA_FUNCTIONS)
extern ACE_Export ssize_t send (ACE_HANDLE handle, size_t n, ...);
#endif /* ACE_LACKS_VA_FUNCTIONS */
extern ACE_Export ssize_t sendv (ACE_HANDLE handle,
const iovec *iov,
@ -387,7 +388,7 @@ namespace ACE
* this process. This maximum may be extended using
* @c ACE::set_handle_limit.
*/
extern ACE_Export int max_handles (void);
extern ACE_Export int max_handles ();
// = String functions
/**
@ -679,7 +680,7 @@ namespace ACE
ACE_NAMESPACE_INLINE_FUNCTION u_char hex2byte (ACE_TCHAR c);
// = Set/get the debug level.
extern ACE_Export bool debug (void);
extern ACE_Export bool debug ();
extern ACE_Export void debug (bool onoff);
/// Wrapper facade for @c select that uses @c ACE_Handle_Sets.
@ -725,9 +726,9 @@ namespace ACE
/// @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);
bool read_ready,
bool write_ready,
bool 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
@ -876,7 +877,6 @@ namespace ACE
int iovcnt,
const ACE_Time_Value *timeout,
size_t *bytes_transferred);
}
// Close versioned namespace, if enabled by the user.

View file

@ -1,7 +1,4 @@
// -*- 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"
@ -10,7 +7,6 @@
// 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
@ -220,7 +216,7 @@ ACE::sendv_n (ACE_HANDLE handle,
ACE_INLINE ssize_t
ACE::send_i (ACE_HANDLE handle, const void *buf, size_t len)
{
#if defined (ACE_WIN32) || defined (HPUX)
#if defined (ACE_WIN32) || defined (HPUX) || defined (ACE_MQX)
return ACE_OS::send (handle, (const char *) buf, len);
#else
return ACE_OS::write (handle, (const char *) buf, len);
@ -230,7 +226,7 @@ ACE::send_i (ACE_HANDLE handle, const void *buf, size_t len)
ACE_INLINE ssize_t
ACE::recv_i (ACE_HANDLE handle, void *buf, size_t len)
{
#if defined (ACE_WIN32) || defined (ACE_OPENVMS)
#if defined (ACE_WIN32) || defined (ACE_OPENVMS) || defined (ACE_MQX)
return ACE_OS::recv (handle, (char *) buf, len);
#else
return ACE_OS::read (handle, (char *) buf, len);
@ -240,25 +236,29 @@ ACE::recv_i (ACE_HANDLE handle, void *buf, size_t len)
ACE_INLINE int
ACE::handle_read_ready (ACE_HANDLE handle, const ACE_Time_Value *timeout)
{
return ACE::handle_ready (handle, timeout, 1, 0, 0);
return ACE::handle_ready (handle, timeout, true, false, false);
}
ACE_INLINE int
ACE::handle_write_ready (ACE_HANDLE handle, const ACE_Time_Value *timeout)
{
return ACE::handle_ready (handle, timeout, 0, 1, 0);
return ACE::handle_ready (handle, timeout, false, true, false);
}
ACE_INLINE int
ACE::handle_exception_ready (ACE_HANDLE handle, const ACE_Time_Value *timeout)
{
return ACE::handle_ready (handle, timeout, 0, 0, 1);
return ACE::handle_ready (handle, timeout, false, false, true);
}
ACE_INLINE void
ACE::strdelete (char *s)
{
#if defined (ACE_HAS_ALLOC_HOOKS)
ACE_Allocator::instance()->free(s);
#else
delete [] s;
#endif /* ACE_HAS_ALLOC_HOOKS */
}
#if defined (ACE_HAS_WCHAR)

10
dep/acelite/ace/ACE.pc.in Normal file
View file

@ -0,0 +1,10 @@
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}

View file

@ -1,5 +1,3 @@
// $Id: ACE_crc32.cpp 91286 2010-08-05 09:04:31Z johnnyw $
#include "ace/ACE.h"
namespace

View file

@ -1,5 +1,3 @@
// $Id: ACE_crc_ccitt.cpp 96017 2012-08-08 22:18:09Z mitza $
#include "ace/ACE.h"
namespace

View file

@ -1,5 +1,4 @@
// -*- 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
@ -8,7 +7,7 @@
#ifndef ACE_EXPORT_H
#define ACE_EXPORT_H
#include "ace/config-lite.h"
#include /**/ "ace/config-lite.h"
#if defined (ACE_AS_STATIC_LIBS)
@ -43,21 +42,10 @@
# 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_NAMESPACE_INLINE_FUNCTION inline
# define ACE_INLINE_TEMPLATE_FUNCTION inline
#else
# define ACE_NAMESPACE_INLINE_FUNCTION ACE_NAMESPACE_STORAGE_CLASS

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,12 +1,11 @@
// $Id: ARGV.cpp 95630 2012-03-22 13:04:47Z johnnyw $
#ifndef ACE_ARGV_CPP
#define ACE_ARGV_CPP
#include "ace/Log_Msg.h"
#include "ace/Log_Category.h"
#include "ace/OS_NS_unistd.h"
#include "ace/OS_NS_string.h"
#include "ace/OS_Memory.h"
#include "ace/ARGV.h"
#if !defined (__ACE_INLINE__)
#include "ace/ARGV.inl"
@ -15,44 +14,44 @@
// 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)
ACE_ALLOC_HOOK_DEFINE_Tt (ACE_ARGV_Queue_Entry_T)
ACE_ALLOC_HOOK_DEFINE_Tt (ACE_ARGV_T)
template <typename CHAR_TYPE>
void
ACE_ARGV_Queue_Entry_T<CHAR_TYPE>::dump (void) const
ACE_ARGV_Queue_Entry_T<CHAR_TYPE>::dump () const
{
#if defined (ACE_HAS_DUMP)
ACE_TRACE ("ACE_ARGV_Queue_Entry_T::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("arg_ = %s"), this->arg_));
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("quote_arg_ = %d"), (int)this->quote_arg_));
ACE_DEBUG ((LM_DEBUG, ACE_END_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 <typename CHAR_TYPE>
void
ACE_ARGV_T<CHAR_TYPE>::dump (void) const
ACE_ARGV_T<CHAR_TYPE>::dump () const
{
#if defined (ACE_HAS_DUMP)
ACE_TRACE ("ACE_ARGV_T::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("argc_ = %d"), this->argc_));
ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("argc_ = %d"), this->argc_));
ACE_ARGV *this_obj = const_cast<ACE_ARGV *> (this);
for (int i = 0; i < this->argc_; i++)
ACE_DEBUG ((LM_DEBUG,
ACELIB_DEBUG ((LM_DEBUG,
ACE_TEXT ("\nargv_[%i] = %s"),
i,
this_obj->argv ()[i]));
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nbuf = %s\n"), this->buf_));
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n")));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
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 */
}
@ -63,7 +62,7 @@ ACE_ARGV_T<CHAR_TYPE>::dump (void) const
template <typename CHAR_TYPE>
int
ACE_ARGV_T<CHAR_TYPE>::string_to_argv (void)
ACE_ARGV_T<CHAR_TYPE>::string_to_argv ()
{
ACE_TRACE ("ACE_ARGV_T::string_to_argv");
@ -90,13 +89,19 @@ ACE_ARGV_T<CHAR_TYPE>::ACE_ARGV_T (const CHAR_TYPE buf[],
return;
// Make an internal copy of the string.
#if defined (ACE_HAS_ALLOC_HOOKS)
ACE_ALLOCATOR(this->buf_,
static_cast<char*> (ACE_Allocator::instance()->malloc(sizeof (CHAR_TYPE) * (ACE_OS::strlen (buf) + 1))));
#else
ACE_NEW (this->buf_,
CHAR_TYPE[ACE_OS::strlen (buf) + 1]);
#endif /* ACE_HAS_ALLOC_HOOKS */
ACE_OS::strcpy (this->buf_, buf);
// Create this->argv_.
if (this->string_to_argv () == -1)
ACE_ERROR ((LM_ERROR,
ACELIB_ERROR ((LM_ERROR,
ACE_TEXT ("%p\n"),
ACE_TEXT ("string_to_argv")));
}
@ -203,8 +208,13 @@ ACE_ARGV_T<CHAR_TYPE>::ACE_ARGV_T (CHAR_TYPE *first_argv[],
ACE_OS::strcat (this->buf_, second_buf);
// Delete the first and second buffers
#if defined (ACE_HAS_ALLOC_HOOKS)
ACE_Allocator::instance()->free (first_buf);
ACE_Allocator::instance()->free (second_buf);
#else
delete [] first_buf;
delete [] second_buf;
#endif /* ACE_HAS_ALLOC_HOOKS */
}
template <typename CHAR_TYPE>
@ -249,7 +259,7 @@ ACE_ARGV_T<CHAR_TYPE>::add (const CHAR_TYPE *next_arg, bool quote_arg)
// Put the new argument at the end of the queue.
if (this->queue_.enqueue_tail (ACE_ARGV_Queue_Entry_T<CHAR_TYPE> (next_arg, quote_arg)) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
ACELIB_ERROR_RETURN ((LM_ERROR,
ACE_TEXT ("Can't add more to ARGV queue")),
-1);
@ -262,11 +272,19 @@ ACE_ARGV_T<CHAR_TYPE>::add (const CHAR_TYPE *next_arg, bool quote_arg)
for (int i = 0; this->argv_[i] != 0; i++)
ACE_OS::free ((void *) this->argv_[i]);
#if defined (ACE_HAS_ALLOC_HOOKS)
ACE_Allocator::instance()->free (this->argv_);
#else
delete [] this->argv_;
#endif /* ACE_HAS_ALLOC_HOOKS */
this->argv_ = 0;
}
#if defined (ACE_HAS_ALLOC_HOOKS)
ACE_Allocator::instance()->free (this->buf_);
#else
delete [] this->buf_;
#endif /* ACE_HAS_ALLOC_HOOKS */
this->buf_ = 0;
return 0;
@ -286,16 +304,27 @@ ACE_ARGV_T<CHAR_TYPE>::add (CHAR_TYPE *argv[], bool quote_args)
// Free up argv_ and buf_
template <typename CHAR_TYPE>
ACE_ARGV_T<CHAR_TYPE>::~ACE_ARGV_T (void)
ACE_ARGV_T<CHAR_TYPE>::~ACE_ARGV_T ()
{
ACE_TRACE ("ACE_ARGV_T::~ACE_ARGV_T");
if (this->argv_ != 0)
for (int i = 0; this->argv_[i] != 0; i++)
#if defined (ACE_HAS_ALLOC_HOOKS)
ACE_Allocator::instance()->free ((void *) this->argv_[i]);
#else
ACE_OS::free ((void *) this->argv_[i]);
#endif /* ACE_HAS_ALLOC_HOOKS */
#if defined (ACE_HAS_ALLOC_HOOKS)
ACE_Allocator::instance()->free (this->argv_);
ACE_Allocator::instance()->free (this->buf_);
#else
delete [] this->argv_;
delete [] this->buf_;
#endif /* ACE_HAS_ALLOC_HOOKS */
}
// Create buf_ out of the queue_. This is only used in the
@ -303,7 +332,7 @@ ACE_ARGV_T<CHAR_TYPE>::~ACE_ARGV_T (void)
template <typename CHAR_TYPE>
int
ACE_ARGV_T<CHAR_TYPE>::create_buf_from_queue (void)
ACE_ARGV_T<CHAR_TYPE>::create_buf_from_queue ()
{
ACE_TRACE ("ACE_ARGV_T::create_buf_from_queue");
@ -311,11 +340,21 @@ ACE_ARGV_T<CHAR_TYPE>::create_buf_from_queue (void)
if (this->argc_ <= 0)
return -1;
#if defined (ACE_HAS_ALLOC_HOOKS)
ACE_Allocator::instance()->free (this->buf_);
#else
delete [] this->buf_;
#endif /* ACE_HAS_ALLOC_HOOKS */
#if defined (ACE_HAS_ALLOC_HOOKS)
ACE_ALLOCATOR_RETURN (this->buf_,
static_cast<char*> (ACE_Allocator::instance()->malloc(sizeof (CHAR_TYPE) * (this->length_ + this->argc_))),
-1);
#else
ACE_NEW_RETURN (this->buf_,
CHAR_TYPE[this->length_ + this->argc_],
-1);
#endif /* ACE_HAS_ALLOC_HOOKS */
// Get an iterator over the queue
ACE_Unbounded_Queue_Iterator<ACE_ARGV_Queue_Entry_T<CHAR_TYPE> > iter (this->queue_);

View file

@ -4,9 +4,7 @@
/**
* @file ARGV.h
*
* $Id: ARGV.h 95972 2012-07-26 10:20:42Z johnnyw $
*
* @author Doug Schmidt <schmidt@cs.wustl.edu>
* @author Doug Schmidt <d.schmidt@vanderbilt.edu>
* @author Everett Anderson <eea1@cs.wustl.edu>
*/
//==========================================================================
@ -36,9 +34,8 @@ template <typename CHAR_TYPE>
class ACE_ARGV_Queue_Entry_T
{
public:
// = Initialization and termination.
/// Initialize a ACE_ARGV_Queue_Entry_T.
ACE_ARGV_Queue_Entry_T (void);
ACE_ARGV_Queue_Entry_T ();
/**
* Initialize a ACE_ARGV_Queue_Entry_T.
@ -58,12 +55,16 @@ public:
*/
ACE_ARGV_Queue_Entry_T (const ACE_ARGV_Queue_Entry_T<CHAR_TYPE> &entry);
ACE_ARGV_Queue_Entry_T (ACE_ARGV_Queue_Entry_T&&) = default;
ACE_ARGV_Queue_Entry_T &operator = (const ACE_ARGV_Queue_Entry_T &) = default;
ACE_ARGV_Queue_Entry_T &operator = (ACE_ARGV_Queue_Entry_T &&) = default;
/// We need this destructor to keep some compilers from complaining.
/// It's just a no-op, however.
~ACE_ARGV_Queue_Entry_T (void);
~ACE_ARGV_Queue_Entry_T ();
/// Dump the state of this object.
void dump (void) const;
void dump () const;
// Declare the dynamic allocation hooks.
ACE_ALLOC_HOOK_DECLARE;
@ -96,7 +97,6 @@ template <typename CHAR_TYPE>
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
@ -194,7 +194,7 @@ public:
explicit ACE_ARGV_T (bool substitute_env_args = true);
/// Destructor.
~ACE_ARGV_T (void);
~ACE_ARGV_T ();
/** @name Accessor methods
*
@ -216,22 +216,22 @@ public:
* maintained internally to this class. Do not change or delete either the
* pointers or the memory to which they refer.
*/
CHAR_TYPE **argv (void);
CHAR_TYPE **argv ();
/// Returns the current number of arguments.
int argc (void) const;
int argc () 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);
const CHAR_TYPE *buf ();
//@}
/// Dump the state of this object.
void dump (void) const;
void dump () const;
// Declare the dynamic allocation hooks.
ACE_ALLOC_HOOK_DECLARE;
@ -276,17 +276,16 @@ public:
int add (CHAR_TYPE *argv[], bool quote_args = false);
private:
/// Copy constructor not implemented.
ACE_UNIMPLEMENTED_FUNC (ACE_ARGV_T (const ACE_ARGV_T<CHAR_TYPE>&))
/// Assignment operator not implemented.
ACE_UNIMPLEMENTED_FUNC (ACE_ARGV_T operator= (const ACE_ARGV_T<CHAR_TYPE>&))
ACE_ARGV_T (const ACE_ARGV_T<CHAR_TYPE>&) = delete;
ACE_ARGV_T operator= (const ACE_ARGV_T<CHAR_TYPE>&) = delete;
ACE_ARGV_T (ACE_ARGV_T<CHAR_TYPE>&&) = delete;
ACE_ARGV_T operator= (ACE_ARGV_T<CHAR_TYPE>&&) = delete;
/// Creates buf_ from the queue of added args, deletes previous buf_.
int create_buf_from_queue (void);
int create_buf_from_queue ();
/// Converts buf_ into the CHAR_TYPE *argv[] format.
int string_to_argv (void);
int string_to_argv ();
/// Replace args with environment variable values?
bool substitute_env_args_;
@ -299,7 +298,7 @@ private:
/// The array of string arguments.
CHAR_TYPE **argv_;
/// Buffer containing the <argv> contents.
/// Buffer containing the argv contents.
CHAR_TYPE *buf_;
/// Total length of the arguments in the queue, not counting

View file

@ -1,13 +1,11 @@
/* -*- 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 <typename CHAR_TYPE> ACE_INLINE
ACE_ARGV_Queue_Entry_T<CHAR_TYPE>::ACE_ARGV_Queue_Entry_T (void)
ACE_ARGV_Queue_Entry_T<CHAR_TYPE>::ACE_ARGV_Queue_Entry_T ()
: arg_(0),
quote_arg_(false)
{
@ -32,7 +30,7 @@ ACE_ARGV_Queue_Entry_T<CHAR_TYPE>::ACE_ARGV_Queue_Entry_T (const ACE_ARGV_Queue_
}
template <typename CHAR_TYPE> ACE_INLINE
ACE_ARGV_Queue_Entry_T<CHAR_TYPE>::~ACE_ARGV_Queue_Entry_T (void)
ACE_ARGV_Queue_Entry_T<CHAR_TYPE>::~ACE_ARGV_Queue_Entry_T ()
{
// No-op just to keep some compilers happy...
}
@ -40,7 +38,7 @@ ACE_ARGV_Queue_Entry_T<CHAR_TYPE>::~ACE_ARGV_Queue_Entry_T (void)
// Return the number of args
template <typename CHAR_TYPE>
ACE_INLINE int
ACE_ARGV_T<CHAR_TYPE>::argc (void) const
ACE_ARGV_T<CHAR_TYPE>::argc () const
{
ACE_TRACE ("ACE_ARGV_T::argc");
// Try to create the argv_ if it isn't there
@ -53,7 +51,7 @@ ACE_ARGV_T<CHAR_TYPE>::argc (void) const
// Return the arguments in a space-separated string
template <typename CHAR_TYPE>
ACE_INLINE const CHAR_TYPE *
ACE_ARGV_T<CHAR_TYPE>::buf (void)
ACE_ARGV_T<CHAR_TYPE>::buf ()
{
ACE_TRACE ("ACE_ARGV_T::buf");
@ -67,7 +65,7 @@ ACE_ARGV_T<CHAR_TYPE>::buf (void)
template <typename CHAR_TYPE>
ACE_INLINE CHAR_TYPE **
ACE_ARGV_T<CHAR_TYPE>::argv (void)
ACE_ARGV_T<CHAR_TYPE>::argv ()
{
ACE_TRACE ("ACE_ARGV_T::argv");

View file

@ -1,9 +1,5 @@
// $Id: ATM_Acceptor.cpp 91286 2010-08-05 09:04:31Z johnnyw $
#include "ace/ATM_Acceptor.h"
#if defined (ACE_HAS_ATM)
#if defined (ACE_HAS_LINUX_ATM)
@ -14,7 +10,6 @@
#include "ace/ATM_Acceptor.inl"
#endif /* __ACE_INLINE__ */
// Open versioned namespace, if enabled by the user.
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
@ -75,7 +70,7 @@ ACE_ATM_Acceptor::get_local_addr (ACE_ATM_Addr &local_addr)
if (ACE_OS::getsockname (acceptor_.get_handle (),
(struct sockaddr *) & (myaddr->sockaddratmsvc),
&addrlen) < 0) {
ACE_DEBUG ((LM_DEBUG,
ACELIB_DEBUG ((LM_DEBUG,
ACE_TEXT ("ATM_Acceptor (get_local_addr): ioctl: %d\n"),
errno));
return -1;
@ -172,7 +167,7 @@ ACE_ATM_Acceptor::open (const ACE_Addr &remote_sap,
params.get_flags ()
))
== ACE_INVALID_HANDLE) {
ACE_DEBUG (LM_DEBUG,
ACELIB_DEBUG (LM_DEBUG,
ACE_TEXT ("Acceptor (socket): socket %d\n"),
errno);
return (ACE_INVALID_HANDLE);
@ -209,7 +204,7 @@ ACE_ATM_Acceptor::open (const ACE_Addr &remote_sap,
&(local_sap_addr->sockaddratmsvc)),
sizeof (local_sap_addr->sockaddratmsvc)
) == -1) {
ACE_DEBUG (LM_DEBUG,
ACELIB_DEBUG (LM_DEBUG,
ACE_TEXT ("Acceptor (open): bind %d\n"),
errno);
return -1;
@ -218,7 +213,7 @@ ACE_ATM_Acceptor::open (const ACE_Addr &remote_sap,
if (ACE_OS::listen (handle,
backlog)
== -1) {
ACE_DEBUG (LM_DEBUG,
ACELIB_DEBUG (LM_DEBUG,
ACE_TEXT ("Acceptor (listen): listen %d\n"),
errno);
return -1;

View file

@ -4,8 +4,6 @@
/**
* @file ATM_Acceptor.h
*
* $Id: ATM_Acceptor.h 82723 2008-09-16 09:35:44Z johnnyw $
*
* @author Joe Hoffert
*/
//=============================================================================
@ -59,9 +57,7 @@ class ACE_Time_Value;
*/
class ACE_Export ACE_ATM_Acceptor
{
public:
// = Initialization and termination methods.
/// Default constructor.
ACE_ATM_Acceptor (void);
@ -101,7 +97,7 @@ public:
typedef ACE_ATM_Stream PEER_STREAM;
/// Dump the state of an object.
void dump (void) const;
void dump () const;
/// Declare the dynamic allocation hooks.
ACE_ALLOC_HOOK_DECLARE;

View file

@ -1,7 +1,4 @@
// -*- C++ -*-
//
// $Id: ATM_Acceptor.inl 80826 2008-03-04 14:51:23Z wotte $
// Open versioned namespace, if enabled by the user.
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
@ -23,7 +20,7 @@ ACE_ATM_Acceptor::ACE_ATM_Acceptor (const ACE_Addr &remote_sap,
//FUZZ: disable check_for_lack_ACE_OS
if (open (remote_sap, backlog, params) < 0)
//FUZZ: enable check_for_lack_ACE_OS
ACE_ERROR ((LM_ERROR,
ACELIB_ERROR ((LM_ERROR,
ACE_TEXT ("%p\n"),
ACE_TEXT ("ACE_ATM_Acceptor::ACE_ATM_Acceptor")));
}

View file

@ -1,11 +1,9 @@
// $Id: ATM_Addr.cpp 91286 2010-08-05 09:04:31Z johnnyw $
// Defines the Internet domain address family address format.
#include "ace/ATM_Addr.h"
#if defined (ACE_HAS_ATM)
#include "ace/Log_Msg.h"
#include "ace/Log_Category.h"
#if defined (ACE_HAS_FORE_ATM_WS2)
#include /**/ "forews2.h"
@ -15,8 +13,6 @@
#include "ace/ATM_Addr.inl"
#endif /* __ACE_INLINE__ */
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_ALLOC_HOOK_DEFINE(ACE_ATM_Addr)
@ -353,7 +349,7 @@ ACE_ATM_Addr::string_to_addr (const ACE_TCHAR sap[])
(struct sockaddr *)& (atm_addr_.sockaddratmsvc),
sizeof (atm_addr_.sockaddratmsvc),
T2A_SVC | T2A_NAME) < 0) {
ACE_DEBUG (LM_DEBUG,
ACELIB_DEBUG (LM_DEBUG,
"Error : text2atm failed!\n");
errno = EINVAL;
return -1;
@ -420,7 +416,7 @@ ACE_ATM_Addr::addr_to_string (ACE_TCHAR addr[],
sizeof buffer,
(struct sockaddr *)& (atm_addr_.sockaddratmsvc),
A2T_PRETTY)) < 0) {
ACE_DEBUG ((LM_DEBUG,"ACE_ATM_Addr (addr_to_string): atm2text failed\n"));
ACELIB_DEBUG ((LM_DEBUG,"ACE_ATM_Addr (addr_to_string): atm2text failed\n"));
return -1;
}
if (addrlen < (size_t)total_len)
@ -452,7 +448,7 @@ ACE_ATM_Addr::addr_to_string (void) const
// Set a pointer to the address.
void
ACE_ATM_Addr::set_addr (void *addr, int len)
ACE_ATM_Addr::set_addr (const void *addr, int len)
{
ACE_TRACE ("ACE_ATM_Addr::set_addr");
@ -464,8 +460,7 @@ ACE_ATM_Addr::set_addr (void *addr, int len)
this->ACE_Addr::base_set (AF_UNSPEC,
#endif /* ACE_HAS_FORE_ATM_XTI || ACE_HAS_FORE_WS2 */
len);
ACE_OS::memcpy ((void *) &this->atm_addr_,
(void *) addr, len);
ACE_OS::memcpy (&this->atm_addr_, addr, len);
}
// Compare two addresses for inequality.
@ -506,14 +501,14 @@ ACE_ATM_Addr::dump (void) const
#if defined (ACE_HAS_DUMP)
ACE_TRACE ("ACE_ATM_Addr::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
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 ());
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("%s"), s));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("%s"), s));
ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP));
#endif /* ACE_HAS_DUMP */
}

View file

@ -4,8 +4,6 @@
/**
* @file ATM_Addr.h
*
* $Id: ATM_Addr.h 80826 2008-03-04 14:51:23Z wotte $
*
* @author Joe Hoffert <joeh@cs.wustl.edu>
*/
//==========================================================================
@ -65,7 +63,6 @@ public:
static const int OPT_FLAGS_PMP;
static const int DEFAULT_SELECTOR;
// = Initialization methods.
/// Default constructor.
ACE_ATM_Addr (u_char selector = DEFAULT_SELECTOR);
@ -93,7 +90,6 @@ public:
/// 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);
@ -150,7 +146,7 @@ public:
virtual void *get_addr (void) const;
/// Set a pointer to the address.
virtual void set_addr (void *, int);
virtual void set_addr (const void *, int);
/// Return the selector for network address.
u_char get_selector (void) const;
@ -169,7 +165,7 @@ public:
bool operator != (const ACE_ATM_Addr &SAP) const;
/// Dump the state of an object.
void dump (void) const;
void dump () const;
/// Declare the dynamic allocation hooks.
ACE_ALLOC_HOOK_DECLARE;

View file

@ -1,7 +1,4 @@
// -*- C++ -*-
//
// $Id: ATM_Addr.inl 80826 2008-03-04 14:51:23Z wotte $
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_INLINE u_char

View file

@ -1,13 +1,9 @@
// ATM_Connector.cpp
// $Id: ATM_Connector.cpp 91286 2010-08-05 09:04:31Z johnnyw $
#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__ */
@ -52,7 +48,7 @@ ACE_ATM_Connector::connect (ACE_ATM_Stream &new_stream,
params.get_user_data(),
&options.get_qos());
#elif defined (ACE_HAS_FORE_ATM_WS2)
ACE_DEBUG(LM_DEBUG,
ACELIB_DEBUG(LM_DEBUG,
ACE_TEXT ("ATM_Connector(connect): set QoS parameters\n" ));
ACE_HANDLE s = new_stream.get_handle();
@ -65,7 +61,7 @@ ACE_ATM_Connector::connect (ACE_ATM_Stream &new_stream,
0,
0);
ACE_DEBUG(LM_DEBUG,
ACELIB_DEBUG(LM_DEBUG,
ACE_TEXT ("ATM_Connector(connect): connecting...\n"));
int result = ACE_OS::connect( s,
@ -103,7 +99,7 @@ ACE_ATM_Connector::connect (ACE_ATM_Stream &new_stream,
SO_ATMQOS,
reinterpret_cast<char*> (&qos),
sizeof(qos)) < 0) {
ACE_DEBUG((LM_DEBUG,ACE_TEXT ("ATM_Connector(connect): unable to set qos %d\n"),
ACELIB_DEBUG((LM_DEBUG,ACE_TEXT ("ATM_Connector(connect): unable to set qos %d\n"),
errno));
return -1;
}
@ -113,7 +109,7 @@ ACE_ATM_Connector::connect (ACE_ATM_Stream &new_stream,
sizeof( remote_addr->sockaddratmsvc));
if ( result != 0 )
ACE_DEBUG(LM_DEBUG,
ACELIB_DEBUG(LM_DEBUG,
ACE_TEXT ("ATM_Connector(connect): connection failed, %d\n"),
errno);

View file

@ -4,8 +4,6 @@
/**
* @file ATM_Connector.h
*
* $Id: ATM_Connector.h 82723 2008-09-16 09:35:44Z johnnyw $
*
* @author Joe Hoffert <joeh@cs.wustl.edu>
*/
//=============================================================================
@ -51,7 +49,6 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL
class ACE_Export ACE_ATM_Connector
{
public:
// = Initialization methods.
/// Default constructor.
ACE_ATM_Connector (void);
@ -143,7 +140,7 @@ public:
typedef ACE_ATM_Stream PEER_STREAM;
/// Dump the state of an object.
void dump (void) const;
void dump () const;
/// Declare the dynamic allocation hooks.
ACE_ALLOC_HOOK_DECLARE;

View file

@ -1,7 +1,4 @@
// -*- C++ -*-
//
// $Id: ATM_Connector.inl 84565 2009-02-23 08:20:39Z johnnyw $
// Open versioned namespace, if enabled by the user.
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
@ -35,7 +32,7 @@ ACE_ATM_Connector::ACE_ATM_Connector (ACE_ATM_Stream &new_stream,
flags,
perms) == ACE_INVALID_HANDLE
&& timeout != 0 && !(errno == EWOULDBLOCK || errno == ETIME))
ACE_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"),
ACELIB_ERROR ((LM_ERROR, ACE_TEXT ("%p\n"),
ACE_TEXT ("ACE_ATM_Stream::ACE_ATM_Stream")));
}

View file

@ -1,11 +1,7 @@
// $Id: ATM_Params.cpp 91286 2010-08-05 09:04:31Z johnnyw $
#include "ace/ATM_Params.h"
#if defined (ACE_HAS_ATM)
#if !defined (__ACE_INLINE__)
#include "ace/ATM_Params.inl"
#endif /* __ACE_INLINE__ */

View file

@ -4,8 +4,6 @@
/**
* @file ATM_Params.h
*
* $Id: ATM_Params.h 80826 2008-03-04 14:51:23Z wotte $
*
* @author Joe Hoffert <joeh@cs.wustl.edu>
*/
//==========================================================================
@ -160,7 +158,7 @@ public:
void set_oflag (int);
/// Dump the state of an object.
void dump (void) const;
void dump () const;
/// Declare the dynamic allocation hooks.
ACE_ALLOC_HOOK_DECLARE;

View file

@ -1,7 +1,4 @@
// -*- C++ -*-
//
// $Id: ATM_Params.inl 80826 2008-03-04 14:51:23Z wotte $
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_INLINE void

View file

@ -1,9 +1,5 @@
// $Id: ATM_QoS.cpp 91286 2010-08-05 09:04:31Z johnnyw $
#include "ace/ATM_QoS.h"
#if defined (ACE_HAS_ATM)
#if !defined (__ACE_INLINE__)
@ -117,7 +113,7 @@ ACE_ATM_QoS::ACE_ATM_QoS(int rate,
qos_.ProviderSpecific.buf = (char *) ACE_OS::malloc(size);
if (qos_.ProviderSpecific.buf == 0) {
ACE_ERROR((LM_ERROR,
ACELIB_ERROR((LM_ERROR,
ACE_TEXT ("ACE_ATM_QoS::ACE_ATM_QoS: Unable to allocate %d bytes for qos_.ProviderSpecific.buf\n"),
size));
return;
@ -297,7 +293,7 @@ ACE_ATM_QoS::set_cbr_rate (int rate,
qos_.ProviderSpecific.buf = (char *) ACE_OS::malloc(size);
if (qos_.ProviderSpecific.buf == 0) {
ACE_ERROR((LM_ERROR,
ACELIB_ERROR((LM_ERROR,
ACE_TEXT ("ACE_ATM_QoS::ACE_ATM_QoS: Unable to allocate %d bytes for qos_.ProviderSpecific.buf\n"),
size));
return;
@ -467,7 +463,7 @@ ACE_ATM_QoS::construct_options (ACE_HANDLE fd,
buf = (char *) ACE_OS::malloc (info.options);
if (buf == 0)
ACE_ERROR_RETURN ((LM_ERROR,
ACELIB_ERROR_RETURN ((LM_ERROR,
ACE_TEXT ("Unable to allocate %d bytes for options\n"),
info.options),
0);
@ -503,7 +499,7 @@ ACE_ATM_QoS::construct_options (ACE_HANDLE fd,
LOCALNAME) < 0)
{
ACE_OS::t_error("t_getname (local_address)");
ACE_ERROR ((LM_ERROR,
ACELIB_ERROR ((LM_ERROR,
ACE_TEXT ("Can't get local address!\n")));
ACE_OS::free (buf);
return 0;

View file

@ -4,13 +4,10 @@
/**
* @file ATM_QoS.h
*
* $Id: ATM_QoS.h 80826 2008-03-04 14:51:23Z wotte $
*
* @author Joe Hoffert
*/
//==========================================================================
#ifndef ACE_ATM_QoS_H
#define ACE_ATM_QoS_H
#include /**/ "ace/pre.h"
@ -65,7 +62,6 @@ public:
static const int DEFAULT_SELECTOR;
static const int DEFAULT_PKT_SIZE;
// = Initializattion and termination methods.
/// Default constructor.
ACE_ATM_QoS(int = DEFAULT_PKT_SIZE);
@ -88,7 +84,7 @@ public:
ATM_QoS get_qos (void);
/// Dump the state of an object.
void dump (void) const;
void dump () const;
/// Declare the dynamic allocation hooks.
ACE_ALLOC_HOOK_DECLARE;

View file

@ -1,7 +1,4 @@
// -*- C++ -*-
//
// $Id: ATM_QoS.inl 80826 2008-03-04 14:51:23Z wotte $
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_INLINE void

View file

@ -1,9 +1,9 @@
// $Id: ATM_Stream.cpp 91286 2010-08-05 09:04:31Z johnnyw $
#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__ */
@ -116,7 +116,7 @@ ACE_ATM_Stream::get_peer_name (void) const
if ((total_len = atm2text (buffer,sizeof buffer,
(struct sockaddr *) & (name.sockaddratmsvc),
A2T_PRETTY|A2T_NAME)) < 0) {
ACE_DEBUG ((LM_DEBUG,ACE_TEXT ("ACE_ATM_Stream (get_peer_name) :%d"),errno));
ACELIB_DEBUG ((LM_DEBUG,ACE_TEXT ("ACE_ATM_Stream (get_peer_name) :%d"),errno));
return 0;
}
@ -245,7 +245,7 @@ ACE_ATM_Stream::get_vpi_vci (ACE_UINT16 &vpi,
SO_ATMPVC,
reinterpret_cast<char*> (&mypvcaddr),
&addrpvclen) < 0) {
ACE_DEBUG (LM_DEBUG,
ACELIB_DEBUG (LM_DEBUG,
ACE_TEXT ("ACE_ATM_Stream::get_vpi_vci: getsockopt %d\n"),
errno);
return -1;
@ -261,7 +261,7 @@ ACE_ATM_Stream::get_vpi_vci (ACE_UINT16 &vpi,
SOL_ATM,SO_VCID,
reinterpret_cast<char*> (&mypvcid),
&pvcidlen) < 0) {
ACE_DEBUG (LM_DEBUG,
ACELIB_DEBUG (LM_DEBUG,
ACE_TEXT ("ACE_ATM_Stream::get_vpi_vci: getsockopt %d\n"),
errno);
return -1;
@ -271,7 +271,7 @@ ACE_ATM_Stream::get_vpi_vci (ACE_UINT16 &vpi,
return 0;
#else
ACE_DEBUG (LM_DEBUG,
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);

View file

@ -4,13 +4,10 @@
/**
* @file ATM_Stream.h
*
* $Id: ATM_Stream.h 80826 2008-03-04 14:51:23Z wotte $
*
* @author Joe Hoffert
*/
//=============================================================================
#ifndef ACE_ATM_STREAM_H
#define ACE_ATM_STREAM_H
#include /**/ "ace/pre.h"
@ -48,7 +45,6 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL
class ACE_Export ACE_ATM_Stream
{
public:
// = Initialization and termination methods.
/// Default constructor.
ACE_ATM_Stream (void);
@ -86,7 +82,7 @@ public:
typedef ACE_ATM_Addr PEER_ADDR;
/// Dump the state of an object.
void dump (void) const;
void dump () const;
/// Declare the dynamic allocation hooks.
ACE_ALLOC_HOOK_DECLARE;

View file

@ -1,6 +1,4 @@
// -*- C++ -*-
// $Id: ATM_Stream.inl 92474 2010-11-02 13:29:39Z johnnyw $
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_INLINE void

View file

@ -1,5 +1,3 @@
//$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"

View file

@ -1,5 +1,3 @@
//$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
@ -13,6 +11,8 @@
* Brunsch, Irfan Pyarali and a cast of thousands.
*/
#include "ace/Versioned_Namespace.h"
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
// Forward declares
@ -38,14 +38,14 @@ class ACE_Abstract_Timer_Queue
{
public:
/// Destructor
virtual ~ACE_Abstract_Timer_Queue (void) = 0;
virtual ~ACE_Abstract_Timer_Queue () = 0;
/// True if queue is empty, else false.
virtual bool is_empty (void) const = 0;
virtual bool is_empty () 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;
virtual const ACE_Time_Value &earliest_time () const = 0;
/**
* Schedule @a type that will expire at @a future_time, which is
@ -110,7 +110,7 @@ public:
*
* Returns the number of timers canceled.
*/
virtual int expire (void) = 0;
virtual int expire () = 0;
/**
* A couple of classes using Timer_Queues need to dispatch a single
@ -160,21 +160,21 @@ public:
/**
* Close timer queue. Cancels all timers.
*/
virtual int close (void) = 0;
virtual int close () = 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;
virtual ACE_Time_Value gettimeofday () = 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;
virtual void gettimeofday (ACE_Time_Value (*gettimeofday)()) = 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.
@ -184,7 +184,7 @@ public:
/**
* Determine the next event to timeout. Returns @a max if there are
* no pending timers or if all pending timers are longer than max.
* <the_timeout> should be a pointer to storage for the timeout value,
* @a the_timeout 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
@ -204,16 +204,16 @@ public:
typedef ACE_Timer_Queue_Iterator_T<TYPE> ITERATOR;
/// Returns a pointer to this ACE_Timer_Queue's iterator.
virtual ITERATOR & iter (void) = 0;
virtual ITERATOR & iter () = 0;
/// Removes the earliest node from the queue and returns it
virtual ACE_Timer_Node_T<TYPE> *remove_first (void) = 0;
virtual ACE_Timer_Node_T<TYPE> *remove_first () = 0;
/// Reads the earliest node from the queue and returns it.
virtual ACE_Timer_Node_T<TYPE> *get_first (void) = 0;
virtual ACE_Timer_Node_T<TYPE> *get_first () = 0;
/// Dump the state of a object.
virtual void dump (void) const = 0;
virtual void dump () const = 0;
};
ACE_END_VERSIONED_NAMESPACE_DECL

File diff suppressed because it is too large Load diff

View file

@ -4,9 +4,7 @@
/**
* @file Acceptor.h
*
* $Id: Acceptor.h 93624 2011-03-22 21:14:05Z johnnyw $
*
* @author Douglas C. Schmidt <schmidt@cs.wustl.edu>
* @author Douglas C. Schmidt <d.schmidt@vanderbilt.edu>
*/
//=============================================================================
@ -34,35 +32,42 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL
* activating the SVC_HANDLER.
*
* Implements the basic strategy for passively establishing
* connections with clients. An ACE_Acceptor is parameterized
* by concrete types that conform to the interfaces of
* PEER_ACCEPTOR and SVC_HANDLER. The PEER_ACCEPTOR is
* instantiated with a transport mechanism that passively
* establishes connections. The SVC_HANDLER is instantiated
* with a concrete type that performs the application-specific
* service. 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.
* 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 SVC_HANDLER, ACE_PEER_ACCEPTOR_1>
template <typename SVC_HANDLER, typename PEER_ACCEPTOR>
class ACE_Acceptor : public ACE_Service_Object
{
public:
// Useful STL-style traits.
typedef ACE_PEER_ACCEPTOR_ADDR addr_type;
typedef ACE_PEER_ACCEPTOR acceptor_type;
typedef SVC_HANDLER handler_type;
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);
int use_select = ACE_DEFAULT_ACCEPTOR_USE_SELECT);
/**
* Open the contained @c PEER_ACCEPTOR object to begin listening, and
@ -97,10 +102,10 @@ public:
* @p local_addr. Generally used to request that the
* OS allow reuse of the listen port. The default is 1.
*/
ACE_Acceptor (const ACE_PEER_ACCEPTOR_ADDR &local_addr,
ACE_Acceptor (const typename PEER_ACCEPTOR::PEER_ADDR &local_addr,
ACE_Reactor *reactor = ACE_Reactor::instance (),
int flags = 0,
int use_select = 1,
int use_select = ACE_DEFAULT_ACCEPTOR_USE_SELECT,
int reuse_addr = 1);
/**
@ -139,33 +144,33 @@ public:
* @retval 0 Success
* @retval -1 Failure, @c errno contains an error code.
*/
virtual int open (const ACE_PEER_ACCEPTOR_ADDR &local_addr,
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 use_select = ACE_DEFAULT_ACCEPTOR_USE_SELECT,
int reuse_addr = 1);
/// Close down the Acceptor's resources.
virtual ~ACE_Acceptor (void);
virtual ~ACE_Acceptor ();
/// Return the underlying PEER_ACCEPTOR object.
virtual operator ACE_PEER_ACCEPTOR &() const;
virtual operator PEER_ACCEPTOR &() const;
/// Return the underlying PEER_ACCEPTOR object.
virtual ACE_PEER_ACCEPTOR &acceptor (void) const;
virtual PEER_ACCEPTOR &acceptor () const;
/// Returns the listening acceptor's {ACE_HANDLE}.
virtual ACE_HANDLE get_handle (void) const;
virtual ACE_HANDLE get_handle () const;
/// Close down the Acceptor
virtual int close (void);
virtual int close ();
/// 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);
virtual int handle_accept_error ();
/// Dump the state of an object.
void dump (void) const;
void dump () const;
/// Declare the dynamic allocation hooks.
ACE_ALLOC_HOOK_DECLARE;
@ -220,7 +225,7 @@ protected:
virtual int init (int argc, ACE_TCHAR *argv[]);
/// Calls {handle_close}.
virtual int fini (void);
virtual int fini ();
/// Default version returns address info in {buf}.
virtual int info (ACE_TCHAR **buf, size_t) const;
@ -228,17 +233,17 @@ protected:
public:
// = Service management hooks.
/// This method calls {Reactor::suspend}.
virtual int suspend (void);
virtual int suspend ();
/// This method calls {Reactor::resume}.
virtual int resume (void);
virtual int resume ();
protected:
/// Concrete factory for accepting connections from clients...
ACE_PEER_ACCEPTOR peer_acceptor_;
PEER_ACCEPTOR peer_acceptor_;
/// Needed to reopen the socket if {accept} fails.
ACE_PEER_ACCEPTOR_ADDR peer_acceptor_addr_;
typename PEER_ACCEPTOR::PEER_ADDR peer_acceptor_addr_;
/**
* Flags that indicate how {SVC_HANDLER}'s should be initialized
@ -270,33 +275,32 @@ protected:
* SVC_HANDLER, and (3) activating the SVC_HANDLER with a
* particular concurrency mechanism.
*/
template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1>
template <typename SVC_HANDLER, typename PEER_ACCEPTOR>
class ACE_Strategy_Acceptor
: public ACE_Acceptor <SVC_HANDLER, ACE_PEER_ACCEPTOR_2>
: public ACE_Acceptor <SVC_HANDLER, PEER_ACCEPTOR>
{
public:
// Useful STL-style traits.
typedef ACE_Creation_Strategy<SVC_HANDLER>
creation_strategy_type;
typedef ACE_Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>
typedef ACE_Accept_Strategy<SVC_HANDLER, PEER_ACCEPTOR>
accept_strategy_type;
typedef ACE_Concurrency_Strategy<SVC_HANDLER>
concurrency_strategy_type;
typedef ACE_Scheduling_Strategy<SVC_HANDLER> scheduling_strategy_type;
typedef ACE_Acceptor <SVC_HANDLER, ACE_PEER_ACCEPTOR_2>
typedef ACE_Acceptor <SVC_HANDLER, PEER_ACCEPTOR>
base_type;
// = Define some useful (old style) traits.
typedef ACE_Creation_Strategy<SVC_HANDLER> CREATION_STRATEGY;
typedef ACE_Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2> ACCEPT_STRATEGY;
typedef ACE_Accept_Strategy<SVC_HANDLER, PEER_ACCEPTOR> ACCEPT_STRATEGY;
typedef ACE_Concurrency_Strategy<SVC_HANDLER> CONCURRENCY_STRATEGY;
typedef ACE_Scheduling_Strategy<SVC_HANDLER> SCHEDULING_STRATEGY;
/// Default constructor.
ACE_Strategy_Acceptor (const ACE_TCHAR service_name[] = 0,
const ACE_TCHAR service_description[] = 0,
int use_select = 1,
int use_select = ACE_DEFAULT_ACCEPTOR_USE_SELECT,
int reuse_addr = 1);
/**
@ -305,15 +309,15 @@ public:
* with the Reactor and listen for connection requests at the
* designated {local_addr}.
*/
ACE_Strategy_Acceptor (const ACE_PEER_ACCEPTOR_ADDR &local_addr,
ACE_Strategy_Acceptor (const typename PEER_ACCEPTOR::PEER_ADDR &local_addr,
ACE_Reactor * = ACE_Reactor::instance (),
ACE_Creation_Strategy<SVC_HANDLER> * = 0,
ACE_Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2> * = 0,
ACE_Accept_Strategy<SVC_HANDLER, PEER_ACCEPTOR> * = 0,
ACE_Concurrency_Strategy<SVC_HANDLER> * = 0,
ACE_Scheduling_Strategy<SVC_HANDLER> * = 0,
const ACE_TCHAR service_name[] = 0,
const ACE_TCHAR service_description[] = 0,
int use_select = 1,
int use_select = ACE_DEFAULT_ACCEPTOR_USE_SELECT,
int reuse_addr = 1);
/**
@ -350,10 +354,10 @@ public:
* @retval 0 Success
* @retval -1 Failure, @c errno contains an error code.
*/
virtual int open (const ACE_PEER_ACCEPTOR_ADDR &local_addr,
virtual int open (const typename PEER_ACCEPTOR::PEER_ADDR &local_addr,
ACE_Reactor *reactor,
int flags = 0,
int use_select = 1,
int use_select = ACE_DEFAULT_ACCEPTOR_USE_SELECT,
int reuse_addr = 1);
/**
@ -362,31 +366,31 @@ public:
* with the Reactor and listen for connection requests at the
* designated {local_addr}.
*/
virtual int open (const ACE_PEER_ACCEPTOR_ADDR &,
virtual int open (const typename PEER_ACCEPTOR::PEER_ADDR &,
ACE_Reactor * = ACE_Reactor::instance (),
ACE_Creation_Strategy<SVC_HANDLER> * = 0,
ACE_Accept_Strategy<SVC_HANDLER, ACE_PEER_ACCEPTOR_2> * =0,
ACE_Accept_Strategy<SVC_HANDLER, PEER_ACCEPTOR> * =0,
ACE_Concurrency_Strategy<SVC_HANDLER> * = 0,
ACE_Scheduling_Strategy<SVC_HANDLER> * = 0,
const ACE_TCHAR *service_name = 0,
const ACE_TCHAR *service_description = 0,
int use_select = 1,
int use_select = ACE_DEFAULT_ACCEPTOR_USE_SELECT,
int reuse_addr = 1);
/// Close down the Strategy_Acceptor's resources.
virtual ~ACE_Strategy_Acceptor (void);
virtual ~ACE_Strategy_Acceptor ();
/// Return the underlying PEER_ACCEPTOR object.
virtual operator ACE_PEER_ACCEPTOR &() const;
virtual operator PEER_ACCEPTOR &() const;
/// Return the underlying PEER_ACCEPTOR object.
virtual ACE_PEER_ACCEPTOR &acceptor (void) const;
virtual PEER_ACCEPTOR &acceptor () const;
/// Returns the listening acceptor's {ACE_HANDLE}.
virtual ACE_HANDLE get_handle (void) const;
virtual ACE_HANDLE get_handle () const;
/// Dump the state of an object.
void dump (void) const;
void dump () const;
/// Declare the dynamic allocation hooks.
ACE_ALLOC_HOOK_DECLARE;
@ -395,16 +399,16 @@ public:
/// This method delegates to the {Scheduling_Strategy}'s {suspend}
/// method.
virtual int suspend (void);
virtual int suspend ();
/// This method delegates to the {Scheduling_Strategy}'s {resume}
/// method.
virtual int resume (void);
virtual int resume ();
protected:
/// Calls {handle_close} when dynamically unlinked.
virtual int fini (void);
virtual int fini ();
/// Default version returns address info in {buf}.
virtual int info (ACE_TCHAR **buf, size_t) const;
@ -496,7 +500,7 @@ protected:
/// Address that the {Strategy_Acceptor} uses to listen for
/// connections.
ACE_PEER_ACCEPTOR_ADDR service_addr_;
typename PEER_ACCEPTOR::PEER_ADDR service_addr_;
};
/**
@ -528,19 +532,18 @@ protected:
* immediately. If there is no immediately available connection to accept,
* behavior is governed by the ACE_Synch_Options argument passed to open().
*/
template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1>
template <typename SVC_HANDLER, typename PEER_ACCEPTOR>
class ACE_Oneshot_Acceptor : public ACE_Service_Object
{
public:
// Useful STL-style traits.
typedef ACE_PEER_ACCEPTOR_ADDR addr_type;
typedef ACE_PEER_ACCEPTOR acceptor_type;
typedef SVC_HANDLER handler_type;
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);
ACE_Oneshot_Acceptor ();
/**
* Initialize the appropriate strategies for concurrency and then
@ -550,7 +553,7 @@ public:
* this point -- the @a reactor parameter is saved in case it's
* needed later.
*/
ACE_Oneshot_Acceptor (const ACE_PEER_ACCEPTOR_ADDR &local_addr,
ACE_Oneshot_Acceptor (const typename PEER_ACCEPTOR::PEER_ADDR &local_addr,
ACE_Reactor *reactor = ACE_Reactor::instance (),
ACE_Concurrency_Strategy<SVC_HANDLER> * = 0);
@ -562,36 +565,36 @@ public:
* this point -- the @a reactor parameter is saved in case it's
* needed later.
*/
int open (const ACE_PEER_ACCEPTOR_ADDR &,
int open (const typename PEER_ACCEPTOR::PEER_ADDR &,
ACE_Reactor *reactor = ACE_Reactor::instance (),
ACE_Concurrency_Strategy<SVC_HANDLER> * = 0);
/// Close down the {Oneshot_Acceptor}.
virtual ~ACE_Oneshot_Acceptor (void);
virtual ~ACE_Oneshot_Acceptor ();
// = 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,
ACE_PEER_ACCEPTOR_ADDR *remote_addr = 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);
virtual int cancel ();
/// Return the underlying {PEER_ACCEPTOR} object.
virtual operator ACE_PEER_ACCEPTOR &() const;
virtual operator PEER_ACCEPTOR &() const;
/// Return the underlying {PEER_ACCEPTOR} object.
virtual ACE_PEER_ACCEPTOR &acceptor (void) const;
virtual PEER_ACCEPTOR &acceptor () const;
/// Close down the {Oneshot_Acceptor}.
virtual int close (void);
virtual int close ();
/// Dump the state of an object.
void dump (void) const;
void dump () const;
/// Declare the dynamic allocation hooks.
ACE_ALLOC_HOOK_DECLARE;
@ -610,14 +613,14 @@ protected:
/// Factors out the code shared between the {accept} and
/// {handle_input} methods.
int shared_accept (SVC_HANDLER *svc_handler,
ACE_PEER_ACCEPTOR_ADDR *remote_addr,
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;
virtual ACE_HANDLE get_handle () const;
/// Perform termination activities when {this} is removed from the
/// {reactor}.
@ -639,7 +642,7 @@ protected:
/// Default version does no work and returns -1. Must be overloaded
/// by application developer to do anything meaningful.
virtual int fini (void);
virtual int fini ();
/// Default version returns address info in {buf}.
virtual int info (ACE_TCHAR **, size_t) const;
@ -647,11 +650,11 @@ protected:
// = 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);
virtual int suspend ();
/// Default version does no work and returns -1. Must be overloaded
/// by application developer to do anything meaningful.
virtual int resume (void);
virtual int resume ();
private:
/**
@ -670,7 +673,7 @@ private:
bool restart_;
/// Factory that establishes connections passively.
ACE_PEER_ACCEPTOR peer_acceptor_;
PEER_ACCEPTOR peer_acceptor_;
/// Concurrency strategy for an Acceptor.
ACE_Concurrency_Strategy<SVC_HANDLER> *concurrency_strategy_;

View file

@ -1,35 +1,35 @@
// $Id: Activation_Queue.cpp 91286 2010-08-05 09:04:31Z johnnyw $
#include "ace/Activation_Queue.h"
#if !defined (__ACE_INLINE__)
#include "ace/Activation_Queue.inl"
#endif /* __ACE_INLINE__ */
#include "ace/Log_Msg.h"
#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
ACE_ALLOC_HOOK_DEFINE (ACE_Activation_Queue)
void
ACE_Activation_Queue::dump (void) const
ACE_Activation_Queue::dump () const
{
#if defined (ACE_HAS_DUMP)
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
ACE_DEBUG ((LM_DEBUG,
ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
ACELIB_DEBUG ((LM_DEBUG,
ACE_TEXT ("delete_queue_ = %d\n"),
this->delete_queue_));
ACE_DEBUG ((LM_INFO, ACE_TEXT ("queue_:\n")));
ACELIB_DEBUG ((LM_INFO, ACE_TEXT ("queue_:\n")));
if (this->queue_)
this->queue_->dump();
else
//FUZZ: disable check_for_NULL
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(NULL)\n")));
ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("(NULL)\n")));
//FUZZ: enable check_for_NULL
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP));
#endif /* ACE_HAS_DUMP */
}
@ -74,7 +74,7 @@ ACE_Activation_Queue::queue (ACE_Message_Queue<ACE_SYNCH> *q)
queue_ = q;
}
ACE_Activation_Queue::~ACE_Activation_Queue (void)
ACE_Activation_Queue::~ACE_Activation_Queue ()
{
if (this->delete_queue_)
delete this->queue_;

View file

@ -4,10 +4,8 @@
/**
* @file Activation_Queue.h
*
* $Id: Activation_Queue.h 91066 2010-07-12 11:05:04Z johnnyw $
*
* @author Andres Kruse <Andres.Kruse@cern.ch>
* @author Douglas C. Schmidt <schmidt@cs.wustl.edu>
* @author Douglas C. Schmidt <d.schmidt@vanderbilt.edu>
*/
//=============================================================================
@ -49,7 +47,7 @@ class ACE_Method_Request;
*
* @sa ACE_Method_Request
*/
class ACE_Export ACE_Activation_Queue : private ACE_Copy_Disabled
class ACE_Export ACE_Activation_Queue
{
public:
/// Constructor.
@ -129,7 +127,7 @@ public:
int is_full (void) const;
/// Dump the state of an request.
void dump (void) const;
void dump () const;
/// Get a pointer to the underlying queue.
ACE_Message_Queue<ACE_SYNCH> *queue (void) const;
@ -149,13 +147,16 @@ protected:
bool delete_queue_;
private:
/// Allocation strategy of the queue.
ACE_Allocator *allocator_;
/// Allocation strategy of the message blocks.
ACE_Allocator *data_block_allocator_;
void operator= (const ACE_Activation_Queue &) = delete;
ACE_Activation_Queue (const ACE_Activation_Queue &) = delete;
void operator= (ACE_Activation_Queue &&) = delete;
ACE_Activation_Queue (ACE_Activation_Queue &&) = delete;
};
ACE_END_VERSIONED_NAMESPACE_DECL

View file

@ -1,7 +1,4 @@
// -*- C++ -*-
//
// $Id: Activation_Queue.inl 80826 2008-03-04 14:51:23Z wotte $
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_INLINE size_t

View file

@ -1,5 +1,3 @@
// $Id: Active_Map_Manager.cpp 91286 2010-08-05 09:04:31Z johnnyw $
#include "ace/Active_Map_Manager.h"
#if !defined (__ACE_INLINE__)

View file

@ -4,8 +4,6 @@
/**
* @file Active_Map_Manager.h
*
* $Id: Active_Map_Manager.h 93359 2011-02-11 11:33:12Z mcorino $
*
* @author Irfan Pyarali
*/
//=============================================================================
@ -38,7 +36,7 @@ class ACE_Export ACE_Active_Map_Manager_Key
{
public:
/// Default constructor.
ACE_Active_Map_Manager_Key (void);
ACE_Active_Map_Manager_Key ();
/**
* Constructor given the @a slot_index and @a slot_generation number.
@ -49,19 +47,19 @@ public:
ACE_UINT32 slot_generation);
/// Get the slot_index.
ACE_UINT32 slot_index (void) const;
ACE_UINT32 slot_index () const;
/// Set the slot_index.
void slot_index (ACE_UINT32 i);
/// Get the slot_generation number.
ACE_UINT32 slot_generation (void) const;
ACE_UINT32 slot_generation () 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);
static size_t size ();
/// Recover state of active key from @a data. User must make sure
/// that @a data encoded using the encode() method.
@ -79,10 +77,9 @@ public:
// friends, they are not.
/// Increment the slot_generation number.
void increment_slot_generation_count (void);
void increment_slot_generation_count ();
private:
/**
* @brief Data for the Active Object Map Key.
*

View file

@ -1,13 +1,10 @@
// -*- 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)
ACE_Active_Map_Manager_Key::ACE_Active_Map_Manager_Key ()
{
// If you change ~0, please change ACE_Map_Manager::free_list_id()
// accordingly.
@ -24,13 +21,13 @@ ACE_Active_Map_Manager_Key::ACE_Active_Map_Manager_Key (ACE_UINT32 slot_index,
}
ACE_INLINE ACE_UINT32
ACE_Active_Map_Manager_Key::slot_index (void) const
ACE_Active_Map_Manager_Key::slot_index () const
{
return this->key_data_.slot_index_;
}
ACE_INLINE ACE_UINT32
ACE_Active_Map_Manager_Key::slot_generation (void) const
ACE_Active_Map_Manager_Key::slot_generation () const
{
return this->key_data_.slot_generation_;
}
@ -62,14 +59,14 @@ ACE_Active_Map_Manager_Key::slot_generation (ACE_UINT32 g)
}
ACE_INLINE void
ACE_Active_Map_Manager_Key::increment_slot_generation_count (void)
ACE_Active_Map_Manager_Key::increment_slot_generation_count ()
{
++this->key_data_.slot_generation_;
}
/* static */
ACE_INLINE size_t
ACE_Active_Map_Manager_Key::size (void)
ACE_Active_Map_Manager_Key::size ()
{
return sizeof (ACE_UINT32) + sizeof (ACE_UINT32);
}

View file

@ -1,5 +1,3 @@
// $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
@ -15,7 +13,7 @@
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_ALLOC_HOOK_DEFINE(ACE_Active_Map_Manager)
ACE_ALLOC_HOOK_DEFINE_Tc(ACE_Active_Map_Manager)
ACE_END_VERSIONED_NAMESPACE_DECL

View file

@ -4,8 +4,6 @@
/**
* @file Active_Map_Manager_T.h
*
* $Id: Active_Map_Manager_T.h 84316 2009-02-03 19:46:05Z johnnyw $
*
* @author Irfan Pyarali
*/
//=============================================================================
@ -39,7 +37,6 @@ template <class T>
class ACE_Active_Map_Manager : public ACE_Map_Manager<ACE_Active_Map_Manager_Key, T, ACE_Null_Mutex>
{
public:
// = Traits.
typedef ACE_Active_Map_Manager_Key key_type;
typedef T mapped_type;
@ -52,7 +49,6 @@ public:
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);
@ -62,7 +58,7 @@ public:
/// Close down a Active_Map_Manager and release dynamically
/// allocated resources.
~ACE_Active_Map_Manager (void);
~ACE_Active_Map_Manager ();
/// Initialize a Active_Map_Manager with size @a length.
int open (size_t length = ACE_DEFAULT_MAP_SIZE,
@ -70,7 +66,7 @@ public:
/// Close down a Active_Map_Manager and release dynamically
/// allocated resources.
int close (void);
int close ();
/// Add @a value to the map, and the corresponding key produced by the
/// Active_Map_Manager is returned through @a key.
@ -157,26 +153,26 @@ public:
T *&internal_value);
/// Return the current size of the map.
size_t current_size (void) const;
size_t current_size () const;
/// Return the total size of the map.
size_t total_size (void) const;
size_t total_size () const;
/// Returns a key that cannot be found in the map.
static const ACE_Active_Map_Manager_Key npos (void);
static const ACE_Active_Map_Manager_Key npos ();
/// Dump the state of an object.
void dump (void) const;
void dump () const;
// = STL styled iterator factory functions.
/// Return forward iterator.
ACE_Map_Iterator<ACE_Active_Map_Manager_Key, T, ACE_Null_Mutex> begin (void);
ACE_Map_Iterator<ACE_Active_Map_Manager_Key, T, ACE_Null_Mutex> end (void);
ACE_Map_Iterator<ACE_Active_Map_Manager_Key, T, ACE_Null_Mutex> begin ();
ACE_Map_Iterator<ACE_Active_Map_Manager_Key, T, ACE_Null_Mutex> end ();
/// Return reverse iterator.
ACE_Map_Reverse_Iterator<ACE_Active_Map_Manager_Key, T, ACE_Null_Mutex> rbegin (void);
ACE_Map_Reverse_Iterator<ACE_Active_Map_Manager_Key, T, ACE_Null_Mutex> rend (void);
ACE_Map_Reverse_Iterator<ACE_Active_Map_Manager_Key, T, ACE_Null_Mutex> rbegin ();
ACE_Map_Reverse_Iterator<ACE_Active_Map_Manager_Key, T, ACE_Null_Mutex> rend ();
/// Declare the dynamic allocation hooks.
ACE_ALLOC_HOOK_DECLARE;
@ -187,10 +183,9 @@ protected:
typedef ACE_Map_Manager<ACE_Active_Map_Manager_Key, T, ACE_Null_Mutex> ACE_AMM_BASE;
private:
// = Disallow these operations.
ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Active_Map_Manager<T> &))
ACE_UNIMPLEMENTED_FUNC (ACE_Active_Map_Manager (const ACE_Active_Map_Manager<T> &))
void operator= (const ACE_Active_Map_Manager<T> &) = delete;
ACE_Active_Map_Manager (const ACE_Active_Map_Manager<T> &) = delete;
};
ACE_END_VERSIONED_NAMESPACE_DECL

View file

@ -1,7 +1,4 @@
// -*- C++ -*-
//
// $Id: Active_Map_Manager_T.inl 80826 2008-03-04 14:51:23Z wotte $
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
template <class T> ACE_INLINE int
@ -240,7 +237,7 @@ ACE_Active_Map_Manager<T>::ACE_Active_Map_Manager (size_t size,
}
template <class T> ACE_INLINE
ACE_Active_Map_Manager<T>::~ACE_Active_Map_Manager (void)
ACE_Active_Map_Manager<T>::~ACE_Active_Map_Manager ()
{
}
@ -252,32 +249,32 @@ ACE_Active_Map_Manager<T>::open (size_t length,
}
template <class T> ACE_INLINE int
ACE_Active_Map_Manager<T>::close (void)
ACE_Active_Map_Manager<T>::close ()
{
return ACE_AMM_BASE::close ();
}
template <class T> ACE_INLINE size_t
ACE_Active_Map_Manager<T>::current_size (void) const
ACE_Active_Map_Manager<T>::current_size () const
{
return ACE_AMM_BASE::current_size ();
}
template <class T> ACE_INLINE size_t
ACE_Active_Map_Manager<T>::total_size (void) const
ACE_Active_Map_Manager<T>::total_size () const
{
return ACE_AMM_BASE::total_size ();
}
/* static */
template <class T> ACE_INLINE const ACE_Active_Map_Manager_Key
ACE_Active_Map_Manager<T>::npos (void)
ACE_Active_Map_Manager<T>::npos ()
{
return ACE_Active_Map_Manager_Key (~0, ~0);
}
template <class T> ACE_INLINE void
ACE_Active_Map_Manager<T>::dump (void) const
ACE_Active_Map_Manager<T>::dump () const
{
#if defined (ACE_HAS_DUMP)
ACE_AMM_BASE::dump ();
@ -285,25 +282,25 @@ ACE_Active_Map_Manager<T>::dump (void) const
}
template <class T> ACE_Map_Iterator<ACE_Active_Map_Manager_Key, T, ACE_Null_Mutex>
ACE_Active_Map_Manager<T>::begin (void)
ACE_Active_Map_Manager<T>::begin ()
{
return ACE_AMM_BASE::begin ();
}
template <class T> ACE_INLINE ACE_Map_Iterator<ACE_Active_Map_Manager_Key, T, ACE_Null_Mutex>
ACE_Active_Map_Manager<T>::end (void)
ACE_Active_Map_Manager<T>::end ()
{
return ACE_AMM_BASE::end ();
}
template <class T> ACE_INLINE ACE_Map_Reverse_Iterator<ACE_Active_Map_Manager_Key, T, ACE_Null_Mutex>
ACE_Active_Map_Manager<T>::rbegin (void)
ACE_Active_Map_Manager<T>::rbegin ()
{
return ACE_AMM_BASE::rbegin ();
}
template <class T> ACE_INLINE ACE_Map_Reverse_Iterator<ACE_Active_Map_Manager_Key, T, ACE_Null_Mutex>
ACE_Active_Map_Manager<T>::rend (void)
ACE_Active_Map_Manager<T>::rend ()
{
return ACE_AMM_BASE::rend ();
}

View file

@ -1,13 +1,14 @@
// $Id: Addr.cpp 91286 2010-08-05 09:04:31Z johnnyw $
#include "ace/Addr.h"
#if !defined (__ACE_INLINE__)
#include "ace/Addr.inl"
#endif /* __ACE_INLINE__ */
#include "ace/Log_Msg.h"
#include "ace/Log_Category.h"
#include "ace/os_include/sys/os_socket.h"
#if defined (ACE_HAS_ALLOC_HOOKS)
# include "ace/Malloc_Base.h"
#endif /* ACE_HAS_ALLOC_HOOKS */
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
@ -27,18 +28,18 @@ ACE_Addr::ACE_Addr (int type, int size) :
{
}
ACE_Addr::~ACE_Addr (void)
ACE_Addr::~ACE_Addr ()
{
}
void *
ACE_Addr::get_addr (void) const
ACE_Addr::get_addr () const
{
return 0;
}
void
ACE_Addr::set_addr (void *, int)
ACE_Addr::set_addr (const void *, int)
{
}
@ -52,15 +53,15 @@ ACE_Addr::base_set (int type, int size)
}
void
ACE_Addr::dump (void) const
ACE_Addr::dump () const
{
#if defined (ACE_HAS_DUMP)
ACE_TRACE ("ACE_Addr::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("addr_type_ = %d"), this->addr_type_));
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\naddr_size_ = %d"), this->addr_size_));
ACE_DEBUG ((LM_DEBUG, ACE_END_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 */
}

View file

@ -4,9 +4,7 @@
/**
* @file Addr.h
*
* $Id: Addr.h 81030 2008-03-20 12:43:29Z johnnyw $
*
* @author Douglas C. Schmidt <schmidt@cs.wustl.edu>
* @author Douglas C. Schmidt <d.schmidt@vanderbilt.edu>
*/
//=============================================================================
@ -32,17 +30,16 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL
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);
virtual ~ACE_Addr ();
// = Get/set the size of the address.
/// Return the size of the address.
int get_size (void) const;
int get_size () const;
/// Sets the size of the address.
void set_size (int size);
@ -50,16 +47,16 @@ public:
// = Get/set the type of the address.
/// Get the type of the address.
int get_type (void) const;
int get_type () const;
/// Set the type of the address.
void set_type (int type);
/// Return a pointer to the address.
virtual void *get_addr (void) const;
virtual void *get_addr () const;
/// Set a pointer to the address.
virtual void set_addr (void *, int len);
virtual void set_addr (const void *, int len);
// = Equality/inequality tests
/// Check for address equality.
@ -76,10 +73,10 @@ public:
/// Returns a hash value. This should be overwritten by a subclass
/// that can produce a better hash value.
virtual unsigned long hash (void) const;
virtual unsigned long hash () const;
/// Dump the state of an object.
void dump (void) const;
void dump () const;
/// Declare the dynamic allocation hooks.
ACE_ALLOC_HOOK_DECLARE;

View file

@ -1,7 +1,4 @@
// -*- C++ -*-
//
// $Id: Addr.inl 87295 2009-11-02 14:45:59Z johnnyw $
// Return the address of the address.
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
@ -22,7 +19,7 @@ ACE_Addr::operator != (const ACE_Addr &sap) const
/// Return the size of the address.
ACE_INLINE int
ACE_Addr::get_size (void) const
ACE_Addr::get_size () const
{
return this->addr_size_;
}
@ -36,7 +33,7 @@ ACE_Addr::set_size (int size)
/// Return the type of the address.
ACE_INLINE int
ACE_Addr::get_type (void) const
ACE_Addr::get_type () const
{
return this->addr_type_;
}
@ -49,7 +46,7 @@ ACE_Addr::set_type (int type)
}
ACE_INLINE unsigned long
ACE_Addr::hash (void) const
ACE_Addr::hash () const
{
return 0;
}

View file

@ -1,5 +1,3 @@
// $Id: Arg_Shifter.cpp 91286 2010-08-05 09:04:31Z johnnyw $
#ifndef ACE_ARG_SHIFTER_T_CPP
#define ACE_ARG_SHIFTER_T_CPP
@ -8,6 +6,9 @@
#include "ace/OS_NS_strings.h"
#include "ace/OS_Errno.h"
#include "ace/OS_Memory.h"
#if defined (ACE_HAS_ALLOC_HOOKS)
# include "ace/Malloc_Base.h"
#endif /* ACE_HAS_ALLOC_HOOKS */
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
@ -43,13 +44,17 @@ ACE_Arg_Shifter_T<CHAR_TYPE>::ACE_Arg_Shifter_T (int& argc,
template <typename CHAR_TYPE>
void
ACE_Arg_Shifter_T<CHAR_TYPE>::init (void)
ACE_Arg_Shifter_T<CHAR_TYPE>::init ()
{
// If not provided with one, allocate a temporary array.
if (this->temp_ == 0)
#if defined (ACE_HAS_ALLOC_HOOKS)
this->temp_ = reinterpret_cast<const CHAR_TYPE **>
(ACE_Allocator::instance ()->malloc (sizeof (CHAR_TYPE*) * this->total_size_));
#else
ACE_NEW (this->temp_,
const CHAR_TYPE *[this->total_size_]);
#endif /* ACE_HAS_ALLOC_HOOKS */
if (this->temp_ != 0)
{
// Fill the temporary array.
@ -69,15 +74,20 @@ ACE_Arg_Shifter_T<CHAR_TYPE>::init (void)
}
template <typename CHAR_TYPE>
ACE_Arg_Shifter_T<CHAR_TYPE>::~ACE_Arg_Shifter_T (void)
ACE_Arg_Shifter_T<CHAR_TYPE>::~ACE_Arg_Shifter_T ()
{
// Delete the temporary vector.
#if defined (ACE_HAS_ALLOC_HOOKS)
if (this->temp_)
ACE_Allocator::instance ()->free (this->temp_);
#else
delete [] temp_;
#endif /* ACE_HAS_ALLOC_HOOKS */
}
template <typename CHAR_TYPE>
const CHAR_TYPE *
ACE_Arg_Shifter_T<CHAR_TYPE>::get_current (void) const
ACE_Arg_Shifter_T<CHAR_TYPE>::get_current () const
{
const CHAR_TYPE * retval = 0;
@ -120,33 +130,20 @@ template <typename CHAR_TYPE>
int
ACE_Arg_Shifter_T<CHAR_TYPE>::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);
if (!this->is_anything_left ())
return -1;
// 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<int> (remaining);
}
}
}
// failure
return -1;
const size_t flag_length = ACE_OS::strlen (flag);
const CHAR_TYPE *arg = this->temp_[this->current_index_];
if (ACE_OS::strncasecmp (arg, flag, flag_length) != 0)
return -1;
const size_t arg_length = ACE_OS::strlen (arg);
size_t remaining = flag_length;
while (remaining < arg_length && arg[remaining] == CHAR_TYPE (' '))
++remaining;
return (arg_length == flag_length) ? 0 : static_cast<int> (remaining);
}
template <typename CHAR_TYPE>
@ -193,14 +190,14 @@ ACE_Arg_Shifter_T<CHAR_TYPE>::ignore_arg (int number)
template <typename CHAR_TYPE>
int
ACE_Arg_Shifter_T<CHAR_TYPE>::is_anything_left (void) const
ACE_Arg_Shifter_T<CHAR_TYPE>::is_anything_left () const
{
return this->total_size_ - this->current_index_;
}
template <typename CHAR_TYPE>
int
ACE_Arg_Shifter_T<CHAR_TYPE>::is_option_next (void) const
ACE_Arg_Shifter_T<CHAR_TYPE>::is_option_next () const
{
return this->is_anything_left () &&
this->temp_[this->current_index_][0] == '-';
@ -208,7 +205,7 @@ ACE_Arg_Shifter_T<CHAR_TYPE>::is_option_next (void) const
template <typename CHAR_TYPE>
int
ACE_Arg_Shifter_T<CHAR_TYPE>::is_parameter_next (void) const
ACE_Arg_Shifter_T<CHAR_TYPE>::is_parameter_next () const
{
return this->is_anything_left ()
&& this->temp_[this->current_index_][0] != '-';
@ -216,7 +213,7 @@ ACE_Arg_Shifter_T<CHAR_TYPE>::is_parameter_next (void) const
template <typename CHAR_TYPE>
int
ACE_Arg_Shifter_T<CHAR_TYPE>::num_ignored_args (void) const
ACE_Arg_Shifter_T<CHAR_TYPE>::num_ignored_args () const
{
return this->front_;
}

View file

@ -4,8 +4,6 @@
/**
* @file Arg_Shifter.h
*
* $Id: Arg_Shifter.h 95972 2012-07-26 10:20:42Z johnnyw $
*
* @author Seth Widoff
*/
//=============================================================================
@ -55,7 +53,6 @@ template <typename CHAR_TYPE>
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
@ -77,21 +74,21 @@ public:
* (the default) the object will allocate and free the temporary
* vector transparently.
*/
ACE_Arg_Shifter_T (int& argc,
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,
ACE_Arg_Shifter_T (int &argc,
CHAR_TYPE **argv,
CHAR_TYPE **temp = 0);
/// Destructor.
~ACE_Arg_Shifter_T (void);
~ACE_Arg_Shifter_T ();
/// Get the current head of the vector.
const CHAR_TYPE *get_current (void) const;
const CHAR_TYPE *get_current () const;
/**
* If the @a flag matches the current_arg of arg shifter
@ -100,12 +97,12 @@ public:
*
* Safe to call without checking that a current arg exists
*
* In the following examples, a pointer to the char* "value" is ret
* In the following examples, a pointer to the char* "value" is returned
*
* eg: main -foobar value, main -FooBar value
* main -FOOBARvalue
*
* all of the above will all match the @a flag == -FooBar
* all of the above will match the @a flag == -FooBar
* and will return a char* to "value"
*
* main -foobar 4 would succeed and return a char* to "4"
@ -125,7 +122,7 @@ public:
* 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);
const CHAR_TYPE *get_the_parameter (const CHAR_TYPE *flag);
/**
* Check if the current argument matches (case insensitive) @a flag
@ -136,7 +133,7 @@ public:
* 0 is returned.
*
* ie: when current_arg = "-foobar" or "-FOOBAR" or "-fooBAR"
* this->cur_arg_strncasecmp ("-FooBar);
* this->cur_arg_strncasecmp ("-FooBar");
* will return 0
*
* ------------------------------------------------------------
@ -144,11 +141,19 @@ public:
* 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
* after any initial spaces (see below).
*
* ie: when current_arg = "-foobar98023"
* this->cur_arg_strncasecmp ("-FooBar);
* this->cur_arg_strncasecmp ("-FooBar");
* will return 7
*
* Spaces separating the flag from its value (that are still part
* of the same argv element) are counted as part of the return value
*
* ie: when current_arg = "-foobar 98023"
* this->cur_arg_strncasecmp ("-FooBar");
* will return 8
*
* Notice: this number will always be > 0
*
* ------------------------------------------------------------
@ -167,31 +172,31 @@ public:
int ignore_arg (int number = 1);
/// Returns the number of args left to see in the vector.
int is_anything_left (void) const;
int is_anything_left () const;
/// Returns 1 if there's a next item in the vector and it begins with
/// '-'.
int is_option_next (void) const;
int is_option_next () const;
/// Returns 1 if there's a next item in the vector and it doesn't
/// begin with '-'.
int is_parameter_next (void) const;
int is_parameter_next () const;
/// Returns the number of irrelevant args seen.
int num_ignored_args (void) const;
int num_ignored_args () const;
private:
/// Copy Constructor should not be used.
ACE_UNIMPLEMENTED_FUNC (ACE_Arg_Shifter_T (const ACE_Arg_Shifter_T<CHAR_TYPE>&))
ACE_Arg_Shifter_T (const ACE_Arg_Shifter_T<CHAR_TYPE> &) = delete;
/// Assignment '=' operator should not be used.
ACE_UNIMPLEMENTED_FUNC (ACE_Arg_Shifter_T operator= (const ACE_Arg_Shifter_T<CHAR_TYPE>&))
ACE_Arg_Shifter_T operator= (const ACE_Arg_Shifter_T<CHAR_TYPE> &) = delete;
/// Refactor the constructor logic.
void init (void);
void init ();
/// The size of the argument vector.
int& argc_;
int &argc_;
/// The size of argv_.
int total_size_;

View file

@ -1,5 +1,3 @@
// $Id: Argv_Type_Converter.cpp 91286 2010-08-05 09:04:31Z johnnyw $
#include "ace/Argv_Type_Converter.h"
#if !defined (__ACE_INLINE__)
@ -49,7 +47,7 @@ ACE_Argv_Type_Converter::ACE_Argv_Type_Converter (int &argc, char **argv)
}
#endif // ACE_USES_WCHAR
ACE_Argv_Type_Converter::~ACE_Argv_Type_Converter (void)
ACE_Argv_Type_Converter::~ACE_Argv_Type_Converter ()
{
#if defined (ACE_USES_WCHAR)
// selectively delete the 'copy' of argv

View file

@ -4,8 +4,6 @@
/**
* @file Argv_Type_Converter.h
*
* $Id: Argv_Type_Converter.h 93359 2011-02-11 11:33:12Z mcorino $
*
* @author Si Mong Park <spark@ociweb.com>
*/
//=============================================================================
@ -39,26 +37,24 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL
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);
~ACE_Argv_Type_Converter ();
/// Returns the pointer of converted command line.
ACE_TCHAR** get_TCHAR_argv (void);
ACE_TCHAR** get_TCHAR_argv ();
/// Returns the pointer of ASCII (char) command line.
char** get_ASCII_argv (void);
char** get_ASCII_argv ();
/// Returns the number of sub parameters (argc).
int& get_argc (void);
int& get_argc ();
private:
/// Copy Constructor should not be used.
ACE_Argv_Type_Converter (const ACE_Argv_Type_Converter&);

View file

@ -1,11 +1,8 @@
// -*- C++ -*-
//
// $Id: Argv_Type_Converter.inl 80826 2008-03-04 14:51:23Z wotte $
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_INLINE ACE_TCHAR**
ACE_Argv_Type_Converter::get_TCHAR_argv (void)
ACE_Argv_Type_Converter::get_TCHAR_argv ()
{
#if defined (ACE_USES_WCHAR)
if (this->char_passed_)
@ -21,7 +18,7 @@ ACE_Argv_Type_Converter::get_TCHAR_argv (void)
}
ACE_INLINE char**
ACE_Argv_Type_Converter::get_ASCII_argv (void)
ACE_Argv_Type_Converter::get_ASCII_argv ()
{
#if defined (ACE_USES_WCHAR)
if (this->wchar_passed_)
@ -36,7 +33,7 @@ ACE_Argv_Type_Converter::get_ASCII_argv (void)
}
ACE_INLINE int&
ACE_Argv_Type_Converter::get_argc (void)
ACE_Argv_Type_Converter::get_argc ()
{
return this->saved_argc_;
}

View file

@ -1,5 +1,3 @@
// $Id: Array_Base.cpp 80826 2008-03-04 14:51:23Z wotte $
#ifndef ACE_ARRAY_BASE_CPP
#define ACE_ARRAY_BASE_CPP

View file

@ -4,9 +4,7 @@
/**
* @file Array_Base.h
*
* $Id: Array_Base.h 93359 2011-02-11 11:33:12Z mcorino $
*
* @author Douglas C. Schmidt <schmidt@cs.wustl.edu>
* @author Douglas C. Schmidt <d.schmidt@vanderbilt.edu>
*/
//=============================================================================
@ -43,7 +41,6 @@ template<class T>
class ACE_Array_Base
{
public:
// Old/ACE-style traits.
typedef T TYPE;
typedef ACE_Array_Iterator<T> ITERATOR;
@ -61,8 +58,6 @@ public:
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);
@ -90,7 +85,7 @@ public:
void operator= (ACE_Array_Base<T> const & s);
/// Clean up the array (e.g., delete dynamically allocated memory).
~ACE_Array_Base (void);
~ACE_Array_Base ();
// = Set/get methods.
@ -115,7 +110,7 @@ public:
int get (T & item, size_type slot) const;
/// Returns the <cur_size_> of the array.
size_type size (void) const;
size_type size () const;
/**
* Changes the size of the array to match @a new_size.
@ -125,7 +120,7 @@ public:
int size (size_type new_size);
/// Returns the <max_size_> of the array.
size_type max_size (void) const;
size_type max_size () const;
/**
* Changes the size of the array to match @a new_size.
@ -141,10 +136,10 @@ public:
* Forward iterator accessors.
*/
//@{
iterator begin (void);
iterator end (void);
const_iterator begin (void) const;
const_iterator end (void) const;
iterator begin ();
iterator end ();
const_iterator begin () const;
const_iterator end () const;
//@}
/**
@ -153,10 +148,10 @@ public:
* Reverse iterator accessors.
*/
//@{
reverse_iterator rbegin (void);
reverse_iterator rend (void);
const_reverse_iterator rbegin (void) const;
const_reverse_iterator rend (void) const;
reverse_iterator rbegin ();
reverse_iterator rend ();
const_reverse_iterator rbegin () const;
const_reverse_iterator rend () const;
//@}
/// Swap the contents of this array with the given @a array in
@ -207,7 +202,6 @@ template <class T>
class ACE_Array_Iterator
{
public:
// = Initialization method.
ACE_Array_Iterator (ACE_Array_Base<T> &);
// = Iteration methods.
@ -218,13 +212,13 @@ public:
/// 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);
int advance ();
/// Returns 1 when all items have been seen, else 0.
int done (void) const;
int done () const;
/// Dump the state of an object.
void dump (void) const;
void dump () const;
/// Declare the dynamic allocation hooks.
ACE_ALLOC_HOOK_DECLARE;

View file

@ -1,12 +1,9 @@
// -*- C++ -*-
//
// $Id: Array_Base.inl 80826 2008-03-04 14:51:23Z wotte $
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
// Clean up the array (e.g., delete dynamically allocated memory).
template <class T> ACE_INLINE
ACE_Array_Base<T>::~ACE_Array_Base (void)
ACE_Array_Base<T>::~ACE_Array_Base ()
{
ACE_DES_ARRAY_FREE (this->array_,
this->max_size_,
@ -16,68 +13,68 @@ ACE_Array_Base<T>::~ACE_Array_Base (void)
template <class T>
ACE_INLINE typename ACE_Array_Base<T>::iterator
ACE_Array_Base<T>::begin (void)
ACE_Array_Base<T>::begin ()
{
return this->array_;
}
template <class T>
ACE_INLINE typename ACE_Array_Base<T>::iterator
ACE_Array_Base<T>::end (void)
ACE_Array_Base<T>::end ()
{
return this->array_ + this->cur_size_;
}
template <class T>
ACE_INLINE typename ACE_Array_Base<T>::const_iterator
ACE_Array_Base<T>::begin (void) const
ACE_Array_Base<T>::begin () const
{
return this->array_;
}
template <class T>
ACE_INLINE typename ACE_Array_Base<T>::const_iterator
ACE_Array_Base<T>::end (void) const
ACE_Array_Base<T>::end () const
{
return this->array_ + this->cur_size_;
}
template <class T>
ACE_INLINE typename ACE_Array_Base<T>::reverse_iterator
ACE_Array_Base<T>::rbegin (void)
ACE_Array_Base<T>::rbegin ()
{
return reverse_iterator (this->end ());
}
template <class T>
ACE_INLINE typename ACE_Array_Base<T>::reverse_iterator
ACE_Array_Base<T>::rend (void)
ACE_Array_Base<T>::rend ()
{
return reverse_iterator (this->begin ());
}
template <class T>
ACE_INLINE typename ACE_Array_Base<T>::const_reverse_iterator
ACE_Array_Base<T>::rbegin (void) const
ACE_Array_Base<T>::rbegin () const
{
return const_reverse_iterator (this->end ());
}
template <class T>
ACE_INLINE typename ACE_Array_Base<T>::const_reverse_iterator
ACE_Array_Base<T>::rend (void) const
ACE_Array_Base<T>::rend () const
{
return const_reverse_iterator (this->begin ());
}
template <class T> ACE_INLINE typename ACE_Array_Base<T>::size_type
ACE_Array_Base<T>::size (void) const
ACE_Array_Base<T>::size () const
{
return this->cur_size_;
}
template <class T> ACE_INLINE typename ACE_Array_Base<T>::size_type
ACE_Array_Base<T>::max_size (void) const
ACE_Array_Base<T>::max_size () const
{
return this->max_size_;
}
@ -103,7 +100,7 @@ ACE_Array_Base<T>::operator[] (typename ACE_Array_Base<T>::size_type index) cons
// ****************************************************************
template <class T> ACE_INLINE void
ACE_Array_Iterator<T>::dump (void) const
ACE_Array_Iterator<T>::dump () const
{
#if defined (ACE_HAS_DUMP)
// ACE_TRACE ("ACE_Array_Iterator<T>::dump");
@ -119,7 +116,7 @@ ACE_Array_Iterator<T>::ACE_Array_Iterator (ACE_Array_Base<T> &a)
}
template <class T> ACE_INLINE int
ACE_Array_Iterator<T>::advance (void)
ACE_Array_Iterator<T>::advance ()
{
// ACE_TRACE ("ACE_Array_Iterator<T>::advance");
@ -136,7 +133,7 @@ ACE_Array_Iterator<T>::advance (void)
}
template <class T> ACE_INLINE int
ACE_Array_Iterator<T>::done (void) const
ACE_Array_Iterator<T>::done () const
{
ACE_TRACE ("ACE_Array_Iterator<T>::done");

View file

@ -1,5 +1,3 @@
// $Id: Array_Map.cpp 92386 2010-10-28 07:44:37Z johnnyw $
#ifndef ACE_ARRAY_MAP_CPP
#define ACE_ARRAY_MAP_CPP
@ -15,65 +13,64 @@
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
template<typename Key, typename Value, class EqualTo>
template<typename Key, typename Value, class EqualTo, class Alloc>
template<typename InputIterator>
ACE_Array_Map<Key, Value, EqualTo>::ACE_Array_Map (InputIterator f,
InputIterator l)
ACE_Array_Map<Key, Value, EqualTo, Alloc>::ACE_Array_Map (InputIterator f,
InputIterator l)
: size_ (l - f)
, capacity_ (size_)
, nodes_ (size_ == 0 ? 0 : new value_type[size_])
, nodes_ (size_ == 0 ? 0 : this->alloc_.allocate (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;
(void) std::uninitialized_copy (f,
l,
ACE_make_checked_array_iterator (this->begin (),
this->size_));
}
template<typename Key, typename Value, class EqualTo>
ACE_Array_Map<Key, Value, EqualTo>::ACE_Array_Map (
ACE_Array_Map<Key, Value, EqualTo> const & map)
template<typename Key, typename Value, class EqualTo, class Alloc>
ACE_Array_Map<Key, Value, EqualTo, Alloc>::ACE_Array_Map (
ACE_Array_Map<Key, Value, EqualTo, Alloc> const & map)
: size_ (map.size_)
, capacity_ (map.size_)
, nodes_ (size_ == 0 ? 0 : new value_type[size_])
, nodes_ (size_ == 0 ? 0 : this->alloc_.allocate (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;
(void) std::uninitialized_copy (map.begin (),
map.end (),
ACE_make_checked_array_iterator (this->begin (),
this->size_));
}
template<typename Key, typename Value, class EqualTo>
ACE_Array_Map<Key, Value, EqualTo>::~ACE_Array_Map (void)
template<typename Key, typename Value, class EqualTo, class Alloc>
ACE_Array_Map<Key, Value, EqualTo, Alloc>::~ACE_Array_Map ()
{
delete[] this->nodes_;
for (size_t idx = 0; idx != capacity_; ++idx)
{
#if defined (ACE_HAS_BCC32)
using std::pair;
(nodes_ + idx)->~pair<key_type, mapped_type>();
#else
(nodes_ + idx)->~value_type();
#endif
}
alloc_.deallocate(this->nodes_, capacity_);
}
template<typename Key, typename Value, class EqualTo>
template<typename Key, typename Value, class EqualTo, class Alloc>
void
ACE_Array_Map<Key, Value, EqualTo>::swap (
ACE_Array_Map<Key, Value, EqualTo> & map)
ACE_Array_Map<Key, Value, EqualTo, Alloc>::swap (
ACE_Array_Map<Key, Value, EqualTo, Alloc> & map)
{
std::swap (this->size_, map.size_);
std::swap (this->capacity_, map.capacity_);
std::swap (this->nodes_, map.nodes_);
}
template<typename Key, typename Value, class EqualTo>
std::pair<typename ACE_Array_Map<Key, Value, EqualTo>::iterator, bool>
ACE_Array_Map<Key, Value, EqualTo>::insert (
typename ACE_Array_Map<Key, Value, EqualTo>::value_type const & x)
template<typename Key, typename Value, class EqualTo, class Alloc>
std::pair<typename ACE_Array_Map<Key, Value, EqualTo, Alloc>::iterator, bool>
ACE_Array_Map<Key, Value, EqualTo, Alloc>::insert (
typename ACE_Array_Map<Key, Value, EqualTo, Alloc>::value_type const & x)
{
// Linear insertion due to linear duplicate key search.
@ -98,10 +95,10 @@ ACE_Array_Map<Key, Value, EqualTo>::insert (
return std::make_pair (i, inserted);
}
template<typename Key, typename Value, class EqualTo>
template<typename Key, typename Value, class EqualTo, class Alloc>
template<typename InputIterator>
void
ACE_Array_Map<Key, Value, EqualTo>::insert (InputIterator f, InputIterator l)
ACE_Array_Map<Key, Value, EqualTo, Alloc>::insert (InputIterator f, InputIterator l)
{
this->grow (l - f); // Preallocate storage.
@ -111,10 +108,10 @@ ACE_Array_Map<Key, Value, EqualTo>::insert (InputIterator f, InputIterator l)
}
}
template<typename Key, typename Value, class EqualTo>
template<typename Key, typename Value, class EqualTo, class Alloc>
void
ACE_Array_Map<Key, Value, EqualTo>::erase (
typename ACE_Array_Map<Key, Value, EqualTo>::iterator pos)
ACE_Array_Map<Key, Value, EqualTo, Alloc>::erase (
typename ACE_Array_Map<Key, Value, EqualTo, Alloc>::iterator pos)
{
iterator const first = this->begin ();
iterator const last = this->end ();
@ -138,10 +135,10 @@ ACE_Array_Map<Key, Value, EqualTo>::erase (
}
}
template<typename Key, typename Value, class EqualTo>
typename ACE_Array_Map<Key, Value, EqualTo>::size_type
ACE_Array_Map<Key, Value, EqualTo>::erase (
typename ACE_Array_Map<Key, Value, EqualTo>::key_type const & k)
template<typename Key, typename Value, class EqualTo, class Alloc>
typename ACE_Array_Map<Key, Value, EqualTo, Alloc>::size_type
ACE_Array_Map<Key, Value, EqualTo, Alloc>::erase (
typename ACE_Array_Map<Key, Value, EqualTo, Alloc>::key_type const & k)
{
iterator pos = this->find (k);
@ -152,28 +149,28 @@ ACE_Array_Map<Key, Value, EqualTo>::erase (
return old_size - this->size_;
}
template<typename Key, typename Value, class EqualTo>
template<typename Key, typename Value, class EqualTo, class Alloc>
void
ACE_Array_Map<Key, Value, EqualTo>::erase (
typename ACE_Array_Map<Key, Value, EqualTo>::iterator first,
typename ACE_Array_Map<Key, Value, EqualTo>::iterator last)
ACE_Array_Map<Key, Value, EqualTo, Alloc>::erase (
typename ACE_Array_Map<Key, Value, EqualTo, Alloc>::iterator first,
typename ACE_Array_Map<Key, Value, EqualTo, Alloc>::iterator last)
{
if (this->begin () <= first && first < last && last < this->end ())
for (iterator i = first; i != last; ++i)
this->erase (i);
}
template<typename Key, typename Value, class EqualTo>
template<typename Key, typename Value, class EqualTo, class Alloc>
void
ACE_Array_Map<Key, Value, EqualTo>::clear (void)
ACE_Array_Map<Key, Value, EqualTo, Alloc>::clear ()
{
this->size_ = 0; // No need to deallocate array nor destroy elements.
}
template<typename Key, typename Value, class EqualTo>
typename ACE_Array_Map<Key, Value, EqualTo>::iterator
ACE_Array_Map<Key, Value, EqualTo>::find (
typename ACE_Array_Map<Key, Value, EqualTo>::key_type const & k)
template<typename Key, typename Value, class EqualTo, class Alloc>
typename ACE_Array_Map<Key, Value, EqualTo, Alloc>::iterator
ACE_Array_Map<Key, Value, EqualTo, Alloc>::find (
typename ACE_Array_Map<Key, Value, EqualTo, Alloc>::key_type const & k)
{
iterator const the_end = this->end ();
@ -186,10 +183,10 @@ ACE_Array_Map<Key, Value, EqualTo>::find (
return this->end ();
}
template<typename Key, typename Value, class EqualTo>
typename ACE_Array_Map<Key, Value, EqualTo>::const_iterator
ACE_Array_Map<Key, Value, EqualTo>::find (
typename ACE_Array_Map<Key, Value, EqualTo>::key_type const & k) const
template<typename Key, typename Value, class EqualTo, class Alloc>
typename ACE_Array_Map<Key, Value, EqualTo, Alloc>::const_iterator
ACE_Array_Map<Key, Value, EqualTo, Alloc>::find (
typename ACE_Array_Map<Key, Value, EqualTo, Alloc>::key_type const & k) const
{
const_iterator const the_end = this->end ();
@ -202,10 +199,10 @@ ACE_Array_Map<Key, Value, EqualTo>::find (
return this->end ();
}
template<typename Key, typename Value, class EqualTo>
template<typename Key, typename Value, class EqualTo, class Alloc>
void
ACE_Array_Map<Key, Value, EqualTo>::grow (
typename ACE_Array_Map<Key, Value, EqualTo>::size_type s)
ACE_Array_Map<Key, Value, EqualTo, Alloc>::grow (
typename ACE_Array_Map<Key, Value, EqualTo, Alloc>::size_type s)
{
if (this->size () + s > this->capacity_)
{
@ -214,7 +211,7 @@ ACE_Array_Map<Key, Value, EqualTo>::grow (
// Strongly exception safe.
ACE_Array_Map<Key, Value, EqualTo> temp (this->size () + s);
ACE_Array_Map<Key, Value, EqualTo, Alloc> temp (this->size () + s);
std::copy (this->begin (),
this->end (),
@ -233,10 +230,10 @@ ACE_Array_Map<Key, Value, EqualTo>::grow (
// ---------------------------------------------------------------
template <typename Key, typename Value, class EqualTo>
template <typename Key, typename Value, class EqualTo, class Alloc>
bool
operator== (ACE_Array_Map<Key, Value, EqualTo> const & lhs,
ACE_Array_Map<Key, Value, EqualTo> const & rhs)
operator== (ACE_Array_Map<Key, Value, EqualTo, Alloc> const & lhs,
ACE_Array_Map<Key, Value, EqualTo, Alloc> const & rhs)
{
// Do not include Array_Map capacity in comparison. It isn't useful
// in this case.
@ -248,10 +245,10 @@ operator== (ACE_Array_Map<Key, Value, EqualTo> const & lhs,
rhs.size ())));
}
template <typename Key, typename Value, class EqualTo>
template <typename Key, typename Value, class EqualTo, class Alloc>
bool
operator< (ACE_Array_Map<Key, Value, EqualTo> const & lhs,
ACE_Array_Map<Key, Value, EqualTo> const & rhs)
operator< (ACE_Array_Map<Key, Value, EqualTo, Alloc> const & lhs,
ACE_Array_Map<Key, Value, EqualTo, Alloc> const & rhs)
{
return std::lexicographical_compare (lhs.begin (), lhs.end (),
rhs.begin (), rhs.end ());

View file

@ -4,8 +4,6 @@
/**
* @file Array_Map.h
*
* $Id: Array_Map.h 92386 2010-10-28 07:44:37Z johnnyw $
*
* Light weight array-based map with fast iteration but linear
* (i.e. O(n)) search times. STL-style interface is exposed.
*
@ -22,7 +20,7 @@
#include /**/ "ace/pre.h"
#include "ace/config-lite.h"
#include /**/ "ace/config-lite.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
@ -31,9 +29,18 @@
#include <utility>
#include <iterator>
#include <functional>
#include <memory>
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
#if defined __SUNPRO_CC && !defined _RWSTD_ALLOCATOR
# define ACE_ARRAY_MAP_DEFAULT_ALLOCATOR(K, V) std::allocator_interface< \
std::allocator<void>, \
std::pair<K, V> >
#else
# define ACE_ARRAY_MAP_DEFAULT_ALLOCATOR(K, V) std::allocator<std::pair<K, V> >
#endif
/**
* @class ACE_Array_Map
*
@ -84,24 +91,25 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL
* -# Copy constructor
* -# operator=
*/
template<typename Key, typename Value, class EqualTo = std::equal_to<Key> >
template<typename Key, typename Value, class EqualTo = std::equal_to<Key>,
class Alloc = ACE_ARRAY_MAP_DEFAULT_ALLOCATOR (Key, Value) >
class ACE_Array_Map
{
public:
// STL-style typedefs/traits.
typedef Key key_type;
typedef Value data_type;
typedef std::pair<key_type, data_type> 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;
typedef Key key_type;
typedef Value mapped_type;
typedef Value data_type;
typedef std::pair<key_type, mapped_type> value_type;
typedef Alloc allocator_type;
typedef value_type & reference;
typedef value_type const & const_reference;
typedef value_type * pointer;
typedef value_type const * const_pointer;
typedef value_type * iterator;
typedef value_type const * const_iterator;
typedef ptrdiff_t difference_type;
typedef size_t size_type;
ACE_DECLARE_STL_REVERSE_ITERATORS
/// Default Constructor.
@ -117,7 +125,7 @@ public:
ACE_Array_Map & operator= (ACE_Array_Map const & map);
/// Destructor.
~ACE_Array_Map (void);
~ACE_Array_Map ();
/**
* @name Forward Iterator Accessors
@ -125,10 +133,10 @@ public:
* Forward iterator accessors.
*/
//@{
iterator begin (void);
iterator end (void);
const_iterator begin (void) const;
const_iterator end (void) const;
iterator begin ();
iterator end ();
const_iterator begin () const;
const_iterator end () const;
//@}
/**
@ -137,30 +145,30 @@ public:
* Reverse iterator accessors.
*/
//@{
reverse_iterator rbegin (void);
reverse_iterator rend (void);
const_reverse_iterator rbegin (void) const;
const_reverse_iterator rend (void) const;
reverse_iterator rbegin ();
reverse_iterator rend ();
const_reverse_iterator rbegin () const;
const_reverse_iterator rend () const;
//@}
/// Return current size of map.
/**
* @return The number of elements in the map.
*/
size_type size (void) const;
size_type size () const;
/// Maximum number of elements the map can hold.
size_type max_size (void) const;
size_type max_size () const;
/// Return @c true if the map is empty, else @c false.
bool is_empty (void) const; // ACE style
bool is_empty () 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
bool empty () const; // STL style
/// Swap the contents of this map with the given @a map in an
/// exception-safe manner.
@ -200,7 +208,7 @@ public:
/**
* @note This a constant time (O(1)) operation.
*/
void clear (void);
void clear ();
/**
* @name Search Operations
@ -235,14 +243,16 @@ public:
* @par
* map["Foo"] = 12;
*/
data_type & operator[] (key_type const & k);
mapped_type & operator[] (key_type const & k);
allocator_type get_allocator() const { return alloc_; }
private:
/// Increase size of underlying buffer by @a s.
void grow (size_type s);
private:
/// The allocator.
allocator_type alloc_;
/// Number of elements in the map.
size_type size_;
@ -255,20 +265,19 @@ private:
/// Underlying array containing keys and data.
value_type * nodes_;
};
// --------------------------------------------------------------
/// @c ACE_Array_Map equality operator.
template <typename Key, typename Value, class EqualTo>
bool operator== (ACE_Array_Map<Key, Value, EqualTo> const & lhs,
ACE_Array_Map<Key, Value, EqualTo> const & rhs);
template <typename Key, typename Value, class EqualTo, class Alloc>
bool operator== (ACE_Array_Map<Key, Value, EqualTo, Alloc> const & lhs,
ACE_Array_Map<Key, Value, EqualTo, Alloc> const & rhs);
/// @c ACE_Array_Map lexicographical comparison operator.
template <typename Key, typename Value, class EqualTo>
bool operator< (ACE_Array_Map<Key, Value, EqualTo> const & lhs,
ACE_Array_Map<Key, Value, EqualTo> const & rhs);
template <typename Key, typename Value, class EqualTo, class Alloc>
bool operator< (ACE_Array_Map<Key, Value, EqualTo, Alloc> const & lhs,
ACE_Array_Map<Key, Value, EqualTo, Alloc> const & rhs);
// --------------------------------------------------------------

View file

@ -1,132 +1,130 @@
// -*- C++ -*-
//
// $Id: Array_Map.inl 80826 2008-03-04 14:51:23Z wotte $
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
template<typename Key, typename Value, class EqualTo>
template<typename Key, typename Value, class EqualTo, class Alloc>
ACE_INLINE
ACE_Array_Map<Key, Value, EqualTo>::ACE_Array_Map (
typename ACE_Array_Map<Key, Value, EqualTo>::size_type s)
ACE_Array_Map<Key, Value, EqualTo, Alloc>::ACE_Array_Map (
typename ACE_Array_Map<Key, Value, EqualTo, Alloc>::size_type s)
: size_ (0)
, capacity_ (s)
, nodes_ (s == 0 ? 0 : new value_type[s])
, nodes_ (s == 0 ? 0 : this->alloc_.allocate (s))
{
std::uninitialized_fill_n (this->nodes_, s, value_type ());
}
template<typename Key, typename Value, class EqualTo>
ACE_INLINE ACE_Array_Map<Key, Value, EqualTo> &
ACE_Array_Map<Key, Value, EqualTo>::operator= (
ACE_Array_Map<Key, Value, EqualTo> const & map)
template<typename Key, typename Value, class EqualTo, class Alloc>
ACE_INLINE ACE_Array_Map<Key, Value, EqualTo, Alloc> &
ACE_Array_Map<Key, Value, EqualTo, Alloc>::operator= (
ACE_Array_Map<Key, Value, EqualTo, Alloc> const & map)
{
// Strongly exception-safe assignment.
ACE_Array_Map<Key, Value, EqualTo> temp (map);
ACE_Array_Map<Key, Value, EqualTo, Alloc> temp (map);
this->swap (temp);
return *this;
}
template<typename Key, typename Value, class EqualTo>
ACE_INLINE typename ACE_Array_Map<Key, Value, EqualTo>::iterator
ACE_Array_Map<Key, Value, EqualTo>::begin (void)
template<typename Key, typename Value, class EqualTo, class Alloc>
ACE_INLINE typename ACE_Array_Map<Key, Value, EqualTo, Alloc>::iterator
ACE_Array_Map<Key, Value, EqualTo, Alloc>::begin ()
{
return this->nodes_;
}
template<typename Key, typename Value, class EqualTo>
ACE_INLINE typename ACE_Array_Map<Key, Value, EqualTo>::iterator
ACE_Array_Map<Key, Value, EqualTo>::end (void)
template<typename Key, typename Value, class EqualTo, class Alloc>
ACE_INLINE typename ACE_Array_Map<Key, Value, EqualTo, Alloc>::iterator
ACE_Array_Map<Key, Value, EqualTo, Alloc>::end ()
{
return this->nodes_ + this->size_;
}
template<typename Key, typename Value, class EqualTo>
ACE_INLINE typename ACE_Array_Map<Key, Value, EqualTo>::const_iterator
ACE_Array_Map<Key, Value, EqualTo>::begin (void) const
template<typename Key, typename Value, class EqualTo, class Alloc>
ACE_INLINE typename ACE_Array_Map<Key, Value, EqualTo, Alloc>::const_iterator
ACE_Array_Map<Key, Value, EqualTo, Alloc>::begin () const
{
return this->nodes_;
}
template<typename Key, typename Value, class EqualTo>
ACE_INLINE typename ACE_Array_Map<Key, Value, EqualTo>::const_iterator
ACE_Array_Map<Key, Value, EqualTo>::end (void) const
template<typename Key, typename Value, class EqualTo, class Alloc>
ACE_INLINE typename ACE_Array_Map<Key, Value, EqualTo, Alloc>::const_iterator
ACE_Array_Map<Key, Value, EqualTo, Alloc>::end () const
{
return this->nodes_ + this->size_;
}
template<typename Key, typename Value, class EqualTo>
ACE_INLINE typename ACE_Array_Map<Key, Value, EqualTo>::reverse_iterator
ACE_Array_Map<Key, Value, EqualTo>::rbegin (void)
template<typename Key, typename Value, class EqualTo, class Alloc>
ACE_INLINE typename ACE_Array_Map<Key, Value, EqualTo, Alloc>::reverse_iterator
ACE_Array_Map<Key, Value, EqualTo, Alloc>::rbegin ()
{
return reverse_iterator (this->end ());
}
template<typename Key, typename Value, class EqualTo>
ACE_INLINE typename ACE_Array_Map<Key, Value, EqualTo>::reverse_iterator
ACE_Array_Map<Key, Value, EqualTo>::rend (void)
template<typename Key, typename Value, class EqualTo, class Alloc>
ACE_INLINE typename ACE_Array_Map<Key, Value, EqualTo, Alloc>::reverse_iterator
ACE_Array_Map<Key, Value, EqualTo, Alloc>::rend ()
{
return reverse_iterator (this->begin ());
}
template<typename Key, typename Value, class EqualTo>
ACE_INLINE typename ACE_Array_Map<Key, Value, EqualTo>::const_reverse_iterator
ACE_Array_Map<Key, Value, EqualTo>::rbegin (void) const
template<typename Key, typename Value, class EqualTo, class Alloc>
ACE_INLINE typename ACE_Array_Map<Key, Value, EqualTo, Alloc>::const_reverse_iterator
ACE_Array_Map<Key, Value, EqualTo, Alloc>::rbegin () const
{
return const_reverse_iterator (this->end ());
}
template<typename Key, typename Value, class EqualTo>
ACE_INLINE typename ACE_Array_Map<Key, Value, EqualTo>::const_reverse_iterator
ACE_Array_Map<Key, Value, EqualTo>::rend (void) const
template<typename Key, typename Value, class EqualTo, class Alloc>
ACE_INLINE typename ACE_Array_Map<Key, Value, EqualTo, Alloc>::const_reverse_iterator
ACE_Array_Map<Key, Value, EqualTo, Alloc>::rend () const
{
return const_reverse_iterator (this->begin ());
}
template<typename Key, typename Value, class EqualTo>
ACE_INLINE typename ACE_Array_Map<Key, Value, EqualTo>::size_type
ACE_Array_Map<Key, Value, EqualTo>::size (void) const
template<typename Key, typename Value, class EqualTo, class Alloc>
ACE_INLINE typename ACE_Array_Map<Key, Value, EqualTo, Alloc>::size_type
ACE_Array_Map<Key, Value, EqualTo, Alloc>::size () const
{
return this->size_;
}
template<typename Key, typename Value, class EqualTo>
ACE_INLINE typename ACE_Array_Map<Key, Value, EqualTo>::size_type
ACE_Array_Map<Key, Value, EqualTo>::max_size (void) const
template<typename Key, typename Value, class EqualTo, class Alloc>
ACE_INLINE typename ACE_Array_Map<Key, Value, EqualTo, Alloc>::size_type
ACE_Array_Map<Key, Value, EqualTo, Alloc>::max_size () const
{
return size_type (-1) / sizeof (value_type);
}
template<typename Key, typename Value, class EqualTo>
template<typename Key, typename Value, class EqualTo, class Alloc>
ACE_INLINE bool
ACE_Array_Map<Key, Value, EqualTo>::is_empty (void) const
ACE_Array_Map<Key, Value, EqualTo, Alloc>::is_empty () const
{
return this->size_ == 0;
}
// The following method is deprecated.
template<typename Key, typename Value, class EqualTo>
template<typename Key, typename Value, class EqualTo, class Alloc>
ACE_INLINE bool
ACE_Array_Map<Key, Value, EqualTo>::empty (void) const
ACE_Array_Map<Key, Value, EqualTo, Alloc>::empty () const
{
return this->is_empty ();
}
template<typename Key, typename Value, class EqualTo>
ACE_INLINE typename ACE_Array_Map<Key, Value, EqualTo>::size_type
ACE_Array_Map<Key, Value, EqualTo>::count (
typename ACE_Array_Map<Key, Value, EqualTo>::key_type const & k)
template<typename Key, typename Value, class EqualTo, class Alloc>
ACE_INLINE typename ACE_Array_Map<Key, Value, EqualTo, Alloc>::size_type
ACE_Array_Map<Key, Value, EqualTo, Alloc>::count (
typename ACE_Array_Map<Key, Value, EqualTo, Alloc>::key_type const & k)
{
return
(this->find (k) == this->end () ? 0 : 1); // Only one datum per key.
}
template<typename Key, typename Value, class EqualTo>
ACE_INLINE typename ACE_Array_Map<Key, Value, EqualTo>::data_type &
ACE_Array_Map<Key, Value, EqualTo>::operator[] (
typename ACE_Array_Map<Key, Value, EqualTo>::key_type const & k)
template<typename Key, typename Value, class EqualTo, class Alloc>
ACE_INLINE typename ACE_Array_Map<Key, Value, EqualTo, Alloc>::mapped_type &
ACE_Array_Map<Key, Value, EqualTo, Alloc>::operator[] (
typename ACE_Array_Map<Key, Value, EqualTo, Alloc>::key_type const & k)
{
iterator i = (this->insert (value_type (k, data_type ()))).first;
iterator i = (this->insert (value_type (k, mapped_type ()))).first;
return (*i).second;
}

View file

@ -1,7 +1,5 @@
// $Id: Assert.cpp 91286 2010-08-05 09:04:31Z johnnyw $
#include "ace/Assert.h"
#include "ace/Log_Msg.h"
#include "ace/Log_Category.h"
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
@ -16,7 +14,12 @@ __ace_assert(const char *file, int line, const ACE_TCHAR *expression)
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);
#ifdef ACE_LACKS_VA_FUNCTIONS
#define LOG_ARGS
#else
#define LOG_ARGS(X) X
#endif
log->log LOG_ARGS ((LM_ERROR, ACE_TEXT ("ACE_ASSERT: file %N, line %l assertion failed for '%s'.%a\n"), expression, -1));
}
ACE_END_VERSIONED_NAMESPACE_DECL

View file

@ -4,9 +4,7 @@
/**
* @file Assert.h
*
* $Id: Assert.h 82808 2008-09-23 11:27:27Z smcqueen $
*
* @author Douglas C. Schmidt <schmidt@cs.wustl.edu>
* @author Douglas C. Schmidt <d.schmidt@vanderbilt.edu>
*/
//=============================================================================

View file

@ -1,6 +1,4 @@
/* -*- C++ -*- */
// $Id: Asynch_Acceptor.cpp 95630 2012-03-22 13:04:47Z johnnyw $
#ifndef ACE_ASYNCH_ACCEPTOR_C
#define ACE_ASYNCH_ACCEPTOR_C
@ -16,7 +14,7 @@
#include "ace/OS_Errno.h"
#include "ace/OS_Memory.h"
#include "ace/OS_NS_sys_socket.h"
#include "ace/Log_Msg.h"
#include "ace/Log_Category.h"
#include "ace/Message_Block.h"
#include "ace/INET_Addr.h"
#include "ace/SOCK_Stream.h"
@ -69,7 +67,7 @@ ACE_Asynch_Acceptor<HANDLER>::open (const ACE_INET_Addr &address,
// Create the listener socket
this->listen_handle_ = ACE_OS::socket (address.get_type (), SOCK_STREAM, 0);
if (this->listen_handle_ == ACE_INVALID_HANDLE)
ACE_ERROR_RETURN ((LM_ERROR,
ACELIB_ERROR_RETURN ((LM_ERROR,
ACE_TEXT ("%p\n"),
ACE_TEXT ("ACE_OS::socket")),
-1);
@ -80,7 +78,7 @@ ACE_Asynch_Acceptor<HANDLER>::open (const ACE_INET_Addr &address,
this->proactor ()) == -1)
{
ACE_Errno_Guard g (errno);
ACE_ERROR ((LM_ERROR,
ACELIB_ERROR ((LM_ERROR,
ACE_TEXT ("%p\n"),
ACE_TEXT ("ACE_Asynch_Accept::open")));
ACE_OS::closesocket (this->listen_handle_);
@ -99,7 +97,7 @@ ACE_Asynch_Acceptor<HANDLER>::open (const ACE_INET_Addr &address,
sizeof one) == -1)
{
ACE_Errno_Guard g (errno);
ACE_ERROR ((LM_ERROR,
ACELIB_ERROR ((LM_ERROR,
ACE_TEXT ("%p\n"),
ACE_TEXT ("ACE_OS::setsockopt")));
ACE_OS::closesocket (this->listen_handle_);
@ -117,7 +115,7 @@ ACE_Asynch_Acceptor<HANDLER>::open (const ACE_INET_Addr &address,
address.get_type()) == -1)
{
ACE_Errno_Guard g (errno);
ACE_ERROR ((LM_ERROR,
ACELIB_ERROR ((LM_ERROR,
ACE_TEXT ("%p\n"),
ACE_TEXT ("ACE::bind_port")));
ACE_OS::closesocket (this->listen_handle_);
@ -131,7 +129,7 @@ ACE_Asynch_Acceptor<HANDLER>::open (const ACE_INET_Addr &address,
address.get_size ()) == -1)
{
ACE_Errno_Guard g (errno);
ACE_ERROR ((LM_ERROR,
ACELIB_ERROR ((LM_ERROR,
ACE_TEXT ("%p\n"),
ACE_TEXT ("ACE_OS::bind")));
ACE_OS::closesocket (this->listen_handle_);
@ -143,7 +141,7 @@ ACE_Asynch_Acceptor<HANDLER>::open (const ACE_INET_Addr &address,
if (ACE_OS::listen (this->listen_handle_, backlog) == -1)
{
ACE_Errno_Guard g (errno);
ACE_ERROR ((LM_ERROR,
ACELIB_ERROR ((LM_ERROR,
ACE_TEXT ("%p\n"),
ACE_TEXT ("ACE_OS::listen")));
ACE_OS::closesocket (this->listen_handle_);
@ -161,7 +159,7 @@ ACE_Asynch_Acceptor<HANDLER>::open (const ACE_INET_Addr &address,
if (this->accept (bytes_to_read) == -1)
{
ACE_Errno_Guard g (errno);
ACE_ERROR ((LM_ERROR,
ACELIB_ERROR ((LM_ERROR,
ACE_TEXT ("%p\n"),
ACE_TEXT ("ACE_Asynch_Acceptor::accept")));
ACE_OS::closesocket (this->listen_handle_);
@ -186,7 +184,7 @@ ACE_Asynch_Acceptor<HANDLER>::set_handle (ACE_HANDLE listen_handle)
this->listen_handle_,
0,
this->proactor ()) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
ACELIB_ERROR_RETURN ((LM_ERROR,
ACE_TEXT ("%p\n"),
ACE_TEXT ("ACE_Asynch_Accept::open")),
-1);

View file

@ -4,8 +4,6 @@
/**
* @file Asynch_Acceptor.h
*
* $Id: Asynch_Acceptor.h 91693 2010-09-09 12:57:54Z johnnyw $
*
* @author Irfan Pyarali (irfan@cs.wustl.edu)
*/
//=============================================================================
@ -173,7 +171,7 @@ public:
* 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
* The default implementation 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.
*/

View file

@ -1,5 +1,3 @@
// $Id: Asynch_Connector.cpp 92069 2010-09-28 11:38:59Z johnnyw $
#ifndef ACE_ASYNCH_CONNECTOR_CPP
#define ACE_ASYNCH_CONNECTOR_CPP
@ -15,7 +13,7 @@
#include "ace/OS_NS_sys_socket.h"
#include "ace/OS_Memory.h"
#include "ace/Flag_Manip.h"
#include "ace/Log_Msg.h"
#include "ace/Log_Category.h"
#include "ace/Message_Block.h"
#include "ace/INET_Addr.h"
@ -48,7 +46,7 @@ ACE_Asynch_Connector<HANDLER>::open (bool pass_addresses,
ACE_INVALID_HANDLE,
0,
this->proactor ()) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
ACELIB_ERROR_RETURN ((LM_ERROR,
ACE_TEXT ("%p\n"),
ACE_TEXT ("ACE_Asynch_Connect::open")),
-1);
@ -67,7 +65,7 @@ ACE_Asynch_Connector<HANDLER>::connect (const ACE_INET_Addr & remote_sap,
local_sap,
reuse_addr,
act) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
ACELIB_ERROR_RETURN ((LM_ERROR,
ACE_TEXT ("%p\n"),
ACE_TEXT ("ACE_Asynch_Connect::connect")),
-1);
@ -98,7 +96,7 @@ ACE_Asynch_Connector<HANDLER>::handle_connect (const ACE_Asynch_Connect::Result
(result.connect_handle (), ACE_NONBLOCK) != 0)
{
error = 1;
ACE_ERROR ((LM_ERROR,
ACELIB_ERROR ((LM_ERROR,
ACE_TEXT ("%p\n"),
ACE_TEXT ("ACE_Asynch_Connector::handle_connect : Set blocking mode")));
}
@ -128,7 +126,7 @@ ACE_Asynch_Connector<HANDLER>::handle_connect (const ACE_Asynch_Connect::Result
if (new_handler == 0)
{
error = 1;
ACE_ERROR ((LM_ERROR,
ACELIB_ERROR ((LM_ERROR,
ACE_TEXT ("%p\n"),
ACE_TEXT ("ACE_Asynch_Connector::handle_connect : Making of new handler failed")));
}
@ -203,7 +201,7 @@ ACE_Asynch_Connector<HANDLER>::parse_address (const ACE_Asynch_Connect::Result &
if (ACE_OS::getsockname (result.connect_handle (),
reinterpret_cast<sockaddr *> (&local_addr),
&local_size) < 0)
ACE_ERROR ((LM_ERROR,
ACELIB_ERROR ((LM_ERROR,
ACE_TEXT("%p\n"),
ACE_TEXT("ACE_Asynch_Connector::<getsockname> failed")));
@ -211,7 +209,7 @@ ACE_Asynch_Connector<HANDLER>::parse_address (const ACE_Asynch_Connect::Result &
if (ACE_OS::getpeername (result.connect_handle (),
reinterpret_cast<sockaddr *> (&remote_addr),
&remote_size) < 0)
ACE_ERROR ((LM_ERROR,
ACELIB_ERROR ((LM_ERROR,
ACE_TEXT("%p\n"),
ACE_TEXT("ACE_Asynch_Connector::<getpeername> failed")));

View file

@ -4,8 +4,6 @@
/**
* @file Asynch_Connector.h
*
* $Id: Asynch_Connector.h 80826 2008-03-04 14:51:23Z wotte $
*
* @author Alexander Libman <alibman@ihug.com.au>
*/
//=============================================================================
@ -145,7 +143,6 @@ protected:
virtual HANDLER *make_handler (void);
private:
/// Asynch_Connect used to make life easier :-)
ACE_Asynch_Connect asynch_connect_;

View file

@ -1,5 +1,3 @@
// $Id: Asynch_IO.cpp 91286 2010-08-05 09:04:31Z johnnyw $
#include "ace/Asynch_IO.h"
#if defined (ACE_HAS_WIN32_OVERLAPPED_IO) || defined (ACE_HAS_AIO_CALLS)
@ -15,61 +13,61 @@
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
size_t
ACE_Asynch_Result::bytes_transferred (void) const
ACE_Asynch_Result::bytes_transferred () const
{
return this->implementation ()->bytes_transferred ();
}
const void *
ACE_Asynch_Result::act (void) const
ACE_Asynch_Result::act () const
{
return this->implementation ()->act ();
}
int
ACE_Asynch_Result::success (void) const
ACE_Asynch_Result::success () const
{
return this->implementation ()->success ();
}
const void *
ACE_Asynch_Result::completion_key (void) const
ACE_Asynch_Result::completion_key () const
{
return this->implementation ()->completion_key ();
}
unsigned long
ACE_Asynch_Result::error (void) const
ACE_Asynch_Result::error () const
{
return this->implementation ()->error ();
}
ACE_HANDLE
ACE_Asynch_Result::event (void) const
ACE_Asynch_Result::event () const
{
return this->implementation ()->event ();
}
unsigned long
ACE_Asynch_Result::offset (void) const
ACE_Asynch_Result::offset () const
{
return this->implementation ()->offset ();
}
unsigned long
ACE_Asynch_Result::offset_high (void) const
ACE_Asynch_Result::offset_high () const
{
return this->implementation ()->offset_high ();
}
int
ACE_Asynch_Result::priority (void) const
ACE_Asynch_Result::priority () const
{
return this->implementation ()->priority ();
}
int
ACE_Asynch_Result::signal_number (void) const
ACE_Asynch_Result::signal_number () const
{
return this->implementation ()->signal_number ();
}
@ -79,13 +77,13 @@ ACE_Asynch_Result::ACE_Asynch_Result (ACE_Asynch_Result_Impl *implementation)
{
}
ACE_Asynch_Result::~ACE_Asynch_Result (void)
ACE_Asynch_Result::~ACE_Asynch_Result ()
{
// Proactor deletes the implementation when the <complete> finishes.
}
ACE_Asynch_Result_Impl *
ACE_Asynch_Result::implementation (void) const
ACE_Asynch_Result::implementation () const
{
return this->implementation_;
}
@ -105,7 +103,7 @@ ACE_Asynch_Operation::open (ACE_Handler &handler,
}
int
ACE_Asynch_Operation::cancel (void)
ACE_Asynch_Operation::cancel ()
{
if (0 == this->implementation ())
{
@ -116,7 +114,7 @@ ACE_Asynch_Operation::cancel (void)
}
ACE_Proactor *
ACE_Asynch_Operation::proactor (void) const
ACE_Asynch_Operation::proactor () const
{
if (0 == this->implementation ())
{
@ -126,11 +124,11 @@ ACE_Asynch_Operation::proactor (void) const
return this->implementation ()->proactor ();
}
ACE_Asynch_Operation::ACE_Asynch_Operation (void)
ACE_Asynch_Operation::ACE_Asynch_Operation ()
{
}
ACE_Asynch_Operation::~ACE_Asynch_Operation (void)
ACE_Asynch_Operation::~ACE_Asynch_Operation ()
{
}
@ -151,12 +149,12 @@ ACE_Asynch_Operation::get_proactor (ACE_Proactor *user_proactor,
// ************************************************************
ACE_Asynch_Read_Stream::ACE_Asynch_Read_Stream (void)
ACE_Asynch_Read_Stream::ACE_Asynch_Read_Stream ()
: implementation_ (0)
{
}
ACE_Asynch_Read_Stream::~ACE_Asynch_Read_Stream (void)
ACE_Asynch_Read_Stream::~ACE_Asynch_Read_Stream ()
{
// Delete the implementation.
delete this->implementation_;
@ -224,7 +222,7 @@ ACE_Asynch_Read_Stream::readv (ACE_Message_Block &message_block,
#endif /* ACE_HAS_WIN32_OVERLAPPED_IO */
ACE_Asynch_Operation_Impl *
ACE_Asynch_Read_Stream::implementation (void) const
ACE_Asynch_Read_Stream::implementation () const
{
return this->implementation_;
}
@ -232,19 +230,19 @@ ACE_Asynch_Read_Stream::implementation (void) const
// ************************************************************
size_t
ACE_Asynch_Read_Stream::Result::bytes_to_read (void) const
ACE_Asynch_Read_Stream::Result::bytes_to_read () const
{
return this->implementation ()->bytes_to_read ();
}
ACE_Message_Block &
ACE_Asynch_Read_Stream::Result::message_block (void) const
ACE_Asynch_Read_Stream::Result::message_block () const
{
return this->implementation ()->message_block ();
}
ACE_HANDLE
ACE_Asynch_Read_Stream::Result::handle (void) const
ACE_Asynch_Read_Stream::Result::handle () const
{
return this->implementation ()->handle ();
}
@ -255,26 +253,26 @@ ACE_Asynch_Read_Stream::Result::Result (ACE_Asynch_Read_Stream_Result_Impl *impl
{
}
ACE_Asynch_Read_Stream::Result::~Result (void)
ACE_Asynch_Read_Stream::Result::~Result ()
{
// Proactor will delete the implementation after <complete> is
// finished.
}
ACE_Asynch_Read_Stream_Result_Impl *
ACE_Asynch_Read_Stream::Result::implementation (void) const
ACE_Asynch_Read_Stream::Result::implementation () const
{
return this->implementation_;
}
// ***************************************************
ACE_Asynch_Write_Stream::ACE_Asynch_Write_Stream (void)
ACE_Asynch_Write_Stream::ACE_Asynch_Write_Stream ()
: implementation_ (0)
{
}
ACE_Asynch_Write_Stream::~ACE_Asynch_Write_Stream (void)
ACE_Asynch_Write_Stream::~ACE_Asynch_Write_Stream ()
{
// Delete the implementation.
delete this->implementation_;
@ -342,7 +340,7 @@ ACE_Asynch_Write_Stream::writev (ACE_Message_Block &message_block,
#endif /* ACE_HAS_WIN32_OVERLAPPED_IO */
ACE_Asynch_Operation_Impl *
ACE_Asynch_Write_Stream::implementation (void) const
ACE_Asynch_Write_Stream::implementation () const
{
return this->implementation_;
}
@ -350,19 +348,19 @@ ACE_Asynch_Write_Stream::implementation (void) const
// ************************************************************
size_t
ACE_Asynch_Write_Stream::Result::bytes_to_write (void) const
ACE_Asynch_Write_Stream::Result::bytes_to_write () const
{
return this->implementation ()->bytes_to_write ();
}
ACE_Message_Block &
ACE_Asynch_Write_Stream::Result::message_block (void) const
ACE_Asynch_Write_Stream::Result::message_block () const
{
return this->implementation ()->message_block ();
}
ACE_HANDLE
ACE_Asynch_Write_Stream::Result::handle (void) const
ACE_Asynch_Write_Stream::Result::handle () const
{
return this->implementation ()->handle ();
}
@ -373,26 +371,26 @@ ACE_Asynch_Write_Stream::Result::Result (ACE_Asynch_Write_Stream_Result_Impl *im
{
}
ACE_Asynch_Write_Stream::Result::~Result (void)
ACE_Asynch_Write_Stream::Result::~Result ()
{
// Proactor will delte the implementation when the <complete> call
// finishes.
}
ACE_Asynch_Write_Stream_Result_Impl *
ACE_Asynch_Write_Stream::Result::implementation (void) const
ACE_Asynch_Write_Stream::Result::implementation () const
{
return this->implementation_;
}
// ************************************************************
ACE_Asynch_Read_File::ACE_Asynch_Read_File (void)
ACE_Asynch_Read_File::ACE_Asynch_Read_File ()
: implementation_ (0)
{
}
ACE_Asynch_Read_File::~ACE_Asynch_Read_File (void)
ACE_Asynch_Read_File::~ACE_Asynch_Read_File ()
{
// Delete the implementation.
delete this->implementation_;
@ -468,7 +466,7 @@ ACE_Asynch_Read_File::readv (ACE_Message_Block &message_block,
#endif /* (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) */
ACE_Asynch_Operation_Impl *
ACE_Asynch_Read_File::implementation (void) const
ACE_Asynch_Read_File::implementation () const
{
return this->implementation_;
}
@ -481,26 +479,26 @@ ACE_Asynch_Read_File::Result::Result (ACE_Asynch_Read_File_Result_Impl *implemen
{
}
ACE_Asynch_Read_File::Result::~Result (void)
ACE_Asynch_Read_File::Result::~Result ()
{
// Proactor will delete the implementation when <complete> call
// completes.
}
ACE_Asynch_Read_File_Result_Impl *
ACE_Asynch_Read_File::Result::implementation (void) const
ACE_Asynch_Read_File::Result::implementation () const
{
return this->implementation_;
}
// ************************************************************
ACE_Asynch_Write_File::ACE_Asynch_Write_File (void)
ACE_Asynch_Write_File::ACE_Asynch_Write_File ()
: implementation_ (0)
{
}
ACE_Asynch_Write_File::~ACE_Asynch_Write_File (void)
ACE_Asynch_Write_File::~ACE_Asynch_Write_File ()
{
// Delete the implementation.
delete this->implementation_;
@ -576,7 +574,7 @@ ACE_Asynch_Write_File::writev (ACE_Message_Block &message_block,
#endif /* (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) */
ACE_Asynch_Operation_Impl *
ACE_Asynch_Write_File::implementation (void) const
ACE_Asynch_Write_File::implementation () const
{
return this->implementation_;
}
@ -589,26 +587,26 @@ ACE_Asynch_Write_File::Result::Result (ACE_Asynch_Write_File_Result_Impl *implem
{
}
ACE_Asynch_Write_File::Result::~Result (void)
ACE_Asynch_Write_File::Result::~Result ()
{
// Proactor will delete the implementation when the <complete> call
// completes.
}
ACE_Asynch_Write_File_Result_Impl *
ACE_Asynch_Write_File::Result::implementation (void) const
ACE_Asynch_Write_File::Result::implementation () const
{
return this->implementation_;
}
// *********************************************************************
ACE_Asynch_Accept::ACE_Asynch_Accept (void)
ACE_Asynch_Accept::ACE_Asynch_Accept ()
: implementation_ (0)
{
}
ACE_Asynch_Accept::~ACE_Asynch_Accept (void)
ACE_Asynch_Accept::~ACE_Asynch_Accept ()
{
// Delete the implementation.
delete this->implementation_;
@ -659,7 +657,7 @@ ACE_Asynch_Accept::accept (ACE_Message_Block &message_block,
}
ACE_Asynch_Operation_Impl *
ACE_Asynch_Accept::implementation (void) const
ACE_Asynch_Accept::implementation () const
{
return this->implementation_;
}
@ -667,25 +665,25 @@ ACE_Asynch_Accept::implementation (void) const
// ************************************************************
size_t
ACE_Asynch_Accept::Result::bytes_to_read (void) const
ACE_Asynch_Accept::Result::bytes_to_read () const
{
return this->implementation ()->bytes_to_read ();
}
ACE_Message_Block &
ACE_Asynch_Accept::Result::message_block (void) const
ACE_Asynch_Accept::Result::message_block () const
{
return this->implementation ()->message_block ();
}
ACE_HANDLE
ACE_Asynch_Accept::Result::listen_handle (void) const
ACE_Asynch_Accept::Result::listen_handle () const
{
return this->implementation ()->listen_handle ();
}
ACE_HANDLE
ACE_Asynch_Accept::Result::accept_handle (void) const
ACE_Asynch_Accept::Result::accept_handle () const
{
return this->implementation ()->accept_handle ();
}
@ -696,14 +694,14 @@ ACE_Asynch_Accept::Result::Result (ACE_Asynch_Accept_Result_Impl *implementation
{
}
ACE_Asynch_Accept::Result::~Result (void)
ACE_Asynch_Accept::Result::~Result ()
{
// Proactor will delete the implementation when the <complete> call
// completes.
}
ACE_Asynch_Accept_Result_Impl *
ACE_Asynch_Accept::Result::implementation (void) const
ACE_Asynch_Accept::Result::implementation () const
{
return this->implementation_;
}
@ -712,12 +710,12 @@ ACE_Asynch_Accept::Result::implementation (void) const
// *********************************************************************
ACE_Asynch_Connect::ACE_Asynch_Connect (void)
ACE_Asynch_Connect::ACE_Asynch_Connect ()
: implementation_ (0)
{
}
ACE_Asynch_Connect::~ACE_Asynch_Connect (void)
ACE_Asynch_Connect::~ACE_Asynch_Connect ()
{
// Delete the implementation.
delete this->implementation_;
@ -768,7 +766,7 @@ ACE_Asynch_Connect::connect (ACE_HANDLE connect_handle,
}
ACE_Asynch_Operation_Impl *
ACE_Asynch_Connect::implementation (void) const
ACE_Asynch_Connect::implementation () const
{
return this->implementation_;
}
@ -781,33 +779,33 @@ ACE_Asynch_Connect::Result::Result (ACE_Asynch_Connect_Result_Impl *implementati
{
}
ACE_Asynch_Connect::Result::~Result (void)
ACE_Asynch_Connect::Result::~Result ()
{
// Proactor will delete the implementation when the <complete> call
// completes.
}
ACE_HANDLE
ACE_Asynch_Connect::Result::connect_handle (void) const
ACE_Asynch_Connect::Result::connect_handle () const
{
return this->implementation ()->connect_handle ();
}
ACE_Asynch_Connect_Result_Impl *
ACE_Asynch_Connect::Result::implementation (void) const
ACE_Asynch_Connect::Result::implementation () const
{
return this->implementation_;
}
// ************************************************************
ACE_Asynch_Transmit_File::ACE_Asynch_Transmit_File (void)
ACE_Asynch_Transmit_File::ACE_Asynch_Transmit_File ()
: implementation_ (0)
{
}
ACE_Asynch_Transmit_File::~ACE_Asynch_Transmit_File (void)
ACE_Asynch_Transmit_File::~ACE_Asynch_Transmit_File ()
{
// Delete the implementation.
delete this->implementation_;
@ -864,7 +862,7 @@ ACE_Asynch_Transmit_File::transmit_file (ACE_HANDLE file,
}
ACE_Asynch_Operation_Impl *
ACE_Asynch_Transmit_File::implementation (void) const
ACE_Asynch_Transmit_File::implementation () const
{
return this->implementation_;
}
@ -872,37 +870,37 @@ ACE_Asynch_Transmit_File::implementation (void) const
// ****************************************************************************
ACE_HANDLE
ACE_Asynch_Transmit_File::Result::socket (void) const
ACE_Asynch_Transmit_File::Result::socket () const
{
return this->implementation ()->socket ();
}
ACE_HANDLE
ACE_Asynch_Transmit_File::Result::file (void) const
ACE_Asynch_Transmit_File::Result::file () const
{
return this->implementation ()->file ();
}
ACE_Asynch_Transmit_File::Header_And_Trailer *
ACE_Asynch_Transmit_File::Result::header_and_trailer (void) const
ACE_Asynch_Transmit_File::Result::header_and_trailer () const
{
return this->implementation ()->header_and_trailer ();
}
size_t
ACE_Asynch_Transmit_File::Result::bytes_to_write (void) const
ACE_Asynch_Transmit_File::Result::bytes_to_write () const
{
return this->implementation ()->bytes_to_write ();
}
size_t
ACE_Asynch_Transmit_File::Result::bytes_per_send (void) const
ACE_Asynch_Transmit_File::Result::bytes_per_send () const
{
return this->implementation ()->bytes_per_send ();
}
unsigned long
ACE_Asynch_Transmit_File::Result::flags (void) const
ACE_Asynch_Transmit_File::Result::flags () const
{
return this->implementation ()->flags ();
}
@ -913,12 +911,12 @@ ACE_Asynch_Transmit_File::Result::Result (ACE_Asynch_Transmit_File_Result_Impl *
{
}
ACE_Asynch_Transmit_File::Result::~Result (void)
ACE_Asynch_Transmit_File::Result::~Result ()
{
}
ACE_Asynch_Transmit_File_Result_Impl *
ACE_Asynch_Transmit_File::Result::implementation (void) const
ACE_Asynch_Transmit_File::Result::implementation () const
{
return this->implementation_;
}
@ -936,7 +934,7 @@ ACE_Asynch_Transmit_File::Header_And_Trailer::Header_And_Trailer (ACE_Message_Bl
{
}
ACE_Asynch_Transmit_File::Header_And_Trailer::~Header_And_Trailer (void)
ACE_Asynch_Transmit_File::Header_And_Trailer::~Header_And_Trailer ()
{
}
@ -953,7 +951,7 @@ ACE_Asynch_Transmit_File::Header_And_Trailer::header_and_trailer (ACE_Message_Bl
}
ACE_Message_Block *
ACE_Asynch_Transmit_File::Header_And_Trailer::header (void) const
ACE_Asynch_Transmit_File::Header_And_Trailer::header () const
{
return this->header_;
}
@ -965,7 +963,7 @@ ACE_Asynch_Transmit_File::Header_And_Trailer::header (ACE_Message_Block *message
}
size_t
ACE_Asynch_Transmit_File::Header_And_Trailer::header_bytes (void) const
ACE_Asynch_Transmit_File::Header_And_Trailer::header_bytes () const
{
return this->header_bytes_;
}
@ -977,7 +975,7 @@ ACE_Asynch_Transmit_File::Header_And_Trailer::header_bytes (size_t bytes)
}
ACE_Message_Block *
ACE_Asynch_Transmit_File::Header_And_Trailer::trailer (void) const
ACE_Asynch_Transmit_File::Header_And_Trailer::trailer () const
{
return this->trailer_;
}
@ -989,7 +987,7 @@ ACE_Asynch_Transmit_File::Header_And_Trailer::trailer (ACE_Message_Block *messag
}
size_t
ACE_Asynch_Transmit_File::Header_And_Trailer::trailer_bytes (void) const
ACE_Asynch_Transmit_File::Header_And_Trailer::trailer_bytes () const
{
return this->trailer_bytes_;
}
@ -1001,7 +999,7 @@ ACE_Asynch_Transmit_File::Header_And_Trailer::trailer_bytes (size_t bytes)
}
ACE_LPTRANSMIT_FILE_BUFFERS
ACE_Asynch_Transmit_File::Header_And_Trailer::transmit_buffers (void)
ACE_Asynch_Transmit_File::Header_And_Trailer::transmit_buffers ()
{
// If both are zero, return zero
if (this->header_ == 0 && this->trailer_ == 0)
@ -1053,7 +1051,7 @@ ACE_Asynch_Transmit_File::Header_And_Trailer::transmit_buffers (void)
// *********************************************************************
ACE_Handler::ACE_Handler (void)
ACE_Handler::ACE_Handler ()
: proactor_ (0), handle_ (ACE_INVALID_HANDLE)
{
ACE_Handler::Proxy *p;
@ -1069,7 +1067,7 @@ ACE_Handler::ACE_Handler (ACE_Proactor *d)
this->proxy_.reset (p);
}
ACE_Handler::~ACE_Handler (void)
ACE_Handler::~ACE_Handler ()
{
ACE_Handler::Proxy *p = this->proxy_.get ();
if (p)
@ -1128,12 +1126,12 @@ ACE_Handler::handle_time_out (const ACE_Time_Value & /* tv */,
}
void
ACE_Handler::handle_wakeup (void)
ACE_Handler::handle_wakeup ()
{
}
ACE_Proactor *
ACE_Handler::proactor (void)
ACE_Handler::proactor ()
{
return this->proactor_;
}
@ -1145,7 +1143,7 @@ ACE_Handler::proactor (ACE_Proactor *p)
}
ACE_HANDLE
ACE_Handler::handle (void) const
ACE_Handler::handle () const
{
return this->handle_;
}
@ -1157,18 +1155,18 @@ ACE_Handler::handle (ACE_HANDLE h)
}
ACE_Refcounted_Auto_Ptr<ACE_Handler::Proxy, ACE_SYNCH_MUTEX> &
ACE_Handler::proxy (void)
ACE_Handler::proxy ()
{
return this->proxy_;
}
// ************************************************************
ACE_Service_Handler::ACE_Service_Handler (void)
ACE_Service_Handler::ACE_Service_Handler ()
{
}
ACE_Service_Handler::~ACE_Service_Handler (void)
ACE_Service_Handler::~ACE_Service_Handler ()
{
}
@ -1192,12 +1190,12 @@ ACE_Service_Handler::open (ACE_HANDLE,
// ************************************************************
ACE_Asynch_Read_Dgram::ACE_Asynch_Read_Dgram (void)
ACE_Asynch_Read_Dgram::ACE_Asynch_Read_Dgram ()
: implementation_ (0)
{
}
ACE_Asynch_Read_Dgram::~ACE_Asynch_Read_Dgram (void)
ACE_Asynch_Read_Dgram::~ACE_Asynch_Read_Dgram ()
{
// Delete the implementation.
delete this->implementation_;
@ -1248,7 +1246,7 @@ ACE_Asynch_Read_Dgram::recv (ACE_Message_Block *message_block,
}
ACE_Asynch_Operation_Impl *
ACE_Asynch_Read_Dgram::implementation (void) const
ACE_Asynch_Read_Dgram::implementation () const
{
return this->implementation_;
}
@ -1262,25 +1260,25 @@ ACE_Asynch_Read_Dgram::Result::remote_address (ACE_Addr& addr) const
}
ACE_Message_Block*
ACE_Asynch_Read_Dgram::Result::message_block (void) const
ACE_Asynch_Read_Dgram::Result::message_block () const
{
return this->implementation ()->message_block ();
}
int
ACE_Asynch_Read_Dgram::Result::flags (void) const
ACE_Asynch_Read_Dgram::Result::flags () const
{
return this->implementation ()->flags ();
}
size_t
ACE_Asynch_Read_Dgram::Result::bytes_to_read (void) const
ACE_Asynch_Read_Dgram::Result::bytes_to_read () const
{
return this->implementation ()->bytes_to_read ();
}
ACE_HANDLE
ACE_Asynch_Read_Dgram::Result::handle (void) const
ACE_Asynch_Read_Dgram::Result::handle () const
{
return this->implementation ()->handle();
}
@ -1291,12 +1289,12 @@ ACE_Asynch_Read_Dgram::Result::Result (ACE_Asynch_Read_Dgram_Result_Impl *implem
{
}
ACE_Asynch_Read_Dgram::Result::~Result (void)
ACE_Asynch_Read_Dgram::Result::~Result ()
{
}
ACE_Asynch_Read_Dgram_Result_Impl *
ACE_Asynch_Read_Dgram::Result::implementation (void) const
ACE_Asynch_Read_Dgram::Result::implementation () const
{
return this->implementation_;
}
@ -1304,12 +1302,12 @@ ACE_Asynch_Read_Dgram::Result::implementation (void) const
// ************************************************************
ACE_Asynch_Write_Dgram::ACE_Asynch_Write_Dgram (void)
ACE_Asynch_Write_Dgram::ACE_Asynch_Write_Dgram ()
: implementation_ (0)
{
}
ACE_Asynch_Write_Dgram::~ACE_Asynch_Write_Dgram (void)
ACE_Asynch_Write_Dgram::~ACE_Asynch_Write_Dgram ()
{
// Delete the implementation.
delete this->implementation_;
@ -1360,7 +1358,7 @@ ACE_Asynch_Write_Dgram::send (ACE_Message_Block *message_block,
}
ACE_Asynch_Operation_Impl *
ACE_Asynch_Write_Dgram::implementation (void) const
ACE_Asynch_Write_Dgram::implementation () const
{
return this->implementation_;
}
@ -1368,7 +1366,7 @@ ACE_Asynch_Write_Dgram::implementation (void) const
// ************************************************************
size_t
ACE_Asynch_Write_Dgram::Result::bytes_to_write (void) const
ACE_Asynch_Write_Dgram::Result::bytes_to_write () const
{
return this->implementation ()->bytes_to_write ();
}
@ -1380,19 +1378,19 @@ ACE_Asynch_Write_Dgram::Result::message_block () const
}
int
ACE_Asynch_Write_Dgram::Result::flags (void) const
ACE_Asynch_Write_Dgram::Result::flags () const
{
return this->implementation ()->flags ();
}
ACE_HANDLE
ACE_Asynch_Write_Dgram::Result::handle (void) const
ACE_Asynch_Write_Dgram::Result::handle () const
{
return this->implementation ()->handle ();
}
ACE_Asynch_Write_Dgram_Result_Impl *
ACE_Asynch_Write_Dgram::Result::implementation (void) const
ACE_Asynch_Write_Dgram::Result::implementation () const
{
return this->implementation_;
}
@ -1403,7 +1401,7 @@ ACE_Asynch_Write_Dgram::Result::Result (ACE_Asynch_Write_Dgram_Result_Impl *impl
{
}
ACE_Asynch_Write_Dgram::Result::~Result (void)
ACE_Asynch_Write_Dgram::Result::~Result ()
{
}

View file

@ -4,8 +4,6 @@
/**
* @file Asynch_IO.h
*
* $Id: Asynch_IO.h 84837 2009-03-16 13:01:15Z johnnyw $
*
* This works on Win32 (defined (ACE_WIN32) && !defined
* (ACE_HAS_WINCE)) platforms and on POSIX4 platforms with {aio_*}
* routines (defined (ACE_HAS_AIO_CALLS))
@ -103,7 +101,6 @@ class ACE_Time_Value;
*/
class ACE_Export ACE_Asynch_Result
{
public:
/// Number of bytes transferred by the operation.
size_t bytes_transferred (void) const;
@ -200,7 +197,6 @@ class ACE_Asynch_Operation_Impl;
*/
class ACE_Export ACE_Asynch_Operation
{
public:
/**
* Initializes the factory with information which will be used with
@ -290,7 +286,6 @@ class ACE_Asynch_Read_Stream_Impl;
*/
class ACE_Export ACE_Asynch_Read_Stream : public ACE_Asynch_Operation
{
public:
/// A do nothing constructor.
ACE_Asynch_Read_Stream (void);
@ -381,7 +376,6 @@ public:
*/
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;
@ -412,8 +406,8 @@ public:
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 &))
void operator= (const ACE_Asynch_Read_Stream &) = delete;
ACE_Asynch_Read_Stream (const ACE_Asynch_Read_Stream &) = delete;
};
// Forward declarations
@ -434,7 +428,6 @@ class ACE_Asynch_Write_Stream_Result_Impl;
*/
class ACE_Export ACE_Asynch_Write_Stream : public ACE_Asynch_Operation
{
public:
/// A do nothing constructor.
ACE_Asynch_Write_Stream (void);
@ -537,7 +530,6 @@ public:
*/
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;
@ -568,8 +560,8 @@ public:
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 &))
void operator= (const ACE_Asynch_Write_Stream &) = delete;
ACE_Asynch_Write_Stream (const ACE_Asynch_Write_Stream &) = delete;
};
// Forward declarations
@ -593,7 +585,6 @@ class ACE_Asynch_Read_File_Result_Impl;
*/
class ACE_Export ACE_Asynch_Read_File : public ACE_Asynch_Read_Stream
{
public:
/// A do nothing constructor.
ACE_Asynch_Read_File (void);
@ -693,7 +684,6 @@ public:
*/
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;
@ -719,8 +709,8 @@ public:
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 &))
void operator= (const ACE_Asynch_Read_File &) = delete;
ACE_Asynch_Read_File (const ACE_Asynch_Read_File &) = delete;
};
// Forward declarations
@ -744,7 +734,6 @@ class ACE_Asynch_Write_File_Result_Impl;
*/
class ACE_Export ACE_Asynch_Write_File : public ACE_Asynch_Write_Stream
{
public:
/// A do nothing constructor.
ACE_Asynch_Write_File (void);
@ -829,7 +818,6 @@ public:
*/
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;
@ -855,8 +843,8 @@ public:
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 &))
void operator= (const ACE_Asynch_Write_File &) = delete;
ACE_Asynch_Write_File (const ACE_Asynch_Write_File &) = delete;
};
// Forward declarations
@ -878,7 +866,6 @@ class ACE_Asynch_Accept_Impl;
*/
class ACE_Export ACE_Asynch_Accept : public ACE_Asynch_Operation
{
public:
/// A do nothing constructor.
ACE_Asynch_Accept (void);
@ -961,7 +948,6 @@ public:
*/
class ACE_Export Result : public ACE_Asynch_Result
{
/// The concrete implementation result classes only construct this
/// class.
friend class ACE_POSIX_Asynch_Accept_Result;
@ -985,18 +971,18 @@ public:
ACE_Asynch_Accept_Result_Impl *implementation (void) const;
protected:
/// Contructor. Implementation will not be deleted.
/// Constructor. Implementation will not be deleted.
Result (ACE_Asynch_Accept_Result_Impl *implementation);
/// Destructor.
virtual ~Result (void);
/// Impelmentation class.
/// Implementation 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 &))
void operator= (const ACE_Asynch_Accept &) = delete;
ACE_Asynch_Accept (const ACE_Asynch_Accept &) = delete;
};
// Forward declarations
class ACE_Asynch_Connect_Result_Impl;
@ -1015,7 +1001,6 @@ class ACE_Asynch_Connect_Impl;
*/
class ACE_Export ACE_Asynch_Connect : public ACE_Asynch_Operation
{
public:
/// A do nothing constructor.
ACE_Asynch_Connect (void);
@ -1067,7 +1052,6 @@ public:
*/
class ACE_Export Result : public ACE_Asynch_Result
{
/// The concrete implementation result classes only construct this
/// class.
friend class ACE_POSIX_Asynch_Connect_Result;
@ -1082,18 +1066,18 @@ public:
ACE_Asynch_Connect_Result_Impl *implementation (void) const;
protected:
/// Contructor. Implementation will not be deleted.
/// Constructor. Implementation will not be deleted.
Result (ACE_Asynch_Connect_Result_Impl *implementation);
/// Destructor.
virtual ~Result (void);
/// Impelmentation class.
/// Implementation 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 &))
void operator= (const ACE_Asynch_Connect &) = delete;
ACE_Asynch_Connect (const ACE_Asynch_Connect &) = delete;
};
// Forward declarations
@ -1120,7 +1104,6 @@ class ACE_Asynch_Transmit_File_Impl;
*/
class ACE_Export ACE_Asynch_Transmit_File : public ACE_Asynch_Operation
{
public:
// Forward declarations
class Header_And_Trailer;
@ -1193,7 +1176,6 @@ public:
*/
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;
@ -1245,7 +1227,6 @@ public:
*/
class ACE_Export Header_And_Trailer
{
public:
/// Constructor.
Header_And_Trailer (ACE_Message_Block *header = 0,
@ -1306,8 +1287,8 @@ public:
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 &))
void operator= (const ACE_Asynch_Transmit_File &) = delete;
ACE_Asynch_Transmit_File (const ACE_Asynch_Transmit_File &) = delete;
};
@ -1331,7 +1312,6 @@ class ACE_Addr;
*/
class ACE_Export ACE_Asynch_Read_Dgram : public ACE_Asynch_Operation
{
public:
/// A do nothing constructor.
ACE_Asynch_Read_Dgram (void);
@ -1406,14 +1386,12 @@ public:
*/
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;
@ -1444,8 +1422,8 @@ public:
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 &))
void operator= (const ACE_Asynch_Read_Dgram &) = delete;
ACE_Asynch_Read_Dgram (const ACE_Asynch_Read_Dgram &) = delete;
};
// Forward declarations
@ -1467,7 +1445,6 @@ class ACE_Asynch_Write_Dgram_Result_Impl;
*/
class ACE_Export ACE_Asynch_Write_Dgram : public ACE_Asynch_Operation
{
public:
/// A do nothing constructor.
ACE_Asynch_Write_Dgram (void);
@ -1542,14 +1519,12 @@ public:
*/
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;
@ -1577,8 +1552,8 @@ public:
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 &))
void operator= (const ACE_Asynch_Write_Dgram &) = delete;
ACE_Asynch_Write_Dgram (const ACE_Asynch_Write_Dgram &) = delete;
};
@ -1697,8 +1672,9 @@ protected:
/// Refers to proxy for this handler.
ACE_Refcounted_Auto_Ptr<Proxy, ACE_SYNCH_MUTEX> proxy_;
ACE_UNIMPLEMENTED_FUNC (ACE_Handler (const ACE_Handler &))
ACE_UNIMPLEMENTED_FUNC (ACE_Handler operator= (const ACE_Handler &))
private:
ACE_Handler (const ACE_Handler &) = delete;
ACE_Handler operator= (const ACE_Handler &) = delete;
};
// Forward declarations
@ -1720,7 +1696,6 @@ class ACE_Asynch_Acceptor;
*/
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<ACE_Service_Handler>;

View file

@ -1,5 +1,3 @@
// $Id: Asynch_IO_Impl.cpp 80826 2008-03-04 14:51:23Z wotte $
#include "ace/Asynch_IO_Impl.h"
#if defined (ACE_HAS_WIN32_OVERLAPPED_IO) || defined (ACE_HAS_AIO_CALLS)
@ -12,103 +10,103 @@
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_Asynch_Result_Impl::~ACE_Asynch_Result_Impl (void)
ACE_Asynch_Result_Impl::~ACE_Asynch_Result_Impl ()
{
}
ACE_Asynch_Operation_Impl::~ACE_Asynch_Operation_Impl (void)
ACE_Asynch_Operation_Impl::~ACE_Asynch_Operation_Impl ()
{
}
ACE_Asynch_Read_Stream_Impl::~ACE_Asynch_Read_Stream_Impl (void)
ACE_Asynch_Read_Stream_Impl::~ACE_Asynch_Read_Stream_Impl ()
{
}
ACE_Asynch_Read_Stream_Result_Impl::~ACE_Asynch_Read_Stream_Result_Impl (void)
ACE_Asynch_Read_Stream_Result_Impl::~ACE_Asynch_Read_Stream_Result_Impl ()
{
}
ACE_Asynch_Write_Stream_Impl::~ACE_Asynch_Write_Stream_Impl (void)
ACE_Asynch_Write_Stream_Impl::~ACE_Asynch_Write_Stream_Impl ()
{
}
ACE_Asynch_Write_Stream_Result_Impl::~ACE_Asynch_Write_Stream_Result_Impl (void)
ACE_Asynch_Write_Stream_Result_Impl::~ACE_Asynch_Write_Stream_Result_Impl ()
{
}
ACE_Asynch_Read_File_Impl::~ACE_Asynch_Read_File_Impl (void)
ACE_Asynch_Read_File_Impl::~ACE_Asynch_Read_File_Impl ()
{
}
ACE_Asynch_Write_File_Impl::~ACE_Asynch_Write_File_Impl (void)
ACE_Asynch_Write_File_Impl::~ACE_Asynch_Write_File_Impl ()
{
}
ACE_Asynch_Read_File_Result_Impl::~ACE_Asynch_Read_File_Result_Impl (void)
ACE_Asynch_Read_File_Result_Impl::~ACE_Asynch_Read_File_Result_Impl ()
{
}
ACE_Asynch_Write_File_Result_Impl::~ACE_Asynch_Write_File_Result_Impl (void)
ACE_Asynch_Write_File_Result_Impl::~ACE_Asynch_Write_File_Result_Impl ()
{
}
ACE_Asynch_Accept_Result_Impl::~ACE_Asynch_Accept_Result_Impl (void)
ACE_Asynch_Accept_Result_Impl::~ACE_Asynch_Accept_Result_Impl ()
{
}
ACE_Asynch_Connect_Result_Impl::~ACE_Asynch_Connect_Result_Impl (void)
ACE_Asynch_Connect_Result_Impl::~ACE_Asynch_Connect_Result_Impl ()
{
}
ACE_Asynch_Accept_Impl::~ACE_Asynch_Accept_Impl (void)
ACE_Asynch_Accept_Impl::~ACE_Asynch_Accept_Impl ()
{
}
ACE_Asynch_Connect_Impl::~ACE_Asynch_Connect_Impl (void)
ACE_Asynch_Connect_Impl::~ACE_Asynch_Connect_Impl ()
{
}
ACE_Asynch_Transmit_File_Impl::~ACE_Asynch_Transmit_File_Impl (void)
ACE_Asynch_Transmit_File_Impl::~ACE_Asynch_Transmit_File_Impl ()
{
}
ACE_Asynch_Transmit_File_Result_Impl::~ACE_Asynch_Transmit_File_Result_Impl (void)
ACE_Asynch_Transmit_File_Result_Impl::~ACE_Asynch_Transmit_File_Result_Impl ()
{
}
ACE_Asynch_Read_Dgram_Impl::~ACE_Asynch_Read_Dgram_Impl (void)
ACE_Asynch_Read_Dgram_Impl::~ACE_Asynch_Read_Dgram_Impl ()
{
}
ACE_Asynch_Read_Dgram_Impl::ACE_Asynch_Read_Dgram_Impl (void)
ACE_Asynch_Read_Dgram_Impl::ACE_Asynch_Read_Dgram_Impl ()
{
}
ACE_Asynch_Write_Dgram_Impl::~ACE_Asynch_Write_Dgram_Impl (void)
ACE_Asynch_Write_Dgram_Impl::~ACE_Asynch_Write_Dgram_Impl ()
{
}
ACE_Asynch_Write_Dgram_Impl::ACE_Asynch_Write_Dgram_Impl (void)
ACE_Asynch_Write_Dgram_Impl::ACE_Asynch_Write_Dgram_Impl ()
{
}
//***********************************************
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 ()
{
}
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 ()
{
}
//***********************************************
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 ()
{
}
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 ()
{
}

View file

@ -4,14 +4,10 @@
/**
* @file Asynch_IO_Impl.h
*
* $Id: Asynch_IO_Impl.h 93359 2011-02-11 11:33:12Z mcorino $
*
*
* 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 <alex@cs.wustl.edu>
@ -46,7 +42,6 @@ class ACE_Proactor_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
{
@ -151,7 +146,6 @@ protected:
* @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
{
@ -189,7 +183,6 @@ protected:
* @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
{
@ -217,7 +210,6 @@ protected:
* @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
{
@ -255,7 +247,6 @@ protected:
* @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
{
@ -283,7 +274,6 @@ protected:
* @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
{
@ -349,7 +339,6 @@ protected:
*
* @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
{
@ -368,7 +357,6 @@ protected:
* @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
{
@ -435,7 +423,6 @@ protected:
* @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
{
@ -453,7 +440,6 @@ protected:
* @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
{
@ -490,7 +476,6 @@ protected:
* @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
{
@ -522,7 +507,6 @@ protected:
* @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
{
@ -551,7 +535,6 @@ protected:
* @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
{
@ -573,7 +556,6 @@ protected:
* @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
{
@ -603,7 +585,6 @@ protected:
* @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
{
@ -642,7 +623,6 @@ protected:
* @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
{
@ -694,7 +674,6 @@ protected:
* @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
{
@ -728,7 +707,6 @@ protected:
* @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
{
@ -780,7 +758,6 @@ protected:
* @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
{

View file

@ -1,7 +1,4 @@
// -*- C++ -*-
//
// $Id: Asynch_IO_Impl.inl 80826 2008-03-04 14:51:23Z wotte $
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_INLINE

View file

@ -1,5 +1,3 @@
// $Id: Asynch_Pseudo_Task.cpp 91286 2010-08-05 09:04:31Z johnnyw $
#include "ace/Asynch_Pseudo_Task.h"
#include "ace/OS_NS_errno.h"
@ -19,10 +17,10 @@ ACE_Asynch_Pseudo_Task::~ACE_Asynch_Pseudo_Task ()
}
int
ACE_Asynch_Pseudo_Task::start (void)
ACE_Asynch_Pseudo_Task::start ()
{
if (this->reactor_.initialized () == 0)
ACE_ERROR_RETURN ((LM_ERROR,
ACELIB_ERROR_RETURN ((LM_ERROR,
ACE_TEXT ("%N:%l:%p\n"),
ACE_TEXT ("start reactor is not initialized")),
-1);
@ -31,7 +29,7 @@ ACE_Asynch_Pseudo_Task::start (void)
}
int
ACE_Asynch_Pseudo_Task::stop (void)
ACE_Asynch_Pseudo_Task::stop ()
{
if (this->thr_count () == 0) // already stopped
return 0;
@ -45,7 +43,7 @@ ACE_Asynch_Pseudo_Task::stop (void)
}
int
ACE_Asynch_Pseudo_Task::svc (void)
ACE_Asynch_Pseudo_Task::svc ()
{
#if !defined (ACE_WIN32)
@ -56,7 +54,7 @@ ACE_Asynch_Pseudo_Task::svc (void)
sigaddset (&RT_signals, si);
if (ACE_OS::pthread_sigmask (SIG_BLOCK, &RT_signals, 0) != 0)
ACE_ERROR ((LM_ERROR,
ACELIB_ERROR ((LM_ERROR,
ACE_TEXT ("Error:(%P | %t):%p\n"),
ACE_TEXT ("pthread_sigmask")));
#endif
@ -86,7 +84,7 @@ ACE_Asynch_Pseudo_Task::register_io_handler (ACE_HANDLE handle,
// by the application.
if (this->reactor_.suspend_handler (handle) == -1)
{
ACE_ERROR
ACELIB_ERROR
((LM_ERROR,
ACE_TEXT ("%N:%l:%p\n"),
ACE_TEXT ("register_io_handler (suspended)")));

View file

@ -4,8 +4,6 @@
/**
* @file Asynch_Pseudo_Task.h
*
* $Id: Asynch_Pseudo_Task.h 80826 2008-03-04 14:51:23Z wotte $
*
* @author Alexander Libman <alibman@ihug.com.au>
*/
//=============================================================================
@ -27,16 +25,8 @@
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<ACE_NULL_SYNCH>
{

View file

@ -1,5 +1,3 @@
// $Id: Atomic_Op.cpp 91286 2010-08-05 09:04:31Z johnnyw $
#include "ace/Atomic_Op.h"
#include "ace/OS_NS_unistd.h"
@ -34,7 +32,7 @@ single_cpu_increment (volatile long *value)
(defined (__SUNPRO_CC) && (defined (__i386) || defined (__x86_64))))
return ace_atomic_add_long (
reinterpret_cast<volatile unsigned long*> (value), 1);
#elif defined(__GNUC__) && defined(PPC)
#elif defined(__GNUC__) && defined(__PPC__)
long tmp;
asm("lwz %0,%1" : "=r" (tmp) : "m" (*value) );
asm("addi %0,%0,1" : "+r" (tmp) );
@ -58,7 +56,7 @@ single_cpu_decrement (volatile long *value)
(defined (__SUNPRO_CC) && (defined (__i386) || defined (__x86_64))))
return ace_atomic_add_long (
reinterpret_cast<volatile unsigned long*> (value), -1);
#elif defined(__GNUC__) && defined(PPC)
#elif defined(__GNUC__) && defined(__PPC__)
long tmp;
asm("lwz %0,%1" : "=r" (tmp) : "m" (*value) );
asm("addi %0,%0,-1" : "+r" (tmp) );
@ -81,7 +79,7 @@ single_cpu_exchange (volatile long *value, long rhs)
(defined (__SUNPRO_CC) && (defined (__i386) || defined (__x86_64))))
return ace_atomic_swap_long (
reinterpret_cast<volatile unsigned long*> (value), rhs);
#elif defined(__GNUC__) && defined(PPC)
#elif defined(__GNUC__) && defined(__PPC__)
long tmp;
asm("lwz %0,%1" : "=r" (tmp) : "m" (rhs) );
asm("stw %0,%1" : "+r" (tmp), "=m" (*value) );
@ -104,7 +102,7 @@ single_cpu_exchange_add (volatile long *value, long rhs)
(defined (__SUNPRO_CC) && (defined (__i386) || defined (__x86_64))))
return ace_atomic_swap_add_long (
reinterpret_cast<volatile unsigned long*> (value), rhs);
#elif defined(__GNUC__) && defined(PPC)
#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) );
@ -263,8 +261,8 @@ void
ACE_Atomic_Op<ACE_Thread_Mutex, long>::dump (void) const
{
#if defined (ACE_HAS_DUMP)
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP));
#endif /* ACE_HAS_DUMP */
}
@ -296,8 +294,8 @@ void
ACE_Atomic_Op<ACE_Thread_Mutex, unsigned long>::dump (void) const
{
#if defined (ACE_HAS_DUMP)
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP));
#endif /* ACE_HAS_DUMP */
}

View file

@ -4,9 +4,7 @@
/**
* @file Atomic_Op.h
*
* $Id: Atomic_Op.h 95225 2011-12-05 20:25:15Z shuston $
*
* @author Douglas C. Schmidt <schmidt@uci.edu>
* @author Douglas C. Schmidt <d.schmidt@vanderbilt.edu>
*/
//=============================================================================
@ -131,7 +129,7 @@ public:
long value (void) const;
/// Dump the state of an object.
void dump (void) const;
void dump () const;
/// Explicitly return @c value_ (by reference).
volatile long &value_i (void);
@ -144,14 +142,12 @@ public:
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_;
@ -231,7 +227,7 @@ public:
unsigned long value (void) const;
/// Dump the state of an object.
void dump (void) const;
void dump () const;
/// Explicitly return @c value_ (by reference).
volatile unsigned long &value_i (void);
@ -244,14 +240,12 @@ public:
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_;
@ -271,7 +265,7 @@ class ACE_Export ACE_Atomic_Op<ACE_Thread_Mutex, int>
: public ACE_Atomic_Op_GCC<int>
{
public:
ACE_Atomic_Op (void);
ACE_Atomic_Op ();
ACE_Atomic_Op (int c);
ACE_Atomic_Op (const ACE_Atomic_Op<ACE_Thread_Mutex, int> &c);
ACE_Atomic_Op<ACE_Thread_Mutex, int> &operator= (int rhs);
@ -282,7 +276,7 @@ class ACE_Export ACE_Atomic_Op<ACE_Thread_Mutex, unsigned int>
: public ACE_Atomic_Op_GCC<unsigned int>
{
public:
ACE_Atomic_Op (void);
ACE_Atomic_Op ();
ACE_Atomic_Op (unsigned int c);
ACE_Atomic_Op (const ACE_Atomic_Op<ACE_Thread_Mutex, unsigned> &c);
ACE_Atomic_Op<ACE_Thread_Mutex, unsigned int> &operator= (unsigned int rhs);
@ -295,7 +289,7 @@ class ACE_Export ACE_Atomic_Op<ACE_Thread_Mutex, long>
: public ACE_Atomic_Op_GCC<long>
{
public:
ACE_Atomic_Op (void);
ACE_Atomic_Op ();
ACE_Atomic_Op (long c);
ACE_Atomic_Op (const ACE_Atomic_Op<ACE_Thread_Mutex, long> &c);
ACE_Atomic_Op<ACE_Thread_Mutex, long> &operator= (long rhs);
@ -306,19 +300,44 @@ class ACE_Export ACE_Atomic_Op<ACE_Thread_Mutex, unsigned long>
: public ACE_Atomic_Op_GCC<unsigned long>
{
public:
ACE_Atomic_Op (void);
ACE_Atomic_Op ();
ACE_Atomic_Op (unsigned long c);
ACE_Atomic_Op (const ACE_Atomic_Op<ACE_Thread_Mutex, unsigned long> &c);
ACE_Atomic_Op<ACE_Thread_Mutex, unsigned long> &operator= (unsigned long rhs);
};
// The long long intrinsics are not available on PPC
#if !defined (__powerpc__)
template<>
class ACE_Export ACE_Atomic_Op<ACE_Thread_Mutex, long long>
: public ACE_Atomic_Op_GCC<long long>
{
public:
ACE_Atomic_Op ();
ACE_Atomic_Op (long long c);
ACE_Atomic_Op (const ACE_Atomic_Op<ACE_Thread_Mutex, long long> &c);
ACE_Atomic_Op<ACE_Thread_Mutex, long long> &operator= (long long rhs);
};
template<>
class ACE_Export ACE_Atomic_Op<ACE_Thread_Mutex, unsigned long long>
: public ACE_Atomic_Op_GCC<unsigned long long>
{
public:
ACE_Atomic_Op ();
ACE_Atomic_Op (unsigned long long c);
ACE_Atomic_Op (const ACE_Atomic_Op<ACE_Thread_Mutex, unsigned long long> &c);
ACE_Atomic_Op<ACE_Thread_Mutex, unsigned long long> &operator= (unsigned long long rhs);
};
#endif /* !__powerpc__ */
#if !defined (ACE_LACKS_GCC_ATOMIC_BUILTINS_2)
template<>
class ACE_Export ACE_Atomic_Op<ACE_Thread_Mutex, short>
: public ACE_Atomic_Op_GCC<short>
{
public:
ACE_Atomic_Op (void);
ACE_Atomic_Op ();
ACE_Atomic_Op (short c);
ACE_Atomic_Op (const ACE_Atomic_Op<ACE_Thread_Mutex, short> &c);
ACE_Atomic_Op<ACE_Thread_Mutex, short> &operator= (short rhs);
@ -329,7 +348,7 @@ class ACE_Export ACE_Atomic_Op<ACE_Thread_Mutex, unsigned short>
: public ACE_Atomic_Op_GCC<unsigned short>
{
public:
ACE_Atomic_Op (void);
ACE_Atomic_Op ();
ACE_Atomic_Op (unsigned short c);
ACE_Atomic_Op (const ACE_Atomic_Op<ACE_Thread_Mutex, unsigned short> &c);
ACE_Atomic_Op<ACE_Thread_Mutex, unsigned short> &operator= (unsigned short rhs);
@ -342,7 +361,7 @@ class ACE_Export ACE_Atomic_Op<ACE_Thread_Mutex, bool>
: public ACE_Atomic_Op_GCC<bool>
{
public:
ACE_Atomic_Op (void);
ACE_Atomic_Op ();
ACE_Atomic_Op (bool c);
ACE_Atomic_Op (const ACE_Atomic_Op<ACE_Thread_Mutex, bool> &c);
ACE_Atomic_Op<ACE_Thread_Mutex, bool> &operator= (bool rhs);

View file

@ -1,6 +1,4 @@
// -*- C++ -*-
// $Id: Atomic_Op.inl 95225 2011-12-05 20:25:15Z shuston $
#if defined (ACE_HAS_INTRINSIC_INTERLOCKED)
# include "ace/os_include/os_intrin.h"
# pragma intrinsic (_InterlockedExchange, _InterlockedExchangeAdd, _InterlockedIncrement, _InterlockedDecrement)
@ -421,7 +419,7 @@ ACE_Atomic_Op<ACE_Thread_Mutex, unsigned long>::value_i (void)
#if defined (ACE_HAS_GCC_ATOMIC_BUILTINS) && (ACE_HAS_GCC_ATOMIC_BUILTINS == 1)
ACE_INLINE
ACE_Atomic_Op<ACE_Thread_Mutex, int>::ACE_Atomic_Op (void) :
ACE_Atomic_Op<ACE_Thread_Mutex, int>::ACE_Atomic_Op () :
ACE_Atomic_Op_GCC<int> ()
{
}
@ -448,7 +446,7 @@ ACE_Atomic_Op<ACE_Thread_Mutex, int>::operator= (int rhs)
ACE_INLINE
ACE_Atomic_Op<ACE_Thread_Mutex, unsigned int>::ACE_Atomic_Op (void) :
ACE_Atomic_Op<ACE_Thread_Mutex, unsigned int>::ACE_Atomic_Op () :
ACE_Atomic_Op_GCC<unsigned int>()
{
}
@ -474,7 +472,7 @@ ACE_Atomic_Op<ACE_Thread_Mutex, unsigned int>::operator= (unsigned int rhs)
}
ACE_INLINE
ACE_Atomic_Op<ACE_Thread_Mutex, long>::ACE_Atomic_Op (void) :
ACE_Atomic_Op<ACE_Thread_Mutex, long>::ACE_Atomic_Op () :
ACE_Atomic_Op_GCC<long>()
{
}
@ -500,7 +498,7 @@ ACE_Atomic_Op<ACE_Thread_Mutex, long>::operator= (long rhs)
}
ACE_INLINE
ACE_Atomic_Op<ACE_Thread_Mutex, unsigned long>::ACE_Atomic_Op (void) :
ACE_Atomic_Op<ACE_Thread_Mutex, unsigned long>::ACE_Atomic_Op () :
ACE_Atomic_Op_GCC<unsigned long> ()
{
}
@ -525,9 +523,64 @@ ACE_Atomic_Op<ACE_Thread_Mutex, unsigned long>::operator= (unsigned long rhs)
return *this;
}
// The long long intrinsics are not available on PPC
#if !defined (__powerpc__)
ACE_INLINE
ACE_Atomic_Op<ACE_Thread_Mutex, long long>::ACE_Atomic_Op () :
ACE_Atomic_Op_GCC<long long>()
{
}
ACE_INLINE
ACE_Atomic_Op<ACE_Thread_Mutex, long long>::ACE_Atomic_Op (long long c) :
ACE_Atomic_Op_GCC<long long>(c)
{
}
ACE_INLINE
ACE_Atomic_Op<ACE_Thread_Mutex, long long>::ACE_Atomic_Op (const ACE_Atomic_Op<ACE_Thread_Mutex, long long> &c) :
ACE_Atomic_Op_GCC<long long>(c)
{
}
ACE_INLINE
ACE_Atomic_Op<ACE_Thread_Mutex, long long>&
ACE_Atomic_Op<ACE_Thread_Mutex, long long>::operator= (long long rhs)
{
ACE_Atomic_Op_GCC<long long>::operator= (rhs);
return *this;
}
ACE_INLINE
ACE_Atomic_Op<ACE_Thread_Mutex, unsigned long long>::ACE_Atomic_Op () :
ACE_Atomic_Op_GCC<unsigned long long> ()
{
}
ACE_INLINE
ACE_Atomic_Op<ACE_Thread_Mutex, unsigned long long>::ACE_Atomic_Op (unsigned long long c) :
ACE_Atomic_Op_GCC<unsigned long long>(c)
{
}
ACE_INLINE
ACE_Atomic_Op<ACE_Thread_Mutex, unsigned long long>::ACE_Atomic_Op (const ACE_Atomic_Op<ACE_Thread_Mutex, unsigned long long> &c) :
ACE_Atomic_Op_GCC<unsigned long long>(c)
{
}
ACE_INLINE
ACE_Atomic_Op<ACE_Thread_Mutex, unsigned long long>&
ACE_Atomic_Op<ACE_Thread_Mutex, unsigned long long>::operator= (unsigned long long rhs)
{
ACE_Atomic_Op_GCC<unsigned long long>::operator= (rhs);
return *this;
}
#endif /* !__powerpc__ */
#if !defined (ACE_LACKS_GCC_ATOMIC_BUILTINS_2)
ACE_INLINE
ACE_Atomic_Op<ACE_Thread_Mutex, short>::ACE_Atomic_Op (void) :
ACE_Atomic_Op<ACE_Thread_Mutex, short>::ACE_Atomic_Op () :
ACE_Atomic_Op_GCC<short>()
{
}
@ -553,7 +606,7 @@ ACE_Atomic_Op<ACE_Thread_Mutex, short>::operator= (short rhs)
}
ACE_INLINE
ACE_Atomic_Op<ACE_Thread_Mutex, unsigned short>::ACE_Atomic_Op (void) :
ACE_Atomic_Op<ACE_Thread_Mutex, unsigned short>::ACE_Atomic_Op () :
ACE_Atomic_Op_GCC<unsigned short> ()
{
}
@ -581,7 +634,7 @@ ACE_Atomic_Op<ACE_Thread_Mutex, unsigned short>::operator= (unsigned short rhs)
#if !defined (ACE_LACKS_GCC_ATOMIC_BUILTINS_1)
ACE_INLINE
ACE_Atomic_Op<ACE_Thread_Mutex, bool>::ACE_Atomic_Op (void) :
ACE_Atomic_Op<ACE_Thread_Mutex, bool>::ACE_Atomic_Op () :
ACE_Atomic_Op_GCC<bool> ()
{
}

View file

@ -1,5 +1,3 @@
// $Id: Atomic_Op_GCC_T.cpp 91286 2010-08-05 09:04:31Z johnnyw $
#include "ace/OS_NS_unistd.h"
#if defined (ACE_HAS_GCC_ATOMIC_BUILTINS) && (ACE_HAS_GCC_ATOMIC_BUILTINS == 1)
@ -12,11 +10,11 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL
template <typename T>
void
ACE_Atomic_Op_GCC<T>::dump (void) const
ACE_Atomic_Op_GCC<T>::dump () const
{
#if defined (ACE_HAS_DUMP)
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP));
#endif /* ACE_HAS_DUMP */
}

View file

@ -4,8 +4,6 @@
/**
* @file Atomic_Op_GCC_T.h
*
* $Id: Atomic_Op_GCC_T.h 95225 2011-12-05 20:25:15Z shuston $
*
* @author Johnny Willemsen <jwillemsen@remedy.nl
*/
//=============================================================================
@ -39,7 +37,7 @@ class ACE_Export ACE_Atomic_Op_GCC
{
public:
/// Atomically pre-increment @c value_.
T operator++ (void);
T operator++ ();
/// Atomically post-increment @c value_.
T operator++ (int);
@ -48,7 +46,7 @@ public:
T operator+= (T rhs);
/// Atomically pre-decrement @c value_.
T operator-- (void);
T operator-- ();
/// Atomically post-decrement @c value_.
T operator-- (int);
@ -78,13 +76,13 @@ public:
T exchange (T newval);
/// Explicitly return @c value_.
T value (void) const;
T value () const;
/// Dump the state of an object.
void dump (void) const;
void dump () const;
/// Explicitly return @c value_ (by reference).
volatile T &value_i (void);
volatile T &value_i ();
// ACE_ALLOC_HOOK_DECLARE;
// Declare the dynamic allocation hooks.
@ -97,7 +95,7 @@ protected:
ACE_Atomic_Op_GCC<T> &operator= (const ACE_Atomic_Op_GCC<T> &rhs);
/// Initialize @c value_ to 0.
ACE_Atomic_Op_GCC (void);
ACE_Atomic_Op_GCC ();
/// Initialize @c value_ to c.
ACE_Atomic_Op_GCC (T c);
@ -106,14 +104,12 @@ protected:
ACE_Atomic_Op_GCC (const ACE_Atomic_Op_GCC<T> &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);
ACE_Thread_Mutex &mutex ();
private:
/// Current object decorated by the atomic op.
volatile T value_;
};

View file

@ -1,13 +1,11 @@
// -*- C++ -*-
// $Id: Atomic_Op_GCC_T.inl 95225 2011-12-05 20:25:15Z shuston $
#if defined (ACE_HAS_GCC_ATOMIC_BUILTINS) && (ACE_HAS_GCC_ATOMIC_BUILTINS == 1)
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
template <typename T>
ACE_INLINE
ACE_Atomic_Op_GCC<T>::ACE_Atomic_Op_GCC (void)
ACE_Atomic_Op_GCC<T>::ACE_Atomic_Op_GCC ()
: value_ (0)
{
}
@ -29,7 +27,7 @@ ACE_Atomic_Op_GCC<T>::ACE_Atomic_Op_GCC (
template <typename T>
ACE_INLINE T
ACE_Atomic_Op_GCC<T>::operator++ (void)
ACE_Atomic_Op_GCC<T>::operator++ ()
{
return __sync_add_and_fetch (&this->value_, 1);
}
@ -43,7 +41,7 @@ ACE_Atomic_Op_GCC<T>::operator++ (int)
template <typename T>
ACE_INLINE T
ACE_Atomic_Op_GCC<T>::operator-- (void)
ACE_Atomic_Op_GCC<T>::operator-- ()
{
return __sync_sub_and_fetch (&this->value_, 1);
}
@ -137,14 +135,14 @@ ACE_Atomic_Op_GCC<T>::exchange (T newval)
template <typename T>
ACE_INLINE T
ACE_Atomic_Op_GCC<T>::value (void) const
ACE_Atomic_Op_GCC<T>::value () const
{
return this->value_;
}
template <typename T>
ACE_INLINE volatile T &
ACE_Atomic_Op_GCC<T>::value_i (void)
ACE_Atomic_Op_GCC<T>::value_i ()
{
return this->value_;
}

View file

@ -1,4 +1,4 @@
/* $Id: Atomic_Op_Sparc.c 80826 2008-03-04 14:51:23Z wotte $
/*
*
* This is a C file for a reason. The Sun C++ compiler does not accept
* inline assembler.

View file

@ -1,6 +1,4 @@
/* -*- C++ -*- */
// $Id: Atomic_Op_Sparc.h 80826 2008-03-04 14:51:23Z wotte $
#ifndef ACE_ATOMIC_OP_SPARC_H
#define ACE_ATOMIC_OP_SPARC_H

View file

@ -1,14 +1,16 @@
// $Id: Atomic_Op_T.cpp 92052 2010-09-27 14:20:22Z vzykov $
#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_Msg.h"
# include "ace/Log_Category.h"
#endif /* ACE_HAS_DUMP */
#if defined (ACE_HAS_ALLOC_HOOKS)
# include "ace/Malloc_Base.h"
#endif /* ACE_HAS_ALLOC_HOOKS */
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
@ -19,12 +21,12 @@
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_ALLOC_HOOK_DEFINE(ACE_Atomic_Op_Ex)
ACE_ALLOC_HOOK_DEFINE(ACE_Atomic_Op)
ACE_ALLOC_HOOK_DEFINE_Tcc(ACE_Atomic_Op_Ex)
ACE_ALLOC_HOOK_DEFINE_Tcc(ACE_Atomic_Op)
// *************************************************
template <class ACE_LOCK, class TYPE> ACE_LOCK &
ACE_Atomic_Op_Ex<ACE_LOCK, TYPE>::mutex (void)
ACE_Atomic_Op_Ex<ACE_LOCK, TYPE>::mutex ()
{
// ACE_TRACE ("ACE_Atomic_Op_Ex<ACE_LOCK, TYPE>::mutex");
return this->mutex_;
@ -32,13 +34,13 @@ ACE_Atomic_Op_Ex<ACE_LOCK, TYPE>::mutex (void)
template <class ACE_LOCK, class TYPE>
void
ACE_Atomic_Op_Ex<ACE_LOCK, TYPE>::dump (void) const
ACE_Atomic_Op_Ex<ACE_LOCK, TYPE>::dump () const
{
#if defined (ACE_HAS_DUMP)
// ACE_TRACE ("ACE_Atomic_Op_Ex<ACE_LOCK, TYPE>::dump");
ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
this->mutex_.dump ();
ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP));
#endif /* ACE_HAS_DUMP */
}
@ -63,7 +65,7 @@ ACE_Atomic_Op_Ex<ACE_LOCK, TYPE>::ACE_Atomic_Op_Ex (
// ****************************************************************
template <class ACE_LOCK, class TYPE>
ACE_Atomic_Op<ACE_LOCK, TYPE>::ACE_Atomic_Op (void)
ACE_Atomic_Op<ACE_LOCK, TYPE>::ACE_Atomic_Op ()
: impl_ (this->own_mutex_)
{
// ACE_TRACE ("ACE_Atomic_Op<ACE_LOCK, TYPE>::ACE_Atomic_Op");

View file

@ -4,9 +4,7 @@
/**
* @file Atomic_Op_T.h
*
* $Id: Atomic_Op_T.h 95761 2012-05-15 18:23:04Z johnnyw $
*
* @author Douglas C. Schmidt <schmidt@uci.edu>
* @author Douglas C. Schmidt <d.schmidt@vanderbilt.edu>
*/
//=============================================================================
@ -146,11 +144,8 @@ template <class ACE_LOCK, typename TYPE>
class ACE_Atomic_Op_Ex
{
public:
typedef typename ACE_Type_Traits<TYPE>::parameter_type arg_type;
// = Initialization methods.
/// Initialize @c value_ to 0.
ACE_Atomic_Op_Ex (ACE_LOCK & mtx);
@ -160,7 +155,7 @@ public:
// = Accessors.
/// Atomically pre-increment @c value_.
TYPE operator++ (void);
TYPE operator++ ();
/// Atomically post-increment @c value_.
TYPE operator++ (int);
@ -169,7 +164,7 @@ public:
TYPE operator+= (arg_type rhs);
/// Atomically pre-decrement @c value_.
TYPE operator-- (void);
TYPE operator-- ();
/// Atomically post-decrement @c value_.
TYPE operator-- (int);
@ -206,13 +201,13 @@ public:
TYPE exchange (TYPE newval);
/// Explicitly return @c value_.
TYPE value (void) const;
TYPE value () const;
/// Dump the state of an object.
void dump (void) const;
void dump () const;
// ACE_ALLOC_HOOK_DECLARE;
// Declare the dynamic allocation hooks.
/// Declare the dynamic allocation hooks.
ACE_ALLOC_HOOK_DECLARE;
/// Manage copying...
ACE_Atomic_Op_Ex (ACE_Atomic_Op_Ex<ACE_LOCK, TYPE> const &);
@ -225,7 +220,7 @@ public:
*
* @note The right name would be lock_, but HP/C++ will choke on that!
*/
ACE_LOCK & mutex (void);
ACE_LOCK & mutex ();
/**
* Explicitly return @c value_ (by reference). This gives the user
@ -233,7 +228,7 @@ public:
* will usually be used in conjunction with explicit access to the
* lock. Use with care ;-)
*/
TYPE & value_i (void);
TYPE & value_i ();
private:
/// Type of synchronization mechanism.
@ -261,11 +256,10 @@ template <class ACE_LOCK, typename TYPE>
class ACE_Atomic_Op
{
public:
typedef typename ACE_Type_Traits<TYPE>::parameter_type arg_type;
/// Initialize @c value_ to 0.
ACE_Atomic_Op (void);
ACE_Atomic_Op ();
/// Initialize @c value_ to c.
ACE_Atomic_Op (arg_type c);
@ -281,7 +275,7 @@ public:
ACE_Atomic_Op<ACE_LOCK, TYPE> const & rhs);
/// Atomically pre-increment @c value_.
TYPE operator++ (void);
TYPE operator++ ();
/// Atomically post-increment @c value_.
TYPE operator++ (int);
@ -290,7 +284,7 @@ public:
TYPE operator+= (arg_type rhs);
/// Atomically pre-decrement @c value_.
TYPE operator-- (void);
TYPE operator-- ();
/// Atomically post-decrement @c value_.
TYPE operator-- (int);
@ -320,10 +314,13 @@ public:
TYPE exchange (TYPE newval);
/// Explicitly return @c value_.
TYPE value (void) const;
TYPE value () const;
/// Dump the state of an object.
void dump (void) const;
void dump () const;
/// Declare the dynamic allocation hooks.
ACE_ALLOC_HOOK_DECLARE;
/**
* Explicitly return @c value_ (by reference). This gives the user
@ -331,7 +328,7 @@ public:
* will usually be used in conjunction with explicit access to the
* lock. Use with care ;-)
*/
TYPE & value_i (void);
TYPE & value_i ();
private:
/// Type of synchronization mechanism.

View file

@ -1,7 +1,4 @@
// -*- C++ -*-
//
// $Id: Atomic_Op_T.inl 95225 2011-12-05 20:25:15Z shuston $
#include "ace/Guard_T.h"
#include <algorithm>
@ -14,7 +11,7 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL
template <class ACE_LOCK, class TYPE>
ACE_INLINE TYPE
ACE_Atomic_Op_Ex<ACE_LOCK, TYPE>::operator++ (void)
ACE_Atomic_Op_Ex<ACE_LOCK, TYPE>::operator++ ()
{
// ACE_TRACE ("ACE_Atomic_Op_Ex<ACE_LOCK, TYPE>::operator++");
ACE_GUARD_RETURN (ACE_LOCK, ace_mon, this->mutex_, this->value_);
@ -33,7 +30,7 @@ ACE_Atomic_Op_Ex<ACE_LOCK, TYPE>::operator+= (
template <class ACE_LOCK, class TYPE>
ACE_INLINE TYPE
ACE_Atomic_Op_Ex<ACE_LOCK, TYPE>::operator-- (void)
ACE_Atomic_Op_Ex<ACE_LOCK, TYPE>::operator-- ()
{
// ACE_TRACE ("ACE_Atomic_Op_Ex<ACE_LOCK, TYPE>::operator--");
ACE_GUARD_RETURN (ACE_LOCK, ace_mon, this->mutex_, this->value_);
@ -164,7 +161,7 @@ ACE_Atomic_Op_Ex<ACE_LOCK, TYPE>::exchange (TYPE newval)
template <class ACE_LOCK, class TYPE>
ACE_INLINE TYPE
ACE_Atomic_Op_Ex<ACE_LOCK, TYPE>::value (void) const
ACE_Atomic_Op_Ex<ACE_LOCK, TYPE>::value () const
{
// ACE_TRACE ("ACE_Atomic_Op_Ex<ACE_LOCK, TYPE>::value");
ACE_GUARD_RETURN (ACE_LOCK, ace_mon, this->mutex_, this->value_);
@ -173,7 +170,7 @@ ACE_Atomic_Op_Ex<ACE_LOCK, TYPE>::value (void) const
template <class ACE_LOCK, class TYPE>
ACE_INLINE TYPE &
ACE_Atomic_Op_Ex<ACE_LOCK, TYPE>::value_i (void)
ACE_Atomic_Op_Ex<ACE_LOCK, TYPE>::value_i ()
{
// Explicitly return <value_> (by reference). This gives the user
// full, unrestricted access to the underlying value. This method
@ -226,7 +223,7 @@ ACE_Atomic_Op<ACE_LOCK, TYPE>::operator= (
template <class ACE_LOCK, class TYPE>
ACE_INLINE TYPE
ACE_Atomic_Op<ACE_LOCK, TYPE>::operator++ (void)
ACE_Atomic_Op<ACE_LOCK, TYPE>::operator++ ()
{
return ++this->impl_;
}
@ -248,7 +245,7 @@ ACE_Atomic_Op<ACE_LOCK, TYPE>::operator+= (
template <class ACE_LOCK, class TYPE>
ACE_INLINE TYPE
ACE_Atomic_Op<ACE_LOCK, TYPE>::operator-- (void)
ACE_Atomic_Op<ACE_LOCK, TYPE>::operator-- ()
{
return --this->impl_;
}
@ -325,14 +322,14 @@ ACE_Atomic_Op<ACE_LOCK, TYPE>::exchange (TYPE newval)
template <class ACE_LOCK, class TYPE>
ACE_INLINE TYPE
ACE_Atomic_Op<ACE_LOCK, TYPE>::value (void) const
ACE_Atomic_Op<ACE_LOCK, TYPE>::value () const
{
return this->impl_.value ();
}
template <class ACE_LOCK, class TYPE>
ACE_INLINE void
ACE_Atomic_Op<ACE_LOCK, TYPE>::dump (void) const
ACE_Atomic_Op<ACE_LOCK, TYPE>::dump () const
{
#if defined (ACE_HAS_DUMP)
this->impl_.dump ();
@ -341,7 +338,7 @@ ACE_Atomic_Op<ACE_LOCK, TYPE>::dump (void) const
}
template <class ACE_LOCK, class TYPE>
ACE_INLINE TYPE &
ACE_Atomic_Op<ACE_LOCK, TYPE>::value_i (void)
ACE_Atomic_Op<ACE_LOCK, TYPE>::value_i ()
{
return this->impl_.value_i ();
}

Some files were not shown because too many files have changed in this diff Show more