Skip to content

Commit

Permalink
enh api on defVariable and typeModName
Browse files Browse the repository at this point in the history
  • Loading branch information
dehann committed Oct 15, 2021
1 parent 8d89bad commit ceaaad2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/services/DFGVariable.jl
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ macro defVariable(structname, manifold, point_identity)

DFG.getPointIdentity(::Type{$structname}) = $point_identity

DFG.getVariableType(::typeof($manifold)) = $structname

end)
end

Expand Down
2 changes: 2 additions & 0 deletions src/services/Serialization.jl
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ function typeModuleName(variableType::InferenceVariable)
return String(take!(io))
end

typeModuleName(varT::Type{<:InferenceVariable}) = typeModuleName(varT())

function getTypeFromSerializationModule(variableTypeString::String)
try
# split the type at last `.`
Expand Down

0 comments on commit ceaaad2

Please sign in to comment.