|
KiCad PCB EDA Suite
|
An extension of wxXmlAttribute that stores a variant type rather than just a string. More...
#include <xnode.h>
Public Types | |
| typedef std::variant< wxString, int, double > | VALUE_TYPE |
Public Member Functions | |
| XATTR () | |
| XATTR (const wxString &aName, const VALUE_TYPE &aValue) | |
| void | SetValue (const VALUE_TYPE &aValue) |
| VALUE_TYPE | GetValue () const |
Private Attributes | |
| VALUE_TYPE | m_originalValue |
An extension of wxXmlAttribute that stores a variant type rather than just a string.
Technically, XML requires that all attribute values be strings, but since XNODE is primarily used for s-expression formatting rather than XML formatting, and KiCad's s-expression format permits integer and floating-point numeric values in lists, this class allows storage of the source value so that it can be properly formatted in the output.
| typedef std::variant<wxString, int, double> XATTR::VALUE_TYPE |
| XATTR::XATTR | ( | const wxString & | aName, |
| const VALUE_TYPE & | aValue ) |
Definition at line 34 of file xnode.cpp.
References m_originalValue, and T.
|
inline |
Definition at line 61 of file xnode.h.
References m_originalValue.
|
inline |
Definition at line 59 of file xnode.h.
References m_originalValue.
|
private |
Definition at line 64 of file xnode.h.
Referenced by GetValue(), SetValue(), and XATTR().