JAULA::Value_Complex Class Referenceabstract
JAULA: JSON Values containers

Base class for handling complex values. More...

`#include <jaula_value_complex.h>`

Inheritance diagram for JAULA::Value_Complex:

## Public Member Functions

virtual void | clear (void)=0
| Empties the contents of an instance.
virtual bool | empty (void) const =0
| True if the instance is empty.
virtual size_t | size (void) const =0
| Number of elements contained.
virtual | ~Value_Complex ()
| Destructor.
Public Member Functions inherited from JAULA::Value
ValueType | getType (void) const
| Retrieves the value type for the instance.
Value & | operator= (Value const &orig) throw (Bad_Data_Type)
| Assignment operator.
virtual void | repr (std::ostream &ostr) const =0
| Represents the instance in a stream.
virtual void | set (Value const &origin) throw (Bad_Data_Type)
| Copies the contents of one instance into another.
virtual | ~Value ()
| Destructor.

## Protected Member Functions

| Value_Complex (ValueType Type)
| Constructor.
Protected Member Functions inherited from JAULA::Value
| Value (ValueType Type)
| Constructor.

## Additional Inherited Members

Public Types inherited from JAULA::Value
enum | ValueType { TYPE_NULL , TYPE_BOOLEAN , TYPE_STRING , TYPE_NUMBER , TYPE_NUMBER_INT , TYPE_ARRAY , TYPE_OBJECT }
| Enumeration of available value types. More...
Static Public Member Functions inherited from JAULA::Value
static Value * | duplicate (Value const &orig)
| Creates a duplicate of a value.

## Detailed Description

Base class for handling complex values.

  This class defines an abstract base class for JSON complex values (values which are an aggregation of other values)

Author
  Kombo Morongo moron.nosp@m.go66.nosp@m.6@gma.nosp@m.il.c.nosp@m.om

## Constructor & Destructor Documentation

## ~Value_Complex()

JAULA::Value_Complex::~Value_Complex | ( |  | ) |

virtual

Destructor.

## Value_Complex()

JAULA::Value_Complex::Value_Complex | ( | ValueType | Type | ) |

protected

Constructor.

Parameters

  Type | Type of value to be contained by the instance

Description
  This method construct a new instance by specifying its type.

Note
  A ValueType for the instance is immutable during all the life cycle, this is the only method that permits specifying the value type.

References JAULA::Value::Value().

Referenced by JAULA::Value_Array::Value_Array(), JAULA::Value_Array::Value_Array(), JAULA::Value_Object::Value_Object(), and JAULA::Value_Object::Value_Object().

## Member Function Documentation

## clear()

virtual void JAULA::Value_Complex::clear | ( | void |  | ) |

pure virtual

Empties the contents of an instance.

Description
  Erases all the instance content.

Implemented in JAULA::Value_Array, and JAULA::Value_Object.

## empty()

virtual bool JAULA::Value_Complex::empty | ( | void |  | ) | const

pure virtual

True if the instance is empty.

Returns
  true if there are no single elements contained by the instance and false otherwise.

Implemented in JAULA::Value_Array, and JAULA::Value_Object.

## size()

virtual size_t JAULA::Value_Complex::size | ( | void |  | ) | const

pure virtual

Number of elements contained.

Returns
  the number of single elements contained by the instance.

Implemented in JAULA::Value_Array, and JAULA::Value_Object.

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

- jaula_value_complex.h
- jaula_value_complex.cc

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".

SourceForge.net