Recurity.Swf.TagHandler.PlaceObject2.ParsePlaceObject2Flags C# (CSharp) Method

ParsePlaceObject2Flags() protected method

protected ParsePlaceObject2Flags ( ) : void
return void
        protected void ParsePlaceObject2Flags()
        {
            BitStream bits = new BitStream(_dataStream);

            _PlaceFlagHasClipActions = (0 != bits.GetBits(1));
            _PlaceFlagHasClipDepth = (0 != bits.GetBits(1));
            _PlaceFlagHasName = (0 != bits.GetBits(1));
            _PlaceFlagHasRatio = (0 != bits.GetBits(1));
            _PlaceFlagHasColorTransform = (0 != bits.GetBits(1));
            _PlaceFlagHasMatrix = (0 != bits.GetBits(1));
            _PlaceFlagHasCharacter = (0 != bits.GetBits(1));
            _PlaceFlagMove = (0 != bits.GetBits(1));

            if (!(_PlaceFlagMove || _PlaceFlagHasCharacter))
            {
                SwfFormatException e = new SwfFormatException("Object is neither a creation (PlaceFlagHasCharacter) nor an update (PlaceFlagMove).");
                Log.Error(this, e.Message);
                throw e;
            }

            // Flag only exists for Swf5 and later
            if (_PlaceFlagHasClipActions && (this.Version < 5))
            {
                SwfFormatException e = new SwfFormatException("PlaceFlagHasClipActions in Swf Version " + this.Version.ToString());
                Log.Error(this, e);
                throw e;
            }
        }