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_QueryCombine_h__ 00015 #define __SIM_QueryCombine_h__ 00016 00017 #include "SIM_API.h" 00018 #include "SIM_Query.h" 00019 00020 /// This specialization of SIM_Query allows two other SIM_Query classes to 00021 /// be combined and treated as a single object. This is particularaly useful 00022 /// for SIM_Data classes that use multiple inheritance and want to preserve 00023 /// all the SIM_Query behavior of each base class. 00024 class SIM_API SIM_QueryCombine : public SIM_Query 00025 { 00026 public: 00027 /// Constructor which takes pointers to the two SIM_Query objects we 00028 /// want to combine. This object becomes the owner of these other 00029 /// objects, and will take care of deleting them. 00030 explicit SIM_QueryCombine(SIM_Query *q1, SIM_Query *q2); 00031 /// Destructor for this class. 00032 virtual ~SIM_QueryCombine(); 00033 00034 protected: 00035 virtual bool deleteIfDataModifiedSubclass() const; 00036 00037 virtual int getNumRecordTypesSubclass() const; 00038 virtual const char *getRecordTypeNameSubclass( 00039 int recordtypenum) const; 00040 00041 virtual int getNumRecordsSubclass( 00042 const char *recordtype) const; 00043 virtual int getNumFieldsSubclass( 00044 const char *recordtype) const; 00045 virtual const char *getFieldNameSubclass( 00046 const char *recordtype, 00047 int fieldnum) const; 00048 virtual UT_OptionType getFieldTypeSubclass( 00049 const char *recordtype, 00050 int fieldnum) const; 00051 virtual bool getFieldRawSubclass( 00052 const char *recordtype, 00053 int recordnum, 00054 const char *fieldname, 00055 UT_OptionEntry *&result) const; 00056 00057 private: 00058 SIM_Query *myQuery1; 00059 SIM_Query *myQuery2; 00060 }; 00061 00062 #endif 00063
1.5.9