diff options
author | Christian Linke <Christian.Linke@bmw.de> | 2016-04-20 05:34:04 -0700 |
---|---|---|
committer | Christian Linke <Christian.Linke@bmw.de> | 2016-04-20 06:18:48 -0700 |
commit | 08a54bee2198b948580537033c8945ca5bd6e7f8 (patch) | |
tree | bc1a0c9febfc0714840827b194114b9b4608e2c7 /AudioManagerUtilities | |
parent | 1cd984ef7040cb045f1b52216fda1f18b4596395 (diff) | |
download | audiomanager-08a54bee2198b948580537033c8945ca5bd6e7f8.tar.gz |
enable deleting of CommandLineSingleton
fix log message
Signed-off-by: Christian Linke <Christian.Linke@bmw.de>
Diffstat (limited to 'AudioManagerUtilities')
-rw-r--r-- | AudioManagerUtilities/include/CAmCommandLineSingleton.h | 5 | ||||
-rw-r--r-- | AudioManagerUtilities/src/CAmCommandLineSingleton.cpp | 8 | ||||
-rw-r--r-- | AudioManagerUtilities/src/CAmSocketHandler.cpp | 2 |
3 files changed, 14 insertions, 1 deletions
diff --git a/AudioManagerUtilities/include/CAmCommandLineSingleton.h b/AudioManagerUtilities/include/CAmCommandLineSingleton.h index 7f394ae..10d92d4 100644 --- a/AudioManagerUtilities/include/CAmCommandLineSingleton.h +++ b/AudioManagerUtilities/include/CAmCommandLineSingleton.h @@ -35,8 +35,13 @@ public: const char delimiter = ' ', const std::string& version = "none", bool helpAndVersion = true); + static TCLAP::CmdLine* instance(); + + static void deleteInstance(); + private: + CAmCommandLineSingleton(); virtual ~CAmCommandLineSingleton(); }; diff --git a/AudioManagerUtilities/src/CAmCommandLineSingleton.cpp b/AudioManagerUtilities/src/CAmCommandLineSingleton.cpp index d2dff35..1170c31 100644 --- a/AudioManagerUtilities/src/CAmCommandLineSingleton.cpp +++ b/AudioManagerUtilities/src/CAmCommandLineSingleton.cpp @@ -44,6 +44,14 @@ TCLAP::CmdLine* CAmCommandLineSingleton::instance() return pSingleCmdLine; } +void CAmCommandLineSingleton::deleteInstance() +{ + if (pSingleCmdLine) + delete pSingleCmdLine; + + pSingleCmdLine=NULL; +} + CAmCommandLineSingleton::~CAmCommandLineSingleton() { // TODO Auto-generated destructor stub } diff --git a/AudioManagerUtilities/src/CAmSocketHandler.cpp b/AudioManagerUtilities/src/CAmSocketHandler.cpp index 513c3e0..e4e89d7 100644 --- a/AudioManagerUtilities/src/CAmSocketHandler.cpp +++ b/AudioManagerUtilities/src/CAmSocketHandler.cpp @@ -51,7 +51,7 @@ CAmSocketHandler::CAmSocketHandler() : { if (pipe(mPipe) == -1) { - logError("CAmSerializer could not create pipe!"); + logError("Sockethandler could not create pipe!"); } //add the pipe to the poll - nothing needs to be proccessed here we just need the pipe to trigger the ppoll |