}
o("\n};\n");
}
- o("static const SegmentInfo info_segments[".scalar(@segs)."]= {");
+ o("const SegmentNum info_nsegments=NUM_SEGMENTS;\n");
+ o("const SegmentInfo info_segments[NUM_SEGMENTS]= {");
$delim= '';
foreach $seg (@segs) {
$segr= $segs{$seg};
O! when defining object or part O
N:T scope T but inside part (introduced with `part') N } when
O::T scope T but inside obj (introduced with `obj[flip]') O } placing
+
+
+See also:
+ layout-data.h for info regarding layout data deliverables for use by
+ control and UI software
+ redactgraph.c, extractgraph for info regarding extraction and
+ preparation of those deliverables
-/**/
+/*
+ */
+/* The output from the layout processing system to the control
+ * software, describing the layout and the trains, is a data structure
+ * as described in this header file, in <name-of-layout>.layout-data.o
+ * (where <name-of-layout> is currently `ours').
+ *
+ * Alternatively, <name-of-layout>.redacted.forsafety contains data in
+ * the form described at the top of redactgraph.c.
+ */
#ifndef LAYOUT_DATA_H
#define LAYOUT_DATA_H
const char *pname;
} TrainInfo;
-extern const SegmentInfo info_segments[];
+/* These data arrays have no sentinel members. Use the info_nfoobars
+ * constants. Alternatively, it is legal to sed out everything from
+ * <name-of-layout>.layout-data.c from the first #include onwards, and
+ * this will give definitions of NUM_SEGMENTS and NUM_TRAINS.
+ */
+
+extern const SegmentNum info_nsegments;
+extern const SegmentInfo info_segments[];
+
+extern const TrainNum info_nsegments;
extern const TrainInfo info_trains[];
#define NOTA(x) (~(x##Num)0)
* the same <segment>
* - not at all (indicates a terminus)
* Refer to safety.h for info regarding <combpos>.
+ *
+ * See layout-data.h comment for info regarding layout data for
+ * control system.
*/
/* for debugging, runes like
* ./ours.redactgraph consistency movfeatsplitedges consistency movfeatrmstubs consistency movfeatsplitnodes consistency trivpairnodes consistency trivnullnodes consistency printforneato | neato -Tps >u.ps