Lugdunum  0.1.0
Classes | Public Types | Public Member Functions | Protected Attributes | Private Attributes | Friends | List of all members
lug::Graphics::Resource Class Reference

Class for resource. More...

#include <Resource.hpp>

Inheritance diagram for lug::Graphics::Resource:
[legend]
Collaboration diagram for lug::Graphics::Resource:
[legend]

Classes

struct  Handle
 Handle of the resource. It contains informations such as the type and the index in the ResourceManager's internal vector, i.e. the index of the Resource in this vector. More...
 
class  SharedPtr
 Dummy class for a shared pointer. More...
 
class  WeakPtr
 Dummy class for a weak ptr. More...
 

Public Types

enum  Type : uint8_t {
  Type::Scene, Type::SceneNode, Type::Material, Type::Mesh,
  Type::Light, Type::Texture, Type::Pipeline, Type::Camera,
  Type::SkyBox
}
 Type of the resource. More...
 

Public Member Functions

 Resource (Type type, const std::string &name)
 
 Resource (const Resource &)=delete
 
 Resource (Resource &&)=delete
 
Resourceoperator= (const Resource &)=delete
 
Resourceoperator= (Resource &&)=delete
 
virtual ~Resource ()=default
 
Type getType () const
 Returns the type of the Resource. More...
 
Handle getHandle () const
 Returns the handle of the Resource. More...
 
const std::string & getName () const
 Gets the name of the Resource. More...
 
void setName (const std::string &name)
 Sets the name of the Resource. More...
 

Protected Attributes

std::string _name
 

Private Attributes

Handle _handle
 

Friends

class lug::Graphics::ResourceManager
 

Detailed Description

Class for resource.

Definition at line 17 of file Resource.hpp.

Member Enumeration Documentation

◆ Type

enum lug::Graphics::Resource::Type : uint8_t
strong

Type of the resource.

Enumerator
Scene 

A scene.

SceneNode 

A scene node (a scene is composed of scene nodes, to make a tree)

Material 

A material.

Mesh 

A mesh.

Light 

A light.

Texture 

A texture.

Pipeline 

A graphical pipeline.

Camera 

A camera.

SkyBox 

A skyBox.

Definition at line 24 of file Resource.hpp.

Constructor & Destructor Documentation

◆ Resource() [1/3]

lug::Graphics::Resource::Resource ( Resource::Type  type,
const std::string &  name 
)

Definition at line 6 of file Resource.cpp.

◆ Resource() [2/3]

lug::Graphics::Resource::Resource ( const Resource )
delete

◆ Resource() [3/3]

lug::Graphics::Resource::Resource ( Resource &&  )
delete

◆ ~Resource()

virtual lug::Graphics::Resource::~Resource ( )
virtualdefault

Member Function Documentation

◆ operator=() [1/2]

Resource& lug::Graphics::Resource::operator= ( const Resource )
delete

◆ operator=() [2/2]

Resource& lug::Graphics::Resource::operator= ( Resource &&  )
delete

◆ getType()

Resource::Type Resource::getType ( ) const
inline

Returns the type of the Resource.

Returns
The type.

Definition at line 129 of file Resource.inl.

◆ getHandle()

Resource::Handle Resource::getHandle ( ) const
inline

Returns the handle of the Resource.

Returns
The handle.

Definition at line 133 of file Resource.inl.

◆ getName()

const std::string & Resource::getName ( ) const
inline

Gets the name of the Resource.

Returns
The name.

Definition at line 137 of file Resource.inl.

◆ setName()

void Resource::setName ( const std::string &  name)
inline

Sets the name of the Resource.

Parameters
[in]nameThe name

Definition at line 141 of file Resource.inl.

Friends And Related Function Documentation

◆ lug::Graphics::ResourceManager

friend class lug::Graphics::ResourceManager
friend

Definition at line 18 of file Resource.hpp.

Member Data Documentation

◆ _name

std::string lug::Graphics::Resource::_name
protected

Definition at line 193 of file Resource.hpp.

◆ _handle

Handle lug::Graphics::Resource::_handle
private

Definition at line 196 of file Resource.hpp.


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