Reference: Object

From DaevsGUI

Jump to: navigation, search

DaevsCommon::Object is the base class of all reference-counted classes.

Classes

DaevsCommon::Exception

class DAEVSCOMMON_API Object
{
protected:
    Object();
    Object(const Object &instance);
    Object &operator= (const Object &instance);
    virtual ~Object();
 
public:
    bool used() const;
    bool shared() const;
    unsigned int count() const;
 
    ////////////////
 
    void retain() const;
    bool release() const;
 
private:
    mutable unsigned int m_count; // mutable, because the content of any class deriving from this class may not be altered when const, not the reference counter (also const classes should be reference counted)
};

Example

 
Views
Personal tools
Other