I'm doing this way : BuildConfigCommon. My problem actualy is that I'm not very proud of what i've done :eranif wrote:I still supports my opinion that we should create a separate class for the global configuration - but as you mentioned, it should be deriving from ConfObject and not from SerializedObject
In BuildConfigCommon::ToXml, I create the Configuration (or global-settings) xml node, because ToXml returns one xml node.
So I must do this :
Code: Select all
wxXmlNode *BuildConfig::ToXml() const
{
// Create the common nodes
wxXmlNode *node = m_commonConfig.ToXml();
node->AddProperty(wxT("Name"), m_name);
node->AddProperty(wxT("CompilerType"), m_compilerType);
node->AddProperty(wxT("DebuggerType"), m_debuggerType);
node->AddProperty(wxT("Type"), m_projectType);
wxXmlNode *compile = XmlUtils::FindFirstByTagName(node, wxT("Compiler"));
if (compile) {
compile->AddProperty(wxT("Required"), BoolToString(m_compilerRequired));
}
Well, I keep it like this, I'll see later if there is a better way to implement this.