27 #include "../../xlink/SimpleLink.h"
28 #include "../../xml/Reader.h"
29 #include "../../xml/Writer.h"
41 for(std::size_t i = 0; i < n; ++i)
44 std::string attributeValue = reader.
getAttr(i);
46 if(attributeName ==
"href")
47 link->setHref(attributeValue);
49 else if(attributeName ==
"title")
50 link->setTitle(attributeValue);
52 else if(attributeName ==
"role")
53 link->setRole(attributeValue);
55 else if(attributeName ==
"arcrole")
56 link->setArcRole(attributeValue);
58 else if(attributeName ==
"show")
60 if(attributeValue ==
"embed")
63 else if(attributeValue ==
"new")
66 else if(attributeValue ==
"other")
70 else if(attributeName ==
"actuate")
72 if(attributeValue ==
"onLoad")
75 else if(attributeValue ==
"onRequest")
78 else if(attributeValue ==
"other")
83 return link.release();
const std::string & getArcRole() const
const std::string & getHref() const
This class models a XML reader object.
TESERIALIZATIONEXPORT te::xl::SimpleLink * ReadSimpleLink(te::xml::Reader &reader)
virtual std::string getAttrLocalName(std::size_t i) const =0
It returns the local part of the attribute name for the i-th attribute.
virtual std::size_t getNumberOfAttrs() const =0
It returns the number of attributes in the case of an element node.
virtual void writeAttribute(const std::string &attName, const std::string &value)
TESERIALIZATIONEXPORT void Save(const te::fe::Filter *filter, te::xml::Writer &writer)
ActuateType getActuate() const
Support for SimpleLink serialization.
const std::string & getRole() const
const std::string & getTitle() const
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.