3 //=============================================================================
5 * @file TAO_ETCL_Constraint.h
7 * @author Carlos O'Ryan (coryan@cs.wustl.edu)
8 * @author Jeff Parsons (parsons@cs.wustl.edu)
10 //=============================================================================
12 #ifndef TAO_ETCL_CONSTRAINT_H
13 #define TAO_ETCL_CONSTRAINT_H
15 #include "ace/ETCL/ETCL_Constraint.h"
17 #if !defined (ACE_LACKS_PRAGMA_ONCE)
19 #endif /* ACE_LACKS_PRAGMA_ONCE */
21 #include "tao/AnyTypeCode/Any_Impl.h"
23 #include "tao/ETCL/tao_etcl_export.h"
25 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
27 class ETCL_Constraint_Visitor
;
29 ACE_END_VERSIONED_NAMESPACE_DECL
31 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
39 class TAO_ETCL_Export TAO_ETCL_Literal_Constraint
40 : public ETCL_Literal_Constraint
43 TAO_ETCL_Literal_Constraint ();
45 // = Constructors for each of the various types of literals.
47 explicit TAO_ETCL_Literal_Constraint (CORBA::ULong uinteger
);
48 explicit TAO_ETCL_Literal_Constraint (CORBA::Long integer
);
49 explicit TAO_ETCL_Literal_Constraint (CORBA::Boolean boolean
);
50 explicit TAO_ETCL_Literal_Constraint (CORBA::Double doub
);
51 explicit TAO_ETCL_Literal_Constraint (const char* str
);
52 explicit TAO_ETCL_Literal_Constraint (CORBA::Any
* any
);
55 TAO_ETCL_Literal_Constraint (const TAO_ETCL_Literal_Constraint
& lit
);
56 TAO_ETCL_Literal_Constraint (const ETCL_Literal_Constraint
*lit
);
59 virtual ~TAO_ETCL_Literal_Constraint();
61 /// Assignment operator.
62 void operator= (const TAO_ETCL_Literal_Constraint
& co
);
64 // Conversion routines.
65 operator ACE_CDR::Boolean () const;
66 operator ACE_CDR::ULong () const;
67 operator ACE_CDR::Long () const;
68 operator ACE_CDR::Double () const;
69 operator const char* () const;
70 operator TAO::Any_Impl
* () const;
72 // Return the type represented by this MysteryOperand.
74 // = Arithmetic operators.
76 TAO_ETCL_Literal_Constraint
77 operator+ (const TAO_ETCL_Literal_Constraint
& rhs
);
79 TAO_ETCL_Literal_Constraint
80 operator- (const TAO_ETCL_Literal_Constraint
& rhs
);
82 TAO_ETCL_Literal_Constraint
83 operator* (const TAO_ETCL_Literal_Constraint
& rhs
);
85 TAO_ETCL_Literal_Constraint
86 operator/ (const TAO_ETCL_Literal_Constraint
& rhs
);
89 TAO_ETCL_Literal_Constraint
92 /// Ensure both operands are of the same simple numeric type.
94 widest_type (const ETCL_Literal_Constraint
& rhs
);
96 /// Determine the comparable Expression Type from the CORBA type
98 comparable_type (CORBA::TypeCode_ptr type
);
101 /// Private copy method.
102 void copy (const TAO_ETCL_Literal_Constraint
& co
);
104 /// Possible literal type not covered by the base class.
108 TAO_END_VERSIONED_NAMESPACE_DECL
110 #if defined (__ACE_INLINE__)
111 #include "TAO_ETCL_Constraint.inl"
112 #endif /* __ACE_INLINE__ */
114 #endif /* TAO_ETCL_CONSTRAINT_H */