diff --git a/Sofa/Component/Collision/Detection/Algorithm/src/sofa/component/collision/detection/algorithm/BruteForceDetection.h b/Sofa/Component/Collision/Detection/Algorithm/src/sofa/component/collision/detection/algorithm/BruteForceDetection.h index f77fac851a5..20443ea85fd 100644 --- a/Sofa/Component/Collision/Detection/Algorithm/src/sofa/component/collision/detection/algorithm/BruteForceDetection.h +++ b/Sofa/Component/Collision/Detection/Algorithm/src/sofa/component/collision/detection/algorithm/BruteForceDetection.h @@ -38,7 +38,7 @@ class SOFA_COMPONENT_COLLISION_DETECTION_ALGORITHM_API BruteForceDetection final /// Construction method called by ObjectFactory. template - static typename T::SPtr create(T*, sofa::core::objectmodel::BaseContext* context, sofa::core::objectmodel::BaseObjectDescription* arg) + static typename T::SPtr create(T*, sofa::core::objectmodel::BaseContext* context, sofa::core::objectmodel::BaseComponentDescription* arg) { if (context) { diff --git a/Sofa/Component/Collision/Detection/Algorithm/src/sofa/component/collision/detection/algorithm/DirectSAP.h b/Sofa/Component/Collision/Detection/Algorithm/src/sofa/component/collision/detection/algorithm/DirectSAP.h index 67e4003698e..71d8e41ae78 100644 --- a/Sofa/Component/Collision/Detection/Algorithm/src/sofa/component/collision/detection/algorithm/DirectSAP.h +++ b/Sofa/Component/Collision/Detection/Algorithm/src/sofa/component/collision/detection/algorithm/DirectSAP.h @@ -39,7 +39,7 @@ class SOFA_COMPONENT_COLLISION_DETECTION_ALGORITHM_API DirectSAP final : public /// Construction method called by ObjectFactory. template - static typename T::SPtr create(T*, sofa::core::objectmodel::BaseContext* context, sofa::core::objectmodel::BaseObjectDescription* arg) + static typename T::SPtr create(T*, sofa::core::objectmodel::BaseContext* context, sofa::core::objectmodel::BaseComponentDescription* arg) { if (context) { diff --git a/Sofa/Component/Collision/Detection/Algorithm/tests/CollisionPipeline_test.cpp b/Sofa/Component/Collision/Detection/Algorithm/tests/CollisionPipeline_test.cpp index b816831edf0..802cffe8f65 100644 --- a/Sofa/Component/Collision/Detection/Algorithm/tests/CollisionPipeline_test.cpp +++ b/Sofa/Component/Collision/Detection/Algorithm/tests/CollisionPipeline_test.cpp @@ -34,9 +34,6 @@ using sofa::core::objectmodel::BaseComponent ; #include using sofa::component::collision::detection::algorithm::CollisionPipeline ; -#include -using sofa::simulation::graph::DAGSimulation ; - #include using sofa::simulation::Node ; diff --git a/Sofa/Component/Collision/Detection/Intersection/tests/LocalMinDistance_test.cpp b/Sofa/Component/Collision/Detection/Intersection/tests/LocalMinDistance_test.cpp index 76d43def6a6..566d64d730f 100644 --- a/Sofa/Component/Collision/Detection/Intersection/tests/LocalMinDistance_test.cpp +++ b/Sofa/Component/Collision/Detection/Intersection/tests/LocalMinDistance_test.cpp @@ -29,8 +29,7 @@ using std::string; #include using sofa::testing::BaseSimulationTest; -#include -using sofa::simulation::graph::DAGSimulation ; +#include using sofa::simulation::Node ; #include diff --git a/Sofa/Component/Collision/Geometry/src/sofa/component/collision/geometry/LineCollisionModel.h b/Sofa/Component/Collision/Geometry/src/sofa/component/collision/geometry/LineCollisionModel.h index 374569733fa..67a7d2861d1 100644 --- a/Sofa/Component/Collision/Geometry/src/sofa/component/collision/geometry/LineCollisionModel.h +++ b/Sofa/Component/Collision/Geometry/src/sofa/component/collision/geometry/LineCollisionModel.h @@ -143,7 +143,7 @@ public : /// Pre-construction check method called by ObjectFactory. /// Check that DataTypes matches the MechanicalState. template - static bool canCreate(T*& obj, core::objectmodel::BaseContext* context, core::objectmodel::BaseObjectDescription* arg) + static bool canCreate(T*& obj, core::objectmodel::BaseContext* context, core::objectmodel::BaseComponentDescription* arg) { if (dynamic_cast*>(context->getMechanicalState()) == nullptr) { diff --git a/Sofa/Component/Collision/Geometry/src/sofa/component/collision/geometry/PointCollisionModel.h b/Sofa/Component/Collision/Geometry/src/sofa/component/collision/geometry/PointCollisionModel.h index e5ebbec02ba..c36d1641fe4 100644 --- a/Sofa/Component/Collision/Geometry/src/sofa/component/collision/geometry/PointCollisionModel.h +++ b/Sofa/Component/Collision/Geometry/src/sofa/component/collision/geometry/PointCollisionModel.h @@ -108,7 +108,7 @@ class PointCollisionModel : public core::CollisionModel /// Pre-construction check method called by ObjectFactory. /// Check that DataTypes matches the MechanicalState. template - static bool canCreate(T*& obj, core::objectmodel::BaseContext* context, core::objectmodel::BaseObjectDescription* arg) + static bool canCreate(T*& obj, core::objectmodel::BaseContext* context, core::objectmodel::BaseComponentDescription* arg) { if (dynamic_cast*>(context->getMechanicalState()) == nullptr) { diff --git a/Sofa/Component/Collision/Geometry/src/sofa/component/collision/geometry/SphereCollisionModel.h b/Sofa/Component/Collision/Geometry/src/sofa/component/collision/geometry/SphereCollisionModel.h index 6ba48175cde..91e11dec41f 100644 --- a/Sofa/Component/Collision/Geometry/src/sofa/component/collision/geometry/SphereCollisionModel.h +++ b/Sofa/Component/Collision/Geometry/src/sofa/component/collision/geometry/SphereCollisionModel.h @@ -125,7 +125,7 @@ class SphereCollisionModel : public core::CollisionModel /// Pre-construction check method called by ObjectFactory. /// Check that DataTypes matches the MechanicalState. template - static bool canCreate(T*& obj, core::objectmodel::BaseContext* context, core::objectmodel::BaseObjectDescription* arg) + static bool canCreate(T*& obj, core::objectmodel::BaseContext* context, core::objectmodel::BaseComponentDescription* arg) { if (dynamic_cast*>(context->getMechanicalState()) == nullptr && context->getMechanicalState() != nullptr) { @@ -138,7 +138,7 @@ class SphereCollisionModel : public core::CollisionModel } template - static typename T::SPtr create(T*, core::objectmodel::BaseContext* context, core::objectmodel::BaseObjectDescription* arg) + static typename T::SPtr create(T*, core::objectmodel::BaseContext* context, core::objectmodel::BaseComponentDescription* arg) { typename T::SPtr obj; diff --git a/Sofa/Component/Collision/Geometry/src/sofa/component/collision/geometry/TriangleCollisionModel.h b/Sofa/Component/Collision/Geometry/src/sofa/component/collision/geometry/TriangleCollisionModel.h index 712c6db49f6..37d1ec0021e 100644 --- a/Sofa/Component/Collision/Geometry/src/sofa/component/collision/geometry/TriangleCollisionModel.h +++ b/Sofa/Component/Collision/Geometry/src/sofa/component/collision/geometry/TriangleCollisionModel.h @@ -199,7 +199,7 @@ class TriangleCollisionModel : public core::CollisionModel /// Pre-construction check method called by ObjectFactory. /// Check that DataTypes matches the MechanicalState. template - static bool canCreate(T*& obj, core::objectmodel::BaseContext* context, core::objectmodel::BaseObjectDescription* arg) + static bool canCreate(T*& obj, core::objectmodel::BaseContext* context, core::objectmodel::BaseComponentDescription* arg) { if (dynamic_cast*>(context->getMechanicalState()) == nullptr) { diff --git a/Sofa/Component/Collision/Response/Contact/src/sofa/component/collision/response/contact/CollisionResponse.h b/Sofa/Component/Collision/Response/Contact/src/sofa/component/collision/response/contact/CollisionResponse.h index 9466991e8d2..049fc61ee9f 100644 --- a/Sofa/Component/Collision/Response/Contact/src/sofa/component/collision/response/contact/CollisionResponse.h +++ b/Sofa/Component/Collision/Response/Contact/src/sofa/component/collision/response/contact/CollisionResponse.h @@ -45,7 +45,7 @@ public : void draw(const core::visual::VisualParams* vparams) override; template - static typename T::SPtr create(T*, core::objectmodel::BaseContext* context, core::objectmodel::BaseObjectDescription* arg) + static typename T::SPtr create(T*, core::objectmodel::BaseContext* context, core::objectmodel::BaseComponentDescription* arg) { typename T::SPtr obj = sofa::core::objectmodel::New(); if (context) diff --git a/Sofa/Component/Collision/Response/Contact/src/sofa/component/collision/response/contact/ContactListener.h b/Sofa/Component/Collision/Response/Contact/src/sofa/component/collision/response/contact/ContactListener.h index e2e4f172077..68da60a4f8c 100644 --- a/Sofa/Component/Collision/Response/Contact/src/sofa/component/collision/response/contact/ContactListener.h +++ b/Sofa/Component/Collision/Response/Contact/src/sofa/component/collision/response/contact/ContactListener.h @@ -76,7 +76,7 @@ class SOFA_COMPONENT_COLLISION_RESPONSE_CONTACT_API ContactListener : public vir std::vector> getContactElements() const; // model, id, model, id template - static bool canCreate(T*& obj, core::objectmodel::BaseContext* context, core::objectmodel::BaseObjectDescription* arg) + static bool canCreate(T*& obj, core::objectmodel::BaseContext* context, core::objectmodel::BaseComponentDescription* arg) { core::CollisionModel* collModel1 = nullptr; core::CollisionModel* collModel2 = nullptr; @@ -108,7 +108,7 @@ class SOFA_COMPONENT_COLLISION_RESPONSE_CONTACT_API ContactListener : public vir } template - static typename T::SPtr create(T* , core::objectmodel::BaseContext* context, core::objectmodel::BaseObjectDescription* arg) + static typename T::SPtr create(T* , core::objectmodel::BaseContext* context, core::objectmodel::BaseComponentDescription* arg) { core::CollisionModel* collModel1 = nullptr; core::CollisionModel* collModel2 = nullptr; diff --git a/Sofa/Component/Collision/Response/Contact/src/sofa/component/collision/response/contact/RuleBasedContactManager.cpp b/Sofa/Component/Collision/Response/Contact/src/sofa/component/collision/response/contact/RuleBasedContactManager.cpp index dd16881ae9d..37ddbeb10ea 100644 --- a/Sofa/Component/Collision/Response/Contact/src/sofa/component/collision/response/contact/RuleBasedContactManager.cpp +++ b/Sofa/Component/Collision/Response/Contact/src/sofa/component/collision/response/contact/RuleBasedContactManager.cpp @@ -134,7 +134,7 @@ std::string RuleBasedContactManager::getContactResponse(core::CollisionModel* mo return replaceVariables(CollisionResponse::getContactResponse(model1, model2)); } -void RuleBasedContactManager::parse ( sofa::core::objectmodel::BaseObjectDescription* arg ) +void RuleBasedContactManager::parse ( sofa::core::objectmodel::BaseComponentDescription* arg ) { const char* v = arg->getAttribute(d_variables.getName().c_str()); if (v) diff --git a/Sofa/Component/Collision/Response/Contact/src/sofa/component/collision/response/contact/RuleBasedContactManager.h b/Sofa/Component/Collision/Response/Contact/src/sofa/component/collision/response/contact/RuleBasedContactManager.h index 277d6035b4f..000bde823f1 100644 --- a/Sofa/Component/Collision/Response/Contact/src/sofa/component/collision/response/contact/RuleBasedContactManager.h +++ b/Sofa/Component/Collision/Response/Contact/src/sofa/component/collision/response/contact/RuleBasedContactManager.h @@ -128,7 +128,7 @@ class SOFA_COMPONENT_COLLISION_RESPONSE_CONTACT_API RuleBasedContactManager : pu void createVariableData ( std::string variable ); - void parse ( sofa::core::objectmodel::BaseObjectDescription* arg ) override; + void parse ( sofa::core::objectmodel::BaseComponentDescription* arg ) override; protected: RuleBasedContactManager(); diff --git a/Sofa/Component/Engine/Analyze/src/sofa/component/engine/analyze/Distances.h b/Sofa/Component/Engine/Analyze/src/sofa/component/engine/analyze/Distances.h index 6dd41130825..6384418750e 100644 --- a/Sofa/Component/Engine/Analyze/src/sofa/component/engine/analyze/Distances.h +++ b/Sofa/Component/Engine/Analyze/src/sofa/component/engine/analyze/Distances.h @@ -126,7 +126,7 @@ class Distances : public core::DataEngine /// if they are compatible with the input and output model types of this /// mapping. template - static bool canCreate ( T*& obj, core::objectmodel::BaseContext* context, core::objectmodel::BaseObjectDescription* arg ) + static bool canCreate ( T*& obj, core::objectmodel::BaseContext* context, core::objectmodel::BaseComponentDescription* arg ) { bool error = false; if (arg->findObject(arg->getAttribute("hexaContainerPath", "../..")) == nullptr) @@ -158,7 +158,7 @@ class Distances : public core::DataEngine /// This implementation read the object1 and object2 attributes to /// find the input and output models of this mapping. template - static typename T::SPtr create(T*, core::objectmodel::BaseContext* context, core::objectmodel::BaseObjectDescription* arg ) + static typename T::SPtr create(T*, core::objectmodel::BaseContext* context, core::objectmodel::BaseComponentDescription* arg ) { typename T::SPtr obj = sofa::core::objectmodel::New( ( arg?dynamic_cast ( arg->findObject ( arg->getAttribute ( "hexaContainerPath","../.." ) ) ) :nullptr ), diff --git a/Sofa/Component/Engine/Analyze/tests/AverageCoord_test.cpp b/Sofa/Component/Engine/Analyze/tests/AverageCoord_test.cpp index 96d9416c4f6..5d755bbcf41 100644 --- a/Sofa/Component/Engine/Analyze/tests/AverageCoord_test.cpp +++ b/Sofa/Component/Engine/Analyze/tests/AverageCoord_test.cpp @@ -27,12 +27,11 @@ using sofa::testing::BaseSimulationTest; #include using sofa::component::statecontainer::MechanicalObject ; -#include +#include using sofa::simulation::Simulation ; using sofa::simulation::Node ; using sofa::core::objectmodel::New ; using sofa::core::objectmodel::BaseData ; -using sofa::simulation::graph::DAGSimulation; #include using sofa::component::engine::analyze::AverageCoord ; diff --git a/Sofa/Component/Engine/Analyze/tests/ClusteringEngine_test.cpp b/Sofa/Component/Engine/Analyze/tests/ClusteringEngine_test.cpp index b57ca438e54..747e930e971 100644 --- a/Sofa/Component/Engine/Analyze/tests/ClusteringEngine_test.cpp +++ b/Sofa/Component/Engine/Analyze/tests/ClusteringEngine_test.cpp @@ -26,12 +26,11 @@ using sofa::testing::BaseSimulationTest; #include using sofa::component::statecontainer::MechanicalObject ; -#include +#include using sofa::simulation::Simulation ; using sofa::simulation::Node ; using sofa::core::objectmodel::New ; using sofa::core::objectmodel::BaseData ; -using sofa::simulation::graph::DAGSimulation; #include using sofa::core::visual::VisualParams; diff --git a/Sofa/Component/Engine/Generate/src/sofa/component/engine/generate/MergeMeshes.h b/Sofa/Component/Engine/Generate/src/sofa/component/engine/generate/MergeMeshes.h index af92379ac4f..e929e9e9498 100644 --- a/Sofa/Component/Engine/Generate/src/sofa/component/engine/generate/MergeMeshes.h +++ b/Sofa/Component/Engine/Generate/src/sofa/component/engine/generate/MergeMeshes.h @@ -51,7 +51,7 @@ class MergeMeshes : public core::DataEngine ~MergeMeshes() override; public: /// Parse the given description to assign values to this object's fields and potentially other parameters - void parse ( sofa::core::objectmodel::BaseObjectDescription* arg ) override; + void parse ( sofa::core::objectmodel::BaseComponentDescription* arg ) override; /// Assign the field values stored in the given map of name -> value pairs void parseFields ( const std::map& str ) override; diff --git a/Sofa/Component/Engine/Generate/src/sofa/component/engine/generate/MergeMeshes.inl b/Sofa/Component/Engine/Generate/src/sofa/component/engine/generate/MergeMeshes.inl index 41d09378979..f8f20742fce 100644 --- a/Sofa/Component/Engine/Generate/src/sofa/component/engine/generate/MergeMeshes.inl +++ b/Sofa/Component/Engine/Generate/src/sofa/component/engine/generate/MergeMeshes.inl @@ -71,7 +71,7 @@ void MergeMeshes::createInputMeshesData(int nb) /// Parse the given description to assign values to this object's fields and potentially other parameters template -void MergeMeshes::parse ( sofa::core::objectmodel::BaseObjectDescription* arg ) +void MergeMeshes::parse ( sofa::core::objectmodel::BaseComponentDescription* arg ) { const char* p = arg->getAttribute(f_nbMeshes.getName().c_str()); if (p) diff --git a/Sofa/Component/Engine/Generate/src/sofa/component/engine/generate/MergeVectors.h b/Sofa/Component/Engine/Generate/src/sofa/component/engine/generate/MergeVectors.h index 804c40c2119..16165c05e2e 100644 --- a/Sofa/Component/Engine/Generate/src/sofa/component/engine/generate/MergeVectors.h +++ b/Sofa/Component/Engine/Generate/src/sofa/component/engine/generate/MergeVectors.h @@ -50,7 +50,7 @@ class MergeVectors : public core::DataEngine public: /// Parse the given description to assign values to this object's fields and potentially other parameters - void parse( sofa::core::objectmodel::BaseObjectDescription* arg ) override; + void parse( sofa::core::objectmodel::BaseComponentDescription* arg ) override; /// Assign the field values stored in the given map of name -> value pairs void parseFields( const std::map& str ) override; diff --git a/Sofa/Component/Engine/Generate/src/sofa/component/engine/generate/MergeVectors.inl b/Sofa/Component/Engine/Generate/src/sofa/component/engine/generate/MergeVectors.inl index c4c4dfe1d11..09ae6377c84 100644 --- a/Sofa/Component/Engine/Generate/src/sofa/component/engine/generate/MergeVectors.inl +++ b/Sofa/Component/Engine/Generate/src/sofa/component/engine/generate/MergeVectors.inl @@ -39,7 +39,7 @@ MergeVectors::~MergeVectors() } template -void MergeVectors::parse( sofa::core::objectmodel::BaseObjectDescription* arg ) +void MergeVectors::parse( sofa::core::objectmodel::BaseComponentDescription* arg ) { vf_inputs.parseSizeData(arg, f_nbInputs); Inherit1::parse(arg); diff --git a/Sofa/Component/Engine/Generate/src/sofa/component/engine/generate/VolumeFromTetrahedrons.h b/Sofa/Component/Engine/Generate/src/sofa/component/engine/generate/VolumeFromTetrahedrons.h index 1fe4653e932..65f72646065 100644 --- a/Sofa/Component/Engine/Generate/src/sofa/component/engine/generate/VolumeFromTetrahedrons.h +++ b/Sofa/Component/Engine/Generate/src/sofa/component/engine/generate/VolumeFromTetrahedrons.h @@ -60,7 +60,7 @@ class VolumeFromTetrahedrons : public sofa::core::DataEngine ////////////////////////// Inherited from BaseObject /////////////////// void init() override; void reinit() override; - void parse(core::objectmodel::BaseObjectDescription* arg) override; + void parse(core::objectmodel::BaseComponentDescription* arg) override; //////////////////////////////////////////////////////////////////////// ////////////////////////// Inherited from DataEngine//////////////////// diff --git a/Sofa/Component/Engine/Generate/src/sofa/component/engine/generate/VolumeFromTetrahedrons.inl b/Sofa/Component/Engine/Generate/src/sofa/component/engine/generate/VolumeFromTetrahedrons.inl index dd1632b03c9..0f5c76ab5c5 100644 --- a/Sofa/Component/Engine/Generate/src/sofa/component/engine/generate/VolumeFromTetrahedrons.inl +++ b/Sofa/Component/Engine/Generate/src/sofa/component/engine/generate/VolumeFromTetrahedrons.inl @@ -51,7 +51,7 @@ VolumeFromTetrahedrons::VolumeFromTetrahedrons() } template -void VolumeFromTetrahedrons::parse(core::objectmodel::BaseObjectDescription* arg) +void VolumeFromTetrahedrons::parse(core::objectmodel::BaseComponentDescription* arg) { Inherit1::parse(arg); diff --git a/Sofa/Component/Engine/Generate/src/sofa/component/engine/generate/VolumeFromTriangles.h b/Sofa/Component/Engine/Generate/src/sofa/component/engine/generate/VolumeFromTriangles.h index 0df7d23eb8a..b1aca781587 100644 --- a/Sofa/Component/Engine/Generate/src/sofa/component/engine/generate/VolumeFromTriangles.h +++ b/Sofa/Component/Engine/Generate/src/sofa/component/engine/generate/VolumeFromTriangles.h @@ -63,7 +63,7 @@ class VolumeFromTriangles : public sofa::core::DataEngine ////////////////////////// Inherited from BaseObject /////////////////// void init() override; void reinit() override; - void parse(core::objectmodel::BaseObjectDescription* arg) override; + void parse(core::objectmodel::BaseComponentDescription* arg) override; //////////////////////////////////////////////////////////////////////// diff --git a/Sofa/Component/Engine/Generate/src/sofa/component/engine/generate/VolumeFromTriangles.inl b/Sofa/Component/Engine/Generate/src/sofa/component/engine/generate/VolumeFromTriangles.inl index e373cb52035..2d10b637b32 100644 --- a/Sofa/Component/Engine/Generate/src/sofa/component/engine/generate/VolumeFromTriangles.inl +++ b/Sofa/Component/Engine/Generate/src/sofa/component/engine/generate/VolumeFromTriangles.inl @@ -55,7 +55,7 @@ VolumeFromTriangles::~VolumeFromTriangles() } template -void VolumeFromTriangles::parse(core::objectmodel::BaseObjectDescription* arg) +void VolumeFromTriangles::parse(core::objectmodel::BaseComponentDescription* arg) { Inherit1::parse(arg); diff --git a/Sofa/Component/Engine/Generate/tests/ExtrudeEdgesAndGenerateQuads_test.cpp b/Sofa/Component/Engine/Generate/tests/ExtrudeEdgesAndGenerateQuads_test.cpp index c7a2fdd853c..65ce5e8a263 100644 --- a/Sofa/Component/Engine/Generate/tests/ExtrudeEdgesAndGenerateQuads_test.cpp +++ b/Sofa/Component/Engine/Generate/tests/ExtrudeEdgesAndGenerateQuads_test.cpp @@ -25,12 +25,11 @@ using sofa::testing::BaseSimulationTest; #include -#include +#include using sofa::simulation::Simulation ; using sofa::simulation::Node ; using sofa::core::objectmodel::New ; using sofa::core::objectmodel::BaseData ; -using sofa::simulation::graph::DAGSimulation; #include using sofa::component::engine::generate::ExtrudeEdgesAndGenerateQuads ; diff --git a/Sofa/Component/Engine/Generate/tests/MergePoints_test.cpp b/Sofa/Component/Engine/Generate/tests/MergePoints_test.cpp index 5f50d949e1f..27457424ec9 100644 --- a/Sofa/Component/Engine/Generate/tests/MergePoints_test.cpp +++ b/Sofa/Component/Engine/Generate/tests/MergePoints_test.cpp @@ -22,8 +22,7 @@ #include using sofa::testing::BaseSimulationTest; -#include -using sofa::simulation::graph::DAGSimulation; +#include using sofa::simulation::Simulation ; using sofa::core::objectmodel::New ; diff --git a/Sofa/Component/Engine/Select/src/sofa/component/engine/select/BoxROI.h b/Sofa/Component/Engine/Select/src/sofa/component/engine/select/BoxROI.h index 454b6a950f7..07313880f8e 100644 --- a/Sofa/Component/Engine/Select/src/sofa/component/engine/select/BoxROI.h +++ b/Sofa/Component/Engine/Select/src/sofa/component/engine/select/BoxROI.h @@ -38,7 +38,7 @@ namespace sofa::component::engine::select::boxroi /// It is then import into sofa::component::engine::BoxROI to not break the /// API. - using core::objectmodel::BaseObjectDescription ; + using core::objectmodel::BaseComponentDescription ; using sofa::core::behavior::MechanicalState ; using core::topology::BaseMeshTopology ; using core::behavior::MechanicalState ; diff --git a/Sofa/Component/Engine/Select/src/sofa/component/engine/select/ComplementaryROI.h b/Sofa/Component/Engine/Select/src/sofa/component/engine/select/ComplementaryROI.h index 6d5dca64cae..9921815c1d8 100644 --- a/Sofa/Component/Engine/Select/src/sofa/component/engine/select/ComplementaryROI.h +++ b/Sofa/Component/Engine/Select/src/sofa/component/engine/select/ComplementaryROI.h @@ -53,7 +53,7 @@ class ComplementaryROI : public core::DataEngine void doUpdate() override; /// Parse the given description to assign values to this object's fields and potentially other parameters - void parse ( sofa::core::objectmodel::BaseObjectDescription* arg ) override; + void parse ( sofa::core::objectmodel::BaseComponentDescription* arg ) override; /// Assign the field values stored in the given map of name -> value pairs void parseFields ( const std::map& str ) override; diff --git a/Sofa/Component/Engine/Select/src/sofa/component/engine/select/ComplementaryROI.inl b/Sofa/Component/Engine/Select/src/sofa/component/engine/select/ComplementaryROI.inl index d3f725df9cd..d33c0607484 100644 --- a/Sofa/Component/Engine/Select/src/sofa/component/engine/select/ComplementaryROI.inl +++ b/Sofa/Component/Engine/Select/src/sofa/component/engine/select/ComplementaryROI.inl @@ -33,7 +33,7 @@ namespace sofa::component::engine::select using std::string; using std::set; using std::map; -using sofa::core::objectmodel::BaseObjectDescription; +using sofa::core::objectmodel::BaseComponentDescription; using helper::ReadAccessor; using helper::WriteAccessor; diff --git a/Sofa/Component/Engine/Select/src/sofa/component/engine/select/MergeROIs.cpp b/Sofa/Component/Engine/Select/src/sofa/component/engine/select/MergeROIs.cpp index ecff461e51d..0aedeb3c502 100644 --- a/Sofa/Component/Engine/Select/src/sofa/component/engine/select/MergeROIs.cpp +++ b/Sofa/Component/Engine/Select/src/sofa/component/engine/select/MergeROIs.cpp @@ -44,7 +44,7 @@ void MergeROIs::reinit() update(); } -void MergeROIs::parse ( core::objectmodel::BaseObjectDescription* arg ) +void MergeROIs::parse ( core::objectmodel::BaseComponentDescription* arg ) { f_indices.parseSizeData(arg, d_nbROIs); Inherit1::parse(arg); diff --git a/Sofa/Component/Engine/Select/src/sofa/component/engine/select/MergeROIs.h b/Sofa/Component/Engine/Select/src/sofa/component/engine/select/MergeROIs.h index 1b1e49511a8..7ebb2ebc69d 100644 --- a/Sofa/Component/Engine/Select/src/sofa/component/engine/select/MergeROIs.h +++ b/Sofa/Component/Engine/Select/src/sofa/component/engine/select/MergeROIs.h @@ -53,7 +53,7 @@ class SOFA_COMPONENT_ENGINE_SELECT_API MergeROIs : public sofa::core::DataEngine void reinit() override; /// Parse the given description to assign values to this object's fields and potentially other parameters - void parse ( core::objectmodel::BaseObjectDescription* arg ) override; + void parse ( core::objectmodel::BaseComponentDescription* arg ) override; /// Assign the field values stored in the given map of name -> value pairs void parseFields ( const std::map& str ) override; diff --git a/Sofa/Component/Engine/Select/src/sofa/component/engine/select/MeshSplittingEngine.h b/Sofa/Component/Engine/Select/src/sofa/component/engine/select/MeshSplittingEngine.h index 8c0cb7ab722..81fa4f047c1 100644 --- a/Sofa/Component/Engine/Select/src/sofa/component/engine/select/MeshSplittingEngine.h +++ b/Sofa/Component/Engine/Select/src/sofa/component/engine/select/MeshSplittingEngine.h @@ -103,7 +103,7 @@ class MeshSplittingEngine : public core::DataEngine void reinit() override { resizeData(); update(); } /// Parse the given description to assign values to this object's fields and potentially other parameters - void parse ( sofa::core::objectmodel::BaseObjectDescription* arg ) override + void parse ( sofa::core::objectmodel::BaseComponentDescription* arg ) override { const char* p = arg->getAttribute(nbInputs.getName().c_str()); if (p) { diff --git a/Sofa/Component/Engine/Select/src/sofa/component/engine/select/PairBoxRoi.h b/Sofa/Component/Engine/Select/src/sofa/component/engine/select/PairBoxRoi.h index 97c25dccb20..9643e6bd3b9 100644 --- a/Sofa/Component/Engine/Select/src/sofa/component/engine/select/PairBoxRoi.h +++ b/Sofa/Component/Engine/Select/src/sofa/component/engine/select/PairBoxRoi.h @@ -71,7 +71,7 @@ class PairBoxROI : public core::DataEngine /// Pre-construction check method called by ObjectFactory. /// Check that DataTypes matches the MechanicalState. template - static bool canCreate(T*& obj, core::objectmodel::BaseContext* context, core::objectmodel::BaseObjectDescription* arg) + static bool canCreate(T*& obj, core::objectmodel::BaseContext* context, core::objectmodel::BaseComponentDescription* arg) { if (!arg->getAttribute("template")) { diff --git a/Sofa/Component/Engine/Select/src/sofa/component/engine/select/PlaneROI.h b/Sofa/Component/Engine/Select/src/sofa/component/engine/select/PlaneROI.h index 5c2b9a1bb67..1131ee54f4a 100644 --- a/Sofa/Component/Engine/Select/src/sofa/component/engine/select/PlaneROI.h +++ b/Sofa/Component/Engine/Select/src/sofa/component/engine/select/PlaneROI.h @@ -75,7 +75,7 @@ class PlaneROI : public core::DataEngine /// Pre-construction check method called by ObjectFactory. /// Check that DataTypes matches the MechanicalState. template - static bool canCreate(T*& obj, core::objectmodel::BaseContext* context, core::objectmodel::BaseObjectDescription* arg) + static bool canCreate(T*& obj, core::objectmodel::BaseContext* context, core::objectmodel::BaseComponentDescription* arg) { if (!arg->getAttribute("template")) { diff --git a/Sofa/Component/Engine/Select/src/sofa/component/engine/select/ProximityROI.h b/Sofa/Component/Engine/Select/src/sofa/component/engine/select/ProximityROI.h index fd831fc878a..da7950a0ed5 100644 --- a/Sofa/Component/Engine/Select/src/sofa/component/engine/select/ProximityROI.h +++ b/Sofa/Component/Engine/Select/src/sofa/component/engine/select/ProximityROI.h @@ -69,7 +69,7 @@ class ProximityROI : public core::DataEngine /// Pre-construction check method called by ObjectFactory. /// Check that DataTypes matches the MechanicalState. template - static bool canCreate(T*& obj, core::objectmodel::BaseContext* context, core::objectmodel::BaseObjectDescription* arg) + static bool canCreate(T*& obj, core::objectmodel::BaseContext* context, core::objectmodel::BaseComponentDescription* arg) { if (!arg->getAttribute("template")) { diff --git a/Sofa/Component/Engine/Select/src/sofa/component/engine/select/SelectConnectedLabelsROI.h b/Sofa/Component/Engine/Select/src/sofa/component/engine/select/SelectConnectedLabelsROI.h index b39623c137b..f89f22ee6ba 100644 --- a/Sofa/Component/Engine/Select/src/sofa/component/engine/select/SelectConnectedLabelsROI.h +++ b/Sofa/Component/Engine/Select/src/sofa/component/engine/select/SelectConnectedLabelsROI.h @@ -81,7 +81,7 @@ class SelectConnectedLabelsROI : public sofa::core::DataEngine /// Parse the given description to assign values to this object's fields and potentially other parameters - void parse ( sofa::core::objectmodel::BaseObjectDescription* arg ) override + void parse ( sofa::core::objectmodel::BaseComponentDescription* arg ) override { d_labels.parseSizeData(arg, d_nbLabels); Inherit1::parse(arg); diff --git a/Sofa/Component/Engine/Select/src/sofa/component/engine/select/SubsetTopology.h b/Sofa/Component/Engine/Select/src/sofa/component/engine/select/SubsetTopology.h index cf25d0d02f9..896bd61a0cd 100644 --- a/Sofa/Component/Engine/Select/src/sofa/component/engine/select/SubsetTopology.h +++ b/Sofa/Component/Engine/Select/src/sofa/component/engine/select/SubsetTopology.h @@ -76,7 +76,7 @@ class SubsetTopology : public core::DataEngine /// Pre-construction check method called by ObjectFactory. /// Check that DataTypes matches the MechanicalState. template - static bool canCreate(T*& obj, core::objectmodel::BaseContext* context, core::objectmodel::BaseObjectDescription* arg) + static bool canCreate(T*& obj, core::objectmodel::BaseContext* context, core::objectmodel::BaseComponentDescription* arg) { if (!arg->getAttribute("template")) { diff --git a/Sofa/Component/Engine/Select/src/sofa/component/engine/select/ValuesFromPositions.h b/Sofa/Component/Engine/Select/src/sofa/component/engine/select/ValuesFromPositions.h index 0865772ca9b..3f085c2ce42 100644 --- a/Sofa/Component/Engine/Select/src/sofa/component/engine/select/ValuesFromPositions.h +++ b/Sofa/Component/Engine/Select/src/sofa/component/engine/select/ValuesFromPositions.h @@ -73,7 +73,7 @@ class ValuesFromPositions : public core::DataEngine /// Pre-construction check method called by ObjectFactory. /// Check that DataTypes matches the MechanicalState. template - static bool canCreate(T*& obj, core::objectmodel::BaseContext* context, core::objectmodel::BaseObjectDescription* arg) + static bool canCreate(T*& obj, core::objectmodel::BaseContext* context, core::objectmodel::BaseComponentDescription* arg) { if (!arg->getAttribute("template")) { diff --git a/Sofa/Component/Engine/Select/tests/BoxROI_test.cpp b/Sofa/Component/Engine/Select/tests/BoxROI_test.cpp index ad752d4ba25..8eb1a9432a3 100644 --- a/Sofa/Component/Engine/Select/tests/BoxROI_test.cpp +++ b/Sofa/Component/Engine/Select/tests/BoxROI_test.cpp @@ -37,9 +37,8 @@ using sofa::core::objectmodel::ComponentState; #include using sofa::component::engine::select::BoxROI; -#include +#include using sofa::simulation::Simulation; -using sofa::simulation::graph::DAGSimulation; #include using sofa::simulation::Node; using sofa::core::objectmodel::BaseComponent; diff --git a/Sofa/Component/Engine/Select/tests/ComplementaryROI_test.cpp b/Sofa/Component/Engine/Select/tests/ComplementaryROI_test.cpp index ec055b0321a..48a44458bf9 100644 --- a/Sofa/Component/Engine/Select/tests/ComplementaryROI_test.cpp +++ b/Sofa/Component/Engine/Select/tests/ComplementaryROI_test.cpp @@ -25,12 +25,11 @@ using sofa::testing::BaseSimulationTest; #include -#include +#include using sofa::simulation::Simulation ; using sofa::simulation::Node ; using sofa::core::objectmodel::New ; using sofa::core::objectmodel::BaseData ; -using sofa::simulation::graph::DAGSimulation; #include using sofa::core::visual::VisualParams; diff --git a/Sofa/Component/Engine/Select/tests/MeshROI_test.cpp b/Sofa/Component/Engine/Select/tests/MeshROI_test.cpp index 66867cba9b5..ff9bcf9ee97 100644 --- a/Sofa/Component/Engine/Select/tests/MeshROI_test.cpp +++ b/Sofa/Component/Engine/Select/tests/MeshROI_test.cpp @@ -25,12 +25,11 @@ using sofa::testing::BaseSimulationTest; #include -#include +#include using sofa::simulation::Simulation ; using sofa::simulation::Node ; using sofa::core::objectmodel::New ; using sofa::core::objectmodel::BaseData ; -using sofa::simulation::graph::DAGSimulation; #include using sofa::component::engine::select::MeshROI ; diff --git a/Sofa/Component/Engine/Select/tests/PlaneROI_test.cpp b/Sofa/Component/Engine/Select/tests/PlaneROI_test.cpp index a50e5cb6519..8b7d48f8e2f 100644 --- a/Sofa/Component/Engine/Select/tests/PlaneROI_test.cpp +++ b/Sofa/Component/Engine/Select/tests/PlaneROI_test.cpp @@ -25,12 +25,11 @@ using sofa::testing::BaseSimulationTest; #include -#include +#include using sofa::simulation::Simulation ; using sofa::simulation::Node ; using sofa::core::objectmodel::New ; using sofa::core::objectmodel::BaseData ; -using sofa::simulation::graph::DAGSimulation; #include using sofa::component::engine::select::PlaneROI ; diff --git a/Sofa/Component/Engine/Select/tests/SphereROI_test.cpp b/Sofa/Component/Engine/Select/tests/SphereROI_test.cpp index 0bfb8a12387..317fff9f93c 100644 --- a/Sofa/Component/Engine/Select/tests/SphereROI_test.cpp +++ b/Sofa/Component/Engine/Select/tests/SphereROI_test.cpp @@ -25,12 +25,11 @@ using sofa::testing::BaseSimulationTest; #include -#include +#include using sofa::simulation::Simulation ; using sofa::simulation::Node ; using sofa::core::objectmodel::New ; using sofa::core::objectmodel::BaseData ; -using sofa::simulation::graph::DAGSimulation; #include using sofa::component::engine::select::SphereROI ; diff --git a/Sofa/Component/Engine/Transform/src/sofa/component/engine/transform/MathOp.h b/Sofa/Component/Engine/Transform/src/sofa/component/engine/transform/MathOp.h index a6ac0f642c8..4e354184717 100644 --- a/Sofa/Component/Engine/Transform/src/sofa/component/engine/transform/MathOp.h +++ b/Sofa/Component/Engine/Transform/src/sofa/component/engine/transform/MathOp.h @@ -49,7 +49,7 @@ class MathOp : public core::DataEngine ~MathOp() override; public: /// Parse the given description to assign values to this object's fields and potentially other parameters - void parse ( sofa::core::objectmodel::BaseObjectDescription* arg ) override; + void parse ( sofa::core::objectmodel::BaseComponentDescription* arg ) override; /// Assign the field values stored in the given map of name -> value pairs void parseFields ( const std::map& str ) override; diff --git a/Sofa/Component/Engine/Transform/src/sofa/component/engine/transform/MathOp.inl b/Sofa/Component/Engine/Transform/src/sofa/component/engine/transform/MathOp.inl index 6d4338ed308..bb74b917c52 100644 --- a/Sofa/Component/Engine/Transform/src/sofa/component/engine/transform/MathOp.inl +++ b/Sofa/Component/Engine/Transform/src/sofa/component/engine/transform/MathOp.inl @@ -405,7 +405,7 @@ void MathOp::createInputs(int nb) /// Parse the given description to assign values to this object's fields and potentially other parameters template -void MathOp::parse ( sofa::core::objectmodel::BaseObjectDescription* arg ) +void MathOp::parse ( sofa::core::objectmodel::BaseComponentDescription* arg ) { const char* p = arg->getAttribute(f_nbInputs.getName().c_str()); if (p) diff --git a/Sofa/Component/Engine/Transform/src/sofa/component/engine/transform/ROIValueMapper.h b/Sofa/Component/Engine/Transform/src/sofa/component/engine/transform/ROIValueMapper.h index 9553e7e641c..763f182b6d7 100644 --- a/Sofa/Component/Engine/Transform/src/sofa/component/engine/transform/ROIValueMapper.h +++ b/Sofa/Component/Engine/Transform/src/sofa/component/engine/transform/ROIValueMapper.h @@ -71,7 +71,7 @@ class ROIValueMapper : public sofa::core::DataEngine /// Parse the given description to assign values to this object's fields and potentially other parameters - void parse ( sofa::core::objectmodel::BaseObjectDescription* arg ) override + void parse ( sofa::core::objectmodel::BaseComponentDescription* arg ) override { f_indices.parseSizeData(arg, nbROIs); f_value.parseSizeData(arg, nbROIs); diff --git a/Sofa/Component/Engine/Transform/tests/DifferenceEngine_test.cpp b/Sofa/Component/Engine/Transform/tests/DifferenceEngine_test.cpp index d2f7ecddbbd..91d7d47db54 100644 --- a/Sofa/Component/Engine/Transform/tests/DifferenceEngine_test.cpp +++ b/Sofa/Component/Engine/Transform/tests/DifferenceEngine_test.cpp @@ -25,12 +25,11 @@ using sofa::testing::BaseSimulationTest; #include -#include +#include using sofa::simulation::Simulation ; using sofa::simulation::Node ; using sofa::core::objectmodel::New ; using sofa::core::objectmodel::BaseData ; -using sofa::simulation::graph::DAGSimulation; #include using sofa::core::visual::VisualParams; diff --git a/Sofa/Component/Engine/Transform/tests/DilateEngine_test.cpp b/Sofa/Component/Engine/Transform/tests/DilateEngine_test.cpp index bbed29b8fa5..2c64a808610 100644 --- a/Sofa/Component/Engine/Transform/tests/DilateEngine_test.cpp +++ b/Sofa/Component/Engine/Transform/tests/DilateEngine_test.cpp @@ -25,12 +25,11 @@ using sofa::testing::BaseSimulationTest; #include -#include +#include using sofa::simulation::Simulation ; using sofa::simulation::Node ; using sofa::core::objectmodel::New ; using sofa::core::objectmodel::BaseData ; -using sofa::simulation::graph::DAGSimulation; #include using sofa::component::engine::transform::DilateEngine ; diff --git a/Sofa/Component/Engine/Transform/tests/SmoothMeshEngine_test.cpp b/Sofa/Component/Engine/Transform/tests/SmoothMeshEngine_test.cpp index d28d41321e9..303c174e273 100644 --- a/Sofa/Component/Engine/Transform/tests/SmoothMeshEngine_test.cpp +++ b/Sofa/Component/Engine/Transform/tests/SmoothMeshEngine_test.cpp @@ -24,12 +24,11 @@ using sofa::testing::BaseSimulationTest; #include -#include +#include using sofa::simulation::Simulation ; using sofa::simulation::Node ; using sofa::core::objectmodel::New ; using sofa::core::objectmodel::BaseData ; -using sofa::simulation::graph::DAGSimulation; #include using sofa::component::engine::transform::SmoothMeshEngine ; diff --git a/Sofa/Component/Haptics/src/sofa/component/haptics/LCPForceFeedback.h b/Sofa/Component/Haptics/src/sofa/component/haptics/LCPForceFeedback.h index a5d10337cc5..a7029a5c9a7 100644 --- a/Sofa/Component/Haptics/src/sofa/component/haptics/LCPForceFeedback.h +++ b/Sofa/Component/Haptics/src/sofa/component/haptics/LCPForceFeedback.h @@ -97,7 +97,7 @@ class LCPForceFeedback : public MechanicalStateForceFeedback /// Pre-construction check method called by ObjectFactory. /// Check that DataTypes matches the MechanicalState. template - static bool canCreate(T*& obj, core::objectmodel::BaseContext* context, core::objectmodel::BaseObjectDescription* arg) + static bool canCreate(T*& obj, core::objectmodel::BaseContext* context, core::objectmodel::BaseComponentDescription* arg) { if (dynamic_cast< core::behavior::MechanicalState* >(context->getMechanicalState()) == nullptr) { arg->logError(std::string("No mechanical state with the datatype '") + DataTypes::Name() + "' found in the context node."); diff --git a/Sofa/Component/IO/Mesh/tests/MeshExporter_test.cpp b/Sofa/Component/IO/Mesh/tests/MeshExporter_test.cpp index 112017d7a2d..c89bc983c1c 100644 --- a/Sofa/Component/IO/Mesh/tests/MeshExporter_test.cpp +++ b/Sofa/Component/IO/Mesh/tests/MeshExporter_test.cpp @@ -33,9 +33,6 @@ using sofa::testing::BaseSimulationTest; #include using sofa::core::objectmodel::BaseObject ; -#include -using sofa::simulation::graph::DAGSimulation ; - #include using sofa::simulation::Node ; diff --git a/Sofa/Component/IO/Mesh/tests/STLExporter_test.cpp b/Sofa/Component/IO/Mesh/tests/STLExporter_test.cpp index 9753bd4101c..1534b318377 100644 --- a/Sofa/Component/IO/Mesh/tests/STLExporter_test.cpp +++ b/Sofa/Component/IO/Mesh/tests/STLExporter_test.cpp @@ -31,9 +31,6 @@ using sofa::testing::BaseSimulationTest; #include using sofa::core::objectmodel::BaseObject ; -#include -using sofa::simulation::graph::DAGSimulation ; - #include using sofa::simulation::Node ; diff --git a/Sofa/Component/IO/Mesh/tests/VisualModelOBJExporter_test.cpp b/Sofa/Component/IO/Mesh/tests/VisualModelOBJExporter_test.cpp index eeb1810bcd0..526563cd35d 100644 --- a/Sofa/Component/IO/Mesh/tests/VisualModelOBJExporter_test.cpp +++ b/Sofa/Component/IO/Mesh/tests/VisualModelOBJExporter_test.cpp @@ -31,9 +31,6 @@ using sofa::testing::BaseSimulationTest; #include using sofa::core::objectmodel::BaseObject ; -#include -using sofa::simulation::graph::DAGSimulation ; - #include using sofa::simulation::Node ; diff --git a/Sofa/Component/LinearSolver/Direct/src/sofa/component/linearsolver/direct/BTDLinearSolver.h b/Sofa/Component/LinearSolver/Direct/src/sofa/component/linearsolver/direct/BTDLinearSolver.h index 6c66bd9b86e..a626494281a 100644 --- a/Sofa/Component/LinearSolver/Direct/src/sofa/component/linearsolver/direct/BTDLinearSolver.h +++ b/Sofa/Component/LinearSolver/Direct/src/sofa/component/linearsolver/direct/BTDLinearSolver.h @@ -134,7 +134,7 @@ class BTDLinearSolver : public sofa::component::linearsolver::MatrixLinearSolver bool addJMInvJt(RMatrix& result, JMatrix& J, double fact); - void parse(sofa::core::objectmodel::BaseObjectDescription* arg) override + void parse(sofa::core::objectmodel::BaseComponentDescription* arg) override { Inherit1::parse(arg); diff --git a/Sofa/Component/LinearSolver/Direct/src/sofa/component/linearsolver/direct/PrecomputedLinearSolver.h b/Sofa/Component/LinearSolver/Direct/src/sofa/component/linearsolver/direct/PrecomputedLinearSolver.h index afb07d31872..42a1a4fdbd4 100644 --- a/Sofa/Component/LinearSolver/Direct/src/sofa/component/linearsolver/direct/PrecomputedLinearSolver.h +++ b/Sofa/Component/LinearSolver/Direct/src/sofa/component/linearsolver/direct/PrecomputedLinearSolver.h @@ -104,7 +104,7 @@ class PrecomputedLinearSolver : public sofa::component::linearsolver::MatrixLine return &internalData.Minv; } - void parse(core::objectmodel::BaseObjectDescription *arg) override; + void parse(core::objectmodel::BaseComponentDescription *arg) override; protected : template diff --git a/Sofa/Component/LinearSolver/Direct/src/sofa/component/linearsolver/direct/PrecomputedLinearSolver.inl b/Sofa/Component/LinearSolver/Direct/src/sofa/component/linearsolver/direct/PrecomputedLinearSolver.inl index bf5100e7363..5ec2d753f3f 100644 --- a/Sofa/Component/LinearSolver/Direct/src/sofa/component/linearsolver/direct/PrecomputedLinearSolver.inl +++ b/Sofa/Component/LinearSolver/Direct/src/sofa/component/linearsolver/direct/PrecomputedLinearSolver.inl @@ -210,7 +210,7 @@ bool PrecomputedLinearSolver::addJMInvJt(linearalgebra::BaseMat } template -void PrecomputedLinearSolver::parse(core::objectmodel::BaseObjectDescription* arg) +void PrecomputedLinearSolver::parse(core::objectmodel::BaseComponentDescription* arg) { if (arg->getAttribute("verbose")) { diff --git a/Sofa/Component/LinearSolver/Direct/src/sofa/component/linearsolver/direct/SparseLDLSolver.h b/Sofa/Component/LinearSolver/Direct/src/sofa/component/linearsolver/direct/SparseLDLSolver.h index 0d2326367d6..1828168bbfc 100644 --- a/Sofa/Component/LinearSolver/Direct/src/sofa/component/linearsolver/direct/SparseLDLSolver.h +++ b/Sofa/Component/LinearSolver/Direct/src/sofa/component/linearsolver/direct/SparseLDLSolver.h @@ -57,7 +57,7 @@ public : typedef SparseLDLImplInvertData, type::vector > InvertData; void init() override; - void parse( sofa::core::objectmodel::BaseObjectDescription* arg ) override; + void parse( sofa::core::objectmodel::BaseComponentDescription* arg ) override; void solve (Matrix& M, Vector& x, Vector& b) override; void invert(Matrix& M) override; bool doAddJMInvJtLocal(ResMatrixType* result, const JMatrixType* J, SReal fact, InvertData* data); diff --git a/Sofa/Component/LinearSolver/Direct/src/sofa/component/linearsolver/direct/SparseLDLSolver.inl b/Sofa/Component/LinearSolver/Direct/src/sofa/component/linearsolver/direct/SparseLDLSolver.inl index b4288c9f9e8..5d77d4d07ef 100644 --- a/Sofa/Component/LinearSolver/Direct/src/sofa/component/linearsolver/direct/SparseLDLSolver.inl +++ b/Sofa/Component/LinearSolver/Direct/src/sofa/component/linearsolver/direct/SparseLDLSolver.inl @@ -55,7 +55,7 @@ void SparseLDLSolver::init() } template -void SparseLDLSolver::parse(sofa::core::objectmodel::BaseObjectDescription* arg) +void SparseLDLSolver::parse(sofa::core::objectmodel::BaseComponentDescription* arg) { Inherit1::parse(arg); diff --git a/Sofa/Component/LinearSolver/Iterative/src/sofa/component/linearsolver/iterative/MinResLinearSolver.h b/Sofa/Component/LinearSolver/Iterative/src/sofa/component/linearsolver/iterative/MinResLinearSolver.h index ae8dc6032cc..e743350efed 100644 --- a/Sofa/Component/LinearSolver/Iterative/src/sofa/component/linearsolver/iterative/MinResLinearSolver.h +++ b/Sofa/Component/LinearSolver/Iterative/src/sofa/component/linearsolver/iterative/MinResLinearSolver.h @@ -55,7 +55,7 @@ class MinResLinearSolver : public sofa::component::linearsolver::MatrixLinearSol /// Solve Mx=b void solve (Matrix& M, Vector& x, Vector& b) override; - void parse(core::objectmodel::BaseObjectDescription* arg) override; + void parse(core::objectmodel::BaseComponentDescription* arg) override; }; #if !defined(SOFA_COMPONENT_LINEARSOLVER_MINRESLINEARSOLVER_CPP) diff --git a/Sofa/Component/LinearSolver/Iterative/src/sofa/component/linearsolver/iterative/MinResLinearSolver.inl b/Sofa/Component/LinearSolver/Iterative/src/sofa/component/linearsolver/iterative/MinResLinearSolver.inl index 7ba7b3fc744..54ca2f0e37d 100644 --- a/Sofa/Component/LinearSolver/Iterative/src/sofa/component/linearsolver/iterative/MinResLinearSolver.inl +++ b/Sofa/Component/LinearSolver/Iterative/src/sofa/component/linearsolver/iterative/MinResLinearSolver.inl @@ -240,7 +240,7 @@ void MinResLinearSolver::solve(Matrix& A, Vector& x, Vector& b) } template -void MinResLinearSolver::parse(core::objectmodel::BaseObjectDescription* arg) +void MinResLinearSolver::parse(core::objectmodel::BaseComponentDescription* arg) { if (arg->getAttribute("verbose")) { diff --git a/Sofa/Component/LinearSolver/Ordering/src/sofa/component/linearsolver/ordering/OrderingMethodAccessor.h b/Sofa/Component/LinearSolver/Ordering/src/sofa/component/linearsolver/ordering/OrderingMethodAccessor.h index f3f9fd08623..3e4ff8f89af 100644 --- a/Sofa/Component/LinearSolver/Ordering/src/sofa/component/linearsolver/ordering/OrderingMethodAccessor.h +++ b/Sofa/Component/LinearSolver/Ordering/src/sofa/component/linearsolver/ordering/OrderingMethodAccessor.h @@ -61,7 +61,7 @@ class OrderingMethodAccessor : public TBase } else { - core::objectmodel::BaseObjectDescription description(desiredMethod.c_str(), desiredMethod.c_str()); + core::objectmodel::BaseComponentDescription description(desiredMethod.c_str(), desiredMethod.c_str()); const core::objectmodel::BaseComponent::SPtr baseObject = core::ObjectFactory::getInstance()->createObject(this->getContext(), &description); if (auto* metisOrderingMethod = dynamic_cast(baseObject.get())) { diff --git a/Sofa/Component/LinearSolver/Preconditioner/src/sofa/component/linearsolver/preconditioner/BlockJacobiPreconditioner.h b/Sofa/Component/LinearSolver/Preconditioner/src/sofa/component/linearsolver/preconditioner/BlockJacobiPreconditioner.h index 2b257265dd2..278d70ad57a 100644 --- a/Sofa/Component/LinearSolver/Preconditioner/src/sofa/component/linearsolver/preconditioner/BlockJacobiPreconditioner.h +++ b/Sofa/Component/LinearSolver/Preconditioner/src/sofa/component/linearsolver/preconditioner/BlockJacobiPreconditioner.h @@ -68,7 +68,7 @@ class BlockJacobiPreconditioner : public sofa::component::linearsolver::MatrixLi return TVector::Name(); } - void parse(core::objectmodel::BaseObjectDescription *arg) override; + void parse(core::objectmodel::BaseComponentDescription *arg) override; }; #if !defined(SOFA_COMPONENT_LINEARSOLVER_PRECONDITIONER_BLOCKJACOBIPRECONDITIONER_CPP) diff --git a/Sofa/Component/LinearSolver/Preconditioner/src/sofa/component/linearsolver/preconditioner/BlockJacobiPreconditioner.inl b/Sofa/Component/LinearSolver/Preconditioner/src/sofa/component/linearsolver/preconditioner/BlockJacobiPreconditioner.inl index 4cbd6ae2894..63f45111385 100644 --- a/Sofa/Component/LinearSolver/Preconditioner/src/sofa/component/linearsolver/preconditioner/BlockJacobiPreconditioner.inl +++ b/Sofa/Component/LinearSolver/Preconditioner/src/sofa/component/linearsolver/preconditioner/BlockJacobiPreconditioner.inl @@ -55,7 +55,7 @@ void BlockJacobiPreconditioner::invert(Matrix& M) template void BlockJacobiPreconditioner::parse( - core::objectmodel::BaseObjectDescription* arg) + core::objectmodel::BaseComponentDescription* arg) { if (arg->getAttribute("verbose")) { diff --git a/Sofa/Component/LinearSolver/Preconditioner/src/sofa/component/linearsolver/preconditioner/JacobiPreconditioner.h b/Sofa/Component/LinearSolver/Preconditioner/src/sofa/component/linearsolver/preconditioner/JacobiPreconditioner.h index 1d6f02e61c8..8ecf741ab4b 100644 --- a/Sofa/Component/LinearSolver/Preconditioner/src/sofa/component/linearsolver/preconditioner/JacobiPreconditioner.h +++ b/Sofa/Component/LinearSolver/Preconditioner/src/sofa/component/linearsolver/preconditioner/JacobiPreconditioner.h @@ -57,7 +57,7 @@ class JacobiPreconditioner : public sofa::component::linearsolver::MatrixLinearS return TMatrix::Name(); } - void parse(core::objectmodel::BaseObjectDescription *arg) override; + void parse(core::objectmodel::BaseComponentDescription *arg) override; }; diff --git a/Sofa/Component/LinearSolver/Preconditioner/src/sofa/component/linearsolver/preconditioner/JacobiPreconditioner.inl b/Sofa/Component/LinearSolver/Preconditioner/src/sofa/component/linearsolver/preconditioner/JacobiPreconditioner.inl index 912a004396c..bf819d95a7d 100644 --- a/Sofa/Component/LinearSolver/Preconditioner/src/sofa/component/linearsolver/preconditioner/JacobiPreconditioner.inl +++ b/Sofa/Component/LinearSolver/Preconditioner/src/sofa/component/linearsolver/preconditioner/JacobiPreconditioner.inl @@ -55,7 +55,7 @@ void JacobiPreconditioner::invert(Matrix& M) } template -void JacobiPreconditioner::parse(core::objectmodel::BaseObjectDescription* arg) +void JacobiPreconditioner::parse(core::objectmodel::BaseComponentDescription* arg) { if (arg->getAttribute("verbose")) { diff --git a/Sofa/Component/LinearSolver/Preconditioner/src/sofa/component/linearsolver/preconditioner/PrecomputedWarpPreconditioner.h b/Sofa/Component/LinearSolver/Preconditioner/src/sofa/component/linearsolver/preconditioner/PrecomputedWarpPreconditioner.h index bd57f8d29e8..c4598c1371f 100644 --- a/Sofa/Component/LinearSolver/Preconditioner/src/sofa/component/linearsolver/preconditioner/PrecomputedWarpPreconditioner.h +++ b/Sofa/Component/LinearSolver/Preconditioner/src/sofa/component/linearsolver/preconditioner/PrecomputedWarpPreconditioner.h @@ -135,7 +135,7 @@ class PrecomputedWarpPreconditioner : public sofa::component::linearsolver::Matr /// Pre-construction check method called by ObjectFactory. /// Check that DataTypes matches the MechanicalState. template - static bool canCreate(T*& obj, core::objectmodel::BaseContext* context, core::objectmodel::BaseObjectDescription* arg) + static bool canCreate(T*& obj, core::objectmodel::BaseContext* context, core::objectmodel::BaseComponentDescription* arg) { if (dynamic_cast *>(context->getMechanicalState()) == nullptr) { arg->logError(std::string("No mechanical state with the datatype '") + TDataTypes::Name() + "' found in the context node."); diff --git a/Sofa/Component/LinearSolver/Preconditioner/src/sofa/component/linearsolver/preconditioner/SSORPreconditioner.h b/Sofa/Component/LinearSolver/Preconditioner/src/sofa/component/linearsolver/preconditioner/SSORPreconditioner.h index 9e974178e4f..4db908be463 100644 --- a/Sofa/Component/LinearSolver/Preconditioner/src/sofa/component/linearsolver/preconditioner/SSORPreconditioner.h +++ b/Sofa/Component/LinearSolver/Preconditioner/src/sofa/component/linearsolver/preconditioner/SSORPreconditioner.h @@ -63,7 +63,7 @@ class SSORPreconditioner : public sofa::component::linearsolver::MatrixLinearSol return new SSORPreconditionerInvertData(); } - void parse(core::objectmodel::BaseObjectDescription *arg) override; + void parse(core::objectmodel::BaseComponentDescription *arg) override; protected : diff --git a/Sofa/Component/LinearSolver/Preconditioner/src/sofa/component/linearsolver/preconditioner/SSORPreconditioner.inl b/Sofa/Component/LinearSolver/Preconditioner/src/sofa/component/linearsolver/preconditioner/SSORPreconditioner.inl index cb76ecf8af5..ed9d1339feb 100644 --- a/Sofa/Component/LinearSolver/Preconditioner/src/sofa/component/linearsolver/preconditioner/SSORPreconditioner.inl +++ b/Sofa/Component/LinearSolver/Preconditioner/src/sofa/component/linearsolver/preconditioner/SSORPreconditioner.inl @@ -88,7 +88,7 @@ void SSORPreconditioner::invert(Matrix& M) template void SSORPreconditioner::parse( - core::objectmodel::BaseObjectDescription* arg) + core::objectmodel::BaseComponentDescription* arg) { if (arg->getAttribute("verbose")) { diff --git a/Sofa/Component/Mapping/Linear/tests/BarycentricMapping_test.cpp b/Sofa/Component/Mapping/Linear/tests/BarycentricMapping_test.cpp index 2f923ea9221..4071abd3a44 100644 --- a/Sofa/Component/Mapping/Linear/tests/BarycentricMapping_test.cpp +++ b/Sofa/Component/Mapping/Linear/tests/BarycentricMapping_test.cpp @@ -34,13 +34,12 @@ using sofa::core::topology::BaseMeshTopology; #include using sofa::testing::BaseTest; - using sofa::type::Vec3; using sofa::type::Vec3u; using sofa::core::objectmodel::New; -#include -using sofa::simulation::graph::DAGSimulation; +#include +#include using sofa::simulation::Node ; using sofa::core::objectmodel::New ; using sofa::core::objectmodel::BaseData ; @@ -48,8 +47,6 @@ using sofa::core::objectmodel::BaseData ; #include using sofa::component::statecontainer::MechanicalObject ; -#include - using sofa::defaulttype::Vec3Types; template diff --git a/Sofa/Component/Mapping/Linear/tests/DistanceToPlaneMapping_test.cpp b/Sofa/Component/Mapping/Linear/tests/DistanceToPlaneMapping_test.cpp index 85165f8a9bc..e8fe9ea2215 100644 --- a/Sofa/Component/Mapping/Linear/tests/DistanceToPlaneMapping_test.cpp +++ b/Sofa/Component/Mapping/Linear/tests/DistanceToPlaneMapping_test.cpp @@ -28,9 +28,7 @@ #include "sofa/core/MechanicalParams.h" using sofa::testing::BaseTest; - -#include -using sofa::simulation::graph::DAGSimulation; +#include using sofa::simulation::Node ; using sofa::core::objectmodel::New ; using sofa::core::objectmodel::BaseData ; @@ -53,13 +51,9 @@ class PlaneMappingTest : public testing::Test typedef sofa::type::Vec::spatial_dimensions,typename sofa::Deriv_t::value_type> PlaneNormalType; typedef sofa::type::Vec::spatial_dimensions,typename sofa::Coord_t::value_type> PlanePointType; public: - sofa::simulation::Simulation* createSimpleScene(typename sofa::component::mapping::linear::DistanceToPlaneMapping::SPtr mapping) + Node::SPtr createSimpleScene(typename sofa::component::mapping::linear::DistanceToPlaneMapping::SPtr mapping) { - - - sofa::simulation::Simulation* simu = sofa::simulation::getSimulation(); - - const Node::SPtr node = simu->createNewGraph("root"); + const Node::SPtr node = sofa::simulation::node::createNewNode("root"); typename MechanicalObject::SPtr mechanical = New>(); mechanical->resize(10); @@ -80,7 +74,7 @@ class PlaneMappingTest : public testing::Test EXPECT_NO_THROW( sofa::simulation::node::initRoot(node.get()) ); - return simu; + return node; } PlaneNormalType getPseudoRandomNormal() diff --git a/Sofa/Component/Mapping/NonLinear/src/sofa/component/mapping/nonlinear/RigidMapping.h b/Sofa/Component/Mapping/NonLinear/src/sofa/component/mapping/nonlinear/RigidMapping.h index 25a384772fb..9c328c8d320 100644 --- a/Sofa/Component/Mapping/NonLinear/src/sofa/component/mapping/nonlinear/RigidMapping.h +++ b/Sofa/Component/Mapping/NonLinear/src/sofa/component/mapping/nonlinear/RigidMapping.h @@ -143,7 +143,7 @@ class RigidMapping : public core::Mapping, public NonLinearMappingDat void setRepartition(sofa::Size value); void setRepartition(sofa::type::vector values); - void parse(core::objectmodel::BaseObjectDescription* arg) override; + void parse(core::objectmodel::BaseComponentDescription* arg) override; void getGlobalToLocalCoords(OutCoord& result, const InCoord& xfrom, const OutCoord& xto); void updateOmega(typename InDeriv::Rot& omega, const OutDeriv& out, const OutCoord& rotatedpoint); diff --git a/Sofa/Component/Mapping/NonLinear/src/sofa/component/mapping/nonlinear/RigidMapping.inl b/Sofa/Component/Mapping/NonLinear/src/sofa/component/mapping/nonlinear/RigidMapping.inl index 6f6b9829a31..9f3bae1da03 100644 --- a/Sofa/Component/Mapping/NonLinear/src/sofa/component/mapping/nonlinear/RigidMapping.inl +++ b/Sofa/Component/Mapping/NonLinear/src/sofa/component/mapping/nonlinear/RigidMapping.inl @@ -791,7 +791,7 @@ void RigidMapping::draw(const core::visual::VisualParams* vparams) template -void RigidMapping::parse(core::objectmodel::BaseObjectDescription* arg) +void RigidMapping::parse(core::objectmodel::BaseComponentDescription* arg) { Inherit::parse(arg); diff --git a/Sofa/Component/Mass/src/sofa/component/mass/DiagonalMass.h b/Sofa/Component/Mass/src/sofa/component/mass/DiagonalMass.h index e54db5c837c..d7f4e8efb47 100644 --- a/Sofa/Component/Mass/src/sofa/component/mass/DiagonalMass.h +++ b/Sofa/Component/Mass/src/sofa/component/mass/DiagonalMass.h @@ -319,7 +319,7 @@ class DiagonalMass : public core::behavior::Mass, public virtual sofa void draw(const core::visual::VisualParams* vparams) override; //Temporary function to warn the user when old attribute names are used and if it tried to specify the masstype (deprecated) - void parse(sofa::core::objectmodel::BaseObjectDescription* arg) override + void parse(sofa::core::objectmodel::BaseComponentDescription* arg) override { Inherited::parse(arg); parseMassTemplate(arg, this); diff --git a/Sofa/Component/Mass/src/sofa/component/mass/MassType.h b/Sofa/Component/Mass/src/sofa/component/mass/MassType.h index bf210035005..ae81e8cc98b 100644 --- a/Sofa/Component/Mass/src/sofa/component/mass/MassType.h +++ b/Sofa/Component/Mass/src/sofa/component/mass/MassType.h @@ -50,7 +50,7 @@ struct MassType * attributes have changed since #2644 */ template -void parseMassTemplate(sofa::core::objectmodel::BaseObjectDescription* arg, const core::behavior::BaseMass* mass) +void parseMassTemplate(sofa::core::objectmodel::BaseComponentDescription* arg, const core::behavior::BaseMass* mass) { if (arg->getAttribute("template")) { diff --git a/Sofa/Component/Mass/src/sofa/component/mass/MeshMatrixMass.h b/Sofa/Component/Mass/src/sofa/component/mass/MeshMatrixMass.h index eac01a2eedf..b71a3b01d7d 100644 --- a/Sofa/Component/Mass/src/sofa/component/mass/MeshMatrixMass.h +++ b/Sofa/Component/Mass/src/sofa/component/mass/MeshMatrixMass.h @@ -233,7 +233,7 @@ class MeshMatrixMass : public core::behavior::Mass, public virtual co /// Answer wether mass matrix is lumped or not bool isLumped() const { return d_lumping.getValue(); } - void parse(sofa::core::objectmodel::BaseObjectDescription* arg) override + void parse(sofa::core::objectmodel::BaseComponentDescription* arg) override { Inherited::parse(arg); parseMassTemplate(arg, this); diff --git a/Sofa/Component/Mass/src/sofa/component/mass/NodalMassDensity.h b/Sofa/Component/Mass/src/sofa/component/mass/NodalMassDensity.h index 925f9c4b4b9..bf1b17bf7e8 100644 --- a/Sofa/Component/Mass/src/sofa/component/mass/NodalMassDensity.h +++ b/Sofa/Component/Mass/src/sofa/component/mass/NodalMassDensity.h @@ -35,7 +35,7 @@ class NodalMassDensity : public sofa::core::BaseNodalProperty SOFA_CLASS(NodalMassDensity, sofa::core::BaseNodalProperty); template - static bool canCreate(T* obj, sofa::core::objectmodel::BaseContext* context, sofa::core::objectmodel::BaseObjectDescription* arg) + static bool canCreate(T* obj, sofa::core::objectmodel::BaseContext* context, sofa::core::objectmodel::BaseComponentDescription* arg) { if (const auto* state = context->getMechanicalState()) { diff --git a/Sofa/Component/Mass/src/sofa/component/mass/UniformMass.h b/Sofa/Component/Mass/src/sofa/component/mass/UniformMass.h index e5ce1c12bf3..7b854dcca51 100644 --- a/Sofa/Component/Mass/src/sofa/component/mass/UniformMass.h +++ b/Sofa/Component/Mass/src/sofa/component/mass/UniformMass.h @@ -157,7 +157,7 @@ class UniformMass : public core::behavior::Mass, public virtual core: void draw(const core::visual::VisualParams* vparams) override; - void parse(sofa::core::objectmodel::BaseObjectDescription* arg) override + void parse(sofa::core::objectmodel::BaseComponentDescription* arg) override { Inherited::parse(arg); parseMassTemplate(arg, this); diff --git a/Sofa/Component/Mass/tests/UniformMass_test.cpp b/Sofa/Component/Mass/tests/UniformMass_test.cpp index b027671c1f5..a7f76feb247 100644 --- a/Sofa/Component/Mass/tests/UniformMass_test.cpp +++ b/Sofa/Component/Mass/tests/UniformMass_test.cpp @@ -30,10 +30,7 @@ using namespace sofa::defaulttype ; using sofa::component::mass::UniformMass ; #include - -#include using sofa::simulation::Simulation ; -using sofa::simulation::graph::DAGSimulation ; #include using sofa::simulation::Node; diff --git a/Sofa/Component/MechanicalLoad/tests/PlaneForceField_test.cpp b/Sofa/Component/MechanicalLoad/tests/PlaneForceField_test.cpp index 20eced1a952..9efb4164b2b 100644 --- a/Sofa/Component/MechanicalLoad/tests/PlaneForceField_test.cpp +++ b/Sofa/Component/MechanicalLoad/tests/PlaneForceField_test.cpp @@ -23,9 +23,8 @@ #include using sofa::testing::BaseSimulationTest; -#include +#include using sofa::simulation::Simulation ; -using sofa::simulation::graph::DAGSimulation ; using sofa::simulation::Node ; using sofa::core::objectmodel::BaseObject ; using sofa::core::objectmodel::BaseData ; @@ -69,8 +68,6 @@ using sofa::component::linearsolver::GraphScatteredMatrix ; using sofa::component::linearsolver::GraphScatteredVector ; using sofa::component::linearsolver::iterative::CGLinearSolver ; -using sofa::simulation::graph::DAGSimulation ; - using sofa::component::mass::UniformMass ; using sofa::component::mechanicalload::PlaneForceField ; diff --git a/Sofa/Component/ODESolver/Backward/src/sofa/component/odesolver/backward/StaticSolver.cpp b/Sofa/Component/ODESolver/Backward/src/sofa/component/odesolver/backward/StaticSolver.cpp index 5b57a4f6af2..4e65b25545c 100644 --- a/Sofa/Component/ODESolver/Backward/src/sofa/component/odesolver/backward/StaticSolver.cpp +++ b/Sofa/Component/ODESolver/Backward/src/sofa/component/odesolver/backward/StaticSolver.cpp @@ -47,7 +47,7 @@ StaticSolver::StaticSolver() , d_should_diverge_when_residual_is_growing(this, "should_diverge_when_residual_is_growing") {} -void StaticSolver::parse(core::objectmodel::BaseObjectDescription* arg) +void StaticSolver::parse(core::objectmodel::BaseComponentDescription* arg) { Inherit1::parse(arg); diff --git a/Sofa/Component/ODESolver/Backward/src/sofa/component/odesolver/backward/StaticSolver.h b/Sofa/Component/ODESolver/Backward/src/sofa/component/odesolver/backward/StaticSolver.h index d353c90dec6..df9ba00a86e 100644 --- a/Sofa/Component/ODESolver/Backward/src/sofa/component/odesolver/backward/StaticSolver.h +++ b/Sofa/Component/ODESolver/Backward/src/sofa/component/odesolver/backward/StaticSolver.h @@ -44,7 +44,7 @@ class SOFA_COMPONENT_ODESOLVER_BACKWARD_API StaticSolver : core::MultiVecCoordId xResult, core::MultiVecDerivId vResult) override; - void parse(core::objectmodel::BaseObjectDescription* arg) override; + void parse(core::objectmodel::BaseComponentDescription* arg) override; void init() override; SingleLinkgetAttribute("verbose")) { diff --git a/Sofa/Component/ODESolver/Backward/src/sofa/component/odesolver/backward/VariationalSymplecticSolver.h b/Sofa/Component/ODESolver/Backward/src/sofa/component/odesolver/backward/VariationalSymplecticSolver.h index d4eacb17e9b..41fccb1c819 100644 --- a/Sofa/Component/ODESolver/Backward/src/sofa/component/odesolver/backward/VariationalSymplecticSolver.h +++ b/Sofa/Component/ODESolver/Backward/src/sofa/component/odesolver/backward/VariationalSymplecticSolver.h @@ -93,7 +93,7 @@ class SOFA_COMPONENT_ODESOLVER_BACKWARD_API VariationalSymplecticSolver return 0; } - void parse(core::objectmodel::BaseObjectDescription *arg) override; + void parse(core::objectmodel::BaseComponentDescription *arg) override; protected: sofa::core::MultiVecDerivId pID; diff --git a/Sofa/Component/ODESolver/Backward/tests/StaticSolver_test.cpp b/Sofa/Component/ODESolver/Backward/tests/StaticSolver_test.cpp index 8a78b4dc8fd..ccb1f6fb721 100644 --- a/Sofa/Component/ODESolver/Backward/tests/StaticSolver_test.cpp +++ b/Sofa/Component/ODESolver/Backward/tests/StaticSolver_test.cpp @@ -22,7 +22,6 @@ #include #include #include -#include #include #include @@ -32,7 +31,6 @@ using namespace sofa::simulation; using namespace sofa::simpleapi; using namespace sofa::helper::logging; -using sofa::simulation::graph::DAGSimulation; using sofa::component::odesolver::backward::StaticSolver; static constexpr SReal poissonRatio = 0; diff --git a/Sofa/Component/Playback/src/sofa/component/playback/CompareState.h b/Sofa/Component/Playback/src/sofa/component/playback/CompareState.h index 7061d38a0d2..839addfeeea 100644 --- a/Sofa/Component/Playback/src/sofa/component/playback/CompareState.h +++ b/Sofa/Component/Playback/src/sofa/component/playback/CompareState.h @@ -50,7 +50,7 @@ class SOFA_COMPONENT_PLAYBACK_API CompareState: public ReadState /** Pre-construction check method called by ObjectFactory. Check that DataTypes matches the MechanicalState.*/ template - static bool canCreate(T*& obj, core::objectmodel::BaseContext* context, core::objectmodel::BaseObjectDescription* arg) + static bool canCreate(T*& obj, core::objectmodel::BaseContext* context, core::objectmodel::BaseComponentDescription* arg) { if (context->getMechanicalState() == nullptr) { diff --git a/Sofa/Component/Playback/src/sofa/component/playback/CompareTopology.h b/Sofa/Component/Playback/src/sofa/component/playback/CompareTopology.h index 2ed31ee44f1..e4ed14a4063 100644 --- a/Sofa/Component/Playback/src/sofa/component/playback/CompareTopology.h +++ b/Sofa/Component/Playback/src/sofa/component/playback/CompareTopology.h @@ -50,7 +50,7 @@ class SOFA_COMPONENT_PLAYBACK_API CompareTopology: public ReadTopology /** Pre-construction check method called by ObjectFactory. Check that DataTypes matches the MechanicalTopology.*/ template - static bool canCreate(T*& obj, core::objectmodel::BaseContext* context, core::objectmodel::BaseObjectDescription* arg) + static bool canCreate(T*& obj, core::objectmodel::BaseContext* context, core::objectmodel::BaseComponentDescription* arg) { if (context->getMeshTopology() == nullptr) { diff --git a/Sofa/Component/Playback/src/sofa/component/playback/ReadState.h b/Sofa/Component/Playback/src/sofa/component/playback/ReadState.h index 78125f07f54..0a9674f8b0c 100644 --- a/Sofa/Component/Playback/src/sofa/component/playback/ReadState.h +++ b/Sofa/Component/Playback/src/sofa/component/playback/ReadState.h @@ -85,7 +85,7 @@ class SOFA_COMPONENT_PLAYBACK_API ReadState: public core::objectmodel::BaseCompo /// Pre-construction check method called by ObjectFactory. /// Check that DataTypes matches the MechanicalState. template - static bool canCreate(T* obj, core::objectmodel::BaseContext* context, core::objectmodel::BaseObjectDescription* arg) + static bool canCreate(T* obj, core::objectmodel::BaseContext* context, core::objectmodel::BaseComponentDescription* arg) { if (context->getMechanicalState() == nullptr) { arg->logError("No mechanical state found in the context node."); diff --git a/Sofa/Component/Playback/src/sofa/component/playback/ReadTopology.h b/Sofa/Component/Playback/src/sofa/component/playback/ReadTopology.h index 593ca89816d..2e0bb13e8e6 100644 --- a/Sofa/Component/Playback/src/sofa/component/playback/ReadTopology.h +++ b/Sofa/Component/Playback/src/sofa/component/playback/ReadTopology.h @@ -83,7 +83,7 @@ class SOFA_COMPONENT_PLAYBACK_API ReadTopology: public core::objectmodel::BaseCo /// Pre-construction check method called by ObjectFactory. /// Check that DataTypes matches the MechanicalState. template - static bool canCreate(T* obj, core::objectmodel::BaseContext* context, core::objectmodel::BaseObjectDescription* arg) + static bool canCreate(T* obj, core::objectmodel::BaseContext* context, core::objectmodel::BaseComponentDescription* arg) { if (context->getMeshTopologyLink() == nullptr) { arg->logError("No mesh topology found in the context node."); diff --git a/Sofa/Component/Playback/src/sofa/component/playback/WriteState.h b/Sofa/Component/Playback/src/sofa/component/playback/WriteState.h index 106c26809c2..575c1e0391e 100644 --- a/Sofa/Component/Playback/src/sofa/component/playback/WriteState.h +++ b/Sofa/Component/Playback/src/sofa/component/playback/WriteState.h @@ -96,7 +96,7 @@ class SOFA_COMPONENT_PLAYBACK_API WriteState: public core::objectmodel::BaseComp /// Pre-construction check method called by ObjectFactory. /// Check that DataTypes matches the MechanicalState. template - static bool canCreate(T*& obj, core::objectmodel::BaseContext* context, core::objectmodel::BaseObjectDescription* arg) + static bool canCreate(T*& obj, core::objectmodel::BaseContext* context, core::objectmodel::BaseComponentDescription* arg) { if (context->getMechanicalState() == nullptr) { diff --git a/Sofa/Component/Playback/src/sofa/component/playback/WriteTopology.h b/Sofa/Component/Playback/src/sofa/component/playback/WriteTopology.h index bb7e7222317..6037a2089f3 100644 --- a/Sofa/Component/Playback/src/sofa/component/playback/WriteTopology.h +++ b/Sofa/Component/Playback/src/sofa/component/playback/WriteTopology.h @@ -86,7 +86,7 @@ class SOFA_COMPONENT_PLAYBACK_API WriteTopology: public core::objectmodel::BaseC /// Pre-construction check method called by ObjectFactory. /// Check that DataTypes matches the MeshTopology. template - static bool canCreate(T*& obj, core::objectmodel::BaseContext* context, core::objectmodel::BaseObjectDescription* arg) + static bool canCreate(T*& obj, core::objectmodel::BaseContext* context, core::objectmodel::BaseComponentDescription* arg) { if (context->getMeshTopology() == nullptr) { arg->logError("No mesh topology found in the context node."); diff --git a/Sofa/Component/SceneUtility/src/sofa/component/sceneutility/AddResourceRepository.cpp b/Sofa/Component/SceneUtility/src/sofa/component/sceneutility/AddResourceRepository.cpp index 3afbc6b2c91..78d9828b9e8 100644 --- a/Sofa/Component/SceneUtility/src/sofa/component/sceneutility/AddResourceRepository.cpp +++ b/Sofa/Component/SceneUtility/src/sofa/component/sceneutility/AddResourceRepository.cpp @@ -95,7 +95,7 @@ bool BaseAddResourceRepository::updateRepositoryPath() } -void BaseAddResourceRepository::parse(sofa::core::objectmodel::BaseObjectDescription* arg) +void BaseAddResourceRepository::parse(sofa::core::objectmodel::BaseComponentDescription* arg) { Inherit1::parse(arg); updateRepositoryPath(); diff --git a/Sofa/Component/SceneUtility/src/sofa/component/sceneutility/AddResourceRepository.h b/Sofa/Component/SceneUtility/src/sofa/component/sceneutility/AddResourceRepository.h index fd4c0c4f439..1eecc0d6897 100644 --- a/Sofa/Component/SceneUtility/src/sofa/component/sceneutility/AddResourceRepository.h +++ b/Sofa/Component/SceneUtility/src/sofa/component/sceneutility/AddResourceRepository.h @@ -45,7 +45,7 @@ class SOFA_COMPONENT_SCENEUTILITY_API BaseAddResourceRepository: public sofa::co public: DataFileName d_repositoryPath; ///< Path to add to the pool of resources - void parse(sofa::core::objectmodel::BaseObjectDescription* arg) override; + void parse(sofa::core::objectmodel::BaseComponentDescription* arg) override; bool updateRepositoryPath(); void cleanup() override; diff --git a/Sofa/Component/SceneUtility/src/sofa/component/sceneutility/MessageHandlerComponent.cpp b/Sofa/Component/SceneUtility/src/sofa/component/sceneutility/MessageHandlerComponent.cpp index 17a5e7537cc..c9897473163 100644 --- a/Sofa/Component/SceneUtility/src/sofa/component/sceneutility/MessageHandlerComponent.cpp +++ b/Sofa/Component/SceneUtility/src/sofa/component/sceneutility/MessageHandlerComponent.cpp @@ -63,7 +63,7 @@ MessageHandlerComponent::MessageHandlerComponent() : m_isValid = false ; } -void MessageHandlerComponent::parse ( core::objectmodel::BaseObjectDescription* arg ) +void MessageHandlerComponent::parse ( core::objectmodel::BaseComponentDescription* arg ) { BaseComponent::parse(arg) ; @@ -121,7 +121,7 @@ FileMessageHandlerComponent::~FileMessageHandlerComponent() } } -void FileMessageHandlerComponent::parse ( core::objectmodel::BaseObjectDescription* arg ) +void FileMessageHandlerComponent::parse ( core::objectmodel::BaseComponentDescription* arg ) { BaseComponent::parse(arg) ; diff --git a/Sofa/Component/SceneUtility/src/sofa/component/sceneutility/MessageHandlerComponent.h b/Sofa/Component/SceneUtility/src/sofa/component/sceneutility/MessageHandlerComponent.h index 046c7e24b89..28e154c62b0 100644 --- a/Sofa/Component/SceneUtility/src/sofa/component/sceneutility/MessageHandlerComponent.h +++ b/Sofa/Component/SceneUtility/src/sofa/component/sceneutility/MessageHandlerComponent.h @@ -27,7 +27,7 @@ #include -#include +#include #include #include @@ -53,7 +53,7 @@ class SOFA_COMPONENT_SCENEUTILITY_API MessageHandlerComponent : public core::obj /// Inherited from BaseObject. /// Parse the given description to assign values to this object's fields and /// potentially other parameters. - void parse ( core::objectmodel::BaseObjectDescription* arg ) override; + void parse ( core::objectmodel::BaseComponentDescription* arg ) override; Data d_type ; bool m_isValid ; @@ -74,7 +74,7 @@ class SOFA_COMPONENT_SCENEUTILITY_API FileMessageHandlerComponent : public core: /// Inherited from BaseObject. /// Parse the given description to assign values to this object's fields and /// potentially other parameters. - void parse ( core::objectmodel::BaseObjectDescription* arg ) override; + void parse ( core::objectmodel::BaseComponentDescription* arg ) override; Data d_filename ; ///< Name of the file into which the message will be saved in. helper::logging::MessageHandler* m_handler { nullptr }; diff --git a/Sofa/Component/SceneUtility/tests/MessageHandlerComponent_test.cpp b/Sofa/Component/SceneUtility/tests/MessageHandlerComponent_test.cpp index 94b69d307c0..40ed35d0a29 100644 --- a/Sofa/Component/SceneUtility/tests/MessageHandlerComponent_test.cpp +++ b/Sofa/Component/SceneUtility/tests/MessageHandlerComponent_test.cpp @@ -27,9 +27,6 @@ using std::string ; #include #include -#include -using sofa::simulation::graph::DAGSimulation ; - #include using sofa::simulation::Node ; diff --git a/Sofa/Component/SolidMechanics/FEM/Elastic/src/sofa/component/solidmechanics/fem/elastic/TriangularFEMForceFieldOptim.h b/Sofa/Component/SolidMechanics/FEM/Elastic/src/sofa/component/solidmechanics/fem/elastic/TriangularFEMForceFieldOptim.h index 23ea6aa0a20..cd21a875743 100644 --- a/Sofa/Component/SolidMechanics/FEM/Elastic/src/sofa/component/solidmechanics/fem/elastic/TriangularFEMForceFieldOptim.h +++ b/Sofa/Component/SolidMechanics/FEM/Elastic/src/sofa/component/solidmechanics/fem/elastic/TriangularFEMForceFieldOptim.h @@ -116,7 +116,7 @@ class TriangularFEMForceFieldOptim : public BaseLinearElasticityFEMForceField::init() } template -void TriangularFEMForceFieldOptim::parse( sofa::core::objectmodel::BaseObjectDescription* arg ) +void TriangularFEMForceFieldOptim::parse( sofa::core::objectmodel::BaseComponentDescription* arg ) { const char* method = arg->getAttribute("method"); if (method && *method && std::string(method) != std::string("large")) diff --git a/Sofa/Component/SolidMechanics/Spring/src/sofa/component/solidmechanics/spring/RestShapeSpringsForceField.h b/Sofa/Component/SolidMechanics/Spring/src/sofa/component/solidmechanics/spring/RestShapeSpringsForceField.h index bba03aad7c0..be0ca9233b2 100644 --- a/Sofa/Component/SolidMechanics/Spring/src/sofa/component/solidmechanics/spring/RestShapeSpringsForceField.h +++ b/Sofa/Component/SolidMechanics/Spring/src/sofa/component/solidmechanics/spring/RestShapeSpringsForceField.h @@ -91,7 +91,7 @@ class RestShapeSpringsForceField : public core::behavior::ForceField public: /// BaseObject initialization method. void bwdInit() override ; - void parse(core::objectmodel::BaseObjectDescription *arg) override ; + void parse(core::objectmodel::BaseComponentDescription *arg) override ; void reinit() override ; /// Add the forces. diff --git a/Sofa/Component/SolidMechanics/Spring/src/sofa/component/solidmechanics/spring/RestShapeSpringsForceField.inl b/Sofa/Component/SolidMechanics/Spring/src/sofa/component/solidmechanics/spring/RestShapeSpringsForceField.inl index c62e448f5e6..c50d5b49c63 100644 --- a/Sofa/Component/SolidMechanics/Spring/src/sofa/component/solidmechanics/spring/RestShapeSpringsForceField.inl +++ b/Sofa/Component/SolidMechanics/Spring/src/sofa/component/solidmechanics/spring/RestShapeSpringsForceField.inl @@ -73,7 +73,7 @@ RestShapeSpringsForceField::RestShapeSpringsForceField() } template -void RestShapeSpringsForceField::parse(core::objectmodel::BaseObjectDescription *arg) +void RestShapeSpringsForceField::parse(core::objectmodel::BaseComponentDescription *arg) { const char* attr = arg->getAttribute("external_rest_shape") ; if( attr != nullptr && attr[0] != '@') diff --git a/Sofa/Component/StateContainer/src/sofa/component/statecontainer/MechanicalObject.h b/Sofa/Component/StateContainer/src/sofa/component/statecontainer/MechanicalObject.h index 03ae874b42e..dd6b9fc09f6 100644 --- a/Sofa/Component/StateContainer/src/sofa/component/statecontainer/MechanicalObject.h +++ b/Sofa/Component/StateContainer/src/sofa/component/statecontainer/MechanicalObject.h @@ -80,7 +80,7 @@ class MechanicalObject : public sofa::core::behavior::MechanicalState public: std::string getScalarType() const override { return sofa::defaulttype::DataTypeInfo::name(); } - void parse ( core::objectmodel::BaseObjectDescription* arg ) override; + void parse ( core::objectmodel::BaseComponentDescription* arg ) override; Data< VecCoord > x; ///< position coordinates of the degrees of freedom Data< VecDeriv > v; ///< velocity coordinates of the degrees of freedom diff --git a/Sofa/Component/Topology/Container/Constant/src/sofa/component/topology/container/constant/CubeTopology.cpp b/Sofa/Component/Topology/Container/Constant/src/sofa/component/topology/container/constant/CubeTopology.cpp index a42bbb2dfbd..19880c3c4c4 100644 --- a/Sofa/Component/Topology/Container/Constant/src/sofa/component/topology/container/constant/CubeTopology.cpp +++ b/Sofa/Component/Topology/Container/Constant/src/sofa/component/topology/container/constant/CubeTopology.cpp @@ -29,7 +29,7 @@ namespace sofa::component::topology::container::constant using namespace sofa::type; using namespace sofa::defaulttype; -void CubeTopology::parse(core::objectmodel::BaseObjectDescription* arg) +void CubeTopology::parse(core::objectmodel::BaseComponentDescription* arg) { this->MeshTopology::parse(arg); float scale=1.0f; diff --git a/Sofa/Component/Topology/Container/Constant/src/sofa/component/topology/container/constant/CubeTopology.h b/Sofa/Component/Topology/Container/Constant/src/sofa/component/topology/container/constant/CubeTopology.h index 61c6fada66f..efe3cc454c8 100644 --- a/Sofa/Component/Topology/Container/Constant/src/sofa/component/topology/container/constant/CubeTopology.h +++ b/Sofa/Component/Topology/Container/Constant/src/sofa/component/topology/container/constant/CubeTopology.h @@ -43,7 +43,7 @@ class SOFA_COMPONENT_TOPOLOGY_CONTAINER_CONSTANT_API CubeTopology : public MeshT public: void setSize(int nx, int ny, int nz); - void parse(core::objectmodel::BaseObjectDescription* arg) override; + void parse(core::objectmodel::BaseComponentDescription* arg) override; int getNx() const { return d_nx.getValue(); } int getNy() const { return d_ny.getValue(); } diff --git a/Sofa/Component/Topology/Container/Dynamic/src/sofa/component/topology/container/dynamic/PointSetGeometryAlgorithms.h b/Sofa/Component/Topology/Container/Dynamic/src/sofa/component/topology/container/dynamic/PointSetGeometryAlgorithms.h index efd6127be90..906970f3e18 100644 --- a/Sofa/Component/Topology/Container/Dynamic/src/sofa/component/topology/container/dynamic/PointSetGeometryAlgorithms.h +++ b/Sofa/Component/Topology/Container/Dynamic/src/sofa/component/topology/container/dynamic/PointSetGeometryAlgorithms.h @@ -93,7 +93,7 @@ class PointSetGeometryAlgorithms : public core::topology::GeometryAlgorithms float getIndicesScale() const; template - static bool canCreate(T*& obj, core::objectmodel::BaseContext* context, core::objectmodel::BaseObjectDescription* arg) + static bool canCreate(T*& obj, core::objectmodel::BaseContext* context, core::objectmodel::BaseComponentDescription* arg) { if (context->getState() && dynamic_cast*>(context->getState()) == nullptr) { diff --git a/Sofa/Component/Topology/Container/Grid/src/sofa/component/topology/container/grid/GridTopology.cpp b/Sofa/Component/Topology/Container/Grid/src/sofa/component/topology/container/grid/GridTopology.cpp index 86c7551c976..3e9b66c867a 100644 --- a/Sofa/Component/Topology/Container/Grid/src/sofa/component/topology/container/grid/GridTopology.cpp +++ b/Sofa/Component/Topology/Container/Grid/src/sofa/component/topology/container/grid/GridTopology.cpp @@ -58,7 +58,7 @@ void GridTopology::GridUpdate::doUpdate() updateEdges(); } -void GridTopology::parse(core::objectmodel::BaseObjectDescription* arg) +void GridTopology::parse(core::objectmodel::BaseComponentDescription* arg) { this->MeshTopology::parse(arg); diff --git a/Sofa/Component/Topology/Container/Grid/src/sofa/component/topology/container/grid/GridTopology.h b/Sofa/Component/Topology/Container/Grid/src/sofa/component/topology/container/grid/GridTopology.h index 3873134d709..d3c5beb843b 100644 --- a/Sofa/Component/Topology/Container/Grid/src/sofa/component/topology/container/grid/GridTopology.h +++ b/Sofa/Component/Topology/Container/Grid/src/sofa/component/topology/container/grid/GridTopology.h @@ -159,7 +159,7 @@ using MeshTopology::getHexahedron; SReal getPZ(Index i) const override { return getPoint(i)[2]; } /// Overload method from \sa BaseObject::parse . /// Parse the given description to assign values to this object's fields and potentially other parameters - void parse(core::objectmodel::BaseObjectDescription* arg) override ; + void parse(core::objectmodel::BaseComponentDescription* arg) override ; /// Overload Method from @sa MeshTopology::getNbHexahedra Size getNbHexahedra() override; diff --git a/Sofa/Component/Topology/Container/Grid/src/sofa/component/topology/container/grid/RegularGridTopology.cpp b/Sofa/Component/Topology/Container/Grid/src/sofa/component/topology/container/grid/RegularGridTopology.cpp index 1f28f85aa55..b5abca64554 100644 --- a/Sofa/Component/Topology/Container/Grid/src/sofa/component/topology/container/grid/RegularGridTopology.cpp +++ b/Sofa/Component/Topology/Container/Grid/src/sofa/component/topology/container/grid/RegularGridTopology.cpp @@ -60,7 +60,7 @@ RegularGridTopology::RegularGridTopology(const type::Vec3i& n, type::BoundingBox } -void RegularGridTopology::parse(core::objectmodel::BaseObjectDescription* arg) +void RegularGridTopology::parse(core::objectmodel::BaseComponentDescription* arg) { float scale=1.0f; if (arg->getAttribute("scale")!=nullptr) diff --git a/Sofa/Component/Topology/Container/Grid/src/sofa/component/topology/container/grid/RegularGridTopology.h b/Sofa/Component/Topology/Container/Grid/src/sofa/component/topology/container/grid/RegularGridTopology.h index f5dfdf614b8..eb128e336ac 100644 --- a/Sofa/Component/Topology/Container/Grid/src/sofa/component/topology/container/grid/RegularGridTopology.h +++ b/Sofa/Component/Topology/Container/Grid/src/sofa/component/topology/container/grid/RegularGridTopology.h @@ -60,7 +60,7 @@ class SOFA_COMPONENT_TOPOLOGY_CONTAINER_GRID_API RegularGridTopology : public Gr void reinit() override; /// Overload method from \sa BaseObject::parse . /// Parse the given description to assign values to this object's fields and potentially other parameters - void parse(core::objectmodel::BaseObjectDescription* arg) override; + void parse(core::objectmodel::BaseComponentDescription* arg) override; /** \brief Overload method of @sa GridTopology::getPointInGrid. * Get Point in grid @return Vec3 given its position in grid @param i, @param j, @param k diff --git a/Sofa/Component/Topology/Utility/src/sofa/component/topology/utility/TopologicalChangeProcessor.h b/Sofa/Component/Topology/Utility/src/sofa/component/topology/utility/TopologicalChangeProcessor.h index e31b7c23b4d..210096a44b3 100644 --- a/Sofa/Component/Topology/Utility/src/sofa/component/topology/utility/TopologicalChangeProcessor.h +++ b/Sofa/Component/Topology/Utility/src/sofa/component/topology/utility/TopologicalChangeProcessor.h @@ -120,7 +120,7 @@ class SOFA_COMPONENT_TOPOLOGY_UTILITY_API TopologicalChangeProcessor: public cor /// Pre-construction check method called by ObjectFactory. /// Check that DataTypes matches the MeshTopology. template - static bool canCreate(T*& obj, core::objectmodel::BaseContext* context, core::objectmodel::BaseObjectDescription* arg) + static bool canCreate(T*& obj, core::objectmodel::BaseContext* context, core::objectmodel::BaseComponentDescription* arg) { if (context->getMeshTopology() == nullptr) { arg->logError("No mesh topology found in the context node."); diff --git a/Sofa/GL/Component/Rendering2D/src/sofa/gl/component/rendering2d/OglLabel.cpp b/Sofa/GL/Component/Rendering2D/src/sofa/gl/component/rendering2d/OglLabel.cpp index 6440e50fc4a..8ee5a688098 100644 --- a/Sofa/GL/Component/Rendering2D/src/sofa/gl/component/rendering2d/OglLabel.cpp +++ b/Sofa/GL/Component/Rendering2D/src/sofa/gl/component/rendering2d/OglLabel.cpp @@ -34,7 +34,7 @@ namespace sofa::gl::component::rendering2d { using sofa::component::setting::BackgroundSetting ; -using sofa::core::objectmodel::BaseObjectDescription ; +using sofa::core::objectmodel::BaseComponentDescription ; using sofa::type::RGBAColor ; OglLabel::OglLabel(): diff --git a/Sofa/GL/Component/Rendering2D/src/sofa/gl/component/rendering2d/OglLabel.h b/Sofa/GL/Component/Rendering2D/src/sofa/gl/component/rendering2d/OglLabel.h index b13963cba9e..add731b29dd 100644 --- a/Sofa/GL/Component/Rendering2D/src/sofa/gl/component/rendering2d/OglLabel.h +++ b/Sofa/GL/Component/Rendering2D/src/sofa/gl/component/rendering2d/OglLabel.h @@ -59,7 +59,7 @@ class SOFA_GL_COMPONENT_RENDERING2D_API OglLabel : public core::visual::VisualMo void handleEvent(core::objectmodel::Event *) override; - void parse(core::objectmodel::BaseObjectDescription *arg) override; + void parse(core::objectmodel::BaseComponentDescription *arg) override; void setColor(float r, float g, float b, float a) ; diff --git a/Sofa/GL/Component/Rendering3D/src/sofa/gl/component/rendering3d/MergeVisualModels.h b/Sofa/GL/Component/Rendering3D/src/sofa/gl/component/rendering3d/MergeVisualModels.h index 7ec25d005ad..8d488e0eb5f 100644 --- a/Sofa/GL/Component/Rendering3D/src/sofa/gl/component/rendering3d/MergeVisualModels.h +++ b/Sofa/GL/Component/Rendering3D/src/sofa/gl/component/rendering3d/MergeVisualModels.h @@ -311,7 +311,7 @@ class SOFA_GL_COMPONENT_RENDERING3D_API MergeVisualModels : public OglModel public: - void parse ( sofa::core::objectmodel::BaseObjectDescription* arg ) override + void parse ( sofa::core::objectmodel::BaseComponentDescription* arg ) override { vl_input.parseSizeLinks(arg, d_nbInput); Inherit1::parse(arg); diff --git a/Sofa/GL/Component/Shader/src/sofa/gl/component/shader/OglShader.cpp b/Sofa/GL/Component/Shader/src/sofa/gl/component/shader/OglShader.cpp index 10d10fd8ab5..871618bd597 100644 --- a/Sofa/GL/Component/Shader/src/sofa/gl/component/shader/OglShader.cpp +++ b/Sofa/GL/Component/Shader/src/sofa/gl/component/shader/OglShader.cpp @@ -184,7 +184,7 @@ void OglShader::doInitVisual(const core::visual::VisualParams*) -void OglShader::parse(core::objectmodel::BaseObjectDescription* arg) +void OglShader::parse(core::objectmodel::BaseComponentDescription* arg) { Inherit1::parse(arg); diff --git a/Sofa/GL/Component/Shader/src/sofa/gl/component/shader/OglShader.h b/Sofa/GL/Component/Shader/src/sofa/gl/component/shader/OglShader.h index 9de64d208a6..a177d23d532 100644 --- a/Sofa/GL/Component/Shader/src/sofa/gl/component/shader/OglShader.h +++ b/Sofa/GL/Component/Shader/src/sofa/gl/component/shader/OglShader.h @@ -104,7 +104,7 @@ class SOFA_GL_COMPONENT_SHADER_API OglShader : public core::visual::Shader, publ void doInitVisual(const core::visual::VisualParams*) override; void init() override; void reinit() override; - void parse(core::objectmodel::BaseObjectDescription* arg) override; + void parse(core::objectmodel::BaseComponentDescription* arg) override; void start() override; void stop() override; diff --git a/Sofa/framework/Core/CMakeLists.txt b/Sofa/framework/Core/CMakeLists.txt index 5d049ec19bf..85312659032 100644 --- a/Sofa/framework/Core/CMakeLists.txt +++ b/Sofa/framework/Core/CMakeLists.txt @@ -155,11 +155,11 @@ set(HEADER_FILES ${SRC_ROOT}/objectmodel/BaseClass.h ${SRC_ROOT}/objectmodel/BaseClassNameHelper.h ${SRC_ROOT}/objectmodel/BaseComponent.h + ${SRC_ROOT}/objectmodel/BaseComponentDescription.h ${SRC_ROOT}/objectmodel/BaseContext.h ${SRC_ROOT}/objectmodel/BaseData.h ${SRC_ROOT}/objectmodel/BaseLink.h ${SRC_ROOT}/objectmodel/BaseNode.h - ${SRC_ROOT}/objectmodel/BaseObjectDescription.h ${SRC_ROOT}/objectmodel/ClassInfo.h ${SRC_ROOT}/objectmodel/ComponentState.h ${SRC_ROOT}/objectmodel/ConfigurationSetting.h @@ -309,7 +309,6 @@ set(SOURCE_FILES ${SRC_ROOT}/objectmodel/BaseData.cpp ${SRC_ROOT}/objectmodel/BaseLink.cpp ${SRC_ROOT}/objectmodel/BaseNode.cpp - ${SRC_ROOT}/objectmodel/BaseObjectDescription.cpp ${SRC_ROOT}/objectmodel/ClassInfo.cpp ${SRC_ROOT}/objectmodel/ComponentState.cpp ${SRC_ROOT}/objectmodel/ConfigurationSetting.cpp diff --git a/Sofa/framework/Core/src/sofa/core/Mapping.h b/Sofa/framework/Core/src/sofa/core/Mapping.h index ef555eb9da0..8e41ea415a8 100644 --- a/Sofa/framework/Core/src/sofa/core/Mapping.h +++ b/Sofa/framework/Core/src/sofa/core/Mapping.h @@ -189,7 +189,7 @@ class Mapping : public BaseMapping /// if they are compatible with the input and output model types of this /// mapping. template - static bool canCreate(T*& obj, core::objectmodel::BaseContext* context, core::objectmodel::BaseObjectDescription* arg) + static bool canCreate(T*& obj, core::objectmodel::BaseContext* context, core::objectmodel::BaseComponentDescription* arg) { State* stin = nullptr; State* stout = nullptr; @@ -237,7 +237,7 @@ class Mapping : public BaseMapping /// This implementation read the input and output attributes to /// find the input and output models of this mapping. template - static typename T::SPtr create(T*, core::objectmodel::BaseContext* context, core::objectmodel::BaseObjectDescription* arg) + static typename T::SPtr create(T*, core::objectmodel::BaseContext* context, core::objectmodel::BaseComponentDescription* arg) { typename T::SPtr obj = sofa::core::objectmodel::New(); @@ -267,7 +267,7 @@ class Mapping : public BaseMapping } template - static std::string shortName(const T* ptr = nullptr, objectmodel::BaseObjectDescription* arg = nullptr) + static std::string shortName(const T* ptr = nullptr, objectmodel::BaseComponentDescription* arg = nullptr) { std::string name = Inherit1::shortName(ptr, arg); sofa::helper::replaceAll(name, "Mapping", "Map"); diff --git a/Sofa/framework/Core/src/sofa/core/Multi2Mapping.h b/Sofa/framework/Core/src/sofa/core/Multi2Mapping.h index c0ead569710..7277d049db3 100644 --- a/Sofa/framework/Core/src/sofa/core/Multi2Mapping.h +++ b/Sofa/framework/Core/src/sofa/core/Multi2Mapping.h @@ -199,7 +199,7 @@ class Multi2Mapping : public BaseMapping /// if they are compatible with the input and output models types of this /// mapping. template - static bool canCreate(T*& obj, core::objectmodel::BaseContext* context, core::objectmodel::BaseObjectDescription* arg) + static bool canCreate(T*& obj, core::objectmodel::BaseContext* context, core::objectmodel::BaseComponentDescription* arg) { static const sofa::type::fixed_array, 3> attributes { std::make_tuple("input1", In1::Name(), LinkFromModels1::DestType::GetClass()), diff --git a/Sofa/framework/Core/src/sofa/core/MultiMapping.h b/Sofa/framework/Core/src/sofa/core/MultiMapping.h index bc65f24d32f..e700a0a7431 100644 --- a/Sofa/framework/Core/src/sofa/core/MultiMapping.h +++ b/Sofa/framework/Core/src/sofa/core/MultiMapping.h @@ -190,7 +190,7 @@ class MultiMapping : public BaseMapping template - static std::string shortName(const T* ptr = nullptr, objectmodel::BaseObjectDescription* arg = nullptr) + static std::string shortName(const T* ptr = nullptr, objectmodel::BaseComponentDescription* arg = nullptr) { std::string name = Inherit1::shortName(ptr, arg); sofa::helper::replaceAll(name, "Mapping", "Map"); @@ -203,7 +203,7 @@ class MultiMapping : public BaseMapping /// if they are compatible with the input and output models types of this /// mapping. template - static bool canCreate(T*& obj, core::objectmodel::BaseContext* context, core::objectmodel::BaseObjectDescription* arg) + static bool canCreate(T*& obj, core::objectmodel::BaseContext* context, core::objectmodel::BaseComponentDescription* arg) { std::string input = arg->getAttribute("input",""); if (input.empty()) { diff --git a/Sofa/framework/Core/src/sofa/core/ObjectFactory.h b/Sofa/framework/Core/src/sofa/core/ObjectFactory.h index d297f11a72f..291cf4438ae 100644 --- a/Sofa/framework/Core/src/sofa/core/ObjectFactory.h +++ b/Sofa/framework/Core/src/sofa/core/ObjectFactory.h @@ -40,7 +40,7 @@ namespace sofa::core class ObjectRegistrationData; -typedef std::function OnCreateCallback ; +typedef std::function OnCreateCallback ; /** * \brief Main class used to register and dynamically create objects @@ -69,12 +69,12 @@ class SOFA_CORE_API ObjectFactory /// Pre-construction check. /// /// \return true if the object can be created successfully. - virtual bool canCreate(objectmodel::BaseContext* context, objectmodel::BaseObjectDescription* arg) = 0; + virtual bool canCreate(objectmodel::BaseContext* context, objectmodel::BaseComponentDescription* arg) = 0; /// Construction method called by the factory. /// /// \pre canCreate(context, arg) == true. - virtual objectmodel::BaseComponent::SPtr createInstance(objectmodel::BaseContext* context, objectmodel::BaseObjectDescription* arg) = 0; + virtual objectmodel::BaseComponent::SPtr createInstance(objectmodel::BaseContext* context, objectmodel::BaseComponentDescription* arg) = 0; /// type_info structure associated with the type of instantiated objects. virtual const std::type_info& type() = 0; @@ -176,13 +176,13 @@ class SOFA_CORE_API ObjectFactory void resetAlias(std::string name, ClassEntry::SPtr previous); /// Create an object given a context and a description. - objectmodel::BaseComponent::SPtr createObject(objectmodel::BaseContext* context, objectmodel::BaseObjectDescription* arg); + objectmodel::BaseComponent::SPtr createObject(objectmodel::BaseContext* context, objectmodel::BaseComponentDescription* arg); /// Get the ObjectFactory singleton instance static ObjectFactory* getInstance(); /// \copydoc createObject - static objectmodel::BaseComponent::SPtr CreateObject(objectmodel::BaseContext* context, objectmodel::BaseObjectDescription* arg) + static objectmodel::BaseComponent::SPtr CreateObject(objectmodel::BaseContext* context, objectmodel::BaseComponentDescription* arg) { return getInstance()->createObject(context, arg); } @@ -271,12 +271,12 @@ template class ObjectCreator : public ObjectFactory::BaseObjectCreator { public: - bool canCreate(objectmodel::BaseContext* context, objectmodel::BaseObjectDescription* arg) override + bool canCreate(objectmodel::BaseContext* context, objectmodel::BaseComponentDescription* arg) override { RealObject* instance = nullptr; return RealObject::canCreate(instance, context, arg); } - objectmodel::BaseComponent::SPtr createInstance(objectmodel::BaseContext* context, objectmodel::BaseObjectDescription* arg) override + objectmodel::BaseComponent::SPtr createInstance(objectmodel::BaseContext* context, objectmodel::BaseComponentDescription* arg) override { RealObject* instance = nullptr; return RealObject::create(instance, context, arg); diff --git a/Sofa/framework/Core/src/sofa/core/ObjectFactoryJson.cpp b/Sofa/framework/Core/src/sofa/core/ObjectFactoryJson.cpp index 348a006831f..641149432f2 100644 --- a/Sofa/framework/Core/src/sofa/core/ObjectFactoryJson.cpp +++ b/Sofa/framework/Core/src/sofa/core/ObjectFactoryJson.cpp @@ -107,7 +107,7 @@ inline void to_json(nlohmann::json& json, } json["class"] = *creator->getClass(); - sofa::core::objectmodel::BaseObjectDescription desc; + sofa::core::objectmodel::BaseComponentDescription desc; if (const auto object = creator->createInstance(nullptr, &desc)) { json["object"] = object; diff --git a/Sofa/framework/Core/src/sofa/core/behavior/ConstraintCorrection.h b/Sofa/framework/Core/src/sofa/core/behavior/ConstraintCorrection.h index b8d497cf234..78d2d81ce7d 100644 --- a/Sofa/framework/Core/src/sofa/core/behavior/ConstraintCorrection.h +++ b/Sofa/framework/Core/src/sofa/core/behavior/ConstraintCorrection.h @@ -143,7 +143,7 @@ class ConstraintCorrection : public BaseConstraintCorrection, public virtual Sin /// Pre-construction check method called by ObjectFactory. template< class T > - static bool canCreate(T*& obj, objectmodel::BaseContext* context, objectmodel::BaseObjectDescription* arg) + static bool canCreate(T*& obj, objectmodel::BaseContext* context, objectmodel::BaseComponentDescription* arg) { if (dynamic_cast< MechanicalState* >(context->getMechanicalState()) == nullptr) { arg->logError("No mechanical state with the datatype '" + std::string(DataTypes::Name()) + "' found in the context node."); diff --git a/Sofa/framework/Core/src/sofa/core/behavior/ForceField.h b/Sofa/framework/Core/src/sofa/core/behavior/ForceField.h index 91e87c4abeb..5062cc0a1f1 100644 --- a/Sofa/framework/Core/src/sofa/core/behavior/ForceField.h +++ b/Sofa/framework/Core/src/sofa/core/behavior/ForceField.h @@ -179,7 +179,7 @@ class ForceField : public BaseForceField, public virtual SingleStateAccessor - static bool canCreate(T*& obj, objectmodel::BaseContext* context, objectmodel::BaseObjectDescription* arg) + static bool canCreate(T*& obj, objectmodel::BaseContext* context, objectmodel::BaseComponentDescription* arg) { if (context) { @@ -221,7 +221,7 @@ class ForceField : public BaseForceField, public virtual SingleStateAccessor - static std::string shortName(const T* ptr = nullptr, objectmodel::BaseObjectDescription* arg = nullptr) + static std::string shortName(const T* ptr = nullptr, objectmodel::BaseComponentDescription* arg = nullptr) { std::string name = Inherit1::shortName(ptr, arg); sofa::helper::replaceAll(name, "ForceField", "FF"); diff --git a/Sofa/framework/Core/src/sofa/core/behavior/LagrangianConstraint.h b/Sofa/framework/Core/src/sofa/core/behavior/LagrangianConstraint.h index 8baf7bcba8b..0e36b56b649 100644 --- a/Sofa/framework/Core/src/sofa/core/behavior/LagrangianConstraint.h +++ b/Sofa/framework/Core/src/sofa/core/behavior/LagrangianConstraint.h @@ -108,7 +108,7 @@ class LagrangianConstraint : public BaseLagrangianConstraint, public virtual Sin /// Pre-construction check method called by ObjectFactory. /// Check that DataTypes matches the MechanicalState. template - static bool canCreate(T*& obj, objectmodel::BaseContext* context, objectmodel::BaseObjectDescription* arg) + static bool canCreate(T*& obj, objectmodel::BaseContext* context, objectmodel::BaseComponentDescription* arg) { if (dynamic_cast*>(context->getMechanicalState()) == nullptr) { arg->logError("No mechanical state with the datatype '" + std::string(DataTypes::Name()) + "' found in the context node."); diff --git a/Sofa/framework/Core/src/sofa/core/behavior/MechanicalState.h b/Sofa/framework/Core/src/sofa/core/behavior/MechanicalState.h index 982768b6a36..6ab8eae7af7 100644 --- a/Sofa/framework/Core/src/sofa/core/behavior/MechanicalState.h +++ b/Sofa/framework/Core/src/sofa/core/behavior/MechanicalState.h @@ -80,7 +80,7 @@ class MechanicalState : public BaseMechanicalState, public State virtual void getIndicesInSpace(sofa::type::vector& /*indices*/, Real /*xmin*/, Real /*xmax*/,Real /*ymin*/, Real /*ymax*/, Real /*zmin*/, Real /*zmax*/) const=0; template - static std::string shortName(const T* ptr = nullptr, objectmodel::BaseObjectDescription* arg = nullptr) + static std::string shortName(const T* ptr = nullptr, objectmodel::BaseComponentDescription* arg = nullptr) { std::string name = Inherit1::shortName(ptr, arg); sofa::helper::replaceAll(name, "Mechanical", "M"); diff --git a/Sofa/framework/Core/src/sofa/core/behavior/PairInteractionForceField.h b/Sofa/framework/Core/src/sofa/core/behavior/PairInteractionForceField.h index 20db861a697..6baf707af63 100644 --- a/Sofa/framework/Core/src/sofa/core/behavior/PairInteractionForceField.h +++ b/Sofa/framework/Core/src/sofa/core/behavior/PairInteractionForceField.h @@ -160,7 +160,7 @@ class PairInteractionForceField : public BaseInteractionForceField, public PairS /// Pre-construction check method called by ObjectFactory. /// Check that DataTypes matches the MechanicalState. template - static bool canCreate(T* obj, objectmodel::BaseContext* context, objectmodel::BaseObjectDescription* arg) + static bool canCreate(T* obj, objectmodel::BaseContext* context, objectmodel::BaseComponentDescription* arg) { MechanicalState* mstate1 = nullptr; MechanicalState* mstate2 = nullptr; @@ -184,7 +184,7 @@ class PairInteractionForceField : public BaseInteractionForceField, public PairS /// Construction method called by ObjectFactory. template - static typename T::SPtr create(T* /*p0*/, core::objectmodel::BaseContext* context, core::objectmodel::BaseObjectDescription* arg) + static typename T::SPtr create(T* /*p0*/, core::objectmodel::BaseContext* context, core::objectmodel::BaseComponentDescription* arg) { typename T::SPtr obj = sofa::core::objectmodel::New(); @@ -210,7 +210,7 @@ class PairInteractionForceField : public BaseInteractionForceField, public PairS } template - static std::string shortName(const T* ptr = nullptr, objectmodel::BaseObjectDescription* arg = nullptr) + static std::string shortName(const T* ptr = nullptr, objectmodel::BaseComponentDescription* arg = nullptr) { std::string name = Inherit1::shortName(ptr, arg); sofa::helper::replaceAll(name, "InteractionForceField", "IFF"); diff --git a/Sofa/framework/Core/src/sofa/core/behavior/ProjectiveConstraintSet.h b/Sofa/framework/Core/src/sofa/core/behavior/ProjectiveConstraintSet.h index 65092cdcaa1..2ce5d373e38 100644 --- a/Sofa/framework/Core/src/sofa/core/behavior/ProjectiveConstraintSet.h +++ b/Sofa/framework/Core/src/sofa/core/behavior/ProjectiveConstraintSet.h @@ -146,7 +146,7 @@ class ProjectiveConstraintSet : public BaseProjectiveConstraintSet, public virtu /// Pre-construction check method called by ObjectFactory. /// Check that DataTypes matches the MechanicalState. template - static bool canCreate(T*& obj, objectmodel::BaseContext* context, objectmodel::BaseObjectDescription* arg) + static bool canCreate(T*& obj, objectmodel::BaseContext* context, objectmodel::BaseComponentDescription* arg) { if (dynamic_cast*>(context->getMechanicalState()) == nullptr){ arg->logError("No mechanical state with the datatype '" + std::string(DataTypes::Name()) + "' found in the context node."); diff --git a/Sofa/framework/Core/src/sofa/core/loader/BaseLoader.cpp b/Sofa/framework/Core/src/sofa/core/loader/BaseLoader.cpp index 2d4aee10dd3..ef314592e3c 100644 --- a/Sofa/framework/Core/src/sofa/core/loader/BaseLoader.cpp +++ b/Sofa/framework/Core/src/sofa/core/loader/BaseLoader.cpp @@ -37,7 +37,7 @@ BaseLoader::~BaseLoader() { } -void BaseLoader::parse(sofa::core::objectmodel::BaseObjectDescription *arg) +void BaseLoader::parse(sofa::core::objectmodel::BaseComponentDescription *arg) { objectmodel::BaseComponent::parse(arg); diff --git a/Sofa/framework/Core/src/sofa/core/loader/BaseLoader.h b/Sofa/framework/Core/src/sofa/core/loader/BaseLoader.h index 98191226283..f93e29258be 100644 --- a/Sofa/framework/Core/src/sofa/core/loader/BaseLoader.h +++ b/Sofa/framework/Core/src/sofa/core/loader/BaseLoader.h @@ -38,7 +38,7 @@ class SOFA_CORE_API BaseLoader : public objectmodel::BaseComponent virtual bool load() = 0; virtual bool canLoad() ; - void parse(objectmodel::BaseObjectDescription *arg) override ; + void parse(objectmodel::BaseComponentDescription *arg) override ; void setFilename(std::string f) ; const std::string &getFilename() ; diff --git a/Sofa/framework/Core/src/sofa/core/loader/SceneLoader.cpp b/Sofa/framework/Core/src/sofa/core/loader/SceneLoader.cpp index a05bebcba02..531ddd4fb12 100644 --- a/Sofa/framework/Core/src/sofa/core/loader/SceneLoader.cpp +++ b/Sofa/framework/Core/src/sofa/core/loader/SceneLoader.cpp @@ -32,7 +32,7 @@ SceneLoader::SceneLoader() : BaseLoader() } -void SceneLoader::parse(sofa::core::objectmodel::BaseObjectDescription* arg) +void SceneLoader::parse(sofa::core::objectmodel::BaseComponentDescription* arg) { objectmodel::BaseComponent::parse(arg); diff --git a/Sofa/framework/Core/src/sofa/core/loader/SceneLoader.h b/Sofa/framework/Core/src/sofa/core/loader/SceneLoader.h index aa2a342b103..b597ab3ee75 100644 --- a/Sofa/framework/Core/src/sofa/core/loader/SceneLoader.h +++ b/Sofa/framework/Core/src/sofa/core/loader/SceneLoader.h @@ -42,7 +42,7 @@ class SOFA_CORE_API SceneLoader : public virtual BaseLoader public: bool canLoad() override; - void parse ( sofa::core::objectmodel::BaseObjectDescription* arg ) override; + void parse ( sofa::core::objectmodel::BaseComponentDescription* arg ) override; void reinit() override; diff --git a/Sofa/framework/Core/src/sofa/core/objectmodel/Base.cpp b/Sofa/framework/Core/src/sofa/core/objectmodel/Base.cpp index ed3a4d942de..55e23a6d496 100644 --- a/Sofa/framework/Core/src/sofa/core/objectmodel/Base.cpp +++ b/Sofa/framework/Core/src/sofa/core/objectmodel/Base.cpp @@ -529,7 +529,7 @@ void Base::addDeprecatedAttribute(lifecycle::DeprecatedData* attribute) } /// Parse the given description to assign values to this object's fields and potentially other parameters -void Base::parse ( BaseObjectDescription* arg ) +void Base::parse ( BaseComponentDescription* arg ) { for(auto& attribute : m_oldAttributes) { diff --git a/Sofa/framework/Core/src/sofa/core/objectmodel/Base.h b/Sofa/framework/Core/src/sofa/core/objectmodel/Base.h index ce62107d239..c2bdb7e536e 100644 --- a/Sofa/framework/Core/src/sofa/core/objectmodel/Base.h +++ b/Sofa/framework/Core/src/sofa/core/objectmodel/Base.h @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include #include @@ -168,7 +168,7 @@ class SOFA_CORE_API Base : public IntrusiveObject virtual bool hasField( const std::string& attribute) const; /// Parse the given description to assign values to this object's fields and potentially other parameters - virtual void parse ( BaseObjectDescription* arg ); + virtual void parse ( BaseComponentDescription* arg ); /// Assign the field values stored in the given list of name + value pairs of strings void parseFields ( const std::list& str ); @@ -340,7 +340,7 @@ class SOFA_CORE_API Base : public IntrusiveObject /// \code std::string type = Base::shortName(); \endcode /// This way derived classes can redefine the shortName method template< class T> - static std::string shortName(const T* ptr = nullptr, BaseObjectDescription* = nullptr ) + static std::string shortName(const T* ptr = nullptr, BaseComponentDescription* = nullptr ) { SOFA_UNUSED(ptr); return sofa::helper::NameDecoder::shortName(BaseClassNameHelper::getClassName()); diff --git a/Sofa/framework/Core/src/sofa/core/objectmodel/BaseComponent.h b/Sofa/framework/Core/src/sofa/core/objectmodel/BaseComponent.h index 667f91a6e39..d733152315d 100644 --- a/Sofa/framework/Core/src/sofa/core/objectmodel/BaseComponent.h +++ b/Sofa/framework/Core/src/sofa/core/objectmodel/BaseComponent.h @@ -56,14 +56,14 @@ class SOFA_CORE_API BaseComponent : public virtual Base /// Pre-construction check method called by ObjectFactory. template - static bool canCreate(T* /*obj*/, BaseContext* /*context*/, BaseObjectDescription* /*arg*/) + static bool canCreate(T* /*obj*/, BaseContext* /*context*/, BaseComponentDescription* /*arg*/) { return true; } /// Construction method called by ObjectFactory. template - static typename T::SPtr create(T*, BaseContext* context, BaseObjectDescription* arg) + static typename T::SPtr create(T*, BaseContext* context, BaseComponentDescription* arg) { typename T::SPtr obj = sofa::core::objectmodel::New(); if (obj) @@ -86,7 +86,7 @@ class SOFA_CORE_API BaseComponent : public virtual Base } /// Parse the given description to assign values to this object's fields and potentially other parameters - void parse ( BaseObjectDescription* arg ) override; + void parse ( BaseComponentDescription* arg ) override; /// Initialization method called at graph creation and modification, during top-down traversal. virtual void init(); diff --git a/Sofa/framework/Core/src/sofa/core/objectmodel/BaseObjectDescription.cpp b/Sofa/framework/Core/src/sofa/core/objectmodel/BaseComponentDescription.cpp similarity index 80% rename from Sofa/framework/Core/src/sofa/core/objectmodel/BaseObjectDescription.cpp rename to Sofa/framework/Core/src/sofa/core/objectmodel/BaseComponentDescription.cpp index 97bbbea54e5..04c2d09ad3f 100644 --- a/Sofa/framework/Core/src/sofa/core/objectmodel/BaseObjectDescription.cpp +++ b/Sofa/framework/Core/src/sofa/core/objectmodel/BaseComponentDescription.cpp @@ -19,7 +19,7 @@ * * * Contact information: contact@sofa-framework.org * ******************************************************************************/ -#include +#include #include #include #include @@ -30,7 +30,7 @@ namespace sofa::core::objectmodel { -BaseObjectDescription::BaseObjectDescription(const char* name, const char* type) +BaseComponentDescription::BaseComponentDescription(const char* name, const char* type) { if (name) attributes["name"] = name; @@ -38,54 +38,54 @@ BaseObjectDescription::BaseObjectDescription(const char* name, const char* type) attributes["type"] = type; } -BaseObjectDescription::~BaseObjectDescription() +BaseComponentDescription::~BaseComponentDescription() { attributes.clear(); } /// Get the associated object (or nullptr if it is not created yet) -Base* BaseObjectDescription::getObject() +Base* BaseComponentDescription::getObject() { return nullptr; } /// Get the object instance name -std::string BaseObjectDescription::getName() +std::string BaseComponentDescription::getName() { return std::string(getAttribute("name","")); } -void BaseObjectDescription::setName(const std::string& name) +void BaseComponentDescription::setName(const std::string& name) { setAttribute("name",name); } /// Get the parent node -BaseObjectDescription* BaseObjectDescription::getParent() const +BaseComponentDescription* BaseComponentDescription::getParent() const { return nullptr; } /// Get the file where this description was read from. Useful to resolve relative file paths. -std::string BaseObjectDescription::getBaseFile() +std::string BaseComponentDescription::getBaseFile() { return ""; } ///// Get all attribute data, read-only -const BaseObjectDescription::AttributeMap& BaseObjectDescription::getAttributeMap() const +const BaseComponentDescription::AttributeMap& BaseComponentDescription::getAttributeMap() const { return attributes; } /// Find an object description given its name (relative to this object) -BaseObjectDescription* BaseObjectDescription::find(const char* /*nodeName*/, bool /*absolute*/) +BaseComponentDescription* BaseComponentDescription::find(const char* /*nodeName*/, bool /*absolute*/) { return nullptr; } /// Remove an attribute given its name, returns false if the attribute was not there. -bool BaseObjectDescription::removeAttribute(const std::string& attr) +bool BaseComponentDescription::removeAttribute(const std::string& attr) { const AttributeMap::iterator it = attributes.find(attr); if (it == attributes.end()) @@ -96,7 +96,7 @@ bool BaseObjectDescription::removeAttribute(const std::string& attr) } /// Get an attribute given its name (return defaultVal if not present) -const char* BaseObjectDescription::getAttribute(const std::string& attr, const char* defaultVal) +const char* BaseComponentDescription::getAttribute(const std::string& attr, const char* defaultVal) { const AttributeMap::iterator it = attributes.find(attr); if (it == attributes.end()) @@ -106,7 +106,7 @@ const char* BaseObjectDescription::getAttribute(const std::string& attr, const c } /// Docs is in .h -float BaseObjectDescription::getAttributeAsFloat(const std::string& attr, const float defaultVal) +float BaseComponentDescription::getAttributeAsFloat(const std::string& attr, const float defaultVal) { const AttributeMap::iterator it = attributes.find(attr); if (it == attributes.end()) @@ -133,7 +133,7 @@ float BaseObjectDescription::getAttributeAsFloat(const std::string& attr, const } /// Docs is in .h -int BaseObjectDescription::getAttributeAsInt(const std::string& attr, const int defaultVal) +int BaseComponentDescription::getAttributeAsInt(const std::string& attr, const int defaultVal) { const AttributeMap::iterator it = attributes.find(attr); if (it == attributes.end()) @@ -157,14 +157,14 @@ int BaseObjectDescription::getAttributeAsInt(const std::string& attr, const int } /// Set an attribute. Override any existing value -void BaseObjectDescription::setAttribute(const std::string& attr, const std::string &val) +void BaseComponentDescription::setAttribute(const std::string& attr, const std::string &val) { attributes[attr] = val; } -std::string BaseObjectDescription::getFullName() +std::string BaseComponentDescription::getFullName() { - BaseObjectDescription* parent = getParent(); + BaseComponentDescription* parent = getParent(); if (parent==nullptr) return "/"; std::string pname = parent->getFullName(); pname += "/"; @@ -173,9 +173,9 @@ std::string BaseObjectDescription::getFullName() } /// Find an object given its name -Base* BaseObjectDescription::findObject(const char* nodeName) +Base* BaseComponentDescription::findObject(const char* nodeName) { - BaseObjectDescription* node = find(nodeName); + BaseComponentDescription* node = find(nodeName); if (node!=nullptr) { Base* obj = node->getObject(); diff --git a/Sofa/framework/Core/src/sofa/core/objectmodel/BaseObjectDescription.h b/Sofa/framework/Core/src/sofa/core/objectmodel/BaseComponentDescription.h similarity index 94% rename from Sofa/framework/Core/src/sofa/core/objectmodel/BaseObjectDescription.h rename to Sofa/framework/Core/src/sofa/core/objectmodel/BaseComponentDescription.h index 997d6705c4d..d4d101df2a3 100644 --- a/Sofa/framework/Core/src/sofa/core/objectmodel/BaseObjectDescription.h +++ b/Sofa/framework/Core/src/sofa/core/objectmodel/BaseComponentDescription.h @@ -38,7 +38,7 @@ class Base; * This default implementation simply stores an attributes map and does not support any hierarchy. * */ -class SOFA_CORE_API BaseObjectDescription +class SOFA_CORE_API BaseComponentDescription { public: class Attribute @@ -59,9 +59,9 @@ class SOFA_CORE_API BaseObjectDescription typedef std::map AttributeMap; - BaseObjectDescription(const char* name=nullptr, const char* type=nullptr); + BaseComponentDescription(const char* name=nullptr, const char* type=nullptr); - virtual ~BaseObjectDescription(); + virtual ~BaseComponentDescription(); /// Get the associated object (or nullptr if it is not created yet) virtual Base* getObject(); @@ -73,7 +73,7 @@ class SOFA_CORE_API BaseObjectDescription virtual void setName(const std::string& name); /// Get the parent node - virtual BaseObjectDescription* getParent() const; + virtual BaseComponentDescription* getParent() const; /// Get the file where this description was read from. Useful to resolve relative file paths. virtual std::string getBaseFile(); @@ -90,7 +90,7 @@ class SOFA_CORE_API BaseObjectDescription } /// Find an object description given its name (relative to this object) - virtual BaseObjectDescription* find(const char* nodeName, bool absolute=false); + virtual BaseComponentDescription* find(const char* nodeName, bool absolute=false); /// Find an object given its name (relative to this object) virtual Base* findObject(const char* nodeName); diff --git a/Sofa/framework/Core/src/sofa/core/objectmodel/BaseLink.h b/Sofa/framework/Core/src/sofa/core/objectmodel/BaseLink.h index d5c71fc6d57..3fdc3271ff3 100644 --- a/Sofa/framework/Core/src/sofa/core/objectmodel/BaseLink.h +++ b/Sofa/framework/Core/src/sofa/core/objectmodel/BaseLink.h @@ -32,7 +32,6 @@ namespace core::objectmodel class Base; class BaseData; class BaseClass; -class BaseObjectDescription; /** * \brief Abstract base class for all links in the scene grapn, independently of their type. diff --git a/Sofa/framework/Core/src/sofa/core/objectmodel/vectorData.h b/Sofa/framework/Core/src/sofa/core/objectmodel/vectorData.h index 35c45fc7218..ff6307f2417 100644 --- a/Sofa/framework/Core/src/sofa/core/objectmodel/vectorData.h +++ b/Sofa/framework/Core/src/sofa/core/objectmodel/vectorData.h @@ -82,7 +82,7 @@ class vectorData : public type::vector< core::objectmodel::Data* > { this->clear(); } - void parseSizeData(sofa::core::objectmodel::BaseObjectDescription* arg, Data& size) + void parseSizeData(sofa::core::objectmodel::BaseComponentDescription* arg, Data& size) { const char* p = arg->getAttribute(size.getName().c_str()); if (p) { diff --git a/Sofa/framework/Core/src/sofa/core/objectmodel/vectorLinks.h b/Sofa/framework/Core/src/sofa/core/objectmodel/vectorLinks.h index e91e8f0c432..6e1494d7099 100644 --- a/Sofa/framework/Core/src/sofa/core/objectmodel/vectorLinks.h +++ b/Sofa/framework/Core/src/sofa/core/objectmodel/vectorLinks.h @@ -62,7 +62,7 @@ class VectorLinks : public type::vector< LinkType* > { this->clear(); } - void parseSizeLinks(sofa::core::objectmodel::BaseObjectDescription* arg, Data& size) + void parseSizeLinks(sofa::core::objectmodel::BaseComponentDescription* arg, Data& size) { const char* p = arg->getAttribute(size.getName().c_str()); if (p) { diff --git a/Sofa/framework/Core/src/sofa/core/topology/TopologicalMapping.h b/Sofa/framework/Core/src/sofa/core/topology/TopologicalMapping.h index 883c6b25a39..aad102db06c 100644 --- a/Sofa/framework/Core/src/sofa/core/topology/TopologicalMapping.h +++ b/Sofa/framework/Core/src/sofa/core/topology/TopologicalMapping.h @@ -112,7 +112,7 @@ class SOFA_CORE_API TopologicalMapping : public virtual objectmodel::BaseCompone /// This implementation reads the "input" and "output" attributes and checks /// that the corresponding objects exist, and are not the same object. template - static bool canCreate ( T*& obj, core::objectmodel::BaseContext* context, core::objectmodel::BaseObjectDescription* arg ) + static bool canCreate ( T*& obj, core::objectmodel::BaseContext* context, core::objectmodel::BaseComponentDescription* arg ) { In* stin = nullptr; Out* stout = nullptr; @@ -160,7 +160,7 @@ class SOFA_CORE_API TopologicalMapping : public virtual objectmodel::BaseCompone /// This implementation read the object1 and object2 attributes to /// find the input and output topologies of this mapping. template - static typename T::SPtr create (T*, core::objectmodel::BaseContext* context, core::objectmodel::BaseObjectDescription* arg ) + static typename T::SPtr create (T*, core::objectmodel::BaseContext* context, core::objectmodel::BaseComponentDescription* arg ) { typename T::SPtr obj = sofa::core::objectmodel::New(); diff --git a/Sofa/framework/Core/test/objectmodel/BaseObjectDescription_test.cpp b/Sofa/framework/Core/test/objectmodel/BaseObjectDescription_test.cpp index d43c3efd5d5..696beca9553 100644 --- a/Sofa/framework/Core/test/objectmodel/BaseObjectDescription_test.cpp +++ b/Sofa/framework/Core/test/objectmodel/BaseObjectDescription_test.cpp @@ -20,8 +20,8 @@ * Contact information: contact@sofa-framework.org * ******************************************************************************/ -#include -using sofa::core::objectmodel::BaseObjectDescription ; +#include +using sofa::core::objectmodel::BaseComponentDescription ; #include using sofa::testing::BaseTest ; diff --git a/Sofa/framework/Core/test/objectmodel/DataFileName_test.cpp b/Sofa/framework/Core/test/objectmodel/DataFileName_test.cpp index bfa96a710e8..53adbc7cf27 100644 --- a/Sofa/framework/Core/test/objectmodel/DataFileName_test.cpp +++ b/Sofa/framework/Core/test/objectmodel/DataFileName_test.cpp @@ -21,8 +21,8 @@ ******************************************************************************/ #include -#include -using sofa::core::objectmodel::BaseObjectDescription ; +#include +using sofa::core::objectmodel::BaseComponentDescription ; #include using sofa::core::objectmodel::DataFileName ; diff --git a/Sofa/framework/Core/test/objectmodel/RemovedData_test.cpp b/Sofa/framework/Core/test/objectmodel/RemovedData_test.cpp index 6ba18fc1303..67c6cce932c 100644 --- a/Sofa/framework/Core/test/objectmodel/RemovedData_test.cpp +++ b/Sofa/framework/Core/test/objectmodel/RemovedData_test.cpp @@ -52,7 +52,7 @@ TEST_F(RemoveData_test, testRemoved) EXPECT_MSG_EMIT(Error); EXPECT_MSG_NOEMIT(Deprecated); - sofa::core::objectmodel::BaseObjectDescription desc; + sofa::core::objectmodel::BaseComponentDescription desc; desc.setAttribute("removedData", "one"); m_object.parse(&desc); @@ -63,7 +63,7 @@ TEST_F(RemoveData_test, testDeprecated) EXPECT_MSG_EMIT(Deprecated); EXPECT_MSG_NOEMIT(Error); - sofa::core::objectmodel::BaseObjectDescription desc; + sofa::core::objectmodel::BaseComponentDescription desc; desc.setAttribute("deprecatedData", "one"); m_object.parse(&desc); diff --git a/Sofa/framework/Helper/test/system/PluginManager_test.cpp b/Sofa/framework/Helper/test/system/PluginManager_test.cpp index 453c9ccb243..c2dfcd75232 100644 --- a/Sofa/framework/Helper/test/system/PluginManager_test.cpp +++ b/Sofa/framework/Helper/test/system/PluginManager_test.cpp @@ -318,7 +318,7 @@ TEST_F(PluginManager_test, failingPlugin) EXPECT_TRUE(sofa::core::ObjectFactory::getInstance()->hasCreator("ComponentFailingPlugin")); - sofa::core::objectmodel::BaseObjectDescription description("ComponentFailingPlugin", "ComponentFailingPlugin"); + sofa::core::objectmodel::BaseComponentDescription description("ComponentFailingPlugin", "ComponentFailingPlugin"); const auto tmpNode = sofa::core::objectmodel::New("tmp"); EXPECT_EQ(sofa::core::ObjectFactory::getInstance()->createObject(tmpNode.get(), &description), nullptr); diff --git a/Sofa/framework/SimpleApi/src/sofa/simpleapi/SimpleApi.cpp b/Sofa/framework/SimpleApi/src/sofa/simpleapi/SimpleApi.cpp index 4b865e1a3d6..c39d13b87aa 100644 --- a/Sofa/framework/SimpleApi/src/sofa/simpleapi/SimpleApi.cpp +++ b/Sofa/framework/SimpleApi/src/sofa/simpleapi/SimpleApi.cpp @@ -26,9 +26,6 @@ #include using sofa::core::ObjectFactory ; -#include -using sofa::simulation::graph::DAGSimulation ; - #include using sofa::simulation::Node; using sofa::core::objectmodel::BaseObjectDescription ; @@ -60,7 +57,7 @@ void dumpScene(Node::SPtr root) p.execute(root.get()) ; } -Simulation::SPtr createSimulation(const std::string& type) +SimulationSPtr createSimulation(const std::string& type) { if(type!="DAG") { @@ -68,7 +65,7 @@ Simulation::SPtr createSimulation(const std::string& type) return nullptr ; } - return std::make_shared(); + return std::make_shared(); } diff --git a/Sofa/framework/SimpleApi/src/sofa/simpleapi/SimpleApi.h b/Sofa/framework/SimpleApi/src/sofa/simpleapi/SimpleApi.h index 4f26b412053..68460aee7da 100644 --- a/Sofa/framework/SimpleApi/src/sofa/simpleapi/SimpleApi.h +++ b/Sofa/framework/SimpleApi/src/sofa/simpleapi/SimpleApi.h @@ -22,7 +22,6 @@ #pragma once #include - #include #include @@ -36,15 +35,16 @@ namespace sofa::simpleapi using BaseObject [[deprecated("Use sofa::core::objectmodel::BaseObject instead.")]] = sofa::core::objectmodel::BaseObject; using sofa::core::objectmodel::BaseObjectDescription; -using sofa::simulation::Simulation ; +using sofa::simulation::Simulation; +using sofa::simulation::SimulationSPtr ; using sofa::simulation::Node ; using sofa::simulation::NodeSPtr ; bool SOFA_SIMPLEAPI_API importPlugin(const std::string& name) ; -Simulation::SPtr SOFA_SIMPLEAPI_API createSimulation(const std::string& type="DAG") ; +SimulationSPtr SOFA_SIMPLEAPI_API createSimulation(const std::string& type="DAG") ; -NodeSPtr SOFA_SIMPLEAPI_API createRootNode( Simulation::SPtr, const std::string& name, +NodeSPtr SOFA_SIMPLEAPI_API createRootNode( SimulationSPtr, const std::string& name, const std::map& params = std::map{} ); NodeSPtr SOFA_SIMPLEAPI_API createRootNode( Simulation* s, const std::string& name, diff --git a/Sofa/framework/Simulation/Common/src/sofa/simulation/common/init.cpp b/Sofa/framework/Simulation/Common/src/sofa/simulation/common/init.cpp index e6622d961b7..ea9a1dfdb2c 100644 --- a/Sofa/framework/Simulation/Common/src/sofa/simulation/common/init.cpp +++ b/Sofa/framework/Simulation/Common/src/sofa/simulation/common/init.cpp @@ -35,7 +35,8 @@ static bool s_initialized = false; static bool s_cleanedUp = false; //create method of Node called if the user wants the default node. The object created will depend on the simulation currently in use. -SOFA_SIMULATION_COMMON_API sofa::helper::Creator NodeClass("default"); +SOFA_SIMULATION_COMMON_API sofa::helper::Creator defaultNodeClassRegistration("default"); +SOFA_SIMULATION_COMMON_API sofa::helper::Creator nodeClassRegistration("Node"); SOFA_SIMULATION_COMMON_API void init() { diff --git a/Sofa/framework/Simulation/Common/src/sofa/simulation/common/xml/BaseElement.cpp b/Sofa/framework/Simulation/Common/src/sofa/simulation/common/xml/BaseElement.cpp index 97486c4e973..512388f2e9a 100644 --- a/Sofa/framework/Simulation/Common/src/sofa/simulation/common/xml/BaseElement.cpp +++ b/Sofa/framework/Simulation/Common/src/sofa/simulation/common/xml/BaseElement.cpp @@ -31,7 +31,7 @@ namespace sofa::simulation::xml { BaseElement::BaseElement(const std::string& name, const std::string& type, BaseElement* newParent) - : BaseObjectDescription(name.c_str(), type.c_str()), parent(nullptr), includeNodeType(INCLUDE_NODE_CHILD) + : BaseComponentDescription(name.c_str(), type.c_str()), parent(nullptr), includeNodeType(INCLUDE_NODE_CHILD) { if (newParent!=nullptr) newParent->addChild(this); } diff --git a/Sofa/framework/Simulation/Common/src/sofa/simulation/common/xml/BaseElement.h b/Sofa/framework/Simulation/Common/src/sofa/simulation/common/xml/BaseElement.h index 0b87da4830c..aab85b54b75 100644 --- a/Sofa/framework/Simulation/Common/src/sofa/simulation/common/xml/BaseElement.h +++ b/Sofa/framework/Simulation/Common/src/sofa/simulation/common/xml/BaseElement.h @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include #include @@ -41,7 +41,7 @@ enum IncludeNodeType INCLUDE_NODE_MERGE, ///< indicating a node that should be merged with its parent, and any child node with the same name as an existing child should be recursively merged }; -class SOFA_SIMULATION_COMMON_API BaseElement : public sofa::core::objectmodel::BaseObjectDescription +class SOFA_SIMULATION_COMMON_API BaseElement : public sofa::core::objectmodel::BaseComponentDescription { private: std::string basefile; @@ -80,7 +80,7 @@ class SOFA_SIMULATION_COMMON_API BaseElement : public sofa::core::objectmodel::B { attributes["type"] = newType; } /// Get the parent node - sofa::core::objectmodel::BaseObjectDescription* getParent() const override + sofa::core::objectmodel::BaseComponentDescription* getParent() const override { return parent; } /// Get the parent node @@ -129,7 +129,7 @@ class SOFA_SIMULATION_COMMON_API BaseElement : public sofa::core::objectmodel::B virtual BaseElement* findNode(const char* nodeName, bool absolute=false); /// Find a node given its name - BaseObjectDescription* find(const char* nodeName, bool absolute=false) override + BaseComponentDescription* find(const char* nodeName, bool absolute=false) override { return findNode(nodeName, absolute); } diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/CollisionAnimationLoop.h b/Sofa/framework/Simulation/Core/src/sofa/simulation/CollisionAnimationLoop.h index ea56345c67e..cfa44d64e89 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/CollisionAnimationLoop.h +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/CollisionAnimationLoop.h @@ -52,7 +52,7 @@ class SOFA_SIMULATION_CORE_API CollisionAnimationLoop : public sofa::core::behav public: typedef sofa::core::behavior::BaseAnimationLoop Inherit; typedef sofa::core::objectmodel::BaseContext BaseContext; - typedef sofa::core::objectmodel::BaseObjectDescription BaseObjectDescription; + typedef sofa::core::objectmodel::BaseComponentDescription BaseObjectDescription; protected: CollisionAnimationLoop(); diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/DefaultAnimationLoop.h b/Sofa/framework/Simulation/Core/src/sofa/simulation/DefaultAnimationLoop.h index f6f88c1db47..898ad88f257 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/DefaultAnimationLoop.h +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/DefaultAnimationLoop.h @@ -46,7 +46,7 @@ class SOFA_SIMULATION_CORE_API DefaultAnimationLoop : public sofa::core::behavio public: typedef sofa::core::behavior::BaseAnimationLoop Inherit; typedef sofa::core::objectmodel::BaseContext BaseContext; - typedef sofa::core::objectmodel::BaseObjectDescription BaseObjectDescription; + typedef sofa::core::objectmodel::BaseComponentDescription BaseObjectDescription; SOFA_CLASS(DefaultAnimationLoop, sofa::core::behavior::BaseAnimationLoop); protected: explicit DefaultAnimationLoop(simulation::Node* gnode = nullptr); diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/DefaultVisualManagerLoop.h b/Sofa/framework/Simulation/Core/src/sofa/simulation/DefaultVisualManagerLoop.h index 5983d4a3289..c2329f4579d 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/DefaultVisualManagerLoop.h +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/DefaultVisualManagerLoop.h @@ -40,7 +40,7 @@ class SOFA_SIMULATION_CORE_API DefaultVisualManagerLoop : public sofa::core::vis public: typedef sofa::core::visual::VisualLoop Inherit; typedef sofa::core::objectmodel::BaseContext BaseContext; - typedef sofa::core::objectmodel::BaseObjectDescription BaseObjectDescription; + typedef sofa::core::objectmodel::BaseComponentDescription BaseObjectDescription; SOFA_CLASS(DefaultVisualManagerLoop,sofa::core::visual::VisualLoop); protected: DefaultVisualManagerLoop(); diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/Node.inl b/Sofa/framework/Simulation/Core/src/sofa/simulation/Node.inl index 14cf15f7a1c..b2467477125 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/Node.inl +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/Node.inl @@ -29,13 +29,9 @@ namespace sofa::simulation template Node::SPtr Node::create( RealObject*, sofa::core::objectmodel::BaseObjectDescription* arg) { - if (Simulation* simulation = getSimulation()) - { - Node::SPtr obj = simulation->createNewNode(arg->getName()); - obj->parse(arg); - return obj; - } - return nullptr; + Node::SPtr obj = getSimulation()->createNewNode(arg->getName()); + obj->parse(arg); + return obj; } } diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/PipelineImpl.cpp b/Sofa/framework/Simulation/Core/src/sofa/simulation/PipelineImpl.cpp index eaa29c4737e..c7e8b52447b 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/PipelineImpl.cpp +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/PipelineImpl.cpp @@ -84,7 +84,7 @@ void PipelineImpl::init() "To remove this warning, you can add an intersection component to your scene. " << msgendl "More details on the collision pipeline can be found at " "[sofadoc::Collision](https://www.sofa-framework.org/community/doc/simulation-principles/multi-model-representation/collision/)."; - sofa::core::objectmodel::BaseObjectDescription discreteIntersectionDesc("Default Intersection","DiscreteIntersection"); + sofa::core::objectmodel::BaseComponentDescription discreteIntersectionDesc("Default Intersection","DiscreteIntersection"); const sofa::core::objectmodel::BaseComponent::SPtr obj = sofa::core::ObjectFactory::CreateObject(getContext(), &discreteIntersectionDesc); intersectionMethod = dynamic_cast(obj.get()); } diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/RequiredPlugin.h b/Sofa/framework/Simulation/Core/src/sofa/simulation/RequiredPlugin.h index 1805319d8fd..5ad503e6430 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/RequiredPlugin.h +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/RequiredPlugin.h @@ -49,7 +49,7 @@ class SOFA_SIMULATION_CORE_API RequiredPlugin : public core::objectmodel::BaseCo public: - void parse(sofa::core::objectmodel::BaseObjectDescription* arg) override; + void parse(sofa::core::objectmodel::BaseComponentDescription* arg) override; /// load a list of plugins requested in Data bool loadPlugin(); diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/Simulation.cpp b/Sofa/framework/Simulation/Core/src/sofa/simulation/Simulation.cpp index cfade426869..b96fb431063 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/Simulation.cpp +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/Simulation.cpp @@ -78,6 +78,10 @@ using namespace sofa; namespace node { +NodeSPtr createNewNode(const std::string& name){ + return sofa::core::objectmodel::New(name); +} + void initRoot(Node* root) { SCOPED_TIMER("Simulation::init"); @@ -472,19 +476,26 @@ void unload(NodeSPtr root) } } -Simulation::Simulation() +Simulation theSimulation; +Simulation* getSimulation() { - // Safety check; it could be elsewhere, but here is a good place, I guess. - if (!sofa::simulation::core::isInitialized()) - sofa::helper::printUninitializedLibraryWarning("Sofa.Simulation.Core", "sofa::simulation::common::init()"); + return &theSimulation; } -Simulation::~Simulation() -{} +Simulation::Simulation(){} +Simulation::~Simulation(){} -Simulation* getSimulation() +/// create a new graph(or tree) and return its root node. +NodeSPtr Simulation::createNewGraph(const std::string& name) { - return Simulation::theSimulation.get(); + return createNewNode( name ); } +NodeSPtr Simulation::createNewNode(const std::string& name) +{ + return sofa::core::objectmodel::New(name); +} + +bool Simulation::isDirectedAcyclicGraph() { return true; } + } // namespace sofa::simulation diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/Simulation.h b/Sofa/framework/Simulation/Core/src/sofa/simulation/Simulation.h index a6befd116e5..889da81ee05 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/Simulation.h +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/Simulation.h @@ -22,69 +22,11 @@ #pragma once #include -#include -#include +#include +#include namespace sofa::simulation { - class Node; - typedef sofa::core::sptr NodeSPtr; -} - -namespace sofa::simulation -{ - -namespace node -{ - -/// Initialize the objects -void SOFA_SIMULATION_CORE_API initRoot(Node* root); -///Init a node without changing the context of the simulation. -void SOFA_SIMULATION_CORE_API init(Node* node); -/// Print all object in the graph in XML format -void SOFA_SIMULATION_CORE_API exportInXML(Node* root, const char* fileName); -/// Print all object in the graph -void SOFA_SIMULATION_CORE_API print(Node* root); -/// Update contexts. Required before drawing the scene if root flags are modified. -void SOFA_SIMULATION_CORE_API updateVisualContext(Node* root); -/// Execute one timestep. If dt is 0, the dt parameter in the graph will be used -void SOFA_SIMULATION_CORE_API animate(Node* root, SReal dt=0.0); -/// Update the Visual Models: triggers the Mappings -void SOFA_SIMULATION_CORE_API updateVisual(Node* root); -/// Reset to initial state -void SOFA_SIMULATION_CORE_API reset(Node* root); -/// Initialize the textures -void SOFA_SIMULATION_CORE_API initTextures(Node* root); -/// Update contexts. Required before drawing the scene if root flags are modified. -void SOFA_SIMULATION_CORE_API updateContext(Node* root); - -/** Compute the bounding box of the scene. - * If init is set to "true", then minBBox and maxBBox will be initialised to a default value - * @warning MechanicalObjects with showObject member set to false are ignored - * @sa computeTotalBBox(Node* root, SReal* minBBox, SReal* maxBBox) - */ -void SOFA_SIMULATION_CORE_API computeBBox(Node* root, SReal* minBBox, SReal* maxBBox, bool init=true); - -/** Compute the bounding box of the scene. - * Includes all objects, may they be displayed or not. - * @sa computeBBox(Node* root, SReal* minBBox, SReal* maxBBox, bool init=true) - * @deprecated - */ -void SOFA_SIMULATION_CORE_API computeTotalBBox(Node* root, SReal* minBBox, SReal* maxBBox); -/// Render the scene -void SOFA_SIMULATION_CORE_API draw(sofa::core::visual::VisualParams* vparams, Node* root); -/// Export a scene to an OBJ 3D Scene -void SOFA_SIMULATION_CORE_API exportOBJ(Node* root, const char* filename, bool exportMTL = true); -/// Print all objects in the graph in the given file (format is given by the filename extension) -void SOFA_SIMULATION_CORE_API exportGraph(Node* root, const char* filename=nullptr); -/// Dump the current state in the given stream -void SOFA_SIMULATION_CORE_API dumpState( Node* root, std::ofstream& out ); -/// Load a scene from a file -NodeSPtr SOFA_SIMULATION_CORE_API load(const std::string& /* filename */, bool reload = false, const std::vector& sceneArgs = std::vector(0)); -/// Unload a scene from a Node. -void SOFA_SIMULATION_CORE_API unload(NodeSPtr root); - -} /** Main controller of the scene. Defines how the scene is inited at the beginning, and updated at each time step. @@ -103,15 +45,13 @@ class SOFA_SIMULATION_CORE_API Simulation Simulation& operator=(const Simulation& n) = delete; /// create a new graph(or tree) and return its root node. - virtual NodeSPtr createNewGraph(const std::string& name)=0;//Todo replace newNode method + virtual NodeSPtr createNewGraph(const std::string& name);//Todo replace newNode method /// creates and returns a new node. - virtual NodeSPtr createNewNode(const std::string& name)=0; + virtual NodeSPtr createNewNode(const std::string& name); /// Can the simulation handle a directed acyclic graph? - virtual bool isDirectedAcyclicGraph() = 0; - - inline static Simulation::SPtr theSimulation { nullptr }; + virtual bool isDirectedAcyclicGraph(); }; } // namespace sofa::simulation diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/fwd.h b/Sofa/framework/Simulation/Core/src/sofa/simulation/fwd.h index abb3e194285..f2103e83f48 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/fwd.h +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/fwd.h @@ -24,6 +24,7 @@ #include #include #include +#include #include namespace sofa::core::objectmodel { class BaseContext; } @@ -34,7 +35,7 @@ namespace sofa::simulation typedef sofa::core::sptr NodeSPtr; class Simulation; - typedef sofa::core::sptr SimulationSPtr; + using SimulationSPtr = std::shared_ptr; /** Get the (unique) simulation which controls the scene. Automatically creates one if no Simulation has been set. @@ -51,6 +52,57 @@ namespace sofa::simulation::node { SOFA_SIMULATION_CORE_API sofa::core::objectmodel::BaseContext* toBaseContext(Node*); SOFA_SIMULATION_CORE_API Node* getNodeFrom(sofa::core::objectmodel::BaseContext*); + +// Create a new node; +SOFA_SIMULATION_CORE_API NodeSPtr createNewNode(const std::string& name); + +/// Initialize the objects +void SOFA_SIMULATION_CORE_API initRoot(Node* root); +///Init a node without changing the context of the simulation. +void SOFA_SIMULATION_CORE_API init(Node* node); +/// Print all object in the graph in XML format +void SOFA_SIMULATION_CORE_API exportInXML(Node* root, const char* fileName); +/// Print all object in the graph +void SOFA_SIMULATION_CORE_API print(Node* root); +/// Update contexts. Required before drawing the scene if root flags are modified. +void SOFA_SIMULATION_CORE_API updateVisualContext(Node* root); +/// Execute one timestep. If dt is 0, the dt parameter in the graph will be used +void SOFA_SIMULATION_CORE_API animate(Node* root, SReal dt=0.0); +/// Update the Visual Models: triggers the Mappings +void SOFA_SIMULATION_CORE_API updateVisual(Node* root); +/// Reset to initial state +void SOFA_SIMULATION_CORE_API reset(Node* root); +/// Initialize the textures +void SOFA_SIMULATION_CORE_API initTextures(Node* root); +/// Update contexts. Required before drawing the scene if root flags are modified. +void SOFA_SIMULATION_CORE_API updateContext(Node* root); + +/** Compute the bounding box of the scene. + * If init is set to "true", then minBBox and maxBBox will be initialised to a default value + * @warning MechanicalObjects with showObject member set to false are ignored + * @sa computeTotalBBox(Node* root, SReal* minBBox, SReal* maxBBox) + */ +void SOFA_SIMULATION_CORE_API computeBBox(Node* root, SReal* minBBox, SReal* maxBBox, bool init=true); + +/** Compute the bounding box of the scene. + * Includes all objects, may they be displayed or not. + * @sa computeBBox(Node* root, SReal* minBBox, SReal* maxBBox, bool init=true) + * @deprecated + */ +void SOFA_SIMULATION_CORE_API computeTotalBBox(Node* root, SReal* minBBox, SReal* maxBBox); +/// Render the scene +void SOFA_SIMULATION_CORE_API draw(sofa::core::visual::VisualParams* vparams, Node* root); +/// Export a scene to an OBJ 3D Scene +void SOFA_SIMULATION_CORE_API exportOBJ(Node* root, const char* filename, bool exportMTL = true); +/// Print all objects in the graph in the given file (format is given by the filename extension) +void SOFA_SIMULATION_CORE_API exportGraph(Node* root, const char* filename=nullptr); +/// Dump the current state in the given stream +void SOFA_SIMULATION_CORE_API dumpState( Node* root, std::ofstream& out ); +/// Load a scene from a file +NodeSPtr SOFA_SIMULATION_CORE_API load(const std::string& /* filename */, bool reload = false, const std::vector& sceneArgs = std::vector(0)); +/// Unload a scene from a Node. +void SOFA_SIMULATION_CORE_API unload(NodeSPtr root); + } namespace sofa::core diff --git a/Sofa/framework/Simulation/Graph/CMakeLists.txt b/Sofa/framework/Simulation/Graph/CMakeLists.txt index b3d07bd5a51..9e7f4bf0af5 100644 --- a/Sofa/framework/Simulation/Graph/CMakeLists.txt +++ b/Sofa/framework/Simulation/Graph/CMakeLists.txt @@ -14,8 +14,6 @@ set(HEADER_FILES set(SOURCE_FILES ${SOFASIMULATIONGRAPH_SRC}/init.cpp ${SOFASIMULATIONGRAPH_SRC}/initSofaSimulationGraph.cpp - ${SOFASIMULATIONGRAPH_SRC}/DAGNode.cpp - ${SOFASIMULATIONGRAPH_SRC}/DAGSimulation.cpp ) sofa_find_package(Sofa.Simulation.Common REQUIRED) diff --git a/Sofa/framework/Simulation/Graph/src/sofa/simulation/graph/DAGNode.cpp b/Sofa/framework/Simulation/Graph/src/sofa/simulation/graph/DAGNode.cpp index 4507024ebd5..e69de29bb2d 100644 --- a/Sofa/framework/Simulation/Graph/src/sofa/simulation/graph/DAGNode.cpp +++ b/Sofa/framework/Simulation/Graph/src/sofa/simulation/graph/DAGNode.cpp @@ -1,31 +0,0 @@ -/****************************************************************************** -* SOFA, Simulation Open-Framework Architecture * -* (c) 2006 INRIA, USTL, UJF, CNRS, MGH * -* * -* This program is free software; you can redistribute it and/or modify it * -* under the terms of the GNU Lesser General Public License as published by * -* the Free Software Foundation; either version 2.1 of the License, or (at * -* your option) any later version. * -* * -* This program is distributed in the hope that it will be useful, but WITHOUT * -* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * -* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License * -* for more details. * -* * -* You should have received a copy of the GNU Lesser General Public License * -* along with this program. If not, see . * -******************************************************************************* -* Authors: The SOFA Team and external contributors (see Authors.txt) * -* * -* Contact information: contact@sofa-framework.org * -******************************************************************************/ -#include -#include - -namespace sofa::simulation -{ - -//helper::Creator NodeDefaultClass("default"); -static helper::Creator NodeClass("Node"); - -} diff --git a/Sofa/framework/Simulation/Graph/src/sofa/simulation/graph/DAGSimulation.cpp b/Sofa/framework/Simulation/Graph/src/sofa/simulation/graph/DAGSimulation.cpp index 853861fc0d8..8b137891791 100644 --- a/Sofa/framework/Simulation/Graph/src/sofa/simulation/graph/DAGSimulation.cpp +++ b/Sofa/framework/Simulation/Graph/src/sofa/simulation/graph/DAGSimulation.cpp @@ -1,60 +1 @@ -/****************************************************************************** -* SOFA, Simulation Open-Framework Architecture * -* (c) 2006 INRIA, USTL, UJF, CNRS, MGH * -* * -* This program is free software; you can redistribute it and/or modify it * -* under the terms of the GNU Lesser General Public License as published by * -* the Free Software Foundation; either version 2.1 of the License, or (at * -* your option) any later version. * -* * -* This program is distributed in the hope that it will be useful, but WITHOUT * -* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * -* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License * -* for more details. * -* * -* You should have received a copy of the GNU Lesser General Public License * -* along with this program. If not, see . * -******************************************************************************* -* Authors: The SOFA Team and external contributors (see Authors.txt) * -* * -* Contact information: contact@sofa-framework.org * -******************************************************************************/ -#include -#include -#include -#include - -#include -#include -#include - -namespace sofa::simulation::graph -{ - -using namespace sofa::defaulttype; - - -DAGSimulation::DAGSimulation() -{ - // Safety check; it could be elsewhere, but here is a good place, I guess. - if (!sofa::simulation::graph::isInitialized()) - sofa::helper::printUninitializedLibraryWarning("Sofa.Simulation.Graph", "sofa::simulation::graph::init()"); -} - -DAGSimulation::~DAGSimulation() -{ - -} - -Node::SPtr DAGSimulation::createNewGraph(const std::string& name) -{ - return createNewNode( name ); -} - -Node::SPtr DAGSimulation::createNewNode(const std::string& name) -{ - return sofa::core::objectmodel::New(name); -} - -} // namespace sofa::simulation::graph diff --git a/Sofa/framework/Simulation/Graph/src/sofa/simulation/graph/DAGSimulation.h b/Sofa/framework/Simulation/Graph/src/sofa/simulation/graph/DAGSimulation.h index 00f00178a23..c3b2177b424 100644 --- a/Sofa/framework/Simulation/Graph/src/sofa/simulation/graph/DAGSimulation.h +++ b/Sofa/framework/Simulation/Graph/src/sofa/simulation/graph/DAGSimulation.h @@ -29,25 +29,5 @@ namespace sofa::simulation::graph { - -/** Main controller of the scene. -Defines how the scene is inited at the beginning, and updated at each time step. -Derives from BaseObject in order to model the parameters as Datas, which makes their edition easy in the GUI. - */ -class SOFA_SIMULATION_GRAPH_API DAGSimulation: public Simulation -{ -public: - DAGSimulation(); - ~DAGSimulation() override; // this is a terminal class - - /// create a new graph(or tree) and return its root node. - virtual NodeSPtr createNewGraph(const std::string& name) override; - - /// creates and returns a new node. - virtual NodeSPtr createNewNode(const std::string& name) override; - - /// Can the simulation handle a directed acyclic graph? - bool isDirectedAcyclicGraph() override { return true; } -}; - + using DAGSimulation = Simulation; } // namespace sofa::simulation::graph diff --git a/Sofa/framework/Simulation/Graph/src/sofa/simulation/graph/init.cpp b/Sofa/framework/Simulation/Graph/src/sofa/simulation/graph/init.cpp index 4d1fa04597f..d8d62c33432 100644 --- a/Sofa/framework/Simulation/Graph/src/sofa/simulation/graph/init.cpp +++ b/Sofa/framework/Simulation/Graph/src/sofa/simulation/graph/init.cpp @@ -37,7 +37,6 @@ SOFA_SIMULATION_GRAPH_API void init() { sofa::simulation::common::init(); s_initialized = true; - sofa::simulation::Simulation::theSimulation = std::make_shared(); } } diff --git a/Sofa/framework/Simulation/Graph/test/MutationListener_test.cpp b/Sofa/framework/Simulation/Graph/test/MutationListener_test.cpp index 707f4ae9827..dc52872a901 100644 --- a/Sofa/framework/Simulation/Graph/test/MutationListener_test.cpp +++ b/Sofa/framework/Simulation/Graph/test/MutationListener_test.cpp @@ -222,13 +222,13 @@ struct MutationListener_test : public BaseTest /*TESTS OBJECT*/ void test_addObject() { - sofa::core::objectmodel::BaseObjectDescription bod1("obj1", "BaseObject"); + sofa::core::objectmodel::BaseComponentDescription bod1("obj1", "BaseObject"); obj1 = sofa::core::objectmodel::New(); obj1->parse(&bod1); root->addObject(obj1); EXPECT_EQ("Begin Add obj1 to root\nEnd Add obj1 to root\n", listener.log); listener.clearLog(); - sofa::core::objectmodel::BaseObjectDescription bod2("obj2", "BaseObject"); + sofa::core::objectmodel::BaseComponentDescription bod2("obj2", "BaseObject"); obj2 = sofa::core::objectmodel::New(); obj2->parse(&bod2); root->addObject(obj2); @@ -292,11 +292,11 @@ struct MutationListener_test : public BaseTest const Node::SPtr node1 = sofa::core::objectmodel::New("node1"); const Node::SPtr node2 = sofa::core::objectmodel::New("node2"); node1->addChild(node2); - sofa::core::objectmodel::BaseObjectDescription bod1("obj1", "BaseObject"); + sofa::core::objectmodel::BaseComponentDescription bod1("obj1", "BaseObject"); obj1 = sofa::core::objectmodel::New(); obj1->parse(&bod1); node2->addObject(obj1); - sofa::core::objectmodel::BaseObjectDescription bod2("obj2", "BaseObject"); + sofa::core::objectmodel::BaseComponentDescription bod2("obj2", "BaseObject"); obj2 = sofa::core::objectmodel::New(); obj2->parse(&bod2); node2->addObject(obj2); @@ -314,11 +314,11 @@ struct MutationListener_test : public BaseTest const Node::SPtr node1 = sofa::core::objectmodel::New("node1"); const Node::SPtr node2 = sofa::core::objectmodel::New("node2"); node1->addChild(node2); - sofa::core::objectmodel::BaseObjectDescription bod1("obj1", "BaseObject"); + sofa::core::objectmodel::BaseComponentDescription bod1("obj1", "BaseObject"); obj1 = sofa::core::objectmodel::New(); obj1->parse(&bod1); node2->addObject(obj1); - sofa::core::objectmodel::BaseObjectDescription bod2("obj2", "BaseObject"); + sofa::core::objectmodel::BaseComponentDescription bod2("obj2", "BaseObject"); obj2 = sofa::core::objectmodel::New(); obj2->parse(&bod2); node2->addObject(obj2); @@ -337,11 +337,11 @@ struct MutationListener_test : public BaseTest const Node::SPtr node1 = sofa::core::objectmodel::New("node1"); const Node::SPtr node2 = sofa::core::objectmodel::New("node2"); node1->addChild(node2); - sofa::core::objectmodel::BaseObjectDescription bod1("obj1", "BaseObject"); + sofa::core::objectmodel::BaseComponentDescription bod1("obj1", "BaseObject"); obj1 = sofa::core::objectmodel::New(); obj1->parse(&bod1); node2->addObject(obj1); - sofa::core::objectmodel::BaseObjectDescription bod2("obj2", "BaseObject"); + sofa::core::objectmodel::BaseComponentDescription bod2("obj2", "BaseObject"); obj2 = sofa::core::objectmodel::New(); obj2->parse(&bod2); node2->addObject(obj2); @@ -369,11 +369,11 @@ struct MutationListener_test : public BaseTest const Node::SPtr node7 = sofa::core::objectmodel::New("node7"); const Node::SPtr node8 = sofa::core::objectmodel::New("node8"); - sofa::core::objectmodel::BaseObjectDescription bod1("obj1", "BaseObject"); + sofa::core::objectmodel::BaseComponentDescription bod1("obj1", "BaseObject"); obj1 = sofa::core::objectmodel::New(); obj1->parse(&bod1); node1->addObject(obj1); - sofa::core::objectmodel::BaseObjectDescription bod2("obj2", "BaseObject"); + sofa::core::objectmodel::BaseComponentDescription bod2("obj2", "BaseObject"); obj2 = sofa::core::objectmodel::New(); obj2->parse(&bod2); node1->addObject(obj2); diff --git a/applications/plugins/MultiThreading/src/MultiThreading/DataExchange.h b/applications/plugins/MultiThreading/src/MultiThreading/DataExchange.h index 6ffa39dac11..320b2a382cf 100644 --- a/applications/plugins/MultiThreading/src/MultiThreading/DataExchange.h +++ b/applications/plugins/MultiThreading/src/MultiThreading/DataExchange.h @@ -84,7 +84,7 @@ class DataExchange : public virtual objectmodel::BaseComponent } template - static typename T::SPtr create(T*, core::objectmodel::BaseContext* context, core::objectmodel::BaseObjectDescription* arg) + static typename T::SPtr create(T*, core::objectmodel::BaseContext* context, core::objectmodel::BaseComponentDescription* arg) { std::string fromPath; std::string toPath; diff --git a/applications/plugins/SceneCreator/src/SceneCreator/SceneCreator.cpp b/applications/plugins/SceneCreator/src/SceneCreator/SceneCreator.cpp index 0d02ce1b34a..b18c49cc6f1 100644 --- a/applications/plugins/SceneCreator/src/SceneCreator/SceneCreator.cpp +++ b/applications/plugins/SceneCreator/src/SceneCreator/SceneCreator.cpp @@ -24,7 +24,6 @@ #include #include -#include #include "GetVectorVisitor.h" #include "GetAssembledSizeVisitor.h" @@ -50,7 +49,6 @@ using namespace sofa::defaulttype ; using type::vector; -using sofa::simulation::graph::DAGSimulation ; using sofa::simulation::GetAssembledSizeVisitor ; using sofa::simulation::GetVectorVisitor ; using sofa::simulation::Node ; diff --git a/applications/plugins/SceneCreator/src/SceneCreator/SceneUtils.cpp b/applications/plugins/SceneCreator/src/SceneCreator/SceneUtils.cpp index 991f3a59e40..70dcebd8692 100644 --- a/applications/plugins/SceneCreator/src/SceneCreator/SceneUtils.cpp +++ b/applications/plugins/SceneCreator/src/SceneCreator/SceneUtils.cpp @@ -22,7 +22,6 @@ #include "SceneCreator.h" #include "SceneUtils.h" -#include #include "GetVectorVisitor.h" #include "GetAssembledSizeVisitor.h" @@ -52,7 +51,6 @@ typedef linearalgebra::FullVector FullVector ; using type::vector; -using sofa::simulation::graph::DAGSimulation ; using sofa::simulation::GetAssembledSizeVisitor ; using sofa::simulation::GetVectorVisitor ; using sofa::simulation::Node ; diff --git a/applications/plugins/SofaImplicitField/components/mapping/ImplicitSurfaceMapping.h b/applications/plugins/SofaImplicitField/components/mapping/ImplicitSurfaceMapping.h index 6b66ece9bd8..b08eb354e8b 100644 --- a/applications/plugins/SofaImplicitField/components/mapping/ImplicitSurfaceMapping.h +++ b/applications/plugins/SofaImplicitField/components/mapping/ImplicitSurfaceMapping.h @@ -79,7 +79,7 @@ class ImplicitSurfaceMapping : public core::Mapping, public MeshTopolog public: void init() override; - void parse(core::objectmodel::BaseObjectDescription* arg) override; + void parse(core::objectmodel::BaseComponentDescription* arg) override; double getStep() const { return mStep.getValue(); } void setStep(double val) { mStep.setValue(val); } diff --git a/applications/plugins/SofaImplicitField/components/mapping/ImplicitSurfaceMapping.inl b/applications/plugins/SofaImplicitField/components/mapping/ImplicitSurfaceMapping.inl index 267b73e3fc3..f7f817b3ecb 100644 --- a/applications/plugins/SofaImplicitField/components/mapping/ImplicitSurfaceMapping.inl +++ b/applications/plugins/SofaImplicitField/components/mapping/ImplicitSurfaceMapping.inl @@ -38,7 +38,7 @@ void ImplicitSurfaceMapping::init() } template -void ImplicitSurfaceMapping::parse(core::objectmodel::BaseObjectDescription* arg) +void ImplicitSurfaceMapping::parse(core::objectmodel::BaseComponentDescription* arg) { this->Inherit::parse(arg); if ( arg->getAttribute("minx") || arg->getAttribute("miny") || arg->getAttribute("minz")) diff --git a/applications/plugins/image/imagetoolbox/labelpointsbysection/labelpointsbysectionimagetoolbox.h b/applications/plugins/image/imagetoolbox/labelpointsbysection/labelpointsbysectionimagetoolbox.h index 3853896819c..c580ad36b0d 100644 --- a/applications/plugins/image/imagetoolbox/labelpointsbysection/labelpointsbysectionimagetoolbox.h +++ b/applications/plugins/image/imagetoolbox/labelpointsbysection/labelpointsbysectionimagetoolbox.h @@ -8,7 +8,7 @@ #include #include -#include +#include #include #include "labelpointsbysectionimagetoolboxaction.h" diff --git a/applications/projects/SceneChecking/src/SceneChecking/SceneCheckUsingAlias.cpp b/applications/projects/SceneChecking/src/SceneChecking/SceneCheckUsingAlias.cpp index a94e895a5cc..11296abf35c 100644 --- a/applications/projects/SceneChecking/src/SceneChecking/SceneCheckUsingAlias.cpp +++ b/applications/projects/SceneChecking/src/SceneChecking/SceneCheckUsingAlias.cpp @@ -22,7 +22,7 @@ #include "SceneCheckUsingAlias.h" #include -#include +#include #include #include @@ -33,7 +33,7 @@ namespace sofa::_scenechecking_ const bool SceneCheckUsingAliasRegistered = sofa::simulation::SceneCheckMainRegistry::addToRegistry(SceneCheckUsingAlias::newSPtr()); using sofa::core::objectmodel::Base; -using sofa::core::objectmodel::BaseObjectDescription; +using sofa::core::objectmodel::BaseComponentDescription; using sofa::core::ObjectFactory; diff --git a/applications/projects/runSofa/Main.cpp b/applications/projects/runSofa/Main.cpp index a7ac3187b46..99870ff4a34 100644 --- a/applications/projects/runSofa/Main.cpp +++ b/applications/projects/runSofa/Main.cpp @@ -36,7 +36,7 @@ using std::vector; #include #include #include -#include +#include using sofa::simulation::Node; #include #include @@ -59,7 +59,6 @@ using sofa::core::ExecParams ; #include using sofa::helper::Utils; -using sofa::simulation::graph::DAGSimulation; using sofa::helper::system::SetDirectory; using sofa::core::objectmodel::BaseNode ; @@ -471,7 +470,7 @@ int main(int argc, char** argv) const std::vector sceneArgs = sofa::gui::common::ArgumentParser::extra_args(); Node::SPtr groot = sofa::simulation::node::load(fileName, false, sceneArgs); if( !groot ) - groot = sofa::simulation::getSimulation()->createNewGraph(""); + groot = sofa::simulation::node::createNewNode(""); if (!verif.empty()) {