C# 클래스 Axiom.Serialization.StreamSerializer

Utility class providing helper methods for reading / writing structured data held in a Stream.
The structure of a file read / written by this class is a series of 'chunks'. A chunk-based format has the advantage of being extensible later, and it's robust, in that a reader can skip chunks that they are not able (or willing) to process. Chunks are contained serially in the file, but they can also be nested in order both to provide context, and to group chunks together for potential skipping. The data format of a chunk is as follows: -# Chunk ID (32-bit uint). This can be any number unique in a context, except the numbers 0x0000, 0x0001 and 0x1000, which are reserved for Ogre's use -# Chunk version (16-bit uint). Chunks can change over time so this version number reflects that -# Length (32-bit uint). The length of the chunk data section, including nested chunks. Note that this length excludes this header, but includes the header of any nested chunks. -# Checksum (32-bit uint). Checksum value generated from the above - basically lets us check this is a valid chunk. -# Chunk data The 'Chunk data' section will contain chunk-specific data, which may include other nested chunks.
상속: DisposableObject
파일 보기 프로젝트 열기: mono-soc-2011/axiom 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
mChunkStack Deque
mCurrentOffset int
mEndian Endian
mFlipEndian bool
mReadWriteHeader bool
mRealFormat RealStorageFormat
mStream Stream

공개 메소드들

메소드 설명
StreamSerializer ( Stream stream ) : System

Default constructor.

StreamSerializer ( Stream stream, Endian endianMode ) : System

Constructor.

StreamSerializer ( Stream stream, Endian endianMode, bool autoHeader ) : System

Constructor.

메소드 상세

StreamSerializer() 공개 메소드

Default constructor.
public StreamSerializer ( Stream stream ) : System
stream Stream The stream on which you will read / write data.
리턴 System

StreamSerializer() 공개 메소드

Constructor.
public StreamSerializer ( Stream stream, Endian endianMode ) : System
stream Stream The stream on which you will read / write data.
endianMode Endian If true, the first write or read to this stream will /// automatically read / write the header too. This is required if you /// set endianMode to Endian.Auto, but if you manually set the endian mode, /// then you can skip writing / reading the header if you wish, if for example /// this stream is midway through a file which has already included header /// information.
리턴 System

StreamSerializer() 공개 메소드

Constructor.
public StreamSerializer ( Stream stream, Endian endianMode, bool autoHeader ) : System
stream Stream The stream on which you will read / write data.
endianMode Endian If true, the first write or read to this stream will /// automatically read / write the header too. This is required if you /// set endianMode to Endian.Auto, but if you manually set the endian mode, /// then you can skip writing / reading the header if you wish, if for example /// this stream is midway through a file which has already included header /// information.
autoHeader bool If true, the first write or read to this stream will /// automatically read / write the header too. This is required if you /// set endianMode to Endian.Auto, but if you manually set the endian mode, /// then you can skip writing / reading the header if you wish, if for example /// this stream is midway through a file which has already included header /// information.
리턴 System

프로퍼티 상세

mChunkStack 보호되어 있는 프로퍼티

protected Deque mChunkStack
리턴 Deque

mCurrentOffset 보호되어 있는 프로퍼티

protected int mCurrentOffset
리턴 int

mEndian 보호되어 있는 프로퍼티

protected Endian mEndian
리턴 Endian

mFlipEndian 보호되어 있는 프로퍼티

protected bool mFlipEndian
리턴 bool

mReadWriteHeader 보호되어 있는 프로퍼티

protected bool mReadWriteHeader
리턴 bool

mRealFormat 보호되어 있는 프로퍼티

protected RealStorageFormat mRealFormat
리턴 RealStorageFormat

mStream 보호되어 있는 프로퍼티

protected Stream mStream
리턴 Stream