/// <summary>
        /// Constructs a <b>PofExtractor</b> based on a POF navigator
        /// and the entry extraction target.
        /// </summary>
        /// <param name="type">
        /// The required type of the extracted value or <c>null</c> if the
        /// type is to be inferred from the serialized state.
        /// </param>
        /// <param name="navigator">
        /// POF navigator.
        /// </param>
        /// <param name="target">
        /// One of the <see cref="AbstractExtractor.VALUE"/>
        /// or <see cref="AbstractExtractor.KEY"/> values.
        /// </param>
        public PofExtractor(Type type, IPofNavigator navigator, int target)
        {
            if (navigator == null)
            {
                throw new ArgumentNullException("navigator");
            }

            m_type      = type;
            m_navigator = navigator;
            m_target    = target;
            if (type == null)
            {
                m_typeId = PofConstants.T_UNKNOWN;
            }
        }
        /// <summary>
        /// Save the contents of a POF user type instance by writing its
        /// state using the specified <see cref="IPofWriter"/> object.
        /// </summary>
        /// <param name="writer">
        /// The <b>IPofWriter</b> to which to write the object's state.
        /// </param>
        /// <exception cref="IOException">
        /// If an I/O error occurs.
        /// </exception>
        public void WriteExternal(IPofWriter writer)
        {
            IPofNavigator navigator = m_navigator;

            if (navigator == null)
            {
                throw new SerializationException(
                          "PofExtractor was constructed without a navigator");
            }
            writer.WriteInt32(0, m_target);
            writer.WriteObject(1, navigator);

            // see note in readExternal regarding T_UNKNOWN offset
            writer.WriteInt64(2, (long)GetPofTypeId(writer.PofContext) -
                              (long)PofConstants.T_UNKNOWN);
        }
 /// <summary>
 /// Constructs a <b>PofUpdater</b> based on a POF navigator.
 /// </summary>
 /// <param name="navigator">
 /// POF navigator.
 /// </param>
 public PofUpdater(IPofNavigator navigator)
 {
     m_navigator = navigator;
 }
 /// <summary>
 /// Constructs a <b>PofExtractor</b> based on a POF navigator.
 /// </summary>
 /// <param name="type">
 /// The required type of the extracted value or <c>null</c> if the
 /// type is to be inferred from the serialized state.
 /// </param>
 /// <param name="navigator">
 /// POF navigator.
 /// </param>
 public PofExtractor(Type type, IPofNavigator navigator)
     : this(type, navigator, VALUE)
 {
 }