21 #ifndef CONFIGURATION_NODE_H
22 #define CONFIGURATION_NODE_H
27 #include <QStringList>
31 class ParameterSettable;
37 enum ObjectCreationStatus {
40 ObjectCreatedNotConfigured,
44 CreatingAndConfiguringObject,
48 ObjectCreatedAndConfigured
77 objectStatus(ObjectNotCreated)
86 objectStatus(other.objectStatus)
152 QList<const ConfigurationNode*> getAncestors()
const;
161 QStringList getAncestorsNames()
const;
168 QString getName()
const
179 QString getFullName()
const;
188 return m_name.isNull();
196 bool isCaseSensitive()
const
198 return m_caseSensitive;
240 bool deleteNode(QString name);
249 bool renameNode(QString oldName, QString newName);
256 QList<ConfigurationNode*> getChildrenNodesList();
263 QStringList getChildrenList()
const;
273 QStringList getFilteredChildrenList(QRegExp filter)
const;
288 bool setObjectForNode(QString path,
ParameterSettable*
object, ObjectCreationStatus status = ObjectCreatedAndConfigured);
306 ObjectAndStatus getObjectForNode(QString path)
const;
316 bool addParameter(QString name);
346 QString getValue(QString path,
bool alsoMatchParents =
false)
const;
378 ObjectAndStatus getObject(QString path,
bool alsoMatchParents =
false)
const;
388 bool setValue(QString path, QString value);
408 bool deleteParameter(QString name);
416 QStringList getParametersList()
const;
427 QStringList getFilteredParametersList(QRegExp filter)
const;
434 QStringList getObjectParametersList()
const;
443 QStringList getFilteredObjectParametersList(QRegExp filter)
const;
460 const bool m_caseSensitive;
465 const QString m_name;
477 mutable QString m_nullValue;
482 ObjectAndStatus m_object;
487 QMap<QString, ConfigurationNode*> m_children;
492 QStringList m_childrenkeys;
497 QMap<QString, QString> m_parameters;
502 QStringList m_parameterskeys;
507 QMap<QString, ObjectAndStatus> m_objectParameters;