FastUIDraw
Public Member Functions | List of all members
fastuidraw::string_array Class Reference

#include <string_array.hpp>

Public Member Functions

 string_array (void)
 
 string_array (const string_array &obj)
 
void clear (void)
 
c_array< const c_stringget (void) const
 
c_string get (unsigned int I) const
 
string_arrayoperator= (const string_array &rhs)
 
string_arraypop_back (void)
 
string_arraypush_back (c_string value)
 
void resize (unsigned int size, c_string value="")
 
string_arrayset (unsigned int I, c_string value)
 
unsigned int size (void) const
 
void swap (string_array &obj)
 

Detailed Description

Simple class to hold an array of strings; string values are copied into the string_array.

Definition at line 35 of file string_array.hpp.

Constructor & Destructor Documentation

◆ string_array() [1/2]

fastuidraw::string_array::string_array ( void  )

Ctor.

◆ string_array() [2/2]

fastuidraw::string_array::string_array ( const string_array obj)

Copy ctor.

Parameters
objvalue from which to copy

Member Function Documentation

◆ clear()

void fastuidraw::string_array::clear ( void  )

Clears the string_array.

◆ get() [1/2]

c_array<const c_string> fastuidraw::string_array::get ( void  ) const

Get all elements of the string_array, pointer and pointer contents are valid until the string_array is modified.

◆ get() [2/2]

c_string fastuidraw::string_array::get ( unsigned int  I) const

Return an element of the array, pointer is valid until the string_array is modified.

Parameters
Ielement to get

◆ operator=()

string_array& fastuidraw::string_array::operator= ( const string_array rhs)

Assignment operator

Parameters
rhsvalue from which to copy

◆ pop_back()

string_array& fastuidraw::string_array::pop_back ( void  )

Reduce the size by one.

◆ push_back()

string_array& fastuidraw::string_array::push_back ( c_string  value)

Add an element

Parameters
valuestring from which to copy to the element

◆ resize()

void fastuidraw::string_array::resize ( unsigned int  size,
c_string  value = "" 
)

Resize of the string_array.

Parameters
sizenew size of the array
valuevalue with which to set all new elements

◆ set()

string_array& fastuidraw::string_array::set ( unsigned int  I,
c_string  value 
)

Set an element of the array

Parameters
Ielement to set
valuestring from which to copy to the element

◆ size()

unsigned int fastuidraw::string_array::size ( void  ) const

Return the size() of the string_array.

◆ swap()

void fastuidraw::string_array::swap ( string_array obj)

Swap operator.


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