Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

SH::ShProgram Class Reference

Thin wrapper around ShProgramNode. More...

#include <ShProgram.hpp>

Inheritance diagram for SH::ShProgram:

Inheritance graph
[legend]
Collaboration diagram for SH::ShProgram:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ShProgram ()
 ShProgram (const ShProgram &other)
 ShProgram (const std::string &target)
 ShProgram (const ShProgramNodePtr &node)
ShProgramoperator= (const ShProgram &other)
ShProgramNodeCPtr node () const
 Obtain the node which this ShProgram wraps.
ShProgramNodePtr node ()
 Obtain the node which this ShProgram wraps.
void compile (const ShPointer< ShBackend > &backend)
 Forcefully compile this program for a particular backend, even if it has been compiled previously.
void compile (const std::string &target, const ShPointer< ShBackend > &backend)
 Forcefully compile this program for a particular backend, even if it has been compiled previously.
bool is_compiled () const
 Check whether the program has been compiled for the default backend.
bool is_compiled (const std::string &target) const
 Check whether the program has been compiled for the default backend and the given target.
std::string describe_interface () const
 Obtain a listing of the inputs, outputs and uniforms used by this program.
ShPointer< ShBackendCodecode ()
 Obtain the code for currently active backend.
ShPointer< ShBackendCodecode (const ShPointer< ShBackend > &backend)
 Obtain the code for a particular backend.
ShPointer< ShBackendCodecode (const std::string &target, const ShPointer< ShBackend > &backend)
 Obtain the code for a particular backend. Generates it if necessary.
void updateUniform (const ShVariableNodePtr &uniform)
 Notify this program that a uniform variable has changed.
std::string target () const
std::string & target ()
 It may be useful to change a program's target sometimes.
ShProgramNode::VarList::const_iterator inputs_begin () const
ShProgramNode::VarList::const_iterator inputs_end () const
ShProgramNode::VarList::const_iterator outputs_begin () const
ShProgramNode::VarList::const_iterator outputs_end () const
ShProgramNode::VarList::const_iterator temps_begin () const
ShProgramNode::VarList::const_iterator temps_end () const
ShProgramNode::VarList::const_iterator constants_begin () const
ShProgramNode::VarList::const_iterator constants_end () const
ShProgramNode::VarList::const_iterator uniforms_begin () const
ShProgramNode::VarList::const_iterator uniforms_end () const
ShProgramNode::TexList::const_iterator textures_begin () const
ShProgramNode::TexList::const_iterator textures_end () const
ShProgramNode::ChannelList::const_iterator channels_begin () const
ShProgramNode::ChannelList::const_iterator channels_end () const
ShProgramNode::PaletteList::const_iterator palettes_begin () const
ShProgramNode::PaletteList::const_iterator palettes_end () const
template<typename T0>
ShProgram operator() (const ShChannel< T0 > &t0) const
ShProgram operator() (const ShStream &s0) const
template<typename T0, typename T1>
ShProgram operator() (const ShChannel< T0 > &t0, const ShChannel< T1 > &t1) const
ShProgram operator() (const ShStream &s0, const ShStream &s1) const
template<typename T0, typename T1, typename T2>
ShProgram operator() (const ShChannel< T0 > &t0, const ShChannel< T1 > &t1, const ShChannel< T2 > &t2) const
ShProgram operator() (const ShStream &s0, const ShStream &s1, const ShStream &s2) const
template<typename T0, typename T1, typename T2, typename T3>
ShProgram operator() (const ShChannel< T0 > &t0, const ShChannel< T1 > &t1, const ShChannel< T2 > &t2, const ShChannel< T3 > &t3) const
ShProgram operator() (const ShStream &s0, const ShStream &s1, const ShStream &s2, const ShStream &s3) const
template<typename T0, typename T1, typename T2, typename T3, typename T4>
ShProgram operator() (const ShChannel< T0 > &t0, const ShChannel< T1 > &t1, const ShChannel< T2 > &t2, const ShChannel< T3 > &t3, const ShChannel< T4 > &t4) const
ShProgram operator() (const ShStream &s0, const ShStream &s1, const ShStream &s2, const ShStream &s3, const ShStream &s4) const
ShProgram operator() (const ShRecord &rec) const
ShProgram operator() (const ShVariable &v0) const
ShProgram operator() (const ShVariable &v0, const ShVariable &v1) const
ShProgram operator() (const ShVariable &v0, const ShVariable &v1, const ShVariable &v2) const
ShProgram operator() (const ShVariable &v0, const ShVariable &v1, const ShVariable &v2, const ShVariable &v3) const

Detailed Description

Thin wrapper around ShProgramNode.

Definition at line 35 of file ShProgram.hpp.


Member Function Documentation

ShPointer<ShBackendCode> SH::ShProgram::code const ShPointer< ShBackend > &  backend  )  [inline]
 

Obtain the code for a particular backend.

Generates it if necessary. This operation will fail if this program does not have a particular target.

Definition at line 92 of file ShProgram.hpp.

ShPointer<ShBackendCode> SH::ShProgram::code  )  [inline]
 

Obtain the code for currently active backend.

This operation will fail if this program does not have a particular target.

Definition at line 87 of file ShProgram.hpp.

Referenced by SH::shBind(), and SH::shUnbind().

void SH::ShProgram::compile const std::string &  target,
const ShPointer< ShBackend > &  backend
[inline]
 

Forcefully compile this program for a particular backend, even if it has been compiled previously.

Use code() to obtain the actual code.

Definition at line 60 of file ShProgram.hpp.

void SH::ShProgram::compile const ShPointer< ShBackend > &  backend  )  [inline]
 

Forcefully compile this program for a particular backend, even if it has been compiled previously.

Use code() to obtain the actual code. This operation will fail if this program does not have a particular target.

Definition at line 55 of file ShProgram.hpp.

Referenced by SH::shCompile().

bool SH::ShProgram::is_compiled  )  const [inline]
 

Check whether the program has been compiled for the default backend.

This operation will fail if this program does not have particular target.

Definition at line 68 of file ShProgram.hpp.


The documentation for this class was generated from the following files:
Generated on Thu Jul 28 17:36:19 2005 for Sh by  doxygen 1.4.3-20050530