PURE API 0.5
PR00F's Ultimate Rendering Engine full documentation
Loading...
Searching...
No Matches
PureMaterialManager Class Reference

Material manager class. More...

Detailed Description

Material manager class.

Definition at line 249 of file PureMaterialManager.h.

#include <PureMaterialManager.h>

+ Inheritance diagram for PureMaterialManager:

Classes

class  PureMaterialManagerImpl
 

Public Member Functions

 PureMaterialManager ()
 
virtual ~PureMaterialManager ()
 
CConsole & getConsole () const
 Returns access to console preset with logger module name as this class.
 
TPureBool isInitialized () const
 Tells whether the object is correctly initialized or not.
 
TPureUInt getMaximumLayerCount () const
 Tells maximum number of layers allowed per material.
 
PureMaterialcreateMaterial ()
 Creates a new material.
 
virtual void WriteList () const
 From PureFiledManager, adding logging material data.
 
- Public Member Functions inherited from PureFiledManager
 PureFiledManager ()
 
virtual ~PureFiledManager ()
 
CConsole & getConsole () const
 Returns access to console preset with logger module name as this class.
 
PureFiledManagedgetByFilename (const char *filename) const
 Gets the FiledManaged by the specified filename.
 
virtual PureFiledManagedcreateFromFile (const char *filename)
 Should create a new managed from the given file.
 
- Public Member Functions inherited from PureManager
 PureManager ()
 
virtual ~PureManager ()
 
CConsole & getConsole () const
 Returns access to console preset with logger module name as this class.
 
TPureInt getCount () const
 Gets the number of managed objects.
 
TPureBool isEmpty () const
 Is the number of manageds 0?
 
TPureInt getSize () const
 Gets the number of allocated slots for managed objects; getSize() >= getCount().
 
PureManagedgetAttachedAt (TPureInt ind) const
 Gets the pointer to the managed at the given index.
 
TPureInt getAttachedIndex (const PureManaged &m) const
 Gets the index of the given managed.
 
void PreAlloc (TPureInt count)
 Allocates count free slots for manageds.
 
TPureBool hasAttached (const PureManaged &m) const
 Gets whether the given managed is managed by this manager.
 
virtual void Attach (PureManaged &m)
 Adds the given managed to the manager, if the managed has no manager yet.
 
virtual void Detach (PureManaged &m)
 Removes the given managed from the manager, so the managed will have no manager.
 
void DeleteAttachedInstance (PureManaged &m)
 Removes the given managed from the manager and destructs it.
 
void DeleteAll ()
 Removes and destructs every managed element in the manager.
 
virtual void HandleManagedPropertyChanged (PureManaged &m)
 Should be invoked when a managed's property got changed from a different kind of manager or managed.
 
virtual TPureUInt getUsedSystemMemory () const
 Gets the amount of allocated system memory for all manageds owner by this manager.
 

Static Public Member Functions

static const char * getLoggerModuleName ()
 Returns the logger module name of this class.
 
- Static Public Member Functions inherited from PureFiledManager
static const char * getLoggerModuleName ()
 Returns the logger module name of this class.
 
- Static Public Member Functions inherited from PureManager
static const char * getLoggerModuleName ()
 Returns the logger module name of this class.
 

Protected Member Functions

 PureMaterialManager (const PureMaterialManager &)
 
PureMaterialManageroperator= (const PureMaterialManager &)
 
virtual void WriteListCallback (const PureManaged &mngd) const
 From PureManager, printing filename.
 
- Protected Member Functions inherited from PureFiledManager
 PureFiledManager (const PureFiledManager &)
 
PureFiledManageroperator= (const PureFiledManager &)
 
- Protected Member Functions inherited from PureManager
 PureManager (const PureManager &other)
 
PureManageroperator= (const PureManager &)
 

Private Attributes

PureMaterialManagerImplpImpl
 

Constructor & Destructor Documentation

◆ PureMaterialManager() [1/2]

PureMaterialManager::PureMaterialManager ( )
Exceptions
std::bad_alloc- This class or its ancestor dynamically allocates memory with operator new, in case of failure the exception is not handled but propagated to caller.

Definition at line 134 of file PureMaterialManager.cpp.

◆ ~PureMaterialManager()

PureMaterialManager::~PureMaterialManager ( )
virtual

Definition at line 140 of file PureMaterialManager.cpp.

◆ PureMaterialManager() [2/2]

PureMaterialManager::PureMaterialManager ( const PureMaterialManager & )
protected

Definition at line 245 of file PureMaterialManager.cpp.

Member Function Documentation

◆ createMaterial()

PureMaterial * PureMaterialManager::createMaterial ( )

Creates a new material.

Returns
New material. PGENULL if MaterialManager is not yet initialized.

Definition at line 198 of file PureMaterialManager.cpp.

◆ getConsole()

CConsole & PureMaterialManager::getConsole ( ) const

Returns access to console preset with logger module name as this class.

Intentionally not virtual, so the getConsole() in derived class should hide this instead of overriding.

Returns
Console instance used by this class.

Definition at line 153 of file PureMaterialManager.cpp.

◆ getLoggerModuleName()

const char * PureMaterialManager::getLoggerModuleName ( )
static

Returns the logger module name of this class.

Intentionally not virtual, so derived class should hide this instead of overriding. Not even private, so user can also access this from outside, for any reason like controlling log filtering per logger module name.

Returns
The logger module name of this class.

Definition at line 166 of file PureMaterialManager.cpp.

◆ getMaximumLayerCount()

TPureUInt PureMaterialManager::getMaximumLayerCount ( ) const

Tells maximum number of layers allowed per material.

This depends on number of hardware texture mapping units in current system.

Definition at line 186 of file PureMaterialManager.cpp.

◆ isInitialized()

TPureBool PureMaterialManager::isInitialized ( ) const

Tells whether the object is correctly initialized or not.

Returns
True if the given MaterialManager instance was initialized correctly, false otherwise.

Definition at line 176 of file PureMaterialManager.cpp.

◆ operator=()

PureMaterialManager & PureMaterialManager::operator= ( const PureMaterialManager & )
protected

Definition at line 251 of file PureMaterialManager.cpp.

◆ WriteList()

void PureMaterialManager::WriteList ( ) const
virtual

From PureFiledManager, adding logging material data.

Reimplemented from PureFiledManager.

Definition at line 231 of file PureMaterialManager.cpp.

◆ WriteListCallback()

void PureMaterialManager::WriteListCallback ( const PureManaged & mngd) const
protectedvirtual

From PureManager, printing filename.

Reimplemented from PureFiledManager.

Definition at line 257 of file PureMaterialManager.cpp.

Member Data Documentation

◆ pImpl

PureMaterialManagerImpl* PureMaterialManager::pImpl
private

Definition at line 286 of file PureMaterialManager.h.


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