OpenGUI::ValueList Class Reference
[Types]

#include <OpenGUI_Value.h>

List of all members.


Detailed Description

Container of multiple Value objects. Provides stack, and name based access.

This class provides access to a grouping of Value objects with both a stack interface as well as a by-name interface. Care must be taken when using the by-name interface, as stack pops can remove named entries from the container, causing subsequent by-name get() operations for the missing Value to result in an Exception.


Public Member Functions

void push_front (const Value &value)
 Push the given value to the front of the stack.
void push_back (const Value &value)
 Push the given value to the back of the stack.
Value pop_front ()
 Pops a Value from the front of the stack.
Value pop_back ()
 Pops a Value from the back of the stack.
size_t size () const
 Returns the current stack size.
const Valueget (const std::string &name) const
 Retrieves the first Value in the list with the given name.
const Valueget (unsigned int index) const
 Retrieves a Value by its stack index.


Member Function Documentation

const Value & OpenGUI::ValueList::get ( unsigned int  index  )  const

Retrieves a Value by its stack index.

Throws an Exception if the given index is out of range.

const Value & OpenGUI::ValueList::get ( const std::string &  name  )  const

Retrieves the first Value in the list with the given name.

If a Value by the requested name cannot be found, an Exception will be thrown.

Value OpenGUI::ValueList::pop_back (  ) 

Pops a Value from the back of the stack.

Throws an Exception if the Value stack is empty when called.

Value OpenGUI::ValueList::pop_front (  ) 

Pops a Value from the front of the stack.

Throws an Exception if the Value stack is empty when called.

void OpenGUI::ValueList::push_back ( const Value value  ) 

Push the given value to the back of the stack.

void OpenGUI::ValueList::push_front ( const Value value  ) 

Push the given value to the front of the stack.

size_t OpenGUI::ValueList::size (  )  const

Returns the current stack size.


The documentation for this class was generated from the following files:
Copyright © 2006 OpenGUI | OpenGUI.SF.net
Generated: Fri Jan 5 23:05:27 2007