diff --git a/core.go b/core.go index ad82861..835739f 100644 --- a/core.go +++ b/core.go @@ -23,19 +23,19 @@ type EUnitSlope struct { type EUnitSpeed struct { } -type TGrEqZero struct { +type GrEqZero struct { } -type TGrEqZeroOrContactPoint struct { +type GrEqZeroOrContactPoint struct { } -type TGrZero struct { +type GrZero struct { } -type TYesNo struct { +type YesNo struct { } -type TZeroOne struct { +type ZeroOne struct { } // TODO: Doc formatting needs to be implemented! @@ -57,10 +57,10 @@ type DataQualityRawData struct { // TODO: Doc formatting needs to be implemented! type Header struct { OpenDriveElement - GeoReference HeaderGeoReference - Offset HeaderOffset - License License - DefaultRegulations HeaderDefaultRegulations + GeoReference []*HeaderGeoReference + Offset []*HeaderOffset + License []*License + DefaultRegulations []*HeaderDefaultRegulations Date string East float64 Name string @@ -76,8 +76,8 @@ type Header struct { // TODO: Doc formatting needs to be implemented! type HeaderDefaultRegulations struct { OpenDriveElement - RoadRegulations HeaderRoadRegulation - SignalRegulations HeaderSignalRegulation + RoadRegulations []*HeaderRoadRegulation + SignalRegulations []*HeaderSignalRegulation } // TODO: Doc formatting needs to be implemented! @@ -96,14 +96,14 @@ type HeaderOffset struct { // TODO: Doc formatting needs to be implemented! type HeaderRoadRegulation struct { OpenDriveElement - Semantics SignalsSemantics + Semantics []*SignalsSemantics Type ERoadType } // TODO: Doc formatting needs to be implemented! type HeaderSignalRegulation struct { OpenDriveElement - Semantics SignalsSemantics + Semantics []*SignalsSemantics Subtype string Type string } diff --git a/junction.go b/junction.go index 63a3e27..60ab811 100644 --- a/junction.go +++ b/junction.go @@ -26,7 +26,7 @@ type ERoadSurfaceCrgMode struct { type ERoadSurfaceCrgPurpose struct { } -type TJunctionGridPositionList struct { +type JunctionGridPositionList struct { } // TODO: Doc formatting needs to be implemented! @@ -37,7 +37,7 @@ type Junction struct { // TODO: Doc formatting needs to be implemented! type JunctionBoundary struct { OpenDriveElement - Segment JunctionBoundarySegment + Segment []*JunctionBoundarySegment } // TODO: Doc formatting needs to be implemented! @@ -58,21 +58,21 @@ type JunctionBoundarySegmentLane struct { // TODO: Doc formatting needs to be implemented! type JunctionCommon struct { Junction - Connection JunctionConnectionCommon - CrossPath JunctionCrossPath - Priority JunctionPriority - Controller JunctionController - Surface RoadSurface - PlanView RoadPlanView - Objects RoadObjects - Boundary JunctionBoundary - ElevationGrid JunctionElevationGrid + Connection []*JunctionConnectionCommon + CrossPath []*JunctionCrossPath + Priority []*JunctionPriority + Controller []*JunctionController + Surface []*RoadSurface + PlanView []*RoadPlanView + Objects []*RoadObjects + Boundary []*JunctionBoundary + ElevationGrid []*JunctionElevationGrid } // TODO: Doc formatting needs to be implemented! type JunctionConnection struct { OpenDriveElement - LaneLink JunctionConnectionLaneLink + LaneLink []*JunctionConnectionLaneLink } // TODO: Doc formatting needs to be implemented! @@ -93,8 +93,8 @@ type JunctionConnectionLaneLink struct { // TODO: Doc formatting needs to be implemented! type JunctionConnectionVirtual struct { JunctionConnection - Predecessor JunctionPredecessorSuccessor - Successor JunctionPredecessorSuccessor + Predecessor []*JunctionPredecessorSuccessor + Successor []*JunctionPredecessorSuccessor } // TODO: Doc formatting needs to be implemented! @@ -110,12 +110,12 @@ type JunctionController struct { // TODO: Doc formatting needs to be implemented! type JunctionCrossing struct { Junction - RoadSection JunctionRoadSection - Priority JunctionPriority - Controller JunctionController - Surface RoadSurface - PlanView RoadPlanView - Objects RoadObjects + RoadSection []*JunctionRoadSection + Priority []*JunctionPriority + Controller []*JunctionController + Surface []*RoadSurface + PlanView []*RoadPlanView + Objects []*RoadObjects } // TODO: Doc formatting needs to be implemented! @@ -136,18 +136,18 @@ type JunctionCrossPathLaneLink struct { // TODO: Doc formatting needs to be implemented! type JunctionDirect struct { Junction - Connection JunctionConnectionDirect - Priority JunctionPriority - Controller JunctionController - Surface RoadSurface - PlanView RoadPlanView - Objects RoadObjects + Connection []*JunctionConnectionDirect + Priority []*JunctionPriority + Controller []*JunctionController + Surface []*RoadSurface + PlanView []*RoadPlanView + Objects []*RoadObjects } // TODO: Doc formatting needs to be implemented! type JunctionElevationGrid struct { OpenDriveElement - Elevation JunctionElevationGridElevation + Elevation []*JunctionElevationGridElevation } // TODO: Doc formatting needs to be implemented! @@ -173,19 +173,19 @@ type JunctionRoadSection struct { // TODO: Doc formatting needs to be implemented! type JunctionVirtual struct { Junction - Connection JunctionConnection - CrossPath JunctionCrossPath - Priority JunctionPriority - Controller JunctionController - Surface RoadSurface - PlanView RoadPlanView - Objects RoadObjects + Connection []*JunctionConnection + CrossPath []*JunctionCrossPath + Priority []*JunctionPriority + Controller []*JunctionController + Surface []*RoadSurface + PlanView []*RoadPlanView + Objects []*RoadObjects } // TODO: Doc formatting needs to be implemented! type JunctionGroup struct { OpenDriveElement - JunctionReference JunctionGroupJunctionReference + JunctionReference []*JunctionGroupJunctionReference } // TODO: Doc formatting needs to be implemented! diff --git a/lane.go b/lane.go index bf08436..b173552 100644 --- a/lane.go +++ b/lane.go @@ -32,14 +32,14 @@ type ERoadMarkType struct { type ERoadMarkWeight struct { } -type TBool struct { +type Bool struct { } // TODO: Doc formatting needs to be implemented! type RoadLanes struct { OpenDriveElement - LaneOffset RoadLanesLaneOffset - LaneSection RoadLanesLaneSection + LaneOffset []*RoadLanesLaneOffset + LaneSection []*RoadLanesLaneSection } // TODO: Doc formatting needs to be implemented! @@ -50,21 +50,21 @@ type RoadLanesLaneOffset struct { // TODO: Doc formatting needs to be implemented! type RoadLanesLaneSection struct { OpenDriveElement - Left RoadLanesLaneSectionLeft - Center RoadLanesLaneSectionCenter - Right RoadLanesLaneSectionRight + Left []*RoadLanesLaneSectionLeft + Center []*RoadLanesLaneSectionCenter + Right []*RoadLanesLaneSectionRight } // TODO: Doc formatting needs to be implemented! type RoadLanesLaneSectionCenter struct { OpenDriveElement - Lane RoadLanesLaneSectionCenterLane + Lane []*RoadLanesLaneSectionCenterLane } // TODO: Doc formatting needs to be implemented! type RoadLanesLaneSectionCenterLane struct { Id int - Level TBool + Level Bool Type ELaneType Link RoadLanesLaneSectionLcrLaneLink RoadMark RoadLanesLaneSectionLcrLaneRoadMark @@ -73,8 +73,8 @@ type RoadLanesLaneSectionCenterLane struct { // TODO: Doc formatting needs to be implemented! type RoadLanesLaneSectionLcrLaneLink struct { OpenDriveElement - Predecessor RoadLanesLaneSectionLcrLaneLinkPredecessorSuccessor - Successor RoadLanesLaneSectionLcrLaneLinkPredecessorSuccessor + Predecessor []*RoadLanesLaneSectionLcrLaneLinkPredecessorSuccessor + Successor []*RoadLanesLaneSectionLcrLaneLinkPredecessorSuccessor } // TODO: Doc formatting needs to be implemented! @@ -85,15 +85,15 @@ type RoadLanesLaneSectionLcrLaneLinkPredecessorSuccessor struct { // TODO: Doc formatting needs to be implemented! type RoadLanesLaneSectionLcrLaneRoadMark struct { OpenDriveElement - Sway RoadLanesLaneSectionLcrLaneRoadMarkSway - Type RoadLanesLaneSectionLcrLaneRoadMarkType - Explicit RoadLanesLaneSectionLcrLaneRoadMarkExplicit + Sway []*RoadLanesLaneSectionLcrLaneRoadMarkSway + Type []*RoadLanesLaneSectionLcrLaneRoadMarkType + Explicit []*RoadLanesLaneSectionLcrLaneRoadMarkExplicit } // TODO: Doc formatting needs to be implemented! type RoadLanesLaneSectionLcrLaneRoadMarkExplicit struct { OpenDriveElement - Line RoadLanesLaneSectionLcrLaneRoadMarkExplicitLine + Line []*RoadLanesLaneSectionLcrLaneRoadMarkExplicitLine } // TODO: Doc formatting needs to be implemented! @@ -109,7 +109,7 @@ type RoadLanesLaneSectionLcrLaneRoadMarkSway struct { // TODO: Doc formatting needs to be implemented! type RoadLanesLaneSectionLcrLaneRoadMarkType struct { OpenDriveElement - Line RoadLanesLaneSectionLcrLaneRoadMarkTypeLine + Line []*RoadLanesLaneSectionLcrLaneRoadMarkTypeLine } // TODO: Doc formatting needs to be implemented! @@ -120,7 +120,7 @@ type RoadLanesLaneSectionLcrLaneRoadMarkTypeLine struct { // TODO: Doc formatting needs to be implemented! type RoadLanesLaneSectionLeft struct { OpenDriveElement - Lane RoadLanesLaneSectionLeftLane + Lane []*RoadLanesLaneSectionLeftLane } // TODO: Doc formatting needs to be implemented! @@ -131,19 +131,19 @@ type RoadLanesLaneSectionLeftLane struct { // TODO: Doc formatting needs to be implemented! type RoadLanesLaneSectionLrLane struct { OpenDriveElement - Link RoadLanesLaneSectionLcrLaneLink - RoadMark RoadLanesLaneSectionLcrLaneRoadMark - Material RoadLanesLaneSectionLrLaneMaterial - Speed RoadLanesLaneSectionLrLaneSpeed - Access RoadLanesLaneSectionLrLaneAccess - Height RoadLanesLaneSectionLrLaneHeight - Rule RoadLanesLaneSectionLrLaneRule + Link []*RoadLanesLaneSectionLcrLaneLink + RoadMark []*RoadLanesLaneSectionLcrLaneRoadMark + Material []*RoadLanesLaneSectionLrLaneMaterial + Speed []*RoadLanesLaneSectionLrLaneSpeed + Access []*RoadLanesLaneSectionLrLaneAccess + Height []*RoadLanesLaneSectionLrLaneHeight + Rule []*RoadLanesLaneSectionLrLaneRule } // TODO: Doc formatting needs to be implemented! type RoadLanesLaneSectionLrLaneAccess struct { OpenDriveElement - Restriction RoadLanesLaneSectionLrLaneAccessRestriction + Restriction []*RoadLanesLaneSectionLrLaneAccessRestriction } // TODO: Doc formatting needs to be implemented! @@ -184,7 +184,7 @@ type RoadLanesLaneSectionLrLaneWidth struct { // TODO: Doc formatting needs to be implemented! type RoadLanesLaneSectionRight struct { OpenDriveElement - Lane RoadLanesLaneSectionRightLane + Lane []*RoadLanesLaneSectionRightLane } // TODO: Doc formatting needs to be implemented! diff --git a/object.go b/object.go index bafaaa5..958c5db 100644 --- a/object.go +++ b/object.go @@ -29,52 +29,52 @@ type ETunnelType struct { // TODO: Doc formatting needs to be implemented! type RoadObjects struct { OpenDriveElement - Object RoadObjectsObject - ObjectReference RoadObjectsObjectReference - Tunnel RoadObjectsTunnel - Bridge RoadObjectsBridge + Object []*RoadObjectsObject + ObjectReference []*RoadObjectsObjectReference + Tunnel []*RoadObjectsTunnel + Bridge []*RoadObjectsBridge } // TODO: Doc formatting needs to be implemented! type RoadObjectsBridge struct { OpenDriveElement - Validity RoadObjectsObjectLaneValidity + Validity []*RoadObjectsObjectLaneValidity Id string - Length TGrEqZero + Length GrEqZero Name string - S TGrEqZero + S GrEqZero Type EBridgeType } // TODO: Doc formatting needs to be implemented! type RoadObjectsObject struct { OpenDriveElement - Repeat RoadObjectsObjectRepeat - Outline RoadObjectsObjectOutlinesOutline - Outlines RoadObjectsObjectOutlines - Material RoadObjectsObjectMaterial - Validity RoadObjectsObjectLaneValidity - ParkingSpace RoadObjectsObjectParkingSpace - Markings RoadObjectsObjectMarkings - Borders RoadObjectsObjectBorders - Surface RoadObjectsObjectSurface - Skeleton RoadObjectsObjectSkeleton - Dynamic TYesNo + Repeat []*RoadObjectsObjectRepeat + Outline []*RoadObjectsObjectOutlinesOutline + Outlines []*RoadObjectsObjectOutlines + Material []*RoadObjectsObjectMaterial + Validity []*RoadObjectsObjectLaneValidity + ParkingSpace []*RoadObjectsObjectParkingSpace + Markings []*RoadObjectsObjectMarkings + Borders []*RoadObjectsObjectBorders + Surface []*RoadObjectsObjectSurface + Skeleton []*RoadObjectsObjectSkeleton + Dynamic YesNo Hdg float64 - Height TGrEqZero + Height GrEqZero Id string - Length TGrZero + Length GrZero Name string Orientation EOrientation - PerpToRoad TBool + PerpToRoad Bool Pitch float64 - Radius TGrZero + Radius GrZero Roll float64 - S TGrEqZero + S GrEqZero Subtype string T float64 Type EObjectType - ValidLength TGrEqZero + ValidLength GrEqZero Width float64 ZOffset float64 } @@ -82,38 +82,38 @@ type RoadObjectsObject struct { // TODO: Doc formatting needs to be implemented! type RoadObjectsObjectBorders struct { OpenDriveElement - Border RoadObjectsObjectBordersBorder + Border []*RoadObjectsObjectBordersBorder } // TODO: Doc formatting needs to be implemented! type RoadObjectsObjectBordersBorder struct { OpenDriveElement - CornerReference RoadObjectsObjectMarkingsMarkingCornerReference + CornerReference []*RoadObjectsObjectMarkingsMarkingCornerReference OutlineId int Type EBorderType - UseCompleteOutline TBool - Width TGrEqZero + UseCompleteOutline Bool + Width GrEqZero } // TODO: Doc formatting needs to be implemented! type RoadObjectsObjectMarkings struct { OpenDriveElement - Marking RoadObjectsObjectMarkingsMarking + Marking []*RoadObjectsObjectMarkingsMarking } // TODO: Doc formatting needs to be implemented! type RoadObjectsObjectMarkingsMarking struct { OpenDriveElement - CornerReference RoadObjectsObjectMarkingsMarkingCornerReference + CornerReference []*RoadObjectsObjectMarkingsMarkingCornerReference Color ERoadMarkColor - LineLength TGrZero + LineLength GrZero Side ESideType - SpaceLength TGrEqZero + SpaceLength GrEqZero StartOffset float64 StopOffset float64 Weight ERoadMarkWeight - Width TGrZero - ZOffset TGrEqZero + Width GrZero + ZOffset GrEqZero } // TODO: Doc formatting needs to be implemented! @@ -125,32 +125,32 @@ type RoadObjectsObjectMarkingsMarkingCornerReference struct { // TODO: Doc formatting needs to be implemented! type RoadObjectsObjectMaterial struct { OpenDriveElement - Friction TGrEqZero + Friction GrEqZero RoadMarkColor ERoadMarkColor - Roughness TGrEqZero + Roughness GrEqZero Surface string } // TODO: Doc formatting needs to be implemented! type RoadObjectsObjectOutlines struct { OpenDriveElement - Outline RoadObjectsObjectOutlinesOutline + Outline []*RoadObjectsObjectOutlinesOutline } // TODO: Doc formatting needs to be implemented! type RoadObjectsObjectOutlinesOutline struct { OpenDriveElement - Closed TBool + Closed Bool FillType EOutlineFillType Id int LaneType ELaneType - Outer TBool + Outer Bool } // TODO: Doc formatting needs to be implemented! type RoadObjectsObjectOutlinesOutlineCornerLocal struct { OpenDriveElement - Height TGrEqZero + Height GrEqZero Id int U float64 V float64 @@ -161,9 +161,9 @@ type RoadObjectsObjectOutlinesOutlineCornerLocal struct { type RoadObjectsObjectOutlinesOutlineCornerRoad struct { OpenDriveElement Dz float64 - Height TGrEqZero + Height GrEqZero Id int - S TGrEqZero + S GrEqZero T float64 } @@ -177,20 +177,20 @@ type RoadObjectsObjectParkingSpace struct { // TODO: Doc formatting needs to be implemented! type RoadObjectsObjectRepeat struct { OpenDriveElement - DetachFromReferenceLine TBool - Distance TGrEqZero - HeightEnd TGrEqZero - HeightStart TGrEqZero - Length TGrEqZero - LengthEnd TGrEqZero - LengthStart TGrEqZero - RadiusEnd TGrEqZero - RadiusStart TGrEqZero - S TGrEqZero + DetachFromReferenceLine Bool + Distance GrEqZero + HeightEnd GrEqZero + HeightStart GrEqZero + Length GrEqZero + LengthEnd GrEqZero + LengthStart GrEqZero + RadiusEnd GrEqZero + RadiusStart GrEqZero + S GrEqZero TEnd float64 TStart float64 - WidthEnd TGrEqZero - WidthStart TGrEqZero + WidthEnd GrEqZero + WidthStart GrEqZero ZOffsetEnd float64 ZOffsetStart float64 } @@ -207,7 +207,7 @@ type RoadObjectsObjectSkeletonPolyline struct { // TODO: Doc formatting needs to be implemented! type RoadObjectsObjectSkeletonPolylineVertexLocal struct { Id int - IntersectionPoint bool + IntersectionPoint Bool Radius float64 U float64 V float64 @@ -218,47 +218,47 @@ type RoadObjectsObjectSkeletonPolylineVertexLocal struct { type RoadObjectsObjectSkeletonPolylineVertexRoad struct { Dz float64 Id int - IntersectionPoint bool + IntersectionPoint Bool Radius float64 - S float64 + S GrEqZero T float64 } // TODO: Doc formatting needs to be implemented! type RoadObjectsObjectSurface struct { OpenDriveElement - Crg RoadObjectsObjectSurfaceCrg + Crg []*RoadObjectsObjectSurfaceCrg } // TODO: Doc formatting needs to be implemented! type RoadObjectsObjectSurfaceCrg struct { OpenDriveElement File string - HideRoadSurfaceCrg TBool + HideRoadSurfaceCrg Bool ZScale float64 } // TODO: Doc formatting needs to be implemented! type RoadObjectsObjectReference struct { OpenDriveElement - Validity RoadObjectsObjectLaneValidity + Validity []*RoadObjectsObjectLaneValidity Id string Orientation EOrientation - S TGrEqZero + S GrEqZero T float64 - ValidLength TGrEqZero + ValidLength GrEqZero ZOffset float64 } // TODO: Doc formatting needs to be implemented! type RoadObjectsTunnel struct { OpenDriveElement - Validity RoadObjectsObjectLaneValidity - Daylight TZeroOne + Validity []*RoadObjectsObjectLaneValidity + Daylight ZeroOne Id string - Length TGrEqZero - Lighting TZeroOne + Length GrEqZero + Lighting ZeroOne Name string - S TGrEqZero + S GrEqZero Type ETunnelType } diff --git a/railroad.go b/railroad.go index 4052093..cd9b096 100644 --- a/railroad.go +++ b/railroad.go @@ -14,65 +14,65 @@ type EStationType struct { // TODO: Doc formatting needs to be implemented! type RoadRailroad struct { OpenDriveElement - Switch RoadRailroadSwitch + Switch []*RoadRailroadSwitch } // TODO: Doc formatting needs to be implemented! type RoadRailroadSwitch struct { OpenDriveElement - MainTrack RoadRailroadSwitchMainTrack - SideTrack RoadRailroadSwitchSideTrack - Partner RoadRailroadSwitchPartner - Id string - Name string - Position ERoadRailroadSwitchPosition + MainTrack []*RoadRailroadSwitchMainTrack + SideTrack []*RoadRailroadSwitchSideTrack + Partner []*RoadRailroadSwitchPartner + Id *string + Name *string + Position *ERoadRailroadSwitchPosition } // TODO: Doc formatting needs to be implemented! type RoadRailroadSwitchMainTrack struct { OpenDriveElement - Dir EElementDir - Id string - S TGrEqZero + Dir *EElementDir + Id *string + S *GrEqZero } // TODO: Doc formatting needs to be implemented! type RoadRailroadSwitchPartner struct { OpenDriveElement - Id string - Name string + Id *string + Name *string } // TODO: Doc formatting needs to be implemented! type RoadRailroadSwitchSideTrack struct { OpenDriveElement - Dir EElementDir - Id string - S TGrEqZero + Dir *EElementDir + Id *string + S *GrEqZero } // TODO: Doc formatting needs to be implemented! type Station struct { OpenDriveElement - Platform StationPlatform - Id string - Name string - Type EStationType + Platform []*StationPlatform + Id *string + Name *string + Type *EStationType } // TODO: Doc formatting needs to be implemented! type StationPlatform struct { OpenDriveElement - Segment StationPlatformSegment - Id string - Name string + Segment []*StationPlatformSegment + Id *string + Name *string } // TODO: Doc formatting needs to be implemented! type StationPlatformSegment struct { OpenDriveElement - RoadId string - SEnd TGrEqZero - Side EStationPlatformSegmentSide - SStart TGrEqZero + RoadId *string + SEnd *GrEqZero + Side *EStationPlatformSegmentSide + SStart *GrEqZero } diff --git a/road.go b/road.go index ea218c9..5a72437 100644 --- a/road.go +++ b/road.go @@ -35,25 +35,25 @@ type EStripMode struct { type ETrafficRule struct { } -type TMaxSpeed struct { +type MaxSpeed struct { } // TODO: Doc formatting needs to be implemented! type Road struct { OpenDriveElement - Link RoadLink - Type RoadType - PlanView RoadPlanView - ElevationProfile RoadElevationProfile - LateralProfile RoadLateralProfile - Lanes RoadLanes - Objects RoadObjects - Signals RoadSignals - Surface RoadSurface - Railroad RoadRailroad + Link []*RoadLink + Type []*RoadType + PlanView []*RoadPlanView + ElevationProfile []*RoadElevationProfile + LateralProfile []*RoadLateralProfile + Lanes []*RoadLanes + Objects []*RoadObjects + Signals []*RoadSignals + Surface []*RoadSurface + Railroad []*RoadRailroad Id string Junction string - Length TGrZero + Length GrZero Name string Rule ETrafficRule } @@ -61,7 +61,7 @@ type Road struct { // TODO: Doc formatting needs to be implemented! type RoadElevationProfile struct { OpenDriveElement - Elevation RoadElevationProfileElevation + Elevation []*RoadElevationProfileElevation } // TODO: Doc formatting needs to be implemented! @@ -71,22 +71,22 @@ type RoadElevationProfileElevation struct { B float64 C float64 D float64 - S TGrEqZero + S GrEqZero } // TODO: Doc formatting needs to be implemented! type RoadLateralProfile struct { OpenDriveElement - Superelevation RoadLateralProfileSuperelevation - Shape RoadLateralProfileShape - CrossSectionSurface RoadLateralProfileCrossSectionSurface + Superelevation []*RoadLateralProfileSuperelevation + Shape []*RoadLateralProfileShape + CrossSectionSurface []*RoadLateralProfileCrossSectionSurface } // TODO: Doc formatting needs to be implemented! type RoadLateralProfileCrossSectionSurface struct { OpenDriveElement - TOffset RoadLateralProfileCrossSectionSurfaceTOffset - SurfaceStrips RoadLateralProfileCrossSectionSurfaceSurfaceStrip + TOffset []*RoadLateralProfileCrossSectionSurfaceTOffset + SurfaceStrips []*RoadLateralProfileCrossSectionSurfaceSurfaceStrip } // TODO: Doc formatting needs to be implemented! @@ -96,17 +96,17 @@ type RoadLateralProfileCrossSectionSurfaceCoefficients struct { B float64 C float64 D float64 - S TGrEqZero + S GrEqZero } // TODO: Doc formatting needs to be implemented! type RoadLateralProfileCrossSectionSurfaceStrip struct { OpenDriveElement - Width RoadLateralProfileCrossSectionSurfaceStripWidth - Constant RoadLateralProfileCrossSectionSurfaceStripConstant - Linear RoadLateralProfileCrossSectionSurfaceStripLinear - Quadratic RoadLateralProfileCrossSectionSurfaceStripQuadratic - Cubic RoadLateralProfileCrossSectionSurfaceStripCubic + Width []*RoadLateralProfileCrossSectionSurfaceStripWidth + Constant []*RoadLateralProfileCrossSectionSurfaceStripConstant + Linear []*RoadLateralProfileCrossSectionSurfaceStripLinear + Quadratic []*RoadLateralProfileCrossSectionSurfaceStripQuadratic + Cubic []*RoadLateralProfileCrossSectionSurfaceStripCubic Id int Mode EStripMode } @@ -114,43 +114,43 @@ type RoadLateralProfileCrossSectionSurfaceStrip struct { // TODO: Doc formatting needs to be implemented! type RoadLateralProfileCrossSectionSurfaceStripConstant struct { OpenDriveElement - Coefficients RoadLateralProfileCrossSectionSurfaceCoefficients + Coefficients []*RoadLateralProfileCrossSectionSurfaceCoefficients } // TODO: Doc formatting needs to be implemented! type RoadLateralProfileCrossSectionSurfaceStripCubic struct { OpenDriveElement - Coefficients RoadLateralProfileCrossSectionSurfaceCoefficients + Coefficients []*RoadLateralProfileCrossSectionSurfaceCoefficients } // TODO: Doc formatting needs to be implemented! type RoadLateralProfileCrossSectionSurfaceStripLinear struct { OpenDriveElement - Coefficients RoadLateralProfileCrossSectionSurfaceCoefficients + Coefficients []*RoadLateralProfileCrossSectionSurfaceCoefficients } // TODO: Doc formatting needs to be implemented! type RoadLateralProfileCrossSectionSurfaceStripQuadratic struct { OpenDriveElement - Coefficients RoadLateralProfileCrossSectionSurfaceCoefficients + Coefficients []*RoadLateralProfileCrossSectionSurfaceCoefficients } // TODO: Doc formatting needs to be implemented! type RoadLateralProfileCrossSectionSurfaceStripWidth struct { OpenDriveElement - Coefficients RoadLateralProfileCrossSectionSurfaceCoefficients + Coefficients []*RoadLateralProfileCrossSectionSurfaceCoefficients } // TODO: Doc formatting needs to be implemented! type RoadLateralProfileCrossSectionSurfaceSurfaceStrip struct { OpenDriveElement - Strip RoadLateralProfileCrossSectionSurfaceStrip + Strip []*RoadLateralProfileCrossSectionSurfaceStrip } // TODO: Doc formatting needs to be implemented! type RoadLateralProfileCrossSectionSurfaceTOffset struct { OpenDriveElement - Coefficients RoadLateralProfileCrossSectionSurfaceCoefficients + Coefficients []*RoadLateralProfileCrossSectionSurfaceCoefficients } // TODO: Doc formatting needs to be implemented! @@ -160,7 +160,7 @@ type RoadLateralProfileShape struct { B float64 C float64 D float64 - S TGrEqZero + S GrEqZero T float64 } @@ -171,14 +171,14 @@ type RoadLateralProfileSuperelevation struct { B float64 C float64 D float64 - S TGrEqZero + S GrEqZero } // TODO: Doc formatting needs to be implemented! type RoadLink struct { OpenDriveElement - Predecessor RoadLinkPredecessorSuccessor - Successor RoadLinkPredecessorSuccessor + Predecessor []*RoadLinkPredecessorSuccessor + Successor []*RoadLinkPredecessorSuccessor } // TODO: Doc formatting needs to be implemented! @@ -187,22 +187,22 @@ type RoadLinkPredecessorSuccessor struct { ContactPoint EContactPoint ElementDir EElementDir ElementId string - ElementS TGrEqZero + ElementS GrEqZero ElementType ERoadLinkElementType } // TODO: Doc formatting needs to be implemented! type RoadPlanView struct { OpenDriveElement - Geometry RoadPlanViewGeometry + Geometry []*RoadPlanViewGeometry } // TODO: Doc formatting needs to be implemented! type RoadPlanViewGeometry struct { OpenDriveElement Hdg float64 - Length TGrZero - S TGrEqZero + Length GrZero + S GrEqZero X float64 Y float64 } @@ -251,7 +251,7 @@ type RoadPlanViewGeometrySpiral struct { // TODO: Doc formatting needs to be implemented! type RoadSurface struct { OpenDriveElement - Crg RoadSurfaceCrg + Crg []*RoadSurfaceCrg } // TODO: Doc formatting needs to be implemented! @@ -262,9 +262,9 @@ type RoadSurfaceCrg struct { Mode ERoadSurfaceCrgMode Orientation EDirection Purpose ERoadSurfaceCrgPurpose - SEnd TGrEqZero + SEnd GrEqZero SOffset float64 - SStart TGrEqZero + SStart GrEqZero TOffset float64 ZOffset float64 ZScale float64 @@ -273,15 +273,15 @@ type RoadSurfaceCrg struct { // TODO: Doc formatting needs to be implemented! type RoadType struct { OpenDriveElement - Speed RoadTypeSpeed + Speed []*RoadTypeSpeed Country ECountryCode - S TGrEqZero + S GrEqZero Type ERoadType } // TODO: Doc formatting needs to be implemented! type RoadTypeSpeed struct { OpenDriveElement - Max TMaxSpeed + Max MaxSpeed Unit EUnitSpeed } diff --git a/signal.go b/signal.go index 325c960..f4a05a0 100644 --- a/signal.go +++ b/signal.go @@ -35,7 +35,7 @@ type EunitSpeed struct { // TODO: Doc formatting needs to be implemented! type Controller struct { OpenDriveElement - Control *ControllerControl + Control []*ControllerControl Id string Name string Sequence int @@ -51,16 +51,16 @@ type ControllerControl struct { // TODO: Doc formatting needs to be implemented! type RoadSignals struct { OpenDriveElement - Signal *RoadSignalsSignalRoad - SignalReference *RoadSignalsSpatialSignalReference + Signal []*RoadSignalsSignalRoad + SignalReference []*RoadSignalsSpatialSignalReference } // TODO: Doc formatting needs to be implemented! type RoadSignalsBoard struct { OpenDriveElement - Validity *RoadObjectsObjectLaneValidity - Dependency *RoadSignalsSignalDependency - Reference *RoadSignalsSignalReference + Validity []*RoadObjectsObjectLaneValidity + Dependency []*RoadSignalsSignalDependency + Reference []*RoadSignalsSignalReference } // TODO: Doc formatting needs to be implemented! @@ -83,19 +83,19 @@ type RoadSignalsDisplayArea struct { // TODO: Doc formatting needs to be implemented! type RoadSignalsSignal struct { OpenDriveElement - Validity *RoadObjectsObjectLaneValidity - Dependency *RoadSignalsSignalDependency - Reference *RoadSignalsSignalReference - StaticBoard *RoadSignalsStaticBoard - VmsBoard *RoadSignalsVmsBoard - Semantics *SignalsSemantics + Validity []*RoadObjectsObjectLaneValidity + Dependency []*RoadSignalsSignalDependency + Reference []*RoadSignalsSignalReference + StaticBoard []*RoadSignalsStaticBoard + VmsBoard []*RoadSignalsVmsBoard + Semantics []*SignalsSemantics Country ECountryCode CountryRevision string - Dynamic TYesNo - Height TGrEqZero + Dynamic YesNo + Height GrEqZero HOffset float64 Id string - Length TGrEqZero + Length GrEqZero Name string Orientation EOrientation Pitch float64 @@ -105,7 +105,7 @@ type RoadSignalsSignal struct { Type string Unit EUnit Value float64 - Width TGrEqZero + Width GrEqZero } // TODO: Doc formatting needs to be implemented! @@ -133,7 +133,7 @@ type RoadSignalsSignalPositionRoad struct { Pitch float64 RoadId string Roll float64 - S TGrEqZero + S GrEqZero T float64 ZOffset float64 } @@ -149,7 +149,7 @@ type RoadSignalsSignalReference struct { // TODO: Doc formatting needs to be implemented! type RoadSignalsSignalRoad struct { RoadSignalsSignal - S TGrEqZero + S GrEqZero T float64 ZOffset float64 } @@ -157,23 +157,23 @@ type RoadSignalsSignalRoad struct { // TODO: Doc formatting needs to be implemented! type RoadSignalsSpatialSignalReference struct { OpenDriveElement - Validity *RoadObjectsObjectLaneValidity + Validity []*RoadObjectsObjectLaneValidity Id string Orientation EOrientation - S TGrEqZero + S GrEqZero T float64 } // TODO: Doc formatting needs to be implemented! type RoadSignalsStaticBoard struct { RoadSignalsBoard - Sign *RoadSignalsBoardSign + Sign []*RoadSignalsBoardSign } // TODO: Doc formatting needs to be implemented! type RoadSignalsVmsBoard struct { RoadSignalsBoard - DisplayArea *RoadSignalsDisplayArea + DisplayArea []*RoadSignalsDisplayArea DisplayHeight float64 DisplayType ERoadSignalsDisplayType DisplayWidth float64 @@ -192,28 +192,28 @@ type SignalGroupVmsBoardReference struct { // TODO: Doc formatting needs to be implemented! type SignalGroupVmsGroup struct { OpenDriveElement - VmsBoardReference *SignalGroupVmsBoardReference + VmsBoardReference []*SignalGroupVmsBoardReference Id string } // TODO: Doc formatting needs to be implemented! type SignalsSemantics struct { OpenDriveElement - Speed *SignalsSemanticsSpeed - Lane *SignalsSemanticsLane - Priority *SignalsSemanticsPriority - Prohibited *SignalsSemanticsProhibited - Warning *SignalsSemanticsWarning - Routing *SignalsSemanticsRouting - Streetname *SignalsSemanticsStreetname - Parking *SignalsSemanticsParking - Tourist *SignalsSemanticsTourist - SupplementaryTime *SignalsSemanticsSupplementaryTime - SupplementaryAllows *SignalsSemanticsSupplementaryAllows - SupplementaryProhibits *SignalsSemanticsSupplementaryProhibits - SupplementaryDistance *SignalsSemanticsSupplementaryDistance - SupplementaryEnvironment *SignalsSemanticsSupplementaryEnvironment - SupplementaryExplanatory *SignalsSemanticsSupplementaryExplanatory + Speed []*SignalsSemanticsSpeed + Lane []*SignalsSemanticsLane + Priority []*SignalsSemanticsPriority + Prohibited []*SignalsSemanticsProhibited + Warning []*SignalsSemanticsWarning + Routing []*SignalsSemanticsRouting + Streetname []*SignalsSemanticsStreetname + Parking []*SignalsSemanticsParking + Tourist []*SignalsSemanticsTourist + SupplementaryTime []*SignalsSemanticsSupplementaryTime + SupplementaryAllows []*SignalsSemanticsSupplementaryAllows + SupplementaryProhibits []*SignalsSemanticsSupplementaryProhibits + SupplementaryDistance []*SignalsSemanticsSupplementaryDistance + SupplementaryEnvironment []*SignalsSemanticsSupplementaryEnvironment + SupplementaryExplanatory []*SignalsSemanticsSupplementaryExplanatory } // TODO: Doc formatting needs to be implemented! @@ -246,9 +246,9 @@ type SignalsSemanticsRouting struct { // TODO: Doc formatting needs to be implemented! type SignalsSemanticsSpeed struct { OpenDriveElement - Type *EsignalsSemanticsSpeed - Unit *EunitSpeed - Value *float64 + Type []*ESignalsSemanticsSpeed + Unit []*EUnitSpeed + Value []*float64 } // TODO: Doc formatting needs to be implemented! diff --git a/templates/core.tmpl b/templates/core.tmpl index 0d8a6ac..c1fe4ef 100644 --- a/templates/core.tmpl +++ b/templates/core.tmpl @@ -3,25 +3,25 @@ package xodr {{range .SimpleType}} - type {{ toCamel .Name }} struct { + type {{ goType .Name }} struct { } {{end}} {{range .ComplexType}} // {{ formatStructDocumentation .Annotation.Documentation.Text }} - type {{ distinctSignalsReferenceToCamel (removeTypePrefix .Name) }} struct { + type {{ goType .Name }} struct { {{$base := .ComplexContent.Extension.Base}} - {{toCamel (removeTypePrefix $base)}} + {{goType $base}} {{- range .ComplexContent.Extension.Sequence.Element}} {{- if ne $base .Type}} - {{toCamel .Name}} {{mapPrimitives (distinctSignalsReferenceToCamel (removeTypePrefix .Type))}} + {{toCamel .Name}} []*{{goType .Type}} {{- end}} {{- end}} {{- range .ComplexContent.Extension.Attribute}} - {{- if ne $base (toCamel .Type)}} - {{toCamel .Name}} {{mapPrimitives .Type}} + {{- if ne $base .Type}} + {{toCamel .Name}} {{goType .Type}} {{- end }} {{- end }} diff --git a/templates/junction.tmpl b/templates/junction.tmpl index ec2ef0a..aac37dc 100644 --- a/templates/junction.tmpl +++ b/templates/junction.tmpl @@ -3,26 +3,26 @@ package xodr {{range .SimpleType}} - type {{ toCamel .Name }} struct { + type {{ goType .Name }} struct { } {{end}} {{range .ComplexType}} // {{ formatStructDocumentation .Annotation.Documentation.Text }} - type {{ toCamel (removeTypePrefix .Name) }} struct { + type {{ goType .Name }} struct { {{$base := .ComplexContent.Extension.Base}} - {{toCamel (removeTypePrefix $base)}} + {{ goType $base }} {{- range .ComplexContent.Extension.Sequence.Element}} - {{toCamel .Name}} {{toCamel (removeTypePrefix .Type)}} + {{toCamel .Name}} []*{{ goType .Type }} {{- end}} {{- range .Attribute}} - {{toCamel .Name}} {{mapPrimitives .Type}} + {{toCamel .Name}} {{ goType .Type }} {{- end }} {{- range .Sequence.Element}} - {{toCamel .Name}} {{toCamel (removeTypePrefix .Type)}} + {{toCamel .Name}} {{ goType .Type }} {{- end }} } {{end}} diff --git a/templates/lane.tmpl b/templates/lane.tmpl index ec2ef0a..aac37dc 100644 --- a/templates/lane.tmpl +++ b/templates/lane.tmpl @@ -3,26 +3,26 @@ package xodr {{range .SimpleType}} - type {{ toCamel .Name }} struct { + type {{ goType .Name }} struct { } {{end}} {{range .ComplexType}} // {{ formatStructDocumentation .Annotation.Documentation.Text }} - type {{ toCamel (removeTypePrefix .Name) }} struct { + type {{ goType .Name }} struct { {{$base := .ComplexContent.Extension.Base}} - {{toCamel (removeTypePrefix $base)}} + {{ goType $base }} {{- range .ComplexContent.Extension.Sequence.Element}} - {{toCamel .Name}} {{toCamel (removeTypePrefix .Type)}} + {{toCamel .Name}} []*{{ goType .Type }} {{- end}} {{- range .Attribute}} - {{toCamel .Name}} {{mapPrimitives .Type}} + {{toCamel .Name}} {{ goType .Type }} {{- end }} {{- range .Sequence.Element}} - {{toCamel .Name}} {{toCamel (removeTypePrefix .Type)}} + {{toCamel .Name}} {{ goType .Type }} {{- end }} } {{end}} diff --git a/templates/object.tmpl b/templates/object.tmpl index 5025300..487487e 100644 --- a/templates/object.tmpl +++ b/templates/object.tmpl @@ -3,26 +3,26 @@ package xodr {{range .SimpleType}} - type {{ toCamel .Name }} struct { + type {{ goType .Name }} struct { } {{end}} {{range .ComplexType}} // {{ formatStructDocumentation .Annotation.Documentation.Text }} - type {{ toCamel (removeTypePrefix .Name) }} struct { + type {{ goType .Name }} struct { {{$base := .ComplexContent.Extension.Base}} - {{toCamel (removeTypePrefix $base)}} + {{ goType $base }} {{- range .ComplexContent.Extension.Sequence.Element}} - {{toCamel .Name}} {{toCamel (removeTypePrefix .Type)}} + {{toCamel .Name}} []*{{ goType .Type }} {{- end}} {{- range .ComplexContent.Extension.Attribute}} - {{toCamel .Name}} {{mapPrimitives .Type}} + {{toCamel .Name}} {{ goType .Type}} {{- end }} {{- range .Attribute}} - {{toCamel .Name}} {{mapPrimitives (toCamel (removeTypePrefix .Type))}} + {{toCamel .Name}} {{ goType .Type }} {{- end }} } diff --git a/templates/railroad.tmpl b/templates/railroad.tmpl index 11f6c7e..952b24d 100644 --- a/templates/railroad.tmpl +++ b/templates/railroad.tmpl @@ -3,22 +3,22 @@ package xodr {{range .SimpleType}} - type {{ toCamel .Name }} struct { + type {{ goType .Name }} struct { } {{end}} {{range .ComplexType}} // {{ formatStructDocumentation .Annotation.Documentation.Text }} - type {{ toCamel (removeTypePrefix .Name) }} struct { + type {{ goType .Name }} struct { {{$base := .ComplexContent.Extension.Base}} - {{toCamel (removeTypePrefix $base)}} + {{ goType $base }} {{- range .ComplexContent.Extension.Sequence.Element}} - {{toCamel .Name}} {{toCamel (removeTypePrefix .Type)}} + {{toCamel .Name}} []*{{ goType .Type }} {{- end}} {{- range .ComplexContent.Extension.Attribute}} - {{toCamel .Name}} {{mapPrimitives .Type}} + {{toCamel .Name}} *{{ goType .Type }} {{- end }} } diff --git a/templates/road.tmpl b/templates/road.tmpl index 0ed3706..16b55ac 100644 --- a/templates/road.tmpl +++ b/templates/road.tmpl @@ -3,22 +3,22 @@ package xodr {{range .SimpleType}} - type {{ toCamel .Name }} struct { + type {{ goType .Name }} struct { } {{end}} {{range .ComplexType}} // {{ formatStructDocumentation .Annotation.Documentation }} - type {{ toCamel (removeTypePrefix .Name) }} struct { + type {{ goType .Name }} struct { {{$base := .ComplexContent.Extension.Base}} - {{toCamel (removeTypePrefix $base)}} + {{ goType $base }} {{- range .ComplexContent.Extension.Sequence.Element}} - {{toCamel .Name}} {{toCamel (removeTypePrefix .Type)}} + {{toCamel .Name}} []*{{ goType .Type }} {{- end}} {{- range .ComplexContent.Extension.Attribute}} - {{toCamel .Name}} {{mapPrimitives .Type}} + {{toCamel .Name}} {{ goType .Type}} {{- end }} } diff --git a/templates/signal.tmpl b/templates/signal.tmpl index 0f5ed77..6bfff1b 100644 --- a/templates/signal.tmpl +++ b/templates/signal.tmpl @@ -3,7 +3,7 @@ package xodr {{range .SimpleType}} - type {{ toCamel .Name }} struct { + type {{ goType .Name }} struct { } {{end}} @@ -16,19 +16,19 @@ type EunitSpeed struct { {{range .ComplexType}} // {{ formatStructDocumentation .Annotation.Documentation }} - type {{ distinctSignalsReferenceToCamel (removeTypePrefix .Name) }} struct { + type {{ goType .Name }} struct { {{$base := .ComplexContent.Extension.Base}} - {{distinctSignalsReferenceToCamel (removeTypePrefix $base)}} + {{ goType $base }} {{- range .ComplexContent.Extension.Sequence.Element}} {{- if ne $base .Type}} - {{toCamel .Name}} * {{mapPrimitives (distinctSignalsReferenceToCamel (removeTypePrefix .Type))}} + {{toCamel .Name}} []*{{ goType .Type }} {{- end}} {{- end}} {{- range .ComplexContent.Extension.Attribute}} {{- if ne $base (toCamel .Type)}} - {{toCamel .Name}} {{mapPrimitives .Type}} + {{toCamel .Name}} {{ goType .Type }} {{- end }} {{- end }}