Exemple #1
0
        public Part LookupType(string Namespace, string type)
        {
            TypeDB tdb = namespaces [Namespace] as TypeDB;

            Console.WriteLine("lookup namespace: {0} type: {1}", Namespace, type);
            if (tdb != null)
            {
                TypeRecord tr = tdb [type];
                if (tr != null)
                {
                    return(tr.part);
                }
            }

            return(null);
        }
Exemple #2
0
        public Part LookupMember(string Namespace, string type, string member)
        {
            TypeDB tdb = namespaces [Namespace] as TypeDB;

            Console.WriteLine("lookup {0}.{1}.{2}", Namespace, type, member);
            if (tdb != null)
            {
                TypeRecord tr = tdb [type];
                if (tr != null)
                {
                    return(tr.MemberDB [member]);
                }
            }

            return(null);
        }
Exemple #3
0
        public void AddType(string Namespace, string type, Part part)
        {
            TypeDB tdb = this [Namespace] as TypeDB;

            Console.WriteLine("add type namespace: {0} type: {1}", Namespace, type);
            if (tdb == null)
            {
                tdb = this [Namespace] = new TypeDB();
            }
            TypeRecord tr = tdb [type];

            if (tr == null)
            {
                tdb [type] = new TypeRecord(type, part);
            }
            else
            {
                tr.part = part;
            }
        }
Exemple #4
0
        public void AddMember(string Namespace, string type, string member, Part part)
        {
            TypeDB tdb = this [Namespace] as TypeDB;

            Console.WriteLine("add {0}.{1}.{2}", Namespace, type, member);
            if (tdb == null)
            {
                tdb = this [Namespace] = new TypeDB();
            }
            TypeRecord tr = tdb [type];

            if (tr == null)
            {
                tr = tdb [type] = new TypeRecord(type);
                types++;
            }
            if (tr.MemberDB [member] == null)
            {
                members++;
            }
            tr.MemberDB [member] = part;
        }
Exemple #5
0
		public void AddType (string Namespace, string type, Part part)
		{
			TypeDB tdb = this [Namespace] as TypeDB;

			Console.WriteLine ("add type namespace: {0} type: {1}", Namespace, type);
			if (tdb == null)
				tdb = this [Namespace] = new TypeDB ();
			TypeRecord tr = tdb [type];
			if (tr == null)
				tdb [type] = new TypeRecord (type, part);
			else
				tr.part = part;
		}
Exemple #6
0
		public void AddMember (string Namespace, string type, string member, Part part)
		{
			TypeDB tdb = this [Namespace] as TypeDB;

			Console.WriteLine ("add {0}.{1}.{2}", Namespace, type, member);
			if (tdb == null)
				tdb = this [Namespace] = new TypeDB ();
			TypeRecord tr = tdb [type];
			if (tr == null) {
				tr = tdb [type] = new TypeRecord (type);
				types ++;
			}
			if (tr.MemberDB [member] == null)
				members ++;
			tr.MemberDB [member] = part;
		}