PrevNextUpHome SophiaFramework UNIVERSE 5.3
SFXEvent
Class which represents an event.
#include <SFXEvent.h.hpp>
class SFXEvent;
SFMTYPEDEFCLASS(SFXEvent)

Description

The SFXEvent class manages to encapsulate the event information, which consists of three elements: event type( BREW API AEEEvent type), P16 value(UInt16 type), and P32 value(UInt32 type).

The event type corresponds to BREW API AEEEvent. The P16 parameter and the P32 parameter correspond to the wParam parameter and the dwParam parameter passed to an event handler of BREW respectively, which is additional information on the event type and whose meaning differs in each event type.

Example 815. How to use the SFXEvent class (1)

// event for destrying responder
SFXEvent event(SREVT_RESPONDER_TERMINATE, SRP16_TERMINATE_INVOKE, true);

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

Example 816. How to use the SFXEvent class (2)

SFXEvent event;

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

SFBShellSmp shell = SFBShell::GetInstance();

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

Reference

SFXEventRange | SFCEventEnum | BREW API AEEEvent

Member

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

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

Description

If the arguments are specified, this constructor will set this event by calling the SFXEvent::Set function internally.

Reference

SFXEvent::Set | BREW API AEEEvent


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

Return value

  • If equal: true
  • Otherwise: false

Description

This function checks whether or not this event equals the specified event.

Reference

operator== | SFXEvent::EqualsTypeP16 | SFXEvent::Set | SFXEvent::SFXEvent | BREW API AEEEvent


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

Return value

  • Matched: true
  • Otherwise: false

Description

This function checks whether or not the event type and the P16 parameter of this event matches the specified values.

Reference

SFXEvent::Equals | SFXEvent::SetP16 | SFXEvent::SetType | SFXEvent::Set | SFXEvent::SFXEvent


SFXEvent::GetP16
Get the P16 parameter of this event.
[ public, const ]
UInt16 GetP16(Void);

Return value

P16 parameter of this event.

Description

This function gets the P16 parameter of this event.

Reference

SFXEvent::SetP16 SFXEvent::Set | SFXEvent::SFXEvent


SFXEvent::GetP32
Get the P32 parameter of this event.
[ public, const ]
UInt32 GetP32(Void);

Return value

P32 parameter of this event.

Description

This function gets the P32 parameter of this event.

Reference

SFXEvent::SetP32 | SFXEvent::Set | SFXEvent::SFXEvent


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

Return value

Event type of this event.

Description

This function gets the event type of this event.

Reference

SFXEvent::SetType | SFXEvent::Set | SFXEvent::SFXEvent | BREW API AEEEvent


SFXEvent::NoneInstance
Get the SFEVT_NONE event.
[ public, static ]
SFXEventConstRef NoneInstance(Void);

Return value

SFEVT_NONE event

Description

This function gets the SFEVT_NONE event.

[Note] Note
This function is the same as SFXEvent::SFXEvent(SFEVT_NONE, 0, 0) except that this function is much faster.

Reference

SFXEvent::SFXEvent


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

Description

This function sets this event to the specified values.

Reference

SFXEvent::SFXEvent | SFXEvent::SetP16 | SFXEvent::SetP32 | SFXEvent::SetType | BREW API AEEEvent


SFXEvent::SetP16
Set the P16 parameter of this event to the specified value.
[ public ]
Void SetP16(
    UInt16 param   // P16 parameter to set
);

Description

This function sets the P16 parameter of this event to the specified value.

Reference

SFXEvent::GetP16 | SFXEvent::Set | SFXEvent::SFXEvent


SFXEvent::SetP32
Set the P32 parameter of this event to the specified value.
[ public ]
Void SetP32(
    UInt32 param   // P32 parameter to set
);

Description

This function sets the P32 parameter of this event to the specified value.

Reference

SFXEvent::GetP32 | SFXEvent::Set | SFXEvent::SFXEvent


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

Description

This function sets the event type of this event to the specified value.

Reference

SFXEvent::GetType | SFXEvent::Set | SFXEvent::SFXEvent | BREW API AEEEvent


SFXEvent::SetTypeP16
Set the event type and the P16 parameter of this event to the specified values.
[ public ]
Void SetTypeP16(
    AEEEvent type   // event type to set
    UInt16 p16      // P16 parameter to set
);

Description

This function the event type and the P16 parameter of this event to the specified values.

Reference

SFXEvent::EqualsTypeP16 | SFXEvent::SetType | SFXEvent::SetP16 | SFXEvent::Set | SFXEvent::SFXEvent | BREW API AEEEvent


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

Description

This function casts the SFXEvent class into the SFXEvent::AtomRec struct.

Reference

SFXEvent::AtomRec


SFXEvent::operator=
Assign the specified event to this 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 struct represents an event.
[ public ]
struct AtomRec {
    AEEEvent     type;  // event type
    UInt16       p16;   // P16 parameter
    UInt32       p32;   // 32-bit parameter
};

Reference

BREW API AEEEvent