⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cosnotifyfilter.idl

📁 这是广泛使用的通信开源项目,对于大容量,高并发的通讯要求完全能够胜任,他广泛可用于网络游戏医学图像网关的高qos要求.更详细的内容可阅读相应的材料
💻 IDL
📖 第 1 页 / 共 2 页
字号:
/**
 * @file CosNotifyFilter.idl
 *
 * @brief Defines the CosNotifyFilter module
 *
 * CosNotifyFilter.idl,v 1.4 2001/09/17 20:50:34 coryan Exp
 *
 * This module is taken from the standard CORBA Notification Service
 * 1.0, as described in:
 *
 * http://www.omg.org/technology/documents/formal/notification_service.htm
 *
 * In particular the following two documents were used:
 * formal/2000-06-20
 * formal/01-03-03
 *
 * @author Pradeep Gore <pradeep@cs.wustl.edu>
 */

#ifndef _COS_NOTIFY_FILTER_IDL_
#define _COS_NOTIFY_FILTER_IDL_

#include <orb.idl>

#include "CosNotifyComm.idl"

#pragma prefix "omg.org"

/**
 * @namespace CosNotifyFilter
 *
 * @brief Defines the interfaces used in Event Filtering
 */
module CosNotifyFilter
{
  /// Constraints are assigned IDs by each Filter object, and can be
  /// modified using those IDs.
  typedef long ConstraintID;

  /**
   * @struct ConstraintExp
   *
   * @brief Defines a constraint expression.
   */
  struct ConstraintExp {
    /// The list of event types accepted
    CosNotification::EventTypeSeq event_types;
    /// A constraint (or filtering) expression
    string constraint_expr;
  };

  /// A sequence of constraint IDs
  typedef sequence<ConstraintID> ConstraintIDSeq;

  /// A sequence of constraint expressions
  typedef sequence<ConstraintExp> ConstraintExpSeq;

  /**
   * @struct ConstraintInfo
   *
   * @brief Helper data structure to modify a constraint expression.
   */
  struct ConstraintInfo {
    /// New constraint expression
    ConstraintExp constraint_expression;
    /// ID of the expression modified
    ConstraintID constraint_id;
  };

  /// Sequence of Constraint infos, modify multiple constraints.
  typedef sequence<ConstraintInfo> ConstraintInfoSeq;

  /**
   * @struct MappingConstraintPair
   *
   * @brief Helper structure used to modify a mapping constraint
   * expression.
   */
  struct MappingConstraintPair {
    /// Constraint expression
    ConstraintExp constraint_expression;
    /// Value to set in the property if the constraint expression
    /// matches
    any result_to_set;
  };

  /// Sequence of mapping constraint pairs
  typedef sequence<MappingConstraintPair> MappingConstraintPairSeq;

  /**
   * @struct MappingConstraintInfo
   *
   * @brief Helper structure used to represent a mapping constraint,
   * its property value and the ID assigned to it in a MappingFilter.
   */
  struct MappingConstraintInfo {
    ConstraintExp constraint_expression;
    ConstraintID constraint_id;
    any value;
  };
  /// A list of MappingConstraintInfo
  typedef sequence<MappingConstraintInfo> MappingConstraintInfoSeq;

  /// Each callback object receives a unique ID when it is attached to
  /// a Filter
  typedef long CallbackID;

  /// Batch management of callback objects in the Filter interface
  typedef sequence<CallbackID> CallbackIDSeq;

  /**
   * @exception UnsupportedFilterableData
   *
   * @brief Exception raised when an event with unsupported filtered
   * data is tested against a Filter.
   */
  exception UnsupportedFilterableData {};

  /**
   * @exception InvalidGrammar
   *
   * @brief Exception raised if the filtering expression is using an
   * invalid grammar.
   */
  exception InvalidGrammar {};

  /**
   * @exception InvalidConstraint
   *
   * @brief Exception raised if a constraint's grammar does not match
   *   the Filter grammar.
   *
   * The constraint that is deemed invalid is returned as part of the
   * exception.
   */
  exception InvalidConstraint {
    /// Constraint that caused the problem
    ConstraintExp constr;
  };

  /**
   * @exception DuplicateConstraintID
   *
   * @brief Exception raised if a duplicate ID is used while modifying
   * or removing multiple constraints.
   */
  exception DuplicateConstraintID {
    /// ID causing the problem
    ConstraintID id;
  };

  /**
   * @exception ConstraintNotFound
   *
   * @brief Exception raised if a constraint ID is not found while
   * modifying or removing multiple constraints.
   */
  exception ConstraintNotFound {
    /// ID causing the problem
    ConstraintID id;
  };

  /**
   * @exception CallbackNotFound
   *
   * @brief Exception raised if the application tries to remove a
   *        Filter callback that does not exists.
   */
  exception CallbackNotFound {};

  /**
   * @exception InvalidValue
   *
   * @brief Exception raised if a modification or addition of a
   * mapping constraint does not matches the mapping filter type.
   */
  exception InvalidValue {
    /// Constraint expression that cause the problem
    ConstraintExp constr;
    /// Value that caused the problem
    any value;
  };

  /**
   * @interface Filter
   *
   * @brief Interface used to manipulate and evaluate filters.
   *
   * An event filter posseses multiple constraints, each constraint
   * applies to a limited range of event types, the filter is accepted
   * if it matches one or more constraint expressions that apply to
   * its event type.
   */
  interface Filter {
    /// Constraint grammar used in this filter
    /**
     * All filtering expressions in the filter should use this
     * grammar.
     */
    readonly attribute string constraint_grammar;

    /// Add constraints to a filter
    /**
     * Return the constraints and their IDs.
     *
     * @throws InvalidConstraint if one or more constraints contain
     *    invalid an invalid expression in the Filter constraint
     *    grammar.
     */
    ConstraintInfoSeq add_constraints (
                          in ConstraintExpSeq constraint_list)
      raises (InvalidConstraint);

    /// Modify and/or remove multiple constraints in the Filter
    /**
     * The operation can raise InvalidConstraint if one or more
     * constraints contain invalid expressions in the constraint
     * grammar.
     *
     * @param del_list List of constraint IDs to be removed
     * @param modify_list List of constrained modified
     *
     * @throws ConstraintNotFound If one or more of the ConstraintID
     * supplied are not found.
     */
    void modify_constraints (
             in ConstraintIDSeq del_list,
             in ConstraintInfoSeq modify_list)
      raises (InvalidConstraint, ConstraintNotFound);

    /// Obtain the one or more constraints given their IDs
    /**
     * @param id_list List of IDs queried
     *
     * @throws ConstraintNotFound if one or more of
     * the ConstraintID supplied are not found.
     */
    ConstraintInfoSeq get_constraints(
                          in ConstraintIDSeq id_list)
      raises (ConstraintNotFound);

    /// The all the constraints in the Filter
    ConstraintInfoSeq get_all_constraints();

    /// Remove all the constraints from the Filter
    void remove_all_constraints();

    /// Destroy the Filter
    void destroy();

    /// Match a regular event against the constraints in the filter
    /**
     * @param filterable_data The Notification Service event to be

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -