Exemple #1
0
 public unsafe VarTemplate(DeclarationContext owningDeclarationContext, CppSharp.Parser.AST.VarTemplate varTemplate) : base(owningDeclarationContext, varTemplate)
 {
     this.varTemplate = varTemplate;
     this.varTemplate.AssertNotNullAndOfType <CppSharp.Parser.AST.VarTemplate>();
 }
Exemple #2
0
 public unsafe TemplateTemplateParameter(DeclarationContext owningDeclarationContext, CppSharp.Parser.AST.TemplateTemplateParameter templateTemplateParameter) : base(owningDeclarationContext, templateTemplateParameter)
 {
     this.templateTemplateParameter = templateTemplateParameter;
     this.templateTemplateParameter.AssertNotNullAndOfType <CppSharp.Parser.AST.TemplateTemplateParameter>();
 }
 public unsafe TypeAliasTemplate(DeclarationContext owningDeclarationContext, CppSharp.Parser.AST.TypeAliasTemplate typeAliasTemplate) : base(owningDeclarationContext, typeAliasTemplate)
 {
     this.typeAliasTemplate = typeAliasTemplate;
     this.typeAliasTemplate.AssertNotNullAndOfType <CppSharp.Parser.AST.TypeAliasTemplate>();
 }
Exemple #4
0
 public unsafe ClassTemplate(DeclarationContext owningDeclarationContext, CppSharp.Parser.AST.ClassTemplate classTemplate) : base(owningDeclarationContext, classTemplate)
 {
     this.classTemplate = classTemplate;
     this.classTemplate.AssertNotNullAndOfType <CppSharp.Parser.AST.ClassTemplate>();
 }
Exemple #5
0
        public static Template GetRealTemplateInternal(this CppSharp.Parser.AST.Template template, DeclarationContext owningDeclarationContext)
        {
            var realTemplate = template.GetRealTemplate();

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

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

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

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

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

            default:
                Debugger.Break();
                return(null);
            }
        }
 public unsafe FunctionTemplate(DeclarationContext owningDeclarationContext, CppSharp.Parser.AST.FunctionTemplate functionTemplate) : base(owningDeclarationContext, functionTemplate)
 {
     this.functionTemplate = functionTemplate;
     this.functionTemplate.AssertNotNullAndOfType <CppSharp.Parser.AST.FunctionTemplate>();
 }