#ifndef MASTER_PTR_H
#define MASTER_PTR_H

namespace Innovation
{
Template <typename T>                                   class Master_ptr;
Template <typename T, typename Owner, typename Holder>  class Hook;

Template <typename T, typename Owner, typename Holder>
class Hook : public Ref <T>
{
    Owner   owner_;
    Holder  holder_;

public:
    ~Hook()
    {
    }
};

Template <typename T>
class Master_ptr : public Janitor //fix smart_ptr
{
    Array <Ref <Hook> >     hooks_;

public:
    T*      operator -> ()          {return &(operator());}//fix T* const

    template <typename Owner>
    Hook <T>    hook (Owner &owner, (Owner::*method_of_removal)())
    {
        return Hook <T, Owner> (owner, method_of_removal);
    }
};

};//namespace Innovation

#endif //MASTER_PTR_H
