| | |
| | | {} |
| | | std::string name() const { return name_; } |
| | | bool Remove() { return Remove(name()); } |
| | | |
| | | void *Alloc(const size_t size) { return allocate(size, std::nothrow); } |
| | | void Dealloc(void *p) { if(p) { deallocate(p); } } |
| | | template<class T> void Dealloc(offset_ptr<T> ptr) { return Dealloc(ptr.get()); } |
| | | |
| | | template <class T, class ...Params> T * New(Params const&...params) { return construct<T>(anonymous_instance, std::nothrow)(params...); } |
| | | template <class T> void Delete(T *p) { if (p) { destroy_ptr<T>(p); }; } |
| | | template <class T> void Delete(offset_ptr<T> p) { Delete(p.get()); } |
| | |
| | | |
| | | bool IsOk() const { return pdata_; } |
| | | protected: |
| | | ShmType &shm() { return shm_; } |
| | | ShmType &shm() const { return shm_; } |
| | | public: |
| | | template <class...Params> |
| | | ShmObject(ShmType &segment, const std::string &name, Params&&...t): |