summaryrefslogtreecommitdiff
path: root/AudioManagerUtilities/src/CAmCommandLineSingleton.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'AudioManagerUtilities/src/CAmCommandLineSingleton.cpp')
-rw-r--r--AudioManagerUtilities/src/CAmCommandLineSingleton.cpp42
1 files changed, 42 insertions, 0 deletions
diff --git a/AudioManagerUtilities/src/CAmCommandLineSingleton.cpp b/AudioManagerUtilities/src/CAmCommandLineSingleton.cpp
new file mode 100644
index 0000000..82971cd
--- /dev/null
+++ b/AudioManagerUtilities/src/CAmCommandLineSingleton.cpp
@@ -0,0 +1,42 @@
+/*
+ * CAmCommandLineSingleton.cpp
+ *
+ * Created on: Apr 15, 2015
+ * Author: genius
+ */
+
+#include "CAmCommandLineSingleton.h"
+#include <cassert>
+
+namespace am {
+
+static TCLAP::CmdLine* pSingleCmdLine = NULL;
+
+CAmCommandLineSingleton::CAmCommandLineSingleton() {
+ // TODO Auto-generated constructor stub
+
+}
+
+TCLAP::CmdLine* CAmCommandLineSingleton::instanciateOnce(const std::string& message,
+ const char delimiter,
+ const std::string& version,
+ bool helpAndVersion)
+{
+ if(NULL==pSingleCmdLine)
+ {
+ pSingleCmdLine = new TCLAP::CmdLine(message,delimiter,version,helpAndVersion);
+ }
+ return pSingleCmdLine;
+}
+
+TCLAP::CmdLine* CAmCommandLineSingleton::instance()
+{
+ assert(NULL!=pSingleCmdLine);
+ return pSingleCmdLine;
+}
+
+CAmCommandLineSingleton::~CAmCommandLineSingleton() {
+ // TODO Auto-generated destructor stub
+}
+
+} /* namespace am */