PrevNextUpHome BREW C++ Class Library & GUI Framework & XML Middleware : SophiaFramework 4.1
SFXEvent
Class that represents an event sent to the event handler.
#include <SFXEvent.h.hpp>
class SFXEvent;
SFMTYPEDEFCLASS(SFXEvent)

Description

The SFXEvent class encapsulates the event type(= event code of AEEEvent type) and two event parameters(P16 value and P32 value), which are passed to the event handler.

Example 470. How to use event class 1

// event that destroy responder
SFXEvent event(SREVT_RESPONDER_TERMINATE, SRP16_TERMINATE_INVOKE, true);

// send the event to the responder to destroy it 
responder->Invoke(event);

Example 471. How to use event class 2

SFXEvent event;

// set user defined event
event.Set(SFEVT_USER + 0x01, 0, 0);

SFBShellSmp shell = SFBShell::GetInstance();

// send the user defined event to itself
shell->PostEvent(GetClassID(), event);

Reference

SFCEventEnum

Member

Constructor/Destructor
SFXEvent( Void )
Constructor of SFXEvent class.
SFXEvent( SFXEventConstRef param )
Constructor of SFXEvent class.
SFXEvent( AEEEvent type , UInt16 p16 , UInt32 p32 )
Constructor of SFXEvent class.
Public Functions
Bool Equals( SFXEventConstRef param )
Equals( AEEEvent type , UInt16 p16 , UInt32 p32 )
Check whether this event equals a specified event or not.
Bool EqualsTypeP16( SFXEventConstRef param )
EqualsTypeP16( AEEEvent type , UInt16 p16 )
Check whether the event type and the 16-bit parameter matches with specified values or not.
UInt16 GetP16( Void )
Get the 16-bit parameter.
UInt32 GetP32( Void )
Get the 32-bit parameter.
AEEEvent GetType( Void )
Get the event type.
static
SFXEventConstRef
NoneInstance( Void )
Return an instance that represents SFEVT_NONE.
Void Set( SFXEventConstRef param )
Set( AEEEvent type , UInt16 p16 , UInt32 p32 )
Set specified values to this event.
Void SetP16( UInt16 param )
Set the 16-bit parameter.
Void SetP32( UInt32 param )
Set the 32-bit parameter.
Void SetType( AEEEvent param )
Set the event type.
Void SetTypeP16( AEEEvent type , UInt16 p16 )
Set the event type and the 16-bit parameter.
SFXEventRef operator=( SFXEventConstRef param )
Assign a specified event.
SFXEvent::AtomRec * atomic_cast( SFXEvent * param )
Convert SFXEvent into SFXEvent::AtomRec.
SFXEvent::AtomRec const * atomic_cast( SFXEvent const * param )
Convert SFXEvent into SFXEvent::AtomRec.
Bool operator==( SFXEventConstRef left , SFXEventConstRef right )
Check the "==" relation.
Bool operator!=( SFXEventConstRef left , SFXEventConstRef right )
Check the "!=" relation.
Types
AtomRec
The SFXEvent::AtomRec structure represents an event.
Global Functions
SFXEvent::AtomRec * atomic_cast( SFXEvent * param )
Convert SFXEvent into SFXEvent::AtomRec.
SFXEvent::AtomRec const * atomic_cast( SFXEvent const * param )
Convert SFXEvent into SFXEvent::AtomRec.
Bool operator==( SFXEventConstRef left , SFXEventConstRef right )
Check the "==" relation.
Bool operator!=( SFXEventConstRef left , SFXEventConstRef right )
Check the "!=" relation.

SFXEvent::SFXEvent
Constructor of SFXEvent class.
[ public, explicit ]
SFXEvent(Void);
[ public ]
SFXEvent(
    SFXEventConstRef param   // SFXEvent to copy
);
[ public, explicit ]
SFXEvent(
    AEEEvent type   // event type
    UInt16 p16      // 16-bit parameter
    UInt32 p32      // 32-bit parameter
);

Reference

SFXEvent::Set


SFXEvent::Equals
Check whether this event equals a specified event or not.
[ public, const ]
Bool Equals(
    SFXEventConstRef param   // SFXEvent to be compared
);
[ public, const ]
Bool Equals(
    AEEEvent type   // event type
    UInt16 p16      // 16-bit event parameter
    UInt32 p32      // 32-bit event parameter
);

Return value

  • If equal : true
  • Otherwise : false

Reference

SFXEvent::EqualsTypeP16 | operator==


SFXEvent::EqualsTypeP16
Check whether the event type and the 16-bit parameter matches with specified values or not.
[ public, const ]
Bool EqualsTypeP16(
    SFXEventConstRef param   // event to be compared
);
[ public, const ]
Bool EqualsTypeP16(
    AEEEvent type   // event type to be compared
    UInt16 p16      // 16-bit parameter to be compared
);

Return value

  • Matched: true
  • Otherwise: false

Reference

SFXEvent::GetP16 | SFXEvent::SetP16 | SFXEvent::GetType | SFXEvent::SetType


SFXEvent::GetP16
Get the 16-bit parameter.
[ public, const ]
UInt16 GetP16(Void);

Reference

SFXEvent::SetP16


SFXEvent::GetP32
Get the 32-bit parameter.
[ public, const ]
UInt32 GetP32(Void);

Reference

SFXEvent::SetP32


SFXEvent::GetType
Get the event type.
[ public, const ]
AEEEvent GetType(Void);

Reference

SFXEvent::SetType


SFXEvent::NoneInstance
Return an instance that represents SFEVT_NONE.
[ public, static ]
SFXEventConstRef NoneInstance(Void);

Description

The SFXEvent::NoneInstance function is the same as the constructor of SFXEvent(SFEVT_NONE, 0, 0), but the SFXEvent::NoneInstance function is much faster.


SFXEvent::Set
Set specified values to this event.
[ public ]
Void Set(
    SFXEventConstRef param   // SFXEvent instance to copy
);
[ public ]
Void Set(
    AEEEvent type   // event type
    UInt16 p16      // 16-bit parameter
    UInt32 p32      // 32-bit parameter
);

Reference

SFXEvent::SFXEvent | SFXEvent::SetP16 | SFXEvent::SetP32 | SFXEvent::SetType


SFXEvent::SetP16
Set the 16-bit parameter.
[ public ]
Void SetP16(
    UInt16 param   // 16-bit parameter to set
);

Reference

SFXEvent::GetP16


SFXEvent::SetP32
Set the 32-bit parameter.
[ public ]
Void SetP32(
    UInt32 param   // 32-bit parameter to set
);

Reference

SFXEvent::GetP32


SFXEvent::SetType
Set the event type.
[ public ]
Void SetType(
    AEEEvent param   // event type to set
);

Reference

SFXEvent::GetType


SFXEvent::SetTypeP16
Set the event type and the 16-bit parameter.
[ public ]
Void SetTypeP16(
    AEEEvent type   // event type to set
    UInt16 p16      // 16-bit parameter to set
);

Reference

SFXEvent::EqualsTypeP16 | SFXEvent::SetType | SFXEvent::SetP16


atomic_cast
Convert SFXEvent into SFXEvent::AtomRec.
[ public, friend ]
SFXEvent::AtomRec * atomic_cast(
    SFXEvent * param   // event to cast
);
[ public, friend ]
SFXEvent::AtomRec const * atomic_cast(
    SFXEvent const * param   // event to cast
);

Reference

SFXEvent::AtomRec


SFXEvent::operator=
Assign a specified event.
[ public ]
SFXEventRef operator=(
    SFXEventConstRef param   // event to assign
);

Reference

SFXEvent::SFXEvent | SFXEvent::Set


operator==
Check the "==" relation.
[ public, friend ]
Bool operator==(
    SFXEventConstRef left    // event to be compared
    SFXEventConstRef right   // event to compare with
);

Return value

  • Equal: true
  • Not equal: false

Reference

SFXEvent::Equals | operator!=


operator!=
Check the "!=" relation.
[ public, friend ]
Bool operator!=(
    SFXEventConstRef left    // event to be compared
    SFXEventConstRef right   // event to compare with
);

Return value

  • Not equal: true
  • Equal : false

Reference

SFXEvent::Equals | operator==


SFXEvent::AtomRec
The SFXEvent::AtomRec structure represents an event.
[ public ]
struct AtomRec {
    AEEEvent     type;  // event type
    UInt16       p16;   // 16-bit parameter
    UInt32       p32;   // 32-bit parameter
};