Merge pull request #1815 from sonndinh/get_signal_info
[ACE_TAO.git] / TAO / TAO_IDL / include / ast_template_module.h
blobbfc44bc6f7478a34552f6352c77ea15733e4fb06
1 // This may look like C, but it's really -*- C++ -*-
2 #ifndef AST_TEMPLATE_MODULE_H
3 #define AST_TEMPLATE_MODULE_H
5 #include "ast_module.h"
6 #include "ast_type.h"
8 #include "fe_utils.h"
10 class TAO_IDL_FE_Export AST_Template_Module
11 : public virtual AST_Module,
12 public virtual AST_Type
14 public:
15 AST_Template_Module (UTL_ScopedName *n,
16 FE_Utils::T_PARAMLIST_INFO *template_params);
18 virtual ~AST_Template_Module (void);
20 FE_Utils::T_PARAMLIST_INFO *
21 template_params (void) const;
23 // Checks for errors in the template args of an instantiation.
24 bool match_arg_names (FE_Utils::T_ARGLIST *args);
26 // Checks for errors in the template param refs of an alias.
27 bool match_param_refs (UTL_StrList *refs, UTL_Scope *decl_scope);
29 // Narrowing.
30 DEF_NARROW_FROM_DECL (AST_Template_Module);
31 DEF_NARROW_FROM_SCOPE (AST_Template_Module);
33 // AST Dumping.
34 virtual void dump (ACE_OSTREAM_TYPE &o);
36 // Cleanup function.
37 virtual void destroy (void);
39 // Visiting.
40 virtual int ast_accept (ast_visitor *visitor);
42 // Scope Management Protocol
43 virtual
44 AST_Template_Module_Ref *fe_add_template_module_ref (
45 AST_Template_Module_Ref *m);
47 static AST_Decl::NodeType const NT;
49 protected:
50 FE_Utils::T_PARAMLIST_INFO * template_params_;
52 private:
53 // Match with a template arg.
54 bool match_one_param (FE_Utils::T_Param_Info *param,
55 AST_Decl *d);
57 // Find one of our params by name.
58 FE_Utils::T_Param_Info *find_param (UTL_String *name);
60 // Match a param with an aliased id by type.
61 bool match_param_by_type (FE_Utils::T_Param_Info *param);
64 #endif // AST_TEMPLATE_MODULE_H