00001
#if !defined(__OBJECTMODEL_HPP)
00002
#define __OBJECTMODEL_HPP
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
#if !defined(__COMMON_HPP)
00025
#include <Common.hpp>
00026
#endif
00027
00028
#if !defined(__FACADE_HPP)
00029
#include <Facade.hpp>
00030
#endif
00031
00032
#if !defined(__OBJECT_HPP)
00033
#include <Object.hpp>
00034
#endif
00035
00036
#include <iostream>
00037
00038 DECLARE_CLASS( Dictionary );
00039 DECLARE_CLASS( Modeler );
00040
00041 DECLARE_TYPE( CORELINUX(Exception),
NameExistException );
00042 DECLARE_TYPE( CORELINUX(Exception),
NameNotExistException );
00043
00050 DECLARE_CLASS( ObjectModel );
00051
00052
class ObjectModel :
public CORELINUX(Facade)
00053 {
00054
public:
00055
00056
00057
00058
00059
00066 ObjectModel(
const string & );
00067
00069
00070
virtual ~ObjectModel(
void );
00071
00072
00073
00074
00075
00082
bool operator==( ObjectModelCref ) const;
00083
00084
00085
00086
00087
00093 const string & getName(
void ) const;
00094
00095
00096
00097
00098
00099
00100
00101
00102
00111 virtual
void createObject( const string & )
00112 throw (
NameExistException);
00113
00121 virtual
void destroyObject( const string & )
00122 throw (
NameNotExistException);
00123
00134 virtual
void changeName( const string &, const string & )
00135 throw( NameExistException, NameNotExistException );
00136
00145 virtual
void addParent( const string &, const string & )
00146 throw (NameNotExistException);
00147
00156 virtual
void removeParent( const string &, const string & )
00157 throw (NameNotExistException);
00158
00167 virtual
void display( const string &, ostream & )
00168 throw (NameNotExistException);
00169
00175 virtual
void display( ostream & );
00176
00177 protected:
00178
00180
00181 ObjectModel(
void );
00182
00184
00185 ObjectModel( ObjectModelCref );
00186
00188
00189 ObjectModelRef operator=( ObjectModelCref );
00190
00191
00192 private:
00193
00194 ObjectCref theRoot;
00195 string theName;
00196 DictionaryPtr theDictionary;
00197 ModelerPtr theModeler;
00198
00199 };
00200
00201
00202 #endif
00203
00204
00205
00206
00207
00208
00209
00210
00211