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(const std::string &json)
{
this->parseXSwiftBusString(json);
}
bool CXSwiftBusSettingsQtFree::parseXSwiftBusString(const std::string &json)
{
if (json.empty()) { return false; }

View File

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

View File

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

View File

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