From 64944e1fa72f346f1161da60c033de2e10513bea Mon Sep 17 00:00:00 2001 From: Christian Linke Date: Wed, 15 Apr 2015 19:05:53 +0200 Subject: * implemend command line options for plugins. rework of command line * add tclap as template library * implement bug 344 Signed-off-by: Christian Linke --- .../src/CAmCommandLineSingleton.cpp | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 AudioManagerUtilities/src/CAmCommandLineSingleton.cpp (limited to 'AudioManagerUtilities/src') 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 + +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 */ -- cgit v1.2.1