Skip to main content

Module program

Module program 

Source
Expand description

The program data chunk (SPEC.md, section 13): each program’s own documents, by program name and subject, a node or the whole file.

The documents are carried without being read: what one holds belongs to the program that wrote it. Every entry’s program name is checked, every subject is a node of the scene or the whole file, and no two entries have the same program and subject.

entries   u32 count, then per entry:
          u32 length, the program's name
          u32 the node index the entry is about, or FFFFFFFF for the file
          u32 the program's own version of the document
          u32 length, the document

Structs§

ProgramEntry
One program’s document about the whole file or one node.

Enums§

DecodeProgramDataError
Why a program data payload could not be decoded.
EncodeProgramDataError
Why a list of program data entries could not be encoded.

Constants§

PROGRAM_TAG
The tag of the program data chunk.
PROGRAM_VERSION
The program data payload layout this build writes and reads.

Functions§

decode_program_data
Decodes a program data payload, checking it against scene, the scene of the same file.
encode_program_data
Encodes entries as a program data payload, in their order, checking them against scene.
is_program_name
Whether name is a program name (SPEC.md, section 13.1): 1 to 64 lowercase ASCII letters, digits, ., - and _, the first a letter. The program data, the surface paint and the volumes name their programs this way.