10 #ifndef _STRUS_ANALYZER_TOKEN_MARKUP_HPP_INCLUDED
11 #define _STRUS_ANALYZER_TOKEN_MARKUP_HPP_INCLUDED
29 Attribute(
const std::string& name_,
const std::string& value_)
30 :m_name(name_),m_value(value_){}
32 #if __cplusplus >= 201103L
39 :m_name(o.m_name),m_value(o.m_value){}
41 const std::string&
name()
const {
return m_name;}
44 const std::string&
value()
const {
return m_value;}
53 :m_name(),m_attributes(){}
56 :m_name(name_),m_attributes(){}
58 TokenMarkup(
const std::string& name_,
const std::vector<Attribute>& attributes_)
59 :m_name(name_),m_attributes(attributes_){}
61 #if __cplusplus >= 201103L
68 :m_name(o.m_name),m_attributes(o.m_attributes){}
72 const std::string&
name()
const {
return m_name;}
74 const std::vector<Attribute>&
attributes()
const {
return m_attributes;}
78 m_attributes.push_back(
Attribute( name_, value_));
84 std::vector<Attribute> m_attributes;
TokenMarkup()
Default constructor.
Definition: tokenMarkup.hpp:52
const std::string & name() const
Get the tag name of the markup attribute.
Definition: tokenMarkup.hpp:42
const std::vector< Attribute > & attributes() const
Get the list of attributes of the markup element.
Definition: tokenMarkup.hpp:74
TokenMarkup & operator()(const std::string &name_, const std::string &value_)
Definition: tokenMarkup.hpp:76
Structure describing a document markup attribute.
Definition: tokenMarkup.hpp:25
const std::string & name() const
Get the tag name of the markup element.
Definition: tokenMarkup.hpp:72
TokenMarkup(const TokenMarkup &o)
Copy constructor.
Definition: tokenMarkup.hpp:67
Attribute(const Attribute &o)
Copy constructor.
Definition: tokenMarkup.hpp:38
TokenMarkup(const std::string &name_, const std::vector< Attribute > &attributes_)
Constructor.
Definition: tokenMarkup.hpp:58
Structure defining an annotation of text in a document.
Definition: tokenMarkup.hpp:21
TokenMarkup(const std::string &name_)
Constructor.
Definition: tokenMarkup.hpp:55
const std::string & value() const
Get the tag value of the markup attribute.
Definition: tokenMarkup.hpp:44
Attribute(const std::string &name_, const std::string &value_)
Constructor.
Definition: tokenMarkup.hpp:29