Name

packet — A single packet in a data file

Synopsis

Content Model
packet ::= (type-specific content,
            tag*, packet*)
The contents of a packet element depend upon the particular type of packet (such as container, text, triangulation and so on). The specific content model for each packet type is documented on its own reference page; see below for details.
Attributes
NameType
labelCDATA (required)
parentCDATA
typeCDATA
typeidNUMBER (required)
idCDATA

Description

A packet element represents a single packet in a Regina data file. A packet is a single data object, such as a triangulation, a text note or a Python script. A general discussion of packets and their different types can be found in the users' handbook.

The precise packet content model differs between packet types. These type-specific content models are individually documented on the following reference pages.

Each packet may have an arbitrary set of string tags associated with it; these are represented by the child tag elements.

Packets in a data file are arranged in a tree structure; each packet (aside from the top-level packet) has a single parent packet and zero or more child packets. The child packets of this packet are represented by the child packet elements of this element.

Parents

The following elements contain packet: packet, reginadata.

Children

The following elements occur in packet regardless of packet type: packet, tag.

Additional elements may also occur for specific packet types; these are documented on separate reference pages for each individual packet type (see above).

Attributes

label

The label of this particular packet, i.e., the name associated with this packet in the overall packet tree.

parent

The label of the parent of this packet in the overall packet tree. This attribute should be the empty string if this packet has no parent (i.e., this packet is the root of the entire packet tree).

type

The packet type expressed as a human-readable string. Example types are Container, Text and Triangulation.

typeid

The packet type expressed as an internal identification code. This will be a positive integer.

id

A unique identifier for this packet. Packets are not required to have IDs, but when they are present they must be distinct (i.e., no packets in the same file may share the same ID). IDs do not need to be human-readable, must not contain leading or trailing whitespace, and must not be empty strings. As of Regina 4.95, IDs are built from base 64 hashes of the underlying C++ pointers.

The purpose of these packet IDs is to allow other packets to reference this packet (for instance, so that a script packet can store references to its variables).

IDs are not required to stay the same across subsequent loads and saves of the same file. In other words, if you load a file and save it again, the packet IDs are allowed to change.