blob: 82971cd16bc695b0cf62cfcc528b3e9db591c4b9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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 */
|