gpucalc::TaskManager Class Reference

This class is a storage for all tasks. More...

#include <task_manager.h>

Inheritance diagram for gpucalc::TaskManager:

Inheritance graph

List of all members.

Public Member Functions

virtual Taskcreate (const std::string &TaskName, bool ReturnIfExists=false)=0
 Creates Task with given name.
virtual void destroy (Task *task)=0
 Destroy Task.
virtual Taskfind (const std::string &TaskName)=0
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.
 TaskManager (const std::string &TaskManagerName)
virtual ~TaskManager ()

Protected Member Functions

void addSpecificParameter (const std::string &ParameterName, void *ParameterValue, size_t Size)
void lock ()
void unlock ()


Detailed Description

This class is a storage for all tasks.

User must operate with different tasks with methods of this class: TaskManager::createTask(), TaskManager::deleteTask().

Definition at line 49 of file task_manager.h.


Constructor & Destructor Documentation

gpucalc::TaskManager::TaskManager ( const std::string &  TaskManagerName  )  [inline]

Definition at line 56 of file task_manager.h.

00056                                                  : Object(_TaskManagerClassName, TaskManagerName)
00057    {
00058    }

virtual gpucalc::TaskManager::~TaskManager (  )  [inline, virtual]

Definition at line 60 of file task_manager.h.

00061    {
00062    }


Member Function Documentation

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    }

virtual Task* gpucalc::TaskManager::create ( const std::string &  TaskName,
bool  ReturnIfExists = false 
) [pure virtual]

Creates Task with given name.

Implemented in gpucalc::SimpleTaskManager.

virtual void gpucalc::TaskManager::destroy ( Task task  )  [pure virtual]

Destroy Task.

Depends on Task type this method can destroy related kernels and other members of Task class.

Implemented in gpucalc::SimpleTaskManager.

virtual Task* gpucalc::TaskManager::find ( const std::string &  TaskName  )  [pure virtual]

Implemented in gpucalc::SimpleTaskManager.

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.

Parameters:
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.
Todo:
Think for better realization.

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]

returns state of object.

If object is locked then we cannot change some state of it, because object is used in computation. If object is unlocked then we can change some state of it, object is not in computation.

Definition at line 113 of file object.h.

00114    {
00115     return mIsLocked;
00116    }

void gpucalc::Object::lock (  )  [inline, protected, inherited]

Definition at line 265 of file object.h.

00266    {
00267     mIsLocked = true;
00268    }

void gpucalc::Object::unlock (  )  [inline, protected, inherited]

Definition at line 271 of file object.h.

00272    {
00273     mIsLocked = false;
00274    }


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

Generated on Thu Mar 5 22:36:46 2009 for gpucalc by  doxygen 1.5.6