#include <communicator.h>
Public Member Functions | |
void | addStaticTexture (Texture *texture) |
Communicator (const std::string &CommunicatorName) | |
void | compile () |
void | compute () |
const std::string & | getClassName () const |
Returns name of class of our object. | |
const std::string & | getObjectName () const |
Returns name of our object. | |
void | getSpecificParameter (const std::string &ParameterName, void *ParameterValue) |
Method for obtaining some specific parameters, such as texture specific params, and so on. | |
bool | isLocked () const |
returns state of object. | |
void | setCurrentKernel (Kernel *CurrentKernel) |
void | setPreviousKernel (Kernel *PreviousKernel) |
void | setRenderTarget (Texture *RenderTarget) |
~Communicator () | |
Protected Member Functions | |
void | addSpecificParameter (const std::string &ParameterName, void *ParameterValue, size_t Size) |
void | lock () |
void | unlock () |
Private Types | |
typedef std::list< Texture * > | TextureVector |
Private Member Functions | |
OBJ_DISABLE_COPY (Communicator) | |
Private Attributes | |
Kernel * | mCurrentKernel |
unsigned int | mCurrentState |
Kernel * | mPreviousKernel |
Texture * | mRenderTarget |
TextureVector | mTextureVector |
Definition at line 47 of file communicator.h.
typedef std::list<Texture *> gpucalc::Communicator::TextureVector [private] |
Definition at line 132 of file communicator.h.
gpucalc::Communicator::Communicator | ( | const std::string & | CommunicatorName | ) | [inline] |
Definition at line 55 of file communicator.h.
00055 : 00056 mCurrentState(SNotReady), 00057 Object(_CommunicatorClassName, CommunicatorName), 00058 mPreviousKernel(0), mCurrentKernel(0), mRenderTarget(0), 00059 mTextureVector() 00060 { 00061 }
gpucalc::Communicator::~Communicator | ( | ) | [inline] |
void gpucalc::Object::addSpecificParameter | ( | const std::string & | ParameterName, | |
void * | ParameterValue, | |||
size_t | Size | |||
) | [inline, protected, inherited] |
Definition at line 254 of file object.h.
00255 { 00256 SpecificParametersMap::iterator i = mSpecificParameters.find(ParameterName); 00257 if (i != mSpecificParameters.end()) 00258 { 00259 mSpecificParameters.erase(i); 00260 } 00261 mSpecificParameters[ParameterName] = Any(ParameterValue, Size); 00262 }
void gpucalc::Communicator::addStaticTexture | ( | Texture * | texture | ) | [inline] |
void gpucalc::Communicator::compile | ( | ) | [inline] |
void gpucalc::Communicator::compute | ( | ) | [inline] |
Definition at line 115 of file communicator.h.
00116 { 00117 // binds all static textures. 00118 // compute current kernel 00119 // release framebuffer attachment point from previous kernel. 00120 }
const std::string& gpucalc::Object::getClassName | ( | ) | const [inline, inherited] |
Returns name of class of our object.
Definition at line 92 of file object.h.
00093 { 00094 return mClassName; 00095 }
const std::string& gpucalc::Object::getObjectName | ( | ) | const [inline, inherited] |
Returns name of our object.
Definition at line 101 of file object.h.
00102 { 00103 return mObjectName; 00104 }
void gpucalc::Object::getSpecificParameter | ( | const std::string & | ParameterName, | |
void * | ParameterValue | |||
) | [inline, inherited] |
Method for obtaining some specific parameters, such as texture specific params, and so on.
ParameterName | - name of parameter, usually it similar to specific method of some object (for example, GLTextureID) | |
ParameterValue | - contain value of named parameter, it must be allocated and have sufficient size. |
Definition at line 128 of file object.h.
00129 { 00130 SpecificParametersMap::iterator i = mSpecificParameters.find(ParameterName); 00131 if (i != mSpecificParameters.end()) 00132 { 00133 i->second.copyValue(ParameterValue); 00134 } 00135 else 00136 { 00137 Except<ERR_ITEM_NOT_FOUND>(this, "Parameter \"" + ParameterName + "\" does not exists.", "Object::getSpecificParameter()", __FILE__, __LINE__); 00138 } 00139 }
bool gpucalc::Object::isLocked | ( | ) | const [inline, inherited] |
void gpucalc::Object::lock | ( | ) | [inline, protected, inherited] |
gpucalc::Communicator::OBJ_DISABLE_COPY | ( | Communicator | ) | [private] |
void gpucalc::Communicator::setCurrentKernel | ( | Kernel * | CurrentKernel | ) | [inline] |
Definition at line 75 of file communicator.h.
00076 { 00077 if (mCurrentState & SHasKernel) 00078 { 00079 Except<ERR_DUPLICATE_ITEM>("Current Kernel has been already set.", "Communicator::setCurrentKernel", __FILE__, __LINE__); 00080 } 00081 else 00082 { 00083 mCurrentKernel = CurrentKernel; 00084 mCurrentState = mCurrentState & SHasKernel; 00085 } 00086 }
void gpucalc::Communicator::setPreviousKernel | ( | Kernel * | PreviousKernel | ) | [inline] |
void gpucalc::Communicator::setRenderTarget | ( | Texture * | RenderTarget | ) | [inline] |
Definition at line 95 of file communicator.h.
00096 { 00097 if (mCurrentState & SHasRenderTarget) 00098 { 00099 Except<ERR_DUPLICATE_ITEM>("Current Kernel already has render target.", "Communicator::setRenderTarget", __FILE__, __LINE__); 00100 } 00101 else 00102 { 00103 mRenderTarget = RenderTarget; 00104 mCurrentState = mCurrentState & SHasRenderTarget; 00105 } 00106 }
void gpucalc::Object::unlock | ( | ) | [inline, protected, inherited] |
Kernel* gpucalc::Communicator::mCurrentKernel [private] |
Definition at line 128 of file communicator.h.
unsigned int gpucalc::Communicator::mCurrentState [private] |
Definition at line 125 of file communicator.h.
Kernel* gpucalc::Communicator::mPreviousKernel [private] |
Definition at line 127 of file communicator.h.
Texture* gpucalc::Communicator::mRenderTarget [private] |
Definition at line 130 of file communicator.h.
Definition at line 133 of file communicator.h.