jaula_value.h

00001 
00002 /*
00003   jaula_value.h : JSON Analysis User Library Acronym
00004                                   Generic values definitions
00005 
00006   Copyright (C) 2007 Kombo Morongo <morongo666@gmail.com>
00007 
00008   This library is free software; you can redistribute it and/or
00009   modify it under the terms of the GNU Lesser General Public
00010   License as published by the Free Software Foundation; either
00011   version 2.1 of the License, or (at your option) any later version.
00012 
00013 This library is distributed in the hope that it will be useful,
00014 but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016 Lesser General Public License for more details.
00017 
00018 You should have received a copy of the GNU Lesser General Public
00019 License along with this library; if not, write to the Free Software
00020 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
00021 
00022 svn info:
00023 
00024 $Author: morongo $
00025 $HeadURL: https://jaula.svn.sourceforge.net/svnroot/jaula/trunk/jaula/jaula_value.h $
00026 $Id: jaula_value.h 2 2007-04-13 19:00:00Z morongo $
00027 $Revision: 2 $
00028 */
00029 
00030 #ifndef _JAULA_VALUE_H_
00031 #define _JAULA_VALUE_H_
00032 
00033 #include <jaula/jaula_bad_data_type.h>
00034 
00043 namespace JAULA
00044 {                                                                                                 // namespace JAULA
00045 
00058         class Value
00059         {                                                                                         // class Value
00060                 public:
00061 
00065                         enum    ValueType
00066                         {                                                                         // enum ValueType
00067                                 TYPE_NULL                                                 
00068                                 ,   TYPE_BOOLEAN                                  
00069                                 ,   TYPE_STRING                                   
00070                                 ,   TYPE_NUMBER                                   
00071                                 ,   TYPE_NUMBER_INT                               
00072                                 ,   TYPE_ARRAY                                    
00073                                 ,   TYPE_OBJECT                                   
00074                         };                                                                        // enum ValueType
00075 
00079                         virtual ~Value();
00080 
00088                         ValueType getType(void) const;
00089 
00100                         virtual void repr(std::ostream &ostr) const = 0;
00101 
00111                         virtual void set(Value const &origin) throw(Bad_Data_Type);
00112 
00133                         Value &operator=(Value const &orig) throw(Bad_Data_Type);
00134 
00149                         static Value *duplicate(Value const &orig);
00150 
00151                 protected:
00152 
00166                         Value(ValueType Type);
00167 
00168                 private:
00169 
00173                         ValueType  Type_;
00174         };                                                                                        // class Value
00175 
00176 }                                                                                                 // namespace JAULA
00177 
00178 
00179 
00198 std::ostream &operator<<(std::ostream &ostr, JAULA::Value const &val);
00199 #endif
00200 
00201 // EOF $Id: jaula_value.h 2 2007-04-13 19:00:00Z morongo $


Back to JAULA Project Documentation Page.

Go to JAULA Project Home Page.


Copyright (c) 2007 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