42#include "drain/util/FileInfo.h"
44#include "drain/util/TreeXML.h"
45#include "drain/util/UtilsXML.h"
53typedef UnorderedMultiTree<NodeSLD,false, drain::NodeXML<>::path_t> TreeSLD;
60 UNDEFINED=XML::UNDEFINED,
79 StyledLayerDescriptor,
96DRAIN_ENUM_DICT(image::SLD::tag_t);
98DRAIN_ENUM_OSTREAM(image::SLD::tag_t)
124 NodeSLD(SLD::tag_t t = SLD::UNDEFINED);
155 void setAttribute(
const std::string & key,
const std::string &value)
override;
159 void setAttribute(
const std::string & key,
const char *value)
override;
169 void handleType() override final;
178std::ostream & operator<<(std::ostream &ostr, const image::
NodeSLD & node){
179 return node.nodeToStream(ostr);
183std::ostream & operator<<(std::ostream &ostr,
const image::TreeSLD & tree){
196DRAIN_TYPENAME(image::NodeSLD);
197DRAIN_TYPENAME(image::SLD::tag_t);
201const NodeXML<image::SLD::tag_t>::xml_default_elem_map_t NodeXML<image::SLD::tag_t>::xml_default_elems;
206void image::TreeSLD::initChild(image::TreeSLD & child)
const {
207 UtilsXML::initChildWithDefaultType(*
this, child);
213image::TreeSLD & image::TreeSLD::operator=(std::initializer_list<std::pair<const char *,const Variable> > l){
215 UtilsXML::assign(*
this, l);
223image::TreeSLD & image::TreeSLD::operator=(
const T & arg){
224 UtilsXML::assign(*
this, arg);
231image::TreeSLD & image::TreeSLD::operator=(
const std::string & arg){
232 UtilsXML::assignString(*
this, arg);
262image::TreeSLD & image::TreeSLD::operator()(
const image::SLD::tag_t & type){
263 return UtilsXML::setType(*
this, type);
282image::TreeSLD & image::TreeSLD::operator[](
const image::SLD::tag_t & type);
286const image::TreeSLD & image::TreeSLD::operator[](
const image::SLD::tag_t & type)
const ;
static std::ostream & docToStream(std::ostream &ostr, const V &tree)
Definition TreeXML.h:733
static N & xmlAssignNode(N &dst, const N &src)
Assign tree node (data) to another.
Definition XML.h:664
NodeSLD & operator=(const std::initializer_list< Variable::init_pair_t > &l)
Copy data from a node. (Does not copy subtree.)
Definition TreeSLD.h:141
virtual void setAttribute(const std::string &key, const std::string &value) override
Set attribute value, handling units in string arguments, like in "50%" or "640px".
Definition TreeSLD.cpp:146
virtual bool isSingular() const override final
Tell if this element should always have an explicit closing tag even when empty, like <STYLE></STYLE>
Definition TreeSLD.cpp:107
NodeSLD & operator=(const NodeSLD &node)
Copy data from a node. (Does not copy subtree.)
Definition TreeSLD.h:134
Definition DataSelector.cpp:1277