Click or drag to resize

PhysicalParser Class

Represents a parser which parses the physical structure of a PQDIF file.
Inheritance Hierarchy
SystemObject
  GSF.PQDIF.PhysicalPhysicalParser

Namespace: GSF.PQDIF.Physical
Assembly: GSF.PQDIF (in GSF.PQDIF.dll) Version: 2.4.181-beta
Syntax
public class PhysicalParser : IDisposable
View Source

The PhysicalParser type exposes the following members.

Constructors
 NameDescription
Public methodPhysicalParser(String) Creates a new instance of the PhysicalParser class.
Public methodPhysicalParser(Stream, Boolean) Creates a new instance of the PhysicalParser class.
Top
Properties
 NameDescription
Public propertyCompressionAlgorithm Gets or sets the compression algorithm used by the PQDIF file.
Public propertyCompressionStyle Gets or sets the compression style used by the PQDIF file.
Public propertyExceptionList Gets all the exceptions encountered while parsing.
Public propertyFileNameObsolete.
Gets or sets the file path (not just the name) of the PQDIF file to be parsed. Obsolete in favor of FilePath.
Public propertyFilePath Gets or sets the file path of the PQDIF file to be parsed.
Public propertyMaximumExceptionsAllowed Gets or sets the maximum number of exceptions in the exception list before parser will quit.
Public propertyMaximumExceptionsReached Gets a value that indicates whether the maximum number of exceptions has been reached.
Top
Methods
 NameDescription
Public methodClose Closes the PQDIF file.
Public methodDispose Releases all resources held by this parser.
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodHasNextRecord Returns true if this parser has not reached the end of the PQDIF file.
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Public methodNextRecord Reads the next record from the PQDIF file.
Public methodOpen Opens the PQDIF file.
Public methodOpen(Stream, Boolean) Opens a PQDIF file from a stream of data.
Public methodReset Sets the parser back to the beginning of the file.
Public methodSeek Jumps in the file to the location of the record with the given header.
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Top
Extension Methods
 NameDescription
Public Extension MethodGetEnumValueOrDefault Gets the enumeration constant for value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Public Extension MethodGetEnumValueOrDefaultT Gets the enumeration constant for this value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Top
Remarks

This class is used internally by the LogicalParser to read the physical structure of the PQDIF file. If your goal is to read data from a PQD file into an application, you probably do not want to instantiate the physical parser directly. Instead, the logical parser will apply the rules governing the logical structure of the PQDIF file to make the data more readily usable by an application that will be processing that data.

The following example of usage was adapted from the PQDIFDump utility, which represents a bare minimum level of effort to read an uncompressed PQDIF file and display its contents in a console application.

C#
string fileName = args[0];

using (PhysicalParser parser = new PhysicalParser(fileName))
{
    parser.Open();

    while (parser.HasNextRecord())
    {
        Record record = parser.NextRecord();
        Console.WriteLine(record);
        Console.WriteLine();
    }
}
See Also