summaryrefslogtreecommitdiff
path: root/TAO/tests/Portable_Interceptors/Benchmark/Interceptor_Type.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tests/Portable_Interceptors/Benchmark/Interceptor_Type.cpp')
-rw-r--r--TAO/tests/Portable_Interceptors/Benchmark/Interceptor_Type.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/TAO/tests/Portable_Interceptors/Benchmark/Interceptor_Type.cpp b/TAO/tests/Portable_Interceptors/Benchmark/Interceptor_Type.cpp
new file mode 100644
index 00000000000..4d79250c2cb
--- /dev/null
+++ b/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, char *argv[],
+ int &interceptor_type)
+{
+ interceptor_type = IT_NONE;
+ for (int i = 1; i < argc - 1; ++i)
+ {
+ if (ACE_OS_String::strcmp (argv[i], "-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;
+ }
+ }
+}