00001 /** 00002 * \file rvc/simple.h 00003 * \brief interface for the RVCSIMPLE class. 00004 * 00005 * \if NODOC 00006 * $Id: simple.h_v 1.17 2004/02/06 22:36:33 scowan Exp $ 00007 * 00008 * $Log: simple.h_v $ 00009 * Revision 1.17 2004/02/06 22:36:33 scowan 00010 * Added methods to get the default name and desc. 00011 * 00012 * Revision 1.16 2003/10/07 17:30:40 scowan 00013 * Object virtual method changes. 00014 * 00015 * Revision 1.15 2003/09/30 16:52:06 dwilliss 00016 * Doxygen 00017 * 00018 * Revision 1.14 2003/09/25 21:56:58 dwilliss 00019 * doxygen 00020 * 00021 * Revision 1.13 2003/09/15 13:49:45 fileserver!dwilliss 00022 * Doxygen 00023 * 00024 * Revision 1.12 2003/05/13 14:06:53 scowan 00025 * Added override to open object. 00026 * 00027 * Revision 1.11 2002/12/06 15:10:00 scowan 00028 * Fixed for genator docs. 00029 * 00030 * Revision 1.10 2002/04/05 22:34:17 scowan 00031 * Cleaned up. 00032 * 00033 * Revision 1.9 2002/01/09 20:13:12 scowan 00034 * Added source parameter for make method. 00035 * 00036 * Revision 1.8 2001/06/15 16:17:41 scowan 00037 * Added simple read method for current object. 00038 * 00039 * Revision 1.7 2001/06/14 16:14:23 scowan 00040 * Changed source type.. 00041 * 00042 * Revision 1.6 2001/06/13 21:38:43 scowan 00043 * Added to RVC namespace. 00044 * 00045 * Revision 1.5 2001/06/13 14:54:44 scowan 00046 * Added new make method. 00047 * 00048 * Revision 1.4 2000/12/01 14:58:34 scowan 00049 * MAC errors. 00050 * 00051 * Revision 1.3 2000/12/01 14:54:00 scowan 00052 * Fixed MAC errors. 00053 * 00054 * Revision 1.2 2000/10/19 21:14:51 scowan 00055 * Checked in for vacation. 00056 * 00057 * Revision 1.1 2000/09/29 15:26:55 scowan 00058 * Initial revision 00059 * 00060 * \endif 00061 **/ 00062 00063 //! \class RVC::SIMPLE rvc/simple.h 00064 //! \brief Interface for RVC objects that support a Read Once, Write Once 00065 //! paradigm. Derived classes do not open / close the rvc object. 00066 //! 00067 //! This class inherits from RVC::OBJECT 00068 //! 00069 //! RVC Object Types that this class supports: Derived class 00070 //! 00071 //! Default RVC Object Type for this class: Derived class 00072 //! 00073 //! Valid parents for this class: Derived class 00074 00075 #ifndef INC_RVC_SIMPLE_H 00076 #define INC_RVC_SIMPLE_H 00077 00078 #ifndef INC_RVC_OBJECT_H 00079 #include <rvc/object.h> 00080 #endif 00081 00082 namespace RVC { 00083 00084 class SIMPLE : public RVC::OBJECT { // Specify namespace in inheritance so that other "OBJECT's" do not get used as the parent 00085 public: 00086 00087 //! Default Constructor 00088 SIMPLE ( 00089 ); 00090 00091 //! Copy constructor 00092 SIMPLE ( 00093 const RVC::SIMPLE& rhs 00094 ); 00095 00096 //! Destructor, pure virtual 00097 virtual ~SIMPLE ( //! Destructor, pure virtual 00098 ) = 0; 00099 00100 //! Assignment 00101 RVC::SIMPLE& operator= ( //! Assignment operator 00102 const RVC::SIMPLE& rhs 00103 ); 00104 00105 //! Obtain default name and description information from derived class 00106 ERRVALUE GetDftNameDesc ( 00107 const RVC::OBJITEM& ParentObjItem, //!< Parent rvc object item 00108 RVC::OBJECTNAME& name, //!< Default generated name RETURNED 00109 RVC::OBJECTDESC& desc //!< Default generated description RETURNED 00110 ); 00111 00112 //! Obtain default name and description information from derived class 00113 ERRVALUE GetDftNameDesc ( 00114 const RVC::OBJECT& ParentObject, //!< Parent rvc object 00115 RVC::OBJECTNAME& name, //!< Default generated name RETURNED 00116 RVC::OBJECTDESC& desc //!< Default generated description RETURNED 00117 ); 00118 00119 //! Create new rvc object of derived class type using default name and desc 00120 //! This method will attach this instance to the rvc object after writing the data. This instance file handle will be closed 00121 ERRVALUE Make ( 00122 const RVC::OBJECT& parent, //!< Parent rvc object to create derived class under 00123 const char* Source = 0 //!< Who created this rvc object, 0 to use result from GetAppName() 00124 ); 00125 00126 //! Create new rvc object of derived class type with given name and desc 00127 //! This method will attach this instance to the rvc object after writing the data. This instance file handle will be closed 00128 ERRVALUE Make ( 00129 const RVC::OBJECT& parent, //!< Parent rvc object to create derived class under 00130 const RVC::OBJECTNAME& name, //!< Name of rvc object 00131 const RVC::OBJECTDESC& desc, //!< Description of rvc object 00132 const char* Source = 0 //!< Who created this rvc object, 0 to use result from GetAppName() 00133 ); 00134 00135 //! Create new rvc object of derived class type with given RVCOBJITEM 00136 //! This method will attach this instance to the rvc object after writing the data. This instance file handle will be closed 00137 ERRVALUE Make ( 00138 const RVC::OBJITEM& ObjItem, 00139 const char* Source = 0 //!< Who created this rvc object, 0 to use result from GetAppName() 00140 ); 00141 00142 //! Read data from rvc object, data stored in derived class 00143 //! 00144 //! This method will open the file, if not open already, and after reading the data, close its instance of the file. 00145 //! If the file was open before the call, this method still closes the file. This is by design. 00146 ERRVALUE Read ( 00147 ); 00148 00149 //! Read data from named rvc object, data stored in derived class 00150 //! 00151 //! This method will open the file, if not open already, and after reading the data, close its instance of the file. 00152 //! If the file was open before the call, this method still closes the file. This is by design. 00153 ERRVALUE Read ( 00154 const FILEPATH& filepath, //!< Path to RVC file 00155 const MISTRING& ObjectPath //!< Path to requested rvc object 00156 ); 00157 00158 //! Read data from rvc object, data stored in derived class 00159 //! 00160 //! This method will open the file, if not open already, and after reading the data, close its instance of the file. 00161 //! If the file was open in this instance before the call, this method still closes the file. This is by design. 00162 ERRVALUE Read ( 00163 const RVC::OBJECT& object //!< RVC Object to read data from 00164 ); 00165 00166 //! Read data from found rvc object, data stored in derived class 00167 //! 00168 //! This method will open the file, if not open already, and after reading the data, close its instance of the file. 00169 //! If the file was in this instance open before the call, this method still closes the file. This is by design. 00170 ERRVALUE Read ( 00171 const RVC::OBJECT& parent, //!< Parent rvc object 00172 const RVC::OBJECTNAME& name //!< Name of rvc object to locate and read from 00173 ); 00174 00175 //! Read data from defined rvc object, data stored in derived class 00176 //! 00177 //! This method will open the file, if not open already, and after reading the data, close its instance of the file. 00178 //! If the file was in this instance open before the call, this method still closes the file. This is by design. 00179 ERRVALUE Read ( 00180 const RVC::OBJITEM& ObjItem //!< This contains the file and rvc object location information 00181 ); 00182 00183 //! Read data from found rvc object, data stored in derived class 00184 //! 00185 //! This method will open the file, if not open already, and after reading the data, close its instance of the file. 00186 //! If the file was in this instance open before the call, this method still closes the file. This is by design. 00187 ERRVALUE Read ( 00188 const RVC::OBJECT& source, //!< Source rvc object used if 'filename' is a relative path 00189 const UNICODE *filename, //!< Full or relative path to the rvc file to open 00190 const MISTRING& ObjectPath //!< Full name of rvc object obtained from GetObjectPath() 00191 ); 00192 00193 //! Overwrite existing derived class type with current information 00194 //! 00195 //! This method will open the file, if not open already, and after writing the data, close its instance of the file. 00196 //! If the file was open in this instance before the call, this method still closes the file. This is by design. 00197 ERRVALUE Write ( 00198 ); 00199 00200 private: 00201 00202 virtual ERRVALUE v_GetDftNameDesc ( //! Obtain default name and description information from derived class 00203 const OBJECT& parent, //!< Parent rvc object to create derived class under 00204 OBJECTNAME& name, 00205 OBJECTDESC& desc 00206 ) = 0; 00207 00208 virtual ERRVALUE v_ReadData ( //! Read specific data method for derived classes 00209 ) = 0; 00210 00211 virtual ERRVALUE v_WriteData ( //! Write specific data method for derived classes 00212 const RVCGENINFO& ginfo 00213 ) = 0; 00214 00215 #ifndef GENERATING_DOXYGEN_OUTPUT 00216 //! Implementation of RVC::OBJECT virtual methods 00217 virtual ERRVALUE v_OpenObject (OPENMODE OpenFlags, MDLGPARENT parent); 00218 #endif // GENERATING_DOXYGEN_OUTPUT 00219 00220 }; 00221 00222 } //! End of RVC namespace 00223 00224 #endif //!< INC_RVC_SIMPLE_H
1.3.8-20040913