JAULA::Value_Number Class Reference
[JAULA: JSON Values containers]

Class for handling numeric values. More...

#include <jaula_value_number.h>

Inheritance diagram for JAULA::Value_Number:

JAULA::Value

Public Member Functions

double getData (void) const
 Retrieves the value contained by the instance.
virtual void repr (std::ostream &ostr) const
 Represents the instance in a stream.
virtual void set (Value const &origin) throw (Bad_Data_Type)
 Copies the contents of one instance into another.
void set (double data)
 Establishes the contents of the instance.
 Value_Number (double data=0)
 Constructor.
virtual ~Value_Number ()
 Destructor.

Private Attributes

double data_
 Container to hold the value itself.

Detailed Description

Class for handling numeric values.

This class is a container for JSON numeric values.
Author:
Kombo Morongo <morongo666@gmail.com>

Constructor & Destructor Documentation

JAULA::Value_Number::Value_Number ( double  data = 0  ) 

Constructor.

Parameters:
data Initial value to be hold by the conatiner

JAULA::Value_Number::~Value_Number (  )  [virtual]

Destructor.


Member Function Documentation

double JAULA::Value_Number::getData ( void   )  const

Retrieves the value contained by the instance.

References data_.

Referenced by JAULA::Value::duplicate(), and set().

void JAULA::Value_Number::repr ( std::ostream &  ostr  )  const [virtual]

Represents the instance in a stream.

Parameters:
ostr Stream where the instance is to be represented.
Description
writes the instance content in JSON notation in a stream.

Implements JAULA::Value.

References data_.

void JAULA::Value_Number::set ( Value const &  origin  )  throw (Bad_Data_Type) [virtual]

Copies the contents of one instance into another.

Parameters:
origin Reference to the value to be copied.
Exceptions:
Bad_Data_Type This exception is launched in case that origin and destination value types are different.

Reimplemented from JAULA::Value.

References JAULA::Exception::addOrigin(), getData(), and JAULA::Value::set().

void JAULA::Value_Number::set ( double  data  ) 

Establishes the contents of the instance.

Parameters:
data Value to assign to the instance

References data_.


Field Documentation

double JAULA::Value_Number::data_ [private]

Container to hold the value itself.

Referenced by getData(), repr(), and set().


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


Back to JAULA Project Documentation Page.

Go to JAULA Project Home Page.


Copyright (c) 2007, 2008, 2009 Kombo Morongo.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".

API Reference Generated for jaula by

doxygen

jaula project hosted by

SourceForge.net Logo