Class AbstractModel¶
Defined in File AbstractModel.hpp
Class Documentation¶
-
class AbstractModel¶
Base class representing a model available to the AMS system.
An AbstractModel stores the filesystem path to the model and a version number. It does not define loading or execution semantics; those are handled by derived ‘concrete’ classes or by the
The model path may come either from a JSON description (containing
"model_path") or from an explicit string constructor.Public Functions
-
explicit AbstractModel(std::string modelPath, std::optional<std::string> Name = std::nullopt, int Version = 0)¶
Construct a model from an explicit path and version number.
The
modelPathstring is converted into a filesystem::path. If the provided string is empty, the internal path is left empty.
-
explicit AbstractModel(const Json &value)¶
Construct a model from a JSON object.
Expects a
"model_path"field if the model specifies one and optionally a"model_name"providing an identifier to the model
-
inline const std::optional<std::string> &getName() const¶
Returns the filesystem path associated with the model.
-
inline int getVersion() const¶
Returns the model version identifier.
-
void info() const¶
Print model information to stdout.
Primarily useful for debugging or logging.
-
explicit AbstractModel(std::string modelPath, std::optional<std::string> Name = std::nullopt, int Version = 0)¶