jaula API Reference version 1.4.0
jaula_value_array.h
00001 
00002 /*
00003  * jaula_value_array.h : JSON Analysis User Library Acronym
00004  * JSON array values definitions
00005  *
00006  * Copyright (C) 2007, 2008, 2009 Kombo Morongo <morongo666@gmail.com>
00007  *
00008  * This library is free software; you can redistribute it and/or modify it
00009  * under the terms of the GNU Lesser General Public License as published by
00010  * the Free Software Foundation; either version 2.1 of the License, or (at
00011  * your option) any later version.
00012  *
00013  * This library is distributed in the hope that it will be useful, but
00014  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
00015  * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
00016  * License for more details.
00017  *
00018  * You should have received a copy of the GNU Lesser General Public License
00019  * along with this library; if not, write to the Free Software Foundation,
00020  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
00021  *
00022  * svn info:
00023  * $Author: morongo $
00024  * $HeadURL: https://jaula.svn.sourceforge.net/svnroot/jaula/tags/jaula-1.4.0/jaula/jaula_value_array.h $
00025  * $Id: jaula_value_array.h 45 2009-01-11 16:17:03Z morongo $
00026  * $Revision: 45 $
00027  */
00028 
00029 #ifndef _JAULA_VALUE_ARRAY_H_
00030 #define _JAULA_VALUE_ARRAY_H_
00031 
00032 #include <list>
00033 
00034 #include <jaula/jaula_value_complex.h>
00035 
00040 namespace JAULA
00041 {                                // namespace JAULA
00042 
00053   class Value_Array : public Value_Complex
00054   {                              // class Value_Array
00055     public:
00056 
00066       typedef std::list<Value *>  dataType;
00067 
00074       Value_Array(void);
00075 
00085       Value_Array(dataType const &data);
00086 
00095       virtual ~Value_Array();
00096 
00100       dataType const &getData(void) const;
00101 
00110       virtual void repr(std::ostream &ostr) const;
00111 
00118       virtual bool empty(void) const;
00119 
00125       virtual size_t size(void) const;
00126 
00136       void set(dataType const &data);
00137 
00151       virtual void set(Value const &origin) throw(Bad_Data_Type);
00152 
00161       void addItem(Value const &item);
00162 
00173       virtual void clear(void);
00174 
00175     private:
00176 
00180       dataType    data_;
00181   };                             // class Value_Array
00182 
00183 }                                // namespace JAULA
00184 #endif
00185 
00186 // EOF $Id: jaula_value_array.h 45 2009-01-11 16:17:03Z morongo $