Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ using std::string;
using sofa::core::execparams::defaultInstance;

#include<sofa/core/objectmodel/BaseObject.h>
using sofa::core::objectmodel::BaseObject ;

#include <sofa/component/collision/detection/algorithm/CollisionPipeline.h>
using sofa::component::collision::detection::algorithm::CollisionPipeline ;
Expand Down Expand Up @@ -111,7 +110,7 @@ void TestCollisionPipeline::checkCollisionPipelineWithNoAttributes()
ASSERT_NE(root.get(), nullptr) ;
root->init(sofa::core::execparams::defaultInstance()) ;

BaseObject* clp = root->getObject("pipeline") ;
sofa::core::objectmodel::BaseObject* clp = root->getObject("pipeline") ;
ASSERT_NE(clp, nullptr) ;
}

Expand All @@ -133,7 +132,7 @@ void TestCollisionPipeline::checkCollisionPipelineWithMissingIntersection()
ASSERT_NE(root.get(), nullptr) ;
root->init(sofa::core::execparams::defaultInstance()) ;

BaseObject* clp = root->getObject("pipeline") ;
sofa::core::objectmodel::BaseComponent* clp = root->getObject("pipeline") ;
ASSERT_NE(clp, nullptr) ;
}

Expand All @@ -155,7 +154,7 @@ void TestCollisionPipeline::checkCollisionPipelineWithMissingBroadPhase()
ASSERT_NE(root.get(), nullptr) ;
root->init(sofa::core::execparams::defaultInstance()) ;

BaseObject* clp = root->getObject("pipeline") ;
sofa::core::objectmodel::BaseComponent* clp = root->getObject("pipeline") ;
ASSERT_NE(clp, nullptr) ;
}
void TestCollisionPipeline::checkCollisionPipelineWithMissingNarrowPhase()
Expand All @@ -176,7 +175,7 @@ void TestCollisionPipeline::checkCollisionPipelineWithMissingNarrowPhase()
ASSERT_NE(root.get(), nullptr) ;
root->init(sofa::core::execparams::defaultInstance()) ;

BaseObject* clp = root->getObject("pipeline") ;
sofa::core::objectmodel::BaseComponent* clp = root->getObject("pipeline") ;
ASSERT_NE(clp, nullptr) ;
}
void TestCollisionPipeline::checkCollisionPipelineWithMissingContactManager()
Expand All @@ -197,7 +196,7 @@ void TestCollisionPipeline::checkCollisionPipelineWithMissingContactManager()
ASSERT_NE(root.get(), nullptr) ;
root->init(sofa::core::execparams::defaultInstance()) ;

BaseObject* clp = root->getObject("pipeline") ;
sofa::core::objectmodel::BaseComponent* clp = root->getObject("pipeline") ;
ASSERT_NE(clp, nullptr) ;

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public :
"' found in the context node.");
return false;
}
return BaseObject::canCreate(obj, context, arg);
return BaseComponent::canCreate(obj, context, arg);
}

sofa::core::topology::BaseMeshTopology* getCollisionTopology() override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class PointCollisionModel : public core::CollisionModel
"' found in the context node.");
return false;
}
return BaseObject::canCreate(obj, context, arg);
return BaseComponent::canCreate(obj, context, arg);
}

void computeBBox(const core::ExecParams* params, bool onlyVisible) override;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class SphereCollisionModel : public core::CollisionModel
return false;
}

return BaseObject::canCreate(obj, context, arg);
return BaseComponent::canCreate(obj, context, arg);
}

template<class T>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ class TriangleCollisionModel : public core::CollisionModel
"' found in the context node.");
return false;
}
return BaseObject::canCreate(obj, context, arg);
return BaseComponent::canCreate(obj, context, arg);
}

void computeBBox(const core::ExecParams* params, bool onlyVisible=false) override;
Expand Down
7 changes: 3 additions & 4 deletions Sofa/Component/Collision/Geometry/tests/Sphere_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ using std::vector;
using std::string;

#include<sofa/core/objectmodel/BaseObject.h>
using sofa::core::objectmodel::BaseObject ;

#include<sofa/simulation/Node.h>
using sofa::simulation::Node ;
Expand Down Expand Up @@ -434,7 +433,7 @@ void checkAttributes()
EXPECT_NE(root.get(), nullptr) ;
root->init(sofa::core::execparams::defaultInstance()) ;

BaseObject* theSphere = root->getTreeNode("Level 1")->getObject("spheremodel") ;
sofa::core::objectmodel::BaseComponent* theSphere = root->getTreeNode("Level 1")->getObject("spheremodel") ;
EXPECT_NE(theSphere, nullptr) ;

/// List of the supported attributes the user expect to find
Expand Down Expand Up @@ -462,7 +461,7 @@ void checkSceneWithVec3MechanicalModel()
EXPECT_NE(root.get(), nullptr) ;
root->init(sofa::core::execparams::defaultInstance()) ;

BaseObject* theSphere = root->getTreeNode("Level 1")->getObject("spheremodel") ;
sofa::core::objectmodel::BaseComponent* theSphere = root->getTreeNode("Level 1")->getObject("spheremodel") ;
EXPECT_NE(theSphere, nullptr) ;
}

Expand All @@ -481,7 +480,7 @@ void checkSceneWithRigid3dMechanicalModel()
EXPECT_NE(root.get(), nullptr) ;
root->init(sofa::core::execparams::defaultInstance()) ;

BaseObject* theSphere = root->getTreeNode("Level 1")->getObject("spheremodel") ;
sofa::core::objectmodel::BaseComponent* theSphere = root->getTreeNode("Level 1")->getObject("spheremodel") ;
EXPECT_NE(theSphere, nullptr) ;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class SOFA_COMPONENT_COLLISION_RESPONSE_CONTACT_API ContactListener : public vir
return false;
}

return BaseObject::canCreate(obj, context, arg);
return BaseComponent::canCreate(obj, context, arg);
}

template<class T>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ namespace sofa::component::engine::select::boxroi
using core::topology::BaseMeshTopology ;
using core::behavior::MechanicalState ;
using core::objectmodel::BaseContext ;
using core::objectmodel::BaseObject ;
using core::visual::VisualParams ;
using core::visual::VisualParams ;
using core::objectmodel::Event ;
using core::ExecParams ;
using core::DataEngine ;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class PairBoxROI : public core::DataEngine
}
}

return BaseObject::canCreate(obj, context, arg);
return BaseComponent::canCreate(obj, context, arg);
}

protected:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class PlaneROI : public core::DataEngine
}
}

return BaseObject::canCreate(obj, context, arg);
return BaseComponent::canCreate(obj, context, arg);
}

protected:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class ProximityROI : public core::DataEngine
}
}

return BaseObject::canCreate(obj, context, arg);
return BaseComponent::canCreate(obj, context, arg);
}

public:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class SubsetTopology : public core::DataEngine
}
}

return BaseObject::canCreate(obj, context, arg);
return BaseComponent::canCreate(obj, context, arg);
}

protected:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class ValuesFromPositions : public core::DataEngine
}
}

return BaseObject::canCreate(obj, context, arg);
return BaseComponent::canCreate(obj, context, arg);
}

protected:
Expand Down
5 changes: 2 additions & 3 deletions Sofa/Component/Engine/Select/tests/BoxROI_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ using sofa::simulation::Simulation;
using sofa::simulation::graph::DAGSimulation;
#include <sofa/simulation/Node.h>
using sofa::simulation::Node;
using sofa::core::objectmodel::BaseObject;
using sofa::core::objectmodel::BaseData;
using sofa::core::objectmodel::New;
using sofa::defaulttype::Vec3Types;
Expand Down Expand Up @@ -133,7 +132,7 @@ struct BoxROITest : public sofa::testing::BaseTest
EXPECT_NE(root.get(), nullptr);
root->init(sofa::core::execparams::defaultInstance());

BaseObject* boxroi = root->getTreeNode("Level 1")->getObject("myBoxROI");
sofa::core::objectmodel::BaseComponent* boxroi = root->getTreeNode("Level 1")->getObject("myBoxROI");
EXPECT_NE(boxroi, nullptr);

EXPECT_EQ(boxroi->getComponentState(), ComponentState::Invalid ) << "The component cannot be initialized because it is missing a MechanicalObject. "
Expand Down Expand Up @@ -202,7 +201,7 @@ struct BoxROITest : public sofa::testing::BaseTest
const Node::SPtr root = SceneLoaderXML::loadFromMemory("testscene", scene.c_str());
EXPECT_NE(root.get(), nullptr);
root->init(sofa::core::execparams::defaultInstance());
BaseObject* boxroi = root->getTreeNode("Level 1")->getObject("myBoxROI");
sofa::core::objectmodel::BaseComponent* boxroi = root->getTreeNode("Level 1")->getObject("myBoxROI");

EXPECT_NE(boxroi, nullptr);
EXPECT_EQ(boxroi->getComponentState(), ComponentState::Valid ) << "The component should succeed in being initialized because there is a MeshLoader and a TopologyContainer in the current context. ";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class LCPForceFeedback : public MechanicalStateForceFeedback<TDataTypes>
return false;
}

return core::objectmodel::BaseObject::canCreate(obj, context, arg);
return core::objectmodel::BaseComponent::canCreate(obj, context, arg);
}

/// Override method to lock or unlock the force feedback computation. According to parameter, value == true (resp. false) will lock (resp. unlock) mutex @sa lockForce
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ namespace sofa::component::io::mesh::basevtkreader
/// So that you can access to BaseVTKReader with
/// sofa::component::loader::BaseVTKReader or sofa::component::loader::basevtkreader::BaseVTKReader

using sofa::core::objectmodel::BaseObject ;
using sofa::core::objectmodel::BaseData ;

using std::ofstream ;
Expand All @@ -49,10 +48,10 @@ enum class VTKDatasetFormat { IMAGE_DATA, STRUCTURED_POINTS,
POLYDATA, UNSTRUCTURED_GRID
};

class BaseVTKReader : public BaseObject
class BaseVTKReader : public sofa::core::objectmodel::BaseObject
{
public:
class BaseVTKDataIO : public BaseObject
class BaseVTKDataIO : public sofa::core::objectmodel::BaseObject
{
public:
string name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class SOFA_COMPONENT_IO_MESH_API BlenderExporter: public sofa::simulation::BaseS
"' found in the context node.");
return false;
}
return BaseObject::canCreate(obj, context, arg);
return BaseComponent::canCreate(obj, context, arg);
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ using namespace sofa::defaulttype;
using namespace sofa::helper;
using sofa::core::objectmodel::ComponentState;
using sofa::core::objectmodel::BaseData ;
using sofa::core::objectmodel::BaseObject ;
using sofa::type::Vec3 ;
using sofa::type::Vec ;
using std::istringstream;
Expand Down
1 change: 0 additions & 1 deletion Sofa/Component/IO/Mesh/tests/MeshExporter_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ using std::string;
using sofa::testing::BaseSimulationTest;

#include<sofa/core/objectmodel/BaseObject.h>
using sofa::core::objectmodel::BaseObject ;

#include <sofa/simulation/graph/DAGSimulation.h>
using sofa::simulation::graph::DAGSimulation ;
Expand Down
1 change: 0 additions & 1 deletion Sofa/Component/IO/Mesh/tests/STLExporter_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ using std::string;
using sofa::testing::BaseSimulationTest;

#include<sofa/core/objectmodel/BaseObject.h>
using sofa::core::objectmodel::BaseObject ;

#include <sofa/simulation/graph/DAGSimulation.h>
using sofa::simulation::graph::DAGSimulation ;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ using std::string;
using sofa::testing::BaseSimulationTest;

#include<sofa/core/objectmodel/BaseObject.h>
using sofa::core::objectmodel::BaseObject ;

#include <sofa/simulation/graph/DAGSimulation.h>
using sofa::simulation::graph::DAGSimulation ;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ class PrecomputedWarpPreconditioner : public sofa::component::linearsolver::Matr
arg->logError(std::string("No mechanical state with the datatype '") + TDataTypes::Name() + "' found in the context node.");
return false;
}
return sofa::core::objectmodel::BaseObject::canCreate(obj, context, arg);
return sofa::core::objectmodel::BaseComponent::canCreate(obj, context, arg);
}

protected :
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ class BarycentricMapper : public virtual core::objectmodel::BaseObject

public:

using BaseObject::init;
using BaseComponent::init;
virtual void init(const typename Out::VecCoord& out, const typename In::VecCoord& in) = 0;

using BaseObject::draw;
using BaseComponent::draw;
virtual void draw(const core::visual::VisualParams*, const typename Out::VecCoord& out, const typename In::VecCoord& in) = 0;

virtual void apply( typename Out::VecCoord& out, const typename In::VecCoord& in ) = 0;
Expand Down
5 changes: 2 additions & 3 deletions Sofa/Component/Mass/tests/DiagonalMass_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ using namespace sofa::defaulttype;
using namespace sofa::component::topology::container::dynamic;

using sofa::core::objectmodel::New;
using sofa::core::objectmodel::BaseObject;
using sofa::component::mass::DiagonalMass;
using sofa::component::statecontainer::MechanicalObject;

Expand Down Expand Up @@ -115,7 +114,7 @@ class DiagonalMass_test : public BaseTest
sofa::simulation::node::unload(root);
}

void createSceneGraph(VecCoord positions, BaseObject::SPtr topologyContainer, BaseObject::SPtr geometryAlgorithms)
void createSceneGraph(VecCoord positions, sofa::core::objectmodel::BaseComponent::SPtr topologyContainer, sofa::core::objectmodel::BaseComponent::SPtr geometryAlgorithms)
{
node = root->createChild("node");
mstate = New<MechanicalObject<DataTypes> >();
Expand Down Expand Up @@ -143,7 +142,7 @@ class DiagonalMass_test : public BaseTest
EXPECT_NEAR(expectedMass[i], mass->d_vertexMass.getValue()[i], 1e-4);
}

void runTest(VecCoord positions, BaseObject::SPtr topologyContainer, BaseObject::SPtr geometryAlgorithms,
void runTest(VecCoord positions, sofa::core::objectmodel::BaseComponent::SPtr topologyContainer, sofa::core::objectmodel::BaseComponent::SPtr geometryAlgorithms,
MassType expectedTotalMass, const VecMass& expectedMass)
{
createSceneGraph(positions, topologyContainer, geometryAlgorithms);
Expand Down
5 changes: 2 additions & 3 deletions Sofa/Component/Mass/tests/MeshMatrixMass_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ using namespace sofa::defaulttype;
using namespace sofa::component::topology::container::dynamic;

using sofa::core::objectmodel::New;
using sofa::core::objectmodel::BaseObject;
using sofa::component::mass::MeshMatrixMass;
using sofa::component::statecontainer::MechanicalObject;

Expand Down Expand Up @@ -118,7 +117,7 @@ class MeshMatrixMass_test : public BaseTest
sofa::simulation::node::unload(root);
}

void createSceneGraph(VecCoord positions, BaseObject::SPtr topologyContainer, BaseObject::SPtr geometryAlgorithms)
void createSceneGraph(VecCoord positions, sofa::core::objectmodel::BaseComponent::SPtr topologyContainer, sofa::core::objectmodel::BaseComponent::SPtr geometryAlgorithms)
{
node = root->createChild("node");
mstate = New<MechanicalObject<DataTypes> >();
Expand Down Expand Up @@ -161,7 +160,7 @@ class MeshMatrixMass_test : public BaseTest
}
}

void runTest(VecCoord positions, BaseObject::SPtr topologyContainer, BaseObject::SPtr geometryAlgorithms,
void runTest(VecCoord positions, sofa::core::objectmodel::BaseComponent::SPtr topologyContainer, sofa::core::objectmodel::BaseComponent::SPtr geometryAlgorithms,
MassType expectedTotalMass, MassType expectedMassDensity, const VecMass& expectedVMass, const VecMass& expectedEMass)
{
createSceneGraph(positions, topologyContainer, geometryAlgorithms);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ using sofa::testing::BaseSimulationTest;
using sofa::simulation::Simulation ;
using sofa::simulation::graph::DAGSimulation ;
using sofa::simulation::Node ;
using sofa::core::objectmodel::BaseObject ;
using sofa::core::objectmodel::BaseData ;
using sofa::core::objectmodel::New ;
using sofa::core::execparams::defaultInstance;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class SOFA_COMPONENT_PLAYBACK_API CompareState: public ReadState
arg->logError("No mechanical state found in the context node.");
return false;
}
return BaseObject::canCreate(obj, context, arg);
return BaseComponent::canCreate(obj, context, arg);
}

/// Return the total errors (position and velocity)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class SOFA_COMPONENT_PLAYBACK_API CompareTopology: public ReadTopology
arg->logError("Cannot find a mesh topology in the current context");
return false;
}
return BaseObject::canCreate(obj, context, arg);
return BaseComponent::canCreate(obj, context, arg);
}

/// Return the total number of errors
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class SOFA_COMPONENT_PLAYBACK_API ReadState: public core::objectmodel::BaseObjec
arg->logError("No mechanical state found in the context node.");
return false;
}
return BaseObject::canCreate(obj, context, arg);
return BaseComponent::canCreate(obj, context, arg);
}


Expand Down
Loading