00001 /* 00002 * PROPRIETARY INFORMATION. This software is proprietary to 00003 * Side Effects Software Inc., and is not to be reproduced, 00004 * transmitted, or disclosed in any way without written permission. 00005 * 00006 * Produced by: 00007 * Side Effects Software Inc. 00008 * 477 Richmond Street West, Suite 1001 00009 * Toronto, Ontario 00010 * Canada M5V 3E7 00011 * 416-504-9876 00012 */ 00013 00014 #ifndef __SIM_EmptyData_h__ 00015 #define __SIM_EmptyData_h__ 00016 00017 #include "SIM_API.h" 00018 #include "SIM_OptionsUser.h" 00019 #include "SIM_DataUtils.h" 00020 00021 /// This class holds a SIM_Options object, and provides direct access to 00022 /// it. Most SIM_Data classes which use SIM_Options to hold basic data 00023 /// types don't expose the contained data directly. This prevents 00024 /// extraneous data from being attached where it doesn't belong. This 00025 /// class has no such restrictions and so can be used as a repository 00026 /// for arbitrary simple data types. 00027 class SIM_API SIM_EmptyData : public SIM_Data, 00028 public SIM_OptionsUser 00029 { 00030 public: 00031 /// Provides read access to our SIM_Options internal data. 00032 const SIM_Options &getData() const; 00033 /// Provides read and write access to our SIM_Options internal data. 00034 SIM_Options &getData(); 00035 00036 /// Signals to the data that it has been altered externally. 00037 void pubHandleModification() 00038 { 00039 handleModification(); 00040 } 00041 00042 protected: 00043 explicit SIM_EmptyData(const SIM_DataFactory *factory); 00044 virtual ~SIM_EmptyData(); 00045 00046 private: 00047 static const SIM_DopDescription *getEmptyDataDopDescription(); 00048 00049 DECLARE_STANDARD_GETCASTTOTYPE(); 00050 DECLARE_DATAFACTORY(SIM_EmptyData, 00051 SIM_Data, 00052 "Empty Data", 00053 getEmptyDataDopDescription()); 00054 }; 00055 00056 #endif 00057
1.5.9