diff options
Diffstat (limited to 'examples/Misc')
-rw-r--r-- | examples/Misc/Makefile | 624 | ||||
-rw-r--r-- | examples/Misc/Makefile.bor | 25 | ||||
-rw-r--r-- | examples/Misc/test_XtReactor1.cpp | 175 | ||||
-rw-r--r-- | examples/Misc/test_XtReactor2.cpp | 104 | ||||
-rw-r--r-- | examples/Misc/test_dump.cpp | 42 | ||||
-rw-r--r-- | examples/Misc/test_dump.h | 50 | ||||
-rw-r--r-- | examples/Misc/test_get_opt.cpp | 53 | ||||
-rw-r--r-- | examples/Misc/test_profile_timer.cpp | 35 | ||||
-rw-r--r-- | examples/Misc/test_read_buffer.cpp | 26 | ||||
-rw-r--r-- | examples/Misc/test_set.cpp | 16 | ||||
-rw-r--r-- | examples/Misc/test_sstring.cpp | 25 | ||||
-rw-r--r-- | examples/Misc/test_trace.cpp | 116 |
12 files changed, 0 insertions, 1291 deletions
diff --git a/examples/Misc/Makefile b/examples/Misc/Makefile deleted file mode 100644 index 2393e06b191..00000000000 --- a/examples/Misc/Makefile +++ /dev/null @@ -1,624 +0,0 @@ -#---------------------------------------------------------------------------- -# $Id$ -# -# Makefile for testing the miscellaneous ACE components. -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -BIN = test_dump \ - test_get_opt \ - test_profile_timer \ - test_read_buffer \ - test_set \ - test_sstring \ - test_trace - -# Uncomment the following if you want to test out the XtReactor. -# test_XtReactor1 \ -# test_XtReactor2 - -LSRC = $(addsuffix .cpp,$(BIN)) - -LDLIBS = - -VLDLIBS = $(LDLIBS:%=%$(VAR)) - -BUILD = $(VBIN) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(ACE_ROOT)/include/makeinclude/macros.GNU -include $(ACE_ROOT)/include/makeinclude/rules.common.GNU -include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU -include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU -include $(ACE_ROOT)/include/makeinclude/rules.local.GNU - -# To build multiple executables in the same directory on AIX, it works -# best to wipe out any previously-created tempinc directory. -# The compiler/linker isn't too smart about instantiating templates... -ifdef TEMPINCDIR -COMPILE.cc := $(RM) -rf tempinc; $(COMPILE.cc) -endif - -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - - -.obj/test_dump.o .obj/test_dump.so .shobj/test_dump.o .shobj/test_dump.so: test_dump.cpp \ - $(ACE_ROOT)/ace/Dump.h \ - $(ACE_ROOT)/ace/pre.h \ - $(ACE_ROOT)/ace/Synch.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/post.h \ - $(ACE_ROOT)/ace/ACE_export.h \ - $(ACE_ROOT)/ace/svc_export.h \ - $(ACE_ROOT)/ace/ace_wchar.h \ - $(ACE_ROOT)/ace/ace_wchar.inl \ - $(ACE_ROOT)/ace/OS_Errno.h \ - $(ACE_ROOT)/ace/OS_Export.h \ - $(ACE_ROOT)/ace/OS_Errno.inl \ - $(ACE_ROOT)/ace/OS_Dirent.h \ - $(ACE_ROOT)/ace/OS_Dirent.inl \ - $(ACE_ROOT)/ace/OS_String.h \ - $(ACE_ROOT)/ace/OS_String.inl \ - $(ACE_ROOT)/ace/OS_Memory.h \ - $(ACE_ROOT)/ace/OS_Memory.inl \ - $(ACE_ROOT)/ace/OS_TLI.h \ - $(ACE_ROOT)/ace/OS_TLI.inl \ - $(ACE_ROOT)/ace/Min_Max.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Flag_Manip.h \ - $(ACE_ROOT)/ace/Flag_Manip.i \ - $(ACE_ROOT)/ace/Handle_Ops.h \ - $(ACE_ROOT)/ace/Handle_Ops.i \ - $(ACE_ROOT)/ace/Lib_Find.h \ - $(ACE_ROOT)/ace/Lib_Find.i \ - $(ACE_ROOT)/ace/Init_ACE.h \ - $(ACE_ROOT)/ace/Init_ACE.i \ - $(ACE_ROOT)/ace/Sock_Connect.h \ - $(ACE_ROOT)/ace/Sock_Connect.i \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Synch.i \ - $(ACE_ROOT)/ace/Synch_T.h \ - $(ACE_ROOT)/ace/Synch_T.i \ - $(ACE_ROOT)/ace/Thread.h \ - $(ACE_ROOT)/ace/Thread_Adapter.h \ - $(ACE_ROOT)/ace/Base_Thread_Adapter.h \ - $(ACE_ROOT)/ace/OS_Log_Msg_Attributes.h \ - $(ACE_ROOT)/ace/OS_Log_Msg_Attributes.inl \ - $(ACE_ROOT)/ace/Base_Thread_Adapter.inl \ - $(ACE_ROOT)/ace/Thread_Adapter.inl \ - $(ACE_ROOT)/ace/Thread.i \ - $(ACE_ROOT)/ace/Atomic_Op.i \ - $(ACE_ROOT)/ace/Synch_T.cpp \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/Dump_T.h \ - $(ACE_ROOT)/ace/Dump_T.cpp \ - test_dump.h \ - $(ACE_ROOT)/ace/Reactor.h \ - $(ACE_ROOT)/ace/Handle_Set.h \ - $(ACE_ROOT)/ace/Handle_Set.i \ - $(ACE_ROOT)/ace/Timer_Queue.h \ - $(ACE_ROOT)/ace/Timer_Queue_T.h \ - $(ACE_ROOT)/ace/Free_List.h \ - $(ACE_ROOT)/ace/Free_List.i \ - $(ACE_ROOT)/ace/Free_List.cpp \ - $(ACE_ROOT)/ace/Test_and_Set.h \ - $(ACE_ROOT)/ace/Event_Handler.h \ - $(ACE_ROOT)/ace/Event_Handler.i \ - $(ACE_ROOT)/ace/Test_and_Set.i \ - $(ACE_ROOT)/ace/Test_and_Set.cpp \ - $(ACE_ROOT)/ace/Timer_Queue_T.i \ - $(ACE_ROOT)/ace/Timer_Queue_T.cpp \ - $(ACE_ROOT)/ace/Signal.h \ - $(ACE_ROOT)/ace/Signal.i \ - $(ACE_ROOT)/ace/Reactor.i \ - $(ACE_ROOT)/ace/Reactor_Impl.h - -.obj/test_get_opt.o .obj/test_get_opt.so .shobj/test_get_opt.o .shobj/test_get_opt.so: test_get_opt.cpp \ - $(ACE_ROOT)/ace/Get_Opt.h \ - $(ACE_ROOT)/ace/pre.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/post.h \ - $(ACE_ROOT)/ace/ACE_export.h \ - $(ACE_ROOT)/ace/svc_export.h \ - $(ACE_ROOT)/ace/ace_wchar.h \ - $(ACE_ROOT)/ace/ace_wchar.inl \ - $(ACE_ROOT)/ace/OS_Errno.h \ - $(ACE_ROOT)/ace/OS_Export.h \ - $(ACE_ROOT)/ace/OS_Errno.inl \ - $(ACE_ROOT)/ace/OS_Dirent.h \ - $(ACE_ROOT)/ace/OS_Dirent.inl \ - $(ACE_ROOT)/ace/OS_String.h \ - $(ACE_ROOT)/ace/OS_String.inl \ - $(ACE_ROOT)/ace/OS_Memory.h \ - $(ACE_ROOT)/ace/OS_Memory.inl \ - $(ACE_ROOT)/ace/OS_TLI.h \ - $(ACE_ROOT)/ace/OS_TLI.inl \ - $(ACE_ROOT)/ace/Min_Max.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Flag_Manip.h \ - $(ACE_ROOT)/ace/Flag_Manip.i \ - $(ACE_ROOT)/ace/Handle_Ops.h \ - $(ACE_ROOT)/ace/Handle_Ops.i \ - $(ACE_ROOT)/ace/Lib_Find.h \ - $(ACE_ROOT)/ace/Lib_Find.i \ - $(ACE_ROOT)/ace/Init_ACE.h \ - $(ACE_ROOT)/ace/Init_ACE.i \ - $(ACE_ROOT)/ace/Sock_Connect.h \ - $(ACE_ROOT)/ace/Sock_Connect.i \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Get_Opt.i \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/OS_Log_Msg_Attributes.h \ - $(ACE_ROOT)/ace/OS_Log_Msg_Attributes.inl - -.obj/test_profile_timer.o .obj/test_profile_timer.so .shobj/test_profile_timer.o .shobj/test_profile_timer.so: test_profile_timer.cpp \ - $(ACE_ROOT)/ace/Profile_Timer.h \ - $(ACE_ROOT)/ace/pre.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/post.h \ - $(ACE_ROOT)/ace/ACE_export.h \ - $(ACE_ROOT)/ace/svc_export.h \ - $(ACE_ROOT)/ace/ace_wchar.h \ - $(ACE_ROOT)/ace/ace_wchar.inl \ - $(ACE_ROOT)/ace/OS_Errno.h \ - $(ACE_ROOT)/ace/OS_Export.h \ - $(ACE_ROOT)/ace/OS_Errno.inl \ - $(ACE_ROOT)/ace/OS_Dirent.h \ - $(ACE_ROOT)/ace/OS_Dirent.inl \ - $(ACE_ROOT)/ace/OS_String.h \ - $(ACE_ROOT)/ace/OS_String.inl \ - $(ACE_ROOT)/ace/OS_Memory.h \ - $(ACE_ROOT)/ace/OS_Memory.inl \ - $(ACE_ROOT)/ace/OS_TLI.h \ - $(ACE_ROOT)/ace/OS_TLI.inl \ - $(ACE_ROOT)/ace/Min_Max.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Flag_Manip.h \ - $(ACE_ROOT)/ace/Flag_Manip.i \ - $(ACE_ROOT)/ace/Handle_Ops.h \ - $(ACE_ROOT)/ace/Handle_Ops.i \ - $(ACE_ROOT)/ace/Lib_Find.h \ - $(ACE_ROOT)/ace/Lib_Find.i \ - $(ACE_ROOT)/ace/Init_ACE.h \ - $(ACE_ROOT)/ace/Init_ACE.i \ - $(ACE_ROOT)/ace/Sock_Connect.h \ - $(ACE_ROOT)/ace/Sock_Connect.i \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Time_Value.h \ - $(ACE_ROOT)/ace/High_Res_Timer.h \ - $(ACE_ROOT)/ace/High_Res_Timer.i \ - $(ACE_ROOT)/ace/Profile_Timer.i \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/OS_Log_Msg_Attributes.h \ - $(ACE_ROOT)/ace/OS_Log_Msg_Attributes.inl - -.obj/test_read_buffer.o .obj/test_read_buffer.so .shobj/test_read_buffer.o .shobj/test_read_buffer.so: test_read_buffer.cpp \ - $(ACE_ROOT)/ace/Service_Config.h \ - $(ACE_ROOT)/ace/pre.h \ - $(ACE_ROOT)/ace/Service_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/post.h \ - $(ACE_ROOT)/ace/ACE_export.h \ - $(ACE_ROOT)/ace/svc_export.h \ - $(ACE_ROOT)/ace/ace_wchar.h \ - $(ACE_ROOT)/ace/ace_wchar.inl \ - $(ACE_ROOT)/ace/OS_Errno.h \ - $(ACE_ROOT)/ace/OS_Export.h \ - $(ACE_ROOT)/ace/OS_Errno.inl \ - $(ACE_ROOT)/ace/OS_Dirent.h \ - $(ACE_ROOT)/ace/OS_Dirent.inl \ - $(ACE_ROOT)/ace/OS_String.h \ - $(ACE_ROOT)/ace/OS_String.inl \ - $(ACE_ROOT)/ace/OS_Memory.h \ - $(ACE_ROOT)/ace/OS_Memory.inl \ - $(ACE_ROOT)/ace/OS_TLI.h \ - $(ACE_ROOT)/ace/OS_TLI.inl \ - $(ACE_ROOT)/ace/Min_Max.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Flag_Manip.h \ - $(ACE_ROOT)/ace/Flag_Manip.i \ - $(ACE_ROOT)/ace/Handle_Ops.h \ - $(ACE_ROOT)/ace/Handle_Ops.i \ - $(ACE_ROOT)/ace/Lib_Find.h \ - $(ACE_ROOT)/ace/Lib_Find.i \ - $(ACE_ROOT)/ace/Init_ACE.h \ - $(ACE_ROOT)/ace/Init_ACE.i \ - $(ACE_ROOT)/ace/Sock_Connect.h \ - $(ACE_ROOT)/ace/Sock_Connect.i \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Shared_Object.i \ - $(ACE_ROOT)/ace/Event_Handler.h \ - $(ACE_ROOT)/ace/Event_Handler.i \ - $(ACE_ROOT)/ace/Service_Object.i \ - $(ACE_ROOT)/ace/Signal.h \ - $(ACE_ROOT)/ace/Synch.h \ - $(ACE_ROOT)/ace/Synch.i \ - $(ACE_ROOT)/ace/Synch_T.h \ - $(ACE_ROOT)/ace/Synch_T.i \ - $(ACE_ROOT)/ace/Thread.h \ - $(ACE_ROOT)/ace/Thread_Adapter.h \ - $(ACE_ROOT)/ace/Base_Thread_Adapter.h \ - $(ACE_ROOT)/ace/OS_Log_Msg_Attributes.h \ - $(ACE_ROOT)/ace/OS_Log_Msg_Attributes.inl \ - $(ACE_ROOT)/ace/Base_Thread_Adapter.inl \ - $(ACE_ROOT)/ace/Thread_Adapter.inl \ - $(ACE_ROOT)/ace/Thread.i \ - $(ACE_ROOT)/ace/Atomic_Op.i \ - $(ACE_ROOT)/ace/Synch_T.cpp \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/Signal.i \ - $(ACE_ROOT)/ace/Unbounded_Queue.h \ - $(ACE_ROOT)/ace/Node.h \ - $(ACE_ROOT)/ace/Node.cpp \ - $(ACE_ROOT)/ace/Unbounded_Queue.inl \ - $(ACE_ROOT)/ace/Unbounded_Queue.cpp \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Unbounded_Set.h \ - $(ACE_ROOT)/ace/Unbounded_Set.inl \ - $(ACE_ROOT)/ace/Unbounded_Set.cpp \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Service_Config.i \ - $(ACE_ROOT)/ace/Reactor.h \ - $(ACE_ROOT)/ace/Handle_Set.h \ - $(ACE_ROOT)/ace/Handle_Set.i \ - $(ACE_ROOT)/ace/Timer_Queue.h \ - $(ACE_ROOT)/ace/Timer_Queue_T.h \ - $(ACE_ROOT)/ace/Free_List.h \ - $(ACE_ROOT)/ace/Free_List.i \ - $(ACE_ROOT)/ace/Free_List.cpp \ - $(ACE_ROOT)/ace/Test_and_Set.h \ - $(ACE_ROOT)/ace/Test_and_Set.i \ - $(ACE_ROOT)/ace/Test_and_Set.cpp \ - $(ACE_ROOT)/ace/Timer_Queue_T.i \ - $(ACE_ROOT)/ace/Timer_Queue_T.cpp \ - $(ACE_ROOT)/ace/Reactor.i \ - $(ACE_ROOT)/ace/Reactor_Impl.h \ - $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \ - $(ACE_ROOT)/ace/Read_Buffer.h \ - $(ACE_ROOT)/ace/Malloc.h \ - $(ACE_ROOT)/ace/Malloc.i \ - $(ACE_ROOT)/ace/Malloc_T.h \ - $(ACE_ROOT)/ace/Malloc_Allocator.h \ - $(ACE_ROOT)/ace/Malloc_Allocator.i \ - $(ACE_ROOT)/ace/Malloc_T.i \ - $(ACE_ROOT)/ace/Malloc_T.cpp \ - $(ACE_ROOT)/ace/Memory_Pool.h \ - $(ACE_ROOT)/ace/Mem_Map.h \ - $(ACE_ROOT)/ace/Mem_Map.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ - $(ACE_ROOT)/ace/Memory_Pool.i \ - $(ACE_ROOT)/ace/Read_Buffer.i - -.obj/test_set.o .obj/test_set.so .shobj/test_set.o .shobj/test_set.so: test_set.cpp \ - $(ACE_ROOT)/ace/Containers.h \ - $(ACE_ROOT)/ace/pre.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/post.h \ - $(ACE_ROOT)/ace/ACE_export.h \ - $(ACE_ROOT)/ace/svc_export.h \ - $(ACE_ROOT)/ace/ace_wchar.h \ - $(ACE_ROOT)/ace/ace_wchar.inl \ - $(ACE_ROOT)/ace/OS_Errno.h \ - $(ACE_ROOT)/ace/OS_Export.h \ - $(ACE_ROOT)/ace/OS_Errno.inl \ - $(ACE_ROOT)/ace/OS_Dirent.h \ - $(ACE_ROOT)/ace/OS_Dirent.inl \ - $(ACE_ROOT)/ace/OS_String.h \ - $(ACE_ROOT)/ace/OS_String.inl \ - $(ACE_ROOT)/ace/OS_Memory.h \ - $(ACE_ROOT)/ace/OS_Memory.inl \ - $(ACE_ROOT)/ace/OS_TLI.h \ - $(ACE_ROOT)/ace/OS_TLI.inl \ - $(ACE_ROOT)/ace/Min_Max.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Containers.i \ - $(ACE_ROOT)/ace/Containers_T.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/Flag_Manip.h \ - $(ACE_ROOT)/ace/Flag_Manip.i \ - $(ACE_ROOT)/ace/Handle_Ops.h \ - $(ACE_ROOT)/ace/Handle_Ops.i \ - $(ACE_ROOT)/ace/Lib_Find.h \ - $(ACE_ROOT)/ace/Lib_Find.i \ - $(ACE_ROOT)/ace/Init_ACE.h \ - $(ACE_ROOT)/ace/Init_ACE.i \ - $(ACE_ROOT)/ace/Sock_Connect.h \ - $(ACE_ROOT)/ace/Sock_Connect.i \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Node.h \ - $(ACE_ROOT)/ace/Node.cpp \ - $(ACE_ROOT)/ace/Array_Base.h \ - $(ACE_ROOT)/ace/Array_Base.inl \ - $(ACE_ROOT)/ace/Array_Base.cpp \ - $(ACE_ROOT)/ace/Unbounded_Set.h \ - $(ACE_ROOT)/ace/Unbounded_Set.inl \ - $(ACE_ROOT)/ace/Unbounded_Set.cpp \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/OS_Log_Msg_Attributes.h \ - $(ACE_ROOT)/ace/OS_Log_Msg_Attributes.inl \ - $(ACE_ROOT)/ace/Unbounded_Queue.h \ - $(ACE_ROOT)/ace/Unbounded_Queue.inl \ - $(ACE_ROOT)/ace/Unbounded_Queue.cpp \ - $(ACE_ROOT)/ace/Containers_T.i \ - $(ACE_ROOT)/ace/Containers_T.cpp - -.obj/test_sstring.o .obj/test_sstring.so .shobj/test_sstring.o .shobj/test_sstring.so: test_sstring.cpp \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/pre.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/post.h \ - $(ACE_ROOT)/ace/ACE_export.h \ - $(ACE_ROOT)/ace/svc_export.h \ - $(ACE_ROOT)/ace/ace_wchar.h \ - $(ACE_ROOT)/ace/ace_wchar.inl \ - $(ACE_ROOT)/ace/OS_Errno.h \ - $(ACE_ROOT)/ace/OS_Export.h \ - $(ACE_ROOT)/ace/OS_Errno.inl \ - $(ACE_ROOT)/ace/OS_Dirent.h \ - $(ACE_ROOT)/ace/OS_Dirent.inl \ - $(ACE_ROOT)/ace/OS_String.h \ - $(ACE_ROOT)/ace/OS_String.inl \ - $(ACE_ROOT)/ace/OS_Memory.h \ - $(ACE_ROOT)/ace/OS_Memory.inl \ - $(ACE_ROOT)/ace/OS_TLI.h \ - $(ACE_ROOT)/ace/OS_TLI.inl \ - $(ACE_ROOT)/ace/Min_Max.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Flag_Manip.h \ - $(ACE_ROOT)/ace/Flag_Manip.i \ - $(ACE_ROOT)/ace/Handle_Ops.h \ - $(ACE_ROOT)/ace/Handle_Ops.i \ - $(ACE_ROOT)/ace/Lib_Find.h \ - $(ACE_ROOT)/ace/Lib_Find.i \ - $(ACE_ROOT)/ace/Init_ACE.h \ - $(ACE_ROOT)/ace/Init_ACE.i \ - $(ACE_ROOT)/ace/Sock_Connect.h \ - $(ACE_ROOT)/ace/Sock_Connect.i \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/OS_Log_Msg_Attributes.h \ - $(ACE_ROOT)/ace/OS_Log_Msg_Attributes.inl - -.obj/test_trace.o .obj/test_trace.so .shobj/test_trace.o .shobj/test_trace.so: test_trace.cpp \ - $(ACE_ROOT)/ace/Signal.h \ - $(ACE_ROOT)/ace/pre.h \ - $(ACE_ROOT)/ace/Synch.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/post.h \ - $(ACE_ROOT)/ace/ACE_export.h \ - $(ACE_ROOT)/ace/svc_export.h \ - $(ACE_ROOT)/ace/ace_wchar.h \ - $(ACE_ROOT)/ace/ace_wchar.inl \ - $(ACE_ROOT)/ace/OS_Errno.h \ - $(ACE_ROOT)/ace/OS_Export.h \ - $(ACE_ROOT)/ace/OS_Errno.inl \ - $(ACE_ROOT)/ace/OS_Dirent.h \ - $(ACE_ROOT)/ace/OS_Dirent.inl \ - $(ACE_ROOT)/ace/OS_String.h \ - $(ACE_ROOT)/ace/OS_String.inl \ - $(ACE_ROOT)/ace/OS_Memory.h \ - $(ACE_ROOT)/ace/OS_Memory.inl \ - $(ACE_ROOT)/ace/OS_TLI.h \ - $(ACE_ROOT)/ace/OS_TLI.inl \ - $(ACE_ROOT)/ace/Min_Max.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Flag_Manip.h \ - $(ACE_ROOT)/ace/Flag_Manip.i \ - $(ACE_ROOT)/ace/Handle_Ops.h \ - $(ACE_ROOT)/ace/Handle_Ops.i \ - $(ACE_ROOT)/ace/Lib_Find.h \ - $(ACE_ROOT)/ace/Lib_Find.i \ - $(ACE_ROOT)/ace/Init_ACE.h \ - $(ACE_ROOT)/ace/Init_ACE.i \ - $(ACE_ROOT)/ace/Sock_Connect.h \ - $(ACE_ROOT)/ace/Sock_Connect.i \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Synch.i \ - $(ACE_ROOT)/ace/Synch_T.h \ - $(ACE_ROOT)/ace/Synch_T.i \ - $(ACE_ROOT)/ace/Thread.h \ - $(ACE_ROOT)/ace/Thread_Adapter.h \ - $(ACE_ROOT)/ace/Base_Thread_Adapter.h \ - $(ACE_ROOT)/ace/OS_Log_Msg_Attributes.h \ - $(ACE_ROOT)/ace/OS_Log_Msg_Attributes.inl \ - $(ACE_ROOT)/ace/Base_Thread_Adapter.inl \ - $(ACE_ROOT)/ace/Thread_Adapter.inl \ - $(ACE_ROOT)/ace/Thread.i \ - $(ACE_ROOT)/ace/Atomic_Op.i \ - $(ACE_ROOT)/ace/Synch_T.cpp \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/Event_Handler.h \ - $(ACE_ROOT)/ace/Event_Handler.i \ - $(ACE_ROOT)/ace/Signal.i \ - $(ACE_ROOT)/ace/Task.h \ - $(ACE_ROOT)/ace/Service_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.i \ - $(ACE_ROOT)/ace/Service_Object.i \ - $(ACE_ROOT)/ace/Thread_Manager.h \ - $(ACE_ROOT)/ace/Unbounded_Queue.h \ - $(ACE_ROOT)/ace/Node.h \ - $(ACE_ROOT)/ace/Node.cpp \ - $(ACE_ROOT)/ace/Unbounded_Queue.inl \ - $(ACE_ROOT)/ace/Unbounded_Queue.cpp \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Containers.h \ - $(ACE_ROOT)/ace/Containers.i \ - $(ACE_ROOT)/ace/Containers_T.h \ - $(ACE_ROOT)/ace/Array_Base.h \ - $(ACE_ROOT)/ace/Array_Base.inl \ - $(ACE_ROOT)/ace/Array_Base.cpp \ - $(ACE_ROOT)/ace/Unbounded_Set.h \ - $(ACE_ROOT)/ace/Unbounded_Set.inl \ - $(ACE_ROOT)/ace/Unbounded_Set.cpp \ - $(ACE_ROOT)/ace/Containers_T.i \ - $(ACE_ROOT)/ace/Containers_T.cpp \ - $(ACE_ROOT)/ace/Free_List.h \ - $(ACE_ROOT)/ace/Free_List.i \ - $(ACE_ROOT)/ace/Free_List.cpp \ - $(ACE_ROOT)/ace/Singleton.h \ - $(ACE_ROOT)/ace/Singleton.i \ - $(ACE_ROOT)/ace/Singleton.cpp \ - $(ACE_ROOT)/ace/Object_Manager.h \ - $(ACE_ROOT)/ace/Object_Manager.i \ - $(ACE_ROOT)/ace/Managed_Object.h \ - $(ACE_ROOT)/ace/Managed_Object.i \ - $(ACE_ROOT)/ace/Managed_Object.cpp \ - $(ACE_ROOT)/ace/Thread_Manager.i \ - $(ACE_ROOT)/ace/Task.i \ - $(ACE_ROOT)/ace/Task_T.h \ - $(ACE_ROOT)/ace/Message_Queue.h \ - $(ACE_ROOT)/ace/Message_Block.h \ - $(ACE_ROOT)/ace/Malloc.h \ - $(ACE_ROOT)/ace/Malloc.i \ - $(ACE_ROOT)/ace/Malloc_T.h \ - $(ACE_ROOT)/ace/Malloc_Allocator.h \ - $(ACE_ROOT)/ace/Malloc_Allocator.i \ - $(ACE_ROOT)/ace/Malloc_T.i \ - $(ACE_ROOT)/ace/Malloc_T.cpp \ - $(ACE_ROOT)/ace/Memory_Pool.h \ - $(ACE_ROOT)/ace/Mem_Map.h \ - $(ACE_ROOT)/ace/Mem_Map.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ - $(ACE_ROOT)/ace/Memory_Pool.i \ - $(ACE_ROOT)/ace/Message_Block.i \ - $(ACE_ROOT)/ace/Message_Block_T.h \ - $(ACE_ROOT)/ace/Message_Block_T.i \ - $(ACE_ROOT)/ace/Message_Block_T.cpp \ - $(ACE_ROOT)/ace/IO_Cntl_Msg.h \ - $(ACE_ROOT)/ace/Message_Queue_T.h \ - $(ACE_ROOT)/ace/Message_Queue_T.i \ - $(ACE_ROOT)/ace/Message_Queue_T.cpp \ - $(ACE_ROOT)/ace/Strategies.h \ - $(ACE_ROOT)/ace/Strategies_T.h \ - $(ACE_ROOT)/ace/Service_Config.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Service_Config.i \ - $(ACE_ROOT)/ace/Reactor.h \ - $(ACE_ROOT)/ace/Handle_Set.h \ - $(ACE_ROOT)/ace/Handle_Set.i \ - $(ACE_ROOT)/ace/Timer_Queue.h \ - $(ACE_ROOT)/ace/Timer_Queue_T.h \ - $(ACE_ROOT)/ace/Test_and_Set.h \ - $(ACE_ROOT)/ace/Test_and_Set.i \ - $(ACE_ROOT)/ace/Test_and_Set.cpp \ - $(ACE_ROOT)/ace/Timer_Queue_T.i \ - $(ACE_ROOT)/ace/Timer_Queue_T.cpp \ - $(ACE_ROOT)/ace/Reactor.i \ - $(ACE_ROOT)/ace/Reactor_Impl.h \ - $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \ - $(ACE_ROOT)/ace/Synch_Options.h \ - $(ACE_ROOT)/ace/Synch_Options.i \ - $(ACE_ROOT)/ace/Hash_Map_Manager.h \ - $(ACE_ROOT)/ace/Functor.h \ - $(ACE_ROOT)/ace/Functor.i \ - $(ACE_ROOT)/ace/Functor_T.h \ - $(ACE_ROOT)/ace/Functor_T.i \ - $(ACE_ROOT)/ace/Functor_T.cpp \ - $(ACE_ROOT)/ace/Hash_Map_Manager_T.h \ - $(ACE_ROOT)/ace/Hash_Map_Manager_T.i \ - $(ACE_ROOT)/ace/Hash_Map_Manager_T.cpp \ - $(ACE_ROOT)/ace/Strategies_T.i \ - $(ACE_ROOT)/ace/Strategies_T.cpp \ - $(ACE_ROOT)/ace/Service_Repository.h \ - $(ACE_ROOT)/ace/Service_Types.h \ - $(ACE_ROOT)/ace/Service_Types.i \ - $(ACE_ROOT)/ace/Service_Repository.i \ - $(ACE_ROOT)/ace/WFMO_Reactor.h \ - $(ACE_ROOT)/ace/Process_Mutex.h \ - $(ACE_ROOT)/ace/Process_Mutex.inl \ - $(ACE_ROOT)/ace/WFMO_Reactor.i \ - $(ACE_ROOT)/ace/Strategies.i \ - $(ACE_ROOT)/ace/Message_Queue.i \ - $(ACE_ROOT)/ace/Task_T.i \ - $(ACE_ROOT)/ace/Task_T.cpp \ - $(ACE_ROOT)/ace/Module.h \ - $(ACE_ROOT)/ace/Module.i \ - $(ACE_ROOT)/ace/Module.cpp \ - $(ACE_ROOT)/ace/Stream_Modules.h \ - $(ACE_ROOT)/ace/Stream_Modules.cpp - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/examples/Misc/Makefile.bor b/examples/Misc/Makefile.bor deleted file mode 100644 index 677255b971b..00000000000 --- a/examples/Misc/Makefile.bor +++ /dev/null @@ -1,25 +0,0 @@ -# -# Makefile for building the ACE Misc examples -# - -NAMES = \ - test_dump \ - test_get_opt \ - test_profile_timer \ - test_read_buffer \ - test_set \ - test_sstring \ - test_trace \ - test_XtReactor1 \ - test_XtReactor2 - -OBJFILES = $(OBJDIR)\$(NAME).obj - -CFLAGS = $(ACE_CFLAGS) - -CPPDIR = . - -LIBFILES = $(ACE_LIB) - -!include <$(ACE_ROOT)\include\makeinclude\recurse.bor> -!include <$(ACE_ROOT)\include\makeinclude\build_exe.bor> diff --git a/examples/Misc/test_XtReactor1.cpp b/examples/Misc/test_XtReactor1.cpp deleted file mode 100644 index d2d94036285..00000000000 --- a/examples/Misc/test_XtReactor1.cpp +++ /dev/null @@ -1,175 +0,0 @@ -// $Id$ - -// The following is another test that exercises the Eric C. Newton's -// <ecn@clark.net> XtReactor implementation. - -#include "ace/XtReactor.h" -#include "ace/Reactor.h" -#include "ace/Message_Block.h" - -ACE_RCSID(Misc, test_XtReactor1, "$Id$") - -#if defined (ACE_HAS_XT) -#define String XtString -#include <Xm/PushB.h> - -class Stdout : public ACE_Event_Handler -{ -public: - Stdout (ACE_Reactor * r) - : reactor_ (r), - msg_ (1000000) // Make a very big message block. - { - int flags = ACE_OS::fcntl (ACE_STDOUT, F_GETFL); - - if (flags != -1 - && ACE_OS::fcntl (ACE_STDOUT, - F_SETFL, flags | O_NONBLOCK) != -1) - return; - else - ACE_DEBUG ((LM_DEBUG, - "Unable to set stdout to non-block.")); - } - - ACE_HANDLE get_handle (void) const { return ACE_STDOUT; } - - int handle_output (ACE_HANDLE) - { - char *s = msg_.rd_ptr (); - - if (ACE_OS::write (ACE_STDOUT, s, 1) == 1) - { - ACE_DEBUG ((LM_DEBUG, - "wrote output '%d'\n", - (int) *s)); - msg_.rd_ptr (1); - } - - if (msg_.length () == 0) - { - reactor_->remove_handler (this, - ACE_Event_Handler::WRITE_MASK); - msg_.rd_ptr (msg_.base ()); - msg_.wr_ptr (msg_.base ()); - } - return 0; - } - - void put (char c) - { - if (msg_.length () == 0) - reactor_->register_handler (this, - ACE_Event_Handler::WRITE_MASK); - - if (msg_.wr_ptr () < msg_.end ()) - { - *msg_.wr_ptr () = c; - msg_.wr_ptr (1); - } - else - ACE_DEBUG ((LM_DEBUG, - "Oops... data falling off the end of the buffer!\n")); - } - -private: - ACE_Reactor *reactor_; - ACE_Message_Block msg_; -}; - -class Stdin : public ACE_Event_Handler -{ -public: - Stdin (Stdout *out) - : out_ (out) {} - - ACE_HANDLE get_handle () const { return ACE_STDIN; } - - int handle_input (ACE_HANDLE) - { - char c; - - if (ACE_OS::read (ACE_STDIN, &c, 1) == 1) - out_->put (c); - - return 0; - } - - int handle_timeout (const ACE_Time_Value &tv, const void *) - { - ACE_DEBUG ((LM_DEBUG, - "Timeout! %f\n", - (double) (tv.msec () / 1000.))); - return 0; - } - -private: - Stdout *out_; -}; - -static void -ActivateCB (Widget, XtPointer, XtPointer) -{ - ACE_DEBUG ((LM_DEBUG, - "Button pushed!\n")); -} - -int -main (int argc, char**argv) -{ - // The worlds most useless user interface - Widget top_level = XtVaAppInitialize (NULL, - "buttontest", - NULL, - 0, - &argc, - argv, - NULL, - NULL); - Widget button = XmCreatePushButton (top_level, - "change", - 0, - 0); - XtManageChild (button); - XtAddCallback (button, - XmNactivateCallback, - ActivateCB, - NULL); - - // A reactor beastie. - ACE_XtReactor xreactor (XtWidgetToApplicationContext (top_level)); - ACE_Reactor reactor (&xreactor); - - // Print a message when data is recv'd on stdin... - ACE_Event_Handler *stdin_; - ACE_NEW_RETURN (stdin_, - Stdin (new Stdout (&reactor)), - -1); - reactor.register_handler (stdin_, - ACE_Event_Handler::READ_MASK); - - // Print a message every 10 seconds. - if (reactor.schedule_timer (stdin_, 0, - ACE_Time_Value (10), - ACE_Time_Value (10)) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "%p\n", - "schedule_timer"), - -1); - - // Show the top_level widget. - XtRealizeWidget (top_level); - - // Demonstrate Reactor/Xt event loop unification. - XtAppMainLoop (XtWidgetToApplicationContext (top_level)); - - return 0; -} -#else -int -main (int, char *[]) -{ - ACE_ERROR_RETURN ((LM_ERROR, - "XT not configured for this platform\n"), - 0); -} -#endif /* ACE_HAS_XT */ diff --git a/examples/Misc/test_XtReactor2.cpp b/examples/Misc/test_XtReactor2.cpp deleted file mode 100644 index 568c21f398d..00000000000 --- a/examples/Misc/test_XtReactor2.cpp +++ /dev/null @@ -1,104 +0,0 @@ -// $Id$ - -// The following test exercises the Eric C. Newton's <ecn@clark.net> -// XtReactor implementation. - -#include "ace/XtReactor.h" -#include "ace/Reactor.h" -#include "ace/Message_Block.h" - -ACE_RCSID(Misc, test_XtReactor2, "$Id$") - -#if defined (ACE_HAS_XT) -#define String XtString -#include <Xm/PushB.h> - -class Stdin : public ACE_Event_Handler -{ -public: - ACE_HANDLE get_handle (void) const { return ACE_STDIN; } - - int handle_input (ACE_HANDLE fd) - { - char c; - if (ACE_OS::read (ACE_STDIN, &c, 1)==1) - ACE_DEBUG ((LM_DEBUG, - "Got input '%d'\n", - (int) c)); - return 0; - } - - int handle_timeout (const ACE_Time_Value &tv, - const void *arg) - { - ACE_DEBUG ((LM_DEBUG, - "Timeout! %f\n", - (double) (tv.msec ()/1000.))); - return 0; - } -}; - -static void -ActivateCB (Widget w, XtPointer, XtPointer) -{ - ACE_DEBUG ((LM_DEBUG, - "Button pushed!\n")); -} - -int -main (int argc, char**argv) -{ - // The worlds most useless user interface - Widget top_level = XtVaAppInitialize (NULL, - "buttontest", - NULL, - 0, - &argc, - argv, - NULL, - NULL); - Widget button = XmCreatePushButton (top_level, - "change", - 0, - 0); - XtManageChild (button); - XtAddCallback (button, - XmNactivateCallback, - ActivateCB, - NULL); - - // A reactor beastie. - ACE_XtReactor xreactor (XtWidgetToApplicationContext (top_level)); - ACE_XtReactor reactor (&xreactor); - - // Print a message when data is recv'd on stdin... - ACE_Event_Handler * stdin_; - ACE_NEW_RETURN (stdin_, - Stdin, - -1); - reactor.register_handler (stdin_, - ACE_Event_Handler::READ_MASK); - - // Print a message every 10 seconds - if (reactor.schedule_timer (stdin_, 0, - ACE_Time_Value (10), - ACE_Time_Value (10)) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "%p\n", - "schedule_timer"), -1); - - // Show the top_level widget - XtRealizeWidget (top_level); - - // Demonstrate Reactor/Xt event loop unification: - XtAppMainLoop (XtWidgetToApplicationContext (top_level)); -} -#else -int -main (int, char *[]) -{ - ACE_ERROR_RETURN ((LM_ERROR, - "XT not configured for this platform\n"), - 0); -} -#endif /* ACE_HAS_XT */ diff --git a/examples/Misc/test_dump.cpp b/examples/Misc/test_dump.cpp deleted file mode 100644 index aa54fff047d..00000000000 --- a/examples/Misc/test_dump.cpp +++ /dev/null @@ -1,42 +0,0 @@ -// $Id$ - -// The following code illustrates how the ACE_Dumpable mechanisms are -// integrated into ACE components like the SOCK_Acceptor and -// SOCK_Stream. - -#include "ace/Dump.h" -#include "test_dump.h" - -#include "ace/Reactor.h" - -ACE_RCSID(Misc, test_dump, "$Id$") - -int -main (int, char *[]) -{ - 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; -} - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) -template class ACE_Dumpable_Adapter<SOCK_Stream>; -template class ACE_Dumpable_Adapter<SOCK>; -template class ACE_Dumpable_Adapter<SOCK_Acceptor>; -#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_Dumpable_Adapter<SOCK_Stream> -#pragma instantiate ACE_Dumpable_Adapter<SOCK> -#pragma instantiate ACE_Dumpable_Adapter<SOCK_Acceptor> -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ - diff --git a/examples/Misc/test_dump.h b/examples/Misc/test_dump.h deleted file mode 100644 index b6f9d35affa..00000000000 --- a/examples/Misc/test_dump.h +++ /dev/null @@ -1,50 +0,0 @@ -// $Id$ - -// Define the classes used with templates in test_dump.cpp - -#ifndef __TEST_DUMP_H -#define __TEST_DUMP_H - -#include "ace/Dump.h" -#include "ace/OS.h" - -class SOCK -{ -public: - SOCK (void) { ACE_REGISTER_OBJECT (SOCK); } - ~SOCK (void) { ACE_REMOVE_OBJECT; } - - void dump (void) const { - ACE_OS::fprintf (stderr, "hello from SOCK = %lu\n", (u_long) this); - } - - // ... -}; - -class SOCK_Acceptor : public SOCK -{ -public: - SOCK_Acceptor (void) { ACE_REGISTER_OBJECT (SOCK_Acceptor); } - ~SOCK_Acceptor (void) { ACE_REMOVE_OBJECT; } - - void dump (void) const { - ACE_OS::fprintf (stderr, "hello from SOCK_Acceptor = %lu\n", (u_long) this); - } - - // ... -}; - -class SOCK_Stream : public SOCK -{ -public: - SOCK_Stream (void) { ACE_REGISTER_OBJECT (SOCK_Stream); } - ~SOCK_Stream (void) { ACE_REMOVE_OBJECT; } - - void dump (void) const { - ACE_OS::fprintf (stderr, "hello from SOCK_Stream = %lu\n", (u_long) this); - } - - // ... -}; - -#endif /* __TEST_DUMP_H */ diff --git a/examples/Misc/test_get_opt.cpp b/examples/Misc/test_get_opt.cpp deleted file mode 100644 index cf305556640..00000000000 --- a/examples/Misc/test_get_opt.cpp +++ /dev/null @@ -1,53 +0,0 @@ -// $Id$ - -// Test the ACE_Get_Opt class. - -#include "ace/Get_Opt.h" -#include "ace/Log_Msg.h" - -ACE_RCSID(Misc, test_get_opt, "$Id$") - -int -main (int argc, char *argv[]) -{ - ACE_Get_Opt get_opt (argc, argv, "ab:cd:ef:gh:"); - int c; - - while ((c = get_opt ()) != EOF) - switch (c) - { - case 'a': - ACE_DEBUG ((LM_DEBUG, "got a\n")); - break; - case 'b': - ACE_DEBUG ((LM_DEBUG, "got b with arg %s\n", get_opt.optarg)); - break; - case 'c': - ACE_DEBUG ((LM_DEBUG, "got c\n")); - break; - case 'd': - ACE_DEBUG ((LM_DEBUG, "got d with arg %s\n", get_opt.optarg)); - break; - case 'e': - ACE_DEBUG ((LM_DEBUG, "got e\n")); - break; - case 'f': - ACE_DEBUG ((LM_DEBUG, "got f with arg %s\n", get_opt.optarg)); - break; - case 'g': - ACE_DEBUG ((LM_DEBUG, "got g\n")); - break; - case 'h': - ACE_DEBUG ((LM_DEBUG, "got h with arg %s\n", get_opt.optarg)); - break; - default: - ACE_DEBUG ((LM_DEBUG, "got %c, which is unrecognized!\n", c)); - break; - } - - for (int i = get_opt.optind; i < argc; i++) - ACE_DEBUG ((LM_DEBUG, "optind = %d, argv[optind] = %s\n", - i, argv[i])); - - return 0; -} diff --git a/examples/Misc/test_profile_timer.cpp b/examples/Misc/test_profile_timer.cpp deleted file mode 100644 index a948199315d..00000000000 --- a/examples/Misc/test_profile_timer.cpp +++ /dev/null @@ -1,35 +0,0 @@ -// $Id$ - -#include "ace/Profile_Timer.h" -#include "ace/Log_Msg.h" - -ACE_RCSID(Misc, test_profile_timer, "$Id$") - -static const int DEFAULT_ITERATIONS = 100000000; - -int -main (int argc, char *argv[]) -{ - ACE_Profile_Timer timer; - int iterations = argc > 1 ? ACE_OS::atoi (argv[1]) : DEFAULT_ITERATIONS; - - timer.start (); - - for (int i = 0; i < iterations; i++) - ACE_OS::getpid (); - - timer.stop (); - - ACE_Profile_Timer::ACE_Elapsed_Time et; - - timer.elapsed_time (et); - - ACE_DEBUG ((LM_DEBUG, "iterations = %d\n", iterations)); - ACE_DEBUG ((LM_DEBUG, "real time = %f secs, user time = %f secs, system time = %f secs\n", - et.real_time, et.user_time, et.system_time)); - - ACE_DEBUG ((LM_DEBUG, "time per call = %f usecs\n", - (et.real_time / double (iterations)) * 1000000)); - return 0; -} - diff --git a/examples/Misc/test_read_buffer.cpp b/examples/Misc/test_read_buffer.cpp deleted file mode 100644 index 0b6b61c2aa1..00000000000 --- a/examples/Misc/test_read_buffer.cpp +++ /dev/null @@ -1,26 +0,0 @@ -// $Id$ - -#include "ace/Service_Config.h" -#include "ace/Read_Buffer.h" - -ACE_RCSID(Misc, test_read_buffer, "$Id$") - -int -main (int argc, char *argv[]) -{ - ACE_HANDLE handle = argc > 1 ? ACE_OS::open (argv[1], O_RDONLY) : 0; - int term = argc > 2 ? ACE_OS::atoi (argv[2]) : EOF; - int search = argc > 3 ? ACE_OS::atoi (argv[3]) : '\n'; - int replace = argc > 4 ? ACE_OS::atoi (argv[4]) : '\0'; - - ACE_Read_Buffer rb (handle); - - char *buf; - - while ((buf = rb.read (term, search, replace)) != 0) - { - ACE_OS::write (ACE_STDOUT, buf, rb.size ()); - ACE_Allocator::instance ()->free (buf); - } - return 0; -} diff --git a/examples/Misc/test_set.cpp b/examples/Misc/test_set.cpp deleted file mode 100644 index 4ec0cb948ba..00000000000 --- a/examples/Misc/test_set.cpp +++ /dev/null @@ -1,16 +0,0 @@ -// $Id$ - -#include "ace/Containers.h" - -ACE_RCSID(Misc, test_set, "$Id$") - -int -main (int, char *[]) -{ - return 0; -} - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) -#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ - diff --git a/examples/Misc/test_sstring.cpp b/examples/Misc/test_sstring.cpp deleted file mode 100644 index 9fe6da8555e..00000000000 --- a/examples/Misc/test_sstring.cpp +++ /dev/null @@ -1,25 +0,0 @@ -// $Id$ - -#include "ace/SString.h" -#include "ace/Log_Msg.h" - -ACE_RCSID(Misc, test_sstring, "$Id$") - -int -main (int, char *[]) -{ - ACE_CString s1 ("hello"); - ACE_CString s2 ("world"); - ACE_CString s3 ("el"); - ACE_WString s4 ("hello"); - ACE_WString s5 ("world"); - ACE_WString s6 ("el"); - - ACE_ASSERT (s1 != s2); - ACE_ASSERT (s1.strstr (s2) == -1); - ACE_ASSERT (s1.strstr (s2) == -1); - ACE_ASSERT (s1.strstr (s3)); - ACE_ASSERT (s4.strstr (s5) == -1); - ACE_ASSERT (s5.strstr (s6)); - return 0; -} diff --git a/examples/Misc/test_trace.cpp b/examples/Misc/test_trace.cpp deleted file mode 100644 index 4a97bcd8872..00000000000 --- a/examples/Misc/test_trace.cpp +++ /dev/null @@ -1,116 +0,0 @@ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// examples/Misc -// -// = FILENAME -// test_trace.cpp -// -// = DESCRIPTION -// This example illustrates how to use the ACE tracing feature and -// also illustrates how to redirect the output to a file. -// -// = AUTHOR -// Douglas C. Schmidt <schmidt@cs.wustl.edu> and -// Irfan Pyarali <irfan@cs.wustl.edu> -// -// ============================================================================ - -// Enable tracing -#define ACE_NTRACE 0 - -#include "ace/Signal.h" -#include "ace/Task.h" - -ACE_RCSID(Misc, test_trace, "$Id$") - -class My_Task : public ACE_Task_Base -{ -public: - My_Task (size_t depth) - : depth_ (depth) - { - } - - int recursive (size_t depth); - - virtual int svc (void) - { - return this->recursive (this->depth_); - } - -private: - size_t depth_; - // Depth of the recursion. -}; - - -int -My_Task::recursive (size_t depth) -{ - ACE_Trace _ ("int recursive (size_t depth)", - __LINE__, - __FILE__); - - if (depth > 0) - return recursive (depth - 1); - else - return 0; - // Destructor of <ACE_Trace> automatically called. -} - -extern "C" -void -exithook (void) -{ - ACE_DEBUG ((LM_DEBUG, - "we're outta here!\n")); -} - -int -main (int argc, char *argv[]) -{ - const size_t MAX_DEPTH = argc == 1 ? 10 : atoi (argv[1]); - - ACE_OS::atexit (exithook); - - if (argc > 2) - ACE_Trace::set_nesting_indent (ACE_OS::atoi (argv[2])); - - ACE_Trace _ ("int main (int argc, char *argv[])", - __LINE__, - __FILE__); - - // The following won't work on MVS OpenEdition... - ACE_Sig_Action sig1 ((ACE_SignalHandler) ACE_Trace::start_tracing, - SIGUSR1); - ACE_UNUSED_ARG (sig1); - ACE_Sig_Action sig2 ((ACE_SignalHandler) ACE_Trace::stop_tracing, - SIGUSR2); - ACE_UNUSED_ARG (sig2); - - My_Task task (MAX_DEPTH); - -#if defined(ACE_MT_SAFE) && (ACE_MT_SAFE != 0) - int n_threads = argc > 3 ? ACE_OS::atoi (argv[3]) : 4; - - if (task.activate (n_threads, THR_BOUND | THR_DETACHED) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "%p\n", - "activate"), - -1); - - // Wait for all the threads to exit. - ACE_Thread_Manager::instance ()->wait (); -#else - const int MAX_ITERATIONS = argc > 3 ? ACE_OS::atoi (argv[3]) : 10; - - for (int i = 0; i < MAX_ITERATIONS; i++) - task.svc (); -#endif /* ACE_MT_SAFE */ - - // Destructor automatically called. - return 0; -} |