PrevNextUpHome SophiaFramework UNIVERSE 5.3
SFXEventRange
Class which represents an event range.
#include <SFXEventRange.h.hpp>
class SFXEventRange;
<link linkend="sec.macro.core.typedef.SFMTYPEDEFCLASS">SFMTYPEDEFCLASS</link>(SFXEventRange)
        

Inheritance diagram

 Inheritance diagram of SFXEventRangeClass

Collaboration diagram

 Collaboration diagram of SFXEventRangeClass

Description

The SFXEventRange class represents an event range necessary to register an event handler or a tracer which is used in SFY GUI framework.

The event range is specified with the event type( BREW API AEEEvent type) and the P16 parameter(UInt16 type) for each of the starting event and the ending event.

For instance, SFXEventRange(sEventType,eEventType, sP16, eP16) represents events in the range between the (sEventType, sP16, *) event and (eEventType, eP16, *) event.

Example 817. Method to use the SFXEventRange class (1): registering an event handler

// constructor
HelloWorld::HelloWorld(Void) static_throws
{
    if (static_try()) {
        static_throw(RegisterHandler(
            SFXEventRange(SFEVT_RESPONDER_RENDER, SFEVT_RESPONDER_RENDER,
            SFP16_RENDER_REQUEST, SFP16_RENDER_REQUEST),
            XANDLER_INTERNAL(OnRenderRequest)
        ));
    }
    if (static_try()) {
        static_throw(RegisterHandler(
            SFXEventRange(SFEVT_KEY, SFEVT_KEY, SFP16_BEGIN, SFP16_END),
            XANDLER_INTERNAL(OnKey)
        ));
    }
}

Example 818. Method to use the SFXEventRange class (2): registering an event handler

static SFXEventRange::AtomRecConst range[] = {
    {             SFEVT_KEY,              SFEVT_KEY,          SFP16_BEGIN,            SFP16_END},
    {       SFEVT_KEY_PRESS,        SFEVT_KEY_PRESS,          SFP16_BEGIN,            SFP16_END},
    {     SFEVT_KEY_RELEASE,      SFEVT_KEY_RELEASE,          SFP16_BEGIN,            SFP16_END}
};
SFYHandler::RuleRec rule[lengthof(range)];
SFCError error;

rule[0].spp = XANDLER_FUNCTION(OnKey);
rule[0].reference = this;
rule[1].spp = XANDLER_FUNCTION(OnKeyPress);
rule[1].reference = this;
rule[2].spp = XANDLER_FUNCTION(OnKeyRelease);
rule[2].reference = this;

error = RegisterHandler(atomic_cast(range), rule, lengthof(range));

Example 819. Method to use the SFXEventRange class (3): registering a tracer

static SFXEventRange::AtomRecConst range[] = {
    {            SFEVT_APP_START,           SFEVT_APP_START, SFP16_BEGIN, SFP16_END},
    {             SFEVT_APP_STOP,            SFEVT_APP_STOP, SFP16_BEGIN, SFP16_END},
    {           SFEVT_APP_RESUME,          SFEVT_APP_RESUME, SFP16_BEGIN, SFP16_END},
    {          SFEVT_APP_SUSPEND,         SFEVT_APP_SUSPEND, SFP16_BEGIN, SFP16_END}
};
static SFYTracer::RuleRecConst rule[lengthof(range)] = {
    {  SFYTracer::ORDER_BACKWARD,      SFYTracer::STATE_ALL,        true},
    {   SFYTracer::ORDER_FORWARD,      SFYTracer::STATE_ALL,        true},
    {  SFYTracer::ORDER_BACKWARD,      SFYTracer::STATE_ALL,        true},
    {   SFYTracer::ORDER_FORWARD,      SFYTracer::STATE_ALL,        true}
};
SFCError error;

error = RegisterTracer(atomic_cast(range), rule, lengthof(range));

Reference

SFXEvent | SFCEventEnum | SFYResponder::RegisterHandler | SFYResponder::RegisterTracer | BREW API AEEEvent

Member

Constructor/Destructor
SFXEventRange( Void )
Constructor of the SFXEventRange class.
SFXEventRange( SFXEventRangeConstRef param )
Constructor of the SFXEventRange class.
SFXEventRange( AEEEvent stype , AEEEvent etype , UInt16 sp16 , UInt16 ep16 )
Constructor of the SFXEventRange class.
Public Functions
Bool Contains( SFXEventRangeConstRef param )
Check whether or not this event range contains the specified event or event range.
Bool Contains( SFXEventConstRef param )
Check whether or not this event range contains the specified event or event range.
Bool Contains( AEEEvent stype , AEEEvent etype , UInt16 sp16 , UInt16 ep16 )
Check whether or not this event range contains the specified event or event range.
Bool Contains( AEEEvent type , UInt16 p16 )
Check whether or not this event range contains the specified event or event range.
Bool ContainsP16( SFXEventRangeConstRef param )
Check whether or not this event range contains the P16 parameter of the specified event or event range.
Bool ContainsP16( SFXEventConstRef param )
Check whether or not this event range contains the P16 parameter of the specified event or event range.
Bool ContainsP16( UInt16 sp16 , UInt16 ep16 )
Check whether or not this event range contains the P16 parameter of the specified event or event range.
Bool ContainsP16( UInt16 p16 )
Check whether or not this event range contains the P16 parameter of the specified event or event range.
Bool ContainsType( SFXEventRangeConstRef param )
Check whether or not this event range contains the type of the specified event or event range.
Bool ContainsType( SFXEventConstRef param )
Check whether or not this event range contains the type of the specified event or event range.
Bool ContainsType( AEEEvent stype , AEEEvent etype )
Check whether or not this event range contains the type of the specified event or event range.
Bool ContainsType( AEEEvent type )
Check whether or not this event range contains the type of the specified event or event range.
static
SFXEventRangeConstRef
EmptyInstance( Void )
Get an empty event range.
Bool Equals( SFXEventRangeConstRef param )
Check whether or not this event range equals the specified event range.
Bool Equals( AEEEvent stype , AEEEvent etype , UInt16 sp16 , UInt16 ep16 )
Check whether or not this event range equals the specified event range.
Bool EqualsP16( SFXEventRangeConstRef param )
Check whether or not the P16 parameter range of this event range equals the specified P16 parameter range.
Bool EqualsP16( UInt16 sp16 , UInt16 ep16 )
Check whether or not the P16 parameter range of this event range equals the specified P16 parameter range.
UInt16 GetEndP16( Void )
Get the P16 parameter of the ending event of this event range.
AEEEvent GetEndType( Void )
Get the event type of the ending event of this event range.
UInt16 GetStartP16( Void )
Get the P16 parameter of the starting event of this event range.
AEEEvent GetStartType( Void )
Get the event type of the starting event of this event range.
Void Set( SFXEventRangeConstRef param )
Set this event range to the specified range.
Void Set( AEEEvent stype , AEEEvent etype , UInt16 sp16 , UInt16 ep16 )
Set this event range to the specified range.
Void SetEndP16( UInt16 param )
Set the P16 parameter of the ending event of this event range to the specified value.
Void SetEndType( AEEEvent param )
Set the event of the ending event of this event range to the specified value.
Void SetP16( UInt16 sp16 , UInt16 ep16 )
Set the P16 parameter range of this event range to the specified range.
Void SetStartP16( UInt16 param )
Set the P16 parameter of the starting event of this event range to the specified value.
Void SetStartType( AEEEvent param )
Set the event type of the starting event of this event range to the specified value.
Void SetType( AEEEvent stype , AEEEvent etype )
Set the event type range of this event range to the specified range.
Bool operator!=( SFXEventRangeConstRef left , SFXEventRangeConstRef right )
Check the "!=" relation.
SFXEventRangeRef operator=( SFXEventRangeConstRef param )
Assign the specified event range to this event range.
Bool operator==( SFXEventRangeConstRef left , SFXEventRangeConstRef right )
Check the "==" relation.
Bool ( SFXEventRangeConstRef param )
Check whether or not the event type range of this event range equals the specified event type range.
Bool ( AEEEvent stype , AEEEvent etype )
Check whether or not the event type range of this event range equals the specified event type range.
SFXEventRange::AtomRec * atomic_cast( SFXEventRange * param )
Convert SFXEventRange into SFXEventRange::AtomRec.
SFXEventRange::AtomRec const * atomic_cast( SFXEventRange const * param )
Convert SFXEventRange into SFXEventRange::AtomRec.
Types
AtomRec (inherits from SFXRectangle)
The SFXEventRange::AtomRec struct represents an event range.
Global Functions
Bool ( SFXEventRangeConstRef param )
Check whether or not the event type range of this event range equals the specified event type range.
Bool ( AEEEvent stype , AEEEvent etype )
Check whether or not the event type range of this event range equals the specified event type range.
SFXEventRange::AtomRec * atomic_cast( SFXEventRange * param )
Convert SFXEventRange into SFXEventRange::AtomRec.
SFXEventRange::AtomRec const * atomic_cast( SFXEventRange const * param )
Convert SFXEventRange into SFXEventRange::AtomRec.

SFXEventRange::SFXEventRange
Constructor of the SFXEventRange class.
[ public, explicit ]
SFXEventRange(Void);
[ public ]
SFXEventRange(
    SFXEventRangeConstRef param   // event range
);
[ public, explicit ]
SFXEventRange(
    AEEEvent stype   // type of starting event
    AEEEvent etype   // type of ending event
    UInt16 sp16      // P16 parameter of starting event
    UInt16 ep16      // P16 parameter of ending event
);

Description

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

Reference

SFXEventRange::Set | BREW API AEEEvent


SFXEventRange::Contains
Check whether or not this event range contains the specified event or event range.
[ public, const ]
Bool Contains(
    SFXEventRangeConstRef param   // event range
);
[ public, const ]
Bool Contains(
    SFXEventConstRef param   // event
);
[ public, const ]
Bool Contains(
    AEEEvent stype   // type of starting event
    AEEEvent etype   // type of ending event
    UInt16 sp16      // P16 parameter of starting event
    UInt16 ep16      // P16 parameter of ending event
);
[ public, const ]
Bool Contains(
    AEEEvent type   // event type
    UInt16 p16      // P16 parameter
);

Argument

param

... param の説明 ...

Return value

  • If contains: true
  • Otherwise: false

Description

This function checks whether or not this event range contains the specified event or event range.

Reference

SFXEventRange::ContainsType | SFXEventRange::ContainsP16 | SFXEvent | BREW API AEEEvent


SFXEventRange::ContainsP16
Check whether or not this event range contains the P16 parameter of the specified event or event range.
[ public, const ]
Bool ContainsP16(
    SFXEventRangeConstRef param   // event range
);
[ public, const ]
Bool ContainsP16(
    SFXEventConstRef param   // event
);
[ public, const ]
Bool ContainsP16(
    UInt16 sp16   // P16 parameter of starting event
    UInt16 ep16   // P16 parameter of ending event
);
[ public, const ]
Bool ContainsP16(
    UInt16 p16   // P16 parameter
);

Return value

  • If contains: true
  • Otherwise: false

Description

This function checks whether or not this event range contains the P16 parameter of the specified event or event range.

Reference

SFXEventRange::Contains | SFXEventRange::ContainsType | SFXEvent


SFXEventRange::ContainsType
Check whether or not this event range contains the type of the specified event or event range.
[ public, const ]
Bool ContainsType(
    SFXEventRangeConstRef param   // event range
);
[ public, const ]
Bool ContainsType(
    SFXEventConstRef param   // event
);
[ public, const ]
Bool ContainsType(
    AEEEvent stype   // type of starting event
    AEEEvent etype   // type of ending event
);
[ public, const ]
Bool ContainsType(
    AEEEvent type   // event type
);

Return value

  • If contains: true
  • Otherwise: false

Description

This function checks whether or not this event range contains the type of the specified event or event range.

Reference

SFXEventRange::Contains | SFXEventRange::ContainsP16 | SFXEvent


SFXEventRange::EmptyInstance
Get an empty event range.
[ public, static ]
SFXEventRangeConstRef EmptyInstance(Void);

Return value

Empty event range.

Description

This function gets the empty event range that contains no events.


SFXEventRange::Equals
Check whether or not this event range equals the specified event range.
[ public, const ]
Bool Equals(
    SFXEventRangeConstRef param   // event range
);
[ public, const ]
Bool Equals(
    AEEEvent stype   // type of starting event
    AEEEvent etype   // type of ending event
    UInt16 sp16      // P16 parameter of starting event
    UInt16 ep16      // P16 parameter of ending event
);

Return value

  • If equals: true
  • Otherwise: false

Description

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

Reference

SFXEventRange::operator== | | SFXEventRange::EqualsP16 | SFXEvent | BREW API AEEEvent


SFXEventRange::EqualsP16
Check whether or not the P16 parameter range of this event range equals the specified P16 parameter range.
[ public, const ]
Bool EqualsP16(
    SFXEventRangeConstRef param   // event range
);
[ public, const ]
Bool EqualsP16(
    UInt16 sp16   // P16 parameter of starting event
    UInt16 ep16   // P16 parameter of ending event
);

Return value

  • If equals: true
  • Otherwise: false

Description

This function checks whether or not the P16 parameter range of this event range equals the specified P16 parameter range.

Reference

| SFXEventRange::Equals | SFXEvent


Check whether or not the event type range of this event range equals the specified event type range.
[ public, const ]
Bool EqualsType(
    SFXEventRangeConstRef param   // event range
);
[ public, const ]
Bool EqualsType(
    AEEEvent stype   // type of starting event
    AEEEvent etype   // type of ending event
);

Return value

  • If equals: true
  • Otherwise: false

Description

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

Reference

SFXEventRange::Equals | SFXEventRange::EqualsP16 | SFXEvent | BREW API AEEEvent


SFXEventRange::GetEndP16
Get the P16 parameter of the ending event of this event range.
[ public, const ]
UInt16 GetEndP16(Void);

Return value

P16 parameter of the ending event of this event range.

Description

This function gets the P16 parameter of the ending event of this event range.

Reference

SFXEventRange::SetEndP16 | SFXEventRange::Set | SFXEventRange::SetP16 | SFXEvent


SFXEventRange::GetEndType
Get the event type of the ending event of this event range.
[ public, const ]
AEEEvent GetEndType(Void);

Return value

Event type of the ending event of this event range.

Description

This function gets the event type of the ending event of this event range.

Reference

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


SFXEventRange::GetStartP16
Get the P16 parameter of the starting event of this event range.
[ public, const ]
UInt16 GetStartP16(Void);

Return value

P16 parameter of the starting event of this event range.

Description

This function gets the P16 parameter of the starting event of this event range.

Reference

SFXEventRange::SetStartP16 | SFXEventRange::Set | SFXEvent


SFXEventRange::GetStartType
Get the event type of the starting event of this event range.
[ public, const ]
AEEEvent GetStartType(Void);

Return value

Event type of the starting event of this event range.

Description

This function gets the event type of the starting event of this event range.

Reference

SFXEventRange::SetStartType | SFXEventRange::Set | SFXEvent | BREW API AEEEvent


SFXEventRange::Set
Set this event range to the specified range.
[ public ]
Void Set(
    SFXEventRangeConstRef param   // event range
);
[ public ]
Void Set(
    AEEEvent stype   // event type of the starting event
    AEEEvent etype   // event type of the ending event
    UInt16 sp16      // P16 parameter of the starting event
    UInt16 ep16      // P16 parameter of the ending event
);

Description

This function sets this event range to the specified range.

Reference

SFXEventRange::GetStartType | SFXEventRange::GetStartP16 | SFXEventRange::GetEndType | SFXEventRange::GetEndP16 | SFXEventRange::SetStartType | SFXEventRange::SetStartP16 | SFXEventRange::SetEndType | SFXEventRange::SetEndP16 | SFXEventRange::SetType | SFXEventRange::SetP16 | SFXEvent | BREW API AEEEvent


SFXEventRange::SetEndP16
Set the P16 parameter of the ending event of this event range to the specified value.
[ public ]
Void SetEndP16(
    UInt16 param   // P16 parameter of the ending event
);

Description

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

Reference

SFXEventRange::GetEndP16 | SFXEventRange::Set | SFXEventRange::SetP16 | SFXEvent


SFXEventRange::SetEndType
Set the event of the ending event of this event range to the specified value.
[ public ]
Void SetEndType(
    AEEEvent param   // event type of the ending event
);

Description

This function sets the event of the ending event of this event range to the specified value.

Reference

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


SFXEventRange::SetP16
Set the P16 parameter range of this event range to the specified range.
[ public ]
Void SetP16(
    UInt16 sp16   // P16 parameter of the starting event
    UInt16 ep16   // P16 parameter of the ending event
);

Description

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

Reference

SFXEventRange::GetStartP16 | SFXEventRange::GetEndP16 | SFXEventRange::SetStartP16 | SFXEventRange::SetEndP16 | SFXEventRange::Set | SFXEventRange::SetType | SFXEvent


SFXEventRange::SetStartP16
Set the P16 parameter of the starting event of this event range to the specified value.
[ public ]
Void SetStartP16(
    UInt16 param   // P16 parameter of the starting event
);

Description

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

Reference

SFXEventRange::GetStartP16 | SFXEventRange::Set | SFXEvent


SFXEventRange::SetStartType
Set the event type of the starting event of this event range to the specified value.
[ public ]
Void SetStartType(
    AEEEvent param   // event type of the starting event
);

Description

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

Reference

SFXEventRange::GetStartType | SFXEventRange::Set | SFXEvent | BREW API AEEEvent


SFXEventRange::SetType
Set the event type range of this event range to the specified range.
[ public ]
Void SetType(
    AEEEvent stype   // event type of the starting event
    AEEEvent etype   // event type of the ending event
);

Description

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

Reference

SFXEventRange::GetStartType | SFXEventRange::GetEndType | SFXEventRange::SetStartType | SFXEventRange::SetEndType | SFXEventRange::Set | SFXEventRange::SetP16 | SFXEvent | BREW API AEEEvent


atomic_cast
Convert SFXEventRange into SFXEventRange::AtomRec.
[ public, friend ]
SFXEventRange::AtomRec * atomic_cast(
    SFXEventRange * param   // event range to be casted
);
[ public, friend ]
SFXEventRange::AtomRec const * atomic_cast(
    SFXEventRange const * param   // event range to be casted
);

Description

This function casts the SFXEventRange class into the SFXRectangle::AtomRec struct.

Reference

SFXRectangle::AtomRec


SFXEventRange::operator=
Assign the specified event range to this event range.
[ public ]
SFXEventRangeRef operator=(
    SFXEventRangeConstRef param   // event range
);

Reference

SFXEventRange::Set | SFXEvent


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

Return value

  • If equals: true
  • Otherwise: false

Reference

SFXEventRange::operator!= | SFXEventRange::Equals | SFXEvent


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

Return value

  • If not equal: true
  • Otherwise: false

Reference

SFXEventRange::operator!= | SFXEventRange::Equals | SFXEvent


SFXRectangle::AtomRec
The SFXEventRange::AtomRec struct represents an event range.
struct AtomRec {
      SFMUTILITYATOMDECLARE(SFXEventRange)
      AEEEvent  stype;  // type of starting event
      AEEEvent  etype;  // type of ending event
      UInt16    sp16;   // P16 parameter of starting event
      UInt16    ep16;   // P16 parameter of ending event
};

Reference

BREW API AEEEvent