CrystalSpace

Public API Reference

CS::Graphics::ShaderVariableContextImpl Class Reference

Simple implementation for iShaderVariableContext. More...

#include <csgfx/shadervarcontext.h>

Inheritance diagram for CS::Graphics::ShaderVariableContextImpl:

List of all members.

Public Member Functions

virtual void AddVariable (csShaderVariable *variable)
 Add a variable to this context.
virtual void Clear ()
 Remove all variables from this context.
const csRefArray
< csShaderVariable > & 
GetShaderVariables () const
 Get Array of all ShaderVariables.
virtual csShaderVariableGetVariable (ShaderVarStringID name) const
 Get a named variable from this context.
virtual bool IsEmpty () const
 Determine whether this SV context contains any variables at all.
virtual void PushVariables (csShaderVariableStack &stacks) const
 Push the variables of this context onto the variable stacks supplied in the "stacks" argument.
virtual bool RemoveVariable (ShaderVarStringID name)
 Remove the variable with the given name from this context.
virtual bool RemoveVariable (csShaderVariable *variable)
 Remove the given variable from this context.
virtual void ReplaceVariable (csShaderVariable *variable)
 Replace the current variable object of the same name as variable with the latter, add variable otherwise.

Detailed Description

Simple implementation for iShaderVariableContext.

Can be inherited from for use in SCF classes. For an example, see csShaderVariableContext.

Definition at line 43 of file shadervarcontext.h.


Member Function Documentation

virtual void CS::Graphics::ShaderVariableContextImpl::AddVariable ( csShaderVariable variable  )  [virtual]

Add a variable to this context.

Remarks:
If a variable of the same name exists in the current context, its contents are replaced with those of variable.

Implements iShaderVariableContext.

Reimplemented in CS::Graphics::OverlayShaderVariableContextImpl.

virtual void CS::Graphics::ShaderVariableContextImpl::Clear (  )  [inline, virtual]

Remove all variables from this context.

Implements iShaderVariableContext.

Reimplemented in CS::Graphics::OverlayShaderVariableContextImpl.

Definition at line 59 of file shadervarcontext.h.

const csRefArray<csShaderVariable>& CS::Graphics::ShaderVariableContextImpl::GetShaderVariables (  )  const [inline, virtual]

Get Array of all ShaderVariables.

Implements iShaderVariableContext.

Reimplemented in CS::Graphics::OverlayShaderVariableContextImpl.

Definition at line 52 of file shadervarcontext.h.

virtual csShaderVariable* CS::Graphics::ShaderVariableContextImpl::GetVariable ( ShaderVarStringID  name  )  const [virtual]

Get a named variable from this context.

Implements iShaderVariableContext.

Reimplemented in CS::Graphics::OverlayShaderVariableContextImpl.

virtual bool CS::Graphics::ShaderVariableContextImpl::IsEmpty (  )  const [inline, virtual]

Determine whether this SV context contains any variables at all.

Implements iShaderVariableContext.

Reimplemented in CS::Graphics::OverlayShaderVariableContextImpl.

Definition at line 57 of file shadervarcontext.h.

virtual void CS::Graphics::ShaderVariableContextImpl::PushVariables ( csShaderVariableStack stack  )  const [virtual]

Push the variables of this context onto the variable stacks supplied in the "stacks" argument.

Implements iShaderVariableContext.

Reimplemented in CS::Graphics::OverlayShaderVariableContextImpl, and CS::Graphics::PriorityShaderVariableContextImpl.

virtual bool CS::Graphics::ShaderVariableContextImpl::RemoveVariable ( ShaderVarStringID  name  )  [virtual]

Remove the variable with the given name from this context.

Implements iShaderVariableContext.

Reimplemented in CS::Graphics::OverlayShaderVariableContextImpl.

virtual bool CS::Graphics::ShaderVariableContextImpl::RemoveVariable ( csShaderVariable variable  )  [virtual]

Remove the given variable from this context.

Implements iShaderVariableContext.

Reimplemented in CS::Graphics::OverlayShaderVariableContextImpl.

virtual void CS::Graphics::ShaderVariableContextImpl::ReplaceVariable ( csShaderVariable variable  )  [virtual]

Replace the current variable object of the same name as variable with the latter, add variable otherwise.

Remarks:
This differs from AddVariable() as this method replaces the variable *object*, not just the contents.

Implements iShaderVariableContext.

Reimplemented in CS::Graphics::OverlayShaderVariableContextImpl.


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

Generated for Crystal Space 2.1 by doxygen 1.6.1