示例#1
0
            public SkillState(Dictionary <string, AbstractStoragePool> poolByName, StringPool strings, StringType stringType,
                              Annotation annotationType, List <AbstractStoragePool> types, FileInputStream @in, Mode mode) : base(strings, @in.Path, mode, types, poolByName, stringType, annotationType)
            {
                try {
                    AbstractStoragePool p = null;
                    poolByName.TryGetValue("a", out p);
                    AsField = (null == p) ? (P0)Parser.newPool("a", null, types) : (P0)p;
                    poolByName.TryGetValue("b", out p);
                    BsField = (null == p) ? (P1)Parser.newPool("b", AsField, types) : (P1)p;
                    poolByName.TryGetValue("c", out p);
                    CsField = (null == p) ? (P2)Parser.newPool("c", BsField, types) : (P2)p;
                    poolByName.TryGetValue("d", out p);
                    DsField = (null == p) ? (P3)Parser.newPool("d", BsField, types) : (P3)p;
                    poolByName.TryGetValue("noserializeddata", out p);
                    NoSerializedDatasField = (null == p) ? (P4)Parser.newPool("noserializeddata", null, types) : (P4)p;
                } catch (System.InvalidCastException e) {
                    throw new ParseException(@in, -1, e,
                                             "A super type does not match the specification; see cause for details.");
                }
                foreach (AbstractStoragePool t in types)
                {
                    poolByName[t.Name] = t;
                }

                finalizePools(@in);
                @in.close();
            }
示例#2
0
            /// <summary>
            /// allocate correct pool type and add it to types
            /// </summary>
            internal static AbstractStoragePool newPool(string name, AbstractStoragePool superPool, List <AbstractStoragePool> types)
            {
                try {
                    switch (name)
                    {
                    case "properties":
                        return(superPool = new P0(types.Count));


                    case "system":
                        return(superPool = new P1(types.Count, (P0)superPool));

                    default:
                        if (null == superPool)
                        {
                            return(superPool = new BasePool <SkillObject>(types.Count, name, AbstractStoragePool.noKnownFields, AbstractStoragePool.NoAutoFields));
                        }
                        else
                        {
                            return(superPool = superPool.makeSubPool(types.Count, name));
                        }
                    }
                } finally {
                    types.Add(superPool);
                }
            }
示例#3
0
            public SkillState(Dictionary <string, AbstractStoragePool> poolByName, StringPool strings, StringType stringType,
                              Annotation annotationType, List <AbstractStoragePool> types, FileInputStream @in, Mode mode) : base(strings, @in.Path, mode, types, poolByName, stringType, annotationType)
            {
                try {
                    AbstractStoragePool p = null;
                    poolByName.TryGetValue("testenum", out p);
                    TestEnumsField = (null == p) ? (P0)Parser.newPool("testenum", null, types) : (P0)p;
                    poolByName.TryGetValue("testenum:default", out p);
                    Testenum_defaultsField = (null == p) ? (P1)Parser.newPool("testenum:default", TestEnumsField, types) : (P1)p;
                    poolByName.TryGetValue("testenum:second", out p);
                    Testenum_secondsField = (null == p) ? (P2)Parser.newPool("testenum:second", TestEnumsField, types) : (P2)p;
                    poolByName.TryGetValue("testenum:third", out p);
                    Testenum_thirdsField = (null == p) ? (P3)Parser.newPool("testenum:third", TestEnumsField, types) : (P3)p;
                    poolByName.TryGetValue("testenum:last", out p);
                    Testenum_lastsField = (null == p) ? (P4)Parser.newPool("testenum:last", TestEnumsField, types) : (P4)p;
                } catch (System.InvalidCastException e) {
                    throw new ParseException(@in, -1, e,
                                             "A super type does not match the specification; see cause for details.");
                }
                foreach (AbstractStoragePool t in types)
                {
                    poolByName[t.Name] = t;
                }

                finalizePools(@in);
                @in.close();
            }
示例#4
0
            public SkillState(Dictionary <string, AbstractStoragePool> poolByName, StringPool strings, StringType stringType,
                              Annotation annotationType, List <AbstractStoragePool> types, FileInputStream @in, Mode mode) : base(strings, @in.Path, mode, types, poolByName, stringType, annotationType)
            {
                try {
                    AbstractStoragePool p = null;
                } catch (System.InvalidCastException e) {
                    throw new ParseException(@in, -1, e,
                                             "A super type does not match the specification; see cause for details.");
                }
                foreach (AbstractStoragePool t in types)
                {
                    poolByName[t.Name] = t;
                }

                finalizePools(@in);
                @in.close();
            }
示例#5
0
            /// <summary>
            /// allocate correct pool type and add it to types
            /// </summary>
            internal static AbstractStoragePool newPool(string name, AbstractStoragePool superPool, List <AbstractStoragePool> types)
            {
                try {
                    switch (name)
                    {
                    case "a":
                        return(superPool = new P0(types.Count));


                    case "b":
                        return(superPool = new P1(types.Count, (P0)superPool));


                    case "c":
                        return(superPool = new P2(types.Count, (P1)superPool));


                    case "d":
                        return(superPool = new P3(types.Count, (P1)superPool));


                    case "noserializeddata":
                        return(superPool = new P4(types.Count));

                    default:
                        if (null == superPool)
                        {
                            return(superPool = new BasePool <SkillObject>(types.Count, name, AbstractStoragePool.noKnownFields, AbstractStoragePool.NoAutoFields));
                        }
                        else
                        {
                            return(superPool = superPool.makeSubPool(types.Count, name));
                        }
                    }
                } finally {
                    types.Add(superPool);
                }
            }
示例#6
0
 public NumberBuilder(AbstractStoragePool pool, number.Number instance) : base(pool, instance)
 {
 }
示例#7
0
 public CBuilder(AbstractStoragePool pool, unknown.C instance) : base(pool, instance)
 {
 }
示例#8
0
 public FloatTestBuilder(AbstractStoragePool pool, floats.FloatTest instance) : base(pool, instance)
 {
 }
示例#9
0
 public AgeBuilder(AbstractStoragePool pool, age.Age instance) : base(pool, instance)
 {
 }
示例#10
0
 public Z2200Builder(AbstractStoragePool pool, escaping.Z2200 instance) : base(pool, instance)
 {
 }
示例#11
0
 protected override AbstractStoragePool newPool(string name, AbstractStoragePool superPool, HashSet <TypeRestriction> restrictions)
 {
     return(newPool(name, superPool, types));
 }
示例#12
0
 public ZSystemBuilder(AbstractStoragePool pool, restrictionsCore.ZSystem instance) : base(pool, instance)
 {
 }
示例#13
0
 public NoSerializedDataBuilder(AbstractStoragePool pool, auto.NoSerializedData instance) : base(pool, instance)
 {
 }
示例#14
0
 public ZBooleanBuilder(AbstractStoragePool pool, escaping.ZBoolean instance) : base(pool, instance)
 {
 }
示例#15
0
 public DBuilder(AbstractStoragePool pool, auto.D instance) : base(pool, instance)
 {
 }
示例#16
0
 public CBuilder(AbstractStoragePool pool, subtypes.C instance) : base(pool, instance)
 {
 }
示例#17
0
 public TestBuilder(AbstractStoragePool pool, annotation.Test instance) : base(pool, instance)
 {
 }
示例#18
0
 public DateBuilder(AbstractStoragePool pool, annotation.Date instance) : base(pool, instance)
 {
 }
示例#19
0
 public SomethingElseBuilder(AbstractStoragePool pool, container.SomethingElse instance) : base(pool, instance)
 {
 }
示例#20
0
 public Testenum_thirdBuilder(AbstractStoragePool pool, enums.Testenum_third instance) : base(pool, instance)
 {
 }
示例#21
0
 public PropertiesBuilder(AbstractStoragePool pool, restrictionsCore.Properties instance) : base(pool, instance)
 {
 }
示例#22
0
 internal UnknownSubPool(int poolIndex, string name, AbstractStoragePool superPool) : base(poolIndex, name, superPool, noKnownFields, NoAutoFields)
 {
 }
示例#23
0
 public CustomBuilder(AbstractStoragePool pool, custom.Custom instance) : base(pool, instance)
 {
 }
示例#24
0
 public ContainerBuilder(AbstractStoragePool pool, container.Container instance) : base(pool, instance)
 {
 }
示例#25
0
 public TestEnumBuilder(AbstractStoragePool pool, enums.TestEnum instance) : base(pool, instance)
 {
 }
示例#26
0
 public IntBuilder(AbstractStoragePool pool, escaping.Int instance) : base(pool, instance)
 {
 }
示例#27
0
 public Testenum_lastBuilder(AbstractStoragePool pool, enums.Testenum_last instance) : base(pool, instance)
 {
 }
示例#28
0
 public ConstantBuilder(AbstractStoragePool pool, constants.Constant instance) : base(pool, instance)
 {
 }
示例#29
0
 public UnicodeBuilder(AbstractStoragePool pool, unicode.Unicode instance) : base(pool, instance)
 {
 }
示例#30
0
 public NodeBuilder(AbstractStoragePool pool, graph.Node instance) : base(pool, instance)
 {
 }