diff options
Diffstat (limited to 'ACE/TAO/tests/Portable_Interceptors/Benchmark/Interceptor_Type.cpp')
-rw-r--r-- | ACE/TAO/tests/Portable_Interceptors/Benchmark/Interceptor_Type.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/ACE/TAO/tests/Portable_Interceptors/Benchmark/Interceptor_Type.cpp b/ACE/TAO/tests/Portable_Interceptors/Benchmark/Interceptor_Type.cpp new file mode 100644 index 00000000000..d92a5761c36 --- /dev/null +++ b/ACE/TAO/tests/Portable_Interceptors/Benchmark/Interceptor_Type.cpp @@ -0,0 +1,29 @@ +// -*- C++ -*- +// +// $Id$ +// + +#include "Interceptor_Type.h" +#include "ace/OS_String.h" + +ACE_RCSID (Benchmark, Interceptor_Type, "$Id$") + +void get_interceptor_type (int argc, ACE_TCHAR *argv[], + int &interceptor_type) +{ + interceptor_type = IT_NONE; + for (int i = 1; i < argc - 1; ++i) + { + if (ACE_OS_String::strcmp (argv[i], ACE_TEXT ("-r")) == 0) + { + if (ACE_OS_String::strcmp (argv[i+1], ACE_TEXT ("none")) == 0) + interceptor_type = IT_NONE; + if (ACE_OS_String::strcmp (argv[i+1], ACE_TEXT ("noop")) == 0) + interceptor_type = IT_NOOP; + if (ACE_OS_String::strcmp (argv[i+1], ACE_TEXT ("context")) == 0) + interceptor_type = IT_CONTEXT; + if (ACE_OS_String::strcmp (argv[i+1], ACE_TEXT ("dynamic")) == 0) + interceptor_type = IT_DYNAMIC; + } + } +} |