summaryrefslogtreecommitdiff
path: root/ACE/apps/FaCE/CE_ARGV.H
diff options
context:
space:
mode:
authorWilliam R. Otte <wotte@dre.vanderbilt.edu>2006-07-24 15:50:30 +0000
committerWilliam R. Otte <wotte@dre.vanderbilt.edu>2006-07-24 15:50:30 +0000
commitc44379cc7d9c7aa113989237ab0f56db12aa5219 (patch)
tree66a84b20d47f2269d8bdc6e0323f338763424d3a /ACE/apps/FaCE/CE_ARGV.H
parent3aff90f4a822fcf5d902bbfbcc9fa931d6191a8c (diff)
downloadATCD-c44379cc7d9c7aa113989237ab0f56db12aa5219.tar.gz
Repo restructuring
Diffstat (limited to 'ACE/apps/FaCE/CE_ARGV.H')
-rw-r--r--ACE/apps/FaCE/CE_ARGV.H90
1 files changed, 90 insertions, 0 deletions
diff --git a/ACE/apps/FaCE/CE_ARGV.H b/ACE/apps/FaCE/CE_ARGV.H
new file mode 100644
index 00000000000..78e848abae1
--- /dev/null
+++ b/ACE/apps/FaCE/CE_ARGV.H
@@ -0,0 +1,90 @@
+// -*- C++ -*-
+//=============================================================================
+/**
+ * @file CE_ARGV.H
+ *
+ * $Id$
+ *
+ * @author Si Mong Park <spark@ociweb.com>
+ */
+//=============================================================================
+
+#ifndef CE_ARGV_H
+#define CE_ARGV_H
+
+#include <windows.h>
+
+
+/**
+ * @class CE_ARGV
+ *
+ * @brief This class is to hash input parameters, argc and argv, for WinCE platform.
+ *
+ * Since WinCE only supports wchar_t as an input from OS, some implementation detail,
+ * especially for CORBA spec, will not support wchar_t (wchar_t) type parameter.
+ * Moreover, WinCE's input parameter type is totally different than any other OS;
+ * all command line parameters will be stored in a single wide-character string with
+ * each unit parameter divided by blank space, and it does not provide the name of
+ * executable (generally known as argv[0]).
+ * This class is to convert CE's command line parameters and simulate as in the same
+ * manner as other general platforms, adding 'root' as a first argc, which is for the
+ * name of executable in other OS.
+ */
+class CE_ARGV
+{
+public:
+ /**
+ * Ctor accepts CE command line as a paramter.
+ */
+ CE_ARGV(wchar_t* cmdLine);
+
+ /**
+ * Default Dtor that deletes any memory allocated for the converted string.
+ */
+ ~CE_ARGV(void);
+
+ /**
+ * Returns the number of command line paramters, same as argc on Unix.
+ */
+ int argc(void);
+
+ /**
+ * Returns the 'char**' that contains the converted command line parameters.
+ */
+ wchar_t** const argv(void);
+
+private:
+ /**
+ * Copy Ctor is not allowed.
+ */
+ CE_ARGV(void);
+
+ /**
+ * Copy Ctor is not allowed.
+ */
+ CE_ARGV(CE_ARGV&);
+
+ /**
+ * Pointer of converted command line paramters.
+ */
+ wchar_t** ce_argv_;
+
+ /**
+ * Integer that is same as argc on other OS's.
+ */
+ int ce_argc_;
+};
+
+
+inline int CE_ARGV::argc()
+{
+ return ce_argc_;
+}
+
+
+inline wchar_t** const CE_ARGV::argv()
+{
+ return ce_argv_;
+}
+
+#endif // CE_ARGV_H