3 //=============================================================================
5 * @file Constraint_Visitor.h
7 * @author Jeff Parsons <j.parsons@vanderbilt.edu>
9 //=============================================================================
11 #ifndef CONSTRAINT_VISITOR_H
12 #define CONSTRAINT_VISITOR_H
14 #include /**/ "ace/pre.h"
16 #include "ace/CDR_Base.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 #if defined (ACE_HAS_MONITOR_FRAMEWORK) && (ACE_HAS_MONITOR_FRAMEWORK == 1)
24 #include "ace/Monitor_Control_Types.h"
26 #include "ace/ETCL/ETCL_Constraint.h"
27 #include "ace/ETCL/ETCL_Constraint_Visitor.h"
29 #include "ace/Monitor_Control/Monitor_Control_export.h"
31 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
33 class ETCL_Literal_Constraint
;
34 class ETCL_Identifier
;
35 class ETCL_Unary_Expr
;
36 class ETCL_Binary_Expr
;
37 class ETCL_Constraint
;
41 namespace Monitor_Control
44 * @class Constraint_Visitor
46 * @brief Backend for the non-CORBA ETCL frontend, specific to
47 * MonitorControl and supporting only basic types not
50 class MONITOR_CONTROL_Export Constraint_Visitor
51 : public ETCL_Constraint_Visitor
54 Constraint_Visitor (const Monitor_Control_Types::Data
& data
);
55 ~Constraint_Visitor () override
= default;
57 ACE_CDR::Boolean
evaluate_constraint (ETCL_Constraint
*root
);
59 int visit_literal (ETCL_Literal_Constraint
*) override
;
60 int visit_identifier (ETCL_Identifier
*) override
;
61 int visit_unary_expr (ETCL_Unary_Expr
*) override
;
62 int visit_binary_expr (ETCL_Binary_Expr
*) override
;
65 /// Sub-methods for visit_binary_expr().
66 int visit_or (ETCL_Binary_Expr
*);
67 int visit_and (ETCL_Binary_Expr
*);
68 int visit_binary_op (ETCL_Binary_Expr
*binary_expr
,
72 const Monitor_Control_Types::Data
& data_
;
73 ACE_Unbounded_Queue
<ETCL_Literal_Constraint
> queue_
;
78 ACE_END_VERSIONED_NAMESPACE_DECL
80 #endif /* ACE_HAS_MONITOR_FRAMEWORK==1 */
82 #include /**/ "ace/post.h"
84 #endif // CONSTRAINT_VISITOR_H