poolslot.h

Go to the documentation of this file.
00001 
00058 #ifndef ABA_POOLSLOT_H
00059 #define ABA_POOLSLOT_H
00060 
00061 #include "abacus/abacusroot.h"
00062 
00063 class ABA_MASTER;
00064 class ABA_SUB;
00065 class ABA_CONSTRAINT;
00066 class ABA_VARIABLE;
00067 template<class BaseType, class CoType> class ABA_POOL;
00068 template<class BaseType, class CoType> class ABA_POOLSLOTREF;
00069 template<class BaseType, class CoType> class ABA_STANDARDPOOL;
00070 template<class BaseType, class CoType> class ABA_NONDUPLPOOL;
00071 template<class BaseType, class CoType> class ABA_CUTBUFFER;
00072 
00073 #ifdef ABACUS_PARALLEL
00074 class ABA_ID;
00075 #endif
00076   template<class BaseType, class CoType> class  ABA_POOLSLOT :  public ABA_ABACUSROOT  {
00077   friend class ABA_POOLSLOTREF<BaseType,CoType>;
00078   friend class ABA_POOL<BaseType,CoType>;
00079   friend class ABA_STANDARDPOOL<BaseType,CoType>;
00080   friend class ABA_CUTBUFFER<BaseType,CoType>;
00081 
00082   friend class ABA_SUB;
00083   friend class ABA_POOLSLOTREF<ABA_CONSTRAINT, ABA_VARIABLE>;
00084   friend class ABA_POOLSLOTREF<ABA_VARIABLE, ABA_CONSTRAINT>;
00085   friend class ABA_POOL<ABA_CONSTRAINT, ABA_VARIABLE>;
00086   friend class ABA_POOL<ABA_VARIABLE, ABA_CONSTRAINT>;
00087   friend class ABA_STANDARDPOOL<ABA_CONSTRAINT, ABA_VARIABLE>;
00088   friend class ABA_STANDARDPOOL<ABA_VARIABLE, ABA_CONSTRAINT>;
00089   friend class ABA_NONDUPLPOOL<ABA_CONSTRAINT, ABA_VARIABLE>;
00090   friend class ABA_NONDUPLPOOL<ABA_VARIABLE, ABA_CONSTRAINT>;
00091   friend class ABA_CUTBUFFER<ABA_CONSTRAINT, ABA_VARIABLE>;
00092   friend class ABA_CUTBUFFER<ABA_VARIABLE, ABA_CONSTRAINT>;
00093     public:
00094 
00105       ABA_POOLSLOT(ABA_MASTER *master, 
00106                    ABA_POOL<BaseType, CoType> *pool, 
00107                    BaseType *convar = 0);
00108 
00112       ~ABA_POOLSLOT();
00113 
00116       BaseType *conVar() const;
00117 #ifdef ABACUS_PARALLEL
00118 
00124       const ABA_ID &getIdentification(void) const;
00125 
00132       void setIdentification(const ABA_ID &id);
00133 
00138       void setNewIdentification();
00139 #endif
00140 
00141     private:
00142 
00151       void insert(BaseType *convar);
00152 
00160       int softDelete();
00161 
00166       void hardDelete();
00167 
00170       void removeConVarFromPool();
00171 
00174       unsigned long version() const;
00175 
00178       ABA_MASTER *master();
00179 
00182       ABA_MASTER *master_;
00183 
00186       BaseType *conVar_;
00187 
00190       unsigned long version_;
00191 
00194       ABA_POOL<BaseType, CoType> *pool_;
00195       ABA_POOLSLOT(const ABA_POOLSLOT<BaseType, CoType> &rhs);
00196       const ABA_POOLSLOT<BaseType, CoType> 
00197             &operator=(const ABA_POOLSLOT<BaseType, CoType> &rhs);
00198   };
00199 
00200 #include "abacus/poolslot.inc"
00201 
00202 #endif  // ABA_POOLSLOT_H
00203 
00204 

Generated on Tue Aug 14 18:09:54 2007 for ABACUS by  doxygen 1.5.1