LReference Struct

#include <Layers/lparser.h>

Public Members

std::vector<LString> traversal
LString group
LString item

Detailed Description

A reference is an expressible sequence of names that identifies one specific declared item.

References are shaped like declarations (traversal, group, and item members), but a reference must name exactly one item, so its names can't contain expansions. Therefore, each name is a single LString (its words joined by spaces) instead of an LName.

Left Pane                       // item = "Left Pane"

End.Position                    // group = "End"
                                // item = "Position"

End.                            // Invalid reference; should have an item

Window/(Left,Right) Pane        // Invalid reference; which pane?

Cancel Button/Fill              // traversal = {"Cancel Button"}
                                // item = "Fill"

Window/Titlebar/Exit Button     // traversal = {"Window","Titlebar"}
                                // item = "Exit Button"

Button/Layout.Direction         // traversal = {"Button"}
                                // group = "Layout"
                                // item = "Direction"

The parser doesn't validate whether the item referenced has been declared or not; the engine does during resolution.

Member Variable Documentation

std::vector<LString> traversal

Names of the parents in the referenced item's hierarchy

LString group

Name of the group that the item is associated with

LString item

Name of the referenced item

Appearance
Theme
—