ObjectValue Class Reference

This class represents an object value. More...

#include <value.h>

Inheritance diagram for ObjectValue:

Value List of all members.

Public Member Functions

virtual ~ObjectValue ()
 Destructor is declared virtual, as it always should be.
ValueType GetType () const
 Return this instance's type.
void Insert (const Ustr &name, Value *value)
 Insert the name:value pair given into this object.
ValueGet (const Ustr &key)
 Get the value associated with the given key.
virtual Valueoperator[] (unsigned int i)
 Gets the subelement at the specified index.
virtual Valueoperator[] (const Ustr &s)
 Gets the subelement at the specified index.
virtual unsigned int Size () const
 Returns the number of sub values this value contains.
virtual bool Has (unsigned int i) const
 Check if this value contains the specified sub value.
virtual bool Has (const Ustr s) const
 Check if this value contains the specified sub value.

Detailed Description

This class represents an object value.

Author:
Matthew Welch


Constructor & Destructor Documentation

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

Destructor is declared virtual, as it always should be.


Member Function Documentation

ValueType ObjectValue::GetType (  )  const [inline, virtual]

Return this instance's type.

Returns:
ValueType enum of this intance's type.

Implements Value.

void ObjectValue::Insert ( const Ustr name,
Value value 
) [inline]

Insert the name:value pair given into this object.

Parameters:
name The name of the value being added.
value The value to insert.

Value& ObjectValue::Get ( const Ustr key  )  [inline]

Get the value associated with the given key.

Parameters:
key The key value to look up.
Returns:
The value for the given key.

virtual Value& ObjectValue::operator[] ( unsigned int  i  )  [inline, virtual]

Gets the subelement at the specified index.

Reimplemented from Value.

virtual Value& ObjectValue::operator[] ( const Ustr s  )  [inline, virtual]

Gets the subelement at the specified index.

Reimplemented from Value.

virtual unsigned int ObjectValue::Size (  )  const [inline, virtual]

Returns the number of sub values this value contains.

Reimplemented from Value.

virtual bool ObjectValue::Has ( unsigned int  i  )  const [inline, virtual]

Check if this value contains the specified sub value.

Reimplemented from Value.

virtual bool ObjectValue::Has ( const Ustr  s  )  const [inline, virtual]

Check if this value contains the specified sub value.

Reimplemented from Value.


The documentation for this class was generated from the following file:
Generated on Wed Apr 18 15:50:12 2007 for JSON Parser by  doxygen 1.5.2