Blender V2.61 - r43446
Public Types | Public Member Functions | Protected Member Functions

CValue Class Reference

#include <Value.h>

Inheritance diagram for CValue:
Inheritance graph
[legend]

List of all members.

Public Types

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

Public Member Functions

 CValue ()
virtual CValueCalc (VALUE_OPERATOR op, CValue *val)=0
virtual CValueCalcFinal (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.
CValueAddRef ()
int Release ()
virtual void SetProperty (const STR_String &name, CValue *ioProperty)
 Property Management.
virtual void SetProperty (const char *name, CValue *ioProperty)
virtual CValueGetProperty (const char *inName)
virtual CValueGetProperty (const STR_String &inName)
const STR_StringGetPropertyText (const STR_String &inName)
float GetPropertyNumber (const STR_String &inName, float defnumber)
virtual bool RemoveProperty (const char *inName)
virtual vector< STR_StringGetPropertyNames ()
virtual void ClearProperties ()
virtual void SetPropertiesModified (bool inModified)
virtual bool IsAnyPropertyModified ()
virtual CValueGetProperty (int inIndex)
virtual int GetPropertyCount ()
virtual CValueFindIdentifier (const STR_String &identifiername)
virtual void SetColorOperator (VALUE_OPERATOR op)
virtual const STR_StringGetText ()=0
virtual double GetNumber ()=0
double * ZeroVector ()
virtual double * GetVector3 (bool bGetTransformedVec=false)
virtual STR_StringGetName ()=0
virtual void SetName (const char *name)=0
virtual void SetValue (CValue *newval)
virtual CValueGetReplica ()=0
virtual void ProcessReplica ()
STR_String 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 ()

Protected Member Functions

virtual void DisableRefCount ()
virtual ~CValue ()

Detailed Description

Baseclass CValue

Together with CExpression, CValue and it's derived classes can be used to parse expressions into a parsetree with error detecting/correcting capabilities also expandible by a CFactory pluginsystem

Base class for all editor functionality, flexible object type that allows calculations and uses reference counting for memory management.

Features:

Definition at line 200 of file Value.h.


Member Enumeration Documentation

Enumerator:
STACKVALUE 
HEAPVALUE 

Definition at line 205 of file Value.h.

Enumerator:
STARTFRAME 
ENDFRAME 
INTERFRAME 

Definition at line 210 of file Value.h.


Constructor & Destructor Documentation

CValue::CValue ( )

Definition at line 92 of file Value.cpp.

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

Definition at line 113 of file Value.cpp.

References assertd, and ClearProperties().


Member Function Documentation

CValue* CValue::AddRef ( ) [inline]
virtual CValue* CValue::Calc ( VALUE_OPERATOR  op,
CValue val 
) [pure virtual]
virtual CValue* CValue::CalcFinal ( VALUE_DATA_TYPE  dtype,
VALUE_OPERATOR  op,
CValue val 
) [pure virtual]
void CValue::ClearProperties ( ) [virtual]

Definition at line 342 of file Value.cpp.

References NULL, and Release().

Referenced by ~CValue().

void CValue::DisableRefCount ( ) [protected, virtual]
void CValue::Execute ( const CAction a) [inline]

Definition at line 247 of file Value.h.

References CAction::Execute().

CValue * CValue::FindIdentifier ( const STR_String identifiername) [virtual]
virtual STR_String& CValue::GetName ( ) [pure virtual]
virtual double CValue::GetNumber ( ) [pure virtual]
CValue * CValue::GetProperty ( int  inIndex) [virtual]

Definition at line 398 of file Value.cpp.

References NULL.

CValue * CValue::GetProperty ( const char *  inName) [virtual]
CValue * CValue::GetProperty ( const STR_String inName) [virtual]

Definition at line 257 of file Value.cpp.

References NULL.

int CValue::GetPropertyCount ( ) [virtual]

Definition at line 425 of file Value.cpp.

Referenced by KX_Scene::AddNodeReplicaObject(), and KX_Scene::NewRemoveObject().

vector< STR_String > CValue::GetPropertyNames ( ) [virtual]

Definition at line 325 of file Value.cpp.

Referenced by SCA_2DFilterActuator::SCA_2DFilterActuator().

float CValue::GetPropertyNumber ( const STR_String inName,
float  defnumber 
)

Definition at line 291 of file Value.cpp.

References GetProperty().

const STR_String & CValue::GetPropertyText ( const STR_String inName)

Definition at line 280 of file Value.cpp.

References GetProperty().

Referenced by KX_NetworkMessageActuator::Update().

int CValue::GetRefCount ( ) [inline]

Reference Counting.

Definition at line 253 of file Value.h.

virtual CValue* CValue::GetReplica ( ) [pure virtual]
virtual const STR_String& CValue::GetText ( ) [pure virtual]
double * CValue::GetVector3 ( bool  bGetTransformedVec = false) [virtual]

Reimplemented in CEmptyValue, and CVectorValue.

Definition at line 434 of file Value.cpp.

References assertd.

Referenced by CVectorValue::CalcFinal().

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

Definition at line 347 of file Value.h.

References ValueFlags::Affected, and ValueFlags::Modified.

Referenced by CConstExpr::NeedsRecalculated().

bool CValue::IsAnyPropertyModified ( ) [virtual]

Definition at line 381 of file Value.cpp.

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

Definition at line 352 of file Value.h.

References ValueFlags::CustomFlag1.

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

Definition at line 355 of file Value.h.

References ValueFlags::CustomFlag2.

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

Reimplemented in CListValue.

Definition at line 345 of file Value.h.

References ValueFlags::Modified.

Referenced by CListValue::IsModified().

bool CValue::IsReleaseRequested ( ) [inline]

Definition at line 349 of file Value.h.

References ValueFlags::ReleaseRequested.

Referenced by CConstExpr::CheckLink().

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

Definition at line 348 of file Value.h.

References ValueFlags::Selected.

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

Definition at line 350 of file Value.h.

References ValueFlags::Visible.

STR_String CValue::op2str ( VALUE_OPERATOR  op)
void CValue::ProcessReplica ( ) [virtual]
int CValue::Release ( ) [inline]

Definition at line 272 of file Value.h.

Referenced by KX_Scene::AddReplicaObject(), GPC_RenderTools::applyTransform(), KX_BlenderRenderTools::applyTransform(), BL_ConvertActuators(), BL_ConvertBlenderObjects(), BL_ConvertControllers(), BL_ConvertProperties(), BL_ConvertSensors(), BL_ConvertTextProperty(), KX_TouchSensor::BroadPhaseSensorFilterCollision(), SCA_ILogicBrick::Calc(), SCA_ILogicBrick::CalcFinal(), CIfExpr::Calculate(), COperator1Expr::Calculate(), COperator2Expr::Calculate(), CListValue::CheckEqual(), SCA_PropertySensor::CheckPropertyCondition(), ClearProperties(), SCA_ExpressionController::Delete(), SCA_PropertySensor::Delete(), SCA_ILogicBrick::Delete(), KX_Scene::DupliGroupRecurse(), KX_NetworkMessageSensor::Evaluate(), KX_RaySensor::Evaluate(), CParser::GetFloat(), CParser::GetValue(), KX_SCA_AddObjectActuator::InstantAddObject(), KX_SceneReplicationFunc(), KX_TrackToActuator::KX_TrackToActuator(), KX_Scene::LogicEndFrame(), KX_Scene::NewRemoveObject(), SCA_TimeEventManager::NextFrame(), KX_KetsjiEngine::PostProcessScene(), ProcessReplica(), SCA_ILogicBrick::RegisterEvent(), CListValue::ReleaseAndRemoveAll(), SCA_ILogicBrick::RemoveEvent(), RemoveProperty(), SCA_TimeEventManager::RemoveTimeProperty(), KX_Scene::ReplaceMesh(), SCA_PropertySensor::SCA_PropertySensor(), CParser::SetContext(), KX_GameObject::SetParent(), SetProperty(), SCA_ExpressionController::Trigger(), BL_ActionActuator::Update(), KX_ConstraintActuator::Update(), BL_ShapeActionActuator::Update(), KX_IpoActuator::Update(), SCA_PropertyActuator::Update(), SCA_RandomActuator::Update(), BL_SkinDeformer::~BL_SkinDeformer(), CConstExpr::~CConstExpr(), CIdentifierExpr::~CIdentifierExpr(), COperator2Expr::~COperator2Expr(), CParser::~CParser(), ImageRender::~ImageRender(), KX_Scene::~KX_Scene(), KX_TouchSensor::~KX_TouchSensor(), and SCA_DebugProp::~SCA_DebugProp().

bool CValue::RemoveProperty ( const char *  inName) [virtual]

Definition at line 305 of file Value.cpp.

References Release().

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

Definition at line 340 of file Value.h.

References ValueFlags::Affected.

Referenced by CConstExpr::ClearModified().

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

Set the wireframe color of this value depending on the CSG operator type <op>

Attention:
: not implemented

Definition at line 632 of file Value.cpp.

Referenced by CConstExpr::BroadcastOperators().

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

Definition at line 351 of file Value.h.

References ValueFlags::CustomFlag1.

Referenced by CVectorValue::CVectorValue().

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

Definition at line 354 of file Value.h.

References ValueFlags::CustomFlag2.

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

Definition at line 342 of file Value.h.

References err, and ValueFlags::Error.

Referenced by CErrorValue::CErrorValue().

virtual void CValue::SetModified ( bool  bModified) [inline, virtual]
virtual void CValue::SetName ( const char *  name) [pure virtual]

Implemented in CPropValue, SCA_ILogicBrick, and KX_GameObject.

Referenced by CVectorValue::CalcFinal().

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

Definition at line 627 of file Value.cpp.

Referenced by COperator2Expr::Calculate().

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

Definition at line 367 of file Value.cpp.

void CValue::SetProperty ( const STR_String name,
CValue ioProperty 
) [virtual]
void CValue::SetProperty ( const char *  name,
CValue ioProperty 
) [virtual]

Definition at line 232 of file Value.cpp.

References AddRef(), NULL, Release(), and trace.

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

Definition at line 341 of file Value.h.

References ValueFlags::ReleaseRequested.

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

Definition at line 338 of file Value.h.

References ValueFlags::Selected.

void CValue::SetValue ( CValue newval) [virtual]

Sets the value to this cvalue.

Attention:
this particular function should never be called. Why not abstract?

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

Definition at line 636 of file Value.cpp.

References assertd, and GetNumber().

Referenced by BL_ConvertTextProperty(), SCA_RandomActuator::Update(), SCA_PropertyActuator::Update(), KX_IpoActuator::Update(), BL_ShapeActionActuator::Update(), and BL_ActionActuator::Update().

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

Definition at line 343 of file Value.h.

References ValueFlags::Visible.

double* CValue::ZeroVector ( ) [inline]

Definition at line 322 of file Value.h.

Referenced by CEmptyValue::GetVector3().


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