Skip to content

Inscoper::XMLAttribute

XMLAttribute class represents an attribute of an XML node. More...

#include <XMLAttribute.h>

Public Functions

Name
XMLAttribute()
Default constructor.
XMLAttribute(XMLAttribute const & node)
Copy constructor.
XMLAttribute(XMLAttribute && node)
Move constructor.
XMLAttribute & operator=(XMLAttribute const & node)
Copy assignment operator.
XMLAttribute & operator=(XMLAttribute && node)
Move assignment operator.
~XMLAttribute()
Destructor.
std::string asString()
Get value as string.
int asInt()
Get value as int.
unsigned int asUInt()
Get value as unsigned int.
double asDouble()
Get value as double.
float asFloat()
Get value as float.
bool asBool()
Get value as boolean.
long long asLLong()
Get value as long long.
unsigned long long asULLong()
Get value as unsigned long long.
unsigned short asUShort()
Get value as unsigned short.
unsigned char asUChar()
Get value as unsigned char.
char asChar()
Get value as char.
bool isEmpty()
Check if attribute is empty.

Friends

Name
class XMLNode

Detailed Description

class Inscoper::XMLAttribute;

XMLAttribute class represents an attribute of an XML node.

This class provides methods to access the value of an XML attribute in various data types.

Public Functions Documentation

function XMLAttribute

XMLAttribute()

Default constructor.

function XMLAttribute

XMLAttribute(
    XMLAttribute const & node
)

Copy constructor.

Parameters:

function XMLAttribute

XMLAttribute(
    XMLAttribute && node
)

Move constructor.

Parameters:

function operator=

XMLAttribute & operator=(
    XMLAttribute const & node
)

Copy assignment operator.

Parameters:

Return: Reference to this XMLAttribute

function operator=

XMLAttribute & operator=(
    XMLAttribute && node
)

Move assignment operator.

Parameters:

Return: Reference to this XMLAttribute

function ~XMLAttribute

~XMLAttribute()

Destructor.

function asString

std::string asString()

Get value as string.

Return: The string value

Retrieves the attribute value as a string.

function asInt

int asInt()

Get value as int.

Return: The int value

Retrieves the attribute value as an int.

function asUInt

unsigned int asUInt()

Get value as unsigned int.

Return: The unsigned int value

Retrieves the attribute value as an unsigned int.

function asDouble

double asDouble()

Get value as double.

Return: The double value

Retrieves the attribute value as a double.

function asFloat

float asFloat()

Get value as float.

Return: The float value

Retrieves the attribute value as a float.

function asBool

bool asBool()

Get value as boolean.

Return: The boolean value

Retrieves the attribute value as a boolean.

function asLLong

long long asLLong()

Get value as long long.

Return: The long long value

Retrieves the attribute value as a long long.

function asULLong

unsigned long long asULLong()

Get value as unsigned long long.

Return: The unsigned long long value

Retrieves the attribute value as an unsigned long long.

function asUShort

unsigned short asUShort()

Get value as unsigned short.

Return: The unsigned short value

Retrieves the attribute value as an unsigned short.

function asUChar

unsigned char asUChar()

Get value as unsigned char.

Return: The unsigned char value

Retrieves the attribute value as an unsigned char.

function asChar

char asChar()

Get value as char.

Return: The char value

Retrieves the attribute value as a char.

function isEmpty

bool isEmpty()

Check if attribute is empty.

Return: True if the attribute is empty, false otherwise

Check if the attribute has no value.

Friends

friend XMLNode

friend class XMLNode(
    XMLNode 
);

Updated on 2026-04-02 at 10:55:36 +0200