Exemplo n.º 1
0
        private static NamedElement GetNamedElement(XmlNode node)
        {
            Element element = GetElement(node);
            string  name    = Xml.GetName(node) ?? Xml.GetDeclname(node);

            return(new NamedElement(name, element.Type, element.TypeInfo, element.IsConstant, element.IsRawPointer, element.IsReference, element.IsSharedPointer, element.IsUniquePointer));
        }
Exemplo n.º 2
0
        private static void ProcessFunction(ApiContainer apiContainer, XmlNode memberNode, string namespaceName, bool isClassMember)
        {
            List <NamedElement> parameters = new List <NamedElement>();

            foreach (XmlNode parameterNode in memberNode.SelectNodes(Xml.Param))
            {
                parameters.Add(GetNamedElement(parameterNode));
            }

            Element returnType    = GetElement(memberNode);
            string  name          = Xml.GetName(memberNode);
            bool    isConstructor = apiContainer is Class classDefinition && classDefinition.Name == name;

            apiContainer.Functions.Add(new Function(Xml.GetId(memberNode), namespaceName, name, returnType, Xml.GetIsConstant(memberNode), isConstructor, Xml.GetIsStatic(memberNode), isClassMember, parameters.AsReadOnly()));
        }