Inheritance: XMLNameGroup
        public static void PopulateMethodList(XMLMethods methods, List <CompNamed> method_list)
        {
            foreach (object key in methods.keys.Keys)
            {
                XMLMethods.SignatureFlags signatureFlags = (methods.signatureFlags != null &&
                                                            methods.signatureFlags.ContainsKey(key) ?
                                                            (XMLMethods.SignatureFlags)methods.signatureFlags [key] :
                                                            XMLMethods.SignatureFlags.None);

                XMLParameters parameters = (methods.parameters == null ? null
                                                            : (XMLParameters)methods.parameters[key]);
                XMLGenericParameters genericParameters = (methods.genericParameters == null ? null
                                                                                  : (XMLGenericParameters)methods.genericParameters[key]);
                XMLAttributes attributes = (methods.attributeMap == null ? null
                                                            : (XMLAttributes)methods.attributeMap[key]);
                string returnType = (methods.returnTypes == null ? null
                                                     : (string)methods.returnTypes[key]);
                method_list.Add(new MasterMethod((string)methods.keys[key],
                                                 signatureFlags,
                                                 returnType,
                                                 parameters,
                                                 genericParameters,
                                                 methods.ConvertToString(Int32.Parse((string)methods.access[key])),
                                                 attributes));
            }
        }
        public static List <CompParameter> GetParameters(XMLParameters parameters)
        {
            var list = new List <CompParameter> ();

            foreach (XMLParameter key in parameters.keys.Values)
            {
                list.Add(new MasterParameter(key.Name, key.type, key.isOptional, key.attributes));
            }

            return(list);
        }
 public MasterMethod(string name,
                     XMLMethods.SignatureFlags signatureFlags,
                     string returnType,
                     XMLParameters parameters,
                     XMLGenericParameters genericParameters,
                     string methodAccess,
                     XMLAttributes attributes)
     : base(String.Format("{0} {1}", returnType, name))
 {
     this.signatureFlags    = signatureFlags;
     this.returnType        = returnType;
     this.parameters        = parameters;
     this.genericParameters = genericParameters;
     // we don't care about the Assembly (internal) part
     this.methodAccess = methodAccess.Replace("FamORAssem", "Family");
     this.attributes   = attributes;
 }
Beispiel #4
0
        protected override void LoadExtraData(string name, XmlNode node)
        {
            XmlAttribute xatt = node.Attributes ["returntype"];

            if (xatt != null)
            {
                if (returnTypes == null)
                {
                    returnTypes = new Hashtable();
                }

                returnTypes [name] = xatt.Value;
            }

            SignatureFlags flags = SignatureFlags.None;

            if (((XmlElement)node).GetAttribute("abstract") == "true")
            {
                flags |= SignatureFlags.Abstract;
            }
            if (((XmlElement)node).GetAttribute("static") == "true")
            {
                flags |= SignatureFlags.Static;
            }
            if (((XmlElement)node).GetAttribute("virtual") == "true")
            {
                flags |= SignatureFlags.Virtual;
            }
            if (((XmlElement)node).GetAttribute("final") == "true")
            {
                flags |= SignatureFlags.Final;
            }
            if (flags != SignatureFlags.None)
            {
                if (signatureFlags == null)
                {
                    signatureFlags = new Hashtable();
                }
                signatureFlags [name] = flags;
            }

            XmlNode parametersNode = node.SelectSingleNode("parameters");

            if (parametersNode != null)
            {
                if (parameters == null)
                {
                    parameters = new Hashtable();
                }

                XMLParameters parms = new XMLParameters();
                parms.LoadData(parametersNode);

                parameters[name] = parms;
            }

            XmlNode genericNode = node.SelectSingleNode("generic-parameters");

            if (genericNode != null)
            {
                if (genericParameters == null)
                {
                    genericParameters = new Hashtable();
                }

                XMLGenericParameters gparams = new XMLGenericParameters();
                gparams.LoadData(genericNode);
                genericParameters [name] = gparams;
            }

            base.LoadExtraData(name, node);
        }
        public MasterMethod(string name,
		                     XMLMethods.SignatureFlags signatureFlags,
		                     string returnType,
		                     XMLParameters parameters,
		                     XMLGenericParameters genericParameters,
		                     string methodAccess,
		                     XMLAttributes attributes)
            : base(String.Format ("{0} {1}", returnType, name))
        {
            this.signatureFlags = signatureFlags;
            this.returnType = returnType;
            this.parameters = parameters;
            this.genericParameters = genericParameters;
            // we don't care about the Assembly (internal) part
            this.methodAccess = methodAccess.Replace ("FamORAssem", "Family");
            this.attributes = attributes;
        }
Beispiel #6
0
		protected override void LoadExtraData (string name, XmlNode node)
		{
			XmlAttribute xatt = node.Attributes ["returntype"];
			if (xatt != null) {
				if (returnTypes == null)
					returnTypes = new Hashtable ();

				returnTypes [name] = xatt.Value;
			}

			SignatureFlags flags = SignatureFlags.None;
			if (((XmlElement) node).GetAttribute ("abstract") == "true")
				flags |= SignatureFlags.Abstract;
			if (((XmlElement) node).GetAttribute ("static") == "true")
				flags |= SignatureFlags.Static;
			if (((XmlElement) node).GetAttribute ("virtual") == "true")
				flags |= SignatureFlags.Virtual;
			if (((XmlElement) node).GetAttribute ("final") == "true")
				flags |= SignatureFlags.Final;
			if (flags != SignatureFlags.None) {
				if (signatureFlags == null)
					signatureFlags = new Hashtable ();
				signatureFlags [name] = flags;
			}

			XmlNode parametersNode = node.SelectSingleNode ("parameters");
			if (parametersNode != null) {
				if (parameters == null)
					parameters = new Hashtable ();

				XMLParameters parms = new XMLParameters ();
				parms.LoadData (parametersNode);

				parameters[name] = parms;
			}

			XmlNode genericNode = node.SelectSingleNode ("generic-parameters");
			if (genericNode != null) {
				if (genericParameters == null)
					genericParameters = new Hashtable ();

				XMLGenericParameters gparams = new XMLGenericParameters ();
				gparams.LoadData (genericNode);
				genericParameters [name] = gparams;
			}

			base.LoadExtraData (name, node);
		}
Beispiel #7
0
		public static List<CompParameter> GetParameters (XMLParameters parameters)
		{
			var list = new List<CompParameter> ();
			foreach (XMLParameter key in parameters.keys.Values) {
				list.Add (new MasterParameter (key.Name, key.type, key.isOptional, key.attributes));
			}
			
			return list;
		}