Library Data (LIBDATA, also known as EXT0)


Defines

#define SAT_DOLIBDATA   SAT_DOEXT0
 LIBDATA uses the EXT0 prolog.

Functions

bool isLIBDATA (SatAddr src)
 is the object at src a LIBDATA object?
int LIBDATAnibbles (SatAddr src)
 Return the number of nibbles in a LIBDATA object.
int LIBDATAbytes (SatAddr src)
bool LIBDATAdecode (SatAddr src, char *data, int *nibbles)
 extract the code Extract a LIBDATA's data and its size.
SatAddr LIBDATAencode (const char *data, int nibbles, SatAddr dst)
 Construct a LIBDATA object.
SatAddr makeLIBDATA (unsigned nibbles)
 Allocate a new LIBDATA object.

Detailed Description

Library data is free-formed data, so there isn't much to do with it.

Function Documentation

bool isLIBDATA ( SatAddr  src  ) 

is the object at src a LIBDATA object?

Parameters:
src Saturn address of an object
Returns:
true if the object at src is a LIBDATA object

int LIBDATAbytes ( SatAddr  src  ) 

brief Return the number of bytes required to store the data in a LIBDATA object

Parameters:
src The Saturn address of a LIBDATA object
Returns:
the number of bytes, or -1 if src doesn't point to a LIBDATA object

bool LIBDATAdecode ( SatAddr  src,
char *  data,
int *  nibbles 
)

extract the code Extract a LIBDATA's data and its size.

Parameters:
src Saturn address of a LIBDATA object
data If non-null, then the contents of the LIBDATA object will be copied here. Data must point to sufficient space to store the data. See LIBDATAbytes().
nibbles If non-null, then the number of nibbles of LIBDATA data is stored here.
Returns:
true on success. False if src isn't a LIBDATA object
See also:
LIBDATAbytes()

SatAddr LIBDATAencode ( const char *  data,
int  nibbles,
SatAddr  dst 
)

Construct a LIBDATA object.

Parameters:
data The data to be stored in the LIBDATA object
nibbles The number of nibbles in data to store.
dst If non-null, then this is the Saturn address where the LIBDATA object will be stored. If null, then a new LIBDATA object is allocated in tempOb.
Returns:
The Saturn address of the new LIBDATA object, or zero if data is NULL or a new LIBDATA object can't be allocated.

int LIBDATAnibbles ( SatAddr  src  ) 

Return the number of nibbles in a LIBDATA object.

Parameters:
src Saturn address of a LIBDATA object.
Returns:
The number of nibbles, or -1 if src doesn't point to a LIBDATA object.

SatAddr makeLIBDATA ( unsigned  nibbles  ) 

Allocate a new LIBDATA object.

Parameters:
nibbles The number of nibbles of LIBDATA data in the object
Returns:
The address of a new LIBDATA object. The contents are undefined.


Generated on Sat Apr 3 16:38:31 2010 for HPObjects by  doxygen 1.5.0