Common Lisp Package: PROTOCOL-BUFFER

Machine generated protocol buffers.

README:

FUNCTION

Public

STRING-FIELD (VALUE)

Returns a new %SF% instance initialized to hold VALUE, which much be either a Lisp string or a vector of UTF-8 encoded octets.

STRING-VALUE (STRING-FIELD)

Returns STRING-FIELD's value as a Lisp string.

UTF8-STRING-VALUE (STRING-FIELD)

Returns STRING-FIELD's value as a UTF-8 encoded vector of octets.

Private

%UTF8-STRING-LENGTH% (STRING-FIELD)

Returns the length in octets of STRING-FIELD's value.

GENERIC-FUNCTION

Public

CLEAR (PROTOCOL-BUFFER)

Sets the slots of PROTOCOL-BUFFER to their default values.

IS-INITIALIZED (PROTOCOL-BUFFER)

Are all the slots of PROTOCOL-BUFFER initialized?

MERGE-FROM-ARRAY (PROTOCOL-BUFFER BUFFER START LIMIT)

Merges the contents of the encoded protocol buffer stored in BUFFER into PROTOCOL-BUFFER. When reading from BUFFER, begins at position START and does not read from position LIMIT or higher. If deserialization demands reading beyond LIMIT, then signals PROTOCOL-BUFFER-READ-ERROR.

MERGE-FROM-MESSAGE (PROTOCOL-BUFFER SOURCE-PROTOCOL-BUFFER)

Merges the contents of SOURCE-PROTOCOL-BUFFER into PROTOCOL-BUFFER.

OCTET-SIZE (PROTOCOL-BUFFER)

Returns the number of octets required to represent PROTOCOL-BUFFER when it is encoded.

SERIALIZE (PROTOCOL-BUFFER BUFFER INDEX LIMIT)

Serializes PROTOCOL-BUFFER into BUFFER. Starts writing at position INDEX of BUFFER, but does not write into position LIMIT or higher. If serialization demands writing past LIMIT, then signals PROTOCOL-BUFFER-WRITE-ERROR. OCTET-SIZE must be called immediately before SERIALIZE because PROTOCOL-BUFFER instances cache size information.

SLOT-ACCESSOR

Private

%OCTETS% (OBJECT)

Octet vector that holds the string field's value.

SETF%OCTETS% (NEW-VALUE OBJECT)

Octet vector that holds the string field's value.

CLASS

Public

PROTOCOL-BUFFER

Superclass of all protocol buffer classes.

Private

%SF%

A protocol buffer string field.