jaula_value_array.h
/*
* jaula_value_array.h : JSON Analysis User Library Acronym
* JSON array values definitions
*
* Copyright (C) 2007, 2008, 2009 Kombo Morongo <morongo666@gmail.com>
*
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or (at
* your option) any later version.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
* License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*
* svn info:
* $Author: morongo $
* $HeadURL: https://jaula.svn.sourceforge.net/svnroot/jaula/tags/jaula-1.4.0/jaula/jaula_value_array.h $
* $Id: jaula_value_array.h 45 2009-01-11 16:17:03Z morongo $
* $Revision: 45 $
*/
#ifndef _JAULA_VALUE_ARRAY_H_
#define _JAULA_VALUE_ARRAY_H_
#include <list>
#include <jaula/jaula_value_complex.h>
namespace JAULA
{ // namespace JAULA
class Value_Array : public Value_Complex
{ // class Value_Array
public:
typedef std::list<Value *> dataType;
Value_Array(void);
Value_Array(dataType const &data);
virtual ~Value_Array();
dataType const &getData(void) const;
virtual void repr(std::ostream &ostr) const;
virtual bool empty(void) const;
virtual size_t size(void) const;
void set(dataType const &data);
virtual void set(Value const &origin) throw(Bad_Data_Type);
void addItem(Value const &item);
virtual void clear(void);
private:
dataType data_;
}; // class Value_Array
} // namespace JAULA
#endif
// EOF $Id: jaula_value_array.h 45 2009-01-11 16:17:03Z morongo $
JAULA::Bad_Data_Type
class for incompatible data type exceptions
Definition jaula_bad_data_type.h:53
JAULA::Value_Array::getData
dataType const & getData(void) const
Retrieves the array of values contained by the instance.
Definition jaula_value_array.cc:61
JAULA::Value_Array::~Value_Array
virtual ~Value_Array()
Destructor.
Definition jaula_value_array.cc:56
JAULA::Value_Array::repr
virtual void repr(std::ostream &ostr) const
Represents the instance in a stream.
Definition jaula_value_array.cc:66
JAULA::Value_Array::size
virtual size_t size(void) const
Number of elements contained.
Definition jaula_value_array.cc:85
JAULA::Value_Array::dataType
std::list< Value * > dataType
Data type for value contents.
Definition jaula_value_array.h:66
JAULA::Value_Array::clear
virtual void clear(void)
Empties the contents of an instance.
Definition jaula_value_array.cc:120
JAULA::Value_Array::set
void set(dataType const &data)
Establishes the contents of the instance.
Definition jaula_value_array.cc:90
JAULA::Value_Array::data_
dataType data_
Container to hold the value itself.
Definition jaula_value_array.h:180
JAULA::Value_Array::Value_Array
Value_Array(void)
Default Constructor.
Definition jaula_value_array.cc:43
JAULA::Value_Array::empty
virtual bool empty(void) const
True if the instance is empty.
Definition jaula_value_array.cc:80
JAULA::Value_Array::addItem
void addItem(Value const &item)
Appends one item to the array.
Definition jaula_value_array.cc:115
JAULA::Value_Complex::Value_Complex
Value_Complex(ValueType Type)
Constructor.
Definition jaula_value_complex.cc:45
JAULA::Value
Base class for handling values.
Definition jaula_value.h:53
JAULA
Namespace for all library definitions.
Definition jaula.h:439

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