1 #ifndef CONFIGCOPYVISITOR_HH
2 #define CONFIGCOPYVISITOR_HH
29 QHash<ConfigObject *, ConfigObject*> &
_map;
48 QHash<ConfigObject *, ConfigObject*> &
_map;
Generic list class for config objects.
Definition: configobject.hh:258
This visitor traverses the the given configuration and clones it.
Definition: configcopyvisitor.hh:12
ConfigCloneVisitor(QHash< ConfigObject *, ConfigObject * > &map)
Constructor.
Definition: configcopyvisitor.cc:12
bool processItem(ConfigItem *item, const ErrorStack &err=ErrorStack())
Traverses the specified config item.
Definition: configcopyvisitor.cc:189
QHash< ConfigObject *, ConfigObject * > & _map
Reference to the translation table origial -> cloned object.
Definition: configcopyvisitor.hh:29
ConfigItem * takeResult(const ErrorStack &err=ErrorStack())
Extracts the cloned item.
Definition: configcopyvisitor.cc:250
QList< QObject * > _stack
Stack of the current object.
Definition: configcopyvisitor.hh:27
bool processList(AbstractConfigObjectList *list, const ErrorStack &err=ErrorStack())
Traverses the list of objects or references.
Definition: configcopyvisitor.cc:209
bool processProperty(ConfigItem *item, const QMetaProperty &prop, const ErrorStack &err=ErrorStack())
Processes the specified property of the item.
Definition: configcopyvisitor.cc:20
Just a name space to hold the copy function.
Definition: configcopyvisitor.hh:54
static ConfigItem * copy(ConfigItem *original, const ErrorStack &err=ErrorStack())
Copies the given item.
Definition: configcopyvisitor.cc:337
Base class for all configuration objects (channels, zones, contacts, etc).
Definition: configobject.hh:40
Base class of all labeled and named objects.
Definition: configobject.hh:199
Implements a stack of error messages to provide a pretty formatted error traceback.
Definition: errorstack.hh:41
Replaces references using a specified map.
Definition: configcopyvisitor.hh:38
bool processProperty(ConfigItem *item, const QMetaProperty &prop, const ErrorStack &err=ErrorStack())
Processes the specified property of the item.
Definition: configcopyvisitor.cc:281
QHash< ConfigObject *, ConfigObject * > & _map
Reference to the translation table origial -> cloned object.
Definition: configcopyvisitor.hh:48
bool _keepUnknown
If false, an unmapped reference is an error.
Definition: configcopyvisitor.hh:50
bool processList(AbstractConfigObjectList *list, const ErrorStack &err=ErrorStack())
Traverses the list of objects or references.
Definition: configcopyvisitor.cc:305
FixReferencesVisistor(QHash< ConfigObject *, ConfigObject * > &map, bool keepUnknown=false)
Constructor.
Definition: configcopyvisitor.cc:271
Base visitor class for the config tree.
Definition: visitor.hh:20