33#define wxDEPRECATED(x) x
35#include <wx/xml/xml.h>
57 XATTR(
const wxString& aName,
const VALUE_TYPE& aValue );
78 XNODE( wxXmlNodeType aType,
const wxString& aName,
const wxString& aContent = wxEmptyString ) :
79 wxXmlNode( nullptr, aType, aName, aContent )
83 XNODE(
XNODE* aParent, wxXmlNodeType aType,
const wxString& aName,
84 const wxString& aContent = wxEmptyString,
XATTR* aProperties =
nullptr ) :
85 wxXmlNode( aParent, aType, aName, aContent, aProperties )
89 void AddAttribute(
const wxString& aName,
const wxString& aValue )
override;
91 void AddAttribute(
const wxString& aName,
int aValue );
93 void AddAttribute(
const wxString& aName,
double aValue );
97 wxASSERT_MSG(
dynamic_cast<XATTR*
>( aAttr ),
"use XATTR instead of wxXmlAttribute!" );
98 return wxXmlNode::AddAttribute( aAttr );
103 return static_cast<XNODE*
>( wxXmlNode::GetChildren() );
108 return static_cast<XNODE*
>( wxXmlNode::GetNext() );
113 return static_cast<XNODE*
>( wxXmlNode::GetParent() );
116 void AddBool(
const wxString& aKey,
bool aValue );
An extension of wxXmlAttribute that stores a variant type rather than just a string.
std::variant< wxString, int, double > VALUE_TYPE
VALUE_TYPE m_originalValue
void SetValue(const VALUE_TYPE &aValue)
VALUE_TYPE GetValue() const
XNODE * GetParent() const
void AddAttribute(wxXmlAttribute *aAttr) override
XNODE(wxXmlNodeType aType, const wxString &aName, const wxString &aContent=wxEmptyString)
XNODE * GetChildren() const
XNODE(XNODE *aParent, wxXmlNodeType aType, const wxString &aName, const wxString &aContent=wxEmptyString, XATTR *aProperties=nullptr)
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.