We can have function on abstract struct that use the field but we must add a test and throw an error if the field does not exist.
|
function _options_values(tool::AbstractOCPTool) |
|
return tool.options_values |
|
end |
|
|
|
""" |
|
$(TYPEDSIGNATURES) |
|
|
|
Return the option sources (`:ct_default` or `:user`) for a tool instance. |
|
""" |
|
function _option_sources(tool::AbstractOCPTool) |
|
return tool.options_sources |
|
end |
We can have function on abstract struct that use the field but we must add a test and throw an error if the field does not exist.
CTModels.jl/src/nlp/options_schema.jl
Lines 100 to 111 in ac5a9f3