19 #include <dtkCoreSupport/dtkAbstractData.h>
20 #include <dtkCoreSupport/dtkAbstractDataFactory.h>
38 return "axlFieldParametricSurfaceWriter";
43 return "axlFieldParametricSurfaceWriter";
48 return QStringList() <<
"axlFieldParametricSurface";
67 return !this->
accept(data);
74 QDomElement fieldElement = doc->createElement(
"field");
77 fieldElement.setAttribute(
"type", field->
identifier());
81 fieldElement.setAttribute(
"valueType",
"int");
83 fieldElement.setAttribute(
"valueType",
"float");
85 fieldElement.setAttribute(
"valueType",
"double");
91 fieldElement.setAttribute(
"support",
"point");
93 fieldElement.setAttribute(
"support",
"cell");
95 fieldElement.setAttribute(
"support",
"custom");
100 fieldElement.setAttribute(
"kind",
"scalar");
102 fieldElement.setAttribute(
"kind",
"vector");
104 fieldElement.setAttribute(
"kind",
"tensor");
109 qDebug() << Q_FUNC_INFO << field->
getFunction()->identifier();
111 qDebug() << Q_FUNC_INFO <<
"writer found for function";
112 QDomElement functionElement = function_writer->
write(doc, field->
getFunction());
113 fieldElement.appendChild(functionElement);
122 QDomElement axlFieldParametricSurfaceWriter::elementByWriter(
axlAbstractDataWriter *axl_writer, QDomDocument *doc, dtkAbstractData *data)
129 if(!axl_writer->
accept(data))
132 element = axl_writer->
write(doc, data);
axlFieldParametricSurfaceWriter(void)
Class axlFieldParametricSurface defines an API for field which owns a BSpline Surface as a function a...
QString description(void) const
QString identifier(void) const
virtual bool accept(dtkAbstractData *data)=0
axlAbstractData * getFunction(void)
Returns the Bspline function which determines the values of the parametric field. ...
virtual QString identifier(void) const
Returns the identifier of the field "axlFieldParametricSurface".
QDomElement write(QDomDocument *doc, dtkAbstractData *data)
~axlFieldParametricSurfaceWriter(void)
virtual Support support(void)
static bool registered(void)
dtkAbstractDataWriter * createaxlFieldParametricSurfaceWriter(void)
bool accept(dtkAbstractData *data)
bool reject(dtkAbstractData *data)
QStringList handled(void) const
virtual QDomElement write(QDomDocument *doc, dtkAbstractData *data)=0