|
| | NodeXML () |
| | Default constructor.
|
| |
| | NodeXML (const NodeXML &node) |
| | Copy constructor.
|
| |
| virtual const std::string & | getTag () const override |
| | Default implementation of tag name retrieval based on drain::Enum<t>.
|
| |
| T | getNativeType () const |
| | Change attributes, styles and classes of a node.
|
| |
|
void | set (const NodeXML< T > &node) |
| |
|
void | set (const intval_t &type) |
| |
|
void | set (const std::string &s) |
| |
|
void | set (const char *s) |
| |
|
void | set (const drain::Castable &s) |
| |
| void | set (const std::initializer_list< std::pair< const char *, const Variable > > &args) |
| |
|
template<class V > |
| void | set (const std::map< std::string, V > &args) |
| |
|
template<class V > |
| void | set (const std::string &key, const V &value) |
| |
|
NodeXML & | operator= (const NodeXML &node) |
| |
|
NodeXML & | operator= (const xml_tag_t &x) |
| |
|
NodeXML & | operator= (const Castable &c) |
| |
|
NodeXML & | operator= (const std::string &s) |
| |
|
NodeXML & | operator= (const char *s) |
| |
|
NodeXML & | operator= (const std::initializer_list< std::pair< const char *, const drain::Variable > > &l) |
| |
| virtual std::ostream & | nodeToStream (std::ostream &ostr, tag_display_mode mode=EMPTY_TAG) const override |
| | Dumps info. Future option: outputs leading and ending tag.
|
| |
|
const NodeXML< drain::image::SLD::tag_t >::xml_default_elem_map_t | xml_default_elems |
| |
|
const NodeXML< image::SLD::tag_t >::xml_default_elem_map_t | xml_default_elems |
| |
|
const NodeXML< Html::tag_t >::xml_default_elem_map_t | xml_default_elems |
| |
|
std::ostream & | docTypeToStream (std::ostream &ostr) |
| |
|
const NodeXML< Html::tag_t >::xml_default_elem_map_t | xml_default_elems |
| |
|
const NodeXML< int >::xml_default_elem_map_t | xml_default_elems |
| |
|
map_t & | getMap () |
| |
|
const map_t & | getMap () const |
| |
|
| XML () |
| | User may optionally filter attributes and CTEST with this using StringTools::replace(XML::encodingMap);.
|
| |
|
| XML (const XML &) |
| |
| template<class T > |
| void | setType (const T &t) |
| |
| void | setType (intval_t t) |
| |
|
const intval_t & | getType () const |
| |
| bool | typeIsSet () const |
| | Return true, if type is any of the arguments.
|
| |
|
template<class T2 , class ... T3> |
| bool | typeIs (const T2 &arg, const T3... args) const |
| | Return true, if type is any of the arguments.
|
| |
| const std::string & | setId () |
| | Makes ID a visible attribute.
|
| |
|
const std::string & | setId (const std::string &s) |
| | Makes ID a visible attribute, with a given value.
|
| |
|
template<char C = '\0', typename ... TT> |
| const std::string & | setId (const TT &...args) |
| | Concatenates arguments to an id.
|
| |
|
const std::string & | getId () const |
| | Returns ID of this element. Hopefully a unique ID...
|
| |
|
bool | isUndefined () const |
| |
|
bool | isComment () const |
| |
|
bool | isCText () const |
| |
|
bool | isStyle () const |
| |
|
bool | isScript () const |
| |
|
bool | isScopePlain () const |
| |
|
bool | isScopeJS () const |
| |
|
bool | isScope () const |
| |
| virtual bool | isSingular () const |
| | Tell if this element should always have an explicit closing tag even when empty, like <STYLE></STYLE>
|
| |
| virtual bool | isExplicit () const |
| | Tell if this element should always have an explicit closing tag even when empty, like <STYLE></STYLE>
|
| |
| void | reset () |
| | Keep the element type but clear style, class and string data.
|
| |
| virtual void | swapXML (XML &node) |
| |
|
template<class ... T> |
| void | setComment (const T &...args) |
| | Make this node a comment. Contained tree will not be deleted. In current version, attributes WILL be rendered.
|
| |
|
template<class ... T> |
| void | setCommentSafe (const T &...args) |
| | Sets XML style comment <--...--> of concatenated arguments.
|
| |
| virtual void | setText (const std::string &s) |
| | Assign the text content of this node. If the node type is undefined, set it to CTEXT.
|
| |
|
template<class ... T> |
| void | setText (const T &...args) |
| |
| template<class ... T> |
| void | setTextSafe (const T &...args) |
| | Sets slightly converted text, ensuring some XML entities.
|
| |
| template<class ... T> |
| void | setProgramComment (const T &...args) |
| | Sets text surrounded by C language comment marks.
|
| |
|
virtual const std::string & | getText () const |
| |
|
const std::string & | getUrl () |
| |
| virtual void | setUrl (const std::string &s) |
| |
|
template<class ... T> |
| void | setName (const T &...args) |
| |
|
const FlexibleVariable & | getName () const |
| |
|
virtual bool | empty () const |
| |
|
bool | hasAttribute (const std::string &key) |
| |
|
bool | hasUserAttribute (const std::string &key) |
| |
|
const map_t & | getAttributes () const |
| |
|
map_t & | getAttributes () |
| |
|
const drain::FlexibleVariable & | getAttribute (const std::string &key) const |
| |
|
drain::FlexibleVariable & | getAttribute (const std::string &key) |
| |
|
template<class V > |
| V | getAttribute (const std::string &key, const V &defaultValue) const |
| |
|
std::string | getAttribute (const std::string &key, const char *defaultValue) const |
| |
|
const drain::FlexibleVariable & | getUserAttribute (const std::string &key) const |
| |
|
drain::FlexibleVariable & | getUserAttribute (const std::string &key) |
| |
|
template<class V > |
| V | getUserAttribute (const std::string &key, const V &defaultValue) const |
| |
|
std::string | getUserAttribute (const std::string &key, const char *defaultValue) const |
| |
| virtual void | setAttribute (const std::string &key, const std::string &value) |
| | Default implementation. Needed for handling units in strings, like "50%" or "640px".
|
| |
| virtual void | setAttribute (const std::string &key, const char *value) |
| | Default implementation. Needed for handling units in strings, like "50%" or "640px".
|
| |
|
template<class ... TT> |
| void | setAttribute (const std::string &key, const TT &... args) |
| | "Final" implementation.
|
| |
|
template<class ... TT> |
| void | setUserAttribute (const std::string &key, const TT &... args) |
| |
|
void | removeAttribute (const std::string &s) |
| |
|
const StyleXML & | getStyle () const |
| |
|
Variable & | getStyle (const std::string &key) |
| |
|
template<class T > |
| T | getStyle (const std::string &key, const T &defaultValue) const |
| |
|
void | setStyle (const StyleXML &s) |
| |
|
void | setStyle (const std::string &value) |
| |
|
void | setStyle (const char *value) |
| |
|
void | setStyle (const std::string &key, const std::string &value) |
| |
| template<class V > |
| void | setStyle (const std::string &key, const std::initializer_list< V > &l) |
| | Set style of an element.
|
| |
| template<class ... TT> |
| void | setStyle (const std::string &key, const TT &... args) |
| | For element/class/id, assign ...
|
| |
|
void | setStyle (const std::initializer_list< std::pair< const char *, const drain::Variable > > &args) |
| |
|
template<class V > |
| void | setStyle (const std::map< std::string, V > &args) |
| |
|
const ClassListXML & | getClasses () const |
| |
|
template<typename ... TT> |
| void | addClass (const TT &... args) |
| |
|
void | addClass (const ClassListXML &clist) |
| |
| template<class V > |
| bool | hasClass (const V &cls) const |
| |
|
template<class V > |
| void | removeClass (const V &cls) |
| |
|
void | clearClasses () |
| |
| virtual void | specificAttributesToStream (std::ostream &ostr) const |
| |
|
| static const std::string & | getTag (const T &type) |
| |
|
template<class V > |
| static std::ostream & | docToStream (std::ostream &ostr, const V &tree) |
| |
| static std::ostream & | docTypeToStream (std::ostream &ostr) |
| | Write the XML definition beginning any XML document.
|
| |
|
static const std::map< char, std::string > & | getKeyConversionMap () |
| | Characters that must be avoided in XML attribute keys: space, tab, =.
|
| |
|
static const std::map< char, std::string > & | getAttributeConversionMap () |
| | Characters that must be avoided in XML attribute values: ".
|
| |
|
static const std::map< char, std::string > & | getCTextConversionMap () |
| | Characters to avoid in XML free text: <, >, {, },.
|
| |
|
static int | getCount () |
| |
|
static int | getNewIndex () |
| |
| template<class N > |
| static std::ostream & | toStream (std::ostream &ostr, const UnorderedMultiTree< N > &tree, int indent=0) |
| |
|
template<class N > |
| static std::ostream & | styleToStream (std::ostream &ostr, const UnorderedMultiTree< N > &tree, int indent=0) |
| |
|
template<class N > |
| static std::ostream & | textToStream (std::ostream &ostr, const UnorderedMultiTree< N > &tree, int indent=0) |
| |
|
static const std::map< char, std::string > & | getEntityMap () |
| | Handy map for converting characters to XML entities. Example: '&' -> "&".
|
| |
|
template<class V > |
| static void | xmlAttribToStream (std::ostream &ostr, const std::string &key, const V &value) |
| | Handy map for converting characters to XML entities. Example: '&' -> "&".
|
| |
| template<typename N > |
| static N & | xmlAssignNode (N &dst, const N &src) |
| | Assign tree node (data) to another.
|
| |
template<class T = int>
class drain::NodeXML< T >
- Template Parameters
-
| T | - index type; may be enum. |