Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / TAO / TAO_IDL / include / ast_annotation_member.h
blob883512bb053957cf93bc184b3505a3c6397f7ed4
1 /**
2 * Abstract Syntax Tree Node for a Member Value of an Annotation
3 */
5 #ifndef AST_ANNOTATION_MEMBER_HEADER
6 #define AST_ANNOTATION_MEMBER_HEADER
8 #include "ast_field.h"
9 #include "ast_expression.h"
11 class AST_Expression;
13 /**
14 * Abstract Syntax Tree Node for a Member Value of an Annotation
16 class TAO_IDL_FE_Export AST_Annotation_Member : public virtual AST_Field
18 public:
19 AST_Annotation_Member (
20 AST_Expression::ExprType expr_type,
21 AST_Type *type, UTL_ScopedName *name);
23 AST_Annotation_Member (
24 AST_Decl::NodeType nt,
25 AST_Expression::ExprType expr_type,
26 AST_Type *type, UTL_ScopedName *name);
28 /// Pseudo-Copy Constructor for Creating Annotation Applications
29 AST_Annotation_Member (
30 UTL_ScopedName *name,
31 AST_Annotation_Member *other);
33 virtual ~AST_Annotation_Member ();
35 static AST_Decl::NodeType const NT;
37 /// Cleanup
38 virtual void destroy ();
40 /// AST Dumping
41 virtual void dump (ACE_OSTREAM_TYPE &o);
43 /// Get and Set the Value
44 ///{
45 AST_Expression *value ();
46 void value (AST_Expression *value);
47 ///}
49 /// Get the ExprType
50 AST_Expression::ExprType expr_type ();
52 /// Returns true if the expression value is null or invalid
53 bool invalid_value ();
55 private:
56 /// Keep ExprType at hand for convience
57 AST_Expression::ExprType expr_type_;
59 /// Value of the Member, can be null
60 AST_Expression *value_;
63 #endif