HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SIM_QueryCombine.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  */
7 
8 #ifndef __SIM_QueryCombine_h__
9 #define __SIM_QueryCombine_h__
10 
11 #include "SIM_API.h"
12 #include "SIM_Query.h"
13 
14 /// This specialization of SIM_Query allows two other SIM_Query classes to
15 /// be combined and treated as a single object. This is particularaly useful
16 /// for SIM_Data classes that use multiple inheritance and want to preserve
17 /// all the SIM_Query behavior of each base class.
19 {
20 public:
21  /// Constructor which takes pointers to the two SIM_Query objects we
22  /// want to combine. This object becomes the owner of these other
23  /// objects, and will take care of deleting them.
24  explicit SIM_QueryCombine(SIM_Query *q1, SIM_Query *q2);
25  /// Destructor for this class.
26  virtual ~SIM_QueryCombine();
27 
28 protected:
29  virtual bool deleteIfDataModifiedSubclass() const;
30 
31  virtual int getNumRecordTypesSubclass() const;
32  virtual const char *getRecordTypeNameSubclass(
33  int recordtypenum) const;
34 
35  virtual int getNumRecordsSubclass(
36  const char *recordtype) const;
37  virtual int getNumFieldsSubclass(
38  const char *recordtype) const;
39  virtual const char *getFieldNameSubclass(
40  const char *recordtype,
41  int fieldnum) const;
43  const char *recordtype,
44  int fieldnum) const;
45  virtual bool getFieldRawSubclass(
46  const char *recordtype,
47  int recordnum,
48  const char *fieldname,
49  UT_OptionEntry *&result) const;
50 
51 private:
52  SIM_Query *myQuery1;
53  SIM_Query *myQuery2;
54 };
55 
56 #endif
57 
friend class SIM_QueryCombine
Give SIM_QueryCombine special access to our protected methods.
Definition: SIM_Query.h:127
UT_OptionType
virtual int getNumRecordsSubclass(const char *recordtype) const
virtual bool getFieldRawSubclass(const char *recordtype, int recordnum, const char *fieldname, UT_OptionEntry *&result) const
virtual int getNumRecordTypesSubclass() const
virtual bool deleteIfDataModifiedSubclass() const
virtual const char * getFieldNameSubclass(const char *recordtype, int fieldnum) const
virtual int getNumFieldsSubclass(const char *recordtype) const
virtual UT_OptionType getFieldTypeSubclass(const char *recordtype, int fieldnum) const
#define SIM_API
Definition: SIM_API.h:10
virtual const char * getRecordTypeNameSubclass(int recordtypenum) const