CHANGED: #1471 CGroupHeader fields can now we serialized.

--HG--
branch : gsoc2012-gui-editor
This commit is contained in:
dfighter1985 2012-08-14 01:22:49 +02:00
parent 7d12259197
commit a390b90ee0
2 changed files with 14 additions and 0 deletions

View file

@ -44,6 +44,7 @@ namespace NLGUI
std::string getProperty( const std::string &name ) const; std::string getProperty( const std::string &name ) const;
void setProperty( const std::string &name, const std::string &value ); void setProperty( const std::string &name, const std::string &value );
xmlNodePtr serialize( xmlNodePtr parentNode, const char *type ) const;
// from CInterfaceGroup // from CInterfaceGroup
virtual bool parse(xmlNodePtr cur, CInterfaceGroup * parentGroup); virtual bool parse(xmlNodePtr cur, CInterfaceGroup * parentGroup);

View file

@ -238,6 +238,19 @@ namespace NLGUI
return CGroupList::setProperty( name, value ); return CGroupList::setProperty( name, value );
} }
xmlNodePtr CGroupHeader::serialize( xmlNodePtr parentNode, const char *type ) const
{
xmlNodePtr node = CGroupList::serialize( parentNode, type );
if( node == NULL )
return NULL;
xmlSetProp( node, BAD_CAST "type", BAD_CAST "header" );
xmlSetProp( node, BAD_CAST "header_max_size", BAD_CAST toString( _HeaderMaxSize ).c_str() );
return node;
}
// ***************************************************************************************************************** // *****************************************************************************************************************
bool CGroupHeader::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup) bool CGroupHeader::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup)
{ {