SPRAAK
|
Public Member Functions | |
virtual int | read1 (const SprDT *restrict dt, SprStream *restrict fd, void *restrict dst) |
virtual ssize_t | readN (const SprDT *restrict dt, SprStream *restrict fd, void *restrict dst, size_t Nel) |
virtual ssize_t | readNi (const SprDT *restrict dt, SprStream *restrict fd, void *restrict dst, size_t Nel, size_t offs_next) |
virtual int | write1 (const SprDT *restrict dt, SprStream *restrict fd, const void *restrict src) |
virtual int | writeN (const SprDT *restrict dt, SprStream *restrict fd, const void *restrict src, size_t Nel) |
virtual int | writeNi (const SprDT *restrict dt, SprStream *restrict fd, const void *restrict src, size_t Nel, size_t offs_next) |
virtual ssize_t | skipN (const SprDT *restrict dt, SprStream *restrict fd, size_t Nel) |
virtual SprDTRead1Func | get_read1_func (const SprDT *dt, const SprStream *fd) |
virtual SprDTReadNFunc | get_readN_func (const SprDT *dt, const SprStream *fd) |
virtual SprDTReadNiFunc | get_readNi_func (const SprDT *dt, const SprStream *fd) |
virtual SprDTWrite1Func | get_write1_func (const SprDT *dt, const SprStream *fd) |
virtual SprDTWriteNFunc | get_writeN_func (const SprDT *dt, const SprStream *fd) |
virtual SprDTWriteNiFunc | get_writeNi_func (const SprDT *dt, const SprStream *fd) |
virtual SprDTSkipNFunc | get_skipN_func (const SprDT *dt, const SprStream *fd) |
virtual char * | str_cvt (const SprDT *restrict dt, void *restrict dst, const char *restrict str) |
virtual void * | cpy (const SprDT *dt, void *dst, const void *src) |
virtual void | free (const SprDT *restrict dt, void *restrict ptr) |
virtual SprDynStr | str (const SprDT *restrict dt, const void *restrict src) |
virtual ssize_t | print (const SprDT *restrict dt, SprStream *restrict fd, const void *restrict src) |
virtual void * | cvt1 (const SprDT *dt_dst, void *restrict dst, const SprDT *dt_src, const void *restrict src) |
virtual void * | cvtN (const SprDT *dt_dst, void *restrict dst, const SprDT *dt_src, const void *restrict src, size_t Nel) |
virtual void * | cvtNsi (const SprDT *dt_dst, void *restrict dst, const SprDT *dt_src, const void *restrict src, size_t Nel, size_t offs_src_next) |
virtual void * | cvtNdi (const SprDT *dt_dst, void *restrict dst, const SprDT *dt_src, const void *restrict src, size_t Nel, size_t offs_dst_next) |
virtual void * | cvtNsdi (const SprDT *dt_dst, void *restrict dst, const SprDT *dt_src, const void *restrict src, size_t Nel, size_t offs_src_next, size_t offs_dst_next) |
virtual SprDTCvt1Func | get_cvt1_func (const SprDT *dt_dst, const SprDT *dt_src, SprDTCvtAux **aux_data) |
virtual SprDTCvtNFunc | get_cvtN_func (const SprDT *dt_dst, const SprDT *dt_src, SprDTCvtAux **aux_data) |
virtual SprDTCvtNsiFunc | get_cvtNsi_func (const SprDT *dt_dst, const SprDT *dt_src, SprDTCvtAux **aux_data) |
virtual SprDTCvtNsiFunc | get_cvtNdi_func (const SprDT *dt_dst, const SprDT *dt_src, SprDTCvtAux **aux_data) |
virtual SprDTCvtNsdiFunc | get_cvtNsdi_func (const SprDT *dt_dst, const SprDT *dt_src, SprDTCvtAux **aux_data) |
virtual void | reserve_dt (SprDT *restrict dt) |
virtual void | release_dt (SprDT *restrict dt) |
Data Fields | |
base::< SprObject > | interface_ |
int | dsize |
unsigned int | dalign |
int | dsize_packed |
Protected Attributes | |
unsigned int | flags |
const char * | desc_str |
SprDT is the base class for all types that describe data types in the SPRAAK system.
The date atype descriptor type. For more info, see datatype.c
|
virtual |
Read a single data element from the given stream fd. The binary data is written to dst. It is the callers responsability to assure that dst is large enough to contain the whole data element.
Reimplemented in SprDT_ET.
|
virtual |
Read Nel data elements from the given stream fd. The binary data is written to dst. It is the callers responsability to assure that dst is large enough to contain all Nel data elements.
Reimplemented in SprDT_ET.
|
virtual |
Read Nel data elements from the given stream fd. The binary data is written to dst in an interleaved fashion, i.e. the 2nd elements is written to (char*)dst+<offs_next) and so on. It is the callers responsability to assure that dst is large enough to contain all Nel data elements.
Reimplemented in SprDT_ET.
|
virtual |
Write a single data element of which the binary data can be found at address src to the given stream fd.
Reimplemented in SprDT_ET.
|
virtual |
Write the Nel data elements located at address src and upwards to the given stream fd.
Reimplemented in SprDT_ET.
|
virtual |
Write the Nel data elements located at address src and upwards to the given stream fd. The source elements are stored in an interleaved fashion in memory, i.e. the 2nd elements is located at (char*)src+<offs_next) and so on.
Reimplemented in SprDT_ET.
|
virtual |
Skip Nel elements in the input stream fd.
Reimplemented in SprDT_EnumT, and SprDT_ET.
|
virtual |
Find a function to read a single data element of the type dt from the stream fd. This function behaves identically to the SprDT::read1() method, but is typically faster since the mode of the stream (BIN, BINSWAP, ASCII) is known in advance.
Reimplemented in SprDT_ET.
|
virtual |
Find a function to read N data element of the type dt from the stream fd. This function behaves identically to the SprDT::readN() method, but is typically faster since the mode of the stream (BIN, BINSWAP, ASCII) is known in advance.
Reimplemented in SprDT_ET.
|
virtual |
Find a function to read N data element of the type dt from the stream fd in an interleaved fashion. This function behaves identically to the SprDT::readNi() method, but is typically faster since the mode of the stream (BIN, BINSWAP, ASCII) is known in advance.
Reimplemented in SprDT_ET.
|
virtual |
Find a function to write a single data element of the type dt to the stream fd. This function behaves identically to the SprDT::write1() method, but is typically faster since the mode of the stream (BIN, BINSWAP, ASCII) is known in advance.
Reimplemented in SprDT_ET.
|
virtual |
Find a function to write N data element of the type dt to the stream fd. This function behaves identically to the SprDT::writeN() method, but is typically faster since the mode of the stream (BIN, BINSWAP, ASCII) is known in advance.
Reimplemented in SprDT_ET.
|
virtual |
Find a function to write N data element of the type dt to the stream fd in an interleaved fashion. This function behaves identically to the SprDT::writeNi() method, but is typically faster since the mode of the stream (BIN, BINSWAP, ASCII) is known in advance.
Reimplemented in SprDT_ET.
|
virtual |
Find a function to skip N data element of the type dt in the stream fd. This function behaves identically to the SprDT::skipN() method, but is typically faster since the mode of the stream (BIN, BINSWAP, ASCII) is known in advance.
Reimplemented in SprDT_ET.
|
virtual |
Convert to the initial part of the dst to a data element of this type. The binary data is written to dst. Leading space is ignored. The conversion stops at the first character that does not fit the data type.
|
virtual |
Copy the item *src of type dt to *dst (same type).
Reimplemented in SprDT_EnumT.
|
virtual |
Release all memory associated to the object of type dt located at address ptr.
Convert the data element of type dt and for which the binary data can be found at address src to a dynamic string.
|
virtual |
Print the data element of type dt and for which the binary data can be found at address src to the stream fd.
|
virtual |
Convert the single data element *src of the type dt_src to a data element of the type dt_dst and write the result to *dst.
dt_dst | Data type of dst. |
dst | Location where the converted data will be written. It is the callers responsability to assure that dst is large enough to contain the data. |
dt_src | Data type of src. |
src | The data that must be converted. |
|
virtual |
Convert data elements src[0...Nel-1] of the type dt_src to data elements of the type dt_dst and write the result to dst[0...Nel-1].
dt_dst | Data type of dst. |
dst | Location where the converted data will be written. It is the callers responsability to assure that dst is large enough to contain the data. |
dt_src | Data type of src. |
src | The data that must be converted. |
Nel | Number of elements to convert. |
|
virtual |
Convert data elements *src, *(src+<offs_src_next), ... *(src+(Nel-1)*offs_src_next) of the type dt_src to data elements of the type dt_dst and write the result to dst[0...Nel-1].
dt_dst | Data type of dst. |
dst | Location where the converted data will be written. It is the callers responsability to assure that dst is large enough to contain the data. |
dt_src | Data type of src. |
src | The data that must be converted. |
Nel | Number of elements to convert. |
offs_src_next | Offset of the next element in the source data. The destination data is consecutive. |
|
virtual |
Convert data elements src[0...Nel-1] of the type dt_src to data elements of the type dt_dst and write the result to *dst, *(dst+<offs_dst_next), ... *(dst+(Nel-1)*offs_dst_next)
dt_dst | Data type of dst. |
dst | Location where the converted data will be written. It is the callers responsability to assure that dst is large enough to contain the data. |
dt_src | Data type of src. |
src | The data that must be converted. |
Nel | Number of elements to convert. |
offs_dst_next | Offset of the next element in the destination data. |
|
virtual |
Convert data elements *src, *(src+<offs_src_next), ... *(src+(Nel-1)*offs_src_next) of the type dt_src to data elements of the type dt_dst and write the result to *dst, *(dst+<offs_dst_next), ... *(dst+(Nel-1)*offs_dst_next)
dt_dst | Data type of dst. |
dst | Location where the converted data will be written. It is the callers responsability to assure that dst is large enough to contain the data. |
dt_src | Data type of src. |
src | The data that must be converted. |
Nel | Number of elements to convert. |
offs_src_next | Offset of the next element in the source data. The destination data is consecutive. |
offs_dst_next | Offset of the next element in the destination data. |
|
virtual |
Find a function to convert a single data element of the type dt_src to a data element of the type dt_dst. If needed, some auxilary data needed for the conversion will be returned via aux_data. If all conversions are done, this auxilary data must be freed using aux_data->free_routine().
|
virtual |
Find a function to convert a vector of data elements of the type dt_src to a vector of data elements of the type dt_dst. If needed, some auxilary data needed for the conversion will be returned via aux_data. If all conversions are done, this auxilary data must be freed using aux_data->free_routine().
|
virtual |
Find a function to convert a vector of data elements of the type dt_src to a vector of data elements of the type dt_dst when the source data is stored in an interleaved fashion. If needed, some auxilary data needed for the conversion will be returned via aux_data. If all conversions are done, this auxilary data must be freed using aux_data->free_routine().
|
virtual |
Find a function to convert a vector of data elements of the type dt_src to a vector of data elements of the type dt_dst when the destination data is stored in an interleaved fashion. If needed, some auxilary data needed for the conversion will be returned via aux_data. If all conversions are done, this auxilary data must be freed using aux_data->free_routine().
|
virtual |
Find a function to convert a vector of data elements of the type dt_src to a vector of data elements of the type dt_dst when both the source and the destination data are stored in an interleaved fashion. If needed, some auxilary data needed for the conversion will be returned via aux_data. If all conversions are done, this auxilary data must be freed using aux_data->free_routine().
|
virtual |
Some complex data type descriptors (things of the type SprDT) are dynamic allocated, and hence must be released when no longer needed (or reserved when a copy is made). This method will reserve the type description (augment some counter with 1), making sure the dynamic allocated structure will not be freed before a matching SprDT::release_dt() method is called.
|
virtual |
Some data type descriptors (things of the type SprDT) are dynamic allocated, and hence must be released when no longer needed (or reserved when a copy is made). This method will releases the type description, i.e. it descreases some counter with 1, and frees the type descriptor when the counter reaches zero.
base::<SprObject> SprDT::interface_ |
int SprDT::dsize |
Size of the data when stored in binary format in memory, -1 for variable sized items.
unsigned int SprDT::dalign |
Minimal alignment requirement of the data when stored in binary format in memory.
int SprDT::dsize_packed |
Size of the data when stored in binary format in a file (elements are not aligned), -1 for variable sized items.
|
protected |
Flags describing the various properties of the data type.
|
protected |
Formal description string (or template string) for the data type.