Class real_bean

Synopsis

#include <include/bean_ptr.h>

template<class C>
class real_bean : noncopyable

Description

No description yet.

Inheritance

Ancestors: noncopyable

Methods

~real_bean
destroy
destroyed
get
get_key
loadLazy
operator->
save

Source

Lines 15-40 in include/bean_ptr.h.

template<class C>
class real_bean : noncopyable {
    public:
        inline C* operator->();
        inline C* get();

        ~real_bean();

        bean_key get_key() const { return key; }

        void save();

        void destroy();
        bool destroyed() const { return forgotten; }

    protected:
        inline void loadLazy();

        bean_key key;
        C* obj;
        bool forgotten;

    private:
        friend class Registry<C>;
        real_bean(const bean_key _key, C* _obj); //only Registry can create the real_bean
};





Add Discussion as Guest

Log in