Ref T709, ctor from JSON string

This commit is contained in:
Klaus Basan
2019-07-30 00:49:17 +02:00
committed by Mat Sutcliffe
parent 9982f9cfb9
commit 7004e85117
4 changed files with 16 additions and 2 deletions

View File

@@ -48,6 +48,11 @@ namespace BlackMisc
CXSwiftBusSettingsQtFree::CXSwiftBusSettingsQtFree() CXSwiftBusSettingsQtFree::CXSwiftBusSettingsQtFree()
{} {}
CXSwiftBusSettingsQtFree::CXSwiftBusSettingsQtFree(const std::string &json)
{
this->parseXSwiftBusString(json);
}
bool CXSwiftBusSettingsQtFree::parseXSwiftBusString(const std::string &json) bool CXSwiftBusSettingsQtFree::parseXSwiftBusString(const std::string &json)
{ {
if (json.empty()) { return false; } if (json.empty()) { return false; }

View File

@@ -27,6 +27,9 @@ namespace BlackMisc
//! Constructor. //! Constructor.
CXSwiftBusSettingsQtFree(); CXSwiftBusSettingsQtFree();
//! JSON Constructor.
CXSwiftBusSettingsQtFree(const std::string &json);
//! Dtor //! Dtor
virtual ~CXSwiftBusSettingsQtFree() {} virtual ~CXSwiftBusSettingsQtFree() {}

View File

@@ -22,9 +22,10 @@ namespace XSwiftBus
// void // void
} }
CSettings::~CSettings() CSettings::CSettings(const std::string &json) : CXSwiftBusSettingsQtFree(json)
{ {
// void // void
} }
} // ns } // ns

View File

@@ -23,8 +23,13 @@ namespace XSwiftBus
//! Constructor. //! Constructor.
CSettings(); CSettings();
//! JSON constructor
CSettings(const std::string &json);
//! Destructor; //! Destructor;
~CSettings(); virtual ~CSettings() {}
};
}; };
} // ns } // ns