32 #include <mt/mt_variant.h>
59 const std::string& el_name =
"");
63 const std::string& el_name =
"");
74 bool operator==(
const Element& el)
const;
76 bool operator!=(
const Element& el)
const;
82 MtVariant& getGeometryRef();
83 const MtVariant& getGeometryRef()
const;
86 const std::string
getName()
const;
87 std::string& getNameRef();
88 const std::string& getNameRef()
const;
94 void setName(
const std::string& el_name);
101 std::string m_el_name;
109 std::ostream& operator<<(std::ostream& os,
117 inline Element::Element() {}
119 inline Element::Element(
const MtVariant& geom,
120 const std::string& el_name) :
123 m_el_name (el_name) {}
125 template<
class T>
inline
126 Element::Element(
const T& val,
127 const std::string& el_name) :
129 m_geom (MtVariant(val)),
130 m_el_name (el_name) {}
135 inline bool Element::operator==(
const Element& el)
const
137 return (m_geom == el.getGeometry() &&
138 m_el_name == el.getName());
142 inline bool Element::operator!=(
const Element& el)
const
144 return !(*
this == el);
156 inline MtVariant& Element::getGeometryRef()
162 inline const MtVariant& Element::getGeometryRef()
const
174 inline std::string& Element::getNameRef()
180 inline const std::string& Element::getNameRef()
const
202 inline std::ostream& operator<<(std::ostream& os,
205 return os << el.
getName() <<
":\n"
212 #endif // MT_ELEMENT_H