|
110 | 110 | function StructUtils.lift( |
111 | 111 | ::StructUtils.StructStyle, |
112 | 112 | S::Type{<:States{T}}, |
113 | | - json_vector, |
| 113 | + json_vector::Vector, |
114 | 114 | ) where {T} |
115 | 115 | states = S() |
116 | 116 | foreach(json_vector) do obj |
@@ -165,7 +165,7 @@ $(TYPEDFIELDS) |
165 | 165 | blobentries::Blobentries = Blobentries() #NOTE renamed from dataDict in v0.29 |
166 | 166 | """Solvable flag for the variable. |
167 | 167 | Accessors: [`getSolvable`](@ref), [`setSolvable!`](@ref)""" |
168 | | - solvable::Base.RefValue{Int} = Ref(1) #& (lower = getindex,) |
| 168 | + solvable::Base.RefValue{Int} = Ref{Int}(1) #& (lower = getindex,) |
169 | 169 | statetype::Symbol = Symbol(stringVariableType(T())) |
170 | 170 | # TODO autotype or version and statetype |
171 | 171 | _autotype::Nothing = nothing #& (name = :type, lower = _ -> TypeMetadata(VariableDFG)) |
@@ -216,10 +216,10 @@ The default VariableDFG constructor. |
216 | 216 | #IIF like contruction helper for VariableDFG |
217 | 217 | function VariableDFG( |
218 | 218 | label::Symbol, |
219 | | - stateType::Union{T, Type{T}}; |
| 219 | + statetype::Union{T, Type{T}}; |
220 | 220 | tags::Union{Set{Symbol}, Vector{Symbol}} = Set{Symbol}(), |
221 | 221 | timestamp::Union{TimeDateZone, ZonedDateTime} = TimeDateZone(now(localzone())), |
222 | | - solvable::Union{Int, Base.RefValue{Int}} = Ref(1), |
| 222 | + solvable::Union{Int, Base.RefValue{Int}} = Ref{Int}(1), |
223 | 223 | steadytime::Union{Nothing, Nanosecond} = nothing, |
224 | 224 | nanosecondtime = nothing, |
225 | 225 | smalldata = nothing, |
@@ -299,9 +299,9 @@ $(TYPEDFIELDS) |
299 | 299 | """Variable tags, e.g [:POSE, :VARIABLE, and :LANDMARK]. |
300 | 300 | Accessors: [`getTags`](@ref), [`mergeTags!`](@ref), and [`removeTags!`](@ref)""" |
301 | 301 | tags::Set{Symbol} |
302 | | - """Symbol for the variableType for the underlying variable. |
303 | | - Accessor: [`getVariableType`](@ref)""" |
304 | | - variableTypeName::Symbol & (json = (name = "variableType",)) # TODO check from StructTypes.names(::Type{VariableSummary}) = ((:variableTypeName, :variableType),) |
| 302 | + """Symbol for the state type for the underlying variable. |
| 303 | + Accessor: [`getStateType`](@ref)""" |
| 304 | + statetype::Symbol |
305 | 305 | """Dictionary of large data associated with this variable. |
306 | 306 | Accessors: [`addBlobentry!`](@ref), [`getBlobentry`](@ref), [`mergeBlobentry!`](@ref), and [`deleteBlobentry!`](@ref)""" |
307 | 307 | blobentries::Blobentries |
@@ -336,12 +336,12 @@ end |
336 | 336 | ## Conversion constructors |
337 | 337 | ##============================================================================== |
338 | 338 |
|
339 | | -function VariableSummary(v::VariableCompute) |
| 339 | +function VariableSummary(v::VariableCompute{T}) where {T} |
340 | 340 | return VariableSummary( |
341 | 341 | v.label, |
342 | 342 | v.timestamp, |
343 | 343 | copy(v.tags), |
344 | | - Symbol(typeof(getVariableType(v))), |
| 344 | + Symbol(stringVariableType(T())), |
345 | 345 | copy(v.blobentries), |
346 | 346 | ) |
347 | 347 | end |
|
0 commit comments