20 #include <dtkCoreSupport/dtkAbstractData.h>
21 #include <dtkCoreSupport/dtkAbstractDataFactory.h>
39 return "axlFieldSpatialPointDistanceWriter";
44 return "axlFieldSpatialPointDistanceWriter";
49 return QStringList() <<
"axlAbstractField" <<
"axlAbstractFieldSpatial" <<
"axlFieldSpatialCoordinates";
68 return !this->
accept(data);
75 QDomElement fieldElement = doc->createElement(
"field");
78 fieldElement.setAttribute(
"type", field->
identifier());
82 QDomElement parameter = doc->createElement(
"input");
83 parameter.setAttribute(
"xcoordinate", field->
getPoint()->
x());
84 parameter.setAttribute(
"ycoordinate", field->
getPoint()->
y());
85 parameter.setAttribute(
"zcoordinate", field->
getPoint()->
z());
86 parameter.setAttribute(
"type",
"data");
87 fieldElement.appendChild(parameter);
94 QDomElement axlFieldSpatialPointDistanceWriter::elementByWriter(
axlAbstractDataWriter *axl_writer, QDomDocument *doc, dtkAbstractData *data)
101 if(!axl_writer->
accept(data))
104 element = axl_writer->
write(doc, data);
QStringList handled(void) const
QString identifier(void) const
Returns the identifier of the field "axlFieldSpatialPointDistance".
virtual bool accept(dtkAbstractData *data)=0
QString identifier(void) const
axlPoint * getPoint(void)
Returns the reference point.
dtkAbstractDataWriter * createaxlFieldSpatialPointDistanceWriter(void)
Class axlFieldSpatialPointDistance defines an API for spatial field.
~axlFieldSpatialPointDistanceWriter(void)
QString description(void) const
bool accept(dtkAbstractData *data)
bool reject(dtkAbstractData *data)
static bool registered(void)
virtual QDomElement write(QDomDocument *doc, dtkAbstractData *data)=0
QDomElement write(QDomDocument *doc, dtkAbstractData *data)
axlFieldSpatialPointDistanceWriter(void)