IntValue Class Reference

This class represents an integer value. More...

#include <value.h>

Inheritance diagram for IntValue:

Value List of all members.

Public Member Functions

 IntValue ()
 Default constructor.
 IntValue (int i)
 Construct a BoolValue with the given value.
virtual ~IntValue ()
 Destructor is declared virtual, as it always should be.
ValueType GetType () const
 Return this instance's type.
virtual std::string AsString () const
 Gets the value as a string.
virtual long AsInt () const
 Gets the value as an int.
virtual double AsFloat () const
 Gets the value as a float.
virtual bool AsBool () const
 Gets the value as a bool.

Detailed Description

This class represents an integer value.

Author:
Matthew Welch


Constructor & Destructor Documentation

IntValue::IntValue (  )  [inline]

Default constructor.

IntValue::IntValue ( int  i  )  [inline]

Construct a BoolValue with the given value.

Parameters:
i Value to assign to this IntValue.

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

Destructor is declared virtual, as it always should be.


Member Function Documentation

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

Return this instance's type.

Returns:
ValueType enum of this intance's type.

Implements Value.

virtual std::string IntValue::AsString (  )  const [inline, virtual]

Gets the value as a string.

Reimplemented from Value.

virtual long IntValue::AsInt (  )  const [inline, virtual]

Gets the value as an int.

Reimplemented from Value.

virtual double IntValue::AsFloat (  )  const [inline, virtual]

Gets the value as a float.

Reimplemented from Value.

virtual bool IntValue::AsBool (  )  const [inline, virtual]

Gets the value as a bool.

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