Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

CUI_Registry Class Reference

Resource registry. More...

#include <CUI_Registry.h>

List of all members.

Public Types

typedef std::vector< CUI_Frame * > FRAMEVECTOR
 type for returned memory vector

typedef std::vector< IUI_Shader * > SHADERVECTOR
typedef std::vector< IUI_Font * > FONTVECTOR
typedef std::vector< CUI_CoordSys * > COORDSYSVECTOR
typedef std::vector< IUI_Border * > BORDERVECTOR

Public Member Functions

 CUI_Registry ()
 constructor

virtual ~CUI_Registry ()
 destructor

virtual FRAMEVECTORFlushFrames (FRAMEVECTOR *vec=NULL)
 flush all frames out of the registry

virtual SHADERVECTOR * FlushShaders (SHADERVECTOR *vec=NULL)
 flush all shaders out of the registry

virtual FONTVECTOR * FlushFonts (FONTVECTOR *vec=NULL)
 flush all fonts out of the registry

virtual COORDSYSVECTOR * FlushCoordSys (COORDSYSVECTOR *vec=NULL)
 flush all coord sys out of the registry

virtual BORDERVECTOR * FlushBorders (BORDERVECTOR *vec=NULL)
 flush all border out of the registry

virtual bool AddFrame (CUI_Frame *frame)
 add a frame

virtual CUI_FrameGetFrame (unsigned long id)
 get a frame - based on its frameID

virtual bool AddShader (std::string name, IUI_Shader *shader)
 add a shader

virtual IUI_ShaderGetShader (std::string name)
 get a shader

virtual bool AddFont (std::string name, IUI_Font *font)
 add a font

virtual IUI_FontGetFont (std::string name)
 get a font

virtual bool AddCoordSys (std::string name, CUI_CoordSys *coordsys)
 add a coordinate system

virtual CUI_CoordSysGetCoordSys (std::string name)
 get a coordinate system

virtual bool AddBorder (std::string name, IUI_Border *border)
 add a border

virtual IUI_BorderGetBorder (std::string name)
 get a border


Protected Types

typedef std::multimap< int,
CUI_Frame *, std::less< int > > 
FRAMEMAP
 type for the frame list

typedef std::map< std::string,
IUI_Shader *, std::less<
std::string > > 
SHADERMAP
 type for shader map

typedef std::map< std::string,
IUI_Font *, std::less< std::string > > 
FONTMAP
 type for font map

typedef std::map< std::string,
CUI_CoordSys *, std::less<
std::string > > 
COORDSYSMAP
 type for coordinate system map

typedef std::map< std::string,
IUI_Border *, std::less<
std::string > > 
BORDERMAP
 type for border map


Protected Attributes

FRAMEMAP m_frameMap
 a list of registered frames

SHADERMAP m_shaderMap
 a map of string names to shaders

FONTMAP m_fontMap
 a map of string names to fonts

COORDSYSMAP m_coordSysMap
 a map of string names to coordinate systems

BORDERMAP m_borderMap
 a map of string names to borders


Detailed Description

Resource registry.

Keeps track of resources

Uses a STL map to hash resources for add and get.

(?) Once an object is entered into the registry, the registry assumes responsibility for deleting it.

See also:
IUI_Shader

CUI_Font

CUI_CoordSys

IUI_Border


Member Function Documentation

CUI_Registry::BORDERVECTOR * CUI_Registry::FlushBorders BORDERVECTOR *  vec = NULL  )  [virtual]
 

flush all border out of the registry

Cleans all objects marked as owned by the UI and returns a BORDERVECTOR of objects owned by the application.

Parameters:
vec erase the bordervector that was returned by this func.

CUI_Registry::COORDSYSVECTOR * CUI_Registry::FlushCoordSys COORDSYSVECTOR *  vec = NULL  )  [virtual]
 

flush all coord sys out of the registry

Cleans all objects marked as owned by the UI and returns a COORDSYSVECTOR of objects owned by the application.

Parameters:
vec erase the coordsysvector that was returned by this func.

CUI_Registry::FONTVECTOR * CUI_Registry::FlushFonts FONTVECTOR *  vec = NULL  )  [virtual]
 

flush all fonts out of the registry

Cleans all objects marked as owned by the UI and returns a FONTVECTOR of objects owned by the application.

Parameters:
vec erase the fontvector that was returned by this func.

CUI_Registry::FRAMEVECTOR * CUI_Registry::FlushFrames FRAMEVECTOR vec = NULL  )  [virtual]
 

flush all frames out of the registry

Cleans all objects marked as owned by the UI and returns a FRAMEVECTOR of objects owned by the application.

Parameters:
vec erase the framevector that was returned by this func.

CUI_Registry::SHADERVECTOR * CUI_Registry::FlushShaders SHADERVECTOR *  vec = NULL  )  [virtual]
 

flush all shaders out of the registry

Cleans all objects marked as owned by the UI and returns a SHADERVECTOR of objects owned by the application.

Parameters:
vec erase the shadervector that was returned by this func.


The documentation for this class was generated from the following files:
Generated on Mon Sep 29 23:07:04 2003 for glGUI by doxygen 1.3.4