Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add well-known metadata keys #3

Open
wants to merge 1 commit into
base: development
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions include/piwcsprwmodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,47 @@
* The convention for metadata key names is `snake_case`. Should namespaces be
* required, they should be separated with dots: `my_namespace.subgroup.my_key`.
*
* The keys and values are valid Unicode strings encoded as UTF-8 strings. Keys
* are no longer than 255 bytes. Note that the model does not check or enforce
* these rules.
*
* This implementation preserves and exposes all metadata entries and does not
* interpret any of them.
*
* #### Well-known metadata keys
* These keys, if present, should have the following meaning and format:
*
* - `cluster`
*
* Applies to Nodes. Format: `[a-z_]+(\.[a-z_]+)*`, max 255 UTF-8 bytes.
*
* ID of the innermost cluster the node belongs to. If missing, assume not
* part of any cluster.
*
* @note
* Models may be recursively partially partitioned into clusters by physical
* proximity and semantics. Clusters may be used to speed up routing, or to
* hide details on maps. For example, cluster `bell_station` may include all
* nodes that form a hypothetical Bell Station, while cluster
* `bell_station.north` may include all Bell Station nodes that form its
* northern intersection.
*
* - `maintainer`
*
* Applies to all Model entities. Format: any string, max 255 UTF-8 bytes.
*
* In-game name of the person or collective responsible for the functioning of
* the entity. If missing, assume unmaintained.
*
* - `track_type`
*
* Applies to Sections.
* Format: `electrified` | `highspeed` | (future value, max 255 UTF-8 bytes).
*
* Name of schema used to place track blocks. For example, `powered_3_8` may,
* in the future, mean "8 vanilla rails followed by 3 vanilla powered rails,
* repeated." If missing, assume `electrified`.
*
* ## Illustrated Example
*
* @image html "illustration-1.svg" "Small model example"
Expand Down