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_OIDP_H
00026 #define _EYEDB_OIDP_H
00027
00028 namespace eyedb {
00029
00038 class OidP : public Basic {
00039
00040
00041
00042
00043 public:
00048 OidP(const Oid *oid = NULL);
00049
00056 OidP(Database *db, const Oid *oid = 0, const Dataspace *dataspace = 0);
00057
00062 OidP(const OidP *o);
00063
00068 OidP(const OidP &o);
00069
00074 virtual Object *clone() const {return new OidP(*this);}
00075
00076
00082 OidP& operator=(const OidP &o);
00083
00091 Status trace(FILE *fd = stdout, unsigned int flags = 0, const RecMode *recmode = RecMode::FullRecurs) const;
00092
00098 Status setValue(Data data);
00099
00105 Status getValue(Data *data) const;
00106
00111 virtual OidP *asOidP() {return this;}
00112
00117 virtual const OidP *asOidP() const {return this;}
00118
00119
00120
00121
00122
00123 private:
00124 Status trace_realize(FILE*, int, unsigned int, const RecMode *) const;
00125 Oid val;
00126 Status create();
00127 Status update();
00128 };
00129
00130 class OidPPtr : public BasicPtr {
00131
00132 public:
00133 OidPPtr(OidP *o = 0) : BasicPtr(o) { }
00134
00135 OidP *getOidP() {return dynamic_cast<OidP *>(o);}
00136 const OidP *getOidP() const {return dynamic_cast<OidP *>(o);}
00137
00138 OidP *operator->() {return dynamic_cast<OidP *>(o);}
00139 const OidP *operator->() const {return dynamic_cast<OidP *>(o);}
00140 };
00141
00142 typedef std::vector<OidPPtr> OidPPtrVector;
00143
00144 extern OidClass *OidP_Class;
00145 extern const char oid_class_name[];
00146
00151 }
00152
00153 #endif
00154