Class CLifetimeControlImpl#
Defined in File component_impl.h
Inheritance Relationships#
Base Types#
public sdv::IInterfaceAccess(Struct IInterfaceAccess)public sdv::IObjectLifetime(Struct IObjectLifetime)protected sdv::IObjectDestroy(Struct IObjectDestroy)
Derived Type#
public sdv::CSharedLifetimeControlImpl< TClass >(Template Class CSharedLifetimeControlImpl)
Class Documentation#
-
class CLifetimeControlImpl : public virtual sdv::IInterfaceAccess, public sdv::IObjectLifetime, protected sdv::IObjectDestroy#
Lifetime control implementation class.
Subclassed by sdv::CSharedLifetimeControlImpl< TClass >
Public Functions
-
inline CLifetimeControlImpl()#
Default constructor.
-
CLifetimeControlImpl(const CLifetimeControlImpl &rClass) = delete#
Deleted copy constructor.
- Parameters:
rClass – [in] Reference to the class to copy from.
-
CLifetimeControlImpl(CLifetimeControlImpl &&rClass) = delete#
Deleted move constructor.
- Parameters:
rClass – [in] Reference to the class to copy from.
-
inline virtual ~CLifetimeControlImpl()#
Destructor.
-
CLifetimeControlImpl &operator=(const CLifetimeControlImpl &rClass) = delete#
Deleted copy assignment constructor.
- Parameters:
rClass – [in] Reference to the class to copy from.
- Returns:
Reference to this class.
-
CLifetimeControlImpl &operator=(CLifetimeControlImpl &&rClass) = delete#
Deleted move assignment constructor.
- Parameters:
rClass – [in] Reference to the class to copy from.
- Returns:
Reference to this class.
-
inline virtual void Increment() override#
Increment the lifetime. Needs to be balanced by a call to Decrement. Overload of IObjectLifetime::Increment.
-
inline virtual bool Decrement() override#
Decrement the lifetime. If the lifetime reaches zero, the object will be destroyed (through the exposed IObjectDestroy interface). Overload of IObjectLifetime::Decrement.
- Returns:
Returns ‘true’ if the object was destroyed, false if not.
-
inline virtual uint32_t GetCount() const override#
Get the current lifetime count. Overload of IObjectLifetime::GetCount.
Remark
The GetCount function returns a momentary value, which can be changed at any moment.
- Returns:
Returns the current counter value.
Protected Functions
-
inline virtual void DestroyObject() override#
Destroy the object. Default implementation deletes ‘this’. Overload of IObjectDestroy::DestroyObject.
- Attention
After a call of this function, all exposed interfaces render invalid and should not be used any more.
-
inline CLifetimeControlImpl()#