mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-23 05:45:35 +08:00
Ref T709, ctor from JSON string
This commit is contained in:
committed by
Mat Sutcliffe
parent
9982f9cfb9
commit
7004e85117
@@ -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; }
|
||||||
|
|||||||
@@ -27,6 +27,9 @@ namespace BlackMisc
|
|||||||
//! Constructor.
|
//! Constructor.
|
||||||
CXSwiftBusSettingsQtFree();
|
CXSwiftBusSettingsQtFree();
|
||||||
|
|
||||||
|
//! JSON Constructor.
|
||||||
|
CXSwiftBusSettingsQtFree(const std::string &json);
|
||||||
|
|
||||||
//! Dtor
|
//! Dtor
|
||||||
virtual ~CXSwiftBusSettingsQtFree() {}
|
virtual ~CXSwiftBusSettingsQtFree() {}
|
||||||
|
|
||||||
|
|||||||
@@ -22,9 +22,10 @@ namespace XSwiftBus
|
|||||||
// void
|
// void
|
||||||
}
|
}
|
||||||
|
|
||||||
CSettings::~CSettings()
|
CSettings::CSettings(const std::string &json) : CXSwiftBusSettingsQtFree(json)
|
||||||
{
|
{
|
||||||
// void
|
// void
|
||||||
}
|
}
|
||||||
|
|
||||||
} // ns
|
} // ns
|
||||||
|
|
||||||
|
|||||||
@@ -23,8 +23,13 @@ namespace XSwiftBus
|
|||||||
//! Constructor.
|
//! Constructor.
|
||||||
CSettings();
|
CSettings();
|
||||||
|
|
||||||
|
//! JSON constructor
|
||||||
|
CSettings(const std::string &json);
|
||||||
|
|
||||||
//! Destructor;
|
//! Destructor;
|
||||||
~CSettings();
|
virtual ~CSettings() {}
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
} // ns
|
} // ns
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user