Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / TAO / TAO_IDL / include / ast_template_module.h
bloba03e55e14c7681ad60453388d7a9f128fc9d28da
1 #ifndef AST_TEMPLATE_MODULE_H
2 #define AST_TEMPLATE_MODULE_H
4 #include "ast_module.h"
5 #include "ast_type.h"
7 #include "fe_utils.h"
9 class TAO_IDL_FE_Export AST_Template_Module
10 : public virtual AST_Module,
11 public virtual AST_Type
13 public:
14 AST_Template_Module (UTL_ScopedName *n,
15 FE_Utils::T_PARAMLIST_INFO *template_params);
17 virtual ~AST_Template_Module ();
19 FE_Utils::T_PARAMLIST_INFO *
20 template_params () const;
22 // Checks for errors in the template args of an instantiation.
23 bool match_arg_names (FE_Utils::T_ARGLIST *args);
25 // Checks for errors in the template param refs of an alias.
26 bool match_param_refs (UTL_StrList *refs, UTL_Scope *decl_scope);
28 // AST Dumping.
29 virtual void dump (ACE_OSTREAM_TYPE &o);
31 // Cleanup function.
32 virtual void destroy ();
34 // Visiting.
35 virtual int ast_accept (ast_visitor *visitor);
37 // Scope Management Protocol
38 virtual
39 AST_Template_Module_Ref *fe_add_template_module_ref (
40 AST_Template_Module_Ref *m);
42 static AST_Decl::NodeType const NT;
44 protected:
45 FE_Utils::T_PARAMLIST_INFO * template_params_;
47 private:
48 // Match with a template arg.
49 bool match_one_param (FE_Utils::T_Param_Info *param,
50 AST_Decl *d);
52 // Find one of our params by name.
53 FE_Utils::T_Param_Info *find_param (UTL_String *name);
55 // Match a param with an aliased id by type.
56 bool match_param_by_type (FE_Utils::T_Param_Info *param);
59 #endif // AST_TEMPLATE_MODULE_H