Yate
StringArray Class Reference

A String array. More...

#include <xmpputils.h>

Inheritance diagram for StringArray:
XMPPError XMPPNamespace XmlTag

Public Member Functions

 StringArray (const String *array, unsigned int len)
 
const Stringat (unsigned int index) const
 
const Stringoperator[] (unsigned int index) const
 
int operator[] (const String &token)
 

Protected Attributes

Stringm_array
 
unsigned int m_length
 

Detailed Description

A String array.

Implements a String array set from an already allocated

Constructor & Destructor Documentation

◆ StringArray()

StringArray ( const String * array,
unsigned int len )
inline

Constructor

Parameters
arrayThe array
lenArray length

Referenced by XmlTag::XmlTag(), XMPPError::XMPPError(), and XMPPNamespace::XMPPNamespace().

Member Function Documentation

◆ at()

const String & at ( unsigned int index) const
inline

Return the string at a given index (safe)

Parameters
indexThe index in the array
Returns
The String at the requested index or an empty one if the index is invalid

References String::empty().

◆ operator[]() [1/2]

int operator[] ( const String & token)
inline

Lookup for an integer associated with a given String

Parameters
tokenThe String find
Returns
Token value or 0 if not found

◆ operator[]() [2/2]

const String & operator[] ( unsigned int index) const
inline

Return the string at a given index (unsafe)

Parameters
indexThe index in the array
Returns
The String at the requested index

The documentation for this class was generated from the following file: