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  ~SIM_QueryCombine() override;
27 
28 protected:
29  bool deleteIfDataModifiedSubclass() const override;
30 
31  int getNumRecordTypesSubclass() const override;
32  const char *getRecordTypeNameSubclass(
33  int recordtypenum) const override;
34 
36  const char *recordtype) const override;
38  const char *recordtype) const override;
39  const char *getFieldNameSubclass(
40  const char *recordtype,
41  int fieldnum) const override;
43  const char *recordtype,
44  int fieldnum) const override;
46  const char *recordtype,
47  int recordnum,
48  const char *fieldname,
50  ) const override;
51 
52 private:
53  SIM_Query *myQuery1;
54  SIM_Query *myQuery2;
55 };
56 
57 #endif
58 
friend class SIM_QueryCombine
Give SIM_QueryCombine special access to our protected methods.
Definition: SIM_Query.h:127
UT_OptionType
Definition: UT_Options.h:44
virtual int getNumRecordsSubclass(const char *recordtype) const
GLuint64EXT * result
Definition: glew.h:14311
virtual int getNumRecordTypesSubclass() const
virtual bool deleteIfDataModifiedSubclass() const
virtual bool getFieldRawSubclass(const char *recordtype, int recordnum, const char *fieldname, UT_OptionEntryPtr &result) 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
UT_UniquePtr< UT_OptionEntry > UT_OptionEntryPtr
virtual const char * getRecordTypeNameSubclass(int recordtypenum) const