aGrUM  0.20.3
a C++ library for (probabilistic) graphical models
ticpp::Attribute Class Reference

Wrapper around TiXmlAttribute. More...

#include <ticpp.h>

+ Inheritance diagram for ticpp::Attribute:
+ Collaboration diagram for ticpp::Attribute:

Public Member Functions

 Attribute ()
 Construct an empty attribute. More...
 
 Attribute (const std::string &name, const std::string &value)
 Construct an attribute with name and value. More...
 
 Attribute (TiXmlAttribute *attribute)
 
template<class T >
void GetValue (T *value) const
 Get the value of this attribute Uses Base::FromString to convert TiXmlAttribute::ValueStr from a std::string, and puts it in the passed pointer. More...
 
std::string Value () const
 Get the value of this attribute. More...
 
template<class T >
void SetValue (const T &value)
 Set the value of this node. More...
 
template<class T >
void GetName (T *name) const
 Get the value of this attribute Uses Base::FromString to convert TiXmlAttribute::Name from a std::string, and puts it in the passed pointer. More...
 
std::string Name () const
 Get the value of this attribute. More...
 
template<class T >
void SetName (const T &name)
 Set the value of this attribute. More...
 
void operator= (const Attribute &copy)
 
 Attribute (const Attribute &copy)
 
 ~Attribute ()
 
AttributeNext (bool throwIfNoAttribute=true) const
 Get the next sibling attribute in the DOM. More...
 
AttributePrevious (bool throwIfNoAttribute=true) const
 Get the previous sibling attribute in the DOM. More...
 
void IterateNext (const std::string &, Attribute **next) const
 
void IteratePrevious (const std::string &, Attribute **previous) const
 
virtual void Print (FILE *file, int depth) const
 All TinyXml classes can print themselves to a filestream. More...
 
template<class T >
std::string ToString (const T &value) const
 Converts any class with a proper overload of the << opertor to a std::string. More...
 
std::string ToString (const std::string &value) const
 
template<class T >
void FromString (const std::string &temp, T *out) const
 Converts a std::string to any class with a proper overload of the >> opertor. More...
 
void FromString (const std::string &temp, std::string *out) const
 Specialization for std::string. More...
 
int Row () const
 Return the position, in the original source file, of this node or attribute. More...
 
int Column () const
 Return the position, in the original source file, of this node or attribute. More...
 
bool operator== (const Base &rhs) const
 Compare internal TiXml pointers to determine is both are wrappers around the same node. More...
 
bool operator!= (const Base &rhs) const
 Compare internal TiXml pointers to determine is both are wrappers around the same node. More...
 
std::string BuildDetailedErrorString () const
 Builds detailed error string using TiXmlDocument::Error() and others. More...
 

Protected Attributes

TiCppRCImpm_impRC
 Holds status of internal TiXmlPointer - use this to determine if object has been deleted already. More...
 

Protected Member Functions

void SetImpRC (TiXmlBase *nodeBase)
 
void ValidatePointer () const
 

Detailed Description

Wrapper around TiXmlAttribute.

Definition at line 297 of file ticpp.h.

Constructor & Destructor Documentation

◆ Attribute() [1/4]

Attribute::Attribute ( )

Construct an empty attribute.

Definition at line 75 of file ticpp.cpp.

References TiCppRCImp::InitRef(), ticpp::Base::m_impRC, SetTiXmlPointer(), and TiXmlAttribute::TiXmlAttribute().

75  {
77  m_impRC->InitRef();
78 }
An attribute is a name-value pair.
Definition: tinyxml.h:915
void SetTiXmlPointer(TiXmlAttribute *newPointer)
Definition: ticpp.cpp:174
void InitRef()
Set Reference Count to 1 - dangerous! - Use only if you are sure of the consequences.
Definition: ticpp.cpp:967
TiCppRCImp * m_impRC
Holds status of internal TiXmlPointer - use this to determine if object has been deleted already...
Definition: ticpp.h:267
+ Here is the call graph for this function:

◆ Attribute() [2/4]

Attribute::Attribute ( const std::string &  name,
const std::string &  value 
)

Construct an attribute with name and value.

Parameters
nameThe name of the attribute
valueThe value of the attribute

Definition at line 85 of file ticpp.cpp.

References TiCppRCImp::InitRef(), and ticpp::Base::m_impRC.

85  {
86  SetTiXmlPointer(new TiXmlAttribute(name, value));
87  m_impRC->InitRef();
88 }
An attribute is a name-value pair.
Definition: tinyxml.h:915
void SetTiXmlPointer(TiXmlAttribute *newPointer)
Definition: ticpp.cpp:174
void InitRef()
Set Reference Count to 1 - dangerous! - Use only if you are sure of the consequences.
Definition: ticpp.cpp:967
TiCppRCImp * m_impRC
Holds status of internal TiXmlPointer - use this to determine if object has been deleted already...
Definition: ticpp.h:267
+ Here is the call graph for this function:

◆ Attribute() [3/4]

Attribute::Attribute ( TiXmlAttribute attribute)

Definition at line 80 of file ticpp.cpp.

References TiCppRCImp::IncRef(), ticpp::Base::m_impRC, and SetTiXmlPointer().

Referenced by ticpp::Element::FirstAttribute(), ticpp::Element::LastAttribute(), Next(), Previous(), and ticpp::Visitor::VisitEnter().

80  {
81  SetTiXmlPointer(attribute);
82  m_impRC->IncRef();
83 }
void SetTiXmlPointer(TiXmlAttribute *newPointer)
Definition: ticpp.cpp:174
void IncRef()
Increment Reference Count.
Definition: ticpp.cpp:956
TiCppRCImp * m_impRC
Holds status of internal TiXmlPointer - use this to determine if object has been deleted already...
Definition: ticpp.h:267
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Attribute() [4/4]

Attribute::Attribute ( const Attribute copy)

Definition at line 101 of file ticpp.cpp.

References TiCppRCImp::DecRef(), TiCppRCImp::IncRef(), ticpp::Base::m_impRC, m_tiXmlPointer, and SetTiXmlPointer().

102  : Base() {
103  // Dropping the reference to the old object
104  this->m_impRC->DecRef();
105 
106  // Pointing to the new Object
108 
109  // The internal tixml pointer changed in the above line
110  this->m_impRC->IncRef();
111 }
void SetTiXmlPointer(TiXmlAttribute *newPointer)
Definition: ticpp.cpp:174
void IncRef()
Increment Reference Count.
Definition: ticpp.cpp:956
Wrapper around TiXmlBase.
Definition: ticpp.h:161
TiXmlAttribute * m_tiXmlPointer
Definition: ticpp.h:299
TiCppRCImp * m_impRC
Holds status of internal TiXmlPointer - use this to determine if object has been deleted already...
Definition: ticpp.h:267
void DecRef()
Decrement Reference Count.
Definition: ticpp.cpp:958
+ Here is the call graph for this function:

◆ ~Attribute()

Attribute::~Attribute ( )

Definition at line 113 of file ticpp.cpp.

References TiCppRCImp::DecRef(), and ticpp::Base::m_impRC.

113 { m_impRC->DecRef(); }
TiCppRCImp * m_impRC
Holds status of internal TiXmlPointer - use this to determine if object has been deleted already...
Definition: ticpp.h:267
void DecRef()
Decrement Reference Count.
Definition: ticpp.cpp:958
+ Here is the call graph for this function:

Member Function Documentation

◆ BuildDetailedErrorString()

std::string ticpp::Base::BuildDetailedErrorString ( ) const
inlineinherited

Builds detailed error string using TiXmlDocument::Error() and others.

Definition at line 238 of file ticpp.h.

References TiXmlDocument::Error(), and ticpp::Base::GetBasePointer().

238  {
239  std::ostringstream full_message;
240 #ifndef TICPP_NO_RTTI
241  TiXmlNode* node = dynamic_cast< TiXmlNode* >(GetBasePointer());
242 
243  if (node != 0) {
244  TiXmlDocument* doc = node->GetDocument();
245 
246  if (doc != 0) {
247  if (doc->Error()) {
248  full_message << "\nDescription: " << doc->ErrorDesc() << "\nFile: "
249  << (strlen(doc->Value()) > 0 ? doc->Value()
250  : "<unnamed-file>")
251  << "\nLine: " << doc->ErrorRow()
252  << "\nColumn: " << doc->ErrorCol();
253  }
254  }
255  }
256 
257 #endif
258  return full_message.str();
259  }
int ErrorCol() const
The column where the error occured. See ErrorRow()
Definition: tinyxml.h:1762
const char * ErrorDesc() const
Contains a textual (english) description of the error if one occurs.
Definition: tinyxml.h:1743
virtual TiXmlBase * GetBasePointer() const =0
bool Error() const
If an error occurs, Error will be set to true.
Definition: tinyxml.h:1740
const char * Value() const
The meaning of &#39;value&#39; changes for the specific type of TiXmlNode.
Definition: tinyxml.h:517
Always the top level node.
Definition: tinyxml.h:1655
int ErrorRow() const
Returns the location (if known) of the error.
Definition: tinyxml.h:1761
const TiXmlDocument * GetDocument() const
Return a pointer to the Document this node lives in.
Definition: tinyxml.cpp:424
The parent class for everything in the Document Object Model.
Definition: tinyxml.h:454
+ Here is the call graph for this function:

◆ Column()

int ticpp::Base::Column ( ) const
inlineinherited

Return the position, in the original source file, of this node or attribute.

Wrapper around TiXmlBase::Row()

Definition at line 215 of file ticpp.h.

References TiXmlBase::Column(), and ticpp::Base::GetBasePointer().

215 { return GetBasePointer()->Column(); }
virtual TiXmlBase * GetBasePointer() const =0
int Column() const
See Row()
Definition: tinyxml.h:276
+ Here is the call graph for this function:

◆ FromString() [1/2]

template<class T >
void ticpp::Base::FromString ( const std::string &  temp,
T *  out 
) const
inlineinherited

Converts a std::string to any class with a proper overload of the >> opertor.

Parameters
tempThe string to be converted
out[OUT] The container for the returned value
Exceptions
ExceptionWhen temp cannot be converted to the target type

Definition at line 189 of file ticpp.h.

189  {
190  std::istringstream val(temp);
191  val >> *out;
192 
193  if (val.fail()) {
194  TICPPTHROW("Could not convert \"" << temp << "\" to target type");
195  }
196  }
#define TICPPTHROW(message)
This allows you to stream your exceptions in.
Definition: ticpp.h:92

◆ FromString() [2/2]

void ticpp::Base::FromString ( const std::string &  temp,
std::string *  out 
) const
inlineinherited

Specialization for std::string.

Definition at line 201 of file ticpp.h.

201  {
202  *out = temp;
203  }

◆ GetBasePointer()

TiXmlBase* ticpp::Attribute::GetBasePointer ( ) const
inlineprivatevirtual

Implements ticpp::Base.

Definition at line 300 of file ticpp.h.

References ticpp::Base::ValidatePointer().

300  {
301  ValidatePointer();
302  return m_tiXmlPointer;
303  }
void ValidatePointer() const
Definition: ticpp.h:281
TiXmlAttribute * m_tiXmlPointer
Definition: ticpp.h:299
+ Here is the call graph for this function:

◆ GetName()

template<class T >
void ticpp::Attribute::GetName ( T *  name) const
inline

Get the value of this attribute Uses Base::FromString to convert TiXmlAttribute::Name from a std::string, and puts it in the passed pointer.

Parameters
name[OUT] A pointer to fill with the name

Definition at line 370 of file ticpp.h.

References ticpp::Base::ValidatePointer().

370  {
371  ValidatePointer();
372  FromString(m_tiXmlPointer->Name(), name);
373  }
const char * Name() const
Return the name of this attribute.
Definition: tinyxml.h:944
void ValidatePointer() const
Definition: ticpp.h:281
void FromString(const std::string &temp, T *out) const
Converts a std::string to any class with a proper overload of the >> opertor.
Definition: ticpp.h:189
TiXmlAttribute * m_tiXmlPointer
Definition: ticpp.h:299
+ Here is the call graph for this function:

◆ GetValue()

template<class T >
void ticpp::Attribute::GetValue ( T *  value) const
inline

Get the value of this attribute Uses Base::FromString to convert TiXmlAttribute::ValueStr from a std::string, and puts it in the passed pointer.

Parameters
value[OUT] A pointer to fill with the value

Definition at line 336 of file ticpp.h.

References ticpp::Base::ValidatePointer().

336  {
337  ValidatePointer();
339  }
void ValidatePointer() const
Definition: ticpp.h:281
const std::string & ValueStr() const
Return the value of this attribute.
Definition: tinyxml.h:951
void FromString(const std::string &temp, T *out) const
Converts a std::string to any class with a proper overload of the >> opertor.
Definition: ticpp.h:189
TiXmlAttribute * m_tiXmlPointer
Definition: ticpp.h:299
+ Here is the call graph for this function:

◆ IterateNext()

void Attribute::IterateNext ( const std::string &  ,
Attribute **  next 
) const

Definition at line 161 of file ticpp.cpp.

References Next().

161  {
162  *next = Next(false);
163 }
Attribute * Next(bool throwIfNoAttribute=true) const
Get the next sibling attribute in the DOM.
Definition: ticpp.cpp:125
+ Here is the call graph for this function:

◆ IteratePrevious()

void Attribute::IteratePrevious ( const std::string &  ,
Attribute **  previous 
) const

Definition at line 165 of file ticpp.cpp.

References Previous().

165  {
166  *previous = Previous(false);
167 }
Attribute * Previous(bool throwIfNoAttribute=true) const
Get the previous sibling attribute in the DOM.
Definition: ticpp.cpp:143
+ Here is the call graph for this function:

◆ Name()

std::string Attribute::Name ( ) const

Get the value of this attribute.

Simple wrapper for TiXmlAttribute::Name.

See also
GetName

Definition at line 120 of file ticpp.cpp.

References ticpp::Base::ValidatePointer().

120  {
121  ValidatePointer();
122  return m_tiXmlPointer->Name();
123 }
const char * Name() const
Return the name of this attribute.
Definition: tinyxml.h:944
void ValidatePointer() const
Definition: ticpp.h:281
TiXmlAttribute * m_tiXmlPointer
Definition: ticpp.h:299
+ Here is the call graph for this function:

◆ Next()

Attribute * Attribute::Next ( bool  throwIfNoAttribute = true) const

Get the next sibling attribute in the DOM.

Definition at line 125 of file ticpp.cpp.

References Attribute(), m_tiXmlPointer, TiXmlAttribute::Next(), and ticpp::Base::ValidatePointer().

Referenced by ticpp::Element::IterateFirst(), and IterateNext().

125  {
126  ValidatePointer();
127  TiXmlAttribute* attribute = m_tiXmlPointer->Next();
128 
129  if (0 == attribute) {
130  if (throwIfNoAttribute) {
131  TICPPTHROW("No more attributes found")
132  } else {
133  return 0;
134  }
135  }
136 
137  Attribute* temp = new Attribute(attribute);
138  attribute->m_spawnedWrappers.push_back(temp);
139 
140  return temp;
141 }
An attribute is a name-value pair.
Definition: tinyxml.h:915
std::vector< ticpp::Base *> m_spawnedWrappers
Remember all wrappers that we&#39;ve created with &#39;new&#39; - ( e.g.
Definition: ticpprc.h:63
#define TICPPTHROW(message)
This allows you to stream your exceptions in.
Definition: ticpp.h:92
void ValidatePointer() const
Definition: ticpp.h:281
const TiXmlAttribute * Next() const
Get the next sibling attribute in the DOM. Returns null at end.
Definition: tinyxml.cpp:1043
TiXmlAttribute * m_tiXmlPointer
Definition: ticpp.h:299
Attribute()
Construct an empty attribute.
Definition: ticpp.cpp:75
Wrapper around TiXmlAttribute.
Definition: ticpp.h:297
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator!=()

bool ticpp::Base::operator!= ( const Base rhs) const
inlineinherited

Compare internal TiXml pointers to determine is both are wrappers around the same node.

Definition at line 231 of file ticpp.h.

References ticpp::Base::GetBasePointer().

231  {
232  return (GetBasePointer() != rhs.GetBasePointer());
233  }
virtual TiXmlBase * GetBasePointer() const =0
+ Here is the call graph for this function:

◆ operator=()

void Attribute::operator= ( const Attribute copy)

Definition at line 90 of file ticpp.cpp.

References TiCppRCImp::DecRef(), TiCppRCImp::IncRef(), ticpp::Base::m_impRC, m_tiXmlPointer, and SetTiXmlPointer().

90  {
91  // Dropping the reference to the old object
92  this->m_impRC->DecRef();
93 
94  // Pointing to the new Object
96 
97  // The internal tixml pointer changed in the above line
98  this->m_impRC->IncRef();
99 }
void SetTiXmlPointer(TiXmlAttribute *newPointer)
Definition: ticpp.cpp:174
void IncRef()
Increment Reference Count.
Definition: ticpp.cpp:956
TiXmlAttribute * m_tiXmlPointer
Definition: ticpp.h:299
TiCppRCImp * m_impRC
Holds status of internal TiXmlPointer - use this to determine if object has been deleted already...
Definition: ticpp.h:267
void DecRef()
Decrement Reference Count.
Definition: ticpp.cpp:958
+ Here is the call graph for this function:

◆ operator==()

bool ticpp::Base::operator== ( const Base rhs) const
inlineinherited

Compare internal TiXml pointers to determine is both are wrappers around the same node.

Definition at line 222 of file ticpp.h.

References ticpp::Base::GetBasePointer().

222  {
223  return (GetBasePointer() == rhs.GetBasePointer());
224  }
virtual TiXmlBase * GetBasePointer() const =0
+ Here is the call graph for this function:

◆ Previous()

Attribute * Attribute::Previous ( bool  throwIfNoAttribute = true) const

Get the previous sibling attribute in the DOM.

Definition at line 143 of file ticpp.cpp.

References Attribute(), m_tiXmlPointer, TiXmlAttribute::Previous(), and ticpp::Base::ValidatePointer().

Referenced by IteratePrevious().

143  {
144  ValidatePointer();
145  TiXmlAttribute* attribute = m_tiXmlPointer->Previous();
146 
147  if (0 == attribute) {
148  if (throwIfNoAttribute) {
149  TICPPTHROW("No more attributes found")
150  } else {
151  return 0;
152  }
153  }
154 
155  Attribute* temp = new Attribute(attribute);
156  attribute->m_spawnedWrappers.push_back(temp);
157 
158  return temp;
159 }
An attribute is a name-value pair.
Definition: tinyxml.h:915
std::vector< ticpp::Base *> m_spawnedWrappers
Remember all wrappers that we&#39;ve created with &#39;new&#39; - ( e.g.
Definition: ticpprc.h:63
#define TICPPTHROW(message)
This allows you to stream your exceptions in.
Definition: ticpp.h:92
void ValidatePointer() const
Definition: ticpp.h:281
TiXmlAttribute * m_tiXmlPointer
Definition: ticpp.h:299
Attribute()
Construct an empty attribute.
Definition: ticpp.cpp:75
const TiXmlAttribute * Previous() const
Get the previous sibling attribute in the DOM. Returns null at beginning.
Definition: tinyxml.cpp:1062
Wrapper around TiXmlAttribute.
Definition: ticpp.h:297
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Print()

void Attribute::Print ( FILE *  file,
int  depth 
) const
virtual

All TinyXml classes can print themselves to a filestream.

Definition at line 169 of file ticpp.cpp.

References m_tiXmlPointer, TiXmlAttribute::Print(), and ticpp::Base::ValidatePointer().

169  {
170  ValidatePointer();
171  m_tiXmlPointer->Print(file, depth);
172 }
void ValidatePointer() const
Definition: ticpp.h:281
virtual void Print(FILE *cfile, int depth) const
All TinyXml classes can print themselves to a filestream or the string class (TiXmlString in non-STL ...
Definition: tinyxml.h:1016
TiXmlAttribute * m_tiXmlPointer
Definition: ticpp.h:299
+ Here is the call graph for this function:

◆ Row()

int ticpp::Base::Row ( ) const
inlineinherited

Return the position, in the original source file, of this node or attribute.

Wrapper around TiXmlBase::Row()

Definition at line 209 of file ticpp.h.

References ticpp::Base::GetBasePointer(), and TiXmlBase::Row().

209 { return GetBasePointer()->Row(); }
virtual TiXmlBase * GetBasePointer() const =0
int Row() const
Return the position, in the original source file, of this node or attribute.
Definition: tinyxml.h:275
+ Here is the call graph for this function:

◆ SetImpRC()

void ticpp::Base::SetImpRC ( TiXmlBase nodeBase)
inlineprotectedinherited

Definition at line 279 of file ticpp.h.

References ticpp::Base::m_impRC, and TiCppRC::m_tiRC.

Referenced by ticpp::NodeImp< TiXmlDeclaration >::SetTiXmlPointer().

279 { m_impRC = nodeBase->m_tiRC; }
TiCppRCImp * m_impRC
Holds status of internal TiXmlPointer - use this to determine if object has been deleted already...
Definition: ticpp.h:267
+ Here is the caller graph for this function:

◆ SetName()

template<class T >
void ticpp::Attribute::SetName ( const T &  name)
inline

Set the value of this attribute.

Uses Base::ToString to convert name to a std::string, then calls TiXmlAttribute::SetName.

Parameters
nameThe name to set

Definition at line 391 of file ticpp.h.

References ticpp::Base::ValidatePointer().

391  {
392  ValidatePointer();
394  }
void ValidatePointer() const
Definition: ticpp.h:281
void SetName(const char *_name)
Set the name of this attribute.
Definition: tinyxml.h:976
std::string ToString(const T &value) const
Converts any class with a proper overload of the << opertor to a std::string.
Definition: ticpp.h:169
TiXmlAttribute * m_tiXmlPointer
Definition: ticpp.h:299
+ Here is the call graph for this function:

◆ SetTiXmlPointer()

void Attribute::SetTiXmlPointer ( TiXmlAttribute newPointer)
private

Definition at line 174 of file ticpp.cpp.

References m_tiXmlPointer.

Referenced by Attribute(), and operator=().

174  {
175  m_tiXmlPointer = newPointer;
176  SetImpRC(newPointer);
177 }
void SetImpRC(TiXmlBase *nodeBase)
Definition: ticpp.h:279
TiXmlAttribute * m_tiXmlPointer
Definition: ticpp.h:299
+ Here is the caller graph for this function:

◆ SetValue()

template<class T >
void ticpp::Attribute::SetValue ( const T &  value)
inline

Set the value of this node.

Uses Base::ToString to convert value to a std::string, then calls TiXmlAttribute::SetValue.

Parameters
valueThe value to set

Definition at line 357 of file ticpp.h.

References ticpp::Base::ValidatePointer().

357  {
358  ValidatePointer();
360  }
void ValidatePointer() const
Definition: ticpp.h:281
std::string ToString(const T &value) const
Converts any class with a proper overload of the << opertor to a std::string.
Definition: ticpp.h:169
TiXmlAttribute * m_tiXmlPointer
Definition: ticpp.h:299
void SetValue(const char *_value)
Set the value.
Definition: tinyxml.h:979
+ Here is the call graph for this function:

◆ ToString() [1/2]

template<class T >
std::string ticpp::Base::ToString ( const T &  value) const
inlineinherited

Converts any class with a proper overload of the << opertor to a std::string.

Parameters
valueThe value to be converted
Exceptions
ExceptionWhen value cannot be converted to a std::string

Definition at line 169 of file ticpp.h.

169  {
170  std::stringstream convert;
171  convert << value;
172 
173  if (convert.fail()) {
174  TICPPTHROW("Could not convert value to text");
175  }
176 
177  return convert.str();
178  }
#define TICPPTHROW(message)
This allows you to stream your exceptions in.
Definition: ticpp.h:92

◆ ToString() [2/2]

std::string ticpp::Base::ToString ( const std::string &  value) const
inlineinherited

Definition at line 180 of file ticpp.h.

180 { return value; }

◆ ValidatePointer()

void ticpp::Base::ValidatePointer ( ) const
inlineprotectedinherited

Definition at line 281 of file ticpp.h.

References TiCppRCImp::IsNull(), and ticpp::Base::m_impRC.

Referenced by GetBasePointer(), GetName(), ticpp::NodeImp< TiXmlDeclaration >::GetTiXmlPointer(), GetValue(), Name(), Next(), Previous(), Print(), SetName(), SetValue(), and Value().

281  {
282  if (m_impRC->IsNull()) {
283  TICPPTHROW("Internal TiXml Pointer is nullptr");
284  }
285  }
#define TICPPTHROW(message)
This allows you to stream your exceptions in.
Definition: ticpp.h:92
bool IsNull()
Returns state of internal pointer - will be null if the object was deleted.
Definition: ticpp.cpp:973
TiCppRCImp * m_impRC
Holds status of internal TiXmlPointer - use this to determine if object has been deleted already...
Definition: ticpp.h:267
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Value()

std::string Attribute::Value ( ) const

Get the value of this attribute.

Simple wrapper for TiXmlAttribute::ValueStr.

See also
GetValue

Definition at line 115 of file ticpp.cpp.

References m_tiXmlPointer, ticpp::Base::ValidatePointer(), and TiXmlAttribute::ValueStr().

115  {
116  ValidatePointer();
117  return m_tiXmlPointer->ValueStr();
118 }
void ValidatePointer() const
Definition: ticpp.h:281
const std::string & ValueStr() const
Return the value of this attribute.
Definition: tinyxml.h:951
TiXmlAttribute * m_tiXmlPointer
Definition: ticpp.h:299
+ Here is the call graph for this function:

Member Data Documentation

◆ m_impRC

TiCppRCImp* ticpp::Base::m_impRC
mutableprotectedinherited

◆ m_tiXmlPointer

TiXmlAttribute* ticpp::Attribute::m_tiXmlPointer
private

Definition at line 299 of file ticpp.h.

Referenced by Attribute(), Next(), operator=(), Previous(), Print(), SetTiXmlPointer(), and Value().


The documentation for this class was generated from the following files: