![]() ![]() ![]()
|
SophiaFramework UNIVERSE 5.3 |

This class manages a list of tracers. Some functions of this class are used only in the SFYDistributer class and the SFYResponder class and will not be used directly in the applet development.
Tracer | Distributer | Responder Tree | Root Responder | SFYResponder::RegisterTracer | SFYResponder::UnregisterTracer | SFYResponder::ClearTracer | SFYApplication::RegisterTracer | SFYApplication::UnregisterTracer | SFYApplication::ClearTracer | SFYDistributer | SFYResponder | SFYApplication | SFZRoot | SFXEvent | SFXEventRange
| Types |
|---|
|
OrderEnum Constants that represent the order to distribute an event to child responders.
|
|
RuleRec Structure that represents the tracer rule of a processing order, a distributing condition, and an overloading condition.
|
|
StateEnum Constants that represent the distributing condition to distribute an event to child responders.
|
enum OrderEnum {
ORDER_FORWARD = 0, // distribute from foreground to background
ORDER_BACKWARD // distribute from background to foreground
};
SFMTYPEDEFTYPE(OrderEnum)
These constants are used when calling the SFYDistributer::RegisterTracer, SFYApplication::RegisterTracer, or SFYResponder::RegisterTracer function.
The code to register more than one rule into the tracer of a responder at a time is as follows:
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));
SFYDistributer::RegisterTracer | SFYResponder::RegisterTracer | SFYApplication::RegisterTracer
SFMTYPEDEFSTRUCT(RuleRec)
struct RuleRec {
OrderEnum order; // processing order
StateEnum state; // dispatching condition
Bool overload; // overloading condition
};
This structure is used when calling the SFYDistributer::RegisterTracer, SFYApplication::RegisterTracer, or SFYResponder::RegisterTracer function.
The code to register more than one rule into the tracer of a responder at a time is as follows:
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));
SFYDistributer::RegisterTracer | SFYResponder::RegisterTracer | SFYApplication::RegisterTracer
enum StateEnum {
STATE_ALL = 0, // distribute event to all valid child responders
STATE_VISIBLE, // distribute event to visible child responders
STATE_ACTIVE, // distribute event to visible and active child responders
STATE_ENABLE, // distribute event to visible, active, and enable child responders
STATE_FOCUS, // distribute event to visible, active, enable, and focus child responders
STATE_NONE // distribute event to no child responder
};
SFMTYPEDEFTYPE(StateEnum)
These constants are used when calling the SFYDistributer::RegisterTracer, SFYApplication::RegisterTracer, or SFYResponder::RegisterTracer function.
The code to register more than one rule into the tracer of a responder at a time is as follows:
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));
|
Copyright(c) 2002 - 2012 Sophia Cradle Incorporated All Rights Reserved. |
![]() ![]() ![]()
|