#include <object.h>
Public Member Functions | |
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. | |
Object (const std::string &ClassName, const std::string &ObjectName) | |
virtual | ~Object () |
Protected Member Functions | |
void | addSpecificParameter (const std::string &ParameterName, void *ParameterValue, size_t Size) |
void | lock () |
void | unlock () |
Private Types | |
typedef std::map< std::string, Any > | SpecificParametersMap |
Private Attributes | |
std::string | mClassName |
bool | mIsLocked |
std::string | mObjectName |
SpecificParametersMap | mSpecificParameters |
Classes | |
class | Any |
Provides methods for returning object name, class name.
Definition at line 68 of file object.h.
typedef std::map<std::string, Any> gpucalc::Object::SpecificParametersMap [private] |
gpucalc::Object::Object | ( | const std::string & | ClassName, | |
const std::string & | ObjectName | |||
) | [inline] |
Definition at line 73 of file object.h.
00073 : mClassName(ClassName), mObjectName(ObjectName), mSpecificParameters(), 00074 mIsLocked(false) 00075 { 00076 }
virtual gpucalc::Object::~Object | ( | ) | [inline, virtual] |
void gpucalc::Object::addSpecificParameter | ( | const std::string & | ParameterName, | |
void * | ParameterValue, | |||
size_t | Size | |||
) | [inline, protected] |
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 }
const std::string& gpucalc::Object::getClassName | ( | ) | const [inline] |
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] |
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] |
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] |
void gpucalc::Object::lock | ( | ) | [inline, protected] |
void gpucalc::Object::unlock | ( | ) | [inline, protected] |
std::string gpucalc::Object::mClassName [private] |
bool gpucalc::Object::mIsLocked [private] |
std::string gpucalc::Object::mObjectName [private] |