Katana Plug-in APIs 0.1
Public Member Functions

Foundry::Katana::RendererInfo::ShaderInfoCache< TShaderInfoType > Class Template Reference

Caches a map of shader names and attributes for quick access by Renderer Info Plug-ins. More...

#include <ShaderInfoCache.h>

List of all members.

Public Member Functions

bool isEmpty () const
void flush ()
void addShaderInfo (const std::string &shaderName, const TShaderInfoType &shaderInfo)
const TShaderInfoType & getShaderInfo (const std::string &shaderName) const
Iterator begin () const
Iterator end () const
void setNullValue (const TShaderInfoType &nullValue)

Detailed Description

template<typename TShaderInfoType>
class Foundry::Katana::RendererInfo::ShaderInfoCache< TShaderInfoType >

Caches a map of shader names and attributes for quick access by Renderer Info Plug-ins.


Member Function Documentation

template<typename TShaderInfoType >
void Foundry::Katana::RendererInfo::ShaderInfoCache< TShaderInfoType >::addShaderInfo ( const std::string &  shaderName,
const TShaderInfoType &  shaderInfo 
)

Adds information about a single shader to the cache.

Parameters:
shaderNameA string representing the unique name of the shader.
shaderInfoA group attribute holding information pertaining to the shader.
template<typename TShaderInfoType >
ShaderInfoCache< TShaderInfoType >::Iterator Foundry::Katana::RendererInfo::ShaderInfoCache< TShaderInfoType >::begin ( ) const

Gets a const iterator to the first Shader's information stored in the cache.

Returns:
Const iterator to first Shader's information cache entry.
template<typename TShaderInfoType >
ShaderInfoCache< TShaderInfoType >::Iterator Foundry::Katana::RendererInfo::ShaderInfoCache< TShaderInfoType >::end ( ) const

Gets a const iterator to the end of the cache.

Returns:
Const iterator to the end of the cache.
template<typename TShaderInfoType >
void Foundry::Katana::RendererInfo::ShaderInfoCache< TShaderInfoType >::flush ( )

Flush the cache, removing all data from it.

template<typename TShaderInfoType >
const TShaderInfoType & Foundry::Katana::RendererInfo::ShaderInfoCache< TShaderInfoType >::getShaderInfo ( const std::string &  shaderName) const

Allows access to information about a shader.

Parameters:
shaderNameUnique name of the shader to retreive information for.
Returns:
If information about the named shader was previously cached, that info is returned. Otherwise, an empty Group Attribute.
template<typename TShaderInfoType >
bool Foundry::Katana::RendererInfo::ShaderInfoCache< TShaderInfoType >::isEmpty ( ) const

Queries whether the cache is empty.

Returns:
True if empty, false otherwise.
template<typename TShaderInfoType >
void Foundry::Katana::RendererInfo::ShaderInfoCache< TShaderInfoType >::setNullValue ( const TShaderInfoType &  nullValue)

Sets the null value, which is returned if a cache item is empty or unavailable.

Parameters:
nullValueThe null value.

The documentation for this class was generated from the following file:
 All Classes Functions Variables Typedefs Enumerations Enumerator