예제 #1
0
        public static Template GetRealTemplateInternal(this CppSharp.Parser.AST.Template template)
        {
            var realTemplate = template.GetRealTemplate();

            switch (template.Kind)
            {
            case CppSharp.Parser.AST.DeclarationKind.TemplateTemplateParm:
                return(new TemplateTemplateParameter((CppSharp.Parser.AST.TemplateTemplateParameter)realTemplate));

            case CppSharp.Parser.AST.DeclarationKind.TypeAliasTemplate:
                return(new TypeAliasTemplate((CppSharp.Parser.AST.TypeAliasTemplate)realTemplate));

            case CppSharp.Parser.AST.DeclarationKind.ClassTemplate:
                return(new ClassTemplate((CppSharp.Parser.AST.ClassTemplate)realTemplate));

            case CppSharp.Parser.AST.DeclarationKind.FunctionTemplate:
                return(new FunctionTemplate((CppSharp.Parser.AST.FunctionTemplate)realTemplate));

            case CppSharp.Parser.AST.DeclarationKind.VarTemplate:
                return(new VarTemplate((CppSharp.Parser.AST.VarTemplate)realTemplate));

            default:
                Debugger.Break();
                return(null);
            }
        }
예제 #2
0
 public unsafe Template(CppSharp.Parser.AST.Template template) : base(template)
 {
     this.template = template;
     this.template.AssertNotNull();
 }
예제 #3
0
 public unsafe Template(Declaration owningDeclaration, CppSharp.Parser.AST.Template template) : base(owningDeclaration, template)
 {
     this.template = template;
 }