Main Page   Class Hierarchy   Compound List   File List   Compound Members  

C_XmlData.hpp

00001 /*
00002  *  This program is free software; you can redistribute it and/or modify
00003  *  it under the terms of the GNU General Public License as published by
00004  *  the Free Software Foundation; either version 2 of the License, or
00005  *  (at your option) any later version.
00006  *
00007  *  This program is distributed in the hope that it will be useful,
00008  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00009  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010  *  GNU General Public License for more details.
00011  *
00012  *  You should have received a copy of the GNU General Public License
00013  *  along with this program; if not, write to the Free Software
00014  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00015  *
00016  * (c)Copyright 2006 Hewlett-Packard Development Company, LP.
00017  *
00018  */
00019 
00020 #ifndef _C_XML_DATA_
00021 #define _C_XML_DATA_
00022 
00023 #include "list_t.hpp"
00024 #include "iostream_t.hpp"
00025 
00026 class _C_XmlEntity_Basic {
00027 public:
00028   _C_XmlEntity_Basic () ;
00029   _C_XmlEntity_Basic (char *P_name);
00030   ~_C_XmlEntity_Basic () ;
00031   char *get_name () ;
00032   void  set_name (char *P_name);
00033 private:
00034   char * m_name ;
00035 } ;
00036 
00037 
00038 class C_XmlData {
00039 public:
00040 
00041   class C_XmlField {
00042   public:
00043     C_XmlField();
00044     C_XmlField(char *P_name, char *P_value);
00045     C_XmlField(char *P_name);
00046     ~C_XmlField();
00047     char* get_name();
00048     char* get_value();
00049     void  set_name(char *P_name);
00050     void  set_value(char *P_value);
00051     friend iostream_output& operator<<(iostream_output&, C_XmlField&);
00052   private:
00053     char *m_name;
00054     char *m_value;
00055   } ;
00056 
00057   typedef C_XmlField            *T_pC_XmlField ;
00058   typedef list_t<C_XmlField*> T_XmlField_List, *T_pXmlField_List ;
00059      
00060    C_XmlData() ;
00061    C_XmlData(char * P_name) ;
00062   ~C_XmlData() ;
00063 
00064   char* get_name() ;
00065   void  set_name(char* P_name) ;
00066 
00067   void  add_sub_data (C_XmlData* P_data);
00068   void  add_field    (C_XmlField* P_field);
00069   
00070   char* find_value   (char* P_fieldName) ;
00071 
00072   list_t<C_XmlData*>*  get_sub_data () ;
00073   T_pXmlField_List     get_fields   () ;
00074 
00075   friend iostream_output& operator<<(iostream_output&, C_XmlData&);
00076 
00077 private:
00078   char                 *m_name ;
00079   list_t <C_XmlData*>  *m_sub_data ;
00080   T_pXmlField_List      m_fields ;
00081 } ;
00082 
00083 typedef C_XmlData *T_pC_XmlData ;
00084 typedef list_t<T_pC_XmlData>  T_XmlData_List, *T_pXmlData_List ;
00085 
00086 
00087 #endif // _C_XML_DATA_

Generated on Wed Mar 7 14:44:59 2007 for Seagull by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002