Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / TAO / TAO_IDL / include / ast_annotation_decl.h
blob0ee0fd2eab7ffd5615dd969bc7f3c2990c33bc23
1 /**
2 * Abstract Syntax Tree Node for a declaration of an annotation.
3 */
5 #ifndef AST_ANNOTATION_DECL_HEADER
6 #define AST_ANNOTATION_DECL_HEADER
8 #include "ast_structure.h"
10 /**
11 * Abstract Syntax Tree Node for a declaration of an annotation.
13 class TAO_IDL_FE_Export AST_Annotation_Decl : public virtual AST_Structure
15 public:
17 AST_Annotation_Decl (UTL_ScopedName *name);
19 virtual ~AST_Annotation_Decl ();
21 /// Narrowing
22 ///{
23 DEF_NARROW_FROM_DECL (AST_Annotation_Decl);
24 DEF_NARROW_FROM_SCOPE (AST_Annotation_Decl);
25 ///}
27 /// AST Dumping
28 virtual void dump (ACE_OSTREAM_TYPE &o);
30 /// Cleanup
31 virtual void destroy ();
33 static AST_Decl::NodeType const NT;
35 /**
36 * Work around for AST node lookup, so that annotations do not conflict with
37 * other IDL types and variables that have the same name. This is done by
38 * prepending '@' to all annotation names.
40 ///{
41 static void escape_name (Identifier *name);
42 static void escape_name (UTL_ScopedName *name);
43 ///}
45 virtual bool annotatable () const;
47 virtual AST_Annotation_Member *fe_add_annotation_member (
48 AST_Annotation_Member *annotation_member);
50 virtual AST_Constant *fe_add_constant (AST_Constant *t);
52 virtual int ast_accept (ast_visitor *visitor);
54 /**
55 * Should AMI visit this node? (NO)
57 virtual bool ami_visit ();
60 #endif