Louvre  v2.3.2-1
C++ library for Wayland compositors
Public Member Functions | Protected Member Functions | List of all members
LObject Class Reference

Base class for Louvre objects. More...

+ Inheritance diagram for LObject:

Public Member Functions

 LObject (const LObject &) noexcept
 Copy constructor. More...
 
LObjectoperator= (const LObject &) noexcept
 Assignment operator (each object has its own individual LWeak reference count). More...
 
void setUserData (UIntPtr data) const noexcept
 Store an unsigned integer value/pointer. More...
 
UIntPtr userData () const noexcept
 Retrieves the stored unsigned integer value/pointer. More...
 

Protected Member Functions

 LObject () noexcept=default
 Constructor of the LObject class. More...
 
virtual ~LObject () noexcept
 Destructor of the LObject class. More...
 
void notifyDestruction () noexcept
 Notifies the object destruction. More...
 

Detailed Description

Base class for Louvre objects.

See also
LWeak

Constructor & Destructor Documentation

◆ LObject() [1/2]

LObject ( const LObject )
inlinenoexcept

Copy constructor.

Note
The user data and LWeak references are not copied.

◆ LObject() [2/2]

LObject ( )
protecteddefaultnoexcept

Constructor of the LObject class.

◆ ~LObject()

~LObject ( )
protectedvirtualnoexcept

Destructor of the LObject class.

Member Function Documentation

◆ operator=()

LObject& operator= ( const LObject )
inlinenoexcept

Assignment operator (each object has its own individual LWeak reference count).

Note
The user data and LWeak references are not copied.

◆ setUserData()

void setUserData ( UIntPtr  data) const
inlinenoexcept

Store an unsigned integer value/pointer.

◆ userData()

UIntPtr userData ( ) const
inlinenoexcept

Retrieves the stored unsigned integer value/pointer.

◆ notifyDestruction()

void notifyDestruction ( )
protectednoexcept

Notifies the object destruction.

This method can be invoked from a subclass destructor to notify the object's imminent destruction to all associated LWeak references in advance. If not invoked, the base LObject automatically calls it.

After invocation, all LWeak references are set to nullptr, preventing the creation of additional references for this object.