casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Representable.h
Go to the documentation of this file.
00001 
00002 /*
00003  * ALMA - Atacama Large Millimeter Array
00004  * (c) European Southern Observatory, 2002
00005  * (c) Associated Universities Inc., 2002
00006  * Copyright by ESO (in the framework of the ALMA collaboration),
00007  * Copyright by AUI (in the framework of the ALMA collaboration),
00008  * All rights reserved.
00009  * 
00010  * This library is free software; you can redistribute it and/or
00011  * modify it under the terms of the GNU Lesser General Public
00012  * License as published by the Free software Foundation; either
00013  * version 2.1 of the License, or (at your option) any later version.
00014  * 
00015  * This library is distributed in the hope that it will be useful,
00016  * but WITHOUT ANY WARRANTY, without even the implied warranty of
00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018  * Lesser General Public License for more details.
00019  * 
00020  * You should have received a copy of the GNU Lesser General Public
00021  * License along with this library; if not, write to the Free Software
00022  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
00023  * MA 02111-1307  USA
00024  *
00025  * Warning!
00026  *  -------------------------------------------------------------------- 
00027  * | This is generated code!  Do not modify this file.                  |
00028  * | If you do, all changes will be lost when the file is re-generated. |
00029  *  --------------------------------------------------------------------
00030  *
00031  * File Representable.h
00032  */
00033  
00034 #ifndef _Representable_H
00035 #define _Representable_H
00036 
00037 #ifndef __cplusplus
00038 #error This is a C++ include file and cannot be used from plain C
00039 #endif
00040  
00041 #include <Entity.h>
00042 #include <ConversionException.h>
00043 
00044 using std::string;
00045 using asdm::Entity;
00046 using asdm::ConversionException;
00047 
00048 namespace asdm {
00049 
00050 
00057 class Representable {
00058         friend class ASDM;
00059 
00060 public:
00061 
00062         virtual ~Representable() {}
00063         virtual string toXML()   = 0;
00064         virtual void fromXML(string& xml) = 0;
00065 
00066         virtual string getName() const = 0;
00067         virtual unsigned int size() const = 0;
00068                 
00069 protected:
00070 
00071         virtual Entity getEntity() const = 0;
00072         virtual void setEntity(Entity e) = 0;
00073 
00074         bool presentInMemory;
00075         bool loadInProgress;
00076         uint32_t declaredSize;
00077 };
00078         
00079 } // End namespace asdm
00080 
00081 #endif /* _Representable_CLASS */