示例#1
0
        public TdlStruct AddStruct(string identifier)
        {
            if (identifier == "")
            {
                return(null);
            }
            TdlStruct tdlStruct = new TdlStruct(identifier, this);

            _Structs.Add(tdlStruct);
            StructIdentifierLookup.Add(identifier, tdlStruct);
            StructLookup.Add(tdlStruct.ObjectId, tdlStruct);
            Root.AddStruct(tdlStruct);
            return(tdlStruct);
        }
示例#2
0
 public TdlStruct FindStruct(uint objectId)
 {
     if (HasStruct(objectId))
     {
         return(GetStruct(objectId));
     }
     foreach (TdlNamespace tdlNamespace in Namespaces)
     {
         TdlStruct possible = tdlNamespace.FindStruct(objectId);
         if (possible != null)
         {
             return(possible);
         }
     }
     return(null);
 }
示例#3
0
 public TdlStruct FindStruct(string identifier)
 {
     if (HasStruct(identifier))
     {
         return(GetStruct(identifier));
     }
     foreach (TdlNamespace tdlNamespace in Namespaces)
     {
         TdlStruct possible = tdlNamespace.FindStruct(identifier);
         if (possible != null)
         {
             return(possible);
         }
     }
     return(null);
 }
示例#4
0
 internal void AddStruct(TdlStruct tdlStruct)
 {
     _AllObjects.Add(tdlStruct);
     _AllStructs.Add(tdlStruct);
 }