TAO_CosNotification  2.2.8
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
TAO_Notify_Constraint_Visitor Class Reference

#include <Notify_Constraint_Visitors.h>

Inheritance diagram for TAO_Notify_Constraint_Visitor:
Inheritance graph
Collaboration diagram for TAO_Notify_Constraint_Visitor:
Collaboration graph

Public Member Functions

 TAO_Notify_Constraint_Visitor (void)
 Constructor. More...
 
int bind_structured_event (const CosNotification::StructuredEvent &s_event)
 Put the event data into our hash map. More...
 
CORBA::Boolean evaluate_constraint (ETCL_Constraint *root)
 
virtual int visit_literal (ETCL_Literal_Constraint *)
 
virtual int visit_identifier (ETCL_Identifier *)
 
virtual int visit_union_value (ETCL_Union_Value *)
 
virtual int visit_union_pos (ETCL_Union_Pos *)
 
virtual int visit_component_pos (ETCL_Component_Pos *)
 
virtual int visit_component_assoc (ETCL_Component_Assoc *)
 
virtual int visit_component_array (ETCL_Component_Array *)
 
virtual int visit_special (ETCL_Special *)
 
virtual int visit_component (ETCL_Component *)
 
virtual int visit_dot (ETCL_Dot *)
 
virtual int visit_eval (ETCL_Eval *)
 
virtual int visit_default (ETCL_Default *)
 
virtual int visit_exist (ETCL_Exist *)
 
virtual int visit_unary_expr (ETCL_Unary_Expr *)
 
virtual int visit_binary_expr (ETCL_Binary_Expr *)
 
virtual int visit_preference (ETCL_Preference *)
 

Protected Types

enum  structured_event_field {
  FILTERABLE_DATA, HEADER, FIXED_HEADER, EVENT_TYPE,
  DOMAIN_NAME, TYPE_NAME, EVENT_NAME, VARIABLE_HEADER,
  REMAINDER_OF_BODY, EMPTY
}
 

Protected Member Functions

int visit_or (ETCL_Binary_Expr *)
 
int visit_and (ETCL_Binary_Expr *)
 
int visit_twiddle (ETCL_Binary_Expr *)
 
int visit_in (ETCL_Binary_Expr *)
 
int visit_binary_op (ETCL_Binary_Expr *binary_expr, int op_type)
 
CORBA::Boolean sequence_does_contain (const CORBA::Any *any, TAO_ETCL_Literal_Constraint &item)
 
CORBA::Boolean array_does_contain (const CORBA::Any *any, TAO_ETCL_Literal_Constraint &item)
 
CORBA::Boolean struct_does_contain (const CORBA::Any *any, TAO_ETCL_Literal_Constraint &item)
 
CORBA::Boolean union_does_contain (const CORBA::Any *any, TAO_ETCL_Literal_Constraint &item)
 
CORBA::Boolean any_does_contain (const CORBA::Any *any, TAO_ETCL_Literal_Constraint &item)
 
CORBA::Boolean simple_type_match (int expr_type, CORBA::TCKind tc_kind)
 

Protected Attributes

structured_event_field implicit_id_
 Storage for the type of implicit id the component has (if any). More...
 
ACE_Hash_Map_Manager
< ACE_CString,
structured_event_field,
ACE_Null_Mutex
implicit_ids_
 
ACE_Hash_Map_Manager
< ACE_CString, CORBA::Any,
ACE_Null_Mutex
filterable_data_
 Used to lookup names and values in the event's 'filterable_data' field. More...
 
ACE_Hash_Map_Manager
< ACE_CString, CORBA::Any,
ACE_Null_Mutex
variable_header_
 Used to lookup names and values in the event's 'variable_header' field. More...
 
CORBA::String_var domain_name_
 
CORBA::String_var type_name_
 
CORBA::String_var event_name_
 
CORBA::Any remainder_of_body_
 Storage for the structured_event's 'remainder_of_body' field. More...
 
ACE_Unbounded_Queue
< TAO_ETCL_Literal_Constraint > 
queue_
 The result of a non_boolean operation. More...
 
CORBA::Any_var current_value_
 
CORBA::String_var current_name_
 

Static Protected Attributes

static const size_t implicit_ids_size_ = 27
 
static const size_t filterable_data_size_ = 31
 
static const size_t variable_header_size_ = 31
 

Member Enumeration Documentation

Enumerator
FILTERABLE_DATA 
HEADER 
FIXED_HEADER 
EVENT_TYPE 
DOMAIN_NAME 
TYPE_NAME 
EVENT_NAME 
VARIABLE_HEADER 
REMAINDER_OF_BODY 
EMPTY 

Constructor & Destructor Documentation

TAO_Notify_Constraint_Visitor::TAO_Notify_Constraint_Visitor ( void  )

Constructor.

Member Function Documentation

CORBA::Boolean TAO_Notify_Constraint_Visitor::any_does_contain ( const CORBA::Any *  any,
TAO_ETCL_Literal_Constraint &  item 
)
protected
CORBA::Boolean TAO_Notify_Constraint_Visitor::array_does_contain ( const CORBA::Any *  any,
TAO_ETCL_Literal_Constraint &  item 
)
protected
int TAO_Notify_Constraint_Visitor::bind_structured_event ( const CosNotification::StructuredEvent s_event)

Put the event data into our hash map.

CORBA::Boolean TAO_Notify_Constraint_Visitor::evaluate_constraint ( ETCL_Constraint *  root)

Returns true if the event satisfies the constraint represented by the the expression tree rooted at root, false if it doesn't. If an error occurs during the process, the traversal automatically fails.

CORBA::Boolean TAO_Notify_Constraint_Visitor::sequence_does_contain ( const CORBA::Any *  any,
TAO_ETCL_Literal_Constraint &  item 
)
protected
CORBA::Boolean TAO_Notify_Constraint_Visitor::simple_type_match ( int  expr_type,
CORBA::TCKind  tc_kind 
)
protected

Utility function to compare a TAO_ETCL_Literal_Constraint type and a type code.

CORBA::Boolean TAO_Notify_Constraint_Visitor::struct_does_contain ( const CORBA::Any *  any,
TAO_ETCL_Literal_Constraint &  item 
)
protected
CORBA::Boolean TAO_Notify_Constraint_Visitor::union_does_contain ( const CORBA::Any *  any,
TAO_ETCL_Literal_Constraint &  item 
)
protected
int TAO_Notify_Constraint_Visitor::visit_and ( ETCL_Binary_Expr *  binary)
protected
int TAO_Notify_Constraint_Visitor::visit_binary_expr ( ETCL_Binary_Expr *  binary_expr)
virtual
int TAO_Notify_Constraint_Visitor::visit_binary_op ( ETCL_Binary_Expr *  binary_expr,
int  op_type 
)
protected
int TAO_Notify_Constraint_Visitor::visit_component ( ETCL_Component *  component)
virtual
int TAO_Notify_Constraint_Visitor::visit_component_array ( ETCL_Component_Array *  array)
virtual
int TAO_Notify_Constraint_Visitor::visit_component_assoc ( ETCL_Component_Assoc *  assoc)
virtual
int TAO_Notify_Constraint_Visitor::visit_component_pos ( ETCL_Component_Pos *  pos)
virtual
int TAO_Notify_Constraint_Visitor::visit_default ( ETCL_Default *  def)
virtual
int TAO_Notify_Constraint_Visitor::visit_dot ( ETCL_Dot *  dot)
virtual
int TAO_Notify_Constraint_Visitor::visit_eval ( ETCL_Eval *  eval)
virtual
int TAO_Notify_Constraint_Visitor::visit_exist ( ETCL_Exist *  exist)
virtual
int TAO_Notify_Constraint_Visitor::visit_identifier ( ETCL_Identifier *  ident)
virtual
int TAO_Notify_Constraint_Visitor::visit_in ( ETCL_Binary_Expr *  binary)
protected
int TAO_Notify_Constraint_Visitor::visit_literal ( ETCL_Literal_Constraint *  literal)
virtual
int TAO_Notify_Constraint_Visitor::visit_or ( ETCL_Binary_Expr *  binary)
protected
int TAO_Notify_Constraint_Visitor::visit_preference ( ETCL_Preference *  )
virtual
int TAO_Notify_Constraint_Visitor::visit_special ( ETCL_Special *  special)
virtual
int TAO_Notify_Constraint_Visitor::visit_twiddle ( ETCL_Binary_Expr *  binary)
protected
int TAO_Notify_Constraint_Visitor::visit_unary_expr ( ETCL_Unary_Expr *  unary_expr)
virtual
int TAO_Notify_Constraint_Visitor::visit_union_pos ( ETCL_Union_Pos *  union_pos)
virtual
int TAO_Notify_Constraint_Visitor::visit_union_value ( ETCL_Union_Value *  union_value)
virtual

Member Data Documentation

CORBA::String_var TAO_Notify_Constraint_Visitor::current_name_
protected

Holder for a string name in the event fields fixed_header, variable_header, or filterable_data.

CORBA::Any_var TAO_Notify_Constraint_Visitor::current_value_
protected

Holder for a value found in the event fields filterable_data, variable_header or remainder_of_body.

CORBA::String_var TAO_Notify_Constraint_Visitor::domain_name_
protected

Storage for string names under the structured event's 'fixed_header' field.

CORBA::String_var TAO_Notify_Constraint_Visitor::event_name_
protected
ACE_Hash_Map_Manager<ACE_CString, CORBA::Any, ACE_Null_Mutex> TAO_Notify_Constraint_Visitor::filterable_data_
protected

Used to lookup names and values in the event's 'filterable_data' field.

const size_t TAO_Notify_Constraint_Visitor::filterable_data_size_ = 31
staticprotected

Size of filterable_data_ hash map.

Todo:
define inline once VC6 support is deprecated.
structured_event_field TAO_Notify_Constraint_Visitor::implicit_id_
protected

Storage for the type of implicit id the component has (if any).

ACE_Hash_Map_Manager<ACE_CString, structured_event_field, ACE_Null_Mutex> TAO_Notify_Constraint_Visitor::implicit_ids_
protected

Lookup table for the implicit ids, to avoid string comparisons in derived visitors.

const size_t TAO_Notify_Constraint_Visitor::implicit_ids_size_ = 27
staticprotected

Size of implicit_ids_ hash map.

Note
A fixed set of 9 keys are stored in this map. In the absence of a minimal perfect hash, ACE's default hash_pjw() and a hash size of 27 ensures each element is hashed to a unique bucket.
Todo:
define inline once VC6 support is deprecated.
ACE_Unbounded_Queue<TAO_ETCL_Literal_Constraint> TAO_Notify_Constraint_Visitor::queue_
protected

The result of a non_boolean operation.

CORBA::Any TAO_Notify_Constraint_Visitor::remainder_of_body_
protected

Storage for the structured_event's 'remainder_of_body' field.

CORBA::String_var TAO_Notify_Constraint_Visitor::type_name_
protected
ACE_Hash_Map_Manager<ACE_CString, CORBA::Any, ACE_Null_Mutex> TAO_Notify_Constraint_Visitor::variable_header_
protected

Used to lookup names and values in the event's 'variable_header' field.

const size_t TAO_Notify_Constraint_Visitor::variable_header_size_ = 31
staticprotected

Size of variable_header_ hash map.

Todo:
define inline once VC6 support is deprecated.

The documentation for this class was generated from the following files: