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

Ancestor class for managed classes. More...

Detailed Description

Ancestor class for managed classes.

Cannot be copied, because the copy should be inserted into the manager's array (and it's unnecessary to implement now).

Definition at line 24 of file PureManager.h.

#include <PureManager.h>

+ Inheritance diagram for PureManaged:

Classes

class  PureManagedImpl
 

Public Member Functions

 PureManaged ()
 
virtual ~PureManaged ()
 
CConsole & getManagedConsole () const
 Returns access to console preset with logger module name as this class.
 
const PureManagedgetUtiliser () const
 Returns the managed that utilizes this managed.
 
PureManagedgetUtiliser ()
 Returns the managed that utilizes this managed.
 
void SetUtiliser (PureManaged *pUtiliser)
 Sets the managed that utilizes this managed.
 
void DetachFrom ()
 Removes the managed from its manager.
 
PureManagergetManager () const
 Gets the manager of the managed.
 
const std::string & getName () const
 Gets the name.
 
void SetName (const std::string &name)
 Sets the name.
 
virtual void FlushResources ()
 This can be used if the specialized managed object has some resources that may be released from memory when not needed anymore.
 
virtual TPureUInt getUsedSystemMemory () const
 Gets the amount of allocated system memory for this managed.
 

Static Public Member Functions

static const char * getLoggerModuleName ()
 Returns the logger module name of this class.
 

Protected Member Functions

 PureManaged (const PureManaged &other)
 
PureManagedoperator= (const PureManaged &other)
 

Private Attributes

PureManagedImplpImpl
 

Friends

class PureManager
 
class PureManagerImpl
 

Constructor & Destructor Documentation

◆ PureManaged() [1/2]

PureManaged::PureManaged ( )

Definition at line 137 of file PureManager.cpp.

◆ ~PureManaged()

PureManaged::~PureManaged ( )
virtual

Definition at line 143 of file PureManager.cpp.

◆ PureManaged() [2/2]

PureManaged::PureManaged ( const PureManaged & other)
protected

Definition at line 285 of file PureManager.cpp.

Member Function Documentation

◆ DetachFrom()

void PureManaged::DetachFrom ( )

Removes the managed from its manager.

Actually it calls the public Detach() method of the manager with the this pointer.

Definition at line 227 of file PureManager.cpp.

◆ FlushResources()

void PureManaged::FlushResources ( )
virtual

This can be used if the specialized managed object has some resources that may be released from memory when not needed anymore.

Reimplemented in PureImage.

Definition at line 265 of file PureManager.cpp.

◆ getLoggerModuleName()

const char * PureManaged::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 169 of file PureManager.cpp.

◆ getManagedConsole()

CConsole & PureManaged::getManagedConsole ( ) 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 156 of file PureManager.cpp.

◆ getManager()

PureManager * PureManaged::getManager ( ) const

Gets the manager of the managed.

Returns
Pointer to manager.

Definition at line 237 of file PureManager.cpp.

◆ getName()

const std::string & PureManaged::getName ( ) const

Gets the name.

Definition at line 246 of file PureManager.cpp.

◆ getUsedSystemMemory()

TPureUInt PureManaged::getUsedSystemMemory ( ) const
virtual

Gets the amount of allocated system memory for this managed.

Returns
Amount of used system memory in Bytes.

Reimplemented in PureFiledManaged, PureImage, PureMaterial, PureMesh3D, PureObject3D, PureTexture, and PureVertexTransfer.

Definition at line 276 of file PureManager.cpp.

◆ getUtiliser() [1/2]

PureManaged * PureManaged::getUtiliser ( )

Returns the managed that utilizes this managed.

The utiliser is another PureManaged instance, usually having different class, and that class becomes complete with the utilised managed instance. For example: every PureMesh3D instance has an associated PureMaterial instance, in this case PureMesh3D instance utilizes a PureMaterial instance, so the latter instance's getUtiliser() returns the PureMesh3D instance. A PureManaged instance can have multiple utilised PureManaged instances, but any PureManaged instance can have maximum 1 utiliser instance.

Returns
The managed that utilizes this managed.

Definition at line 200 of file PureManager.cpp.

◆ getUtiliser() [2/2]

const PureManaged * PureManaged::getUtiliser ( ) const

Returns the managed that utilizes this managed.

The utiliser is another PureManaged instance, usually having different class, and that class becomes complete with the utilised managed instance. For example: every PureMesh3D instance has an associated PureMaterial instance, in this case PureMesh3D instance utilizes a PureMaterial instance, so the latter instance's getUtiliser() returns the PureMesh3D instance. A PureManaged instance can have multiple utilised PureManaged instances, but any PureManaged instance can have maximum 1 utiliser instance.

Returns
The managed that utilizes this managed.

Definition at line 184 of file PureManager.cpp.

◆ operator=()

PureManaged & PureManaged::operator= ( const PureManaged & other)
protected

Definition at line 291 of file PureManager.cpp.

◆ SetName()

void PureManaged::SetName ( const std::string & name)

Sets the name.

Definition at line 255 of file PureManager.cpp.

◆ SetUtiliser()

void PureManaged::SetUtiliser ( PureManaged * pUtiliser)

Sets the managed that utilizes this managed.

PGENULL is also accepted.

Definition at line 211 of file PureManager.cpp.

Friends And Related Symbol Documentation

◆ PureManager

friend class PureManager
friend

Definition at line 65 of file PureManager.h.

◆ PureManagerImpl

friend class PureManagerImpl
friend

Definition at line 66 of file PureManager.h.

Member Data Documentation

◆ pImpl

PureManagedImpl* PureManaged::pImpl
private

Definition at line 63 of file PureManager.h.


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