packet |
Prev | Deprecated and Removed Elements | Next |
Name
packet — Replaced by different elements for different packet types
Synopsis
Content Model | ||
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 | ||
Name | Type | Version |
label | CDATA (required) | |
parent | CDATA | |
type | CDATA | |
typeid | NUMBER (required) | |
id | CDATA | Added in Regina 4.95 |
Deprecated since Regina 7.0
Description
In Regina 6.0.1 and earlier, the packet
element was used
to store every packet in the entire packet tree that makes up a
Regina data file.
Since Regina 7.0, each packet type has its own XML element,
and packet
is no longer used.
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.
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
andTriangulation
.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. Currently, 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.
Prev | Contents | Next |
orbl (filter) | Up | packet (2-dimensional triangulation) |