added save functions to various classes
Each class is responsible for its own saving and loading from the XML data in order to reduce the complexity of the save code.
This commit is contained in:
@@ -47,6 +47,19 @@ Node::~Node()
|
||||
}
|
||||
}
|
||||
|
||||
void Node::Save(QXmlStreamWriter *writer) const
|
||||
{
|
||||
writer->writeStartElement("node");
|
||||
|
||||
writer->writeAttribute("id", id());
|
||||
|
||||
foreach (NodeParam* param, parameters()) {
|
||||
param->Save(writer);
|
||||
}
|
||||
|
||||
writer->writeEndElement(); // node
|
||||
}
|
||||
|
||||
QString Node::Category() const
|
||||
{
|
||||
// Return an empty category for any nodes that don't use one
|
||||
|
||||
Reference in New Issue
Block a user