GH_IChunk

References
Base interface for all Archive Chunks.

Properties

Archive

#
GH_Archive Archive { get; }
Gets a pointer to the archive that owns the Root of the tree this chunk belongs to.

ArchiveLocation

#
string ArchiveLocation { get; }
Gets a string representing the URI with which the archive is associated. The location may be a null string.

ChunkCount

#
int ChunkCount { get; }
Gets the number of child chunks contained in this chunk. The set of all child chunks is referred to as a 'litter'.

Chunks

#
List<GH_IChunk> Chunks { get; }
Gets a pointer to the internal list of child chunks. Do not access this list unless you know what you are doing.

Index

#
int Index { get; }
Gets the index of this chunk. The index is set by the owner of this chunk. Indices smaller than zero imply no index has been set. The combination of name+index is always unique among a set of chunks in the same litter.

ItemCount

#
int ItemCount { get; }
Gets the number of items contained in this chunk.

Items

#
List<GH_Item> Items { get; }
Gets a pointer to the internal list of items. Do not access this list unless you know what you are doing.

Name

#
string Name { get; }
Gets the name of this chunk. The name is set by the owner of this chunk. Names must be at least 1 character long. The combination of name+index is always unique among a set of chunks in a single litter.

Methods

AddMessage

#
void AddMessage(string m, GH_Message_Type t)
Log a new message with the top-level archive. Messages are collected during read/write operations, and can be displayed to the user upon completion using GH_Archive.ShowMessageLog().
m (string)Message text.
t (GH_Message_Type)Message type.

Read

void Read(BinaryReader reader)
Called when an object is required to deserialize itself.
inherited fromGH_IBinarySupport
reader (BinaryReader)Reader object to be used for deserialization.

Read

void Read(XmlNode node)
Called when an object is required to deserialize itself.
inherited fromGH_IXmlSupport
node (XmlNode)Node object to be used for deserialization.

Write

void Write(BinaryWriter writer)
Called when an object is required to serialize itself.
inherited fromGH_IBinarySupport
writer (BinaryWriter)Writer object to be used for serialization.

Write

void Write(XmlWriter writer)
Called when an object is required to serialize itself.
inherited fromGH_IXmlSupport
writer (XmlWriter)Writer object to be used for serialization.