26 #include <dtkCoreSupport/dtkAbstractData.h>
27 #include <dtkCoreSupport/dtkAbstractDataFactory.h>
45 return "axlAbstractDataCompositeReader";
50 return "axlAbstractDataCompositeReader";
55 return QStringList() <<
"axlAbstractDataComposite";
65 QDomElement element = node.toElement();
67 if(element.tagName() !=
"composite")
76 return !this->
accept(node);
81 QDomElement element = node.toElement();
86 QString name = element.attribute(
"name");
87 if (!name.isEmpty()) {
88 composite->setObjectName(name);
91 QDomNode n = element.firstChild();
97 QDomElement e = n.toElement();
102 foreach(QString reader, dtkAbstractDataFactory::instance()->readers()) {
106 dtkAbstractData *data = this->dataByReader(axl_reader, e);
109 data->setParent(composite);
110 composite->
add(data);
120 dtkAbstractData *data = this->dataByReader(axl_reader, e);
123 data->setParent(composite);
124 composite->
add(data);
133 dtkAbstractData *data = this->dataByReader(axl_reader, node);
136 data->setParent(composite);
137 composite->
add(data);
155 if(!axl_reader->
accept(node))
158 axl_reader->dtkAbstractDataReader::read(this->file());
axlAbstractData * read(const QDomNode &node)
void add(dtkAbstractData *data)
~axlAbstractDataCompositeReader(void)
static bool registered(void)
QStringList handled(void) const
bool reject(const QDomNode &node)
virtual axlAbstractData * read(const QDomNode &node)=0
QString identifier(void) const
axlAbstractDataCompositeReader(void)
dtkAbstractDataReader * createaxlAbstractDataCompositeReader(void)
virtual bool accept(const QDomNode &node)=0
bool accept(const QDomNode &node)
Class axlAbstractData defines an API for all type of axel data.
QString description(void) const