Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

CValue Class Reference

#include <Value.h>

Inheritance diagram for CValue:

PyObjectPlus PyObject CPropValue SCA_ILogicBrick SCA_IObject CBoolValue CEmptyValue CErrorValue CFloatValue CIntValue CListValue CStringValue CVectorValue CVoidValue SCA_IActuator SCA_IController SCA_ISensor KX_GameObject List of all members.

Public Types

enum  AllocationTYPE { STACKVALUE = 0, HEAPVALUE = 1 }
enum  DrawTYPE { STARTFRAME = 0, ENDFRAME = 1, INTERFRAME = 2 }

Public Methods

 CValue (PyTypeObject *T = &Type)
virtual PyObject_repr (void)
PyObject_getattr (char* attr)
void SpecialRelease ()
virtual PyObjectConvertValueToPython ()
virtual CValue* ConvertPythonToValue (PyObject* pyobj)
int _setattr (char* attr,PyObject* value)
void PrintHello ()
PyObjectPyPrintHello (PyObject* args)
 KX_PYMETHOD (CValue,GetName)
virtual CValue* Calc (VALUE_OPERATOR op, CValue *val) = 0
virtual CValue* CalcFinal (VALUE_DATA_TYPE dtype, VALUE_OPERATOR op, CValue *val) = 0
virtual void SetOwnerExpression (class CExpression* expr)
void Execute (const CAction& a)
int GetRefCount ()
 Reference Counting. More...

virtual CValue* AddRef ()
virtual int Release ()
virtual void SetProperty (const CCString& name,CValue* ioProperty)
 Property Management. More...

virtual CValue* GetProperty (const CCString & inName)
CCString GetPropertyText (const CCString & inName,const CCString& deftext="")
float GetPropertyNumber (const CCString& inName,float defnumber)
virtual bool RemoveProperty (const CCString & inName)
virtual void ClearProperties ()
virtual void SetPropertiesModified (bool inModified)
virtual bool IsAnyPropertyModified ()
virtual CValue* GetProperty (int inIndex)
virtual int GetPropertyCount ()
virtual void CloneProperties (CValue* replica)
virtual CValue* FindIdentifier (const CCString& identifiername)
virtual void SetColorOperator (VALUE_OPERATOR op)
virtual const CCStringGetText () = 0
virtual float GetNumber () = 0
double* ZeroVector ()
virtual double* GetVector3 (bool bGetTransformedVec = false)
virtual CCString GetName () = 0
virtual void SetName (CCString name) = 0
virtual void ReplicaSetName (CCString name) = 0
virtual void SetValue (CValue* newval)
virtual CValue* GetReplica () = 0
CCString op2str (VALUE_OPERATOR op)
void SetSelected (bool bSelected)
virtual void SetModified (bool bModified)
virtual void SetAffected (bool bAffected=true)
void SetReleaseRequested (bool bReleaseRequested)
void SetError (bool err)
void SetVisible (bool vis)
virtual bool IsModified ()
bool IsError ()
virtual bool IsAffected ()
virtual bool IsSelected ()
bool IsReleaseRequested ()
virtual bool IsVisible ()
virtual void SetCustomFlag1 (bool bCustomFlag)
virtual bool IsCustomFlag1 ()
virtual void SetCustomFlag2 (bool bCustomFlag)
virtual bool IsCustomFlag2 ()

Static Public Methods

PyObjectPyMake (PyObject*,PyObject*)
void PyDestructor (PyObject *P)
PyObjectsPyPrintHello (PyObject* self,PyObject* args,PyObject* kwds)

Protected Methods

virtual void DisableRefCount ()
virtual void AddDataToReplica (CValue* replica)
virtual ~CValue ()

Member Enumeration Documentation

enum CValue::AllocationTYPE
 

Enumeration values:
STACKVALUE  
HEAPVALUE  

Definition at line 225 of file Value.h.

enum CValue::DrawTYPE
 

Enumeration values:
STARTFRAME  
ENDFRAME  
INTERFRAME  

Definition at line 230 of file Value.h.


Constructor & Destructor Documentation

CValue::CValue ( PyTypeObject * T = &Type )
 

Definition at line 169 of file Value.cpp.

CValue::~CValue ( ) [protected, virtual]
 

Definition at line 188 of file Value.cpp.


Member Function Documentation

void CValue::AddDataToReplica ( CValue * replica ) [protected, virtual]
 

Definition at line 548 of file Value.cpp.

Referenced by CVectorValue::GetReplica(), CStringValue::GetReplica(), SCA_ReplaceMeshActuator::GetReplica(), SCA_RandomSensor::GetReplica(), SCA_RandomActuator::GetReplica(), SCA_PythonController::GetReplica(), SCA_PropertySensor::GetReplica(), SCA_PropertyActuator::GetReplica(), SCA_ORController::GetReplica(), SCA_MouseSensor::GetReplica(), SCA_KeyboardSensor::GetReplica(), SCA_GroupActuator::GetReplica(), SCA_ExpressionController::GetReplica(), SCA_EndObjectActuator::GetReplica(), SCA_ANDController::GetReplica(), SCA_AlwaysSensor::GetReplica(), SCA_AddObjectActuator::GetReplica(), CListValue::GetReplica(), KX_TrackToActuator::GetReplica(), KX_TouchSensor::GetReplica(), KX_SoundActuator::GetReplica(), KX_SceneActuator::GetReplica(), KX_RaySensor::GetReplica(), KX_ObjectActuator::GetReplica(), KX_NearSensor::GetReplica(), KX_IpoActuator::GetReplica(), KX_GameObject::GetReplica(), KX_ConstraintActuator::GetReplica(), KX_CameraActuator::GetReplica(), CIntValue::GetReplica(), CFloatValue::GetReplica(), CEmptyValue::GetReplica(), and CBoolValue::GetReplica().

CValue * CValue::AddRef ( ) [virtual]
 

Reimplemented in KX_GameObject.

Definition at line 495 of file Value.cpp.

Referenced by SCA_LogicManager::AddActiveActuator(), KX_GameObject::AddRef(), SCA_TimeEventManager::AddTimeProperty(), FindIdentifier(), CListValue::FindValue(), SCA_ILogicBrick::GetEvent(), MyTake(), SCA_PythonController::PyGetActuators(), SCA_ILogicBrick::PyGetOwner(), SCA_PythonController::PyGetSensors(), SCA_ILogicBrick::RegisterEvent(), SCA_PropertyActuator::Update(), main(), and SCA_PythonController::sPyGetCurrentController().

virtual CValue* CValue::Calc ( VALUE_OPERATOR op,
CValue * val ) [pure virtual]
 

Reimplemented in CBoolValue, CEmptyValue, CErrorValue, CFloatValue, CIntValue, CListValue, CStringValue, CVectorValue, CVoidValue, SCA_ILogicBrick, and KX_GameObject.

Referenced by SCA_ILogicBrick::Calc(), COperator2Expr::Calculate(), and COperator1Expr::Calculate().

virtual CValue* CValue::CalcFinal ( VALUE_DATA_TYPE dtype,
VALUE_OPERATOR op,
CValue * val ) [pure virtual]
 

Reimplemented in CBoolValue, CEmptyValue, CErrorValue, CFloatValue, CIntValue, CListValue, CStringValue, CVectorValue, CVoidValue, SCA_ILogicBrick, and KX_GameObject.

Referenced by CVectorValue::Calc(), and SCA_ILogicBrick::CalcFinal().

void CValue::ClearProperties ( ) [virtual]
 

Definition at line 361 of file Value.cpp.

Referenced by ~CValue().

void CValue::CloneProperties ( CValue * replica ) [virtual]
 

Definition at line 453 of file Value.cpp.

Referenced by AddDataToReplica().

CValue * CValue::ConvertPythonToValue ( PyObject * pyobj ) [virtual]
 

Definition at line 632 of file Value.cpp.

Referenced by _setattr().

PyObject * CValue::ConvertValueToPython ( ) [inline, virtual]
 

Reimplemented in CFloatValue, CIntValue, and CStringValue.

Definition at line 269 of file Value.h.

void CValue::DisableRefCount ( ) [protected, virtual]
 

Definition at line 537 of file Value.cpp.

Referenced by CBoolValue::CBoolValue(), CFloatValue::CFloatValue(), CIntValue::CIntValue(), CStringValue::CStringValue(), CVectorValue::CVectorValue(), and CVoidValue::CVoidValue().

void CValue::Execute ( const CAction & a ) [inline]
 

Definition at line 305 of file Value.h.

CValue * CValue::FindIdentifier ( const CCString & identifiername ) [virtual]
 

Reimplemented in SCA_ExpressionController, and SCA_PropertySensor.

Definition at line 564 of file Value.cpp.

Referenced by CIdentifierExpr::Calculate(), and _getattr().

virtual CCString CValue::GetName ( ) [pure virtual]
 

Reimplemented in CPropValue, SCA_ILogicBrick, and KX_GameObject.

Referenced by AddDataToReplica(), and CListValue::FindValue().

virtual float CValue::GetNumber ( ) [pure virtual]
 

Reimplemented in CBoolValue, CEmptyValue, CErrorValue, CFloatValue, CIntValue, CListValue, CStringValue, CVectorValue, CVoidValue, SCA_ILogicBrick, SCA_ISensor, and KX_GameObject.

Referenced by CParser::GetFloat(), GetPropertyNumber(), KX_Scene::LogicBeginFrame(), KX_GameObject::PySetPosition(), SetValue(), CIntValue::SetValue(), CFloatValue::SetValue(), CBoolValue::SetValue(), SCA_ExpressionController::Trigger(), and SCA_PropertyActuator::Update().

CValue * CValue::GetProperty ( int inIndex ) [virtual]
 

Definition at line 414 of file Value.cpp.

CValue * CValue::GetProperty ( const CCString & inName ) [virtual]
 

Definition at line 295 of file Value.cpp.

Referenced by KX_RaySensor::Evaluate(), FindIdentifier(), GetPropertyNumber(), GetPropertyText(), KX_TouchSensor::HandleCollision(), KX_NearSensor::HandleCollision(), IsAnyPropertyModified(), KX_Scene::LogicBeginFrame(), SetPropertiesModified(), and SCA_PropertyActuator::Update().

int CValue::GetPropertyCount ( ) [virtual]
 

Definition at line 441 of file Value.cpp.

Referenced by IsAnyPropertyModified(), and SetPropertiesModified().

float CValue::GetPropertyNumber ( const CCString & inName,
float defnumber )
 

Definition at line 330 of file Value.cpp.

CCString CValue::GetPropertyText ( const CCString & inName,
const CCString & deftext = "" )
 

Definition at line 321 of file Value.cpp.

int CValue::GetRefCount ( ) [inline]
 

Reference Counting.

Definition at line 311 of file Value.h.

virtual CValue* CValue::GetReplica ( ) [pure virtual]
 

Reimplemented in CBoolValue, CEmptyValue, CErrorValue, CFloatValue, CIntValue, CListValue, CStringValue, CVectorValue, CVoidValue, DebugActuator, SCA_AddObjectActuator, SCA_AlwaysSensor, SCA_ANDController, SCA_EndObjectActuator, SCA_ExpressionController, SCA_GroupActuator, SCA_ISensor, SCA_KeyboardSensor, SCA_MouseSensor, SCA_ORController, SCA_PropertyActuator, SCA_PropertySensor, SCA_PythonController, SCA_RandomActuator, SCA_RandomSensor, SCA_ReplaceMeshActuator, DebugActuator, KX_CameraActuator, KX_ConstraintActuator, KX_GameObject, KX_IpoActuator, KX_NearSensor, KX_ObjectActuator, KX_RaySensor, KX_SceneActuator, KX_SoundActuator, KX_TouchSensor, and KX_TrackToActuator.

Referenced by CloneProperties(), and SCA_PropertyActuator::Update().

virtual const CCString& CValue::GetText ( ) [pure virtual]
 

Reimplemented in CBoolValue, CEmptyValue, CErrorValue, CFloatValue, CIntValue, CListValue, CStringValue, CVectorValue, CVoidValue, SCA_ILogicBrick, and KX_GameObject.

Referenced by CIfExpr::Calculate(), SCA_PropertySensor::CheckPropertyCondition(), GetPropertyText(), MyPyCompare(), CStringValue::SetValue(), SCA_ExpressionController::Trigger(), _repr(), and main().

double * CValue::GetVector3 ( bool bGetTransformedVec = false ) [virtual]
 

Reimplemented in CEmptyValue, and CVectorValue.

Definition at line 475 of file Value.cpp.

bool CValue::IsAffected ( ) [inline, virtual]
 

Definition at line 358 of file Value.h.

Referenced by CConstExpr::NeedsRecalculated().

bool CValue::IsAnyPropertyModified ( ) [virtual]
 

Definition at line 398 of file Value.cpp.

bool CValue::IsCustomFlag1 ( ) [inline, virtual]
 

Definition at line 363 of file Value.h.

bool CValue::IsCustomFlag2 ( ) [inline, virtual]
 

Definition at line 366 of file Value.h.

bool CValue::IsError ( ) [inline]
 

Definition at line 357 of file Value.h.

Referenced by SCA_PropertySensor::CheckPropertyCondition(), CParser::GetValue(), and SCA_ExpressionController::Trigger().

bool CValue::IsModified ( ) [inline, virtual]
 

Reimplemented in CListValue.

Definition at line 356 of file Value.h.

Referenced by IsAnyPropertyModified(), and CListValue::IsModified().

bool CValue::IsReleaseRequested ( ) [inline]
 

Definition at line 360 of file Value.h.

Referenced by CConstExpr::CheckLink().

bool CValue::IsSelected ( ) [inline, virtual]
 

Definition at line 359 of file Value.h.

bool CValue::IsVisible ( ) [inline, virtual]
 

Definition at line 361 of file Value.h.

CValue::KX_PYMETHOD ( CValue,
GetName )
 

void CValue::PrintHello ( void ) [inline]
 

Definition at line 277 of file Value.h.

Referenced by PyPrintHello().

void CValue::PyDestructor ( PyObject * P ) [inline, static]
 

Reimplemented from PyObjectPlus.

Definition at line 264 of file Value.h.

PyObject * CValue::PyMake ( PyObject * ignored,
PyObject * args ) [static]
 

Definition at line 705 of file Value.cpp.

PyObject * CValue::PyPrintHello ( PyObject * args ) [inline]
 

Definition at line 280 of file Value.h.

int CValue::Release ( ) [virtual]
 

Definition at line 510 of file Value.cpp.

Referenced by BL_ConvertActuators(), BL_ConvertBlenderObjects(), BL_ConvertControllers(), BL_ConvertSensors(), SCA_ILogicBrick::Calc(), SCA_ILogicBrick::CalcFinal(), COperator2Expr::Calculate(), COperator1Expr::Calculate(), CIfExpr::Calculate(), SCA_PropertySensor::CheckPropertyCondition(), ClearProperties(), ConvertPythonToValue(), CParser::GetFloat(), CParser::GetValue(), MyPyCompare(), SCA_TimeEventManager::NextFrame(), SCA_ILogicBrick::RegisterEvent(), SCA_ILogicBrick::RemoveEvent(), CParser::SetContext(), SetProperty(), SpecialRelease(), SCA_ORController::Trigger(), SCA_ExpressionController::Trigger(), SCA_RandomActuator::Update(), SCA_PropertyActuator::Update(), main(), CIdentifierExpr::~CIdentifierExpr(), CParser::~CParser(), KX_Scene::~KX_Scene(), KX_TouchSensor::~KX_TouchSensor(), SCA_LogicManager::~SCA_LogicManager(), and SCA_PropertySensor::~SCA_PropertySensor().

bool CValue::RemoveProperty ( const CCString & inName ) [virtual]
 

Definition at line 344 of file Value.cpp.

virtual void CValue::ReplicaSetName ( CCString name ) [pure virtual]
 

Reimplemented in CPropValue, SCA_ILogicBrick, and KX_GameObject.

Referenced by AddDataToReplica().

void CValue::SetAffected ( bool bAffected = true ) [inline, virtual]
 

Definition at line 351 of file Value.h.

Referenced by CConstExpr::ClearModified().

void CValue::SetColorOperator ( VALUE_OPERATOR op ) [inline, virtual]
 

Definition at line 331 of file Value.h.

Referenced by CConstExpr::BroadcastOperators().

void CValue::SetCustomFlag1 ( bool bCustomFlag ) [inline, virtual]
 

Definition at line 362 of file Value.h.

Referenced by CVectorValue::CVectorValue().

void CValue::SetCustomFlag2 ( bool bCustomFlag ) [inline, virtual]
 

Definition at line 365 of file Value.h.

void CValue::SetError ( bool err ) [inline]
 

Definition at line 353 of file Value.h.

void CValue::SetModified ( bool bModified ) [inline, virtual]
 

Reimplemented in CListValue.

Definition at line 350 of file Value.h.

Referenced by CConstExpr::ClearModified(), CFloatValue::SetFloat(), CListValue::SetModified(), SetPropertiesModified(), CVectorValue::SetValue(), CStringValue::SetValue(), CIntValue::SetValue(), CFloatValue::SetValue(), CBoolValue::SetValue(), and CVectorValue::SetVector().

virtual void CValue::SetName ( CCString name ) [pure virtual]
 

Reimplemented in CPropValue, SCA_ILogicBrick, and KX_GameObject.

Referenced by CVectorValue::CalcFinal().

void CValue::SetOwnerExpression ( class CExpression * expr ) [inline, virtual]
 

Definition at line 301 of file Value.h.

Referenced by COperator2Expr::Calculate().

void CValue::SetPropertiesModified ( bool inModified ) [virtual]
 

Definition at line 386 of file Value.cpp.

void CValue::SetProperty ( const CCString & name,
CValue * ioProperty ) [virtual]
 

Property Management.

Definition at line 266 of file Value.cpp.

Referenced by KX_Scene::AddReplicaObject(), BL_ConvertProperties(), CloneProperties(), KX_Camera::KX_Camera(), KX_Scene::LogicBeginFrame(), SCA_PropertyActuator::Update(), _setattr(), and main().

void CValue::SetReleaseRequested ( bool bReleaseRequested ) [inline]
 

Definition at line 352 of file Value.h.

void CValue::SetSelected ( bool bSelected ) [inline]
 

Definition at line 349 of file Value.h.

void CValue::SetValue ( CValue * newval ) [inline, virtual]
 

Reimplemented in CBoolValue, CFloatValue, CIntValue, CStringValue, and CVectorValue.

Definition at line 341 of file Value.h.

Referenced by SCA_RandomActuator::Update(), and SCA_PropertyActuator::Update().

void CValue::SetVisible ( bool vis ) [inline]
 

Definition at line 354 of file Value.h.

void CValue::SpecialRelease ( ) [inline]
 

Definition at line 251 of file Value.h.

double * CValue::ZeroVector ( ) [inline]
 

Definition at line 335 of file Value.h.

Referenced by CEmptyValue::GetVector3().

PyObject * CValue::_getattr ( char * attr ) [virtual]
 

Reimplemented from PyObjectPlus.

Reimplemented in CListValue, DebugActuator, SCA_PythonController, SCA_AddObjectActuator, SCA_AlwaysSensor, SCA_ANDController, SCA_EndObjectActuator, SCA_ILogicBrick, SCA_IObject, SCA_ISensor, SCA_KeyboardSensor, SCA_MouseSensor, SCA_ORController, SCA_PropertyActuator, SCA_PropertySensor, SCA_PythonController, SCA_RandomActuator, SCA_RandomSensor, SCA_ReplaceMeshActuator, KX_CameraActuator, KX_ConstraintActuator, KX_GameObject, KX_IpoActuator, KX_NearSensor, KX_ObjectActuator, KX_RaySensor, KX_SceneActuator, KX_SoundActuator, KX_TouchSensor, and KX_TrackToActuator.

Definition at line 603 of file Value.cpp.

PyObject * CValue::_repr ( void ) [inline, virtual]
 

Reimplemented from PyObjectPlus.

Definition at line 242 of file Value.h.

int CValue::_setattr ( char * attr,
PyObject * pyobj ) [virtual]
 

Reimplemented from PyObjectPlus.

Definition at line 693 of file Value.cpp.

CCString CValue::op2str ( VALUE_OPERATOR op )
 

Definition at line 208 of file Value.cpp.

PyObject * CValue::sPyPrintHello ( PyObject * self,
PyObject * args,
PyObject * kwds ) [inline, static]
 

Definition at line 285 of file Value.h.


The documentation for this class was generated from the following files:
Generated at Thu Feb 1 13:03:36 2001 for Ketsji Game Engine by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000