IofCourse
Types
courseControl
A single control visit on a course, referencing a control by id.
rescript
type courseControl = {
controlId: string,
controlIds: array<string>,
controlType: option<string>,
order: option<int>,
mapText: option<string>,
mapTextPosition: option<IofXml.IofControl.mapPosition>,
legLength: option<float>,
score: option<int>,
randomOrder: option<bool>,
specialInstruction: option<string>,
tapedRouteLength: option<float>,
modifyTime: option<string>,
}Fields:
controlId:string— The id of the referenced control.controlIds:array<string>— All referenced control ids; multiple ids represent alternative controls.controlType:option<string>— The type of control, e.g."Start","Finish", or"Control".order:option<int>— The visiting order of this control on the course.mapText:option<string>— Text printed next to the control circle.mapTextPosition:option<IofXml.IofControl.mapPosition>— Position ofmapTextin the map coordinate system.legLength:option<float>— Length in metres from the previous control to this control.score:option<int>— Score value for score-orienteering controls.randomOrder:option<bool>— Whether this control belongs to an arbitrary-order block.specialInstruction:option<string>— Special instruction from the IOFspecialInstructionattribute.tapedRouteLength:option<float>— Taped route length from the IOFtapedRouteLengthattribute.modifyTime:option<string>— The IOFmodifyTimeattribute, if supplied.
t
Defines a course — its name, length, climb, and the ordered sequence of controls.
See: Course in the IOF XML 3.0 XSD
rescript
type t = {
id: option<string>,
name: option<string>,
courseFamily: option<string>,
length: option<float>,
climb: option<float>,
numberOfControls: option<int>,
mapId: option<string>,
controls: array<courseControl>,
}Fields:
id:option<string>— The identifier of the course.name:option<string>— The name of the course.courseFamily:option<string>— The course family used to group forked courses.length:option<float>— The length of the course in metres.climb:option<float>— The climb of the course in metres.numberOfControls:option<int>— The number of controls on the course, excluding start and finish.mapId:option<string>— Reference to the map used for this course.controls:array<courseControl>— The ordered sequence of controls on the course.
Values
parseBool
rescript
let parseBool: string => option<bool>parse
rescript
let parse: IofXml.XmlUtils.xmlElement => option<t>