diff options
Diffstat (limited to 'ACE/examples/Misc/test_dump.cpp')
-rw-r--r-- | ACE/examples/Misc/test_dump.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/ACE/examples/Misc/test_dump.cpp b/ACE/examples/Misc/test_dump.cpp new file mode 100644 index 00000000000..bbffe66a2bf --- /dev/null +++ b/ACE/examples/Misc/test_dump.cpp @@ -0,0 +1,33 @@ +// $Id$ + +// The following code illustrates how the ACE_Dumpable mechanisms are +// integrated into ACE components like the SOCK_Acceptor and +// SOCK_Stream. + +#include "ace/OS_main.h" +#include "ace/Dump.h" +#include "test_dump.h" + +#include "ace/Reactor.h" + +ACE_RCSID(Misc, test_dump, "$Id$") + +int +ACE_TMAIN (int, ACE_TCHAR *[]) +{ + SOCK outer_sock; + // Note that the SOCK superclass is *not* printed. + SOCK_Stream outer_stream; + SOCK_Acceptor outer_acceptor; + ACE_ODB::instance ()->dump_objects (); + { + SOCK inner_sock; + // Note that the SOCK superclass is *not* printed. + SOCK_Stream inner_stream; + SOCK_Acceptor inner_acceptor; + ACE_ODB::instance ()->dump_objects (); + } + ACE_ODB::instance ()->dump_objects (); + return 0; +} + |