This class is for maintaining the event binding table and script binding table.
More...
#include <EventBinding.h>
|
| CEventBinding (const CEventBinding &) |
|
void | InitEventMappingTable (bool bDisable=false) |
|
void | EnableEvent (int eEvent) |
|
void | DisableEvent (int eEvent) |
|
void | MapEvent (int eSrcEvent, int eDestEvent) |
| Mapping an event to another event.
|
|
void | UnmapEvent (int eSrcEvent, int eDestEvent) |
| Unmap an event to any event.
|
|
bool | IsMapTo (int eSrcEvent, int eDestEvent) const |
| Decide if the first event is mapped to the second event.
|
|
void | DefaultMap_Text () |
|
void | DefaultMap_Control () |
|
void | DefaultMap_Mouse () |
|
void | DisableKeyboard () |
|
void | EnableKeyboard () |
|
void | DisableMouse () |
|
void | EnableMouse () |
|
void | MapEventToScript (int eEvent, const SimpleScript *script) |
|
void | UnmapEventToScript (int eEvent) |
|
const SimpleScript * | GetEventScript (int eEvent) const |
|
bool | HasEventScript (int eEvent) const |
|
CEventBinding & | operator= (CEventBinding &input) |
|
virtual void | Clone (IObject *pobj) const |
| Clone the object's contains to a pointer. More...
|
|
virtual IObject * | Clone () const |
| Clone the object's contains and return a pointer to the newly created object. More...
|
|
virtual int | Release () |
|
virtual bool | Equals (const IObject *obj) const |
| Compare the object with another object. More...
|
|
virtual const IType * | GetType () const |
|
virtual std::string | ToString () const |
|
WeakPtr_type & | GetWeakReference () |
| get weak reference object. More...
|
|
virtual int | ProcessObjectEvent (const ObjectEvent &event) |
| this function is only used to backward compatibility of ParaObject:AddEvent() function. More...
|
|
void | addref () const |
| add reference count of the object. More...
|
|
bool | delref () const |
| decrease reference count of the object. More...
|
|
int | GetRefCount () const |
| get the reference count
|
|
CRefCounted * | AddToAutoReleasePool () |
| addref and releases the ownership sometime soon automatically (usually at the end of the current frame). More...
|
|
|
static void | StaticInit () |
|
static int | StringToEventValue (const string &str) |
|
static string & | EventValueToString (int value) |
|
static void | InitMsg (MSG *event, DWORD time, DWORD message, POINT &pt) |
|
static DWORD | TranslateVKToDIK (DWORD dwVKey) |
| converting a windows virtual key to direct input key scan code. More...
|
|
|
typedef std::bitset< EventCount > | EventEnabledArray_type |
|
typedef std::map< int, SimpleScript > | EventScriptMap_type |
|
typedef boost::array< set< int >, EventCount > | EventMapping_type |
|
typedef cow_ptr< boost::array< set< int >, EventCount > > | EventMapping_cow_type |
|
|
static map< string, int > | StringToEventTable |
|
static map< int, string > | EventToStringTable |
|
This class is for maintaining the event binding table and script binding table.
It also contains method to translate string to event and also backwards
§ Clone() [1/2]
void CEventBinding::Clone |
( |
IObject * |
obj | ) |
const |
|
virtual |
Clone the object's contains to a pointer.
The caller should allocate the memory and pass the pointer to this function.. Inheritance should implement this function void Clone(IObject*) and IObject* Clone() should have the same behavior In some cases, if you want to avoid Dead Reference( one object is being referred to by many objects and you can't update all the references). It is possible to use this function to replace the contains at a given pointer. But this may result in memory leak if you do not implement this function carefully or misuse it.
Reimplemented from ParaEngine::IObject.
§ Clone() [2/2]
IObject * CEventBinding::Clone |
( |
| ) |
const |
|
virtual |
Clone the object's contains and return a pointer to the newly created object.
The caller should free the memory of the return object. Inheritance should implement this function void Clone(IObject*) and IObject* Clone() should have the same behavior
Reimplemented from ParaEngine::IObject.
§ Equals()
bool CEventBinding::Equals |
( |
const IObject * |
obj | ) |
const |
|
virtual |
Compare the object with another object.
Inheritance should implement this function
Reimplemented from ParaEngine::IObject.
§ TranslateVKToDIK()
DWORD CEventBinding::TranslateVKToDIK |
( |
DWORD |
dwVKey | ) |
|
|
static |
converting a windows virtual key to direct input key scan code.
§ DIKToWinVirtualKey
DWORD CEventBinding::DIKToWinVirtualKey |
|
static |
direct input key to windows virtual key code.
§ WinVirtualKeyToDIK
DWORD CEventBinding::WinVirtualKeyToDIK |
|
static |
windows virtual key code to direct input key.
The documentation for this class was generated from the following files:
- Client/trunk/ParaEngineClient/2dengine/EventBinding.h
- Client/trunk/ParaEngineClient/2dengine/EventBinding.cpp