29#define wxDEPRECATED(x) x
31#include <wx/xml/xml.h>
53 XATTR(
const wxString& aName,
const VALUE_TYPE& aValue );
74 XNODE( wxXmlNodeType aType,
const wxString& aName,
const wxString& aContent = wxEmptyString ) :
75 wxXmlNode( nullptr, aType, aName, aContent )
79 XNODE(
XNODE* aParent, wxXmlNodeType aType,
const wxString& aName,
80 const wxString& aContent = wxEmptyString,
XATTR* aProperties =
nullptr ) :
81 wxXmlNode( aParent, aType, aName, aContent, aProperties )
85 void AddAttribute(
const wxString& aName,
const wxString& aValue )
override;
87 void AddAttribute(
const wxString& aName,
int aValue );
89 void AddAttribute(
const wxString& aName,
double aValue );
93 wxASSERT_MSG(
dynamic_cast<XATTR*
>( aAttr ),
"use XATTR instead of wxXmlAttribute!" );
94 return wxXmlNode::AddAttribute( aAttr );
99 return static_cast<XNODE*
>( wxXmlNode::GetChildren() );
104 return static_cast<XNODE*
>( wxXmlNode::GetNext() );
109 return static_cast<XNODE*
>( wxXmlNode::GetParent() );
112 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.