Beispiel #1
0
        public override void Add(TLDefinition tld, Stream srcStm)
        {
            SwiftName        className  = ClassInventory.ToClassName(tld);
            SwiftClassName   formalName = ClassInventory.ToFormalClassName(tld);
            ProtocolContents contents   = null;

            if (!values.TryGetValue(className, out contents))
            {
                contents = new ProtocolContents(formalName, sizeofMachinePointer);
                values.Add(className, contents);
            }
            contents.Add(tld, srcStm);
        }
Beispiel #2
0
 public ModuleContents(SwiftName name, int sizeofMachinePointer)
 {
     Name                      = Ex.ThrowOnNull(name, nameof(name));
     Classes                   = new ClassInventory(sizeofMachinePointer);
     Functions                 = new FunctionInventory(sizeofMachinePointer);
     Variables                 = new VariableInventory(sizeofMachinePointer);
     WitnessTables             = new WitnessInventory(sizeofMachinePointer);
     Protocols                 = new ProtocolInventory(sizeofMachinePointer);
     Extensions                = new FunctionInventory(sizeofMachinePointer);
     MetadataFieldDescriptor   = new List <TLMetadataDescriptor> ();
     MetadataBuiltInDescriptor = new List <TLMetadataDescriptor> ();
     PropertyDescriptors       = new VariableInventory(sizeofMachinePointer);
     ExtensionDescriptors      = new List <TLPropertyDescriptor> ();
 }