AudioManager  7.6.6
Native Application Runtime Environment
CAmCommandLineSingleton.cpp
Go to the documentation of this file.
1 
18 #include <cassert>
19 
20 namespace am {
21 
22 static TCLAP::CmdLine* pSingleCmdLine = NULL;
23 
24 CAmCommandLineSingleton::CAmCommandLineSingleton() {
25  // TODO Auto-generated constructor stub
26 
27 }
28 
29 TCLAP::CmdLine* CAmCommandLineSingleton::instanciateOnce(const std::string& message,
30  const char delimiter,
31  const std::string& version,
32  bool helpAndVersion)
33 {
34  if(NULL==pSingleCmdLine)
35  {
36  pSingleCmdLine = new TCLAP::CmdLine(message,delimiter,version,helpAndVersion);
37  }
38  return pSingleCmdLine;
39 }
40 
42 {
43  assert(NULL!=pSingleCmdLine);
44  return pSingleCmdLine;
45 }
46 
48 {
49  if (pSingleCmdLine)
50  delete pSingleCmdLine;
51 
52  pSingleCmdLine=NULL;
53 }
54 
55 CAmCommandLineSingleton::~CAmCommandLineSingleton() {
56  // TODO Auto-generated destructor stub
57 }
58 
59 } /* namespace am */
A Common-API wrapper class, which loads the common-api runtime and instantiates all necessary objects...
static TCLAP::CmdLine * instance()
static TCLAP::CmdLine * instanciateOnce(const std::string &message, const char delimiter= ' ', const std::string &version="none", bool helpAndVersion=true)
SPDX license identifier: MPL-2.0.