From e4d053e134c37533844a5a4f6d49ba56b2fd6b49 Mon Sep 17 00:00:00 2001 From: "Marcel M. Otte" Date: Sun, 4 Oct 2015 20:10:52 +0200 Subject: [PATCH] working on some methods... --- cpp/CmdLineOptions.cpp | 26 ++++++++++++++++++++++++++ cpp/CmdLineOptions.h | 12 +++++++----- 2 files changed, 33 insertions(+), 5 deletions(-) diff --git a/cpp/CmdLineOptions.cpp b/cpp/CmdLineOptions.cpp index 5deb192..0920c96 100644 --- a/cpp/CmdLineOptions.cpp +++ b/cpp/CmdLineOptions.cpp @@ -10,6 +10,32 @@ namespace cmdlineoptions { CmdLineOptions::~CmdLineOptions() {} + +const std::unique_ptr &CmdLineOptions::i() { + if (!instance) { + instance = std::unique_ptr(new CmdLineOptions()); + } + return instance; +} + +std::shared_ptr