?? cosnotifyfilter.idl
字號:
#ifndef COSNOTIFYFILTER_IDL#define COSNOTIFYFILTER_IDL/** * CORBA Common Object Services: Notification Service. * <p> * The detailed specification is available from the * <a href="http://www.omg.org">Object Managament Group</a>. * * @author OMG * @version Version 1.0 */#include <CosNotification.idl>#include <CosNotifyComm.idl>#pragma prefix "omg.org"module CosNotifyFilter{ /** * A unique identifier used to identify filter constraints. */ typedef long ConstraintID; /** * Definition of a constraint. It is a two-tuple of a sequence of event * types and a constraint expression. */ struct ConstraintExp { CosNotification::EventTypeSeq event_types; string constraint_expr; }; /** * A sequence of <code>ConstraintID</code>. */ typedef sequence<ConstraintID> ConstraintIDSeq; /** * A sequence of <code>ConstraintExp</code> structures. */ typedef sequence<ConstraintExp> ConstraintExpSeq; /** * Structure used when an ID has been assigned to a constraint expression. */ struct ConstraintInfo { ConstraintExp constraint_expression; ConstraintID constraint_id; }; /** * A sequence of <code>ConstraintInfo</code> structures. */ typedef sequence<ConstraintInfo> ConstraintInfoSeq; /** * Definition of a mapping constraint. It is a two-tuple of a * constraint expression and a value to set. */ struct MappingConstraintPair { ConstraintExp constraint_expression; any result_to_set; }; /** * A sequence of <code>MappingConstraintPair</code> structures. */ typedef sequence<MappingConstraintPair> MappingConstraintPairSeq; /** * Structure used when an ID has been assigned to a mapping * constraint expression. */ struct MappingConstraintInfo { ConstraintExp constraint_expression; ConstraintID constraint_id; any value; }; /** * A sequence of <code>MappingConstraintInfo</code> structures. */ typedef sequence<MappingConstraintInfo> MappingConstraintInfoSeq; /** * A unique identifier used to identify callback objects. */ typedef long CallbackID; /** * A sequence of <code>CallbackID</code>. */ typedef sequence<CallbackID> CallbackIDSeq; /** * Exception used to that an event contains data which is not filterable. */ exception UnsupportedFilterableData {}; /** * Exception used to indicate invalid grammer. */ exception InvalidGrammar {}; /** * Exception used to indicate invalid filter constraint. */ exception InvalidConstraint {ConstraintExp constr;}; /** * Exception used to indicate a duplicate constraint ID. */ exception DuplicateConstraintID {ConstraintID id;}; /** * Exception used to indicate a that a constraint was not found. */ exception ConstraintNotFound {ConstraintID id;}; /** * Exception used to indicate a that a callback object was not found. */ exception CallbackNotFound {}; /** * Exception used to indicate a that a constraint value is invalid. */ exception InvalidValue {ConstraintExp constr; any value;}; /** * Interface for a filter. */ interface Filter { /** * The constraint grammer used by this filter. */ readonly attribute string constraint_grammar; /** * Associates one or more constraints with this filter object. * @parm <code>constraint_list</code> - List of constraints to be * associated with filter. * @returns A list with ID for each of the added constraints. * @raises InvalidConstraint If any of the constraints are invalid. */ ConstraintInfoSeq add_constraints ( in ConstraintExpSeq constraint_list) raises (InvalidConstraint); /** * Delete or modify constraints on this filter object. * @parm <code>del_list</code> - List of constraints to delete. * @parm <code>modify_list</code> - List of constraints to modify. * @raises InvalidConstraint If any of the constraints in the * <code>modify_list</code> input sequences are invalid. * @raises ConstraintNotFound If a constraint in either * of the two input sequences was not found. */ void modify_constraints ( in ConstraintIDSeq del_list, in ConstraintInfoSeq modify_list) raises (InvalidConstraint, ConstraintNotFound); /** * Return a list of constraints for this filter object based on IDs. * @parm <code>id_list</code> - List of constraint IDs. * @returns A list of constraints for the IDs in the input sequence. * @raises ConstraintNotFound If a constraint was not found. */ ConstraintInfoSeq get_constraints( in ConstraintIDSeq id_list) raises (ConstraintNotFound); /** * Return a list of all constraints for this filter object. * @returns A list of all constraints. */ ConstraintInfoSeq get_all_constraints(); /** * Removes all constraints defined on this filter object. */ void remove_all_constraints(); /** * Destroys this filter object. */ void destroy(); /** * Evaluates the input event against the filter constraints defined * on this filter object. If the event satisfies one of the filter * constraints TRUE is returned, otherwise FALSE is returned. * @parm <code>filterable_data</code> - The event to evaluate. * @returns TRUE if event matches any constraint, FALSE otherwise. * raises UnsupportedFilterableData If the event specified by * <code>filterable_data</code> contains data that this filter is * not designed to handle. */ boolean match ( in any filterable_data ) raises (UnsupportedFilterableData); /** * Evaluates the input event against the filter constraints defined * on this filter object. If the event satisfies one of the filter * constraints TRUE is returned, otherwise FALSE is returned. * @parm <code>filterable_data</code> - The structured event to evaluate. * @returns TRUE if event matches any constraint, FALSE otherwise. * raises UnsupportedFilterableData If the event specified by * <code>filterable_data</code> contains data that this filter is * not designed to handle. */ boolean match_structured ( in CosNotification::StructuredEvent filterable_data ) raises (UnsupportedFilterableData); /** * Evaluates the input event against the filter constraints defined * on this filter object. If the event satisfies one of the filter * constraints TRUE is returned, otherwise FALSE is returned. * @parm <code>filterable_data</code> - The typed event to evaluate. * @returns TRUE if event matches any constraint, FALSE otherwise. * raises UnsupportedFilterableData If the event specified by * <code>filterable_data</code> contains data that this filter is * not designed to handle. */ boolean match_typed ( in CosNotification::PropertySeq filterable_data ) raises (UnsupportedFilterableData); /** * Attach a callback object to this filter that will be notified * each time the constraints on this filter are modified. * @parm <code>callback</code> - A callback object reference of type * NotifySubscribe. * @returns A ID which is unique for the newly attached object. */ CallbackID attach_callback ( in CosNotifyComm::NotifySubscribe callback); /** * Detach a callback object from this filter.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -