Public methods

append (1)

IccBuf& append (unsigned long length,
                const void* dataArea)

length
The length of the source data area, in bytes
dataArea
The address of the source data area.

Appends data from the given data area to the data area in the object.

append (2)

IccBuf& append (const char* format,
                ...)

format
The null-terminated format string
...
The optional parameters.

Append data, in the form of format string and variable argument, to the data area in the object. This is the same as the form used by printf in the standard C library. Note that it is the responsibility of the application programmer to ensure that the optional parameters are consistent with the format string.

assign (1)

IccBuf& assign (unsigned long length,
               const void* dataArea)

length
The length of the source data area, in bytes
dataArea
The address of the source data area.

Assigns data from the given data area to the data area in the object.

assign (2)

IccBuf& assign (const char* format,
                ...)

format
The format string
...
The optional parameters.

Assigns data, in the form of format string and variable argument, to the data area in the object. This is the same as the form used by printf in the standard C library.

cut

IccBuf& cut (unsigned long length,
            unsigned long offset = 0)

length
The number of bytes to be cut from the data area.
offset
The offset into the data area. The default is no offset.

Makes the specified cut to the data in the data area and returns a reference to the IccBuf object.

dataArea

const void* dataArea(unsigned long offset = 0) const
offset
The offset into the data area. The default is no offset.

Returns the address of data at the given offset into the data area.

dataAreaLength

unsigned long dataAreaLength() const

Returns the length of the data area in bytes.

dataAreaOwner

DataAreaOwner dataAreaOwner() const

Returns an enumeration that indicates whether the data area has been allocated by the IccBuf constructor or has been supplied from elsewhere. The possible values are listed under DataAreaOwner.

dataAreaType

DataAreaType dataAreaType() const

Returns an enumeration that indicates whether the data area can be extended. The possible values are listed under DataAreaType.

dataLength

unsigned long dataLength() const

Returns the length of data in the data area. This cannot be greater than the value returned by dataAreaLength.

insert

IccBuf& insert (unsigned long length,
                const void* dataArea,
                unsigned long offset = 0)

length
The length of the data, in bytes, to be inserted into the IccBuf object
dataArea
The start of the source data to be inserted into the IccBuf object
offset
The offset in the data area where the data is to be inserted. The default is no offset.

Inserts the given data into the data area at the given offset and returns a reference to the IccBuf object.

isFMHContained

Icc::Bool isFMHContained() const

Returns a boolean, defined in Icc structure, that indicates whether the data area contains FMHs (function management headers).

operator const char*

operator const char*() const

Casts an IccBuf object to a null terminated string.

IccBuf data("Hello World");
cout << (const char*) data;

operator= (1)

IccBuf& operator=(const IccBuf& buffer)
buffer
A reference to an IccBuf object.

Assigns data from another buffer object and returns a reference to the IccBuf object.

operator= (2)

IccBuf& operator=(const char* text)
text
The null-terminated string to be assigned to the IccBuf object.

Assigns data from a null-terminated string and returns a reference to the IccBuf object.

See also the assign method.

operator+= (1)

IccBuf& operator+=(const IccBuf& buffer)
buffer
A reference to an IccBuf object.

Appends data from another buffer object and returns a reference to the IccBuf object.

operator+= (2)

IccBuf& operator+=(const char* text)
text
The null-terminated string to be appended to the IccBuf object.

Appends data from a null-terminated string and returns a reference to the IccBuf object.

See also the append method.

operator==

Icc::Bool operator==(const IccBuf& buffer) const

buffer
A reference to an IccBuf object.

Returns a boolean, defined in Icc structure, that indicates whether the data contained in the buffers of the two IccBuf objects is the same. It is true if the current lengths of the two data areas are the same and the contents are the same.

operator!=

Icc::Bool operator!=(const IccBuf& buffer) const

buffer
A reference to an IccBuf object.

Returns a boolean, defined in Icc structure, that indicates whether the data contained in the buffers of the two IccBuf objects is different. It is true if the current lengths of the two data areas are different or if the contents are different.

operator<< (1)

operator<<(const IccBuf& buffer)

Appends another buffer.

operator<< (2)

operator<<(const char* text)

Appends a string.

operator<< (3)

operator<<(char ch)

Appends a character.

operator<< (4)

operator<<(signed char ch)

Appends a character.

operator<< (5)

operator<<(unsigned char ch)

Appends a character.

operator<< (6)

operator<<(const signed char* text)

Appends a string.

operator<< (7)

operator<<(const unsigned char* text)

Appends a string.

operator<< (8)

operator<<(short num)

Appends a short.

operator<< (9)

operator<<(unsigned short num)

Appends an unsigned short.

operator<< (10)

operator<<(long num)

Appends a long.

operator<< (11)

operator<<(unsigned long num)

Appends an unsigned long.

operator<< (12)

operator<<(int num)

Appends an integer.

operator<< (13)

operator<<(float num)

Appends a float.

operator<< (14)

operator<<(double num)

Appends a double.

operator<< (15)

operator<<(long double num)

Appends a long double.

Appends data of various types to the IccBuf object. The types are converted to a 'readable' format, for example from a long to a string representation.

overlay

IccBuf& overlay (unsigned long length,
                 void* dataArea)

length
The length of the existing data area.
dataArea
The address of the existing data area.

Makes the data area external and fixed. Any existing internal data area is destroyed.

See warning about Internal/External ownership of buffers.

replace

IccBuf& replace (unsigned long length,
                 const void* dataArea,
                 unsigned long offset = 0)

length
The length of the source data area, in bytes.
dataArea
The address of the start of the source data area.
offset
The position where the new data is to be written, relative to the start of the IccBuf data area. The default is no offset.

Replaces the current contents of the data area at the given offset with the data provided and returns a reference to the IccBuf object.

setDataLength

unsigned long setDataLength(unsigned long length)

length
The new length of the data area, in bytes

Changes the current length of the data area and returns the new length. If the IccBuf object is not extensible, the data area length is set to either the original length of the data area or length , whichever is less.

setFMHContained

void setFMHContained(Icc::Bool yesNo = Icc::yes)

yesNo
A boolean, defined in Icc structure, that indicates whether the data area contains FMHs. The default value is yes.

Allows an application program to indicate that a data area contains function management headers.

[[ Contents Previous Page | Next Page Index ]]