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

SCA_PropertyActuator.h

Go to the documentation of this file.
00001 
00006 
00007 #ifndef __KX_PROPERTYACTUATOR
00008 #define __KX_PROPERTYACTUATOR
00009 
00010 #include "SCA_IActuator.h"
00011 
00012 class SCA_PropertyActuator : public SCA_IActuator
00013 {
00014         Py_Header;
00015         
00016         enum KX_ACT_PROP_MODE {
00017                 KX_ACT_PROP_NODEF = 0,
00018                 KX_ACT_PROP_ASSIGN,
00019                 KX_ACT_PROP_ADD,
00020                 KX_ACT_PROP_COPY,
00021                 KX_ACT_PROP_MAX
00022         };
00023         
00025         bool isValid(KX_ACT_PROP_MODE mode);
00026         
00027         int                     m_type;
00028         CCString        m_propname;
00029         CCString        m_exprtxt;
00030         CValue*         m_sourceObj; // for copy property actuator
00031 
00032 public:
00033         SCA_PropertyActuator(SCA_IObject* gameobj,CValue* sourceObj,const CCString& propname,const CCString& expr,int acttype,PyTypeObject* T=&Type );
00034         virtual ~SCA_PropertyActuator();
00035         virtual CValue* GetReplica() {
00036                 SCA_PropertyActuator* replica = new SCA_PropertyActuator(*this);
00037                 replica->ProcessReplica();
00038                 // this will copy properties and so on...
00039                 CValue::AddDataToReplica(replica);
00040                 return replica;
00041         };
00042         virtual bool Update(double curtime,double deltatime);
00043 
00044         /* --------------------------------------------------------------------- */
00045         /* Python interface ---------------------------------------------------- */
00046         /* --------------------------------------------------------------------- */
00047 
00048         virtual PyObject*  _getattr(char *attr);
00049 
00050         // python wrapped methods
00051         KX_PYMETHOD_DOC(SCA_PropertyActuator,SetProperty);
00052         KX_PYMETHOD_DOC(SCA_PropertyActuator,GetProperty);
00053         KX_PYMETHOD_DOC(SCA_PropertyActuator,SetValue);
00054         KX_PYMETHOD_DOC(SCA_PropertyActuator,GetValue);
00055         
00056         /* 5. - ... setObject, getObject, setProp2, getProp2, setMode, getMode*/
00057         
00058 };
00059 #endif //__KX_PROPERTYACTUATOR_DOC

Generated at Thu Feb 1 13:03:10 2001 for Ketsji Game Engine by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000