Example #1
0
 public DefIterator(NamespaceDefinition nsDef, ClassDefinition surroundingClass, XmlElement elem)
     : base(nsDef, surroundingClass, elem)
 {
 }
 public NonOverridableClassInclProducer(MetaDefinition metaDef, Wrapper wrapper, ClassDefinition t, SourceCodeStringBuilder sb)
     : base(metaDef, wrapper, t, sb)
 {
 }
        //protected List<DefFunction> _protectedFunctions = new List<DefFunction>();

        public NativeProxyClassProducer(MetaDefinition metaDef, Wrapper wrapper, ClassDefinition t, SourceCodeStringBuilder sb)
            : base(metaDef, wrapper, t, sb)
        {
            //SearchProtectedFunctions(_t);
        }
 public IncSubclassingClassProducer(MetaDefinition metaDef, Wrapper wrapper, ClassDefinition t, SourceCodeStringBuilder sb, ClassDefinition[] additionalInterfaces)
     : base(metaDef, wrapper, t, sb)
 {
     this._additionalInterfaces = additionalInterfaces;
 }
 public DefTemplateOneType(NamespaceDefinition nsDef, ClassDefinition surroundingClass, XmlElement elem)
     : base(nsDef, surroundingClass, elem)
 {
 }
 public IncOverridableClassProducer(MetaDefinition metaDef, Wrapper wrapper, ClassDefinition t, SourceCodeStringBuilder sb)
     : base(metaDef, wrapper, t, sb)
 {
     _wrapper.AddPostClassProducer(new NativeProxyClassInclProducer(metaDef, _wrapper, _classDefinition, _codeBuilder));
 }
 public NativeProxyClassInclProducer(MetaDefinition metaDef, Wrapper wrapper, ClassDefinition t, SourceCodeStringBuilder sb)
     : base(metaDef, wrapper, t, sb)
 {
 }
 public CLRHandleClassCppProducer(MetaDefinition metaDef, Wrapper wrapper, ClassDefinition t, SourceCodeStringBuilder sb)
     : base(metaDef, wrapper, t, sb)
 {
 }
Example #9
0
        //public override string GetCLRTypeName(ITypeMember m)
        //{
        //    switch (m.PassedByType)
        //    {
        //        case PassedByType.Reference:
        //            return "Collections::Generic::SortedList<" + TypeMembers[0].CLRTypeName + ", Collections::Generic::List<" + TypeMembers[1].CLRTypeName + ">^>^";
        //        case PassedByType.PointerPointer:
        //        case PassedByType.Value:
        //        case PassedByType.Pointer:
        //        default:
        //            throw new Exception("Unexpected");
        //    }
        //}

        //public override string GetNativeCallConversion(string expr, ITypeMember m)
        //{
        //    switch (m.PassedByType)
        //    {
        //        case PassedByType.Reference:
        //            return "GetSortedListFromMultiMap<" + TypeMembers[0].CLRTypeName + ", " + TypeMembers[1].CLRTypeName + ", " + FullNativeName + ">( " + expr + ")";
        //        case PassedByType.PointerPointer:
        //        case PassedByType.Value:
        //        case PassedByType.Pointer:
        //        default:
        //            throw new Exception("Unexpected");
        //    }
        //}

        public DefStdMultiMap(NamespaceDefinition nsDef, ClassDefinition surroundingClass, XmlElement elem)
            : base(nsDef, surroundingClass, elem)
        {
        }
Example #10
0
        protected virtual void GenerateCodeInterfaceImplementation(ClassDefinition iface)
        {
            _codeBuilder.AppendLine("//------------------------------------------------------------");
            _codeBuilder.AppendLine("// Implementation for " + iface.CLRName);
            _codeBuilder.AppendLine("//------------------------------------------------------------\n");

            foreach (MemberPropertyDefinition ip in iface.GetProperties())
            {
                if (ip.IsStatic)
                {
                    continue;
                }

                if (ip.ProtectionLevel == ProtectionLevel.Public ||
                    (AllowSubclassing && !ip.IsVirtual) ||
                    (AllowProtectedMembers && ip.ProtectionLevel == ProtectionLevel.Protected))
                {
                    if (!ip.IsContainedIn(_classDefinition, true))
                    {
                        GenerateCodeInterfaceProperty(ip);
                        _codeBuilder.Append("\n");
                    }
                }
            }

            foreach (MemberMethodDefinition inf in iface.DeclarableMethods)
            {
                if (inf.IsStatic)
                {
                    continue;
                }

                if (inf.ProtectionLevel == ProtectionLevel.Public ||
                    (AllowSubclassing && !inf.IsVirtual) ||
                    (AllowProtectedMembers && inf.ProtectionLevel == ProtectionLevel.Protected))
                {
                    if (!_classDefinition.ContainsFunctionSignature(inf.Signature, false))
                    {
                        GenerateCodeInterfaceMethod(inf);
                        _codeBuilder.Append("\n");
                    }
                }
            }

            foreach (MemberFieldDefinition field in iface.Fields)
            {
                if (!field.HasAttribute <IgnoreAttribute>())
                {
                    if (field.IsStatic)
                    {
                        continue;
                    }

                    if (field.ProtectionLevel == ProtectionLevel.Public ||
                        AllowSubclassing ||
                        (AllowProtectedMembers && field.ProtectionLevel == ProtectionLevel.Protected))
                    {
                        //if (CheckTypeMemberForGetProperty(field) == false)
                        //    AddInterfaceMethodsForField(field);
                        //else
                        GenerateCodeInterfacePropertyField(field);

                        _codeBuilder.AppendEmptyLine();
                    }
                }
            }
        }
 public NativePtrValueClassCppProducer(MetaDefinition metaDef, Wrapper wrapper, ClassDefinition t, SourceCodeStringBuilder sb)
     : base(metaDef, wrapper, t, sb)
 {
 }
 public NativeProtectedTypesProxy(MetaDefinition metaDef, Wrapper wrapper, ClassDefinition t, SourceCodeStringBuilder sb)
     : base(metaDef, wrapper, t, sb)
 {
 }