Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Examples

ObjectModel.hpp

00001 #if !defined(__OBJECTMODEL_HPP) 00002 #define __OBJECTMODEL_HPP 00003 00004 /* 00005 CoreLinux++ 00006 Copyright (C) 2000 CoreLinux Consortium 00007 00008 The CoreLinux++ Library is free software; you can redistribute it and/or 00009 modify it under the terms of the GNU Library General Public License as 00010 published by the Free Software Foundation; either version 2 of the 00011 License, or (at your option) any later version. 00012 00013 The CoreLinux++ Library Library is distributed in the hope that it will 00014 be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 Library General Public License for more details. 00017 00018 You should have received a copy of the GNU Library General Public 00019 License along with the GNU C Library; see the file COPYING.LIB. If not, 00020 write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00021 Boston, MA 02111-1307, USA. 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 // Constructors and destructor 00058 // 00059 00066 ObjectModel( const string & ); 00067 00069 00070 virtual ~ObjectModel( void ); 00071 00072 // 00073 // Operator overloads 00074 // 00075 00082 bool operator==( ObjectModelCref ) const; 00083 00084 // 00085 // Accessors 00086 // 00087 00093 const string & getName( void ) const; 00094 00095 // 00096 // Mutators 00097 // 00098 00099 // 00100 // Service calls 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 // if !defined(__OBJECTMODEL_HPP) 00203 00204 /* 00205 Common rcs information do not modify 00206 $Author: frankc $ 00207 $Revision: 1.2 $ 00208 $Date: 2000/02/10 14:32:21 $ 00209 $Locker: $ 00210 */ 00211

This is the CoreLinux++ reference manual
Provided by The CoreLinux Consortium