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"
10 class TAO_IDL_FE_Export AST_Template_Module
11 : public virtual AST_Module
,
12 public virtual AST_Type
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
);
30 DEF_NARROW_FROM_DECL (AST_Template_Module
);
31 DEF_NARROW_FROM_SCOPE (AST_Template_Module
);
34 virtual void dump (ACE_OSTREAM_TYPE
&o
);
37 virtual void destroy (void);
40 virtual int ast_accept (ast_visitor
*visitor
);
42 // Scope Management Protocol
44 AST_Template_Module_Ref
*fe_add_template_module_ref (
45 AST_Template_Module_Ref
*m
);
47 static AST_Decl::NodeType
const NT
;
50 FE_Utils::T_PARAMLIST_INFO
* template_params_
;
53 // Match with a template arg.
54 bool match_one_param (FE_Utils::T_Param_Info
*param
,
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