00001 #ifndef MANGO_PTR_OWNERSHIP_H
00002 #define MANGO_PTR_OWNERSHIP_H
00003
00023 #include "OwnedFWD.hh"
00024 #include "OwnershipFWD.hh"
00025
00026 namespace MangoPtr
00027 {
00028
00040 template <typename OType, OwnershipType oshiptype>
00041 class Ownership
00042 {
00043 public:
00045 template <typename O2Type, OwnershipType oshiptype2> friend class Owned;
00048 Ownership(const Ownership& rhs): owner(rhs.owner) {}
00049
00050 private:
00052 inline Ownership(Owned<OType, oshiptype>& owner): owner(owner) {}
00053
00054 private:
00055 Ownership();
00056 Owned<OType,oshiptype>& owner;
00057 };
00058
00059 }
00060
00061 #endif // MANGO_PTR_OWNERSHIP_H