コード例 #1
0
        public PropertyProxyMetaDataElement(Stream stream)
        {
            PropertyKeys       = new List <MbString>();
            PropertyValueTypes = new List <byte>();
            PropertyValues     = new List <object>();

            var propertyKey = new MbString(stream);

            while (propertyKey.Count > 0)
            {
                PropertyKeys.Add(propertyKey);

                var propertyValueType = StreamUtils.ReadByte(stream);

                PropertyValueTypes.Add(propertyValueType);

                switch (propertyValueType)
                {
                case 1:
                {
                    PropertyValues.Add(new MbString(stream));         // MbString

                    break;
                }

                case 2:
                {
                    PropertyValues.Add(StreamUtils.ReadInt32(stream));         // Int32

                    break;
                }

                case 3:
                {
                    PropertyValues.Add(StreamUtils.ReadFloat(stream));         // Single

                    break;
                }

                case 4:
                {
                    PropertyValues.Add(new Date(stream));         // Date

                    break;
                }

                default:
                {
                    throw new Exception(String.Format("Property Value Type {0} is not recognised.", propertyValueType));
                }
                }

                propertyKey = new MbString(stream);
            }
        }
コード例 #2
0
        public PartitionNodeElement(Stream stream)
            : base(stream)
        {
            PartitionFlags    = StreamUtils.ReadInt32(stream);
            FileName          = new MbString(stream);
            TransformedBBox   = new BBoxF32(stream);
            Area              = StreamUtils.ReadFloat(stream);
            VertexCountRange  = new CountRange(stream);
            NodeCountRange    = new CountRange(stream);
            PolygonCountRange = new CountRange(stream);

            if ((PartitionFlags & 0x00000001) != 0)
            {
                UntransformedBBox = new BBoxF32(stream);
            }
        }
コード例 #3
0
 public StringPropertyAtomElement(Stream stream)
     : base(stream)
 {
     Value = new MbString(stream);
 }
コード例 #4
0
 public StringPropertyAtomElement(MbString value, int objectId) : base(objectId)
 {
     Value = value;
 }