27 #include "../../se/Interpolate.h"
28 #include "../../xml/Reader.h"
29 #include "../../xml/Writer.h"
50 std::string fbv = reader.
getAttr(
"fallbackValue");
52 interpolate->setFallbackValue(fbv);
55 std::string mode = reader.
getAttr(
"mode");
56 assert(!mode.empty() && (mode ==
"linear" || mode ==
"cosine" || mode ==
"cubic"));
59 else if(mode ==
"cosine")
65 std::string method = reader.
getAttr(
"method");
66 assert(!method.empty() && (method ==
"numeric" || method ==
"color"));
87 return interpolate.release();
130 assert(!ipts.empty());
131 for(std::size_t i = 0; i < ipts.size(); ++i)
132 Save(ipts[i], writer);
TESERIALIZATIONEXPORT te::se::ParameterValue * ReadParameterValue(te::xml::Reader &reader)
Utility methods for Symbology serialization.
TEDATAACCESSEXPORT void Save(const std::string &fileName)
This class models a XML reader object.
void WriteParameterValuePtrHelper(const std::string &elementName, const te::se::ParameterValue *p, te::xml::Writer &writer)
virtual bool hasAttrs() const =0
It tells if the element has attributes in the case of an element node.
virtual bool next()=0
It gets the next event to be read.
const MethodType & geMethodType() const
ModeType
It controls the ...
The transformation of continuous values to a number of values (Interpolate function).
virtual void writeStartElement(const std::string &qName)
virtual void writeAttribute(const std::string &attName, const std::string &value)
virtual void writeEndElement(const std::string &qName)
TESERIALIZATIONEXPORT void Save(const te::fe::Filter *filter, te::xml::Writer &writer)
const ModeType & getModeType() const
const std::string & getFallbackValue() const
TESERIALIZATIONEXPORT te::se::Interpolate * ReadInterpolate(te::xml::Reader &reader)
const std::vector< InterpolationPoint * > & getInterpolationPoints() const
virtual NodeType getNodeType() const =0
It return the type of node read.
Support for InterpolationPoint serialization.
virtual std::string getElementLocalName() const =0
It returns the local part of the element name in the case of an element node.
TESERIALIZATIONEXPORT te::se::InterpolationPoint * ReadInterpolationPoint(te::xml::Reader &reader)
ParameterValue * getLookupValue() const
MethodType
It controls the ...
The transformation of continuous values to a number of values (Interpolate function).
virtual std::string getAttr(const std::string &name) const =0
It returns the attribute value in the case of an element node with valid attributes.
This class models a XML writer object.