5 #ifndef DDS_USERDEFAULTS_H_ 6 #define DDS_USERDEFAULTS_H_ 8 #include <boost/program_options/variables_map.hpp> 9 #include <boost/uuid/uuid.hpp> 10 #include <boost/uuid/uuid_generators.hpp> 19 namespace user_defaults_api
34 void reinit(
const boost::uuids::uuid& _sid,
const std::string& _cfgFileName,
bool _get_default =
false);
40 void init(
bool _get_default =
false);
41 void init(
const std::string& _cfgFileName,
bool _get_default =
false);
42 void makeDefaultDirs();
73 void setDefaultSID(
const boost::uuids::uuid& _sid)
const noexcept;
76 bool IsSessionRunning(
const boost::uuids::uuid& _sid = boost::uuids::nil_uuid())
const;
78 std::string
getCommanderPidFile(
const boost::uuids::uuid& _sid = boost::uuids::nil_uuid())
const;
89 std::string
getPluginDir(
const std::string& _path,
const std::string& _pluginName)
const;
92 std::string convertAnyToString(
const boost::any& _any)
const;
93 std::string getUnifiedBoolValueForBoolKey(
const std::string& _Key)
const;
94 std::string getSIDName()
const;
95 void addSessionIDtoPath(std::string& _path)
const;
96 void addSessionIDtoPath(std::string& _path,
const boost::uuids::uuid& _sid_)
const;
97 void setSessionID(
const boost::uuids::uuid& _sid);
100 boost::program_options::variables_map m_keys;
102 std::string m_sessionID;
std::string getLogFile() const
Definition: UserDefaults.cpp:420
static boost::uuids::uuid getInitialSID()
Definition: UserDefaults.cpp:43
std::string getServerInfoFileLocation() const
Definition: UserDefaults.cpp:361
static void printDefaults(std::ostream &_stream)
Definition: UserDefaults.cpp:201
bool IsSessionRunning(const boost::uuids::uuid &_sid=boost::uuids::nil_uuid()) const
Definition: UserDefaults.cpp:728
std::string getSIDFile() const
Returns Session ID full file path (return main SID if exists. If there is no main,...
Definition: UserDefaults.cpp:538
std::string getServerInfoFileLocationSrv() const
Definition: UserDefaults.cpp:347
static size_t getNumLeaderFW()
Definition: UserDefaults.cpp:452
std::string getSlotsRootDir() const
Definition: UserDefaults.cpp:748
static std::string getTopologyXSDFilePath()
Definition: UserDefaults.cpp:716
void reinit(const boost::uuids::uuid &_sid, const std::string &_cfgFileName, bool _get_default=false)
Definition: UserDefaults.cpp:48
std::string getCommanderPidFileName() const
Definition: UserDefaults.cpp:684
std::string getSMLeaderInputName(uint64_t _protocolHeaderID) const
Definition: UserDefaults.cpp:465
std::string getAgentLogStorageDir() const
Definition: UserDefaults.cpp:435
static std::string getDDSPath()
Definition: UserDefaults.cpp:334
void setDefaultSID(const boost::uuids::uuid &_sid) const noexcept
Definition: UserDefaults.cpp:655
std::string getLockedSID() const
Definition: UserDefaults.cpp:559
std::string getPluginsRootDir() const
Definition: UserDefaults.cpp:493
const SDDSUserDefaultsOptions_t getOptions() const
Definition: UserDefaults.cpp:317
std::string getSessionsHolderDirName() const
Definition: UserDefaults.cpp:679
std::string getUserEnvScript() const
Definition: UserDefaults.cpp:398
std::string getWrkDir() const
Returns DDS working directory. For agents it is always $DDS_LOCATION.
Definition: UserDefaults.cpp:299
std::string getValueForKey(const std::string &_key) const
Definition: UserDefaults.cpp:281
pid_t getScoutPid() const
Definition: UserDefaults.cpp:444
Miscellaneous functions and helpers are located here.
Definition: AgentConnectionManager.h:13
std::string getSessionsRootDir() const
Definition: UserDefaults.cpp:605
bool isAgentInstance() const
Definition: UserDefaults.cpp:721
std::string getSMLeaderOutputName(uint64_t _protocolHeaderID) const
Definition: UserDefaults.cpp:457
std::string getPluginDir(const std::string &_path, const std::string &_pluginName) const
Returns path to the plugin's directory for specified plug-in name.
Definition: UserDefaults.cpp:500
std::string getServerInfoFileName() const
Definition: UserDefaults.cpp:356
std::string getWnBinsDir() const
Definition: UserDefaults.cpp:709
Definition: dds-user-defaults/src/Options.h:52
std::string getWrkPkgPath() const
Definition: UserDefaults.cpp:388
std::string getWrkPkgDir() const
Definition: UserDefaults.cpp:376
std::string getMainSIDFile() const
Returns the full path to the main Session ID file The function doesn't check wheather the file exists...
Definition: UserDefaults.cpp:525
std::string getWrkScriptPath() const
Definition: UserDefaults.cpp:393
static std::string getAgentIDFileName()
Definition: UserDefaults.cpp:415
Definition: UserDefaults.h:21
std::string getDefaultSIDLinkName() const
Definition: UserDefaults.cpp:612
static CUserDefaults & instance(const boost::uuids::uuid &_sid=CUserDefaults::getInitialSID())
Return singleton instance.
Definition: UserDefaults.cpp:37
std::vector< std::string > getSMLeaderInputNames() const
Definition: UserDefaults.cpp:477
std::string getCommanderPidFile(const boost::uuids::uuid &_sid=boost::uuids::nil_uuid()) const
Definition: UserDefaults.cpp:689
static std::string getAgentIDFilePath()
Definition: UserDefaults.cpp:408
std::string getCurrentSID() const
Definition: UserDefaults.cpp:578
static std::string currentUDFile()
Definition: UserDefaults.cpp:322
std::string getDefaultSID() const
Definition: UserDefaults.cpp:619