Dataspace.mui Class Reference

BOOPSI custom class Dataspace.mui (MUI 3.8 dev). Each ### sub-section below documents one of the class's attributes or methods. Sub-classes of Dataspace.mui are listed at the end under Sub-classes; the class hierarchy itself is documented in the MUI classes index.

Function index

Class definition

Attributes

Methods


Dataspace.mui


MUIA_Dataspace_Pool

MUIA_Dataspace_Pool -- (V11) [I..], APTR

Function

If you specify a memory pool from exec.library/CreatePool() here, the dataspace object will use this pool for all its entries. If you omit this tag or pass NULL, the dataspace object will create its own memory pool instead.

See also

MUIM_Dataspace_Add, exec.library/CreatePool


MUIM_Dataspace_Add

MUIM_Dataspace_Add (V11) — SYNOPSIS — DoMethod(obj,MUIM_Dataspace_Add,APTR data, LONG len, ULONG id);

Function

This method adds a new entry to the dataspace. If an entry with the same ID already exists, it will be replaced with the new entry.

Inputs

data - pointer to a data len - length of data id - reference id

Result

Returns NULL on failure (probably because of a memory shortage) or some non NULL value on success.

See also

MUIM_Dataspace_Remove, MUIM_Dataspace_Find


MUIM_Dataspace_Clear

MUIM_Dataspace_Clear (V11) — SYNOPSIS — DoMethod(obj,MUIM_Dataspace_Clear);

Function

This method clears all the contents of a dataspace. Depending on the state of the memory pool that the dataspace object uses, this may or may not result in more free memory.

Inputs

none

Result

All entries will be removed from the dataspace. The return value of this method is currently undefined.

See also

MUIM_Dataspace_Add, MUIM_Dataspace_Remove, MUIM_Dataspace_Merge


MUIM_Dataspace_Find

MUIM_Dataspace_Find (V11) — SYNOPSIS — DoMethod(obj,MUIM_Dataspace_Find,ULONG id);

Function

yet undocumented, complain in the beta mailing list :)


MUIM_Dataspace_Merge

MUIM_Dataspace_Merge (V11) — SYNOPSIS — DoMethod(obj,MUIM_Dataspace_Merge,Object *dataspace);

Function

This method adds all the contents of the merge dataspace specified as parameter to the objects dataspace. As with MUIM_Dataspace_Add, entries with equal IDs will be replaced.

Inputs

dataspace - dataspace objects whichs contents should be merged.

Result

Returns the number of entries that have been added/replaced in the objects dataspace. If this number doesnt match the number of entries in the merge dataspace, something probably went wrong.

See also

MUIM_Dataspace_Add, MUIM_Dataspace_Remove


MUIM_Dataspace_ReadIFF

MUIM_Dataspace_ReadIFF (V11) — SYNOPSIS — DoMethod(obj,MUIM_Dataspace_ReadIFF,struct IFFHandle *handle);

Function

Adds the contents of an IFF handle from iffparse.library to the dataspace. As always, objects with the same ID that are already in the dataspace will be replaced. This method does not look for any chunk types and chunk ids itself. Instead, it expects that you have already located the chunk which contains your data and does nothing but ReadChunkBytes() until all dataspace entries of the current chunk are read.

Inputs

handle - pointer to a struct IFFHandle from iffparse.library/AllocIFF(). The handle must already be open, initialized for reading and positioned on a chunk that was created with MUIM_Dataspace_WriteIFF.

Result

Returns 0 on success or some IFFERR_xxx on failure.

Notes

Do not call MUIM_Dataspace_ReadIFF if your handle is positioned on chunks that were not written with MUIM_Dataspace_WriteIFF or strange things may happen!

See also

MUIM_Dataspace_ReadIFF, iffparse.library/AllocIFF


MUIM_Dataspace_Remove

MUIM_Dataspace_Remove (V11) — SYNOPSIS — DoMethod(obj,MUIM_Dataspace_Remove,ULONG id);

Function

This method removes an entry from the dataspace.

Inputs

id - reference id

Result

Returns NULL if no entry with the given ID was found in the dataspace or some non NULL value on success.

See also

MUIM_Dataspace_Add, MUIM_Dataspace_Find


MUIM_Dataspace_WriteIFF

MUIM_Dataspace_WriteIFF (V11) — SYNOPSIS — DoMethod(obj,MUIM_Dataspace_WriteIFF,struct IFFHandle *handle, ULONG type, ULONG id);

Function

Writes the contents of a dataspace to an IFF handle of iffparse.library. In detail, a chunk with the specified type and id is created with PushChunk(), the contents of the dataspace are written with WriteChunkBytes() and the chunk is terminated with PopChunk().

Inputs

handle - pointer to a struct IFFHandle from iffparse.library/AllocIFF(). The handle must already be open and initialized for writing. type - type of chunk to create id - id of chunk to create

Result

Returns 0 on success or some IFFERR_xxx on failure.

See also

MUIM_Dataspace_ReadIFF, iffparse.library/AllocIFF