Changes to attempt to silence bcc64x
[ACE_TAO.git] / ACE / ace / Monitor_Control / Constraint_Visitor.h
blob784a0e8b514422cf68245320dafa7a04e78230e1
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file Constraint_Visitor.h
7 * @author Jeff Parsons <j.parsons@vanderbilt.edu>
8 */
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)
19 #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;
39 namespace ACE
41 namespace Monitor_Control
43 /**
44 * @class Constraint_Visitor
46 * @brief Backend for the non-CORBA ETCL frontend, specific to
47 * MonitorControl and supporting only basic types not
48 specific to CORBA.
50 class MONITOR_CONTROL_Export Constraint_Visitor
51 : public ETCL_Constraint_Visitor
53 public:
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;
64 private:
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,
69 int op_type);
71 private:
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