AppEasy Core SDK  1.5.0
Cross platform mobile and desktop app and game development SDK - The easy way to make apps
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines
CzXmlAttribute Struct Reference

An Xml attribute, e.g. <Something attribute="some value"> More...

#include <CzXml.h>

List of all members.

Public Member Functions

 CzXmlAttribute ()
virtual ~CzXmlAttribute ()
void Clear ()
void setName (const char *pName)
void setName (char *pName, int len)
CzStringgetName ()
 Gets the name of the attribute.
void setValue (const char *pValue)
void setValue (char *pValue, int len)
CzStringgetValue ()
 Gets the value of the attribute.
int getValueAsInt () const
 Gets the value of the attribute as an integer.
float getValueAsFloat () const
 Gets the value of the attribute as a floating point number.
bool getValueAsBool () const
 Gets the value of the attribute as a boolean.
bool getValueAsPoint (CzVec2 &point)
 Gets the value of the attribute as a vec2.
bool getValueAsPoint3 (CzVec3 &point, float default_y=0, float default_z=0)
 Gets the value of the attribute as a vec3 (if less than 3 values are found then rest will be assigned 0)
bool getValueAsPoint3Copy (CzVec3 &point)
 Gets the value of the attribute as a vec3 (if less than 3 values are found then rest will be assigned the first value)
bool getValueAsPoint4 (CzVec4 &point)
 Gets the value of the attribute as a vec4.
bool getValueAsColour (CzColour &colour)
 Gets the value of the attribute as a colour.
bool getValueAsRect (CzIRect &rect)
 Gets the value of the attribute as a rect.
CzStringListgetValueAsList ()
 Gets the value of the attribute as a list of strings.

Public Attributes

bool Managed
 Managec attributes are managed by the pools system and should not be deleted.
CzString Name
 Attributes name.
CzString Value
 Attributes value.

Detailed Description

An Xml attribute, e.g. <Something attribute="some value">


Constructor & Destructor Documentation

virtual CzXmlAttribute::~CzXmlAttribute ( ) [inline, virtual]

Member Function Documentation

void CzXmlAttribute::Clear ( ) [inline]

Gets the name of the attribute.

Gets the value of the attribute.

Gets the value of the attribute as a boolean.

Gets the value of the attribute as a colour.

Gets the value of the attribute as a floating point number.

Gets the value of the attribute as an integer.

Gets the value of the attribute as a list of strings.

Gets the value of the attribute as a vec2.

bool CzXmlAttribute::getValueAsPoint3 ( CzVec3 point,
float  default_y = 0,
float  default_z = 0 
)

Gets the value of the attribute as a vec3 (if less than 3 values are found then rest will be assigned 0)

Gets the value of the attribute as a vec3 (if less than 3 values are found then rest will be assigned the first value)

Gets the value of the attribute as a vec4.

Gets the value of the attribute as a rect.

void CzXmlAttribute::setName ( const char *  pName) [inline]
Parameters:
pNameSets the name of the attribute
void CzXmlAttribute::setName ( char *  pName,
int  len 
) [inline]
Parameters:
lenSets the name of the attribute
void CzXmlAttribute::setValue ( const char *  pValue) [inline]
Parameters:
pValueSets the value of the attribute
void CzXmlAttribute::setValue ( char *  pValue,
int  len 
) [inline]
Parameters:
lenSets the value of the attribute

Member Data Documentation

Managec attributes are managed by the pools system and should not be deleted.

Attributes name.

Attributes value.


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