internal CtfFloatDescriptor(CtfPropertyBag bag) : base(CtfTypes.Float) { Debug.Assert(bag != null); this.Exponent = bag.GetInt("exp_dig"); this.Mantissa = bag.GetInt("mant_dig"); this.align = bag.GetInt("align"); this.ByteOrder = bag.GetByteOrder(); }
internal CtfIntegerDescriptor(CtfPropertyBag bag) : base(CtfTypes.Integer) { Debug.Assert(bag != null); // size is the only required field for an integer this.Size = bag.GetShort("size"); if (this.Size <= 0) { throw new ArgumentException("An integer size must be greater than zero."); } this.SetAlignment(bag); this.SetSigned(bag); this.SetEncoding(bag); this.SetBase(bag); this.ByteOrder = bag.GetByteOrder(); // there is no default for "map", as it is not defined in specification 1.82, but // examples show it referencing a clock name this.Map = bag.GetString("map"); }