NetDEM v1.0
|
A factory class for creating contact models. More...
#include <contact_model_factory.hpp>
Static Public Member Functions | |
static ContactModel * | NewContactModel (std::string const &model_name, nlohmann::json const &js) |
Create a new instance of a contact model by name and configuration data. | |
Static Public Attributes | |
static std::unordered_map< std::string, ContactModel::Type > | model_map |
A factory class for creating contact models.
This class provides a set of static methods for creating new instances of contact models, based on a specified name and configuration data in JSON format. The mapping between model names and their corresponding ContactModel::Type
enumeration values is stored in a static unordered map.
|
static |
Create a new instance of a contact model by name and configuration data.
Given a string specifying the name of a contact model and a JSON object containing configuration data for the model, this function creates a new instance of the appropriate ContactModel
subclass and returns a pointer to it.
model_name | The name of the contact model to create. |
js | A JSON object containing configuration data for the contact model. |
|
static |
A mapping between contact model names and their corresponding ContactModel::Type
enumeration values.