My Project
Public Types | Public Member Functions | Public Attributes | List of all members
ParaEngine::SystemEvent Struct Reference

system events struct More...

#include <EventClasses.h>

Inheritance diagram for ParaEngine::SystemEvent:
ParaEngine::IEvent

Public Types

enum  SystemEventType {
  SYS_COMMANDLINE = 0, SYS_WM_CLOSE = 1, SYS_WM_DROPFILES = 2, SYS_WM_DESTROY = 3,
  SYS_WM_SETTINGCHANGE = 4
}
 

Public Member Functions

 SystemEvent (int nType, const string &sCode)
 
virtual int GetEventType () const
 get event type
 
string ToScriptCode () const
 build script code and return. More...
 
virtual bool IsAsyncMode ()
 return true, if firing event does not immediately invoke the handler. More...
 
void SetAsyncMode (bool bAsync)
 set whether firing event does not immediately invoke the handler. More...
 
- Public Member Functions inherited from ParaEngine::IEvent
virtual bool IsAsyncMode () const
 return true, if firing event does not immediately invoke the handler. More...
 
virtual int GetEventID () const
 get event id
 

Public Attributes

int m_nType
 
string m_sCode
 
bool m_bIsAsyncMode
 

Detailed Description

system events struct

Member Function Documentation

§ IsAsyncMode()

virtual bool ParaEngine::SystemEvent::IsAsyncMode ( )
inlinevirtual

return true, if firing event does not immediately invoke the handler.

§ SetAsyncMode()

void ParaEngine::SystemEvent::SetAsyncMode ( bool  bAsync)
inline

set whether firing event does not immediately invoke the handler.

caution: almost all event should be fired in async mode. Sync Mode event is only used internally by a few system messages like the WM_CLOSED message.

§ ToScriptCode()

std::string SystemEvent::ToScriptCode ( ) const
virtual

build script code and return.

it does not cache the script code. Use GetScriptCode() instead for performance reason.

Reimplemented from ParaEngine::IEvent.


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