Skip to content

Commit

Permalink
refactor: use simple type definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristianBirchler committed Aug 19, 2024
1 parent 852cec0 commit fd031d0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 26 deletions.
36 changes: 12 additions & 24 deletions core.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,41 +2,29 @@

package xodr

type EDataQualityRawDataPostProcessing struct {
}
type EDataQualityRawDataPostProcessing string

type EDataQualityRawDataSource struct {
}
type EDataQualityRawDataSource string

type EUnit struct {
}
type EUnit any

type EUnitDistance struct {
}
type EUnitDistance string

type EUnitMass struct {
}
type EUnitMass string

type EUnitSlope struct {
}
type EUnitSlope string

type EUnitSpeed struct {
}
type EUnitSpeed string

type GrEqZero struct {
}
type GrEqZero float64

type GrEqZeroOrContactPoint struct {
}
type GrEqZeroOrContactPoint any

type GrZero struct {
}
type GrZero float64

type YesNo struct {
}
type YesNo string

type ZeroOne struct {
}
type ZeroOne float64

// TODO: Doc formatting needs to be implemented!
type OpenDriveElement struct {
Expand Down
3 changes: 1 addition & 2 deletions templates/core.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
package xodr

{{range .SimpleType}}
type {{ goType .Name }} struct {
}
type {{ goType .Name }} {{if .Restriction.Base}} {{ goType .Restriction.Base }} {{else}} any {{end}}
{{end}}

{{range .ComplexType}}
Expand Down

0 comments on commit fd031d0

Please sign in to comment.