CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

csSymbolTable Class Reference

This class provides a system for storing inheritable properties, by allowing instances to be stacked in a tree formation with parent/child relationships. More...

#include <symtable.h>

List of all members.

Public Methods

 csSymbolTable (int size=53)
 Construct the table with a hash of the given initial size, which should be a prime number, for optimisation reasons. More...

 csSymbolTable (const csSymbolTable &other, int size=53)
 Construct the table with a hash of the given initial size, which should be a prime number, for optimisation reasons. More...

 ~csSymbolTable ()
 Destruct the table and delete all variables. More...

void AddChild (csSymbolTable *)
 Add a child table which will inherit the symbols of this one. More...

void AddChildren (csArray< csSymbolTable * > &)
 Add child tables which will inherit the symbols of this one. More...

csArray< csSymbolTable * > GetChildren ()
 Get the whole array of chlidren. More...

void SetSymbol (csStringID name, csShaderVariable *value)
 Set the value of a symbol, or create a new one if it doesn't exist. More...

void SetSymbols (const csArray< csStringID > &names, csArray< csShaderVariable * > &)
 SetSymbol for multiple symbols. More...

bool DeleteSymbol (csStringID name)
 Delete a symbol. More...

bool DeleteSymbols (const csArray< csStringID > &names)
 Delete multiple symbols. More...

csShaderVariableGetSymbol (csStringID name)
 Get the value of a symbol. More...

csArray< csShaderVariable * > GetSymbols (const csArray< csStringID > &names)
 Get the values of multiple symbols. More...

csArray< csShaderVariable * > GetSymbols ()
 Get all the symbols. More...

bool SymbolExists (csStringID name) const
 Check if a symbol exists. More...

bool SymbolsExist (const csArray< csStringID > &names) const
 Check if all of a set of symbols exist. More...


Detailed Description

This class provides a system for storing inheritable properties, by allowing instances to be stacked in a tree formation with parent/child relationships.

Used by the Graphics3D shader system.

@@ Only stores csShaderVariable's, maybe it should be template-ized?

Definition at line 37 of file symtable.h.


Constructor & Destructor Documentation

csSymbolTable::csSymbolTable int    size = 53 [inline]
 

Construct the table with a hash of the given initial size, which should be a prime number, for optimisation reasons.

See the csHashMap docs for more info.

Definition at line 72 of file symtable.h.

csSymbolTable::csSymbolTable const csSymbolTable &    other,
int    size = 53
 

Construct the table with a hash of the given initial size, which should be a prime number, for optimisation reasons.

See the csHashMap docs for more info. Also copies auth variables from another symbol table.

csSymbolTable::~csSymbolTable  
 

Destruct the table and delete all variables.


Member Function Documentation

void csSymbolTable::AddChild csSymbolTable *   
 

Add a child table which will inherit the symbols of this one.

Referenced by csMaterial::AddChild.

void csSymbolTable::AddChildren csArray< csSymbolTable * > &   
 

Add child tables which will inherit the symbols of this one.

bool csSymbolTable::DeleteSymbol csStringID    name
 

Delete a symbol.

bool csSymbolTable::DeleteSymbols const csArray< csStringID > &    names
 

Delete multiple symbols.

csArray<csSymbolTable *> csSymbolTable::GetChildren  
 

Get the whole array of chlidren.

csShaderVariable* csSymbolTable::GetSymbol csStringID    name
 

Get the value of a symbol.

Referenced by csMaterial::GetVariable.

csArray<csShaderVariable *> csSymbolTable::GetSymbols  
 

Get all the symbols.

csArray<csShaderVariable *> csSymbolTable::GetSymbols const csArray< csStringID > &    names
 

Get the values of multiple symbols.

void csSymbolTable::SetSymbol csStringID    name,
csShaderVariable   value
 

Set the value of a symbol, or create a new one if it doesn't exist.

Referenced by csMaterial::AddVariable.

void csSymbolTable::SetSymbols const csArray< csStringID > &    names,
csArray< csShaderVariable * > &   
 

SetSymbol for multiple symbols.

bool csSymbolTable::SymbolExists csStringID    name const
 

Check if a symbol exists.

bool csSymbolTable::SymbolsExist const csArray< csStringID > &    names const
 

Check if all of a set of symbols exist.


The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.2.14