public static void GenerateNativeConstructorsByValue(
            this CSharpSources gen, Class @class)
        {
            var printedClass = @class.Visit(gen.TypePrinter);

            if (@class.IsDependent)
            {
                foreach (var specialization in @class.GetSpecializationsToGenerate().Where(s => !s.Ignore))
                {
                    gen.GenerateNativeConstructorByValue(specialization, printedClass.Type);
                }
            }
            else
            {
                gen.GenerateNativeConstructorByValue(@class, printedClass.Type);
            }
        }
예제 #2
0
        public static void GenerateNativeConstructorsByValue(
            this CSharpSources gen, Class @class)
        {
            var printedClass = @class.Visit(gen.TypePrinter);

            if (@class.IsDependent)
            {
                foreach (var specialization in (from s in @class.GetSpecializedClassesToGenerate()
                                                where s.IsGenerated
                                                select s).KeepSingleAllPointersSpecialization())
                {
                    gen.GenerateNativeConstructorByValue(specialization, printedClass);
                }
            }
            else
            {
                gen.GenerateNativeConstructorByValue(@class, printedClass);
            }
        }
예제 #3
0
        public static void GenerateNativeConstructorsByValue(
            this CSharpSources gen, Class @class)
        {
            var printedClass = @class.Visit(gen.TypePrinter);

            if (@class.IsDependent)
            {
                IEnumerable <Class> specializations =
                    @class.GetSpecializedClassesToGenerate().Where(s => s.IsGenerated);
                if (@class.IsTemplate)
                {
                    specializations = specializations.KeepSingleAllPointersSpecialization();
                }
                foreach (var specialization in specializations)
                {
                    gen.GenerateNativeConstructorByValue(specialization, printedClass);
                }
            }
            else
            {
                gen.GenerateNativeConstructorByValue(@class, printedClass);
            }
        }