GH_IWriter

References
public interface GH_IWriter : GH_IChunk
Provides access to a subset of GH_Chunk methods used for writing archives.

Properties

Archive

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

ArchiveLocation

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

ChunkCount

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

Chunks

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

Index

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.
int Index { get; }
inherited fromGH_IChunk

ItemCount

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

Items

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

Name

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.
string Name { get; }
inherited fromGH_IChunk

Methods

AddComment

#
Adds a text comment to this chunk. Comments are serialized only if the output flavour is a human readable format. Comments are never deserialized, they are purely for the benefit of the humans reading the file data.
void AddComment(
comment_text
The content of the comment, text might be altered if it contains invalid characters for a chosen format flavour.
)
ArgumentNullExceptionThrown if the content text is either null or empty.

AddMessage

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().
void AddMessage(
m,
Message text.
t
Message type.
)
inherited fromGH_IChunk

CreateChunk

#
Create a new child chunk with the specified name and index qualifier. If another chunk already exists with similar properties, an exception will be thrown.
GH_IWriter CreateChunk(
chunk_name,
Name of new child.
chunk_index
Index of new child.
)
ArgumentExceptionThrown if the name+index coordinte is already occupied by another chunk.

CreateChunk

#
Create a new child chunk with the specified name but without an index qualifier. If another chunk already exists with similar properties, an exception will be thrown.
GH_IWriter CreateChunk(
chunk_name
Name of new child chunk.
)
ArgumentExceptionThrown if the name coordinte is already occupied by another chunk.

Read

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

Read

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

RemoveChunk

#
Remove the specified chunk from the litter.
bool RemoveChunk(
chunk
Chunk to remove.
)
True is chunk was removed, false if chunk is not part of this litter.
ArgumentNullExceptionThrown if chunk is a null reference.

RemoveChunk

#
Remove the first chunk with a matching name and index. Only chunks with index qualifiers are considered. Name comparisons are not case-sensitive.
bool RemoveChunk(
chunk_name,
Name of chunk to remove.
chunk_index
Index of chunk to remove.
)
True is chunk was removed, false if no matching chunk could be found.

RemoveChunk

#
Remove the first chunk with a matching name. Only chunks without index qualifiers are considered. Name comparisons are not case-sensitive.
bool RemoveChunk(
chunk_name
Name of chunk to remove.
)
True is chunk was removed, false if no matching chunk could be found.

RemoveItem

#
Remove an indexed item from this chunk.
bool RemoveItem(
itemName,
Name of item.
itemIndex
Index of item.
)
True on success, false on failure.

RemoveItem

#
Remove an unindexed item from this chunk.
bool RemoveItem(
itemName
Name of item.
)
True on success, false on failure.

SetBoolean

#
Add a new data item to this chunk. The name must be unique or an exception will be thrown.
void SetBoolean(
item_name,
Name of item to add.
item_value
Value of item to add.
)
InvalidOperationExceptionThrown if another item with the same name already exists.

SetBoolean

#
Add a new data item to this chunk. The combination of name and index must be unique or an exception will be thrown.
void SetBoolean(
item_name,
Name of item to add.
item_index,
Index of item to add.
item_value
Value of item to add.
)
InvalidOperationExceptionThrown if another item with the same name and index already exists.

SetBoundingBox

#
Add a new data item to this chunk. The name must be unique or an exception will be thrown.
void SetBoundingBox(
item_name,
Name of item to add.
item_value
Value of item to add.
)
InvalidOperationExceptionThrown if another item with the same name already exists.

SetBoundingBox

#
Add a new data item to this chunk. The combination of name and index must be unique or an exception will be thrown.
void SetBoundingBox(
item_name,
Name of item to add.
item_index,
Index of item to add.
item_value
Value of item to add.
)
InvalidOperationExceptionThrown if another item with the same name and index already exists.

SetByte

#
Add a new data item to this chunk. The name must be unique or an exception will be thrown.
void SetByte(
item_name,
Name of item to add.
item_value
Value of item to add.
)
InvalidOperationExceptionThrown if another item with the same name already exists.

SetByte

#
Add a new data item to this chunk. The combination of name and index must be unique or an exception will be thrown.
void SetByte(
item_name,
Name of item to add.
item_index,
Index of item to add.
item_value
Value of item to add.
)
InvalidOperationExceptionThrown if another item with the same name and index already exists.

SetByteArray

#
Add a new data item to this chunk. The name must be unique or an exception will be thrown.
void SetByteArray(
item_name,
Name of item to add.
byte[]
item_value
Value of item to add.
)
InvalidOperationExceptionThrown if another item with the same name already exists.

SetByteArray

#
Add a new data item to this chunk. The combination of name and index must be unique or an exception will be thrown.
void SetByteArray(
item_name,
Name of item to add.
item_index,
Index of item to add.
byte[]
item_value
Value of item to add.
)
InvalidOperationExceptionThrown if another item with the same name and index already exists.

SetDate

#
Add a new data item to this chunk. The name must be unique or an exception will be thrown.
void SetDate(
item_name,
Name of item to add.
item_value
Value of item to add.
)
InvalidOperationExceptionThrown if another item with the same name already exists.

SetDate

#
Add a new data item to this chunk. The combination of name and index must be unique or an exception will be thrown.
void SetDate(
item_name,
Name of item to add.
item_index,
Index of item to add.
item_value
Value of item to add.
)
InvalidOperationExceptionThrown if another item with the same name and index already exists.

SetDecimal

#
Add a new data item to this chunk. The name must be unique or an exception will be thrown.
void SetDecimal(
item_name,
Name of item to add.
item_value
Value of item to add.
)
InvalidOperationExceptionThrown if another item with the same name already exists.

SetDecimal

#
Add a new data item to this chunk. The combination of name and index must be unique or an exception will be thrown.
void SetDecimal(
item_name,
Name of item to add.
item_index,
Index of item to add.
item_value
Value of item to add.
)
InvalidOperationExceptionThrown if another item with the same name and index already exists.

SetDouble

#
Add a new data item to this chunk. The name must be unique or an exception will be thrown.
void SetDouble(
item_name,
Name of item to add.
item_value
Value of item to add.
)
InvalidOperationExceptionThrown if another item with the same name already exists.

SetDouble

#
Add a new data item to this chunk. The combination of name and index must be unique or an exception will be thrown.
void SetDouble(
item_name,
Name of item to add.
item_index,
Index of item to add.
item_value
Value of item to add.
)
InvalidOperationExceptionThrown if another item with the same name and index already exists.

SetDoubleArray

#
Add a new data item to this chunk. The name must be unique or an exception will be thrown.
void SetDoubleArray(
item_name,
Name of item to add.
item_value
Value of item to add.
)
InvalidOperationExceptionThrown if another item with the same name already exists.

SetDoubleArray

#
Add a new data item to this chunk. The combination of name and index must be unique or an exception will be thrown.
void SetDoubleArray(
item_name,
Name of item to add.
item_index,
Index of item to add.
item_value
Value of item to add.
)
InvalidOperationExceptionThrown if another item with the same name and index already exists.

SetDrawingBitmap

#
Add a new data item to this chunk. The name must be unique or an exception will be thrown.
void SetDrawingBitmap(
item_name,
Name of item to add.
Bitmap
item_value
Value of item to add.
)
InvalidOperationExceptionThrown if another item with the same name already exists.

SetDrawingBitmap

#
Add a new data item to this chunk. The name must be unique or an exception will be thrown.
void SetDrawingBitmap(
item_name,
Name of item to add.
item_index,
Index of item to add.
Bitmap
item_value
Value of item to add.
)
InvalidOperationExceptionThrown if another item with the same name already exists.

SetDrawingColor

#
Add a new data item to this chunk. The name must be unique or an exception will be thrown.
void SetDrawingColor(
item_name,
Name of item to add.
Color
item_value
Value of item to add.
)
InvalidOperationExceptionThrown if another item with the same name already exists.

SetDrawingColor

#
Add a new data item to this chunk. The combination of name and index must be unique or an exception will be thrown.
void SetDrawingColor(
item_name,
Name of item to add.
item_index,
Index of item to add.
Color
item_value
Value of item to add.
)
InvalidOperationExceptionThrown if another item with the same name and index already exists.

SetDrawingPoint

#
Add a new data item to this chunk. The combination of name and index must be unique or an exception will be thrown.
void SetDrawingPoint(
item_name,
Name of item to add.
item_index,
Index of item to add.
Point
item_value
Value of item to add.
)
InvalidOperationExceptionThrown if another item with the same name and index already exists.

SetDrawingPoint

#
Add a new data item to this chunk. The name must be unique or an exception will be thrown.
void SetDrawingPoint(
item_name,
Name of item to add.
Point
item_value
Value of item to add.
)
InvalidOperationExceptionThrown if another item with the same name already exists.

SetDrawingPointF

#
Add a new data item to this chunk. The combination of name and index must be unique or an exception will be thrown.
void SetDrawingPointF(
item_name,
Name of item to add.
item_index,
Index of item to add.
PointF
item_value
Value of item to add.
)
InvalidOperationExceptionThrown if another item with the same name and index already exists.

SetDrawingPointF

#
Add a new data item to this chunk. The name must be unique or an exception will be thrown.
void SetDrawingPointF(
item_name,
Name of item to add.
PointF
item_value
Value of item to add.
)
InvalidOperationExceptionThrown if another item with the same name already exists.

SetDrawingRectangle

#
Add a new data item to this chunk. The combination of name and index must be unique or an exception will be thrown.
void SetDrawingRectangle(
item_name,
Name of item to add.
item_index,
Index of item to add.
Rectangle
item_value
Value of item to add.
)
InvalidOperationExceptionThrown if another item with the same name and index already exists.

SetDrawingRectangle

#
Add a new data item to this chunk. The name must be unique or an exception will be thrown.
void SetDrawingRectangle(
item_name,
Name of item to add.
Rectangle
item_value
Value of item to add.
)
InvalidOperationExceptionThrown if another item with the same name already exists.

SetDrawingRectangleF

#
Add a new data item to this chunk. The combination of name and index must be unique or an exception will be thrown.
void SetDrawingRectangleF(
item_name,
Name of item to add.
item_index,
Index of item to add.
item_value
Value of item to add.
)
InvalidOperationExceptionThrown if another item with the same name and index already exists.

SetDrawingRectangleF

#
Add a new data item to this chunk. The name must be unique or an exception will be thrown.
void SetDrawingRectangleF(
item_name,
Name of item to add.
item_value
Value of item to add.
)
InvalidOperationExceptionThrown if another item with the same name already exists.

SetDrawingSize

#
Add a new data item to this chunk. The combination of name and index must be unique or an exception will be thrown.
void SetDrawingSize(
item_name,
Name of item to add.
item_index,
Index of item to add.
Size
item_value
Value of item to add.
)
InvalidOperationExceptionThrown if another item with the same name and index already exists.

SetDrawingSize

#
Add a new data item to this chunk. The name must be unique or an exception will be thrown.
void SetDrawingSize(
item_name,
Name of item to add.
Size
item_value
Value of item to add.
)
InvalidOperationExceptionThrown if another item with the same name already exists.

SetDrawingSizeF

#
Add a new data item to this chunk. The combination of name and index must be unique or an exception will be thrown.
void SetDrawingSizeF(
item_name,
Name of item to add.
item_index,
Index of item to add.
SizeF
item_value
Value of item to add.
)
InvalidOperationExceptionThrown if another item with the same name and index already exists.

SetDrawingSizeF

#
Add a new data item to this chunk. The name must be unique or an exception will be thrown.
void SetDrawingSizeF(
item_name,
Name of item to add.
SizeF
item_value
Value of item to add.
)
InvalidOperationExceptionThrown if another item with the same name already exists.

SetGuid

#
Add a new data item to this chunk. The name must be unique or an exception will be thrown.
void SetGuid(
item_name,
Name of item to add.
item_value
Value of item to add.
)
InvalidOperationExceptionThrown if another item with the same name already exists.

SetGuid

#
Add a new data item to this chunk. The combination of name and index must be unique or an exception will be thrown.
void SetGuid(
item_name,
Name of item to add.
item_index,
Index of item to add.
item_value
Value of item to add.
)
InvalidOperationExceptionThrown if another item with the same name and index already exists.

SetInt32

#
Add a new data item to this chunk. The combination of name and index must be unique or an exception will be thrown.
void SetInt32(
item_name,
Name of item to add.
item_index,
Index of item to add.
item_value
Value of item to add.
)
InvalidOperationExceptionThrown if another item with the same name and index already exists.

SetInt32

#
Add a new data item to this chunk. The name must be unique or an exception will be thrown.
void SetInt32(
item_name,
Name of item to add.
item_value
Value of item to add.
)
InvalidOperationExceptionThrown if another item with the same name already exists.

SetInt64

#
Add a new data item to this chunk. The combination of name and index must be unique or an exception will be thrown.
void SetInt64(
item_name,
Name of item to add.
item_index,
Index of item to add.
item_value
Value of item to add.
)
InvalidOperationExceptionThrown if another item with the same name and index already exists.

SetInt64

#
Add a new data item to this chunk. The name must be unique or an exception will be thrown.
void SetInt64(
item_name,
Name of item to add.
item_value
Value of item to add.
)
InvalidOperationExceptionThrown if another item with the same name already exists.

SetInterval1D

#
Add a new data item to this chunk. The name must be unique or an exception will be thrown.
void SetInterval1D(
item_name,
Name of item to add.
item_value
Value of item to add.
)
InvalidOperationExceptionThrown if another item with the same name already exists.

SetInterval1D

#
Add a new data item to this chunk. The combination of name and index must be unique or an exception will be thrown.
void SetInterval1D(
item_name,
Name of item to add.
item_index,
Index of item to add.
item_value
Value of item to add.
)
InvalidOperationExceptionThrown if another item with the same name and index already exists.

SetInterval2D

#
Add a new data item to this chunk. The name must be unique or an exception will be thrown.
void SetInterval2D(
item_name,
Name of item to add.
item_value
Value of item to add.
)
InvalidOperationExceptionThrown if another item with the same name already exists.

SetInterval2D

#
Add a new data item to this chunk. The combination of name and index must be unique or an exception will be thrown.
void SetInterval2D(
item_name,
Name of item to add.
item_index,
Index of item to add.
item_value
Value of item to add.
)
InvalidOperationExceptionThrown if another item with the same name and index already exists.

SetLine

#
Add a new data item to this chunk. The name must be unique or an exception will be thrown.
void SetLine(
item_name,
Name of item to add.
item_value
Value of item to add.
)
InvalidOperationExceptionThrown if another item with the same name already exists.

SetLine

#
Add a new data item to this chunk. The combination of name and index must be unique or an exception will be thrown.
void SetLine(
item_name,
Name of item to add.
item_index,
Index of item to add.
item_value
Value of item to add.
)
InvalidOperationExceptionThrown if another item with the same name and index already exists.

SetPath

#
Add a new data item to this chunk. The combination of name and index must be unique or an exception will be thrown.
void SetPath(
item_name,
Name of item to add.
item_index,
Index of item to add.
absolutePath,
Absolute path to store.
basePath
Base path. This will be used to also store a relative path.
)
InvalidOperationExceptionThrown if another item with the same name and index already exists.

SetPath

#
Add a new data item to this chunk. The combination of name and index must be unique or an exception will be thrown.
void SetPath(
item_name,
Name of item to add.
absolutePath,
Absolute path to store.
basePath
Base path. This will be used to also store a relative path.
)
InvalidOperationExceptionThrown if another item with the same name and index already exists.

SetPlane

#
Add a new data item to this chunk. The name must be unique or an exception will be thrown.
void SetPlane(
item_name,
Name of item to add.
item_value
Value of item to add.
)
InvalidOperationExceptionThrown if another item with the same name already exists.

SetPlane

#
Add a new data item to this chunk. The combination of name and index must be unique or an exception will be thrown.
void SetPlane(
item_name,
Name of item to add.
item_index,
Index of item to add.
item_value
Value of item to add.
)
InvalidOperationExceptionThrown if another item with the same name and index already exists.

SetPoint2D

#
Add a new data item to this chunk. The name must be unique or an exception will be thrown.
void SetPoint2D(
item_name,
Name of item to add.
item_value
Value of item to add.
)
InvalidOperationExceptionThrown if another item with the same name already exists.

SetPoint2D

#
Add a new data item to this chunk. The combination of name and index must be unique or an exception will be thrown.
void SetPoint2D(
item_name,
Name of item to add.
item_index,
Index of item to add.
item_value
Value of item to add.
)
InvalidOperationExceptionThrown if another item with the same name and index already exists.

SetPoint3D

#
Add a new data item to this chunk. The name must be unique or an exception will be thrown.
void SetPoint3D(
item_name,
Name of item to add.
item_value
Value of item to add.
)
InvalidOperationExceptionThrown if another item with the same name already exists.

SetPoint3D

#
Add a new data item to this chunk. The combination of name and index must be unique or an exception will be thrown.
void SetPoint3D(
item_name,
Name of item to add.
item_index,
Index of item to add.
item_value
Value of item to add.
)
InvalidOperationExceptionThrown if another item with the same name and index already exists.

SetPoint4D

#
Add a new data item to this chunk. The name must be unique or an exception will be thrown.
void SetPoint4D(
item_name,
Name of item to add.
item_value
Value of item to add.
)
InvalidOperationExceptionThrown if another item with the same name already exists.

SetPoint4D

#
Add a new data item to this chunk. The combination of name and index must be unique or an exception will be thrown.
void SetPoint4D(
item_name,
Name of item to add.
item_index,
Index of item to add.
item_value
Value of item to add.
)
InvalidOperationExceptionThrown if another item with the same name and index already exists.

SetSingle

#
Add a new data item to this chunk. The name must be unique or an exception will be thrown.
void SetSingle(
item_name,
Name of item to add.
item_value
Value of item to add.
)
InvalidOperationExceptionThrown if another item with the same name already exists.

SetSingle

#
Add a new data item to this chunk. The combination of name and index must be unique or an exception will be thrown.
void SetSingle(
item_name,
Name of item to add.
item_index,
Index of item to add.
item_value
Value of item to add.
)
InvalidOperationExceptionThrown if another item with the same name and index already exists.

SetString

#
Add a new data item to this chunk. The combination of name and index must be unique or an exception will be thrown.
void SetString(
item_name,
Name of item to add.
item_index,
Index of item to add.
item_value
Value of item to add. If a null String is supplied, a zero-length String will be serialized.
)
InvalidOperationExceptionThrown if another item with the same name and index already exists.

SetString

#
Add a new data item to this chunk. The name must be unique or an exception will be thrown.
void SetString(
item_name,
Name of item to add.
item_value
Value of item to add. If a null String is supplied, a zero-length String will be serialized.
)
InvalidOperationExceptionThrown if another item with the same name already exists.

SetVersion

#
Add a new data item to this chunk. The name must be unique or an exception will be thrown.
void SetVersion(
item_name,
Name of item to add.
item_value
Value of item to add.
)
InvalidOperationExceptionThrown if another item with the same name already exists.

SetVersion

#
Add a new data item to this chunk. The combination of name and index must be unique or an exception will be thrown.
void SetVersion(
item_name,
Name of item to add.
item_index,
Index of item to add.
item_value
Value of item to add.
)
InvalidOperationExceptionThrown if another item with the same name and index already exists.

SetVersion

#
Add a new data item to this chunk. The combination of name and index must be unique or an exception will be thrown.
void SetVersion(
item_name,
Name of item to add.
item_index,
Index of item to add.
major,
Major component of version structure.
minor,
Minor component of version structure.
revision
Revision component of version structure.
)
InvalidOperationExceptionThrown if another item with the same name and index already exists.

SetVersion

#
Add a new data item to this chunk. The name must be unique or an exception will be thrown.
void SetVersion(
item_name,
Name of item to add.
major,
Major component of version structure.
minor,
Minor component of version structure.
revision
Revision component of version structure.
)
InvalidOperationExceptionThrown if another item with the same name already exists.

Write

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

Write

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