diff options
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/Notify/Constraint_Interpreter.h')
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Notify/Constraint_Interpreter.h | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Constraint_Interpreter.h b/TAO/orbsvcs/orbsvcs/Notify/Constraint_Interpreter.h new file mode 100644 index 00000000000..b98724728c7 --- /dev/null +++ b/TAO/orbsvcs/orbsvcs/Notify/Constraint_Interpreter.h @@ -0,0 +1,62 @@ +/* -*- C++ -*- */ +//============================================================================= +/** + * @file NS_Constraint_Interpreter.h + * + * $Id$ + * + * + * + * + * @author Pradeep Gore <pradeep@cs.wustl.edu> + */ +//============================================================================= + + +#ifndef TAO_NOTIFY_CONSTRAINT_INTERPRETER_H +#define TAO_NOTIFY_CONSTRAINT_INTERPRETER_H + +#include "ace/pre.h" +#include "orbsvcs/ETCL/ETCL_Interpreter.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "orbsvcs/ETCL/ETCL_Constraint.h" +#include "orbsvcs/CosNotifyFilterC.h" +#include "etcl_notify_filtering_export.h" + +class TAO_NS_Constraint_Visitor; + +/** + * @class TAO_NS_Constraint_Interpreter + * + * @brief "ETCL" Interpreter for the Notify queries. + */ +class ETCL_Notify_Filtering_Export TAO_NS_Constraint_Interpreter : public TAO_ETCL_Interpreter +{ +public: + // = Initialization and termination methods. + TAO_NS_Constraint_Interpreter (void); + + /// Destructor + ~TAO_NS_Constraint_Interpreter (void); + + /** + * This method builds an expression tree representing the + * constraint specified in <constraints>, and throws an Illegal + * Constraint exception if the constraint given has syntax errors or + * semantic errors, such as mismatched types. + */ + void build_tree (const char* constraints + ACE_ENV_ARG_DECL) + ACE_THROW_SPEC ((CosNotifyFilter::InvalidConstraint, + CORBA::NO_MEMORY)); + + /// Returns true if the constraint is evaluated successfully by + /// the evaluator. + CORBA::Boolean evaluate (TAO_NS_Constraint_Visitor &evaluator); +}; +#include "ace/post.h" +#endif /* TAO_NOTIFY_CONSTRAINT_INTERPRETER_H */ |