00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef _EYEDB_RECMODE_H
00026 #define _EYEDB_RECMODE_H
00027
00028 namespace eyedb {
00029
00035 enum RecModeType {
00036 RecMode_NoRecurs,
00037 RecMode_FullRecurs,
00038 RecMode_FieldNames,
00039 RecMode_Predicat
00040 };
00041
00042 struct Attribute;
00043 class Object;
00044 class ObjectPtr;
00045
00049 class RecMode {
00050
00051
00052
00053
00054 public:
00059 RecMode(RecModeType typ);
00060
00065 RecMode(Bool (*p)(const Object *, const Attribute *, int));
00066
00071 RecMode(const char *first, ...);
00072
00078 RecMode(Bool no, const char *first, ...);
00079
00087 Bool isAgregRecurs(const Attribute *agreg, int n = 0, const Object *o = NULL) const;
00088
00093 RecModeType getType() const {return type;}
00094
00095
00096 static const RecMode *FullRecurs;
00097 static const RecMode *NoRecurs;
00098
00099
00100
00101
00102 private:
00103 RecModeType type;
00104
00105 union {
00106 struct {
00107 Bool _not;
00108 int fnm_cnt;
00109 char **fnm;
00110 } fnm;
00111 Bool (*pred)(const Object *, const Attribute *, int);
00112 } u;
00113
00114
00115
00116
00117 public:
00118 static void init(void);
00119 static void _release(void);
00120 };
00121
00122 extern const RecMode *FullRecurs;
00123 extern const RecMode *NoRecurs;
00124
00129 }
00130
00131 #endif