Merge pull request #2303 from jwillemsen/jwi-803
[ACE_TAO.git] / TAO / TAO_IDL / include / ast_annotation_decl.h
blob184d2aab6c8a4ba5f66b94c74ad62121798b67e6
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:
16 AST_Annotation_Decl (UTL_ScopedName *name);
18 virtual ~AST_Annotation_Decl ();
20 /// AST Dumping
21 virtual void dump (ACE_OSTREAM_TYPE &o);
23 /// Cleanup
24 virtual void destroy ();
26 static AST_Decl::NodeType const NT;
28 /**
29 * Work around for AST node lookup, so that annotations do not conflict with
30 * other IDL types and variables that have the same name. This is done by
31 * prepending '@' to all annotation names.
33 ///{
34 static void escape_name (Identifier *name);
35 static void escape_name (UTL_ScopedName *name);
36 ///}
38 virtual bool annotatable () const;
40 virtual AST_Annotation_Member *fe_add_annotation_member (
41 AST_Annotation_Member *annotation_member);
43 virtual AST_Constant *fe_add_constant (AST_Constant *t);
45 virtual int ast_accept (ast_visitor *visitor);
47 /**
48 * Should AMI visit this node? (NO)
50 virtual bool ami_visit ();
53 #endif