Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -87,43 +87,6 @@ class OrderingMethodAccessor : public TBase
}
}

void parse(sofa::core::objectmodel::BaseObjectDescription* arg) override
{
Inherit1::parse(arg);

//To remove for v24.12:
if (arg->getAttribute("ordering"))
{
//map storing the correspondence between the ordering method name
//as a Data, and its associated component
static const std::map<std::string, std::string> orderingMethodComponentsMap
{
{"Natural", "NaturalOrderingMethod"},
{"AMD", "AMDOrderingMethod"},
{"COLAMD", "COLAMDOrderingMethod"},
{"Metis", "MetisOrderingMethod"}
};

std::stringstream message;
message << "The Data 'ordering' is deprecated. Instead use a "
"component of type OrderingMethod. The list of available methods are: "
<< core::ObjectFactory::getInstance()->listClassesDerivedFrom<sofa::core::behavior::BaseOrderingMethod>();

const std::string methodName = arg->getAttribute("ordering");
const auto it = orderingMethodComponentsMap.find(methodName);
if (it != orderingMethodComponentsMap.end())
{
desiredMethod = it->second;

message << ". According to the value of the Data 'ordering', the "
"object factory will try to instantiate the component '"
<< desiredMethod << "'.";
}

msg_warning() << message.str();
}
}

private:

void setupCreatedOrderingMethod(core::behavior::BaseOrderingMethod* createdOrderingMethod)
Expand Down
Loading