Library_unoidl contains the unoidl::Manager and unoidl::Provider implementations for the following registry formats:
UNOIDL binary types.rdb format.types.rdb format (based on modules "store" and "registry").UNOIDL entity definitions directly from a single .idl source file.UNOIDL entity definitions directly from a tree of .idl source files rooted at a given directory. (Where an entity named foo.bar.Baz is expected in a file named foo/bar/Baz.idl within that tree.)(While .idl files still contain #include directives for legacy idlc, the source- based formats ignore any preprocessing directives starting with # in the .idl files.) unoidl::Manager::addProvider transparently detects the registry format for a given URI and instantiates the corresponding provider implementation.
Executable_unoidl-write is a helper tool to convert from any of the registry formats to the UNOIDL format. It is used at build-time to compile UNOIDL format .rdb files (that are used at build-time only, or included in installation sets in URE or program/types/ or as part of bundled extensions that are created during the build and not merely included as pre-built .oxt files) from source .idl files. (The SDK still supports deprecated idlc generating legacy format .rdb files for now.)
Executable_unoidl-read is a helper tool to convert from any of the registry formats to the source-file format. It can be used manually after a LibreOffice version update to create new reference registries for Executable_unoidl-check.
Executable_unoidl-check is a helper tool to check that one registry is backwards-compatible with another registry. It is used at build-time to detect inadvertent breakage of the udkapi and offapi APIs.
The format uses byte-oriented, platform-independent, binary files. Larger quantities are stored LSB first, without alignment requirements. Offsets are 32 bit, effectively limiting the overall file size to 4GB, but that is not considered a limitation in practice (and avoids unnecessary bloat compared to 64 bit offsets).
Annotations can be added for (non-module) entities and certain parts of such entities (e.g., both for an interface type definition and for a direct method of an interface type definition; the idea is that it can be added for direct parts that forma a "many-to-one" relationship; there is a tradeoff between generality of concept and size of representation, esp. for the C++ representation types in namespace unoidl) and consist of arbitrary sequences of name/value strings. Each name/value string is encoded as a single UTF-8 string containing a name (an arbitrary sequence of Unicode code points not containing U+003D EQUALS SIGN), optionally followed by U+003D EQUALS SIGN and a value (an arbitrary sequence of Unicode code points). The only annotation name currently in use is "deprecated" (without a value).
The following definitions are used throughout:
UInt16: 2-byte value, LSB firstUInt32: 4-byte value, LSB firstUInt64: 8-byte value, LSB firstUInt32 value, counting bytes from start of fileNUL-Name: zero or more non-NUL US-ASCII bytes followed by a NUL byte0x80000000 bit 0, followed by that many US-ASCII (for UNOIDL related names) resp. UTF-8 (for annotations) bytes0x80000000 bit 1) of a Len-String, or a Len-StringUInt32 number N of annotations followed by N * Idx-StringNUL-Name followed by Offset of payloadThe file starts with an 8 byte header, followed by information about the root map (unoidl-write generates files in a single depth-first pass, so the root map itself is at the end of the file):
UNOIDL\xFFUInt32 number of entries of root Map ...Files generated by unoidl-write follow that by a
"\0** Created by LibreOffice " LIBO_VERSION_DOTTED " unoidl-write **\0"
banner (cf. config_host/config_version.h.in), as a debugging aid. (Old versions used reg2unoidl instead of unoidl-write in that banner.)
Layout of per-entry payload in the root or a module Map:
kind byte:
0: module
UInt32 number N1 of entries of MapN1 * Entryotherwise:
0x80 bit: 1 if published
0x40 bit: 1 if annotated
0x20 bit: flag (may only be 1 for certain kinds, see below)
remaining bits:
1: enum type
UInt32 number N1 of membersN1 * tuple of:Idx-StringUInt322: plain struct type (with base if flag is 1)
Idx-StringUInt32 number N1 of direct membersN1 * tuple of:Idx-String nameIdx-String type3: polymorphic struct type template
UInt32 number N1 of type parametersN1 * Idx-StringUInt32 number N2 of membersN2 * tuple of:0x01 bit is 1 if parameterized typeIdx-String nameIdx-String type4: exception type (with base if flag is 1)
Idx-StringUInt32 number N1 of direct membersN1 * tuple of:Idx-String nameIdx-String type5: interface type
UInt32 number N1 of direct mandatory basesN1 * tuple of:Idx-StringUInt32 number N2 of direct optional basesN2 * tuple of:Idx-StringUInt32 number N3 of direct attributesN3 * tuple of:0x02 bit: 1 if read-only0x01 bit: 1 if boundIdx-String nameIdx-String typeUInt32 number N4 of get exceptionsN4 * Idx-StringUInt32 number N5 of set exceptionsN5 * Idx-StringUInt32 number N6 of direct methodsN6 * tuple of:Idx-String nameIdx-String return typeUInt32 number N7 of parametersN7 * tuple of:Idx-String nameIdx-String typeUInt32 number N8 of exceptions6: typedef
Idx-String7: constant group
UInt32 number N1 of entries of MapN1 * Entry8: single-interface--based service (with default constructor if flag is 1)
Idx-StringUInt32 number N1 of constructorsN1 * tuple of:Idx-StringUInt32 number N2 of parametersN2 * tuple of0x04 bit is 1 if rest parameterIdx-String nameIdx-String typeUInt32 number N3 of exceptionsN3 * Idx-String9: accumulation-based service
UInt32 number N1 of direct mandatory base servicesN1 * tuple of:Idx-StringUInt32 number N2 of direct optional base servicesN2 * tuple of:Idx-StringUInt32 number N3 of direct mandatory base interfacesN3 * tuple of:Idx-StringUInt32 number N4 of direct optional base interfacesN4 * tuple of:Idx-StringUInt32 number N5 of direct propertiesN5 * tuple of:UInt16 kind:0x0100 bit: 1 if optional0x0080 bit: 1 if removable0x0040 bit: 1 if maybedefault0x0020 bit: 1 if maybeambiguous0x0010 bit: 1 if readonly0x0008 bit: 1 if transient0x0004 bit: 1 if constrained0x0002 bit: 1 if bound0x0001 bit: 1 if maybevoidIdx-String nameIdx-String type10: interface-based singleton
Idx-String11: service-based singleton
Idx-Stringif annotated, followed by: Annotations
Layout of per-entry payload in a constant group Map:
kind byte:
0x80 bit: 1 if annotated
remaining bits:
0: BOOLEAN
1: BYTE
2: SHORT
UInt16 value, representing values with two's complement3: UNSIGNED SHORT
UInt16 value4: LONG
UInt32 value, representing values with two's complement5: UNSIGNED LONG
UInt32 value6: HYPER
UInt64 value, representing values with two's complement7: UNSIGNED HYPER
UInt64 value8: FLOAT
9: DOUBLE
if annotated, followed by: Annotations