Lluvia
ll::Object Class Referenceabstract

Base class for all types that can be used in computer shaders. More...

#include <Object.h>

Inheritance diagram for ll::Object:

Public Member Functions

 Object ()=default
 Default constructor. More...
 
 Object (const Object &)=delete
 Copy constructor. More...
 
 Object (Object &&)=delete
 Move constructor. More...
 
virtual ~Object ()=default
 
Objectoperator= (const Object &)=delete
 Copy assignment. More...
 
Objectoperator= (Object &&)=delete
 Move assignment. More...
 
virtual ll::ObjectType getType () const noexcept=0
 Gets the object type. More...
 

Detailed Description

Base class for all types that can be used in computer shaders.

Handling of objects in the engine is done through instances allocated in the heap and referenced through pointers. The reason is that normal object operations such as copying or moving are hard to define for classes that contain some Vulkan resource such as buffers or images.

Constructor & Destructor Documentation

◆ Object() [1/3]

ll::Object::Object ( )
default

Default constructor.

This constructor needs to be kept in order to construct the child classes. However, this class has no members to initialize.

◆ Object() [2/3]

ll::Object::Object ( const Object )
delete

Copy constructor.

The copy constructor is deleted intentionally. Copying objects that handle some Vulkan resource such as buffers or images is not well defined.

◆ Object() [3/3]

ll::Object::Object ( Object &&  )
delete

Move constructor.

The move constructor is deleted intentionally. Moving objects that handle Vulkan resources is not well defined.

◆ ~Object()

virtual ll::Object::~Object ( )
virtualdefault

Member Function Documentation

◆ getType()

virtual ll::ObjectType ll::Object::getType ( ) const
pure virtualnoexcept

Gets the object type.

This method can be used for safely down-casting pointers of ll::Object type to its children.

ll::Object* ptr = ...
auto bufferPtr = static_cast<ll::Buffer*>(ptr);
}
Objects to manage raw portions of allocated memory.
Definition: Buffer.h:57
Base class for all types that can be used in computer shaders.
Definition: Object.h:94
virtual ll::ObjectType getType() const noexcept=0
Gets the object type.
Returns
The object type.

Implemented in ll::ImageView, ll::Image, and ll::Buffer.

◆ operator=() [1/2]

Object& ll::Object::operator= ( const Object )
delete

Copy assignment.

Copy assignment is not allowed for Object instances.

◆ operator=() [2/2]

Object& ll::Object::operator= ( Object &&  )
delete

Move assignment.

Move assignment is not allowed for Object instances.


The documentation for this class was generated from the following file: