Common Lisp Package: PROTOBUFS-IMPLEMENTATION

README:

FUNCTION

Public

CLASS-NAME->PROTO (X)

Given a Lisp class name, returns a Protobufs message or enum name. The second value is the fully qualified name, as a list.

CLASS-TO-PROTOBUF-MESSAGE (CLASS SCHEMA &KEY SLOT-FILTER TYPE-FILTER ENUM-FILTER VALUE-FILTER)

Given a CLOS class, return a Protobufs model object for it.

CLOS-INIT-TO-PROTOBUF-DEFAULT (VALUE TYPE &OPTIONAL VALUE-FILTER)

Given an initform and a Lisp type, returns a plausible default value. Don't call this if the default is empty, because that will confuse 'nil' with 'unbound'.

CLOS-TYPE-TO-PROTOBUF-REQUIRED (TYPE &OPTIONAL TYPE-FILTER)

Given a Lisp type, returns a "cardinality": :required, :optional or :repeated. If the sceond returned value is true, it's a repeated field that should use a vector.

CLOS-TYPE-TO-PROTOBUF-TYPE (TYPE &OPTIONAL TYPE-FILTER ENUM-FILTER)

Given a Lisp type, returns a Protobuf type, a class or primitive type, whether or not to pack the field, and (optionally) a set of enum values.

DECODE-DOUBLE

Decodes the next double float in the buffer at the given index. Returns both the decoded value and the new index into the buffer. Watch out, this function turns off all type checking and array bounds checking.

DECODE-FIXED32

Decodes the next 32-bit unsigned fixed integer in the buffer at the given index. Returns both the decoded value and the new index into the buffer. Watch out, this function turns off all type checking and array bounds checking.

DECODE-FIXED64

Decodes the next 64-bit unsigned fixed integer in the buffer at the given index. Returns both the decoded value and the new index into the buffer. Watch out, this function turns off all type checking and array bounds checking.

DECODE-INT32

Decodes the next 32-bit varint integer in the buffer at the given index. Returns both the decoded value and the new index into the buffer. Watch out, this function turns off all type checking and array bounds checking.

DECODE-INT64

Decodes the next 64-bit varint integer in the buffer at the given index. Returns both the decoded value and the new index into the buffer. Watch out, this function turns off all type checking and array bounds checking.

DECODE-OCTETS

Decodes the next octets in the buffer at the given index. Returns both the decoded value and the new index into the buffer. Watch out, this function turns off all type checking and array bounds checking.

DECODE-SFIXED32

Decodes the next 32-bit signed fixed integer in the buffer at the given index. Returns both the decoded value and the new index into the buffer. Watch out, this function turns off all type checking and array bounds checking.

DECODE-SFIXED64

Decodes the next 64-bit signed fixed integer in the buffer at the given index. Returns both the decoded value and the new index into the buffer. Watch out, this function turns off all type checking and array bounds checking.

DECODE-SINGLE

Decodes the next single float in the buffer at the given index. Returns both the decoded value and the new index into the buffer. Watch out, this function turns off all type checking and array bounds checking.

DECODE-STRING

Decodes the next UTF-8 encoded string in the buffer at the given index. Returns both the decoded string and the new index into the buffer. Watch out, this function turns off all type checking and array bounds checking.

DECODE-UINT32

Decodes the next 32-bit varint integer in the buffer at the given index. Returns both the decoded value and the new index into the buffer. Watch out, this function turns off all type checking and array bounds checking.

DECODE-UINT64

Decodes the next 64-bit varint integer in the buffer at the given index. Returns both the decoded value and the new index into the buffer. Watch out, this function turns off all type checking and array bounds checking.

DESERIALIZE-ENUM (ENUM-VALUES BUFFER INDEX)

Deserializes the next enum value take from 'enum-values'. Deserializes from the byte vector 'buffer' starting at 'index'. Returns the value and and the new index into the buffer. Watch out, this function turns off most type checking and all array bounds checking.

DESERIALIZE-PACKED (TYPE BUFFER INDEX)

Deserializes the next packed values of type 'type'. Deserializes from the byte vector 'buffer' starting at 'index'. Returns the value and and the new index into the buffer. Watch out, this function turns off most type checking and all array bounds checking.

DESERIALIZE-PACKED-ENUM (ENUM-VALUES BUFFER INDEX)

Deserializes the next packed enum values given in 'enum-values'. Deserializes from the byte vector 'buffer' starting at 'index'. Returns the value and and the new index into the buffer. Watch out, this function turns off most type checking and all array bounds checking.

DESERIALIZE-PRIM (TYPE BUFFER INDEX)

Deserializes the next object of primitive type 'type'. Deserializes from the byte vector 'buffer' starting at 'index'. Returns the value and and the new index into the buffer. Watch out, this function turns off most type checking and all array bounds checking.

ENCODE-DOUBLE

Encodes the double float 'val' into the buffer at the given index. Modifies the buffer, and returns the new index into the buffer. Watch out, this function turns off all type checking and array bounds checking.

ENCODE-FIXED32

Encodes the unsigned 32-bit integer 'val' as a fixed int into the buffer at the given index. Modifies the buffer, and returns the new index into the buffer. Watch out, this function turns off all type checking and array bounds checking.

ENCODE-FIXED64

Encodes the unsigned 64-bit integer 'val' as a fixed int into the buffer at the given index. Modifies the buffer, and returns the new index into the buffer. Watch out, this function turns off all type checking and array bounds checking.

ENCODE-OCTETS

Encodes the octets into the buffer at the given index. Modifies the buffer, and returns the new index into the buffer. Watch out, this function turns off all type checking and array bounds checking.

ENCODE-SFIXED32

Encodes the signed 32-bit integer 'val' as a fixed int into the buffer at the given index. Modifies the buffer, and returns the new index into the buffer. Watch out, this function turns off all type checking and array bounds checking.

ENCODE-SFIXED64

Encodes the signed 64-bit integer 'val' as a fixed int into the buffer at the given index. Modifies the buffer, and returns the new index into the buffer. Watch out, this function turns off all type checking and array bounds checking.

ENCODE-SINGLE

Encodes the single float 'val' into the buffer at the given index. Modifies the buffer, and returns the new index into the buffer. Watch out, this function turns off all type checking and array bounds checking.

ENCODE-STRING

Encodes the octets into the buffer at the given index. Modifies the buffer, and returns the new index into the buffer. Watch out, this function turns off all type checking and array bounds checking.

ENCODE-UINT32

Encodes the unsigned 32-bit integer 'val' as a varint into the buffer at the given index. Modifies the buffer, and returns the new index into the buffer. Watch out, this function turns off all type checking and array bounds checking.

ENCODE-UINT64

Encodes the unsigned 64-bit integer 'val' as a varint into the buffer at the given index. Modifies the buffer, and returns the new index into the buffer. Watch out, this function turns off all type checking and array bounds checking.

ENUM-NAME->PROTO (X &OPTIONAL PREFIX)

Given a Lisp enum value name, returns a Protobufs enum value name. The second value is the fully qualified name, as a list.

ENUM-SIZE (VAL ENUM-VALUES TAG)

Returns the size in bytes that the enum object will take when serialized.

GENERATE-DESERIALIZER (MESSAGE)

Generate a 'deserialize-object' method for the given message.

GENERATE-OBJECT-SIZE (MESSAGE)

Generate an 'object-size' method for the given message.

GENERATE-SERIALIZER (MESSAGE)

Generate a 'serialize-object' method for the given message.

LENGTH32

Returns the length that 'val' will take when encoded as a 32-bit integer.

LENGTH64

Returns the length that 'val' will take when encoded as a 64-bit integer.

MAKE-TAG (TYPE INDEX)

Given a wire type or the name of a Protobufs type and a field index, return the tag that encodes both of them.

PACKED-ENUM-SIZE (VALUES ENUM-VALUES TAG)

Returns the size in bytes that the enum values will take when serialized.

PACKED-SIZE (VALUES TYPE TAG &OPTIONAL VECTORP)

Returns the size in bytes that the packed object will take when serialized. Watch out, this function turns off most type checking.

PRIM-SIZE (VAL TYPE TAG)

Returns the size in bytes that the primitive object will take when serialized. Watch out, this function turns off most type checking.

PROCESS-IMPORTS (SCHEMA IMPORTS)

Processes the imports for a schema. If the import is a symbol, see if that resolves to an existing schema. If the import is a file (string, pathname), parse it as a .proto in the usual manner.

PROTO->CLASS-NAME (X &OPTIONAL PACKAGE)

Given a Protobufs message or enum type name, returns a Lisp class or type name. This resolves Protobufs qualified names as best as it can.

PROTO->ENUM-NAME (X &OPTIONAL PACKAGE)

Given a Protobufs enum value name, returns a Lisp enum value name. This resolves Protobufs qualified names as best as it can.

PROTO->SLOT-NAME (X &OPTIONAL PACKAGE)

Given a Protobufs field value name, returns a Lisp slot name. This resolves Protobufs qualified names as best as it can.

PROTOBUF-DEFAULT-TO-CLOS-INIT (DEFAULT TYPE)

Given a Protobufs type and default, return a CLOS initform value. Don't call this if the default is empty, because that will confuse 'nil' with 'unbound'.

SERIALIZE-ENUM (VAL ENUM-VALUES TAG BUFFER INDEX)

Serializes a Protobufs enum value into the buffer at the given index. The value is given by 'val', the enum values are in 'enum-values'. Modifies the buffer in place, and returns the new index into the buffer. Watch out, this function turns off most type checking and all array bounds checking.

SERIALIZE-PACKED (VALUES TYPE TAG BUFFER INDEX &OPTIONAL VECTORP)

Serializes a set of packed values into the buffer at the given index. The values are given by 'values', the primitive type by 'type'. Modifies the buffer in place, and returns the new index into the buffer. Watch out, this function turns off most type checking and all array bounds checking.

SERIALIZE-PACKED-ENUM (VALUES ENUM-VALUES TAG BUFFER INDEX)

Serializes Protobufs enum values into the buffer at the given index. The values are given by 'values', the enum values are in 'enum-values'. Modifies the buffer in place, and returns the new index into the buffer. Watch out, this function turns off most type checking and all array bounds checking.

SERIALIZE-PRIM (VAL TYPE TAG BUFFER INDEX)

Serializes a Protobufs primitive (scalar) value into the buffer at the given index. The value is given by 'val', the primitive type by 'type'. Modifies the buffer in place, and returns the new index into the buffer. Watch out, this function turns off most type checking and all array bounds checking.

SKIP-ELEMENT

Skip an element in the buffer at the index of the given wire type. Returns the new index in the buffer. Watch out, this function turns off all type checking and all array bounds checking.

SLOT-NAME->PROTO (X)

Given a Lisp slot name, returns a Protobufs field name. The second value is the fully qualified name, as a list.

SLOT-TO-PROTOBUF-FIELD (CLASS SLOT INDEX SLOTS &KEY SLOT-FILTER TYPE-FILTER ENUM-FILTER VALUE-FILTER)

Given a CLOS slot, return a Protobufs model object for it.

Undocumented

ENSURE-ALL-SCHEMAS

LISP-TYPE-TO-PROTOBUF-TYPE (TYPE)

MAKE-OPTION (NAME VALUE &OPTIONAL (TYPE 'STRING))

PARSE-PROTOBUF-FILE (PROTOBUF-FILE LISP-FILE IMPORTS-FILE &KEY (CONC-NAME ))

PROCESS-IMPORTS-FROM-FILE (IMPORTS-FILE)

PROTOBUFS-WARN (FORMAT-CONTROL &REST FORMAT-ARGUMENTS)

ZIG-ZAG-DECODE32

ZIG-ZAG-DECODE64

ZIG-ZAG-ENCODE32

ZIG-ZAG-ENCODE64

Private

BOOLEAN-TRUE-P (X)

Returns t or nil given a value that might be a boolean.

CAMEL-CASE (STRING &OPTIONAL (SEPARATORS '(-)))

Take a hyphen-separated string and turn it into a camel-case string.

CAMEL-CASE-BUT-ONE (STRING &OPTIONAL (SEPARATORS '(-)))

Take a hyphen-separated string and turn its tail into a camel-case string.

COPY-SOURCE-LOCATION (SEQUENCE)

Return a copy of SEQUENCE which is EQUAL to SEQUENCE but not EQ.

CURRY (FUNCTION &REST ARGS)

Returns a function that applies 'function' to 'args', plus any additional arguments given at the call site.

ENDS-WITH (STRING SUFFIX &KEY (END (LENGTH STRING)))

Returns true if 'string' ends with the prefix 'prefix' (case insensitive).

ESCAPE-CHAR (CH)

The inverse of 'unescape-char', for printing.

EXPECT-CHAR (STREAM CHAR &OPTIONAL CHARS WITHIN)

Expect to see 'char' as the next character in the stream; signal an error if it's not there. Then skip all of the following whitespace. The return value is the character that was eaten.

FIND-PROTO-PACKAGE (NAME)

A very fuzzy definition of 'find-package'.

FIND-QUALIFIED-NAME (NAME PROTOS &KEY (PROTO-KEY #'PROTO-NAME) (FULL-KEY #'PROTO-QUALIFIED-NAME) RELATIVE-TO)

Find something by its string name, first doing a simple name match, and, if that fails, exhaustively searching qualified names.

FIND-SLOT-DEFINITION-READER (CLASS SLOTD)

Given a class and a slot descriptor, find the name of a reader method for the slot.

FIND-SLOT-DEFINITION-TYPE (CLASS SLOTD)

Given a class and a slot descriptor, find the "best" type definition for the slot.

FINTERN (FORMAT-STRING &REST FORMAT-ARGS)

Interns a new symbol in the current package.

FOLD-SYMBOL (X)

Given an expression 'x', constant-fold it until it can be folded no more.

KEYWORDIFY (X)

Given a symbol designator 'x', return a keyword whose name is 'x'. If 'x' is nil, this returns nil.

KINTERN (FORMAT-STRING &REST FORMAT-ARGS)

Interns a new symbol in the keyword package.

MAKE-LISP-SYMBOL (STRING)

Intern a string of the 'package:string' and return the symbol.

MAKE-SOURCE-LOCATION (STREAM START END)

Create a "source locator" for the stream at the current position. With any luck, we can get meta-dot to pay attention to it.

MAYBE-QUALIFIED-NAME (X &OPTIONAL NAME)

Given a message, return a fully qualified name if the short name is not sufficient to name the message in the current scope.

MAYBE-SKIP-CHARS (STREAM CHARS)

Skip some optional characters in the stream, then skip all of the following whitespace.

MAYBE-SKIP-COMMENTS (STREAM)

If what appears next in the stream is a comment, skip it and any following comments, then skip any following whitespace.

PACKED-TYPE-P (TYPE)

Returns true if the given Protobufs type can use a packed field.

PARSE-FLOAT (STREAM)

Parse the next token in the stream as a float, then skip the following whitespace. The returned value is the float.

PARSE-PARENTHESIZED-TOKEN (STREAM)

Parse the next token in the stream, then skip the following whitespace. The token might be surrounded by parentheses. The returned value is the token.

PARSE-PROTO-ENUM (STREAM PROTOBUF)

Parse a Protobufs 'enum' from 'stream'. Updates the 'protobuf-schema' or 'protobuf-message' object to have the enum.

PARSE-PROTO-ENUM-VALUE (STREAM PROTOBUF ENUM NAME)

Parse a Protobufs enum value from 'stream'. Updates the 'protobuf-enum' object to have the enum value.

PARSE-PROTO-EXTEND (STREAM PROTOBUF)

Parse a Protobufs 'extend' from 'stream'. Updates the 'protobuf-schema' or 'protobuf-message' object to have the message.

PARSE-PROTO-FIELD (STREAM MESSAGE REQUIRED &OPTIONAL EXTENDED-FROM)

Parse a Protobufs field from 'stream'. Updates the 'protobuf-message' object to have the field.

PARSE-PROTO-FIELD-OPTIONS (STREAM)

Parse any options in a Protobufs field from 'stream'. Returns a list of 'protobuf-option' objects.

PARSE-PROTO-GROUP (STREAM MESSAGE REQUIRED &OPTIONAL EXTENDED-FROM)

Parse a (deprecated) Protobufs group from 'stream'. Updates the 'protobuf-message' object to have the group type and field.

PARSE-PROTO-IMPORT (STREAM SCHEMA &OPTIONAL (TERMINATOR ;))

Parse a Protobufs import line from 'stream'. Updates the 'protobuf-schema' object to use the import.

PARSE-PROTO-MESSAGE (STREAM PROTOBUF &OPTIONAL NAME)

Parse a Protobufs 'message' from 'stream'. Updates the 'protobuf-schema' or 'protobuf-message' object to have the message.

PARSE-PROTO-METHOD (STREAM SERVICE INDEX)

Parse a Protobufs method from 'stream'. Updates the 'protobuf-service' object to have the method.

PARSE-PROTO-METHOD-OPTIONS (STREAM)

Parse any options in a Protobufs method from 'stream'. Returns a list of 'protobuf-option' objects. If a body was parsed, returns a second value T.

PARSE-PROTO-OPTION (STREAM PROTOBUF &OPTIONAL (TERMINATORS '(;)))

Parse a Protobufs option line from 'stream'. Updates the 'protobuf-schema' (or message, service, method) to have the option.

PARSE-PROTO-PACKAGE (STREAM SCHEMA &OPTIONAL (TERMINATOR ;))

Parse a Protobufs package line from 'stream'. Updates the 'protobuf-schema' object to use the package.

PARSE-PROTO-SERVICE (STREAM SCHEMA)

Parse a Protobufs 'service' from 'stream'. Updates the 'protobuf-schema' object to have the service.

PARSE-PROTO-SYNTAX (STREAM SCHEMA &OPTIONAL (TERMINATOR ;))

Parse a Protobufs syntax line from 'stream'. Updates the 'protobuf-schema' object to use the syntax.

PARSE-SIGNED-INT (STREAM)

Parse the next token in the stream as an integer, then skip the following whitespace. The returned value is the integer.

PARSE-STRING (STREAM)

Parse the next quoted string in the stream, then skip the following whitespace. The returned value is the string, without the quotation marks.

PARSE-TOKEN (STREAM &OPTIONAL ADDITIONAL-CHARS)

Parse the next token in the stream, then skip the following whitespace. The returned value is the token.

PARSE-UNSIGNED-INT (STREAM)

Parse the next token in the stream as an integer, then skip the following whitespace. The returned value is the integer.

PROCESS-FIELD (FIELD INDEX &KEY CONC-NAME ALIAS-FOR)

Process one field descriptor within 'define-message' or 'define-extend'. Returns a 'proto-field' object, a CLOS slot form and the incremented field index.

SET-LISP-PACKAGE (SCHEMA LISP-PACKAGE-NAME)

Set the package for generated lisp names of 'schema'.

SKIP-BLOCK-COMMENT (STREAM)

Skip to the end of a block comment, that is, until a '*/' is seen. Then skip any following whitespace.

SKIP-FIELD (STREAM)

Skip either a token or a balanced {}-pair.

SKIP-LINE-COMMENT (STREAM)

Skip to the end of a line comment, that is, to the end of the line. Then skip any following whitespace.

SKIP-WHITESPACE (STREAM)

Skip all the whitespace characters that are coming up in the stream.

SPLIT-STRING (LINE &KEY (START 0) (END (LENGTH LINE)) (SEPARATORS '(-)))

Given a string 'string', splits it at each of the separators. Returns a list of the string pieces, with empty pieces removed.

STARTS-WITH (STRING PREFIX &KEY (START 0))

Returns true if 'string' starts with the prefix 'prefix' (case insensitive).

STRCAT (&REST STRINGS)

Concatenate a bunch of strings.

UNCAMEL-CASE (NAME)

Take a camel-case string and turn it into a hyphen-separated string.

UNESCAPE-CHAR (STREAM)

Parse the next "escaped" character from the stream.

UPGRADE-WARN (FORMAT-STRING &REST FORMAT-ARGS)

Collect an upgrade warning into *upgrade-warnings*. Returns the list of warnings.

Undocumented

%MAKE-SOURCE-LOCATION (&KEY ((PATHNAME DUM467) NIL) ((START-POS DUM468) NIL) ((END-POS DUM469) NIL))

CACHED-OBJECT-SIZE

SETFCACHED-OBJECT-SIZE

CONC-NAME-FOR-TYPE (TYPE CONC-NAME)

DO-PROCESS-IMPORT (IMPORT &KEY (SEARCH-PATH *PROTOBUF-SEARCH-PATH*) (OUTPUT-PATH *PROTOBUF-OUTPUT-PATH*))

DOUBLE-FLOAT-BITS (X)

ENSURE-TYPE (TRACE MESSAGE FIELD TYPE)

ESCAPE-STRING (STRING)

INDEX-WITHIN-EXTENSIONS-P (INDEX MESSAGE)

LIST-OF-LIST-OF

MAKE-DOUBLE-FLOAT (LOW HIGH)

MAKE-SINGLE-FLOAT (BITS)

OPTION-NAME= (NAME1 NAME2)

PARSE-NUMBER (STREAM)

PARSE-NUMERIC-STRING (STRING)

PARSE-PROTO-EXTENSION (STREAM MESSAGE)

PARSE-TOKEN-OR-STRING (STREAM)

PROTO-EOL-CHAR-P

PROTO-TOKEN-CHAR-P

PROTO-WHITESPACE-CHAR-P

RECORD-PROTO-SOURCE-LOCATION (TYPE NAME DEFINITION-TYPE &OPTIONAL PATHNAME START-POS END-POS)

SATISFIES-LIST-OF-P (TYPE)

SINGLE-FLOAT-BITS (X)

SOURCE-LOCATION-END-POS (STRUCTURE)

SETFSOURCE-LOCATION-END-POS (NEW-VALUE STRUCTURE)

SOURCE-LOCATION-PATHNAME (STRUCTURE)

SETFSOURCE-LOCATION-PATHNAME (NEW-VALUE STRUCTURE)

SOURCE-LOCATION-START-POS (STRUCTURE)

SETFSOURCE-LOCATION-START-POS (NEW-VALUE STRUCTURE)

TYPE-EXPAND (TYPE)

MACRO

Private

APPENDF (PLACE TAIL)

Append 'tail' to the list given by 'place', then set the place to the new list.

DOSEQ ((VAR SEQUENCE &OPTIONAL VALUE) &BODY BODY)

Iterates over a sequence, using 'dolist' or 'dovector' depending on the type of the sequence. In optimized code, this turns out to be faster than (map () #'f sequence). Note that the body gets expanded twice!

DOVECTOR ((VAR VECTOR &OPTIONAL VALUE) &BODY BODY)

Like 'dolist', but iterates over the vector 'vector'.

GEN-LENGTH (BITS)

Generate 32- or 64-bit versions of integer length functions.

GEN-ZIG-ZAG (BITS)

Generate 32- or 64-bit versions of zig-zag encoder/decoder.

GENERATE-INTEGER-DECODERS (BITS)

Generate 32- or 64-bit versions of integer decoders.

GENERATE-INTEGER-ENCODERS (BITS)

Generate 32- or 64-bit versions of integer encoders.

UPGRADE-ASSERT ((PREDICATE OLD NEW) FORMAT-STRING &OPTIONAL NAME)

Assert that the condition is true, otherwise issue an upgrade warning.

WITH-COLLECTORS ((&REST COLLECTION-DESCRIPTIONS) &BODY BODY)

'collection-descriptions' is a list of clauses of the form (coll function). The body can call each 'function' to add a value to 'coll'. 'function' runs in constant time, regardless of the length of the list.

WITH-PROTO-SOURCE-LOCATION ((TYPE NAME DEFINITION-TYPE &OPTIONAL PATHNAME START-POS END-POS) &BODY BODY)

Establish a context which causes the generated Lisp code to have source location information that points to the .proto file. 'type' is the name of the Lisp definition (a symbol). 'name' is the name of the Protobufs definition (a string). 'definition-type' is the kind of definition, e.g., 'protobuf-enum'. 'pathname', 'start-pos' and 'end-pos' give the location of the definition in the .proto file.

Undocumented

I* (&REST FIXNUMS)

I+ (&REST FIXNUMS)

I- (NUMBER &REST FIXNUMS)

I< (&REST FIXNUMS)

I<= (&REST FIXNUMS)

I= (&REST FIXNUMS)

I> (&REST FIXNUMS)

I>= (&REST FIXNUMS)

IASH (VALUE COUNT)

IDECF (PLACE &OPTIONAL (DELTA 1) &ENVIRONMENT ENV)

IINCF (PLACE &OPTIONAL (DELTA 1) &ENVIRONMENT ENV)

ILDB (BYTESPEC VALUE)

ILOGAND (&REST FIXNUMS)

ILOGIOR (&REST FIXNUMS)

WITH-GENSYMS ((&REST BINDINGS) &BODY BODY)

WITH-PREFIXED-ACCESSORS (NAMES (PREFIX OBJECT) &BODY BODY)

WITHOUT-REDEFINITION-WARNINGS (NIL &BODY BODY)

GENERIC-FUNCTION

Public

ADD-OPTION (PROTOBUF NAME VALUE &OPTIONAL TYPE)

Given a Protobufs schema, message, enum, etc add the option called 'name' with the value 'value' and type 'type'. If the option was previoously present, it is replaced.

ENSURE-SCHEMA (SCHEMA)

Ensure that all of the types are defined in the Protobufs schema 'schema'. This returns two values: - A list whose elements are (<undefined-type> "message:field" ...) - The accumulated warnings table that has the same information as objects.

FIND-ENUM (PROTOBUF TYPE &OPTIONAL RELATIVE-TO)

Given a Protobufs schema or message and the name of an enum type, returns the Protobufs enum corresponding to the type.

FIND-FIELD (MESSAGE NAME &OPTIONAL RELATIVE-TO)

Given a Protobufs message and a slot name, field name or index, returns the Protobufs field having that name.

FIND-METHOD (SERVICE NAME)

Given a Protobufs service and a method name, returns the Protobufs method having that name.

FIND-OPTION (PROTOBUF NAME)

Given a Protobufs schema, message, enum, etc and the name of an option, returns the value of the option and its (Lisp) type. The third value is true if an option was found, otherwise it is false.

FIND-TYPE-ALIAS (PROTOBUF TYPE)

Given a Protobufs schema or message and the name of a type alias, returns the Protobufs type alias corresponding to the name.

MAKE-QUALIFIED-NAME (PROTO NAME)

Give a schema or message and a name, generate a fully qualified name string for the name.

REMOVE-OPTIONS (PROTOBUF &REST NAMES)

Given a Protobufs schema, message, enum, etc and a set of option names, remove all of those options from the set of options.

WRITE-SCHEMA-AS (TYPE PROTOBUF STREAM &KEY INDENTATION (INDENTATION 0) ARITY INDEX (SHOW-FIELD-INDEXES *SHOW-LISP-FIELD-INDEXES*) (SHOW-ENUM-INDEXES *SHOW-LISP-ENUM-INDEXES*) (USE-COMMON-LISP *USE-COMMON-LISP-PACKAGE*) MESSAGE MORE &ALLOW-OTHER-KEYS)

Writes the protobuf object 'protobuf' (schema, message, enum, etc) onto the given stream 'stream' in the format given by 'type' (:proto, :text, etc). If 'more' is true, this means there are more enum values, fields, etc to be written after the current one.

Undocumented

PROTO-SLOT (FIELD)

SETFPROTO-SLOT (SLOT FIELD)

Private

ANY-LISP-OPTION (SCHEMA)

Returns true iff there is anything in the schema that would require that the .proto file include and extend 'MessageOptions'.

CLEAR-SIZE-CACHE (OBJECT TYPE)

Clear the size cache for a tree of objects.

COLLECT-EXPORTS (SCHEMA)

Collect all the symbols that should be exported from a Protobufs package

EMPTY-DEFAULT-P (FIELD)

Returns true iff the default for the field is empty, ie, was not supplied.

MAKE-SIZE-CACHE (OBJECT TYPE)

Make an object size cache for 'object'.

RECORD-PROTOBUF (SCHEMA &OPTIONAL SYMBOL TYPE)

Record all the names by which the Protobufs schema might be known.

RESOLVE-LISP-NAMES (PROTOBUF)

Second pass of schema parsing which recursively resolves Protobuf type names to Lisp type names in all messages and services contained within 'protobuf'. No return value.

VECTOR-FIELD-P (FIELD)

Returns true if the storage for a 'repeated' field is a vector, returns false if the storage is a list.

WRITE-SCHEMA-DOCUMENTATION (TYPE DOCSTRING STREAM &KEY INDENTATION (INDENTATION 0))

Writes the docstring as a "block comment" onto the given stream 'stream' in the format given by 'type' (:proto, :text, etc).

WRITE-SCHEMA-HEADER (TYPE SCHEMA STREAM)

Writes a header for the schema onto the given stream 'stream' in the format given by 'type' (:proto, :text, etc).

Undocumented

SETFCLASS-DIRECT-SLOTS (NEW-VALUE SLOT-CLASS)

SETFCLASS-SLOTS (NEW-VALUE SLOT-CLASS)

ENSURE-FIELD (TRACE MESSAGE FIELD)

ENSURE-MESSAGE (TRACE MESSAGE)

ENSURE-METHOD (TRACE SERVICE METHOD)

ENSURE-SERVICE (TRACE SERVICE)

ERROR-WHERE (CONDITION)

FINALIZE-INHERITANCE (CLASS)

SLOT-ACCESSOR

Public

Undocumented

PROTO-ALIAS-FOR (OBJECT)

SETFPROTO-ALIAS-FOR (NEW-VALUE OBJECT)

PROTO-CLASS (OBJECT)

SETFPROTO-CLASS (NEW-VALUE OBJECT)

PROTO-CLIENT-STUB (OBJECT)

SETFPROTO-CLIENT-STUB (NEW-VALUE OBJECT)

PROTO-CONC-NAME (OBJECT)

SETFPROTO-CONC-NAME (NEW-VALUE OBJECT)

PROTO-DEFAULT (OBJECT)

SETFPROTO-DEFAULT (NEW-VALUE OBJECT)

PROTO-DESERIALIZER (OBJECT)

PROTO-DOCUMENTATION (OBJECT)

SETFPROTO-DOCUMENTATION (NEW-VALUE OBJECT)

PROTO-ENUMS (OBJECT)

SETFPROTO-ENUMS (NEW-VALUE OBJECT)

PROTO-EXTENDED-FIELDS (OBJECT)

SETFPROTO-EXTENDED-FIELDS (NEW-VALUE OBJECT)

PROTO-EXTENDERS (OBJECT)

SETFPROTO-EXTENDERS (NEW-VALUE OBJECT)

PROTO-EXTENSION-FROM (OBJECT)

SETFPROTO-EXTENSION-FROM (NEW-VALUE OBJECT)

PROTO-EXTENSION-TO (OBJECT)

SETFPROTO-EXTENSION-TO (NEW-VALUE OBJECT)

PROTO-EXTENSIONS (OBJECT)

SETFPROTO-EXTENSIONS (NEW-VALUE OBJECT)

PROTO-FIELDS (OBJECT)

SETFPROTO-FIELDS (NEW-VALUE OBJECT)

PROTO-IMPORTED-SCHEMAS (OBJECT)

SETFPROTO-IMPORTED-SCHEMAS (NEW-VALUE OBJECT)

PROTO-IMPORTS (OBJECT)

SETFPROTO-IMPORTS (NEW-VALUE OBJECT)

PROTO-INDEX (OBJECT)

SETFPROTO-INDEX (NEW-VALUE OBJECT)

PROTO-INPUT-NAME (OBJECT)

SETFPROTO-INPUT-NAME (NEW-VALUE OBJECT)

PROTO-INPUT-TYPE (OBJECT)

SETFPROTO-INPUT-TYPE (NEW-VALUE OBJECT)

PROTO-LISP-PACKAGE (OBJECT)

SETFPROTO-LISP-PACKAGE (NEW-VALUE OBJECT)

PROTO-LISP-TYPE (OBJECT)

PROTO-MESSAGE-TYPE (OBJECT)

SETFPROTO-MESSAGE-TYPE (NEW-VALUE OBJECT)

PROTO-MESSAGES (OBJECT)

SETFPROTO-MESSAGES (NEW-VALUE OBJECT)

PROTO-METHODS (OBJECT)

SETFPROTO-METHODS (NEW-VALUE OBJECT)

PROTO-NAME (OBJECT)

PROTO-OPTIONS (OBJECT)

SETFPROTO-OPTIONS (NEW-VALUE OBJECT)

PROTO-OUTPUT-NAME (OBJECT)

SETFPROTO-OUTPUT-NAME (NEW-VALUE OBJECT)

PROTO-OUTPUT-TYPE (OBJECT)

SETFPROTO-OUTPUT-TYPE (NEW-VALUE OBJECT)

PROTO-PACKAGE (OBJECT)

SETFPROTO-PACKAGE (NEW-VALUE OBJECT)

PROTO-PACKED (OBJECT)

SETFPROTO-PACKED (NEW-VALUE OBJECT)

PROTO-PARENT (OBJECT)

SETFPROTO-PARENT (NEW-VALUE OBJECT)

PROTO-PROTO-TYPE (OBJECT)

PROTO-QUALIFIED-NAME (OBJECT)

SETFPROTO-QUALIFIED-NAME (NEW-VALUE OBJECT)

PROTO-READER (OBJECT)

SETFPROTO-READER (NEW-VALUE OBJECT)

PROTO-REQUIRED (OBJECT)

SETFPROTO-REQUIRED (NEW-VALUE OBJECT)

PROTO-SERIALIZER (OBJECT)

PROTO-SERVER-STUB (OBJECT)

SETFPROTO-SERVER-STUB (NEW-VALUE OBJECT)

PROTO-SERVICES (OBJECT)

SETFPROTO-SERVICES (NEW-VALUE OBJECT)

PROTO-SOURCE-LOCATION (OBJECT)

SETFPROTO-SOURCE-LOCATION (NEW-VALUE OBJECT)

PROTO-STREAMS-NAME (OBJECT)

SETFPROTO-STREAMS-NAME (NEW-VALUE OBJECT)

PROTO-STREAMS-TYPE (OBJECT)

SETFPROTO-STREAMS-TYPE (NEW-VALUE OBJECT)

PROTO-SYNTAX (OBJECT)

SETFPROTO-SYNTAX (NEW-VALUE OBJECT)

PROTO-TYPE (OBJECT)

SETFPROTO-TYPE (NEW-VALUE OBJECT)

PROTO-TYPE-ALIASES (OBJECT)

SETFPROTO-TYPE-ALIASES (NEW-VALUE OBJECT)

PROTO-VALUE (OBJECT)

SETFPROTO-VALUE (NEW-VALUE OBJECT)

PROTO-VALUES (OBJECT)

SETFPROTO-VALUES (NEW-VALUE OBJECT)

PROTO-WRITER (OBJECT)

SETFPROTO-WRITER (NEW-VALUE OBJECT)

Private

Undocumented

CLASS-DIRECT-SLOTS (CLASS)

CLASS-FINALIZED-P (CLASS)

CLASS-PRECEDENCE-LIST (PCL-CLASS)

CLASS-SLOTS (CLASS)

PROTO-PROTO-TYPE-STR (OBJECT)

SLOT-DEFINITION-INITFORM (SLOT-DEFINITION)

SETFSLOT-DEFINITION-INITFORM (NEW-VALUE SLOT-DEFINITION)

SLOT-DEFINITION-INITFUNCTION (SLOT-DEFINITION)

SETFSLOT-DEFINITION-INITFUNCTION (NEW-VALUE SLOT-DEFINITION)

SLOT-DEFINITION-NAME (SLOT-DEFINITION)

SETFSLOT-DEFINITION-NAME (NEW-VALUE SLOT-DEFINITION)

SLOT-DEFINITION-READERS (SLOT-DEFINITION)

SETFSLOT-DEFINITION-READERS (NEW-VALUE SLOT-DEFINITION)

SLOT-DEFINITION-TYPE (SLOT-DEFINITION)

SETFSLOT-DEFINITION-TYPE (NEW-VALUE SLOT-DEFINITION)

SLOT-DEFINITION-WRITERS (SLOT-DEFINITION)

SETFSLOT-DEFINITION-WRITERS (NEW-VALUE SLOT-DEFINITION)

VARIABLE

Public

*ALL-MESSAGES*

A global table mapping Lisp class names to 'protobuf-message' objects.

*ALL-SCHEMAS*

A global table mapping names to 'protobuf-schema' objects.

*PROTOBUF*

Bound to the Protobufs object currently being defined, either a schema or a message.

*PROTOBUF-CONC-NAME*

Bound to a conc-name to use for all the messages in the schema being defined. This controls the name of the accessors the fields of each message. When it's nil, there is no "global" conc-name. When it's t, each message will use the message name as the conc-name. When it's a string, that string will be used as the conc-name for each message. 'parse-schema-from-file' defaults conc-name to "", meaning that each field in every message has an accessor whose name is the name of the field.

*PROTOBUF-OUTPUT-PATH*

Bound to the path to use to direct output during imports, etc.

*PROTOBUF-PACKAGE*

Bound to the Lisp package in which the Protobufs schema is being defined.

*PROTOBUF-PATHNAME*

Bound to he name of the file from where the .proto file is being parsed.

*PROTOBUF-SEARCH-PATH*

Bound to the search-path to use to resolve any relative pathnames.

*RPC-CALL-FUNCTION*

The Lisp function that implements RPC client-side calls. This should be set when an RPC package that uses CL-Protobufs gets loaded.

*RPC-PACKAGE*

The Lisp package that implements RPC. This should be set when an RPC package that uses CL-Protobufs gets loaded.

Undocumented

*ALIAS-EXISTING-CLASSES*

Private

$OPTIMIZE-DEFAULT

Compiler optimization settings for safe, debuggable code.

$OPTIMIZE-FAST-UNSAFE

Compiler optimization settings for fast, unsafe, hard-to-debug code.

*PROTOBUF-RPC-PACKAGE*

Bound to the Lisp package in which the Protobufs schema's service definitions are being defined.

*SUPPRESS-LINE-BREAKS*

When true, don't generate line breaks in the text format

*UNDEFINED-MESSAGES*

Bound to a list of undefined messages during schame validation.

*UPGRADE-WARNINGS*

Bound to the list of upgrade warning messages.

Undocumented

$OPTIMIZE-SERIALIZATION

*CAMEL-CASE-FIELD-NAMES*

*LISP-OPTIONS*

*OPTION-TYPES*

*PROTO-NAME-SEPARATORS*

*PROTOBUF-ENUM-COMMENT-COLUMN*

*PROTOBUF-FIELD-COMMENT-COLUMN*

*PROTOBUF-SLOT-COMMENT-COLUMN*

*SHOW-LISP-ENUM-INDEXES*

*SHOW-LISP-FIELD-INDEXES*

*USE-COMMON-LISP-PACKAGE*

CLASS

Public

BASE-PROTOBUF

The base class for all Protobufs model classes.

BASE-PROTOBUF-MESSAGE

The base class for all user-defined Protobufs messages.

Undocumented

ABSTRACT-PROTOBUF

CONDITION

Public

Undocumented

PROTOBUFS-WARNING

Private

UNDEFINED-METHOD-TYPE

Superclass for `undefined-type' errors related to a `protobuf-method'. Indicates that a schema contains a service with a method whose input, output, or stream type is not a known message (or extend).

UNDEFINED-TYPE

Indicates that a schema references a type which has not been defined.

CONSTANT

Public

Undocumented

$WIRE-TYPE-32BIT

$WIRE-TYPE-64BIT

$WIRE-TYPE-END-GROUP

$WIRE-TYPE-START-GROUP

$WIRE-TYPE-STRING

$WIRE-TYPE-VARINT

Private

$EMPTY-DEFAULT

The marker used in 'proto-default' used to indicate that there is no default value.

Undocumented

$EMPTY-LIST

$EMPTY-VECTOR