Commit e1d9085b authored by Oliver Bock's avatar Oliver Bock
Browse files

Added support for nested VOGroup objects (in compliance with VOTable 1.1 standard)

git-svn-id: https://svn.origo.ethz.ch/fidelity@8 53d1999f-d1a8-4366-aa61-588fded17473
parent 2500cd61
......@@ -30,8 +30,7 @@ Fidelity::Common::VOGroup::~VOGroup()
delete m_FieldRefList;
delete m_ParamList;
delete m_ParamRefList;
// TODO: VOGroup needs to include itself!
// delete m_GroupList();
delete m_GroupList;
}
void Fidelity::Common::VOGroup::initAttributes()
......@@ -39,8 +38,7 @@ void Fidelity::Common::VOGroup::initAttributes()
m_FieldRefList = new QList<VOFieldRef*>();
m_ParamList = new QList<VOParam*>();
m_ParamRefList = new QList<VOParamRef*>();
// TODO: VOGroup needs to include itself!
// m_GroupList = new QList<VOGroup*>();
m_GroupList = new QList<VOGroup*>();
}
......@@ -107,16 +105,15 @@ bool Fidelity::Common::VOGroup::buildXml(QDomElement* parent)
}
}
// TODO: VOGroup needs to include itself!
// if (!m_GroupList->isEmpty()) {
// for (int i = 0;i < m_GroupList->size();i++) {
// QDomElement tag = doc.createElement("GROUP");
// if(m_GroupList->at(i)->buildXml(&tag) == false) {
// return(false);
// }
// parent->appendChild(tag);
// }
// }
if (!m_GroupList->isEmpty()) {
for (int i = 0;i < m_GroupList->size();i++) {
QDomElement tag = doc.createElement("GROUP");
if(m_GroupList->at(i)->buildXml(&tag) == false) {
return(false);
}
parent->appendChild(tag);
}
}
return(true);
}
......@@ -196,8 +193,8 @@ QList<VOParamRef*>* Fidelity::Common::VOGroup::ParamRefList()
{
return m_ParamRefList;
}
// TODO: VOGroup needs to include itself!
// QList<VOGroup*>* Fidelity::Common::VOGroup::GroupList()
// {
// return m_GroupList;
// }
QList<VOGroup*>* Fidelity::Common::VOGroup::GroupList()
{
return m_GroupList;
}
......@@ -164,7 +164,7 @@ public:
* Get the value of m_GroupList
* @return the value of m_GroupList
*/
// QList<VOGroup*>* GroupList();
QList<VOGroup*>* GroupList();
private:
QString m_ID;
......@@ -176,8 +176,7 @@ private:
QList<VOFieldRef*>* m_FieldRefList;
QList<VOParam*>* m_ParamList;
QList<VOParamRef*>* m_ParamRefList;
// TODO: VOGroup needs to include itself!
// QList<VOGroup*>* m_GroupList;
QList<VOGroup*>* m_GroupList;
void initAttributes();
};}}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment