From 57e91ceab3f575434ecb0f0a8dbebd9d685599cc Mon Sep 17 00:00:00 2001 From: Alex Bilger Date: Thu, 22 Feb 2024 07:09:05 +0100 Subject: [PATCH] [all] Apply nested namespaces (#4482) * [all] Apply nested namespaces * Fix compilation * Revert nested namespaces on .cu files to fix compilation * Fix bad refactoring --- .../Core/src/sofa/core/ConstraintParams.cpp | 8 +++----- .../Core/src/sofa/core/DevBaseMonitor.h | 8 +++----- .../Core/src/sofa/core/ExecParams.cpp | 8 +++----- .../Core/src/sofa/core/MechanicalParams.cpp | 8 +++----- .../Core/src/sofa/core/behavior/OdeSolver.cpp | 13 ++++--------- .../src/sofa/core/behavior/RotationFinder.h | 13 ++----------- .../Core/src/sofa/core/collision/Contact.cpp | 13 ++++--------- .../Core/src/sofa/core/loader/MeshLoader.cpp | 13 ++++--------- .../Core/src/sofa/core/loader/SceneLoader.cpp | 13 ++++--------- .../Core/src/sofa/core/loader/VoxelLoader.cpp | 13 ++++--------- .../src/sofa/core/objectmodel/AspectPool.cpp | 13 ++++--------- .../src/sofa/core/objectmodel/BaseClass.cpp | 13 ++++--------- .../src/sofa/core/objectmodel/BaseNode.cpp | 13 ++++--------- .../src/sofa/core/objectmodel/BaseObject.cpp | 14 ++++---------- .../src/sofa/core/objectmodel/ClassInfo.cpp | 13 ++++--------- .../sofa/core/objectmodel/ComponentState.cpp | 12 +++--------- .../core/objectmodel/ConfigurationSetting.cpp | 13 ++++--------- .../Core/src/sofa/core/objectmodel/Data.cpp | 13 ++----------- .../sofa/core/objectmodel/DetachNodeEvent.cpp | 13 ++++--------- .../src/sofa/defaulttype/MapMapSparseMatrix.h | 8 ++------ .../src/sofa/defaulttype/RigidVec6Types.h | 7 ++----- .../src/sofa/defaulttype/SolidTypes.cpp | 9 ++------- .../src/sofa/defaulttype/SolidTypes.h | 10 ++-------- .../src/sofa/defaulttype/SolidTypes.inl | 9 ++------- .../src/sofa/defaulttype/TemplatesAliases.h | 8 ++------ .../DefaultType/src/sofa/defaulttype/init.cpp | 8 +++----- .../DefaultType/src/sofa/defaulttype/init.h | 7 ++----- .../Helper/src/sofa/helper/BackTrace.cpp | 8 +++----- .../Helper/src/sofa/helper/BackTrace.h | 7 ++----- .../Helper/src/sofa/helper/ColorMap.cpp | 8 ++------ .../Helper/src/sofa/helper/ColorMap.h | 9 ++------- .../Helper/src/sofa/helper/IndexOpenMP.h | 8 ++------ .../Helper/src/sofa/helper/LCPcalc.cpp | 8 +++----- .../framework/Helper/src/sofa/helper/LCPcalc.h | 8 ++------ .../Helper/src/sofa/helper/MatEigen.h | 13 ++----------- .../Helper/src/sofa/helper/Polynomial_LD.cpp | 8 +++----- .../Helper/src/sofa/helper/Polynomial_LD.h | 9 +++------ .../Helper/src/sofa/helper/Polynomial_LD.inl | 7 ++----- .../Helper/src/sofa/helper/SortedPermutation.h | 8 ++------ .../Helper/src/sofa/helper/StringUtils.cpp | 8 +++----- .../Helper/src/sofa/helper/TypeInfo.h | 8 ++------ .../framework/Helper/src/sofa/helper/Utils.cpp | 9 ++++----- Sofa/framework/Helper/src/sofa/helper/Utils.h | 8 +++----- .../Helper/src/sofa/helper/decompose.cpp | 8 +++----- .../Helper/src/sofa/helper/decompose.h | 8 ++------ .../Helper/src/sofa/helper/decompose.inl | 7 ++----- Sofa/framework/Helper/src/sofa/helper/init.cpp | 8 +++----- Sofa/framework/Helper/src/sofa/helper/init.h | 7 ++----- .../Helper/src/sofa/helper/integer_id.h | 7 ++----- .../Helper/src/sofa/helper/io/BaseFileAccess.h | 12 ++---------- .../Helper/src/sofa/helper/io/Image.cpp | 8 +++----- .../Helper/src/sofa/helper/io/Image.h | 14 +++----------- .../Helper/src/sofa/helper/io/ImageDDS.cpp | 13 +++++-------- .../Helper/src/sofa/helper/io/ImageDDS.h | 13 ++----------- .../Helper/src/sofa/helper/io/ImageRAW.cpp | 13 ++++--------- .../Helper/src/sofa/helper/io/ImageRAW.h | 13 ++----------- .../Helper/src/sofa/helper/io/Mesh.cpp | 8 +++----- .../framework/Helper/src/sofa/helper/io/Mesh.h | 12 ++---------- .../Helper/src/sofa/helper/io/MeshGmsh.cpp | 13 ++++--------- .../Helper/src/sofa/helper/io/MeshGmsh.h | 12 ++---------- .../Helper/src/sofa/helper/io/MeshOBJ.cpp | 13 ++++--------- .../Helper/src/sofa/helper/io/MeshOBJ.h | 12 ++---------- .../src/sofa/helper/io/MeshTopologyLoader.cpp | 13 ++++--------- .../src/sofa/helper/io/MeshTopologyLoader.h | 12 ++---------- .../Helper/src/sofa/helper/io/SphereLoader.cpp | 13 ++++--------- .../Helper/src/sofa/helper/io/SphereLoader.h | 12 ++---------- .../src/sofa/helper/io/TriangleLoader.cpp | 13 ++++--------- .../Helper/src/sofa/helper/io/TriangleLoader.h | 12 ++---------- .../Helper/src/sofa/helper/io/XspLoader.cpp | 13 ++++--------- .../Helper/src/sofa/helper/io/XspLoader.h | 13 ++----------- .../helper/logging/CountingMessageHandler.cpp | 14 +++----------- .../helper/logging/CountingMessageHandler.h | 11 +++-------- .../sofa/helper/logging/FileMessageHandler.cpp | 12 ++---------- .../sofa/helper/logging/FileMessageHandler.h | 12 ++---------- .../helper/logging/LoggingMessageHandler.cpp | 15 +++------------ .../helper/logging/LoggingMessageHandler.h | 13 ++++--------- .../Helper/src/sofa/helper/logging/Message.cpp | 12 ++---------- .../Helper/src/sofa/helper/logging/Message.h | 12 ++---------- .../sofa/helper/logging/MessageDispatcher.cpp | 12 ++---------- .../sofa/helper/logging/MessageDispatcher.h | 11 +++-------- .../sofa/helper/logging/MessageFormatter.cpp | 13 ++++--------- .../src/sofa/helper/logging/MessageFormatter.h | 12 ++---------- .../src/sofa/helper/logging/MessageHandler.h | 11 ++--------- .../helper/logging/RoutingMessageHandler.cpp | 15 +++------------ .../helper/logging/RoutingMessageHandler.h | 11 +++-------- .../helper/logging/SilentMessageHandler.cpp | 13 ++----------- .../sofa/helper/logging/SilentMessageHandler.h | 11 ++--------- .../src/sofa/helper/messaging/FileMessage.cpp | 11 ++--------- .../src/sofa/helper/messaging/FileMessage.h | 11 ++--------- Sofa/framework/Helper/src/sofa/helper/random.h | 7 ++----- Sofa/framework/Helper/src/sofa/helper/rmath.h | 7 ++----- .../sofa/helper/system/FileMonitor_windows.cpp | 11 ++--------- .../src/sofa/helper/system/FileRepository.cpp | 13 ++++--------- .../src/sofa/helper/system/FileRepository.h | 12 ++---------- .../Helper/src/sofa/helper/system/FileSystem.h | 12 ++++-------- .../Helper/src/sofa/helper/system/Locale.h | 11 +++-------- .../src/sofa/helper/system/SetDirectory.cpp | 13 ++++--------- .../src/sofa/helper/system/SetDirectory.h | 12 ++---------- .../src/sofa/helper/system/thread/CTime.cpp | 18 +++++------------- .../src/sofa/helper/system/thread/CTime.h | 17 ++--------------- .../helper/system/thread/CircularQueue.cpp | 15 ++------------- .../sofa/helper/system/thread/CircularQueue.h | 17 ++--------------- .../helper/system/thread/CircularQueue.inl | 18 +++++------------- .../src/sofa/helper/system/thread/debug.cpp | 18 +++++------------- .../src/sofa/helper/system/thread/debug.h | 17 ++--------------- .../helper/system/thread/thread_specific_ptr.h | 17 ++--------------- .../test/system/TestPluginA/ComponentA.cpp | 9 +++------ .../test/system/TestPluginA/ComponentA.h | 8 ++------ .../test/system/TestPluginA/ComponentB.cpp | 8 ++------ .../test/system/TestPluginA/ComponentB.h | 8 ++------ .../src/sofa/simulation/AnimateBeginEvent.cpp | 8 +++----- .../src/sofa/simulation/AnimateBeginEvent.h | 7 ++----- .../src/sofa/simulation/AnimateEndEvent.cpp | 8 +++----- .../Core/src/sofa/simulation/AnimateEndEvent.h | 7 ++----- .../sofa/simulation/BaseSimulationExporter.cpp | 13 ++----------- .../sofa/simulation/BaseSimulationExporter.h | 10 +++------- .../BehaviorUpdatePositionVisitor.cpp | 8 +++----- .../simulation/BehaviorUpdatePositionVisitor.h | 7 ++----- .../src/sofa/simulation/CactusStackStorage.cpp | 8 +++----- .../src/sofa/simulation/CactusStackStorage.h | 8 ++------ .../src/sofa/simulation/CleanupVisitor.cpp | 8 +++----- .../Core/src/sofa/simulation/CleanupVisitor.h | 7 ++----- .../sofa/simulation/CollisionAnimationLoop.h | 7 ++----- .../sofa/simulation/CollisionBeginEvent.cpp | 8 +++----- .../src/sofa/simulation/CollisionBeginEvent.h | 7 ++----- .../src/sofa/simulation/CollisionEndEvent.cpp | 8 +++----- .../src/sofa/simulation/CollisionEndEvent.h | 7 ++----- .../src/sofa/simulation/CollisionVisitor.cpp | 7 ++----- .../src/sofa/simulation/CollisionVisitor.h | 9 ++------- .../sofa/simulation/DeactivatedNodeVisitor.cpp | 8 +++----- .../sofa/simulation/DeactivatedNodeVisitor.h | 8 ++------ .../Core/src/sofa/simulation/DeleteVisitor.cpp | 8 +++----- .../Core/src/sofa/simulation/DeleteVisitor.h | 7 ++----- .../sofa/simulation/ExportGnuplotVisitor.cpp | 8 +++----- .../src/sofa/simulation/ExportGnuplotVisitor.h | 8 ++------ .../simulation/ExportVisualModelOBJVisitor.cpp | 8 +++----- .../simulation/ExportVisualModelOBJVisitor.h | 8 +++----- .../Core/src/sofa/simulation/InitVisitor.cpp | 7 ++----- .../Core/src/sofa/simulation/InitVisitor.h | 7 ++----- .../sofa/simulation/IntegrateBeginEvent.cpp | 8 +++----- .../src/sofa/simulation/IntegrateBeginEvent.h | 7 ++----- .../src/sofa/simulation/IntegrateEndEvent.cpp | 8 +++----- .../src/sofa/simulation/IntegrateEndEvent.h | 7 ++----- .../Core/src/sofa/simulation/LocalStorage.h | 7 ++----- .../simulation/MechanicalVPrintVisitor.cpp | 9 ++++----- .../sofa/simulation/MechanicalVPrintVisitor.h | 8 ++------ .../src/sofa/simulation/MutationListener.cpp | 8 +++----- .../src/sofa/simulation/MutationListener.h | 7 ++----- .../simulation/ParallelVisitorScheduler.cpp | 8 +++----- .../sofa/simulation/ParallelVisitorScheduler.h | 7 ++----- .../Core/src/sofa/simulation/PauseEvent.cpp | 8 +++----- .../Core/src/sofa/simulation/PauseEvent.h | 7 ++----- .../Core/src/sofa/simulation/PipelineImpl.h | 7 ++----- .../Core/src/sofa/simulation/PositionEvent.cpp | 8 +++----- .../Core/src/sofa/simulation/PositionEvent.h | 7 ++----- .../Core/src/sofa/simulation/PrintVisitor.cpp | 8 +++----- .../Core/src/sofa/simulation/PrintVisitor.h | 8 ++------ .../Core/src/sofa/simulation/ResetVisitor.cpp | 8 +++----- .../Core/src/sofa/simulation/ResetVisitor.h | 7 ++----- .../src/sofa/simulation/SceneLoaderFactory.cpp | 8 +++----- .../src/sofa/simulation/SceneLoaderFactory.h | 8 ++------ .../src/sofa/simulation/StateChangeVisitor.cpp | 8 +++----- .../src/sofa/simulation/StateChangeVisitor.h | 7 ++----- .../sofa/simulation/TopologyChangeVisitor.cpp | 8 +++----- .../sofa/simulation/TopologyChangeVisitor.h | 7 ++----- .../sofa/simulation/UpdateContextVisitor.cpp | 8 +++----- .../src/sofa/simulation/UpdateContextVisitor.h | 11 +++++------ .../simulation/UpdateInternalDataVisitor.cpp | 8 +++----- .../simulation/UpdateInternalDataVisitor.h | 7 ++----- .../src/sofa/simulation/UpdateLinksVisitor.cpp | 8 +++----- .../src/sofa/simulation/UpdateLinksVisitor.h | 7 ++----- .../sofa/simulation/UpdateMappingEndEvent.cpp | 8 +++----- .../sofa/simulation/UpdateMappingEndEvent.h | 7 ++----- .../sofa/simulation/UpdateMappingVisitor.cpp | 8 +++----- .../src/sofa/simulation/UpdateMappingVisitor.h | 7 ++----- .../simulation/VelocityThresholdVisitor.cpp | 8 +++----- .../sofa/simulation/VelocityThresholdVisitor.h | 7 ++----- .../src/sofa/simulation/VisitorScheduler.cpp | 8 +++----- .../src/sofa/simulation/VisitorScheduler.h | 7 ++----- .../Core/src/sofa/simulation/VisualVisitor.cpp | 8 +++----- .../Core/src/sofa/simulation/VisualVisitor.h | 8 ++------ .../src/sofa/simulation/WriteStateVisitor.cpp | 9 ++++----- .../src/sofa/simulation/WriteStateVisitor.h | 8 +++----- .../src/sofa/simulation/XMLPrintVisitor.cpp | 8 +++----- .../Core/src/sofa/simulation/XMLPrintVisitor.h | 8 ++------ .../events/SimulationInitDoneEvent.cpp | 8 +++----- .../events/SimulationInitDoneEvent.h | 8 +++----- .../events/SimulationInitStartEvent.cpp | 8 +++----- .../events/SimulationInitStartEvent.h | 8 +++----- .../simulation/events/SimulationStartEvent.cpp | 8 +++----- .../simulation/events/SimulationStartEvent.h | 8 +++----- .../simulation/events/SimulationStopEvent.cpp | 8 +++----- .../simulation/events/SimulationStopEvent.h | 8 +++----- .../Core/src/sofa/simulation/init.cpp | 13 ++++--------- .../Simulation/Core/src/sofa/simulation/init.h | 12 ++---------- .../CImgPlugin/src/CImgPlugin/ImageCImg.cpp | 14 ++++---------- .../CImgPlugin/src/CImgPlugin/ImageCImg.h | 12 ++---------- .../ManualMapping/ManualLinearMapping.cpp | 12 ++---------- .../ManualMapping/ManualLinearMapping.h | 12 ++---------- .../ManualMapping/ManualLinearMapping.inl | 13 ++----------- .../ManualMapping/initManualMapping.cpp | 7 ++----- .../SceneCreator/GetAssembledSizeVisitor.cpp | 8 +++----- .../src/SceneCreator/GetAssembledSizeVisitor.h | 9 ++++----- .../src/SceneCreator/GetVectorVisitor.cpp | 9 ++++----- .../src/SceneCreator/GetVectorVisitor.h | 9 +++------ .../src/SceneCreator/SceneCreator.cpp | 10 +++------- .../src/SceneCreator/SceneCreator.h | 9 +++------ .../src/SceneCreator/SceneUtils.cpp | 7 +++---- .../SceneCreator/src/SceneCreator/SceneUtils.h | 10 ++++------ .../SofaCUDA/sofa/gpu/cuda/CudaBaseVector.cpp | 13 ++++--------- .../SofaCUDA/sofa/gpu/cuda/CudaBaseVector.h | 12 +++--------- .../gpu/cuda/CudaHexahedronTLEDForceField.cpp | 13 ++++--------- .../gpu/cuda/CudaHexahedronTLEDForceField.h | 12 ++---------- .../SofaCUDA/sofa/gpu/cuda/CudaMatrix.h | 13 ++----------- .../sofa/gpu/cuda/CudaParticleSource.cpp | 15 +++++---------- .../sofa/gpu/cuda/CudaParticleSource.inl | 15 ++++----------- .../cuda/CudaParticlesRepulsionForceField.cpp | 13 ++++--------- .../cuda/CudaParticlesRepulsionForceField.h | 15 ++++----------- .../cuda/CudaParticlesRepulsionForceField.inl | 15 ++++----------- .../sofa/gpu/cuda/CudaSPHFluidForceField.cpp | 13 ++++--------- .../sofa/gpu/cuda/CudaSPHFluidForceField.h | 15 ++++----------- .../sofa/gpu/cuda/CudaSPHFluidForceField.inl | 15 ++++----------- .../plugins/SofaCUDA/sofa/gpu/cuda/CudaScan.h | 13 +++++-------- .../plugins/SofaCUDA/sofa/gpu/cuda/CudaSort.h | 13 +++++-------- .../sofa/gpu/cuda/CudaSpatialGridContainer.cpp | 13 ++++--------- .../sofa/gpu/cuda/CudaSpatialGridContainer.h | 12 ++---------- .../sofa/gpu/cuda/CudaSpatialGridContainer.inl | 15 ++++----------- .../gpu/cuda/CudaTetrahedronTLEDForceField.cpp | 13 ++++--------- .../gpu/cuda/CudaTetrahedronTLEDForceField.h | 12 ++---------- .../plugins/SofaCUDA/sofa/gpu/cuda/CudaTypes.h | 14 ++++---------- .../SofaCUDA/sofa/gpu/cuda/CudaVisualModel.cpp | 13 ++++--------- .../SofaCUDA/sofa/gpu/cuda/CudaVisualModel.h | 16 ++++------------ .../SofaCUDA/sofa/gpu/cuda/CudaVisualModel.inl | 15 ++++----------- .../plugins/SofaCUDA/sofa/gpu/cuda/mycuda.cpp | 13 +++++-------- .../linear/CudaBarycentricMapping-3f1-f.cpp | 16 ++++------------ .../linear/CudaBarycentricMapping-f.cpp | 15 ++++----------- .../component/mass/CudaDiagonalMass.cpp | 16 ++++------------ .../SofaCUDA/component/mass/CudaDiagonalMass.h | 12 +++--------- .../component/mass/CudaDiagonalMass.inl | 8 ++------ .../component/mass/CudaMeshMatrixMass.cpp | 15 ++++----------- .../component/mass/CudaMeshMatrixMass.h | 12 +++--------- .../component/mass/CudaMeshMatrixMass.inl | 16 ++++++---------- .../component/mass/CudaUniformMass.cpp | 13 ++++--------- .../component/mass/CudaUniformMass.inl | 15 ++++----------- .../CudaStandardTetrahedralFEMForceField.cpp | 8 ++------ .../CudaTetrahedralTensorMassForceField.cpp | 8 ++------ applications/plugins/SofaSimpleGUI/Camera.cpp | 8 ++++---- applications/plugins/SofaSimpleGUI/Camera.h | 6 +++--- .../plugins/SofaSimpleGUI/Interactor.cpp | 7 ++++--- .../plugins/SofaSimpleGUI/Interactor.h | 7 +++---- .../plugins/SofaSimpleGUI/PickedPoint.h | 7 ++++--- applications/plugins/SofaSimpleGUI/SofaGL.h | 7 ++++--- .../plugins/SofaSimpleGUI/SpringInteractor.cpp | 8 ++++---- .../plugins/SofaSimpleGUI/SpringInteractor.h | 7 ++++--- .../SofaSimpleGUI/VisualPickVisitor.cpp | 6 ++---- .../plugins/SofaSimpleGUI/VisualPickVisitor.h | 7 +++---- .../plugins/SofaSimpleGUI/initSimpleGUI.cpp | 6 ++---- .../src/SofaSphFluid/OglFluidModel.cpp | 11 ++++------- .../src/SofaSphFluid/OglFluidModel.h | 11 ++++------- .../src/SofaSphFluid/OglFluidModel.inl | 11 ++++------- .../src/SofaSphFluid/ParticleSink.cpp | 11 +++-------- .../src/SofaSphFluid/ParticleSink.h | 13 ++----------- .../src/SofaSphFluid/ParticleSink.inl | 12 ++---------- .../src/SofaSphFluid/ParticleSource.cpp | 11 +++-------- .../src/SofaSphFluid/ParticleSource.h | 12 ++---------- .../src/SofaSphFluid/ParticleSource.inl | 12 ++---------- .../ParticlesRepulsionForceField.cpp | 13 +++---------- .../ParticlesRepulsionForceField.h | 13 ++----------- .../ParticlesRepulsionForceField.inl | 15 ++------------- .../src/SofaSphFluid/SPHFluidForceField.cpp | 13 +++---------- .../src/SofaSphFluid/SPHFluidForceField.h | 13 ++----------- .../src/SofaSphFluid/SPHFluidForceField.inl | 12 ++---------- .../SofaSphFluid/SPHFluidSurfaceMapping.cpp | 12 ++---------- .../src/SofaSphFluid/SPHFluidSurfaceMapping.h | 12 ++---------- .../SofaSphFluid/SPHFluidSurfaceMapping.inl | 13 ++----------- .../SofaSphFluid/src/SofaSphFluid/SPHKernel.h | 13 ++----------- .../src/SofaSphFluid/SpatialGridContainer.cpp | 14 ++++---------- .../src/SofaSphFluid/SpatialGridContainer.h | 12 ++---------- .../src/SofaSphFluid/SpatialGridContainer.inl | 12 ++---------- .../src/SofaSphFluid/SpatialGridPointModel.cpp | 13 ++++--------- .../src/SofaSphFluid/SpatialGridPointModel.h | 12 ++---------- .../src/SofaSphFluid/initSPHFluid.cpp | 8 +++----- .../CUDA/CudaTetrahedralVisualModel.cpp | 11 ++++------- .../CUDA/CudaTetrahedralVisualModel.h | 11 ++++------- .../CUDA/CudaTetrahedralVisualModel.inl | 10 +++------- .../VolumetricRendering/OglTetrahedralModel.h | 13 +++---------- .../OglTetrahedralModel.inl | 13 +++---------- .../VolumetricRendering/OglVolumetricModel.h | 12 ++---------- 288 files changed, 827 insertions(+), 2162 deletions(-) diff --git a/Sofa/framework/Core/src/sofa/core/ConstraintParams.cpp b/Sofa/framework/Core/src/sofa/core/ConstraintParams.cpp index c88cc51d8f5..d80975db736 100644 --- a/Sofa/framework/Core/src/sofa/core/ConstraintParams.cpp +++ b/Sofa/framework/Core/src/sofa/core/ConstraintParams.cpp @@ -25,10 +25,8 @@ #include #include -namespace sofa -{ -namespace core +namespace sofa::core { ConstraintParams::ConstraintParams(const sofa::core::ExecParams& p) @@ -62,6 +60,6 @@ const ConstraintParams* ConstraintParams::defaultInstance() return ptr; } -} // namespace core +} // namespace sofa::core + -} // namespace sofa diff --git a/Sofa/framework/Core/src/sofa/core/DevBaseMonitor.h b/Sofa/framework/Core/src/sofa/core/DevBaseMonitor.h index 38d46596c75..e5981d58c7a 100644 --- a/Sofa/framework/Core/src/sofa/core/DevBaseMonitor.h +++ b/Sofa/framework/Core/src/sofa/core/DevBaseMonitor.h @@ -25,10 +25,8 @@ #include -namespace sofa -{ -namespace core +namespace sofa::core { /** @@ -49,7 +47,7 @@ class DevBaseMonitor : public virtual objectmodel::BaseObject virtual void eval() = 0; }; -} // namespace core -} // namespace sofa +} // namespace sofa::core + #endif //SOFA_CORE_DEVBASEMONITOR_H diff --git a/Sofa/framework/Core/src/sofa/core/ExecParams.cpp b/Sofa/framework/Core/src/sofa/core/ExecParams.cpp index deb0aee90a4..9cf7e87c4b5 100644 --- a/Sofa/framework/Core/src/sofa/core/ExecParams.cpp +++ b/Sofa/framework/Core/src/sofa/core/ExecParams.cpp @@ -22,10 +22,8 @@ #include #include -namespace sofa -{ -namespace core +namespace sofa::core { std::atomic ExecParams::g_nbThreads(0); @@ -74,6 +72,6 @@ void ExecParams::update() storage = threadStorage(); } -} // namespace core +} // namespace sofa::core + -} // namespace sofa diff --git a/Sofa/framework/Core/src/sofa/core/MechanicalParams.cpp b/Sofa/framework/Core/src/sofa/core/MechanicalParams.cpp index 270a9e1925d..ed0911ad005 100644 --- a/Sofa/framework/Core/src/sofa/core/MechanicalParams.cpp +++ b/Sofa/framework/Core/src/sofa/core/MechanicalParams.cpp @@ -25,10 +25,8 @@ #include #include -namespace sofa -{ -namespace core +namespace sofa::core { MechanicalParams::MechanicalParams(const sofa::core::ExecParams& p) @@ -107,6 +105,6 @@ const MechanicalParams* MechanicalParams::defaultInstance() return ptr; } -} // namespace core +} // namespace sofa::core + -} // namespace sofa diff --git a/Sofa/framework/Core/src/sofa/core/behavior/OdeSolver.cpp b/Sofa/framework/Core/src/sofa/core/behavior/OdeSolver.cpp index 27b57c6cf7c..088e953119c 100644 --- a/Sofa/framework/Core/src/sofa/core/behavior/OdeSolver.cpp +++ b/Sofa/framework/Core/src/sofa/core/behavior/OdeSolver.cpp @@ -24,13 +24,8 @@ #include #include -namespace sofa -{ - -namespace core -{ -namespace behavior +namespace sofa::core::behavior { OdeSolver::OdeSolver() @@ -61,9 +56,9 @@ bool OdeSolver::removeInNode( objectmodel::BaseNode* node ) } -} // namespace behavior +} // namespace sofa::core::behavior + + -} // namespace core -} // namespace sofa diff --git a/Sofa/framework/Core/src/sofa/core/behavior/RotationFinder.h b/Sofa/framework/Core/src/sofa/core/behavior/RotationFinder.h index 690731b25ec..3a3db40d205 100644 --- a/Sofa/framework/Core/src/sofa/core/behavior/RotationFinder.h +++ b/Sofa/framework/Core/src/sofa/core/behavior/RotationFinder.h @@ -26,13 +26,7 @@ #include -namespace sofa -{ - -namespace core -{ - -namespace behavior +namespace sofa::core::behavior { template @@ -50,10 +44,7 @@ class RotationFinder : public BaseRotationFinder virtual const type::vector< Mat3x3 >& getRotations() = 0; }; -} // namespace behavior - -} // namespace core +} // namespace sofa::core::behavior -} // namespace sofa #endif // SOFA_CORE_BEHAVIOR_ROTATIONFINDER_H diff --git a/Sofa/framework/Core/src/sofa/core/collision/Contact.cpp b/Sofa/framework/Core/src/sofa/core/collision/Contact.cpp index 2bb5823a75f..ec918e6aded 100644 --- a/Sofa/framework/Core/src/sofa/core/collision/Contact.cpp +++ b/Sofa/framework/Core/src/sofa/core/collision/Contact.cpp @@ -23,13 +23,8 @@ #include #include -namespace sofa -{ - -namespace core -{ -namespace collision +namespace sofa::core::collision { using namespace sofa::defaulttype; @@ -86,9 +81,9 @@ Contact::SPtr Contact::Create(const std::string& type, core::CollisionModel* mod } } -} // namespace collision +} // namespace sofa::core::collision + + -} // namespace core -} // namespace sofa diff --git a/Sofa/framework/Core/src/sofa/core/loader/MeshLoader.cpp b/Sofa/framework/Core/src/sofa/core/loader/MeshLoader.cpp index c7bfc3f1f6c..535a8f2bfbf 100644 --- a/Sofa/framework/Core/src/sofa/core/loader/MeshLoader.cpp +++ b/Sofa/framework/Core/src/sofa/core/loader/MeshLoader.cpp @@ -27,13 +27,8 @@ #include -namespace sofa -{ - -namespace core -{ -namespace loader +namespace sofa::core::loader { using namespace sofa::defaulttype; @@ -930,9 +925,9 @@ void MeshLoader::copyMeshToData(sofa::helper::io::Mesh& _mesh) d_highOrderQuadPositions.setValue(_mesh.getHighOrderQuadPositions()); } -} // namespace loader +} // namespace sofa::core::loader + + -} // namespace core -} // namespace sofa diff --git a/Sofa/framework/Core/src/sofa/core/loader/SceneLoader.cpp b/Sofa/framework/Core/src/sofa/core/loader/SceneLoader.cpp index d28aac98fa0..e9019fd67ef 100644 --- a/Sofa/framework/Core/src/sofa/core/loader/SceneLoader.cpp +++ b/Sofa/framework/Core/src/sofa/core/loader/SceneLoader.cpp @@ -21,13 +21,8 @@ ******************************************************************************/ #include -namespace sofa -{ - -namespace core -{ -namespace loader +namespace sofa::core::loader { using namespace sofa::defaulttype; @@ -57,9 +52,9 @@ bool SceneLoader::canLoad() return BaseLoader::canLoad(); } -} // namespace loader +} // namespace sofa::core::loader + + -} // namespace core -} // namespace sofa diff --git a/Sofa/framework/Core/src/sofa/core/loader/VoxelLoader.cpp b/Sofa/framework/Core/src/sofa/core/loader/VoxelLoader.cpp index 5179190e00c..74696919ec5 100644 --- a/Sofa/framework/Core/src/sofa/core/loader/VoxelLoader.cpp +++ b/Sofa/framework/Core/src/sofa/core/loader/VoxelLoader.cpp @@ -30,13 +30,8 @@ #include #include -namespace sofa -{ - -namespace core -{ -namespace loader +namespace sofa::core::loader { using namespace sofa::defaulttype; @@ -67,9 +62,9 @@ void VoxelLoader::addHexahedron(type::vector< type::fixed_array pHexahedra->push_back(p); } -} // namespace loader +} // namespace sofa::core::loader + + -} // namespace core -} // namespace sofa diff --git a/Sofa/framework/Core/src/sofa/core/objectmodel/AspectPool.cpp b/Sofa/framework/Core/src/sofa/core/objectmodel/AspectPool.cpp index ad313e4e4da..a973c544b7b 100644 --- a/Sofa/framework/Core/src/sofa/core/objectmodel/AspectPool.cpp +++ b/Sofa/framework/Core/src/sofa/core/objectmodel/AspectPool.cpp @@ -24,13 +24,8 @@ #include #include -namespace sofa -{ - -namespace core -{ -namespace objectmodel +namespace sofa::core::objectmodel { /** @@ -225,8 +220,8 @@ bool AspectBuffer::pop(AspectRef& id) return true; } -} // namespace objectmodel +} // namespace sofa::core::objectmodel + + -} // namespace core -} // namespace sofa diff --git a/Sofa/framework/Core/src/sofa/core/objectmodel/BaseClass.cpp b/Sofa/framework/Core/src/sofa/core/objectmodel/BaseClass.cpp index aa4b374e0b3..e05f2d9b5c4 100644 --- a/Sofa/framework/Core/src/sofa/core/objectmodel/BaseClass.cpp +++ b/Sofa/framework/Core/src/sofa/core/objectmodel/BaseClass.cpp @@ -21,13 +21,8 @@ ******************************************************************************/ #include -namespace sofa -{ - -namespace core -{ -namespace objectmodel +namespace sofa::core::objectmodel { BaseClass* DeprecatedBaseClass::GetSingleton() @@ -54,9 +49,9 @@ DeprecatedBaseClass::DeprecatedBaseClass() } -} // namespace objectmodel +} // namespace sofa::core::objectmodel + + -} // namespace core -} // namespace sofa diff --git a/Sofa/framework/Core/src/sofa/core/objectmodel/BaseNode.cpp b/Sofa/framework/Core/src/sofa/core/objectmodel/BaseNode.cpp index 48885e9f3af..91d4001ec10 100644 --- a/Sofa/framework/Core/src/sofa/core/objectmodel/BaseNode.cpp +++ b/Sofa/framework/Core/src/sofa/core/objectmodel/BaseNode.cpp @@ -26,13 +26,8 @@ #include #include -namespace sofa -{ - -namespace core -{ -namespace objectmodel +namespace sofa::core::objectmodel { BaseNode::BaseNode() @@ -121,8 +116,8 @@ std::string BaseNode::getRootPath() const { return str; } -} // namespace objectmodel +} // namespace sofa::core::objectmodel + + -} // namespace core -} // namespace sofa diff --git a/Sofa/framework/Core/src/sofa/core/objectmodel/BaseObject.cpp b/Sofa/framework/Core/src/sofa/core/objectmodel/BaseObject.cpp index d0a54694808..c0d94dff970 100644 --- a/Sofa/framework/Core/src/sofa/core/objectmodel/BaseObject.cpp +++ b/Sofa/framework/Core/src/sofa/core/objectmodel/BaseObject.cpp @@ -29,13 +29,7 @@ #include -namespace sofa -{ - -namespace core -{ - -namespace objectmodel +namespace sofa::core::objectmodel { BaseObject::BaseObject() @@ -373,9 +367,9 @@ std::string BaseObject::getPathName() const { return result; } -} // namespace objectmodel +} // namespace sofa::core::objectmodel + + -} // namespace core -} // namespace sofa diff --git a/Sofa/framework/Core/src/sofa/core/objectmodel/ClassInfo.cpp b/Sofa/framework/Core/src/sofa/core/objectmodel/ClassInfo.cpp index 1c7459b6bb4..d234fbdda42 100644 --- a/Sofa/framework/Core/src/sofa/core/objectmodel/ClassInfo.cpp +++ b/Sofa/framework/Core/src/sofa/core/objectmodel/ClassInfo.cpp @@ -21,13 +21,8 @@ ******************************************************************************/ #include -namespace sofa -{ - -namespace core -{ -namespace objectmodel +namespace sofa::core::objectmodel { std::map ClassInfo::classes; @@ -43,9 +38,9 @@ ClassInfo::~ClassInfo() } -} // namespace objectmodel +} // namespace sofa::core::objectmodel + + -} // namespace core -} // namespace sofa diff --git a/Sofa/framework/Core/src/sofa/core/objectmodel/ComponentState.cpp b/Sofa/framework/Core/src/sofa/core/objectmodel/ComponentState.cpp index 6a0277b9b21..6b96a6765a2 100644 --- a/Sofa/framework/Core/src/sofa/core/objectmodel/ComponentState.cpp +++ b/Sofa/framework/Core/src/sofa/core/objectmodel/ComponentState.cpp @@ -24,11 +24,8 @@ #include #include -namespace sofa -{ -namespace core -{ -namespace objectmodel + +namespace sofa::core::objectmodel { @@ -63,8 +60,5 @@ std::istream& operator>>(std::istream& i, ComponentState& s) return i; } -} /// namespace objectmodel -} /// namespace core -} /// namespace sofa - +} diff --git a/Sofa/framework/Core/src/sofa/core/objectmodel/ConfigurationSetting.cpp b/Sofa/framework/Core/src/sofa/core/objectmodel/ConfigurationSetting.cpp index f39f2bdabfe..0a154cef6c6 100644 --- a/Sofa/framework/Core/src/sofa/core/objectmodel/ConfigurationSetting.cpp +++ b/Sofa/framework/Core/src/sofa/core/objectmodel/ConfigurationSetting.cpp @@ -23,13 +23,8 @@ #include #include -namespace sofa -{ - -namespace core -{ -namespace objectmodel +namespace sofa::core::objectmodel { ConfigurationSetting::ConfigurationSetting() @@ -70,8 +65,8 @@ bool ConfigurationSetting::removeInNode( objectmodel::BaseNode* node ) } -} // namespace objectmodel +} // namespace sofa::core::objectmodel + + -} // namespace core -} // namespace sofa diff --git a/Sofa/framework/Core/src/sofa/core/objectmodel/Data.cpp b/Sofa/framework/Core/src/sofa/core/objectmodel/Data.cpp index 32de378a748..cde0424eefa 100644 --- a/Sofa/framework/Core/src/sofa/core/objectmodel/Data.cpp +++ b/Sofa/framework/Core/src/sofa/core/objectmodel/Data.cpp @@ -23,13 +23,8 @@ #include -namespace sofa -{ - -namespace core -{ -namespace objectmodel +namespace sofa::core::objectmodel { /// Specialization for reading strings @@ -64,10 +59,6 @@ template class SOFA_CORE_API Data< sofa::type::vector >; template class SOFA_CORE_API Data< bool >; template class SOFA_CORE_API Data< sofa::type::vector >; -} // objectmodel - -} // core - -} // sofa +} diff --git a/Sofa/framework/Core/src/sofa/core/objectmodel/DetachNodeEvent.cpp b/Sofa/framework/Core/src/sofa/core/objectmodel/DetachNodeEvent.cpp index 4cdfe3f9aae..a69cdb05310 100644 --- a/Sofa/framework/Core/src/sofa/core/objectmodel/DetachNodeEvent.cpp +++ b/Sofa/framework/Core/src/sofa/core/objectmodel/DetachNodeEvent.cpp @@ -21,13 +21,8 @@ ******************************************************************************/ #include -namespace sofa -{ - -namespace core -{ -namespace objectmodel +namespace sofa::core::objectmodel { SOFA_EVENT_CPP( DetachNodeEvent ) @@ -60,8 +55,8 @@ bool DetachNodeEvent::contains(BaseObject* o) const return contains(o->getContext()->toBaseNode()); } -} // namespace objectmodel +} // namespace sofa::core::objectmodel + + -} // namespace core -} // namespace sofa diff --git a/Sofa/framework/DefaultType/src/sofa/defaulttype/MapMapSparseMatrix.h b/Sofa/framework/DefaultType/src/sofa/defaulttype/MapMapSparseMatrix.h index 30911490e5e..e60eedc48cc 100644 --- a/Sofa/framework/DefaultType/src/sofa/defaulttype/MapMapSparseMatrix.h +++ b/Sofa/framework/DefaultType/src/sofa/defaulttype/MapMapSparseMatrix.h @@ -25,10 +25,8 @@ #include #include -namespace sofa -{ -namespace defaulttype +namespace sofa::defaulttype { template @@ -736,9 +734,7 @@ class MapMapSparseMatrix }; +} // namespace sofa::defaulttype -} // namespace defaulttype - -} // namespace sofa #endif // SOFA_DEFAULTTYPE_MAPMAPSPARSEMATRIX_H diff --git a/Sofa/framework/DefaultType/src/sofa/defaulttype/RigidVec6Types.h b/Sofa/framework/DefaultType/src/sofa/defaulttype/RigidVec6Types.h index 3e283c93258..96a825d1f84 100644 --- a/Sofa/framework/DefaultType/src/sofa/defaulttype/RigidVec6Types.h +++ b/Sofa/framework/DefaultType/src/sofa/defaulttype/RigidVec6Types.h @@ -25,10 +25,8 @@ #include #include -namespace sofa -{ -namespace defaulttype +namespace sofa::defaulttype { template @@ -38,8 +36,7 @@ template const Vec<3, T> getVOrientation(const Vec<6, T>& v) { return Vec<3,T>(v.data()+3); } -}// namespace defaulttype +} // namespace sofa::defaulttype -}// namespace sofa #endif diff --git a/Sofa/framework/DefaultType/src/sofa/defaulttype/SolidTypes.cpp b/Sofa/framework/DefaultType/src/sofa/defaulttype/SolidTypes.cpp index e6531cdaf2c..07e4b4e0147 100644 --- a/Sofa/framework/DefaultType/src/sofa/defaulttype/SolidTypes.cpp +++ b/Sofa/framework/DefaultType/src/sofa/defaulttype/SolidTypes.cpp @@ -22,17 +22,12 @@ #define SOFA_DEFAULTTYPE_SOLIDTYPES_CPP #include -namespace sofa -{ -namespace defaulttype +namespace sofa::defaulttype { template class SOFA_DEFAULTTYPE_API SolidTypes; template class SOFA_DEFAULTTYPE_API SolidTypes; -}// defaulttype - -}// sofa - +} diff --git a/Sofa/framework/DefaultType/src/sofa/defaulttype/SolidTypes.h b/Sofa/framework/DefaultType/src/sofa/defaulttype/SolidTypes.h index e53e4f681ab..e726ad5225c 100644 --- a/Sofa/framework/DefaultType/src/sofa/defaulttype/SolidTypes.h +++ b/Sofa/framework/DefaultType/src/sofa/defaulttype/SolidTypes.h @@ -32,10 +32,8 @@ #include #include -namespace sofa -{ -namespace defaulttype +namespace sofa::defaulttype { /** @@ -417,11 +415,7 @@ extern template class SOFA_DEFAULTTYPE_API SolidTypes; #endif -}// defaulttype - -}// sofa - - +} #endif diff --git a/Sofa/framework/DefaultType/src/sofa/defaulttype/SolidTypes.inl b/Sofa/framework/DefaultType/src/sofa/defaulttype/SolidTypes.inl index 959fcc90d45..d24b55715df 100644 --- a/Sofa/framework/DefaultType/src/sofa/defaulttype/SolidTypes.inl +++ b/Sofa/framework/DefaultType/src/sofa/defaulttype/SolidTypes.inl @@ -27,10 +27,8 @@ #include #include -namespace sofa -{ -namespace defaulttype +namespace sofa::defaulttype { template @@ -527,9 +525,6 @@ typename SolidTypes::Mat3x3 SolidTypes::dyad( const Vec& u, const Vec& v ) return m; } - -}// defaulttype - -}// sofa +} #endif diff --git a/Sofa/framework/DefaultType/src/sofa/defaulttype/TemplatesAliases.h b/Sofa/framework/DefaultType/src/sofa/defaulttype/TemplatesAliases.h index 305cf2f9deb..d92befda5a0 100644 --- a/Sofa/framework/DefaultType/src/sofa/defaulttype/TemplatesAliases.h +++ b/Sofa/framework/DefaultType/src/sofa/defaulttype/TemplatesAliases.h @@ -24,10 +24,8 @@ #include #include -namespace sofa -{ -namespace defaulttype +namespace sofa::defaulttype { template @@ -79,8 +77,6 @@ class SOFA_DEFAULTTYPE_API RegisterTemplateAlias RegisterTemplateAlias(const std::string& alias, const std::string& result, const bool doWarnUser=false); }; -}// defaulttype - -}// sofa +} #endif // SOFA_HELPER_TEMPLATESALIASES_H diff --git a/Sofa/framework/DefaultType/src/sofa/defaulttype/init.cpp b/Sofa/framework/DefaultType/src/sofa/defaulttype/init.cpp index ff9c1151530..7cb0389a5a2 100644 --- a/Sofa/framework/DefaultType/src/sofa/defaulttype/init.cpp +++ b/Sofa/framework/DefaultType/src/sofa/defaulttype/init.cpp @@ -23,10 +23,8 @@ #include -namespace sofa -{ -namespace defaulttype +namespace sofa::defaulttype { static bool s_initialized = false; @@ -71,6 +69,6 @@ static const struct CleanupCheck } } check; -} // namespace defaulttype +} // namespace sofa::defaulttype + -} // namespace sofa diff --git a/Sofa/framework/DefaultType/src/sofa/defaulttype/init.h b/Sofa/framework/DefaultType/src/sofa/defaulttype/init.h index 6fa8eb13da4..e639554e977 100644 --- a/Sofa/framework/DefaultType/src/sofa/defaulttype/init.h +++ b/Sofa/framework/DefaultType/src/sofa/defaulttype/init.h @@ -24,10 +24,8 @@ #include -namespace sofa -{ -namespace defaulttype +namespace sofa::defaulttype { /// @brief Initialize the SofaDefaultType library, as well as it dependency: @@ -46,8 +44,7 @@ SOFA_DEFAULTTYPE_API void cleanup(); /// up. SOFA_DEFAULTTYPE_API bool isCleanedUp(); -} // namespace defaulttype +} // namespace sofa::defaulttype -} // namespace sofa #endif diff --git a/Sofa/framework/Helper/src/sofa/helper/BackTrace.cpp b/Sofa/framework/Helper/src/sofa/helper/BackTrace.cpp index d3295716b9b..fa865ab2fb7 100644 --- a/Sofa/framework/Helper/src/sofa/helper/BackTrace.cpp +++ b/Sofa/framework/Helper/src/sofa/helper/BackTrace.cpp @@ -41,10 +41,8 @@ #include #include -namespace sofa -{ -namespace helper +namespace sofa::helper { BackTrace::StackTrace BackTrace::getTrace(size_t maxEntries) @@ -199,7 +197,7 @@ void BackTrace::sig(int sig) raise(sig); } -} // namespace helper +} // namespace sofa::helper + -} // namespace sofa diff --git a/Sofa/framework/Helper/src/sofa/helper/BackTrace.h b/Sofa/framework/Helper/src/sofa/helper/BackTrace.h index 6693ae8d501..0870f5d7a36 100644 --- a/Sofa/framework/Helper/src/sofa/helper/BackTrace.h +++ b/Sofa/framework/Helper/src/sofa/helper/BackTrace.h @@ -26,10 +26,8 @@ #include #include -namespace sofa -{ -namespace helper +namespace sofa::helper { class SOFA_HELPER_API BackTrace @@ -53,8 +51,7 @@ class SOFA_HELPER_API BackTrace static void sig(int sig); }; -} // namespace helper +} // namespace sofa::helper -} // namespace sofa #endif diff --git a/Sofa/framework/Helper/src/sofa/helper/ColorMap.cpp b/Sofa/framework/Helper/src/sofa/helper/ColorMap.cpp index 0fc914d5518..192a65a534f 100644 --- a/Sofa/framework/Helper/src/sofa/helper/ColorMap.cpp +++ b/Sofa/framework/Helper/src/sofa/helper/ColorMap.cpp @@ -25,10 +25,8 @@ #include #include -namespace sofa -{ -namespace helper +namespace sofa::helper { //enum { NDefaultColorMapEntries = 64 }; @@ -339,6 +337,4 @@ type::Vec3f ColorMap::hsv2rgb(const type::Vec3f&hsv) } -} // namespace component - -} // namespace sofa +} diff --git a/Sofa/framework/Helper/src/sofa/helper/ColorMap.h b/Sofa/framework/Helper/src/sofa/helper/ColorMap.h index 32c96bdf236..1d5372808fc 100644 --- a/Sofa/framework/Helper/src/sofa/helper/ColorMap.h +++ b/Sofa/framework/Helper/src/sofa/helper/ColorMap.h @@ -32,10 +32,7 @@ //#include -namespace sofa -{ - -namespace helper +namespace sofa::helper { class SOFA_HELPER_API ColorMap @@ -125,9 +122,7 @@ class SOFA_HELPER_API ColorMap }; -} // namespace helper - -} // namespace sofa +} // namespace sofa::helper #endif diff --git a/Sofa/framework/Helper/src/sofa/helper/IndexOpenMP.h b/Sofa/framework/Helper/src/sofa/helper/IndexOpenMP.h index 9f932703aeb..7074a7a151e 100644 --- a/Sofa/framework/Helper/src/sofa/helper/IndexOpenMP.h +++ b/Sofa/framework/Helper/src/sofa/helper/IndexOpenMP.h @@ -22,10 +22,8 @@ #ifndef SOFA_HELPER_INDEX_TYPE_H #define SOFA_HELPER_INDEX_TYPE_H -namespace sofa -{ -namespace helper +namespace sofa::helper { /// From any given index type, this struct gives a OpenMP valid index @@ -41,8 +39,6 @@ struct IndexOpenMP #endif }; // struct IndexOpenMP -} // helper - -} // sofa +} #endif // SOFA_HELPER_INDEX_TYPE_H diff --git a/Sofa/framework/Helper/src/sofa/helper/LCPcalc.cpp b/Sofa/framework/Helper/src/sofa/helper/LCPcalc.cpp index 492e724a9ed..a8e2b0b57b0 100644 --- a/Sofa/framework/Helper/src/sofa/helper/LCPcalc.cpp +++ b/Sofa/framework/Helper/src/sofa/helper/LCPcalc.cpp @@ -30,10 +30,8 @@ #include #include -namespace sofa -{ -namespace helper +namespace sofa::helper { using namespace std; @@ -1940,6 +1938,6 @@ void gaussSeidelLCP1(int dim, FemClipsReal * q, FemClipsReal ** M, FemClipsReal } } -} // namespace helper +} // namespace sofa::helper + -} // namespace sofa diff --git a/Sofa/framework/Helper/src/sofa/helper/LCPcalc.h b/Sofa/framework/Helper/src/sofa/helper/LCPcalc.h index 074458d9854..89fc01c2985 100644 --- a/Sofa/framework/Helper/src/sofa/helper/LCPcalc.h +++ b/Sofa/framework/Helper/src/sofa/helper/LCPcalc.h @@ -30,10 +30,7 @@ #include -namespace sofa -{ - -namespace helper +namespace sofa::helper { #define EPSILON_LCP 0.00000000001 // epsilon pour tests = 0 @@ -157,8 +154,7 @@ SOFA_HELPER_API int nlcp_multiGrid_Nlevels(int dim, SReal *dfree, SReal**W, SRea SOFA_HELPER_API int nlcp_gaussseidel(int dim, SReal*dfree, SReal**W, SReal*f, SReal mu, SReal tol, int numItMax, bool useInitialF, bool verbose = false, SReal minW=0.0, SReal maxF=0.0, std::vector* residuals = nullptr, std::vector* violations = nullptr); // Timed Gauss-Seidel like algorithm for contacts SOFA_HELPER_API int nlcp_gaussseidelTimed(int, SReal*, SReal**, SReal*, SReal, SReal, int, bool, SReal timeout, bool verbose=false); -} // namespace helper +} // namespace sofa::helper -} // namespace sofa #endif diff --git a/Sofa/framework/Helper/src/sofa/helper/MatEigen.h b/Sofa/framework/Helper/src/sofa/helper/MatEigen.h index 3ca222c77fb..9ac6e9d5b9c 100644 --- a/Sofa/framework/Helper/src/sofa/helper/MatEigen.h +++ b/Sofa/framework/Helper/src/sofa/helper/MatEigen.h @@ -29,10 +29,7 @@ #include -namespace sofa -{ - -namespace helper +namespace sofa::helper { template @@ -73,12 +70,6 @@ Eigen::Matrix eigenVec( const type::Vec& vec ) return evec; } - - -} // namespace defaulttype - -} // namespace sofa - -// iostream +} #endif diff --git a/Sofa/framework/Helper/src/sofa/helper/Polynomial_LD.cpp b/Sofa/framework/Helper/src/sofa/helper/Polynomial_LD.cpp index 888959ac033..39d6fcccf2c 100644 --- a/Sofa/framework/Helper/src/sofa/helper/Polynomial_LD.cpp +++ b/Sofa/framework/Helper/src/sofa/helper/Polynomial_LD.cpp @@ -22,10 +22,8 @@ #define SOFA_HELPER_POLYNOMIAL_LD_CPP #include -namespace sofa -{ -namespace helper +namespace sofa::helper { template class SOFA_HELPER_API Monomial_LD; @@ -41,6 +39,6 @@ template class SOFA_HELPER_API Polynomial_LD; template class SOFA_HELPER_API Polynomial_LD; -} // namespace helper +} // namespace sofa::helper + -} // namespace sofa diff --git a/Sofa/framework/Helper/src/sofa/helper/Polynomial_LD.h b/Sofa/framework/Helper/src/sofa/helper/Polynomial_LD.h index 28a1b34da1d..0041dd5c143 100644 --- a/Sofa/framework/Helper/src/sofa/helper/Polynomial_LD.h +++ b/Sofa/framework/Helper/src/sofa/helper/Polynomial_LD.h @@ -35,9 +35,8 @@ #include #include -namespace sofa -{ -namespace helper + +namespace sofa::helper { @@ -253,10 +252,8 @@ extern template class SOFA_HELPER_API Polynomial_LD; #endif +} // namespace sofa::helper -} // namespace helper - -} // namespace sofa #endif diff --git a/Sofa/framework/Helper/src/sofa/helper/Polynomial_LD.inl b/Sofa/framework/Helper/src/sofa/helper/Polynomial_LD.inl index 4f6acd18835..ae8d02982f2 100644 --- a/Sofa/framework/Helper/src/sofa/helper/Polynomial_LD.inl +++ b/Sofa/framework/Helper/src/sofa/helper/Polynomial_LD.inl @@ -28,9 +28,7 @@ #include -namespace sofa -{ -namespace helper +namespace sofa::helper { /** @@ -697,9 +695,8 @@ void Polynomial_LD::sort() } } -} // namespace helper +} // namespace sofa::helper -} // namespace sofa #endif diff --git a/Sofa/framework/Helper/src/sofa/helper/SortedPermutation.h b/Sofa/framework/Helper/src/sofa/helper/SortedPermutation.h index c009e0dc6f2..6f91ddfffb3 100644 --- a/Sofa/framework/Helper/src/sofa/helper/SortedPermutation.h +++ b/Sofa/framework/Helper/src/sofa/helper/SortedPermutation.h @@ -31,10 +31,8 @@ #include #include -namespace sofa -{ -namespace helper +namespace sofa::helper { /** Comparison operator used to compute sorted permutations of a container. @@ -76,9 +74,7 @@ type::vector sortedPermutation( const Container& values ) /// std::cout << permutation << "\n"; +} // namespace sofa::helper -} // namespace helper - -} // namespace sofa #endif diff --git a/Sofa/framework/Helper/src/sofa/helper/StringUtils.cpp b/Sofa/framework/Helper/src/sofa/helper/StringUtils.cpp index 82fcf65f20d..2b6fdf6c5b7 100644 --- a/Sofa/framework/Helper/src/sofa/helper/StringUtils.cpp +++ b/Sofa/framework/Helper/src/sofa/helper/StringUtils.cpp @@ -23,10 +23,8 @@ #include #include -namespace sofa -{ -namespace helper +namespace sofa::helper { /// Taken from https://www.fluentcpp.com/2017/04/21/how-to-split-a-string-in-c/ @@ -106,7 +104,7 @@ std::string_view removeTrailingCharacters(std::string_view sv, const std::initia return sv.substr(0, end - sv.begin()); } -} // namespace helper +} // namespace sofa::helper + -} // namespace sofa diff --git a/Sofa/framework/Helper/src/sofa/helper/TypeInfo.h b/Sofa/framework/Helper/src/sofa/helper/TypeInfo.h index e2445cec64a..8e3aa2dce1f 100644 --- a/Sofa/framework/Helper/src/sofa/helper/TypeInfo.h +++ b/Sofa/framework/Helper/src/sofa/helper/TypeInfo.h @@ -25,10 +25,8 @@ #include #include -namespace sofa -{ -namespace helper +namespace sofa::helper { class TypeInfo @@ -42,8 +40,6 @@ class TypeInfo bool operator<(const TypeInfo& t) const { return pt->before(*t.pt); } }; -} /// namespace helper - -} /// namespace sofa +} #endif /// SOFA_HELPER_TYPEINFO_H diff --git a/Sofa/framework/Helper/src/sofa/helper/Utils.cpp b/Sofa/framework/Helper/src/sofa/helper/Utils.cpp index 5a3ccd5128e..6e2bde24075 100644 --- a/Sofa/framework/Helper/src/sofa/helper/Utils.cpp +++ b/Sofa/framework/Helper/src/sofa/helper/Utils.cpp @@ -48,9 +48,8 @@ using sofa::helper::system::FileSystem; -namespace sofa -{ -namespace helper + +namespace sofa::helper { std::wstring Utils::widenString(const std::string& s) @@ -284,6 +283,6 @@ std::map Utils::readBasicIniFile(const std::string& pa } -} // namespace helper -} // namespace sofa +} // namespace sofa::helper + diff --git a/Sofa/framework/Helper/src/sofa/helper/Utils.h b/Sofa/framework/Helper/src/sofa/helper/Utils.h index e3e40f015cd..a1e057eecab 100644 --- a/Sofa/framework/Helper/src/sofa/helper/Utils.h +++ b/Sofa/framework/Helper/src/sofa/helper/Utils.h @@ -27,9 +27,8 @@ #include #include -namespace sofa -{ -namespace helper + +namespace sofa::helper { /// @brief Contains possibly useful functions, that don't fit anywhere else. @@ -96,8 +95,7 @@ static std::map readBasicIniFile(const std::string& pa }; -} // namespace helper -} // namespace sofa +} // namespace sofa::helper #endif diff --git a/Sofa/framework/Helper/src/sofa/helper/decompose.cpp b/Sofa/framework/Helper/src/sofa/helper/decompose.cpp index 350887724eb..c63d168b850 100644 --- a/Sofa/framework/Helper/src/sofa/helper/decompose.cpp +++ b/Sofa/framework/Helper/src/sofa/helper/decompose.cpp @@ -22,15 +22,13 @@ #define SOFA_HELPER_DECOMPOSE_CPP #include -namespace sofa -{ -namespace helper +namespace sofa::helper { template class SOFA_HELPER_API Decompose; template class SOFA_HELPER_API Decompose; -} // namespace helper +} // namespace sofa::helper + -} // namespace sofa diff --git a/Sofa/framework/Helper/src/sofa/helper/decompose.h b/Sofa/framework/Helper/src/sofa/helper/decompose.h index 1df4b8ae69d..bee4d82d80f 100644 --- a/Sofa/framework/Helper/src/sofa/helper/decompose.h +++ b/Sofa/framework/Helper/src/sofa/helper/decompose.h @@ -26,10 +26,7 @@ #include -namespace sofa -{ - -namespace helper +namespace sofa::helper { template @@ -394,8 +391,7 @@ extern template class SOFA_HELPER_API Decompose; extern template class SOFA_HELPER_API Decompose; #endif -} // namespace helper +} // namespace sofa::helper -} // namespace sofa #endif // SOFA_HELPER_DECOMPOSE_H diff --git a/Sofa/framework/Helper/src/sofa/helper/decompose.inl b/Sofa/framework/Helper/src/sofa/helper/decompose.inl index a6332b1e117..086e06c341c 100644 --- a/Sofa/framework/Helper/src/sofa/helper/decompose.inl +++ b/Sofa/framework/Helper/src/sofa/helper/decompose.inl @@ -27,10 +27,8 @@ #include #include -namespace sofa -{ -namespace helper +namespace sofa::helper { using type::Mat; @@ -2895,8 +2893,7 @@ void Decompose::NSDProjection( Real& A00, Real& A01, Real& A10, Real& A11 } } -} // namespace helper +} // namespace sofa::helper -} // namespace sofa #endif // SOFA_HELPER_DECOMPOSE_INL diff --git a/Sofa/framework/Helper/src/sofa/helper/init.cpp b/Sofa/framework/Helper/src/sofa/helper/init.cpp index 79cf92c4487..ca5cc106885 100644 --- a/Sofa/framework/Helper/src/sofa/helper/init.cpp +++ b/Sofa/framework/Helper/src/sofa/helper/init.cpp @@ -26,10 +26,8 @@ #include -namespace sofa -{ -namespace helper +namespace sofa::helper { static bool s_initialized = false; @@ -92,6 +90,6 @@ static const struct CleanupCheck } } check; -} // namespace helper +} // namespace sofa::helper + -} // namespace sofa diff --git a/Sofa/framework/Helper/src/sofa/helper/init.h b/Sofa/framework/Helper/src/sofa/helper/init.h index 03805c820ca..f38a64043ed 100644 --- a/Sofa/framework/Helper/src/sofa/helper/init.h +++ b/Sofa/framework/Helper/src/sofa/helper/init.h @@ -26,10 +26,8 @@ #include -namespace sofa -{ -namespace helper +namespace sofa::helper { // Initializing and cleaning up Sofa @@ -80,8 +78,7 @@ SOFA_HELPER_API void printUninitializedLibraryWarning(const std::string& library SOFA_HELPER_API void printLibraryNotCleanedUpWarning(const std::string& library, const std::string& cleanupFunction); -} // namespace helper +} // namespace sofa::helper -} // namespace sofa #endif diff --git a/Sofa/framework/Helper/src/sofa/helper/integer_id.h b/Sofa/framework/Helper/src/sofa/helper/integer_id.h index 929f15e15f2..45ef55ca6c3 100644 --- a/Sofa/framework/Helper/src/sofa/helper/integer_id.h +++ b/Sofa/framework/Helper/src/sofa/helper/integer_id.h @@ -31,10 +31,8 @@ #include #include -namespace sofa -{ -namespace helper +namespace sofa::helper { typedef const char* (*integer_id_name)(); @@ -435,8 +433,7 @@ class WriteAccessor< vector_id > : publi WriteAccessor(container_type& c) : Inherit(c) {} }; -} // namespace helper +} // namespace sofa::helper -} // namespace sofa #endif diff --git a/Sofa/framework/Helper/src/sofa/helper/io/BaseFileAccess.h b/Sofa/framework/Helper/src/sofa/helper/io/BaseFileAccess.h index 2cf24293f0f..d4a94862798 100644 --- a/Sofa/framework/Helper/src/sofa/helper/io/BaseFileAccess.h +++ b/Sofa/framework/Helper/src/sofa/helper/io/BaseFileAccess.h @@ -28,13 +28,8 @@ #include #include -namespace sofa -{ - -namespace helper -{ -namespace io +namespace sofa::helper::io { class BaseFileAccess; @@ -93,10 +88,7 @@ inline void BaseFileAccess::SetCreator() OurCreator = new FileAccessCreator(); } -} // namespace io - -} // namespace helper +} // namespace sofa::helper::io -} // namespace sofa #endif // SOFA_HELPER_IO_BASEFILEACCESS_H diff --git a/Sofa/framework/Helper/src/sofa/helper/io/Image.cpp b/Sofa/framework/Helper/src/sofa/helper/io/Image.cpp index f6bd403fb9e..084bb72c573 100644 --- a/Sofa/framework/Helper/src/sofa/helper/io/Image.cpp +++ b/Sofa/framework/Helper/src/sofa/helper/io/Image.cpp @@ -25,10 +25,8 @@ #include #include -namespace sofa -{ -namespace helper +namespace sofa::helper { template class SOFA_HELPER_API Factory; @@ -435,7 +433,7 @@ Image* Image::Create(std::string filename) } // namespace io -} // namespace helper +} // namespace sofa::helper + -} // namespace sofa diff --git a/Sofa/framework/Helper/src/sofa/helper/io/Image.h b/Sofa/framework/Helper/src/sofa/helper/io/Image.h index 0364d005389..bd0d852821d 100644 --- a/Sofa/framework/Helper/src/sofa/helper/io/Image.h +++ b/Sofa/framework/Helper/src/sofa/helper/io/Image.h @@ -27,13 +27,8 @@ #include -namespace sofa -{ - -namespace helper -{ -namespace io +namespace sofa::helper::io { class SOFA_HELPER_API Image { @@ -152,15 +147,12 @@ class SOFA_HELPER_API Image unsigned char *data; }; -} // namespace io +} // namespace sofa::helper::io #if !defined(SOFA_HELPER_IO_IMAGE_CPP) -extern template class SOFA_HELPER_API Factory; +extern template class SOFA_HELPER_API sofa::helper::Factory; #endif -} // namespace helper - -} // namespace sofa /// This line register Image to the messaging system MSG_REGISTER_CLASS(sofa::helper::io::Image, "Image") diff --git a/Sofa/framework/Helper/src/sofa/helper/io/ImageDDS.cpp b/Sofa/framework/Helper/src/sofa/helper/io/ImageDDS.cpp index 1b8a5646066..f9df28107ba 100644 --- a/Sofa/framework/Helper/src/sofa/helper/io/ImageDDS.cpp +++ b/Sofa/framework/Helper/src/sofa/helper/io/ImageDDS.cpp @@ -87,11 +87,8 @@ #define DDS_GBIT_RG3_B2 0x1C #define DDS_BBIT_RG3_B2 0x03 -namespace sofa -{ -namespace helper -{ -namespace io + +namespace sofa::helper::io { Creator ImageDDSClass("dds"); @@ -460,6 +457,6 @@ bool ImageDDS::save(std::string filename, int) } return isWriteOk; } -} // namespace io -} // namespace helper -} // namespace sofa +} // namespace sofa::helper::io + + diff --git a/Sofa/framework/Helper/src/sofa/helper/io/ImageDDS.h b/Sofa/framework/Helper/src/sofa/helper/io/ImageDDS.h index eb57118d182..d99c9055f50 100644 --- a/Sofa/framework/Helper/src/sofa/helper/io/ImageDDS.h +++ b/Sofa/framework/Helper/src/sofa/helper/io/ImageDDS.h @@ -27,13 +27,7 @@ #include -namespace sofa -{ - -namespace helper -{ - -namespace io +namespace sofa::helper::io { class SOFA_HELPER_API ImageDDS : public Image @@ -52,10 +46,7 @@ class SOFA_HELPER_API ImageDDS : public Image bool save(std::string filename, int compression_level = -1) override; }; -} // namespace io - -} // namespace helper +} // namespace sofa::helper::io -} // namespace sofa #endif diff --git a/Sofa/framework/Helper/src/sofa/helper/io/ImageRAW.cpp b/Sofa/framework/Helper/src/sofa/helper/io/ImageRAW.cpp index f6bf2c8b099..36611fa01a5 100644 --- a/Sofa/framework/Helper/src/sofa/helper/io/ImageRAW.cpp +++ b/Sofa/framework/Helper/src/sofa/helper/io/ImageRAW.cpp @@ -25,13 +25,8 @@ #include #include // fopen and friends -namespace sofa -{ - -namespace helper -{ -namespace io +namespace sofa::helper::io { ImageRAW::ImageRAW () @@ -120,9 +115,9 @@ bool ImageRAW::save(std::string filename, int) return isWriteOk; } -} // namespace io +} // namespace sofa::helper::io + + -} // namespace helper -} // namespace sofa diff --git a/Sofa/framework/Helper/src/sofa/helper/io/ImageRAW.h b/Sofa/framework/Helper/src/sofa/helper/io/ImageRAW.h index 8ed255c481f..6a1443a29e1 100644 --- a/Sofa/framework/Helper/src/sofa/helper/io/ImageRAW.h +++ b/Sofa/framework/Helper/src/sofa/helper/io/ImageRAW.h @@ -26,13 +26,7 @@ #include -namespace sofa -{ - -namespace helper -{ - -namespace io +namespace sofa::helper::io { class SOFA_HELPER_API ImageRAW : public Image @@ -58,10 +52,7 @@ class SOFA_HELPER_API ImageRAW : public Image }; -} // namespace io - -} // namespace helper +} // namespace sofa::helper::io -} // namespace sofa #endif diff --git a/Sofa/framework/Helper/src/sofa/helper/io/Mesh.cpp b/Sofa/framework/Helper/src/sofa/helper/io/Mesh.cpp index 320effa453a..a4ef1fe9a46 100644 --- a/Sofa/framework/Helper/src/sofa/helper/io/Mesh.cpp +++ b/Sofa/framework/Helper/src/sofa/helper/io/Mesh.cpp @@ -22,10 +22,8 @@ #include #include -namespace sofa -{ -namespace helper +namespace sofa::helper { template class Factory; @@ -49,7 +47,7 @@ Mesh* Mesh::Create(const std::string& loader, const std::string& filename) } // namespace io -} // namespace helper +} // namespace sofa::helper + -} // namespace sofa diff --git a/Sofa/framework/Helper/src/sofa/helper/io/Mesh.h b/Sofa/framework/Helper/src/sofa/helper/io/Mesh.h index 0c1b57fa9a7..21cf6ec5b24 100644 --- a/Sofa/framework/Helper/src/sofa/helper/io/Mesh.h +++ b/Sofa/framework/Helper/src/sofa/helper/io/Mesh.h @@ -30,13 +30,8 @@ #include #include -namespace sofa -{ - -namespace helper -{ -namespace io +namespace sofa::helper::io { using namespace sofa::topology; @@ -166,10 +161,7 @@ class SOFA_HELPER_API Mesh }; -} // namespace io - -} // namespace helper +} // namespace sofa::helper::io -} // namespace sofa #endif diff --git a/Sofa/framework/Helper/src/sofa/helper/io/MeshGmsh.cpp b/Sofa/framework/Helper/src/sofa/helper/io/MeshGmsh.cpp index ba83068f3f6..da5d510ae0d 100644 --- a/Sofa/framework/Helper/src/sofa/helper/io/MeshGmsh.cpp +++ b/Sofa/framework/Helper/src/sofa/helper/io/MeshGmsh.cpp @@ -30,13 +30,8 @@ #include #include -namespace sofa -{ - -namespace helper -{ -namespace io +namespace sofa::helper::io { using namespace sofa::type; @@ -562,8 +557,8 @@ bool MeshGmsh::readGmsh(std::ifstream &file, const unsigned int gmshFormat) return true; } -} // namespace io +} // namespace sofa::helper::io + + -} // namespace helper -} // namespace sofa diff --git a/Sofa/framework/Helper/src/sofa/helper/io/MeshGmsh.h b/Sofa/framework/Helper/src/sofa/helper/io/MeshGmsh.h index 43ec72a522b..c57e9afd9bc 100644 --- a/Sofa/framework/Helper/src/sofa/helper/io/MeshGmsh.h +++ b/Sofa/framework/Helper/src/sofa/helper/io/MeshGmsh.h @@ -25,13 +25,8 @@ #include #include -namespace sofa -{ - -namespace helper -{ -namespace io +namespace sofa::helper::io { class SOFA_HELPER_API MeshGmsh : public Mesh @@ -54,10 +49,7 @@ class SOFA_HELPER_API MeshGmsh : public Mesh void normalizeGroup(type::vector< sofa::type::PrimitiveGroup>& group); }; -} // namespace io - -} // namespace helper +} // namespace sofa::helper::io -} // namespace sofa #endif // SOFA_HELPER_IO_MESHGMSH_H diff --git a/Sofa/framework/Helper/src/sofa/helper/io/MeshOBJ.cpp b/Sofa/framework/Helper/src/sofa/helper/io/MeshOBJ.cpp index e5fe2f2fcfb..de08488a3ce 100644 --- a/Sofa/framework/Helper/src/sofa/helper/io/MeshOBJ.cpp +++ b/Sofa/framework/Helper/src/sofa/helper/io/MeshOBJ.cpp @@ -27,13 +27,8 @@ #include #include -namespace sofa -{ - -namespace helper -{ -namespace io +namespace sofa::helper::io { using namespace sofa::type; @@ -442,9 +437,9 @@ void MeshOBJ::readMTL(const char* filename) } } -} // namespace io +} // namespace sofa::helper::io + + -} // namespace helper -} // namespace sofa diff --git a/Sofa/framework/Helper/src/sofa/helper/io/MeshOBJ.h b/Sofa/framework/Helper/src/sofa/helper/io/MeshOBJ.h index e76f93ebc26..dfa8890a46c 100644 --- a/Sofa/framework/Helper/src/sofa/helper/io/MeshOBJ.h +++ b/Sofa/framework/Helper/src/sofa/helper/io/MeshOBJ.h @@ -25,13 +25,8 @@ #include #include -namespace sofa -{ - -namespace helper -{ -namespace io +namespace sofa::helper::io { class SOFA_HELPER_API MeshOBJ : public Mesh @@ -52,10 +47,7 @@ class SOFA_HELPER_API MeshOBJ : public Mesh }; -} // namespace io - -} // namespace helper +} // namespace sofa::helper::io -} // namespace sofa #endif diff --git a/Sofa/framework/Helper/src/sofa/helper/io/MeshTopologyLoader.cpp b/Sofa/framework/Helper/src/sofa/helper/io/MeshTopologyLoader.cpp index f2149dc3f6d..5a8926b258e 100644 --- a/Sofa/framework/Helper/src/sofa/helper/io/MeshTopologyLoader.cpp +++ b/Sofa/framework/Helper/src/sofa/helper/io/MeshTopologyLoader.cpp @@ -31,13 +31,8 @@ MSG_REGISTER_CLASS(sofa::helper::io::MeshTopologyLoader, "MeshTopologyLoader") -namespace sofa -{ - -namespace helper -{ -namespace io +namespace sofa::helper::io { using namespace sofa::type; @@ -208,9 +203,9 @@ bool MeshTopologyLoader::load(const char *filename) return fileLoaded; } -} // namespace io +} // namespace sofa::helper::io + + -} // namespace helper -} // namespace sofa diff --git a/Sofa/framework/Helper/src/sofa/helper/io/MeshTopologyLoader.h b/Sofa/framework/Helper/src/sofa/helper/io/MeshTopologyLoader.h index 7e07aa0e900..b6e2160fef7 100644 --- a/Sofa/framework/Helper/src/sofa/helper/io/MeshTopologyLoader.h +++ b/Sofa/framework/Helper/src/sofa/helper/io/MeshTopologyLoader.h @@ -25,13 +25,8 @@ #include #include -namespace sofa -{ - -namespace helper -{ -namespace io +namespace sofa::helper::io { class SOFA_HELPER_API MeshTopologyLoader @@ -74,10 +69,7 @@ class SOFA_HELPER_API MeshTopologyLoader helper::io::Mesh* m_mesh; }; -} // namespace io - -} // namespace helper +} // namespace sofa::helper::io -} // namespace sofa #endif diff --git a/Sofa/framework/Helper/src/sofa/helper/io/SphereLoader.cpp b/Sofa/framework/Helper/src/sofa/helper/io/SphereLoader.cpp index 9dfae4c4428..307b18938ab 100644 --- a/Sofa/framework/Helper/src/sofa/helper/io/SphereLoader.cpp +++ b/Sofa/framework/Helper/src/sofa/helper/io/SphereLoader.cpp @@ -33,13 +33,8 @@ /// This allow MeshTrian to interact with the messaging system. MSG_REGISTER_CLASS(sofa::helper::io::SphereLoader, "SphereLoader") -namespace sofa -{ - -namespace helper -{ -namespace io +namespace sofa::helper::io { static void skipToEOL(FILE* f) @@ -114,9 +109,9 @@ bool SphereLoader::Load(const std::string& filename, SphereLoaderDataHook& data) return true; } -} // namespace io +} // namespace sofa::helper::io + + -} // namespace helper -} // namespace sofa diff --git a/Sofa/framework/Helper/src/sofa/helper/io/SphereLoader.h b/Sofa/framework/Helper/src/sofa/helper/io/SphereLoader.h index 7bbeebd3b99..9a76ec850a2 100644 --- a/Sofa/framework/Helper/src/sofa/helper/io/SphereLoader.h +++ b/Sofa/framework/Helper/src/sofa/helper/io/SphereLoader.h @@ -26,13 +26,8 @@ #include -namespace sofa -{ - -namespace helper -{ -namespace io +namespace sofa::helper::io { /// @brief Inherit this class to load data from sphere description. @@ -94,10 +89,7 @@ class SOFA_HELPER_API SphereLoader static bool Load(const std::string& filename, SphereLoaderDataHook& data); }; -} // namespace io - -} // namespace helper +} // namespace sofa::helper::io -} // namespace sofa #endif diff --git a/Sofa/framework/Helper/src/sofa/helper/io/TriangleLoader.cpp b/Sofa/framework/Helper/src/sofa/helper/io/TriangleLoader.cpp index 2bb8142e0f4..d99970be0d0 100644 --- a/Sofa/framework/Helper/src/sofa/helper/io/TriangleLoader.cpp +++ b/Sofa/framework/Helper/src/sofa/helper/io/TriangleLoader.cpp @@ -35,13 +35,8 @@ /// This register the TriangleLoader object to the logging system so that we can use msg_*(this) MSG_REGISTER_CLASS(sofa::helper::io::TriangleLoader, "TriangleLoader") -namespace sofa -{ - -namespace helper -{ -namespace io +namespace sofa::helper::io { using namespace sofa::type; @@ -249,9 +244,9 @@ void TriangleLoader::loadTriangles(FILE *file) } } -} // namespace io +} // namespace sofa::helper::io + + -} // namespace helper -} // namespace sofa diff --git a/Sofa/framework/Helper/src/sofa/helper/io/TriangleLoader.h b/Sofa/framework/Helper/src/sofa/helper/io/TriangleLoader.h index fdccf466bef..d220bf6d15d 100644 --- a/Sofa/framework/Helper/src/sofa/helper/io/TriangleLoader.h +++ b/Sofa/framework/Helper/src/sofa/helper/io/TriangleLoader.h @@ -25,13 +25,8 @@ #include #include -namespace sofa -{ - -namespace helper -{ -namespace io +namespace sofa::helper::io { class SOFA_HELPER_API TriangleLoader @@ -46,10 +41,7 @@ class SOFA_HELPER_API TriangleLoader void loadTriangles(FILE *file); }; -} // namespace io - -} // namespace helper +} // namespace sofa::helper::io -} // namespace sofa #endif diff --git a/Sofa/framework/Helper/src/sofa/helper/io/XspLoader.cpp b/Sofa/framework/Helper/src/sofa/helper/io/XspLoader.cpp index 0e59be7667c..0250e757555 100644 --- a/Sofa/framework/Helper/src/sofa/helper/io/XspLoader.cpp +++ b/Sofa/framework/Helper/src/sofa/helper/io/XspLoader.cpp @@ -35,13 +35,8 @@ using sofa::type::Vec3; #include #include -namespace sofa -{ - -namespace helper -{ -namespace io +namespace sofa::helper::io { XspLoaderDataHook::~XspLoaderDataHook(){} @@ -239,9 +234,9 @@ bool XspLoader::Load(const std::string& filename, return isOk; } -} // namespace io +} // namespace sofa::helper::io + + -} // namespace helper -} // namespace sofa diff --git a/Sofa/framework/Helper/src/sofa/helper/io/XspLoader.h b/Sofa/framework/Helper/src/sofa/helper/io/XspLoader.h index a73e2946ae3..0f8500f0b13 100644 --- a/Sofa/framework/Helper/src/sofa/helper/io/XspLoader.h +++ b/Sofa/framework/Helper/src/sofa/helper/io/XspLoader.h @@ -27,13 +27,7 @@ #include /// For SOFA_HELPER_API -namespace sofa -{ - -namespace helper -{ - -namespace io +namespace sofa::helper::io { /// @brief Inherit this class to load data from a Xsp file. @@ -129,10 +123,7 @@ class SOFA_HELPER_API XspLoader }; -} // namespace io - -} // namespace helper +} // namespace sofa::helper::io -} // namespace sofa #endif diff --git a/Sofa/framework/Helper/src/sofa/helper/logging/CountingMessageHandler.cpp b/Sofa/framework/Helper/src/sofa/helper/logging/CountingMessageHandler.cpp index 92fa952c0df..ee1883c105a 100644 --- a/Sofa/framework/Helper/src/sofa/helper/logging/CountingMessageHandler.cpp +++ b/Sofa/framework/Helper/src/sofa/helper/logging/CountingMessageHandler.cpp @@ -26,13 +26,8 @@ #include #include -namespace sofa -{ -namespace helper -{ -namespace logging -{ -namespace countingmessagehandler + +namespace sofa::helper::logging::countingmessagehandler { void CountingMessageHandler::process(Message& m) @@ -76,7 +71,4 @@ int MainCountingMessageHandler::getMessageCountFor(const Message::Type &type) } -} /// namespace countingmessagehandler -} /// namespace logging -} /// namespace helper -} /// namespace sofa +} diff --git a/Sofa/framework/Helper/src/sofa/helper/logging/CountingMessageHandler.h b/Sofa/framework/Helper/src/sofa/helper/logging/CountingMessageHandler.h index 059cb0c010c..a99e6be1a83 100644 --- a/Sofa/framework/Helper/src/sofa/helper/logging/CountingMessageHandler.h +++ b/Sofa/framework/Helper/src/sofa/helper/logging/CountingMessageHandler.h @@ -30,11 +30,8 @@ #include #include -namespace sofa -{ -namespace helper -{ -namespace logging + +namespace sofa::helper::logging { /// I use a per-file namespace so that I can employ the 'using' keywords without @@ -92,8 +89,6 @@ class SOFA_HELPER_API MainCountingMessageHandler using countingmessagehandler::MainCountingMessageHandler ; using countingmessagehandler::CountingMessageHandler ; -} /// namespace logging -} /// namespace helper -} /// namespace sofa +} #endif // COUNTINGMESSAGEHANDLER_H diff --git a/Sofa/framework/Helper/src/sofa/helper/logging/FileMessageHandler.cpp b/Sofa/framework/Helper/src/sofa/helper/logging/FileMessageHandler.cpp index 0798da29a8d..c95ed1414d2 100644 --- a/Sofa/framework/Helper/src/sofa/helper/logging/FileMessageHandler.cpp +++ b/Sofa/framework/Helper/src/sofa/helper/logging/FileMessageHandler.cpp @@ -31,13 +31,7 @@ #include -namespace sofa -{ - -namespace helper -{ - -namespace logging +namespace sofa::helper::logging { FileMessageHandler::FileMessageHandler(const char* filename,MessageFormatter *formatter) @@ -71,7 +65,5 @@ bool FileMessageHandler::isValid() } -} // logging -} // helper -} // sofa +} diff --git a/Sofa/framework/Helper/src/sofa/helper/logging/FileMessageHandler.h b/Sofa/framework/Helper/src/sofa/helper/logging/FileMessageHandler.h index 50a14ebbef6..abf7f803096 100644 --- a/Sofa/framework/Helper/src/sofa/helper/logging/FileMessageHandler.h +++ b/Sofa/framework/Helper/src/sofa/helper/logging/FileMessageHandler.h @@ -29,13 +29,8 @@ #include #include -namespace sofa -{ - -namespace helper -{ -namespace logging +namespace sofa::helper::logging { class MessageFormatter; @@ -59,9 +54,6 @@ class SOFA_HELPER_API FileMessageHandler : public MessageHandler MessageFormatter *m_formatter; }; - -} // logging -} // helper -} // sofa +} #endif // FILEMESSAGEHANDLER_H diff --git a/Sofa/framework/Helper/src/sofa/helper/logging/LoggingMessageHandler.cpp b/Sofa/framework/Helper/src/sofa/helper/logging/LoggingMessageHandler.cpp index 6af5d0dddca..17da6e29e45 100644 --- a/Sofa/framework/Helper/src/sofa/helper/logging/LoggingMessageHandler.cpp +++ b/Sofa/framework/Helper/src/sofa/helper/logging/LoggingMessageHandler.cpp @@ -25,13 +25,8 @@ ******************************************************************************/ #include -namespace sofa -{ -namespace helper -{ -namespace logging -{ -namespace loggingmessagehandler + +namespace sofa::helper::logging::loggingmessagehandler { void LoggingMessageHandler::process(Message& m) @@ -96,8 +91,4 @@ const vector& MainLoggingMessageHandler::getMessages() return getInstance().getMessages() ; } -} // loggingmessagehandler -} // logging -} // helper -} // sofa - +} diff --git a/Sofa/framework/Helper/src/sofa/helper/logging/LoggingMessageHandler.h b/Sofa/framework/Helper/src/sofa/helper/logging/LoggingMessageHandler.h index 895eb0b89bb..c274426eefd 100644 --- a/Sofa/framework/Helper/src/sofa/helper/logging/LoggingMessageHandler.h +++ b/Sofa/framework/Helper/src/sofa/helper/logging/LoggingMessageHandler.h @@ -30,11 +30,8 @@ #include #include -namespace sofa -{ -namespace helper -{ -namespace logging + +namespace sofa::helper::logging { /// I use a per-file namespace so that I can employ the 'using' keywords without @@ -138,15 +135,13 @@ class SOFA_HELPER_API LogMessage }; -} // loggingmessagehandler +} using loggingmessagehandler::LoggingMessageHandler ; using loggingmessagehandler::MainLoggingMessageHandler ; using loggingmessagehandler::LogMessage ; -} // logging -} // helper -} // sofa +} #endif // TESTMESSAGEHANDLER_H diff --git a/Sofa/framework/Helper/src/sofa/helper/logging/Message.cpp b/Sofa/framework/Helper/src/sofa/helper/logging/Message.cpp index 45699492759..f71c2573052 100644 --- a/Sofa/framework/Helper/src/sofa/helper/logging/Message.cpp +++ b/Sofa/framework/Helper/src/sofa/helper/logging/Message.cpp @@ -30,13 +30,7 @@ using std::endl ; using std::string ; -namespace sofa -{ - -namespace helper -{ - -namespace logging +namespace sofa::helper::logging { Message::TypeSet Message::AnyTypes = {Type::Info,Type::Advice,Type::Deprecated, @@ -135,6 +129,4 @@ SOFA_HELPER_API Message& Message::operator<<(const FileInfo::SPtr &fi) } -} // logging -} // helper -} // sofa +} diff --git a/Sofa/framework/Helper/src/sofa/helper/logging/Message.h b/Sofa/framework/Helper/src/sofa/helper/logging/Message.h index b8c70186075..f2d7301ef28 100644 --- a/Sofa/framework/Helper/src/sofa/helper/logging/Message.h +++ b/Sofa/framework/Helper/src/sofa/helper/logging/Message.h @@ -37,13 +37,8 @@ #include #include -namespace sofa -{ - -namespace helper -{ -namespace logging +namespace sofa::helper::logging { /// A message is the core object of the msg_* API. @@ -106,9 +101,6 @@ template<> SOFA_HELPER_API Message& Message::operator<<(const FileInfo::SPtr &fi SOFA_HELPER_API std::ostream& operator<< (std::ostream&, const Message&) ; SOFA_HELPER_API const std::string toString(const Message::Type type) ; -} // logging -} // helper -} // sofa - +} #endif // MESSAGE_H diff --git a/Sofa/framework/Helper/src/sofa/helper/logging/MessageDispatcher.cpp b/Sofa/framework/Helper/src/sofa/helper/logging/MessageDispatcher.cpp index 19205b25b85..717d9a70e78 100644 --- a/Sofa/framework/Helper/src/sofa/helper/logging/MessageDispatcher.cpp +++ b/Sofa/framework/Helper/src/sofa/helper/logging/MessageDispatcher.cpp @@ -50,13 +50,8 @@ using sofa::helper::logging::DefaultStyleMessageFormatter; using std::lock_guard ; using std::mutex; -namespace sofa -{ - -namespace helper -{ -namespace logging +namespace sofa::helper::logging { #define PUBLIC_API_ENTRY_POINT_MUTEX lock_guard guard(getMainInstance()->getMutex()) ; @@ -198,8 +193,5 @@ MessageDispatcher::LoggerStream::~LoggerStream() } -} // logging -} // helper -} // sofa - +} diff --git a/Sofa/framework/Helper/src/sofa/helper/logging/MessageDispatcher.h b/Sofa/framework/Helper/src/sofa/helper/logging/MessageDispatcher.h index bf3d36e6bea..ffe695abe72 100644 --- a/Sofa/framework/Helper/src/sofa/helper/logging/MessageDispatcher.h +++ b/Sofa/framework/Helper/src/sofa/helper/logging/MessageDispatcher.h @@ -30,11 +30,8 @@ #include #include -namespace sofa -{ -namespace helper -{ -namespace logging + +namespace sofa::helper::logging { // forward declaration @@ -127,8 +124,6 @@ class SOFA_HELPER_API MessageDispatcher -} // logging -} // helper -} // sofa +} #endif // MESSAGEDISPATCHER_H diff --git a/Sofa/framework/Helper/src/sofa/helper/logging/MessageFormatter.cpp b/Sofa/framework/Helper/src/sofa/helper/logging/MessageFormatter.cpp index 1533124e231..6565521619c 100644 --- a/Sofa/framework/Helper/src/sofa/helper/logging/MessageFormatter.cpp +++ b/Sofa/framework/Helper/src/sofa/helper/logging/MessageFormatter.cpp @@ -28,13 +28,8 @@ #include #include -namespace sofa -{ - -namespace helper -{ -namespace logging +namespace sofa::helper::logging { std::string MessageFormatter::getPrefixText(unsigned int type) const { @@ -67,8 +62,8 @@ std::ostream & MessageFormatter::setColor(std::ostream &os, unsigned int type) c } } -} // namespace logging +} // namespace sofa::helper::logging + + -} // namespace helper -} // namespace sofa diff --git a/Sofa/framework/Helper/src/sofa/helper/logging/MessageFormatter.h b/Sofa/framework/Helper/src/sofa/helper/logging/MessageFormatter.h index e4be2e8cb73..0b81854650b 100644 --- a/Sofa/framework/Helper/src/sofa/helper/logging/MessageFormatter.h +++ b/Sofa/framework/Helper/src/sofa/helper/logging/MessageFormatter.h @@ -30,13 +30,8 @@ #include #include -namespace sofa -{ - -namespace helper -{ -namespace logging +namespace sofa::helper::logging { class Message; @@ -55,9 +50,6 @@ class SOFA_HELPER_API MessageFormatter }; -} // logging -} // helper -} // sofa - +} #endif // MESSAGEFORMATTER_H diff --git a/Sofa/framework/Helper/src/sofa/helper/logging/MessageHandler.h b/Sofa/framework/Helper/src/sofa/helper/logging/MessageHandler.h index 340f659ab59..5168d4ccdd3 100644 --- a/Sofa/framework/Helper/src/sofa/helper/logging/MessageHandler.h +++ b/Sofa/framework/Helper/src/sofa/helper/logging/MessageHandler.h @@ -29,13 +29,8 @@ #include #include -namespace sofa -{ - -namespace helper -{ -namespace logging +namespace sofa::helper::logging { class Message; @@ -48,8 +43,6 @@ class SOFA_HELPER_API MessageHandler }; -} // logging -} // helper -} // sofa +} #endif // MESSAGEHANDLER_H diff --git a/Sofa/framework/Helper/src/sofa/helper/logging/RoutingMessageHandler.cpp b/Sofa/framework/Helper/src/sofa/helper/logging/RoutingMessageHandler.cpp index 77a5be73f32..e62b906bae3 100644 --- a/Sofa/framework/Helper/src/sofa/helper/logging/RoutingMessageHandler.cpp +++ b/Sofa/framework/Helper/src/sofa/helper/logging/RoutingMessageHandler.cpp @@ -25,13 +25,8 @@ ******************************************************************************/ #include -namespace sofa -{ -namespace helper -{ -namespace logging -{ -namespace routingmessagehandler + +namespace sofa::helper::logging::routingmessagehandler { void RoutingMessageHandler::process(Message& m) @@ -77,8 +72,4 @@ void MainRoutingMessageHandler::removeAllFilters() } -} // loggingmessagehandler -} // logging -} // helper -} // sofa - +} diff --git a/Sofa/framework/Helper/src/sofa/helper/logging/RoutingMessageHandler.h b/Sofa/framework/Helper/src/sofa/helper/logging/RoutingMessageHandler.h index b90a3453d19..06096b9dca4 100644 --- a/Sofa/framework/Helper/src/sofa/helper/logging/RoutingMessageHandler.h +++ b/Sofa/framework/Helper/src/sofa/helper/logging/RoutingMessageHandler.h @@ -30,11 +30,8 @@ #include #include -namespace sofa -{ -namespace helper -{ -namespace logging + +namespace sofa::helper::logging { /// I use a per-file namespace so that I can employ the 'using' keywords without @@ -99,9 +96,7 @@ class SOFA_HELPER_API MainRoutingMessageHandler using routingmessagehandler::RoutingMessageHandler ; using routingmessagehandler::MainRoutingMessageHandler ; -} // logging -} // helper -} // sofa +} #endif // TESTMESSAGEHANDLER_H diff --git a/Sofa/framework/Helper/src/sofa/helper/logging/SilentMessageHandler.cpp b/Sofa/framework/Helper/src/sofa/helper/logging/SilentMessageHandler.cpp index 0ff28c22883..74897a362dc 100644 --- a/Sofa/framework/Helper/src/sofa/helper/logging/SilentMessageHandler.cpp +++ b/Sofa/framework/Helper/src/sofa/helper/logging/SilentMessageHandler.cpp @@ -28,20 +28,11 @@ #include -namespace sofa -{ - -namespace helper -{ - -namespace logging +namespace sofa::helper::logging { void SilentMessageHandler::process(Message& /*m*/) { } -} // logging -} // helper -} // sofa - +} diff --git a/Sofa/framework/Helper/src/sofa/helper/logging/SilentMessageHandler.h b/Sofa/framework/Helper/src/sofa/helper/logging/SilentMessageHandler.h index 1084526a6c9..1d9aae52f70 100644 --- a/Sofa/framework/Helper/src/sofa/helper/logging/SilentMessageHandler.h +++ b/Sofa/framework/Helper/src/sofa/helper/logging/SilentMessageHandler.h @@ -28,13 +28,8 @@ #include -namespace sofa -{ - -namespace helper -{ -namespace logging +namespace sofa::helper::logging { class Message; @@ -48,8 +43,6 @@ class SOFA_HELPER_API SilentMessageHandler : public MessageHandler }; -} // logging -} // helper -} // sofa +} #endif // CONSOLEMESSAGEHANDLER_H diff --git a/Sofa/framework/Helper/src/sofa/helper/messaging/FileMessage.cpp b/Sofa/framework/Helper/src/sofa/helper/messaging/FileMessage.cpp index e8aeb2999dc..f830810bd6a 100644 --- a/Sofa/framework/Helper/src/sofa/helper/messaging/FileMessage.cpp +++ b/Sofa/framework/Helper/src/sofa/helper/messaging/FileMessage.cpp @@ -21,13 +21,8 @@ ******************************************************************************/ #include -namespace sofa -{ - -namespace helper -{ -namespace messaging +namespace sofa::helper::messaging { const std::string FileMessage::unableToOpenFile(const char* filename) @@ -38,6 +33,4 @@ const std::string FileMessage::unableToOpenFile(const char* filename) return errormsg; } -} // logging -} // helper -} // sofa +} diff --git a/Sofa/framework/Helper/src/sofa/helper/messaging/FileMessage.h b/Sofa/framework/Helper/src/sofa/helper/messaging/FileMessage.h index 1352f2724ca..22adc129221 100644 --- a/Sofa/framework/Helper/src/sofa/helper/messaging/FileMessage.h +++ b/Sofa/framework/Helper/src/sofa/helper/messaging/FileMessage.h @@ -26,13 +26,8 @@ #include #include -namespace sofa -{ - -namespace helper -{ -namespace messaging +namespace sofa::helper::messaging { class SOFA_HELPER_API FileMessage @@ -44,8 +39,6 @@ class SOFA_HELPER_API FileMessage }; -} // logging -} // helper -} // sofa +} #endif // FILEMESSAGE_H diff --git a/Sofa/framework/Helper/src/sofa/helper/random.h b/Sofa/framework/Helper/src/sofa/helper/random.h index ca69726ac01..764d8f907a2 100644 --- a/Sofa/framework/Helper/src/sofa/helper/random.h +++ b/Sofa/framework/Helper/src/sofa/helper/random.h @@ -24,10 +24,8 @@ #include -namespace sofa -{ -namespace helper +namespace sofa::helper { /** Define random methods srand and rand for double and int used only for the tests now. @@ -79,8 +77,7 @@ inline double drand(double min, double max) } -} // namespace helper +} // namespace sofa::helper -} // namespace sofa #endif // SOFA_HELPER_RANDOM_H diff --git a/Sofa/framework/Helper/src/sofa/helper/rmath.h b/Sofa/framework/Helper/src/sofa/helper/rmath.h index 22824b01170..6b0d75a5ba1 100644 --- a/Sofa/framework/Helper/src/sofa/helper/rmath.h +++ b/Sofa/framework/Helper/src/sofa/helper/rmath.h @@ -26,10 +26,8 @@ #include #include -namespace sofa -{ -namespace helper +namespace sofa::helper { #ifdef M_PI @@ -308,9 +306,8 @@ inline T rsin(const T& a) return (T)sin((double)a); } -} // namespace helper +} // namespace sofa::helper -} // namespace sofa #endif diff --git a/Sofa/framework/Helper/src/sofa/helper/system/FileMonitor_windows.cpp b/Sofa/framework/Helper/src/sofa/helper/system/FileMonitor_windows.cpp index 675d1f583e4..af1df87d060 100644 --- a/Sofa/framework/Helper/src/sofa/helper/system/FileMonitor_windows.cpp +++ b/Sofa/framework/Helper/src/sofa/helper/system/FileMonitor_windows.cpp @@ -45,13 +45,8 @@ using namespace std; // needs to be declared AFTER windows header file //(https://developercommunity.visualstudio.com/content/problem/93889/error-c2872-byte-ambiguous-symbol.html) -namespace sofa -{ - -namespace helper -{ -namespace system +namespace sofa::helper::system { static unsigned int getFileHashTimeSize(const string& filename) @@ -179,6 +174,4 @@ int FileMonitor::updates(int timeout) } -} // system -} // helper -} // sofa +} diff --git a/Sofa/framework/Helper/src/sofa/helper/system/FileRepository.cpp b/Sofa/framework/Helper/src/sofa/helper/system/FileRepository.cpp index 668d7f8cbd5..7b11f893c5b 100644 --- a/Sofa/framework/Helper/src/sofa/helper/system/FileRepository.cpp +++ b/Sofa/framework/Helper/src/sofa/helper/system/FileRepository.cpp @@ -59,13 +59,8 @@ using sofa::helper::system::FileSystem; #define ON_WIN32 false #endif // WIN32 -namespace sofa -{ - -namespace helper -{ -namespace system +namespace sofa::helper::system { // replacing every occurences of "//" by "/" std::string cleanPath( const std::string& path ) @@ -358,9 +353,9 @@ const std::string FileRepository::getTempPath() const return fs::temp_directory_path().string(); } -} // namespace system +} // namespace sofa::helper::system + + -} // namespace helper -} // namespace sofa diff --git a/Sofa/framework/Helper/src/sofa/helper/system/FileRepository.h b/Sofa/framework/Helper/src/sofa/helper/system/FileRepository.h index 49a8f18ddb0..945ac8e1bb5 100644 --- a/Sofa/framework/Helper/src/sofa/helper/system/FileRepository.h +++ b/Sofa/framework/Helper/src/sofa/helper/system/FileRepository.h @@ -30,13 +30,8 @@ #include #include -namespace sofa -{ - -namespace helper -{ -namespace system +namespace sofa::helper::system { /// Helper class to find files in a list of directories. @@ -191,10 +186,7 @@ class SOFA_HELPER_API FileRepository extern SOFA_HELPER_API FileRepository DataRepository; ///< Default repository extern SOFA_HELPER_API FileRepository PluginRepository; ///< Default repository -} // namespace system - -} // namespace helper +} // namespace sofa::helper::system -} // namespace sofa #endif diff --git a/Sofa/framework/Helper/src/sofa/helper/system/FileSystem.h b/Sofa/framework/Helper/src/sofa/helper/system/FileSystem.h index 2f1bdcee815..e55c028eaf5 100644 --- a/Sofa/framework/Helper/src/sofa/helper/system/FileSystem.h +++ b/Sofa/framework/Helper/src/sofa/helper/system/FileSystem.h @@ -28,11 +28,8 @@ #include #include -namespace sofa -{ -namespace helper -{ -namespace system + +namespace sofa::helper::system { /// @brief Contains functions to interact with the file system. @@ -159,8 +156,7 @@ static std::string append(const std::string_view& existingPath, const std::strin }; -} // namespace system -} // namespace helper -} // namespace sofa +} // namespace sofa::helper::system + #endif diff --git a/Sofa/framework/Helper/src/sofa/helper/system/Locale.h b/Sofa/framework/Helper/src/sofa/helper/system/Locale.h index 6fdc7d71ad8..09eb5de679c 100644 --- a/Sofa/framework/Helper/src/sofa/helper/system/Locale.h +++ b/Sofa/framework/Helper/src/sofa/helper/system/Locale.h @@ -27,11 +27,9 @@ #include #include -namespace sofa { -namespace helper { - -namespace system { +namespace sofa::helper::system +{ class SOFA_HELPER_API Locale @@ -52,10 +50,7 @@ class SOFA_HELPER_API TemporaryLocale }; -} // namespace system - -} // namespace helper +} // namespace sofa::helper::system -} // sofa #endif diff --git a/Sofa/framework/Helper/src/sofa/helper/system/SetDirectory.cpp b/Sofa/framework/Helper/src/sofa/helper/system/SetDirectory.cpp index 9bdce67b8ea..4f110c0dc1e 100644 --- a/Sofa/framework/Helper/src/sofa/helper/system/SetDirectory.cpp +++ b/Sofa/framework/Helper/src/sofa/helper/system/SetDirectory.cpp @@ -36,13 +36,8 @@ #include -namespace sofa -{ - -namespace helper -{ -namespace system +namespace sofa::helper::system { #if defined(WIN32) @@ -217,9 +212,9 @@ std::string SetDirectory::GetProcessFullPath(const char* filename) else return std::string(""); } -} // namespace system +} // namespace sofa::helper::system + + -} // namespace helper -} // namespace sofa diff --git a/Sofa/framework/Helper/src/sofa/helper/system/SetDirectory.h b/Sofa/framework/Helper/src/sofa/helper/system/SetDirectory.h index 62bb341c3af..8e300d4cda3 100644 --- a/Sofa/framework/Helper/src/sofa/helper/system/SetDirectory.h +++ b/Sofa/framework/Helper/src/sofa/helper/system/SetDirectory.h @@ -26,13 +26,8 @@ #include -namespace sofa -{ - -namespace helper -{ -namespace system +namespace sofa::helper::system { // A small utility class to temporarly set the current directory to the same as a specified file @@ -81,10 +76,7 @@ class SOFA_HELPER_API SetDirectory }; -} // namespace system - -} // namespace helper +} // namespace sofa::helper::system -} // namespace sofa #endif diff --git a/Sofa/framework/Helper/src/sofa/helper/system/thread/CTime.cpp b/Sofa/framework/Helper/src/sofa/helper/system/thread/CTime.cpp index 2f195e7c500..97b4b8ea7a3 100644 --- a/Sofa/framework/Helper/src/sofa/helper/system/thread/CTime.cpp +++ b/Sofa/framework/Helper/src/sofa/helper/system/thread/CTime.cpp @@ -40,16 +40,8 @@ * Time measurement * ********************/ -namespace sofa -{ - -namespace helper -{ - -namespace system -{ -namespace thread +namespace sofa::helper::system::thread { #if defined(WIN32) @@ -208,11 +200,11 @@ double CTime::toSecond(const ctime_t t) return 1.0*t/CTime::getTicksPerSec() ; } -} // namespace thread +} // namespace sofa::helper::system::thread + + + -} // namespace system -} // namespace helper -} // namespace sofa diff --git a/Sofa/framework/Helper/src/sofa/helper/system/thread/CTime.h b/Sofa/framework/Helper/src/sofa/helper/system/thread/CTime.h index c649ed2128f..82a9e31f4e6 100644 --- a/Sofa/framework/Helper/src/sofa/helper/system/thread/CTime.h +++ b/Sofa/framework/Helper/src/sofa/helper/system/thread/CTime.h @@ -34,16 +34,8 @@ * Time measurement * ********************/ -namespace sofa -{ - -namespace helper -{ -namespace system -{ - -namespace thread +namespace sofa::helper::system::thread { #ifdef WIN32 @@ -81,12 +73,7 @@ class SOFA_HELPER_API CTime static ctime_t computeTicksPerSec(); }; -} // namespace thread - -} // namespace system - -} // namespace helper +} // namespace sofa::helper::system::thread -} // namespace sofa #endif diff --git a/Sofa/framework/Helper/src/sofa/helper/system/thread/CircularQueue.cpp b/Sofa/framework/Helper/src/sofa/helper/system/thread/CircularQueue.cpp index 783193b0b90..357fa7de88a 100644 --- a/Sofa/framework/Helper/src/sofa/helper/system/thread/CircularQueue.cpp +++ b/Sofa/framework/Helper/src/sofa/helper/system/thread/CircularQueue.cpp @@ -21,24 +21,13 @@ ******************************************************************************/ #include -namespace sofa -{ -namespace helper -{ +namespace sofa::helper::system::thread +{} // namespace sofa::helper::system::thread -namespace system -{ -namespace thread -{ -} // namespace thread -} // namespace system -} // namespace helper - -} // namespace sofa diff --git a/Sofa/framework/Helper/src/sofa/helper/system/thread/CircularQueue.h b/Sofa/framework/Helper/src/sofa/helper/system/thread/CircularQueue.h index d09de755e6e..26ad2bdcc1f 100644 --- a/Sofa/framework/Helper/src/sofa/helper/system/thread/CircularQueue.h +++ b/Sofa/framework/Helper/src/sofa/helper/system/thread/CircularQueue.h @@ -28,16 +28,8 @@ #include #include -namespace sofa -{ - -namespace helper -{ -namespace system -{ - -namespace thread +namespace sofa::helper::system::thread { /** @@ -198,12 +190,7 @@ class SOFA_HELPER_API ManyThreadsPerEnd AtomicInt tail; }; -} // namespace thread - -} // namespace system - -} // namespace helper +} // namespace sofa::helper::system::thread -} // namespace sofa #endif // SOFA_HELPER_SYSTEM_THREAD_CIRCULARQUEUE_H diff --git a/Sofa/framework/Helper/src/sofa/helper/system/thread/CircularQueue.inl b/Sofa/framework/Helper/src/sofa/helper/system/thread/CircularQueue.inl index 6d43463cafd..5ba3e700e9f 100644 --- a/Sofa/framework/Helper/src/sofa/helper/system/thread/CircularQueue.inl +++ b/Sofa/framework/Helper/src/sofa/helper/system/thread/CircularQueue.inl @@ -26,16 +26,8 @@ #include #include -namespace sofa -{ - -namespace helper -{ - -namespace system -{ -namespace thread +namespace sofa::helper::system::thread { template class StoragePolicy, class ThreadAccessPolicy> @@ -339,10 +331,10 @@ unsigned ManyThreadsPerEnd::pop(AtomicInt array[], int maxSize, int maxCapacity, return outsize; } -} // namespace thread +} // namespace sofa::helper::system::thread + + + -} // namespace system -} // namespace helper -} // namespace sofa diff --git a/Sofa/framework/Helper/src/sofa/helper/system/thread/debug.cpp b/Sofa/framework/Helper/src/sofa/helper/system/thread/debug.cpp index 9f45264ea05..0719f4462d5 100644 --- a/Sofa/framework/Helper/src/sofa/helper/system/thread/debug.cpp +++ b/Sofa/framework/Helper/src/sofa/helper/system/thread/debug.cpp @@ -26,16 +26,8 @@ #include #include -namespace sofa -{ - -namespace helper -{ - -namespace system -{ -namespace thread +namespace sofa::helper::system::thread { int Trace::mTraceLevel = 0; @@ -119,11 +111,11 @@ void TraceProfile::end(int instant) times[instant] += (int)(endTime-beginTime); } -} // namespace thread +} // namespace sofa::helper::system::thread + + + -} // namespace system -} // namespace helper -} // namespace sofa diff --git a/Sofa/framework/Helper/src/sofa/helper/system/thread/debug.h b/Sofa/framework/Helper/src/sofa/helper/system/thread/debug.h index 42ac5d71b16..cd72ef5ad5c 100644 --- a/Sofa/framework/Helper/src/sofa/helper/system/thread/debug.h +++ b/Sofa/framework/Helper/src/sofa/helper/system/thread/debug.h @@ -29,16 +29,8 @@ #include -namespace sofa -{ - -namespace helper -{ -namespace system -{ - -namespace thread +namespace sofa::helper::system::thread { enum SOFA_HELPER_API TraceLevel @@ -96,12 +88,7 @@ class SOFA_HELPER_API TraceProfile #define TRACE(level, chaine){ } #endif -} // namespace thread - -} // namespace system - -} // namespace helper +} // namespace sofa::helper::system::thread -} // namespace sofa #endif diff --git a/Sofa/framework/Helper/src/sofa/helper/system/thread/thread_specific_ptr.h b/Sofa/framework/Helper/src/sofa/helper/system/thread/thread_specific_ptr.h index d34bdaefeaf..c8fdf7e3abd 100644 --- a/Sofa/framework/Helper/src/sofa/helper/system/thread/thread_specific_ptr.h +++ b/Sofa/framework/Helper/src/sofa/helper/system/thread/thread_specific_ptr.h @@ -36,16 +36,8 @@ #define SOFA_TLS_PTHREAD #endif -namespace sofa -{ - -namespace helper -{ -namespace system -{ - -namespace thread +namespace sofa::helper::system::thread { template class thread_specific_ptr; @@ -115,12 +107,7 @@ class thread_specific_ptr #error thread local storage is not supported on your platform #endif -} // namespace thread - -} // namespace system - -} // namespace helper +} // namespace sofa::helper::system::thread -} // namespace sofa #endif diff --git a/Sofa/framework/Helper/test/system/TestPluginA/ComponentA.cpp b/Sofa/framework/Helper/test/system/TestPluginA/ComponentA.cpp index 938b96279c2..091eb502526 100644 --- a/Sofa/framework/Helper/test/system/TestPluginA/ComponentA.cpp +++ b/Sofa/framework/Helper/test/system/TestPluginA/ComponentA.cpp @@ -24,10 +24,7 @@ #include -namespace sofa -{ - -namespace test +namespace sofa::test { ComponentA::ComponentA() @@ -43,6 +40,6 @@ ComponentA::~ComponentA() int ComponentAClass = core::RegisterObject("Component A").add< ComponentA >(); -} // namespace test +} // namespace sofa::test + -} // namespace sofa diff --git a/Sofa/framework/Helper/test/system/TestPluginA/ComponentA.h b/Sofa/framework/Helper/test/system/TestPluginA/ComponentA.h index 16bac82f3d0..cadd709ebc3 100644 --- a/Sofa/framework/Helper/test/system/TestPluginA/ComponentA.h +++ b/Sofa/framework/Helper/test/system/TestPluginA/ComponentA.h @@ -25,10 +25,8 @@ #include #include -namespace sofa -{ -namespace test +namespace sofa::test { class SOFA_TESTPLUGINA_API ComponentA : public sofa::core::objectmodel::BaseObject @@ -42,9 +40,7 @@ class SOFA_TESTPLUGINA_API ComponentA : public sofa::core::objectmodel::BaseObje ~ComponentA() override; }; -} // namespace test - -} // namespace sofa +} // namespace sofa::test #endif // TESTPLUGINA_COMPONENT_A_H diff --git a/Sofa/framework/Helper/test/system/TestPluginA/ComponentB.cpp b/Sofa/framework/Helper/test/system/TestPluginA/ComponentB.cpp index 55427dc7e90..18573f62896 100644 --- a/Sofa/framework/Helper/test/system/TestPluginA/ComponentB.cpp +++ b/Sofa/framework/Helper/test/system/TestPluginA/ComponentB.cpp @@ -26,10 +26,8 @@ #include #include -namespace sofa -{ -namespace test +namespace sofa::test { template @@ -55,8 +53,6 @@ template class SOFA_TESTPLUGINA_API ComponentB; template class SOFA_TESTPLUGINA_API ComponentB; +} // namespace sofa::test -} // namespace test - -} // namespace sofa diff --git a/Sofa/framework/Helper/test/system/TestPluginA/ComponentB.h b/Sofa/framework/Helper/test/system/TestPluginA/ComponentB.h index 2fdab58784e..c71e847f21c 100644 --- a/Sofa/framework/Helper/test/system/TestPluginA/ComponentB.h +++ b/Sofa/framework/Helper/test/system/TestPluginA/ComponentB.h @@ -26,10 +26,8 @@ #include #include -namespace sofa -{ -namespace test +namespace sofa::test { template @@ -52,9 +50,7 @@ extern template class SOFA_TESTPLUGINA_API ComponentB; #endif // !defined(TESTPLUGINA_COMPONENT_B_CPP) -} // namespace test - -} // namespace sofa +} // namespace sofa::test #endif // TESTPLUGINA_COMPONENT_B_H diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/AnimateBeginEvent.cpp b/Sofa/framework/Simulation/Core/src/sofa/simulation/AnimateBeginEvent.cpp index c95741cc0ce..a88bbd23b33 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/AnimateBeginEvent.cpp +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/AnimateBeginEvent.cpp @@ -21,10 +21,8 @@ ******************************************************************************/ #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { SOFA_EVENT_CPP( AnimateBeginEvent ) @@ -40,6 +38,6 @@ AnimateBeginEvent::~AnimateBeginEvent() { } -} // namespace simulation +} // namespace sofa::simulation + -} // namespace sofa diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/AnimateBeginEvent.h b/Sofa/framework/Simulation/Core/src/sofa/simulation/AnimateBeginEvent.h index 88517d75e9f..19aff882cf2 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/AnimateBeginEvent.h +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/AnimateBeginEvent.h @@ -25,10 +25,8 @@ #include #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { /** @@ -52,8 +50,7 @@ class SOFA_SIMULATION_CORE_API AnimateBeginEvent : public sofa::core::objectmode }; -} // namespace simulation +} // namespace sofa::simulation -} // namespace sofa #endif diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/AnimateEndEvent.cpp b/Sofa/framework/Simulation/Core/src/sofa/simulation/AnimateEndEvent.cpp index 17b9d8848d4..23d88bb0157 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/AnimateEndEvent.cpp +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/AnimateEndEvent.cpp @@ -21,10 +21,8 @@ ******************************************************************************/ #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { SOFA_EVENT_CPP( AnimateEndEvent ) @@ -40,6 +38,6 @@ AnimateEndEvent::~AnimateEndEvent() { } -} // namespace simulation +} // namespace sofa::simulation + -} // namespace sofa diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/AnimateEndEvent.h b/Sofa/framework/Simulation/Core/src/sofa/simulation/AnimateEndEvent.h index 230ec737c86..cf25a382b35 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/AnimateEndEvent.h +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/AnimateEndEvent.h @@ -25,10 +25,8 @@ #include #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { @@ -53,8 +51,7 @@ class SOFA_SIMULATION_CORE_API AnimateEndEvent : public sofa::core::objectmodel: SReal dt; }; -} // namespace simulation +} // namespace sofa::simulation -} // namespace sofa #endif diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/BaseSimulationExporter.cpp b/Sofa/framework/Simulation/Core/src/sofa/simulation/BaseSimulationExporter.cpp index a87e844b097..f9b1fff6635 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/BaseSimulationExporter.cpp +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/BaseSimulationExporter.cpp @@ -24,13 +24,8 @@ #include #include -namespace sofa -{ - -namespace simulation -{ -namespace _basesimulationexporter_ +namespace sofa::simulation::_basesimulationexporter_ { using sofa::simulation::SimulationInitDoneEvent ; using sofa::simulation::AnimateEndEvent ; @@ -141,8 +136,4 @@ void BaseSimulationExporter::cleanup() } -} /// namespace _baseexporter_ - -} /// namespace core - -} /// namespace sofa +} diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/BaseSimulationExporter.h b/Sofa/framework/Simulation/Core/src/sofa/simulation/BaseSimulationExporter.h index 2f7f2cecdf4..361af5dd189 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/BaseSimulationExporter.h +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/BaseSimulationExporter.h @@ -28,10 +28,8 @@ #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { namespace _basesimulationexporter_ @@ -78,12 +76,10 @@ class SOFA_SIMULATION_CORE_API BaseSimulationExporter : public virtual BaseObjec unsigned int m_stepCounter {0}; }; -} /// namespace _baseexporter_ +} using _basesimulationexporter_::BaseSimulationExporter; -} /// namespace simulation - -} /// namespace sofa +} #endif /// SOFA_CORE_EXPORTER_BASEEXPORTER_H diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/BehaviorUpdatePositionVisitor.cpp b/Sofa/framework/Simulation/Core/src/sofa/simulation/BehaviorUpdatePositionVisitor.cpp index bb2892767b3..7526b13e28a 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/BehaviorUpdatePositionVisitor.cpp +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/BehaviorUpdatePositionVisitor.cpp @@ -21,10 +21,9 @@ ******************************************************************************/ #include #include -namespace sofa -{ -namespace simulation + +namespace sofa::simulation { void BehaviorUpdatePositionVisitor::processBehaviorModel(simulation::Node* , core::BehaviorModel* b) @@ -41,8 +40,7 @@ Visitor::Result BehaviorUpdatePositionVisitor::processNodeTopDown(simulation::No } +} // namespace sofa::simulation -} // namespace simulation -} // namespace sofa diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/BehaviorUpdatePositionVisitor.h b/Sofa/framework/Simulation/Core/src/sofa/simulation/BehaviorUpdatePositionVisitor.h index 64ad28dbc59..53348eb29b8 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/BehaviorUpdatePositionVisitor.h +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/BehaviorUpdatePositionVisitor.h @@ -27,10 +27,8 @@ #include #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { /** Update the position of a new simulation step @@ -58,8 +56,7 @@ class SOFA_SIMULATION_CORE_API BehaviorUpdatePositionVisitor : public Visitor SReal dt; }; -} // namespace simulation +} // namespace sofa::simulation -} // namespace sofa #endif diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/CactusStackStorage.cpp b/Sofa/framework/Simulation/Core/src/sofa/simulation/CactusStackStorage.cpp index d1a2ec664fb..886ea281a3e 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/CactusStackStorage.cpp +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/CactusStackStorage.cpp @@ -21,10 +21,8 @@ ******************************************************************************/ #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { void CactusStackStorage::push(void* data) @@ -53,7 +51,7 @@ bool CactusStackStorage::empty() const return stack.empty() && (up == nullptr || up->empty()); } -} // namespace simulation +} // namespace sofa::simulation + -} // namespace sofa diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/CactusStackStorage.h b/Sofa/framework/Simulation/Core/src/sofa/simulation/CactusStackStorage.h index 4bb1222f39f..2ae0f12b262 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/CactusStackStorage.h +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/CactusStackStorage.h @@ -29,10 +29,7 @@ SOFA_HEADER_DEPRECATED_LOCALSTORAGE() -namespace sofa -{ - -namespace simulation +namespace sofa::simulation { @@ -74,8 +71,7 @@ class SOFA_SIMULATION_CORE_API CactusStackStorage : public simulation::LocalStor virtual const char* getClassName() const { return "CactusStackStorage"; } }; -} // namespace simulation +} // namespace sofa::simulation -} // namespace sofa #endif diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/CleanupVisitor.cpp b/Sofa/framework/Simulation/Core/src/sofa/simulation/CleanupVisitor.cpp index 45e89d6761c..7cda4ffb228 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/CleanupVisitor.cpp +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/CleanupVisitor.cpp @@ -22,10 +22,8 @@ #include #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { @@ -59,7 +57,7 @@ void CleanupVisitor::processNodeBottomUp(Node* /*node*/) { } -} // namespace simulation +} // namespace sofa::simulation + -} // namespace sofa diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/CleanupVisitor.h b/Sofa/framework/Simulation/Core/src/sofa/simulation/CleanupVisitor.h index 3e00d192a2e..205354c9a5d 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/CleanupVisitor.h +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/CleanupVisitor.h @@ -24,10 +24,8 @@ #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { @@ -42,8 +40,7 @@ class SOFA_SIMULATION_CORE_API CleanupVisitor : public Visitor }; -} // namespace simulation +} // namespace sofa::simulation -} // namespace sofa #endif diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/CollisionAnimationLoop.h b/Sofa/framework/Simulation/Core/src/sofa/simulation/CollisionAnimationLoop.h index f8cd9d1b156..d8bf0296318 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/CollisionAnimationLoop.h +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/CollisionAnimationLoop.h @@ -29,10 +29,8 @@ #include #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { @@ -86,8 +84,7 @@ class SOFA_SIMULATION_CORE_API CollisionAnimationLoop : public sofa::core::behav const Solvers& getSolverSequence(); }; -} // namespace simulation +} // namespace sofa::simulation -} // namespace sofa #endif /* SOFA_SIMULATION_TREE_COLLISIONANIMATIONLOOP_H */ diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/CollisionBeginEvent.cpp b/Sofa/framework/Simulation/Core/src/sofa/simulation/CollisionBeginEvent.cpp index 5fba9e82287..2a345daea27 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/CollisionBeginEvent.cpp +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/CollisionBeginEvent.cpp @@ -22,15 +22,13 @@ #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { SOFA_EVENT_CPP( CollisionBeginEvent ) -} // namespace simulation +} // namespace sofa::simulation + -} // namespace sofa diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/CollisionBeginEvent.h b/Sofa/framework/Simulation/Core/src/sofa/simulation/CollisionBeginEvent.h index 6f2a6fc9360..6f0f06e9991 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/CollisionBeginEvent.h +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/CollisionBeginEvent.h @@ -25,10 +25,8 @@ #include #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { /** @@ -43,8 +41,7 @@ class SOFA_SIMULATION_CORE_API CollisionBeginEvent : public sofa::core::objectmo inline static const char* GetClassName() { return "CollisionBeginEvent"; } }; -} // namespace simulation +} // namespace sofa::simulation -} // namespace sofa #endif diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/CollisionEndEvent.cpp b/Sofa/framework/Simulation/Core/src/sofa/simulation/CollisionEndEvent.cpp index cbc19274c8a..ac7e7f32651 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/CollisionEndEvent.cpp +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/CollisionEndEvent.cpp @@ -22,15 +22,13 @@ #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { SOFA_EVENT_CPP( CollisionEndEvent ) -} // namespace simulation +} // namespace sofa::simulation + -} // namespace sofa diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/CollisionEndEvent.h b/Sofa/framework/Simulation/Core/src/sofa/simulation/CollisionEndEvent.h index 853138df8f6..e2d476967e4 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/CollisionEndEvent.h +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/CollisionEndEvent.h @@ -26,10 +26,8 @@ #include #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { @@ -45,8 +43,7 @@ class SOFA_SIMULATION_CORE_API CollisionEndEvent : public sofa::core::objectmode static const char* GetClassName() { return "CollisionEndEvent"; } }; -} // namespace simulation +} // namespace sofa::simulation -} // namespace sofa #endif diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/CollisionVisitor.cpp b/Sofa/framework/Simulation/Core/src/sofa/simulation/CollisionVisitor.cpp index a40f4120b59..07860267cf1 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/CollisionVisitor.cpp +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/CollisionVisitor.cpp @@ -25,10 +25,8 @@ #include #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { @@ -142,8 +140,7 @@ void CollisionResponseVisitor::processCollisionPipeline(simulation::Node* } +} // namespace sofa::simulation -} // namespace simulation -} // namespace sofa diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/CollisionVisitor.h b/Sofa/framework/Simulation/Core/src/sofa/simulation/CollisionVisitor.h index 1a7afa24ce1..d0d31ebba19 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/CollisionVisitor.h +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/CollisionVisitor.h @@ -26,10 +26,7 @@ #include -namespace sofa -{ - -namespace simulation +namespace sofa::simulation { @@ -84,9 +81,7 @@ class SOFA_SIMULATION_CORE_API CollisionResponseVisitor : public CollisionVisito }; +} // namespace sofa::simulation -} // namespace simulation - -} // namespace sofa #endif diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/DeactivatedNodeVisitor.cpp b/Sofa/framework/Simulation/Core/src/sofa/simulation/DeactivatedNodeVisitor.cpp index cb3746340b0..cd9e770ca67 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/DeactivatedNodeVisitor.cpp +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/DeactivatedNodeVisitor.cpp @@ -22,10 +22,8 @@ #include #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { Visitor::Result DeactivationVisitor::processNodeTopDown(simulation::Node* node) @@ -52,7 +50,7 @@ void DeactivationVisitor::processNodeBottomUp(simulation::Node* node) } -} // namespace simulation +} // namespace sofa::simulation + -} // namespace sofa diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/DeactivatedNodeVisitor.h b/Sofa/framework/Simulation/Core/src/sofa/simulation/DeactivatedNodeVisitor.h index 215af6fd8b5..190e7b99914 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/DeactivatedNodeVisitor.h +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/DeactivatedNodeVisitor.h @@ -25,10 +25,7 @@ #include -namespace sofa -{ - -namespace simulation +namespace sofa::simulation { class SOFA_SIMULATION_CORE_API DeactivationVisitor : public Visitor @@ -58,8 +55,7 @@ class SOFA_SIMULATION_CORE_API DeactivationVisitor : public Visitor }; -} // namespace simulation +} // namespace sofa::simulation -} // namespace sofa #endif diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/DeleteVisitor.cpp b/Sofa/framework/Simulation/Core/src/sofa/simulation/DeleteVisitor.cpp index 7d91ca7a99b..411429c2dad 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/DeleteVisitor.cpp +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/DeleteVisitor.cpp @@ -22,10 +22,8 @@ #include #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { @@ -45,7 +43,7 @@ void DeleteVisitor::processNodeBottomUp(Node* node) } } -} // namespace simulation +} // namespace sofa::simulation + -} // namespace sofa diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/DeleteVisitor.h b/Sofa/framework/Simulation/Core/src/sofa/simulation/DeleteVisitor.h index 8e2cee63808..fec34a8df82 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/DeleteVisitor.h +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/DeleteVisitor.h @@ -24,10 +24,8 @@ #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { class SOFA_SIMULATION_CORE_API DeleteVisitor : public Visitor @@ -39,8 +37,7 @@ class SOFA_SIMULATION_CORE_API DeleteVisitor : public Visitor const char* getClassName() const override { return "DeleteVisitor"; } }; -} // namespace simulation +} // namespace sofa::simulation -} // namespace sofa #endif diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/ExportGnuplotVisitor.cpp b/Sofa/framework/Simulation/Core/src/sofa/simulation/ExportGnuplotVisitor.cpp index 50dab0bffdb..3f45240fb8b 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/ExportGnuplotVisitor.cpp +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/ExportGnuplotVisitor.cpp @@ -25,10 +25,8 @@ #include #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { simulation::Visitor::Result InitGnuplotVisitor::processNodeTopDown(simulation::Node* node) @@ -88,7 +86,7 @@ simulation::Visitor::Result ExportGnuplotVisitor::processNodeTopDown(simulation: } -} // namespace simulation +} // namespace sofa::simulation + -} // namespace sofa diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/ExportGnuplotVisitor.h b/Sofa/framework/Simulation/Core/src/sofa/simulation/ExportGnuplotVisitor.h index 11212aad46b..da5fb0824e1 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/ExportGnuplotVisitor.h +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/ExportGnuplotVisitor.h @@ -25,10 +25,7 @@ #include -namespace sofa -{ - -namespace simulation +namespace sofa::simulation { @@ -69,8 +66,7 @@ class SOFA_SIMULATION_CORE_API ExportGnuplotVisitor : public simulation::Visitor SReal m_time; }; -} // namespace simulation +} // namespace sofa::simulation -} // namespace sofa #endif diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/ExportVisualModelOBJVisitor.cpp b/Sofa/framework/Simulation/Core/src/sofa/simulation/ExportVisualModelOBJVisitor.cpp index a294ed77b1f..24c924c6c8f 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/ExportVisualModelOBJVisitor.cpp +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/ExportVisualModelOBJVisitor.cpp @@ -24,10 +24,8 @@ #include #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { @@ -65,7 +63,7 @@ void ExportVisualModelOBJVisitor::processNodeBottomUp(Node* /*node*/) { } -} // namespace simulation +} // namespace sofa::simulation + -} // namespace sofa diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/ExportVisualModelOBJVisitor.h b/Sofa/framework/Simulation/Core/src/sofa/simulation/ExportVisualModelOBJVisitor.h index 5d30a0252fa..7ede7b07858 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/ExportVisualModelOBJVisitor.h +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/ExportVisualModelOBJVisitor.h @@ -25,10 +25,8 @@ #include #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { class SOFA_SIMULATION_CORE_API ExportVisualModelOBJVisitor : public Visitor @@ -55,7 +53,7 @@ class SOFA_SIMULATION_CORE_API ExportVisualModelOBJVisitor : public Visitor int count; }; -} // namespace simulation +} // namespace sofa::simulation + -} // namespace sofa diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/InitVisitor.cpp b/Sofa/framework/Simulation/Core/src/sofa/simulation/InitVisitor.cpp index ea0d4df38d7..de84e195965 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/InitVisitor.cpp +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/InitVisitor.cpp @@ -25,10 +25,8 @@ #include #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { @@ -69,8 +67,7 @@ void InitVisitor::processNodeBottomUp(simulation::Node* node) } +} // namespace sofa::simulation -} // namespace simulation -} // namespace sofa diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/InitVisitor.h b/Sofa/framework/Simulation/Core/src/sofa/simulation/InitVisitor.h index cb73bd2290e..a9008bae95a 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/InitVisitor.h +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/InitVisitor.h @@ -26,10 +26,8 @@ #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { /** Initialize a newly created (or modified) scene graph. @@ -61,8 +59,7 @@ class SOFA_SIMULATION_CORE_API InitVisitor : public Visitor Node *rootNode; }; -} // namespace simulation +} // namespace sofa::simulation -} // namespace sofa #endif diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/IntegrateBeginEvent.cpp b/Sofa/framework/Simulation/Core/src/sofa/simulation/IntegrateBeginEvent.cpp index 1e3c9717cdf..3e7fd88278d 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/IntegrateBeginEvent.cpp +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/IntegrateBeginEvent.cpp @@ -22,15 +22,13 @@ #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { SOFA_EVENT_CPP( IntegrateBeginEvent ) -} // namespace simulation +} // namespace sofa::simulation + -} // namespace sofa diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/IntegrateBeginEvent.h b/Sofa/framework/Simulation/Core/src/sofa/simulation/IntegrateBeginEvent.h index 8bbd0d9d2e0..462dacf188a 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/IntegrateBeginEvent.h +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/IntegrateBeginEvent.h @@ -25,10 +25,8 @@ #include #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { /** @@ -43,8 +41,7 @@ class SOFA_SIMULATION_CORE_API IntegrateBeginEvent : public sofa::core::objectmo inline static const char* GetClassName() { return "IntegrateBeginEvent"; } }; -} // namespace simulation +} // namespace sofa::simulation -} // namespace sofa #endif diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/IntegrateEndEvent.cpp b/Sofa/framework/Simulation/Core/src/sofa/simulation/IntegrateEndEvent.cpp index 467ea3ed669..d21c4c85357 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/IntegrateEndEvent.cpp +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/IntegrateEndEvent.cpp @@ -22,15 +22,13 @@ #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { SOFA_EVENT_CPP( IntegrateEndEvent ) -} // namespace simulation +} // namespace sofa::simulation + -} // namespace sofa diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/IntegrateEndEvent.h b/Sofa/framework/Simulation/Core/src/sofa/simulation/IntegrateEndEvent.h index d2c73c6d566..997718673a4 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/IntegrateEndEvent.h +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/IntegrateEndEvent.h @@ -25,10 +25,8 @@ #include #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { /** @@ -43,8 +41,7 @@ class SOFA_SIMULATION_CORE_API IntegrateEndEvent : public sofa::core::objectmode inline static const char* GetClassName() { return "IntegrateEndEvent"; } }; -} // namespace simulation +} // namespace sofa::simulation -} // namespace sofa #endif diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/LocalStorage.h b/Sofa/framework/Simulation/Core/src/sofa/simulation/LocalStorage.h index 2df86d938c2..ca6d786401a 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/LocalStorage.h +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/LocalStorage.h @@ -26,10 +26,8 @@ SOFA_HEADER_DEPRECATED_LOCALSTORAGE() -namespace sofa -{ -namespace simulation +namespace sofa::simulation { @@ -49,8 +47,7 @@ class LocalStorage virtual bool empty() const = 0; }; -} // namespace simulation +} // namespace sofa::simulation -} // namespace sofa #endif diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/MechanicalVPrintVisitor.cpp b/Sofa/framework/Simulation/Core/src/sofa/simulation/MechanicalVPrintVisitor.cpp index 91b211d28e6..684ac191836 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/MechanicalVPrintVisitor.cpp +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/MechanicalVPrintVisitor.cpp @@ -23,10 +23,9 @@ #include #include using namespace sofa::core; -namespace sofa -{ -namespace simulation + +namespace sofa::simulation { @@ -101,6 +100,6 @@ Visitor::Result DofPrintVisitor::processNodeTopDown(simulation::Node* node) } -} // namespace simulation +} // namespace sofa::simulation + -} // namespace sofa diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/MechanicalVPrintVisitor.h b/Sofa/framework/Simulation/Core/src/sofa/simulation/MechanicalVPrintVisitor.h index 4f79b158287..1dfb717f274 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/MechanicalVPrintVisitor.h +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/MechanicalVPrintVisitor.h @@ -29,10 +29,7 @@ #include -namespace sofa -{ - -namespace simulation +namespace sofa::simulation { @@ -83,8 +80,7 @@ class SOFA_SIMULATION_CORE_API DofPrintVisitor : public Visitor }; -} // namespace simulation +} // namespace sofa::simulation -} // namespace sofa #endif diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/MutationListener.cpp b/Sofa/framework/Simulation/Core/src/sofa/simulation/MutationListener.cpp index 5a76deb627e..7206387f3a7 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/MutationListener.cpp +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/MutationListener.cpp @@ -23,10 +23,8 @@ #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { MutationListener::~MutationListener() {} @@ -104,6 +102,6 @@ void MutationListener::onEndRemoveSlave(core::objectmodel::BaseObject *master, SOFA_UNUSED(slave); } -} // namespace simulation +} // namespace sofa::simulation + -} // namespace sofa diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/MutationListener.h b/Sofa/framework/Simulation/Core/src/sofa/simulation/MutationListener.h index 49d5cb99321..c770fb5891c 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/MutationListener.h +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/MutationListener.h @@ -26,10 +26,8 @@ #include #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { class Node; @@ -75,8 +73,7 @@ class SOFA_SIMULATION_CORE_API MutationListener core::objectmodel::BaseObject *slave); }; -} // namespace simulation +} // namespace sofa::simulation -} // namespace sofa #endif diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/ParallelVisitorScheduler.cpp b/Sofa/framework/Simulation/Core/src/sofa/simulation/ParallelVisitorScheduler.cpp index 331d1af550f..9f7ad0cc8bb 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/ParallelVisitorScheduler.cpp +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/ParallelVisitorScheduler.cpp @@ -23,10 +23,8 @@ #include #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { @@ -58,7 +56,7 @@ void ParallelVisitorScheduler::recursiveClone(Node* node) } -} // namespace simulation +} // namespace sofa::simulation + -} // namespace sofa diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/ParallelVisitorScheduler.h b/Sofa/framework/Simulation/Core/src/sofa/simulation/ParallelVisitorScheduler.h index 51a907d17a6..01343239964 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/ParallelVisitorScheduler.h +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/ParallelVisitorScheduler.h @@ -28,10 +28,8 @@ SOFA_HEADER_DEPRECATED_PARALLELVISITORSCHEDULER() #include #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { @@ -56,8 +54,7 @@ class SOFA_SIMULATION_CORE_API ParallelVisitorScheduler : public simulation::Vis virtual void executeParallelVisitor(Node* node, Visitor* action) = 0; }; -} // namespace simulation +} // namespace sofa::simulation -} // namespace sofa #endif diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/PauseEvent.cpp b/Sofa/framework/Simulation/Core/src/sofa/simulation/PauseEvent.cpp index bc3dd6c1707..d6c051ad0ed 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/PauseEvent.cpp +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/PauseEvent.cpp @@ -21,10 +21,8 @@ ******************************************************************************/ #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { SOFA_EVENT_CPP( PauseEvent ) @@ -39,6 +37,6 @@ PauseEvent::~PauseEvent() { } -} // namespace simulation +} // namespace sofa::simulation + -} // namespace sofa diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/PauseEvent.h b/Sofa/framework/Simulation/Core/src/sofa/simulation/PauseEvent.h index c8630b832c3..2d9d282d360 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/PauseEvent.h +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/PauseEvent.h @@ -25,10 +25,8 @@ #include #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { /** @@ -48,8 +46,7 @@ class SOFA_SIMULATION_CORE_API PauseEvent : public sofa::core::objectmodel::Even }; -} // namespace simulation +} // namespace sofa::simulation -} // namespace sofa #endif diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/PipelineImpl.h b/Sofa/framework/Simulation/Core/src/sofa/simulation/PipelineImpl.h index 5a8da87cd89..5d220d9e23c 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/PipelineImpl.h +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/PipelineImpl.h @@ -25,10 +25,8 @@ #include #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { class SOFA_SIMULATION_CORE_API PipelineImpl : public sofa::core::collision::Pipeline @@ -52,8 +50,7 @@ class SOFA_SIMULATION_CORE_API PipelineImpl : public sofa::core::collision::Pipe }; -} // namespace simulation +} // namespace sofa::simulation -} // namespace sofa #endif diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/PositionEvent.cpp b/Sofa/framework/Simulation/Core/src/sofa/simulation/PositionEvent.cpp index 585de4a1547..3efd1548f78 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/PositionEvent.cpp +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/PositionEvent.cpp @@ -21,10 +21,8 @@ ******************************************************************************/ #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { SOFA_EVENT_CPP( PositionEvent ) @@ -39,6 +37,6 @@ PositionEvent::~PositionEvent() { } -} // namespace simulation +} // namespace sofa::simulation + -} // namespace sofa diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/PositionEvent.h b/Sofa/framework/Simulation/Core/src/sofa/simulation/PositionEvent.h index 851e897b0dd..6392b796926 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/PositionEvent.h +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/PositionEvent.h @@ -25,10 +25,8 @@ #include #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { /** @@ -48,8 +46,7 @@ class SOFA_SIMULATION_CORE_API PositionEvent : public sofa::core::objectmodel::E }; -} // namespace simulation +} // namespace sofa::simulation -} // namespace sofa #endif diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/PrintVisitor.cpp b/Sofa/framework/Simulation/Core/src/sofa/simulation/PrintVisitor.cpp index eec056b3397..fd6d85b89f2 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/PrintVisitor.cpp +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/PrintVisitor.cpp @@ -36,10 +36,8 @@ #include #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { @@ -98,7 +96,7 @@ void PrintVisitor::processNodeBottomUp(simulation::Node* /*node*/) --level; } -} // namespace simulation +} // namespace sofa::simulation + -} // namespace sofa diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/PrintVisitor.h b/Sofa/framework/Simulation/Core/src/sofa/simulation/PrintVisitor.h index 71c91790597..45cef618b45 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/PrintVisitor.h +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/PrintVisitor.h @@ -26,10 +26,7 @@ #include -namespace sofa -{ - -namespace simulation +namespace sofa::simulation { @@ -68,8 +65,7 @@ class SOFA_SIMULATION_CORE_API PrintVisitor : public Visitor const char* getClassName() const override { return "PrintVisitor"; } }; -} // namespace simulation +} // namespace sofa::simulation -} // namespace sofa #endif diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/ResetVisitor.cpp b/Sofa/framework/Simulation/Core/src/sofa/simulation/ResetVisitor.cpp index 3e9bde8bff8..3fa466d3a18 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/ResetVisitor.cpp +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/ResetVisitor.cpp @@ -22,10 +22,8 @@ #include #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { @@ -66,7 +64,7 @@ void StoreResetStateVisitor::processNodeBottomUp(simulation::Node* /*node*/) { } -} // namespace simulation +} // namespace sofa::simulation + -} // namespace sofa diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/ResetVisitor.h b/Sofa/framework/Simulation/Core/src/sofa/simulation/ResetVisitor.h index 537c5f01993..3c17b36215a 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/ResetVisitor.h +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/ResetVisitor.h @@ -24,10 +24,8 @@ #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { class SOFA_SIMULATION_CORE_API ResetVisitor : public Visitor @@ -60,8 +58,7 @@ class SOFA_SIMULATION_CORE_API StoreResetStateVisitor : public Visitor const char* getClassName() const override { return "StoreResetStateVisitor"; } }; -} // namespace simulation +} // namespace sofa::simulation -} // namespace sofa #endif diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/SceneLoaderFactory.cpp b/Sofa/framework/Simulation/Core/src/sofa/simulation/SceneLoaderFactory.cpp index 132f234e107..ccc858c4987 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/SceneLoaderFactory.cpp +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/SceneLoaderFactory.cpp @@ -25,9 +25,7 @@ #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { SceneLoader::Listeners SceneLoader::s_listeners; @@ -224,8 +222,8 @@ SceneLoader* SceneLoaderFactory::addEntry(SceneLoader *loader) return loader; } -} // namespace simulation +} // namespace sofa::simulation + -} // namespace sofa diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/SceneLoaderFactory.h b/Sofa/framework/Simulation/Core/src/sofa/simulation/SceneLoaderFactory.h index bb83f4096e3..f75b62addb3 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/SceneLoaderFactory.h +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/SceneLoaderFactory.h @@ -29,10 +29,8 @@ #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { /** @@ -145,9 +143,7 @@ class SOFA_SIMULATION_CORE_API SceneLoaderFactory }; -} // namespace simulation - -} // namespace sofa +} // namespace sofa::simulation #endif // SOFA_SIMULATION_SCENELOADERFACTORY_H diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/StateChangeVisitor.cpp b/Sofa/framework/Simulation/Core/src/sofa/simulation/StateChangeVisitor.cpp index f75a388660e..595b170a14a 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/StateChangeVisitor.cpp +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/StateChangeVisitor.cpp @@ -26,10 +26,8 @@ #include #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { StateChangeVisitor::StateChangeVisitor(const sofa::core::ExecParams* params, sofa::core::topology::Topology* source) @@ -75,7 +73,7 @@ Visitor::Result StateChangeVisitor::processNodeTopDown(simulation::Node* node) return RESULT_CONTINUE; // continue the propagation of state changes } -} // namespace simulation +} // namespace sofa::simulation + -} // namespace sofa diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/StateChangeVisitor.h b/Sofa/framework/Simulation/Core/src/sofa/simulation/StateChangeVisitor.h index 993c5ec4994..4d7cc246dc2 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/StateChangeVisitor.h +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/StateChangeVisitor.h @@ -24,10 +24,8 @@ #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { class SOFA_SIMULATION_CORE_API StateChangeVisitor : public Visitor @@ -54,8 +52,7 @@ class SOFA_SIMULATION_CORE_API StateChangeVisitor : public Visitor }; -} // namespace simulation +} // namespace sofa::simulation -} // namespace sofa #endif diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/TopologyChangeVisitor.cpp b/Sofa/framework/Simulation/Core/src/sofa/simulation/TopologyChangeVisitor.cpp index 09df789cb94..82f3806689d 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/TopologyChangeVisitor.cpp +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/TopologyChangeVisitor.cpp @@ -25,10 +25,8 @@ #include #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { @@ -108,7 +106,7 @@ void TopologyChangeVisitor::processNodeBottomUp(simulation::Node* node) } -} // namespace simulation +} // namespace sofa::simulation + -} // namespace sofa diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/TopologyChangeVisitor.h b/Sofa/framework/Simulation/Core/src/sofa/simulation/TopologyChangeVisitor.h index 9c92f89259f..9be70787b0f 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/TopologyChangeVisitor.h +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/TopologyChangeVisitor.h @@ -24,10 +24,8 @@ #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { class SOFA_SIMULATION_CORE_API TopologyChangeVisitor : public Visitor @@ -56,8 +54,7 @@ class SOFA_SIMULATION_CORE_API TopologyChangeVisitor : public Visitor }; -} // namespace simulation +} // namespace sofa::simulation -} // namespace sofa #endif diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/UpdateContextVisitor.cpp b/Sofa/framework/Simulation/Core/src/sofa/simulation/UpdateContextVisitor.cpp index ba496ccafd9..a5ab3533a44 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/UpdateContextVisitor.cpp +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/UpdateContextVisitor.cpp @@ -24,10 +24,8 @@ #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { Visitor::Result UpdateContextVisitor::processNodeTopDown(simulation::Node* node) @@ -65,7 +63,7 @@ Visitor::Result UpdateVisualContextVisitor::processNodeTopDown(simulation::Node* } -} // namespace simulation +} // namespace sofa::simulation + -} // namespace sofa diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/UpdateContextVisitor.h b/Sofa/framework/Simulation/Core/src/sofa/simulation/UpdateContextVisitor.h index 74f2c7f2206..87947da8711 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/UpdateContextVisitor.h +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/UpdateContextVisitor.h @@ -27,13 +27,12 @@ namespace sofa { -namespace core -{ -namespace visual + +namespace core::visual { -class VisualParams; -} // namespace visual -} // namespace core +class VisualParams; +} // namespace core::visual + namespace simulation { diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/UpdateInternalDataVisitor.cpp b/Sofa/framework/Simulation/Core/src/sofa/simulation/UpdateInternalDataVisitor.cpp index 0d55b6b107a..d815ff078a2 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/UpdateInternalDataVisitor.cpp +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/UpdateInternalDataVisitor.cpp @@ -21,10 +21,9 @@ ******************************************************************************/ #include #include -namespace sofa -{ -namespace simulation + +namespace sofa::simulation { @@ -40,7 +39,6 @@ void UpdateInternalDataVisitor::processUpdateInternalData(simulation::Node* , so } +} // namespace sofa::simulation -} // namespace simulation -} // namespace sofa diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/UpdateInternalDataVisitor.h b/Sofa/framework/Simulation/Core/src/sofa/simulation/UpdateInternalDataVisitor.h index 72bc6610be5..1204f8039f4 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/UpdateInternalDataVisitor.h +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/UpdateInternalDataVisitor.h @@ -26,10 +26,8 @@ #include #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { /** Triggers the updateInternal() function to update method called @@ -53,8 +51,7 @@ class SOFA_SIMULATION_CORE_API UpdateInternalDataVisitor : public Visitor const char* getClassName() const override { return "UpdateInternalDataVisitor"; } }; -} // namespace simulation +} // namespace sofa::simulation -} // namespace sofa #endif diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/UpdateLinksVisitor.cpp b/Sofa/framework/Simulation/Core/src/sofa/simulation/UpdateLinksVisitor.cpp index b1a3e765ba2..272219dc966 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/UpdateLinksVisitor.cpp +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/UpdateLinksVisitor.cpp @@ -22,10 +22,8 @@ #include #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { @@ -50,7 +48,7 @@ void UpdateLinksVisitor::processNodeBottomUp(simulation::Node* /*node*/) { } -} // namespace simulation +} // namespace sofa::simulation + -} // namespace sofa diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/UpdateLinksVisitor.h b/Sofa/framework/Simulation/Core/src/sofa/simulation/UpdateLinksVisitor.h index 22d20c8802c..5a003922670 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/UpdateLinksVisitor.h +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/UpdateLinksVisitor.h @@ -24,10 +24,8 @@ #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { class SOFA_SIMULATION_CORE_API UpdateLinksVisitor : public Visitor @@ -45,8 +43,7 @@ class SOFA_SIMULATION_CORE_API UpdateLinksVisitor : public Visitor const char* getClassName() const override { return "UpdateLinksVisitor"; } }; -} // namespace simulation +} // namespace sofa::simulation -} // namespace sofa #endif diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/UpdateMappingEndEvent.cpp b/Sofa/framework/Simulation/Core/src/sofa/simulation/UpdateMappingEndEvent.cpp index a6fa315b2bd..85efdba47c3 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/UpdateMappingEndEvent.cpp +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/UpdateMappingEndEvent.cpp @@ -21,10 +21,8 @@ ******************************************************************************/ #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { SOFA_EVENT_CPP( UpdateMappingEndEvent ) @@ -40,6 +38,6 @@ UpdateMappingEndEvent::~UpdateMappingEndEvent() { } -} // namespace simulation +} // namespace sofa::simulation + -} // namespace sofa diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/UpdateMappingEndEvent.h b/Sofa/framework/Simulation/Core/src/sofa/simulation/UpdateMappingEndEvent.h index f7ac7b032c4..316030b064d 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/UpdateMappingEndEvent.h +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/UpdateMappingEndEvent.h @@ -25,10 +25,8 @@ #include #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { /** @@ -51,8 +49,7 @@ class SOFA_SIMULATION_CORE_API UpdateMappingEndEvent : public sofa::core::object SReal dt; }; -} // namespace simulation +} // namespace sofa::simulation -} // namespace sofa #endif diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/UpdateMappingVisitor.cpp b/Sofa/framework/Simulation/Core/src/sofa/simulation/UpdateMappingVisitor.cpp index 3e670b1b065..1f880df44c8 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/UpdateMappingVisitor.cpp +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/UpdateMappingVisitor.cpp @@ -25,10 +25,8 @@ #include #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { void UpdateMappingVisitor::processMapping(simulation::Node* /*n*/, core::BaseMapping* obj) @@ -55,7 +53,7 @@ Visitor::Result UpdateMappingVisitor::processNodeTopDown(simulation::Node* node) return RESULT_CONTINUE; } -} // namespace simulation +} // namespace sofa::simulation + -} // namespace sofa diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/UpdateMappingVisitor.h b/Sofa/framework/Simulation/Core/src/sofa/simulation/UpdateMappingVisitor.h index 9a051def1bb..b101cb240a2 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/UpdateMappingVisitor.h +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/UpdateMappingVisitor.h @@ -24,10 +24,8 @@ #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { /// propagating position and velocity through non-mechanical mappings @@ -50,8 +48,7 @@ class SOFA_SIMULATION_CORE_API UpdateMappingVisitor : public Visitor bool isThreadSafe() const override { return true; } }; -} // namespace simulation +} // namespace sofa::simulation -} // namespace sofa #endif diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/VelocityThresholdVisitor.cpp b/Sofa/framework/Simulation/Core/src/sofa/simulation/VelocityThresholdVisitor.cpp index e65d7877519..364529bc38f 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/VelocityThresholdVisitor.cpp +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/VelocityThresholdVisitor.cpp @@ -26,10 +26,8 @@ #include #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { VelocityThresholdVisitor::VelocityThresholdVisitor( const core::ExecParams* params, core::MultiVecId v, SReal t ) @@ -48,7 +46,7 @@ Visitor::Result VelocityThresholdVisitor::processNodeTopDown(simulation::Node* n return Visitor::RESULT_CONTINUE; } -} // namespace simulation +} // namespace sofa::simulation + -} // namespace sofa diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/VelocityThresholdVisitor.h b/Sofa/framework/Simulation/Core/src/sofa/simulation/VelocityThresholdVisitor.h index f730fe6f74b..c69d0e34c7d 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/VelocityThresholdVisitor.h +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/VelocityThresholdVisitor.h @@ -25,10 +25,8 @@ #include #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { class SOFA_SIMULATION_CORE_API VelocityThresholdVisitor : public Visitor @@ -53,8 +51,7 @@ class SOFA_SIMULATION_CORE_API VelocityThresholdVisitor : public Visitor SReal threshold; ///< All the entries below this threshold will be set to 0. }; -} // namespace simulation +} // namespace sofa::simulation -} // namespace sofa #endif diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/VisitorScheduler.cpp b/Sofa/framework/Simulation/Core/src/sofa/simulation/VisitorScheduler.cpp index b90dd4f48a1..0bc563c910b 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/VisitorScheduler.cpp +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/VisitorScheduler.cpp @@ -22,10 +22,8 @@ #include #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { /// Execute the given action recursively @@ -34,7 +32,7 @@ void VisitorScheduler::doExecuteVisitor(simulation::Node* node, Visitor* act) node->doExecuteVisitor(act); } -} // namespace simulation +} // namespace sofa::simulation + -} // namespace sofa diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/VisitorScheduler.h b/Sofa/framework/Simulation/Core/src/sofa/simulation/VisitorScheduler.h index 23b441ba0c6..4b1f766db98 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/VisitorScheduler.h +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/VisitorScheduler.h @@ -28,10 +28,8 @@ SOFA_HEADER_DEPRECATED_VISITORSCHEDULER() #include #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { class Visitor; @@ -64,8 +62,7 @@ class SOFA_SIMULATION_CORE_API VisitorScheduler : public virtual sofa::core::obj }; -} // namespace simulation +} // namespace sofa::simulation -} // namespace sofa #endif diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/VisualVisitor.cpp b/Sofa/framework/Simulation/Core/src/sofa/simulation/VisualVisitor.cpp index 151dab3fe8e..4a117cb7aa2 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/VisualVisitor.cpp +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/VisualVisitor.cpp @@ -34,10 +34,8 @@ #define DO_DEBUG_DRAW false #endif // DEBUG_DRAW -namespace sofa -{ -namespace simulation +namespace sofa::simulation { Visitor::Result VisualVisitor::processNodeTopDown(simulation::Node* node) @@ -206,7 +204,7 @@ void VisualComputeBBoxVisitor::processBehaviorModel(simulation::Node*, core::Beh bm->addBBox(minBBox, maxBBox); } -} // namespace simulation +} // namespace sofa::simulation + -} // namespace sofa diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/VisualVisitor.h b/Sofa/framework/Simulation/Core/src/sofa/simulation/VisualVisitor.h index dd1bf5e7177..bc5e3090068 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/VisualVisitor.h +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/VisualVisitor.h @@ -26,10 +26,7 @@ #include -namespace sofa -{ - -namespace simulation +namespace sofa::simulation { class SOFA_SIMULATION_CORE_API VisualVisitor : public Visitor @@ -130,8 +127,7 @@ class SOFA_SIMULATION_CORE_API VisualClearVisitor : public VisualVisitor }; -} // namespace simulation +} // namespace sofa::simulation -} // namespace sofa #endif diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/WriteStateVisitor.cpp b/Sofa/framework/Simulation/Core/src/sofa/simulation/WriteStateVisitor.cpp index 803ac0f8654..9a759559e1c 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/WriteStateVisitor.cpp +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/WriteStateVisitor.cpp @@ -23,10 +23,9 @@ #include #include #include -namespace sofa -{ -namespace simulation + +namespace sofa::simulation { @@ -46,7 +45,7 @@ Visitor::Result WriteStateVisitor::processNodeTopDown( simulation::Node* gnode ) return Visitor::RESULT_CONTINUE; } -} // namespace simulation +} // namespace sofa::simulation + -} // namespace sofa diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/WriteStateVisitor.h b/Sofa/framework/Simulation/Core/src/sofa/simulation/WriteStateVisitor.h index 98a0ac01b32..00de373b2fa 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/WriteStateVisitor.h +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/WriteStateVisitor.h @@ -24,10 +24,8 @@ #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { class SOFA_SIMULATION_CORE_API WriteStateVisitor: public Visitor @@ -43,7 +41,7 @@ class SOFA_SIMULATION_CORE_API WriteStateVisitor: public Visitor std::ostream& m_out; }; -} // namespace simulation -} // namespace sofa +} // namespace sofa::simulation + #endif diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/XMLPrintVisitor.cpp b/Sofa/framework/Simulation/Core/src/sofa/simulation/XMLPrintVisitor.cpp index 2f0b8726fe3..d9e9083ce84 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/XMLPrintVisitor.cpp +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/XMLPrintVisitor.cpp @@ -23,10 +23,8 @@ #include #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { @@ -139,7 +137,7 @@ bool XMLPrintVisitor::treeTraversal(TreeTraversalRepetition& repeat) return true; } -} // namespace simulation +} // namespace sofa::simulation + -} // namespace sofa diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/XMLPrintVisitor.h b/Sofa/framework/Simulation/Core/src/sofa/simulation/XMLPrintVisitor.h index 9558c617e32..1a969fad869 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/XMLPrintVisitor.h +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/XMLPrintVisitor.h @@ -27,10 +27,7 @@ #include -namespace sofa -{ - -namespace simulation +namespace sofa::simulation { @@ -58,8 +55,7 @@ class SOFA_SIMULATION_CORE_API XMLPrintVisitor : public Visitor bool treeTraversal(TreeTraversalRepetition& repeat) override; }; -} // namespace simulation +} // namespace sofa::simulation -} // namespace sofa #endif diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/events/SimulationInitDoneEvent.cpp b/Sofa/framework/Simulation/Core/src/sofa/simulation/events/SimulationInitDoneEvent.cpp index eba098d5b6e..3ef5df19d05 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/events/SimulationInitDoneEvent.cpp +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/events/SimulationInitDoneEvent.cpp @@ -21,10 +21,8 @@ ******************************************************************************/ #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { SOFA_EVENT_CPP( SimulationInitDoneEvent ) @@ -32,6 +30,6 @@ SOFA_EVENT_CPP( SimulationInitDoneEvent ) SimulationInitDoneEvent::SimulationInitDoneEvent(){} SimulationInitDoneEvent::~SimulationInitDoneEvent(){} -} // namespace simulation +} // namespace sofa::simulation + -} // namespace sofa diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/events/SimulationInitDoneEvent.h b/Sofa/framework/Simulation/Core/src/sofa/simulation/events/SimulationInitDoneEvent.h index fad3185b998..17880080237 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/events/SimulationInitDoneEvent.h +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/events/SimulationInitDoneEvent.h @@ -24,10 +24,8 @@ #include #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { /** @@ -46,7 +44,7 @@ class SOFA_SIMULATION_CORE_API SimulationInitDoneEvent : public sofa::core::obje }; -} // namespace simulation +} // namespace sofa::simulation + -} // namespace sofa diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/events/SimulationInitStartEvent.cpp b/Sofa/framework/Simulation/Core/src/sofa/simulation/events/SimulationInitStartEvent.cpp index f0182a1f7c0..67e2fd72015 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/events/SimulationInitStartEvent.cpp +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/events/SimulationInitStartEvent.cpp @@ -21,10 +21,8 @@ ******************************************************************************/ #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { SOFA_EVENT_CPP( SimulationInitStartEvent ) @@ -33,6 +31,6 @@ SimulationInitStartEvent::SimulationInitStartEvent(){} SimulationInitStartEvent::~SimulationInitStartEvent(){} -} // namespace simulation +} // namespace sofa::simulation + -} // namespace sofa diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/events/SimulationInitStartEvent.h b/Sofa/framework/Simulation/Core/src/sofa/simulation/events/SimulationInitStartEvent.h index 93ceb61e9e5..4865f741d02 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/events/SimulationInitStartEvent.h +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/events/SimulationInitStartEvent.h @@ -24,10 +24,8 @@ #include #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { /** @@ -46,7 +44,7 @@ class SOFA_SIMULATION_CORE_API SimulationInitStartEvent : public sofa::core::obj }; -} // namespace simulation +} // namespace sofa::simulation + -} // namespace sofa diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/events/SimulationStartEvent.cpp b/Sofa/framework/Simulation/Core/src/sofa/simulation/events/SimulationStartEvent.cpp index 64c5840a182..9324d02568e 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/events/SimulationStartEvent.cpp +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/events/SimulationStartEvent.cpp @@ -21,10 +21,8 @@ ******************************************************************************/ #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { SOFA_EVENT_CPP( SimulationStartEvent ) @@ -32,6 +30,6 @@ SOFA_EVENT_CPP( SimulationStartEvent ) SimulationStartEvent::SimulationStartEvent(){} SimulationStartEvent::~SimulationStartEvent(){} -} // namespace simulation +} // namespace sofa::simulation + -} // namespace sofa diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/events/SimulationStartEvent.h b/Sofa/framework/Simulation/Core/src/sofa/simulation/events/SimulationStartEvent.h index 244d4c541f8..0629e1d505f 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/events/SimulationStartEvent.h +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/events/SimulationStartEvent.h @@ -24,10 +24,8 @@ #include #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { /** @@ -45,6 +43,6 @@ class SOFA_SIMULATION_CORE_API SimulationStartEvent : public sofa::core::objectm inline static const char* GetClassName() { return "SimulationStartEvent"; } }; -} // namespace simulation +} // namespace sofa::simulation + -} // namespace sofa diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/events/SimulationStopEvent.cpp b/Sofa/framework/Simulation/Core/src/sofa/simulation/events/SimulationStopEvent.cpp index 9cb5a850643..a06afebbd5d 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/events/SimulationStopEvent.cpp +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/events/SimulationStopEvent.cpp @@ -21,10 +21,8 @@ ******************************************************************************/ #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { SOFA_EVENT_CPP( SimulationStopEvent ) @@ -32,6 +30,6 @@ SOFA_EVENT_CPP( SimulationStopEvent ) SimulationStopEvent::SimulationStopEvent(){} SimulationStopEvent::~SimulationStopEvent(){} -} // namespace simulation +} // namespace sofa::simulation + -} // namespace sofa diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/events/SimulationStopEvent.h b/Sofa/framework/Simulation/Core/src/sofa/simulation/events/SimulationStopEvent.h index 2e3da972014..0c2fceda7e5 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/events/SimulationStopEvent.h +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/events/SimulationStopEvent.h @@ -24,10 +24,8 @@ #include #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { /** @@ -45,7 +43,7 @@ class SOFA_SIMULATION_CORE_API SimulationStopEvent : public sofa::core::objectmo inline static const char* GetClassName() { return "SimulationStopEvent"; } }; -} // namespace simulation +} // namespace sofa::simulation + -} // namespace sofa diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/init.cpp b/Sofa/framework/Simulation/Core/src/sofa/simulation/init.cpp index a5f50c806f8..301bab4597f 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/init.cpp +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/init.cpp @@ -26,13 +26,8 @@ #include -namespace sofa -{ - -namespace simulation -{ -namespace core +namespace sofa::simulation::core { static bool s_initialized = false; @@ -78,8 +73,8 @@ static const struct CleanupCheck } } check; -} // namespace core +} // namespace sofa::simulation::core + + -} // namespace simulation -} // namespace sofa diff --git a/Sofa/framework/Simulation/Core/src/sofa/simulation/init.h b/Sofa/framework/Simulation/Core/src/sofa/simulation/init.h index 8bc66a6d222..8ea2a01261e 100644 --- a/Sofa/framework/Simulation/Core/src/sofa/simulation/init.h +++ b/Sofa/framework/Simulation/Core/src/sofa/simulation/init.h @@ -24,13 +24,8 @@ #include -namespace sofa -{ - -namespace simulation -{ -namespace core +namespace sofa::simulation::core { /// @brief Initialize the SofaSimulationCore library, as well as its @@ -49,10 +44,7 @@ SOFA_SIMULATION_CORE_API void cleanup(); /// cleaned up. SOFA_SIMULATION_CORE_API bool isCleanedUp(); -} // namespace core - -} // namespace simulation +} // namespace sofa::simulation::core -} // namespace sofa #endif // SOFA_SIMULATION_CORE_INIT_H diff --git a/applications/plugins/CImgPlugin/src/CImgPlugin/ImageCImg.cpp b/applications/plugins/CImgPlugin/src/CImgPlugin/ImageCImg.cpp index f9d787188f2..9b612c1e4ef 100644 --- a/applications/plugins/CImgPlugin/src/CImgPlugin/ImageCImg.cpp +++ b/applications/plugins/CImgPlugin/src/CImgPlugin/ImageCImg.cpp @@ -8,14 +8,8 @@ MSG_REGISTER_CLASS(sofa::helper::io::ImageCImg, "ImageCImg") -namespace sofa -{ - -namespace helper -{ - -namespace io +namespace sofa::helper::io { std::vector ImageCImgCreators::cimgSupportedExtensions { @@ -189,8 +183,8 @@ bool ImageCImg::save(std::string filename, int /* compression_level */) return res; } -} // namespace io +} // namespace sofa::helper::io + + -} // namespace helper -} // namespace sofa diff --git a/applications/plugins/CImgPlugin/src/CImgPlugin/ImageCImg.h b/applications/plugins/CImgPlugin/src/CImgPlugin/ImageCImg.h index 98e03732c94..0d9b39fefde 100644 --- a/applications/plugins/CImgPlugin/src/CImgPlugin/ImageCImg.h +++ b/applications/plugins/CImgPlugin/src/CImgPlugin/ImageCImg.h @@ -7,13 +7,8 @@ #include #include -namespace sofa -{ - -namespace helper -{ -namespace io +namespace sofa::helper::io { class SOFA_CIMGPLUGIN_API ImageCImgCreators @@ -44,10 +39,7 @@ class SOFA_CIMGPLUGIN_API ImageCImg : public Image bool save(std::string filename, int compression_level = -1); }; -} // namespace io - -} // namespace helper +} // namespace sofa::helper::io -} // namespace sofa #endif // SOFA_HELPER_IO_IMAGECIMG_H diff --git a/applications/plugins/ManualMapping/ManualLinearMapping.cpp b/applications/plugins/ManualMapping/ManualLinearMapping.cpp index c71ca868a2b..eaca9951fe2 100644 --- a/applications/plugins/ManualMapping/ManualLinearMapping.cpp +++ b/applications/plugins/ManualMapping/ManualLinearMapping.cpp @@ -24,13 +24,8 @@ #include #include -namespace sofa -{ - -namespace component -{ -namespace mapping +namespace sofa::component::mapping { using namespace sofa::defaulttype; @@ -50,12 +45,9 @@ int ManualLinearMappingClass = core::RegisterObject("Maps displacement from subs template class SOFA_ManualMapping_API ManualLinearMapping< Vec3Types, Vec3Types >; +} // namespace sofa::component::mapping -} // namespace mapping - -} // namespace component -} // namespace sofa diff --git a/applications/plugins/ManualMapping/ManualLinearMapping.h b/applications/plugins/ManualMapping/ManualLinearMapping.h index 53d839b354b..c47af775a9b 100644 --- a/applications/plugins/ManualMapping/ManualLinearMapping.h +++ b/applications/plugins/ManualMapping/ManualLinearMapping.h @@ -30,13 +30,8 @@ #include #include -namespace sofa -{ - -namespace component -{ -namespace mapping +namespace sofa::component::mapping { @@ -125,10 +120,7 @@ extern template class SOFA_ManualMapping_API ManualLinearMapping< defaulttype::V #endif -} // namespace mapping - -} // namespace component +} // namespace sofa::component::mapping -} // namespace sofa #endif diff --git a/applications/plugins/ManualMapping/ManualLinearMapping.inl b/applications/plugins/ManualMapping/ManualLinearMapping.inl index c278b931bf9..5b99c366e08 100644 --- a/applications/plugins/ManualMapping/ManualLinearMapping.inl +++ b/applications/plugins/ManualMapping/ManualLinearMapping.inl @@ -28,13 +28,7 @@ #include -namespace sofa -{ - -namespace component -{ - -namespace mapping +namespace sofa::component::mapping { @@ -108,10 +102,7 @@ const typename ManualLinearMapping::js_type* ManualLinearMapping -namespace sofa -{ -namespace component +namespace sofa::component { //Here are just several convenient functions to help user to know what contains the plugin @@ -73,8 +71,7 @@ namespace component /// string containing the names of the classes provided by the plugin return "ManualLinearMapping"; } -} -} +} /// Use the SOFA_LINK_CLASS macro for each class, to enable linking on all platforms diff --git a/applications/plugins/SceneCreator/src/SceneCreator/GetAssembledSizeVisitor.cpp b/applications/plugins/SceneCreator/src/SceneCreator/GetAssembledSizeVisitor.cpp index b4f0ded5f4a..2bfb2c82d99 100644 --- a/applications/plugins/SceneCreator/src/SceneCreator/GetAssembledSizeVisitor.cpp +++ b/applications/plugins/SceneCreator/src/SceneCreator/GetAssembledSizeVisitor.cpp @@ -34,10 +34,8 @@ #include #include -namespace sofa -{ -namespace simulation +namespace sofa::simulation { @@ -63,7 +61,7 @@ Visitor::Result GetAssembledSizeVisitor::processNodeTopDown( simulation::Node* g return Visitor::RESULT_CONTINUE; } -} // namespace simulation +} // namespace sofa::simulation + -} // namespace sofa diff --git a/applications/plugins/SceneCreator/src/SceneCreator/GetAssembledSizeVisitor.h b/applications/plugins/SceneCreator/src/SceneCreator/GetAssembledSizeVisitor.h index a20a5ab4aaf..945017014c1 100644 --- a/applications/plugins/SceneCreator/src/SceneCreator/GetAssembledSizeVisitor.h +++ b/applications/plugins/SceneCreator/src/SceneCreator/GetAssembledSizeVisitor.h @@ -39,10 +39,9 @@ #include #include #include -namespace sofa -{ -namespace simulation + +namespace sofa::simulation { /** Compute the size of the assembled position vector and velocity vector. @@ -69,7 +68,7 @@ namespace simulation bool independentOnly; }; -} // namespace simulation -} // namespace sofa +} // namespace sofa::simulation + #endif diff --git a/applications/plugins/SceneCreator/src/SceneCreator/GetVectorVisitor.cpp b/applications/plugins/SceneCreator/src/SceneCreator/GetVectorVisitor.cpp index 1348f141e9e..2f7450e9a99 100644 --- a/applications/plugins/SceneCreator/src/SceneCreator/GetVectorVisitor.cpp +++ b/applications/plugins/SceneCreator/src/SceneCreator/GetVectorVisitor.cpp @@ -33,10 +33,9 @@ #include #include #include -namespace sofa -{ -namespace simulation + +namespace sofa::simulation { @@ -60,7 +59,7 @@ Visitor::Result GetVectorVisitor::processNodeTopDown( simulation::Node* gnode ) return Visitor::RESULT_CONTINUE; } -} // namespace simulation +} // namespace sofa::simulation + -} // namespace sofa diff --git a/applications/plugins/SceneCreator/src/SceneCreator/GetVectorVisitor.h b/applications/plugins/SceneCreator/src/SceneCreator/GetVectorVisitor.h index 85d4c8980a6..c66078cdf6a 100644 --- a/applications/plugins/SceneCreator/src/SceneCreator/GetVectorVisitor.h +++ b/applications/plugins/SceneCreator/src/SceneCreator/GetVectorVisitor.h @@ -42,10 +42,7 @@ #include -namespace sofa -{ - -namespace simulation +namespace sofa::simulation { /** Copy a given MultiVector (generally spread across the MechanicalStates) to a BaseVector @@ -74,7 +71,7 @@ class SOFA_SCENECREATOR_API GetVectorVisitor: public Visitor }; -} // namespace simulation -} // namespace sofa +} // namespace sofa::simulation + #endif diff --git a/applications/plugins/SceneCreator/src/SceneCreator/SceneCreator.cpp b/applications/plugins/SceneCreator/src/SceneCreator/SceneCreator.cpp index a99469382d8..4c55701dcdb 100644 --- a/applications/plugins/SceneCreator/src/SceneCreator/SceneCreator.cpp +++ b/applications/plugins/SceneCreator/src/SceneCreator/SceneCreator.cpp @@ -38,9 +38,9 @@ using sofa::simpleapi::str ; using sofa::simpleapi::createObject ; using sofa::simpleapi::createChild ; -namespace sofa + +namespace sofa::modeling { -namespace modeling { /////////////////// IMPORTING THE DEPENDENCIES INTO THE NAMESPACE /////////////////////////// @@ -712,8 +712,4 @@ void setDataLink(BaseData* source, BaseData* target) -} // modeling - - - -} // sofa +} diff --git a/applications/plugins/SceneCreator/src/SceneCreator/SceneCreator.h b/applications/plugins/SceneCreator/src/SceneCreator/SceneCreator.h index 8fb5f79dca3..4e96d044df9 100644 --- a/applications/plugins/SceneCreator/src/SceneCreator/SceneCreator.h +++ b/applications/plugins/SceneCreator/src/SceneCreator/SceneCreator.h @@ -31,9 +31,8 @@ /// @warning this can only manage one scene at a time /// (root singleton) -namespace sofa -{ -namespace modeling + +namespace sofa::modeling { using sofa::core::objectmodel::BaseObject ; @@ -210,8 +209,6 @@ SOFA_SCENECREATOR_API simulation::Node::SPtr clearScene(); /// Create a link from source to target. SOFA_SCENECREATOR_API void setDataLink(core::objectmodel::BaseData* source, core::objectmodel::BaseData* target); -}// modeling - -}// sofa +} #endif diff --git a/applications/plugins/SceneCreator/src/SceneCreator/SceneUtils.cpp b/applications/plugins/SceneCreator/src/SceneCreator/SceneUtils.cpp index 25b524dbdc3..991f3a59e40 100644 --- a/applications/plugins/SceneCreator/src/SceneCreator/SceneUtils.cpp +++ b/applications/plugins/SceneCreator/src/SceneCreator/SceneUtils.cpp @@ -40,9 +40,9 @@ using sofa::core::ObjectFactory ; #include -namespace sofa + +namespace sofa::modeling { -namespace modeling { using sofa::defaulttype::Vec3Types; @@ -79,5 +79,4 @@ Vector getVector( core::ConstVecId id, bool indep ) return ve; } -} /// modeling -} /// sofa +} diff --git a/applications/plugins/SceneCreator/src/SceneCreator/SceneUtils.h b/applications/plugins/SceneCreator/src/SceneCreator/SceneUtils.h index 112721632d2..626c0532970 100644 --- a/applications/plugins/SceneCreator/src/SceneCreator/SceneUtils.h +++ b/applications/plugins/SceneCreator/src/SceneCreator/SceneUtils.h @@ -26,9 +26,9 @@ #include #include #include -namespace sofa -{ -namespace modeling + + +namespace sofa::modeling { typedef Eigen::Matrix Vector; @@ -40,8 +40,6 @@ typedef Eigen::SparseMatrix SparseMatrix; /// mapped ones, depending on the flag. SOFA_SCENECREATOR_API Vector getVector( core::ConstVecId id, bool independentOnly=true ); -}// modeling - -}// sofa +} #endif diff --git a/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaBaseVector.cpp b/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaBaseVector.cpp index f28592d7c8a..d924208b538 100644 --- a/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaBaseVector.cpp +++ b/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaBaseVector.cpp @@ -23,13 +23,8 @@ #include "CudaBaseVector.h" -namespace sofa -{ - -namespace gpu -{ -namespace cuda +namespace sofa::gpu::cuda { template class SOFA_GPU_CUDA_API CudaBaseVector< float >; @@ -37,8 +32,8 @@ template class SOFA_GPU_CUDA_API CudaBaseVector< float >; template class SOFA_GPU_CUDA_API CudaBaseVector< double >; #endif -} // namespace cuda +} // namespace sofa::gpu::cuda + + -} // namespace gpu -} // namespace sofa diff --git a/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaBaseVector.h b/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaBaseVector.h index 77aa9dfc839..78bdfbda598 100644 --- a/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaBaseVector.h +++ b/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaBaseVector.h @@ -25,13 +25,8 @@ #include #include -namespace sofa -{ - -namespace gpu -{ -namespace cuda +namespace sofa::gpu::cuda { /////////////// @@ -302,8 +297,7 @@ extern template class SOFA_GPU_CUDA_API CudaBaseVector< double >; #endif -} // namespace cuda -} // namespace gpu -} // namespace sofa +} // namespace sofa::gpu::cuda + #endif diff --git a/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaHexahedronTLEDForceField.cpp b/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaHexahedronTLEDForceField.cpp index 93dfe1cd121..edacb7f67c8 100644 --- a/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaHexahedronTLEDForceField.cpp +++ b/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaHexahedronTLEDForceField.cpp @@ -28,13 +28,8 @@ #include using namespace std; -namespace sofa -{ - -namespace gpu -{ -namespace cuda +namespace sofa::gpu::cuda { int CudaHexahedronTLEDForceFieldCudaClass = core::RegisterObject("GPU-side TLED hexahedron forcefield using CUDA") @@ -779,8 +774,8 @@ void CudaHexahedronTLEDForceField::updateLameCoefficients(void) Mu = youngModulus.getValue()/(2*(1 + poissonRatio.getValue())); } -} // namespace cuda +} // namespace sofa::gpu::cuda + + -} // namespace gpu -} // namespace sofa diff --git a/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaHexahedronTLEDForceField.h b/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaHexahedronTLEDForceField.h index 0c5c7c71cf4..f68456cebc9 100644 --- a/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaHexahedronTLEDForceField.h +++ b/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaHexahedronTLEDForceField.h @@ -67,13 +67,8 @@ Year = {2009} #include #include -namespace sofa -{ - -namespace gpu -{ -namespace cuda +namespace sofa::gpu::cuda { using namespace sofa::defaulttype; @@ -164,10 +159,7 @@ class CudaHexahedronTLEDForceField : public core::behavior::ForceField > @@ -523,10 +517,7 @@ class CudaMatrix #undef DEBUG_OUT_M #endif -} // namespace cuda - -} // namespace gpu +} // namespace sofa::gpu::cuda -} // namespace sofa #endif diff --git a/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaParticleSource.cpp b/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaParticleSource.cpp index 0d11b8de39b..9b7441f4ee4 100644 --- a/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaParticleSource.cpp +++ b/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaParticleSource.cpp @@ -28,21 +28,17 @@ namespace sofa { -namespace core -{ -namespace behavior + +namespace core::behavior { template class ProjectiveConstraintSet; #ifdef SOFA_GPU_CUDA_DOUBLE template class ProjectiveConstraintSet; #endif -} // namespace behavior -} // namespace core +} // namespace core::behavior -namespace gpu -{ -namespace cuda +namespace gpu::cuda { @@ -54,8 +50,7 @@ int ParticleSourceCudaClass = core::RegisterObject("Supports GPU-side computatio #endif // SOFA_GPU_CUDA_DOUBLE ; -} // namespace cuda +} // namespace gpu::cuda -} // namespace gpu } // namespace sofa diff --git a/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaParticleSource.inl b/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaParticleSource.inl index 1bcd6fa2db8..6ee83d77af5 100644 --- a/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaParticleSource.inl +++ b/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaParticleSource.inl @@ -28,10 +28,8 @@ namespace sofa { -namespace gpu -{ -namespace cuda +namespace gpu::cuda { extern "C" @@ -49,14 +47,10 @@ extern "C" #endif // SOFA_GPU_CUDA_DOUBLE } -} // namespace cuda - -} // namespace gpu +} // namespace gpu::cuda -namespace component -{ -namespace misc +namespace component::misc { using namespace gpu::cuda; @@ -136,9 +130,8 @@ using namespace gpu::cuda; // #endif // SOFA_GPU_CUDA_DOUBLE -} // namespace misc +} // namespace component::misc -} // namespace component } // namespace sofa diff --git a/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaParticlesRepulsionForceField.cpp b/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaParticlesRepulsionForceField.cpp index f402a0f8041..042d77da5b5 100644 --- a/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaParticlesRepulsionForceField.cpp +++ b/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaParticlesRepulsionForceField.cpp @@ -25,13 +25,8 @@ #include #include -namespace sofa -{ - -namespace gpu -{ -namespace cuda +namespace sofa::gpu::cuda { int ParticlesRepulsionForceFieldCudaClass = core::RegisterObject("Supports GPU-side computations using CUDA") @@ -41,8 +36,8 @@ int ParticlesRepulsionForceFieldCudaClass = core::RegisterObject("Supports GPU-s #endif // SOFA_GPU_CUDA_DOUBLE ; -} // namespace cuda +} // namespace sofa::gpu::cuda + + -} // namespace gpu -} // namespace sofa diff --git a/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaParticlesRepulsionForceField.h b/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaParticlesRepulsionForceField.h index 687af946657..632e35283e9 100644 --- a/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaParticlesRepulsionForceField.h +++ b/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaParticlesRepulsionForceField.h @@ -29,10 +29,8 @@ namespace sofa { -namespace gpu -{ -namespace cuda +namespace gpu::cuda { template @@ -47,14 +45,10 @@ struct GPURepulsion typedef GPURepulsion GPURepulsion3f; typedef GPURepulsion GPURepulsion3d; -} // namespace cuda - -} // namespace gpu +} // namespace gpu::cuda -namespace component -{ -namespace forcefield +namespace component::forcefield { template <> @@ -73,9 +67,8 @@ void ParticlesRepulsionForceField::addDForce(const co #endif // SOFA_GPU_CUDA_DOUBLE -} // namespace forcefield +} // namespace component::forcefield -} // namespace component } // namespace sofa diff --git a/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaParticlesRepulsionForceField.inl b/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaParticlesRepulsionForceField.inl index 914db95bef8..6f21ee63f99 100644 --- a/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaParticlesRepulsionForceField.inl +++ b/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaParticlesRepulsionForceField.inl @@ -29,10 +29,8 @@ namespace sofa { -namespace gpu -{ -namespace cuda +namespace gpu::cuda { extern "C" @@ -49,14 +47,10 @@ extern "C" #endif // SOFA_GPU_CUDA_DOUBLE } -} // namespace cuda - -} // namespace gpu +} // namespace gpu::cuda -namespace component -{ -namespace forcefield +namespace component::forcefield { using namespace gpu::cuda; @@ -166,9 +160,8 @@ void ParticlesRepulsionForceField::addDForce(const co #endif // SOFA_GPU_CUDA_DOUBLE -} // namespace forcefield +} // namespace component::forcefield -} // namespace component } // namespace sofa diff --git a/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaSPHFluidForceField.cpp b/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaSPHFluidForceField.cpp index cb23d9a9185..68a52f54bd7 100644 --- a/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaSPHFluidForceField.cpp +++ b/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaSPHFluidForceField.cpp @@ -25,13 +25,8 @@ #include #include -namespace sofa -{ - -namespace gpu -{ -namespace cuda +namespace sofa::gpu::cuda { int SPHFluidForceFieldCudaClass = core::RegisterObject("Supports GPU-side computations using CUDA") @@ -41,8 +36,8 @@ int SPHFluidForceFieldCudaClass = core::RegisterObject("Supports GPU-side comput #endif // SOFA_GPU_CUDA_DOUBLE ; -} // namespace cuda +} // namespace sofa::gpu::cuda + + -} // namespace gpu -} // namespace sofa diff --git a/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaSPHFluidForceField.h b/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaSPHFluidForceField.h index 22028c89f37..9f59ad575e7 100644 --- a/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaSPHFluidForceField.h +++ b/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaSPHFluidForceField.h @@ -29,10 +29,8 @@ namespace sofa { -namespace gpu -{ -namespace cuda +namespace gpu::cuda { template @@ -58,14 +56,10 @@ struct GPUSPHFluid typedef GPUSPHFluid GPUSPHFluid3f; typedef GPUSPHFluid GPUSPHFluid3d; -} // namespace cuda - -} // namespace gpu +} // namespace gpu::cuda -namespace component -{ -namespace forcefield +namespace component::forcefield { template @@ -133,9 +127,8 @@ void SPHFluidForceField::addDForce(const core::Mechan #endif // SOFA_GPU_CUDA_DOUBLE -} // namespace forcefield +} // namespace component::forcefield -} // namespace component } // namespace sofa diff --git a/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaSPHFluidForceField.inl b/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaSPHFluidForceField.inl index 5ec2f613d44..bceaf0551d1 100644 --- a/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaSPHFluidForceField.inl +++ b/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaSPHFluidForceField.inl @@ -30,10 +30,8 @@ namespace sofa { -namespace gpu -{ -namespace cuda +namespace gpu::cuda { extern "C" @@ -52,14 +50,10 @@ void SPHFluidForceFieldCuda3d_addForce (int kernelType, int pressureType, int vi #endif // SOFA_GPU_CUDA_DOUBLE } -} // namespace cuda - -} // namespace gpu +} // namespace gpu::cuda -namespace component -{ -namespace forcefield +namespace component::forcefield { using namespace gpu::cuda; @@ -271,9 +265,8 @@ void SPHFluidForceField::draw(const core::visual::Vis #endif // SOFACUDA_HAVE_SOFA_GL == 1 } -} // namespace forcefield +} // namespace component::forcefield -} // namespace component } // namespace sofa diff --git a/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaScan.h b/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaScan.h index 4689538167e..3215f6c4bdf 100644 --- a/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaScan.h +++ b/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaScan.h @@ -31,11 +31,8 @@ #include #include // for std::partial_sum -namespace sofa -{ -namespace gpu -{ -namespace cuda + +namespace sofa::gpu::cuda { #endif @@ -96,9 +93,9 @@ static inline void CudaScan(const CudaVector* input, CudaVector* o } #if defined(__cplusplus) -} // namespace cuda -} // namespace gpu -} // namespace sofa +} // namespace sofa::gpu::cuda + + #endif #endif diff --git a/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaSort.h b/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaSort.h index d7f881ef267..8d112ad16a5 100644 --- a/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaSort.h +++ b/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaSort.h @@ -31,11 +31,8 @@ #include // for std::sort #include -namespace sofa -{ -namespace gpu -{ -namespace cuda + +namespace sofa::gpu::cuda { #endif @@ -115,9 +112,9 @@ static inline void CudaSort(CudaVector* keys, CudaVector* data, uns #if defined(__cplusplus) -} // namespace cuda -} // namespace gpu -} // namespace sofa +} // namespace sofa::gpu::cuda + + #endif #endif diff --git a/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaSpatialGridContainer.cpp b/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaSpatialGridContainer.cpp index 9edc37b76b2..7434a00aa04 100644 --- a/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaSpatialGridContainer.cpp +++ b/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaSpatialGridContainer.cpp @@ -23,13 +23,8 @@ #include #include -namespace sofa -{ - -namespace component -{ -namespace container +namespace sofa::component::container { using namespace sofa::defaulttype; @@ -51,8 +46,8 @@ template class SpatialGrid< SpatialGridTypes< CudaVec3dTypes > >; #endif // SOFA_GPU_CUDA_DOUBLE -} // namespace container +} // namespace sofa::component::container + + -} // namespace component -} // namespace sofa diff --git a/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaSpatialGridContainer.h b/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaSpatialGridContainer.h index e30cd9df897..f1f3697f3e0 100644 --- a/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaSpatialGridContainer.h +++ b/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaSpatialGridContainer.h @@ -38,13 +38,8 @@ #include #include -namespace sofa -{ - -namespace component -{ -namespace container +namespace sofa::component::container { using namespace sofa::defaulttype; @@ -127,10 +122,7 @@ class SpatialGrid< SpatialGridTypes < gpu::cuda::CudaVectorTypes #include -namespace sofa -{ - -namespace gpu -{ -namespace cuda +namespace sofa::gpu::cuda { int CudaTetrahedronTLEDForceFieldCudaClass = core::RegisterObject("GPU TLED tetrahedron forcefield using CUDA") @@ -594,8 +589,8 @@ void CudaTetrahedronTLEDForceField::updateLameCoefficients(void) Mu = youngModulus.getValue()/(2*(1 + poissonRatio.getValue())); } -} // namespace cuda +} // namespace sofa::gpu::cuda + + -} // namespace gpu -} // namespace sofa diff --git a/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaTetrahedronTLEDForceField.h b/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaTetrahedronTLEDForceField.h index cef2d1d8b5e..4dc344a2e74 100644 --- a/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaTetrahedronTLEDForceField.h +++ b/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaTetrahedronTLEDForceField.h @@ -67,13 +67,8 @@ Year = {2009} #include #include "vector_types.h" -namespace sofa -{ - -namespace gpu -{ -namespace cuda +namespace sofa::gpu::cuda { using namespace sofa::defaulttype; @@ -158,10 +153,7 @@ class CudaTetrahedronTLEDForceField : public core::behavior::ForceField& v1, const sofa::type: return r; } -} // namespace cuda +} // namespace gpu::cuda -} // namespace gpu // Overload helper::ReadAccessor and helper::WriteAccessor on CudaVector @@ -992,10 +989,8 @@ class WriteAccessorVector< gpu::cuda::CudaVector > // Specialization of the defaulttype::DataTypeInfo type traits template -namespace sofa -{ -namespace defaulttype +namespace sofa::defaulttype { template @@ -1020,9 +1015,8 @@ template<> struct DataTypeName { static const char* nam /// \endcond -} // namespace defaulttype +} // namespace sofa::defaulttype -} // namespace sofa // define MassType for CudaTypes namespace sofa::component::mass diff --git a/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaVisualModel.cpp b/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaVisualModel.cpp index 624c257ea31..61b7193f9c9 100644 --- a/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaVisualModel.cpp +++ b/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaVisualModel.cpp @@ -23,13 +23,8 @@ #include "CudaVisualModel.inl" #include -namespace sofa -{ - -namespace gpu -{ -namespace cuda +namespace sofa::gpu::cuda { int CudaVisualModelClass = core::RegisterObject("Rendering of meshes based on CUDA") @@ -41,8 +36,8 @@ int CudaVisualModelClass = core::RegisterObject("Rendering of meshes based on CU #endif // SOFA_GPU_CUDA_DOUBLE ; -} // namespace cuda +} // namespace sofa::gpu::cuda + + -} // namespace gpu -} // namespace sofa diff --git a/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaVisualModel.h b/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaVisualModel.h index 9bad6c6ed4b..3f67fe21b34 100644 --- a/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaVisualModel.h +++ b/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaVisualModel.h @@ -31,24 +31,17 @@ namespace sofa { -namespace gpu -{ -namespace cuda +namespace gpu::cuda { template class CudaKernelsCudaVisualModel; -} // namespace cuda - -} // namespace gpu +} // namespace gpu::cuda -namespace component -{ - -namespace visualmodel +namespace component::visualmodel { template @@ -151,9 +144,8 @@ class CudaVisualModel : public core::visual::VisualModel SingleLink, core::topology::BaseMeshTopology, BaseLink::FLAG_STRONGLINK> topology; }; -} // namespace visualmodel +} // namespace component::visualmodel -} // namespace component } // namespace sofa diff --git a/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaVisualModel.inl b/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaVisualModel.inl index 31b74bf54d8..db701d55e29 100644 --- a/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaVisualModel.inl +++ b/applications/plugins/SofaCUDA/sofa/gpu/cuda/CudaVisualModel.inl @@ -29,10 +29,8 @@ namespace sofa { -namespace gpu -{ -namespace cuda +namespace gpu::cuda { extern "C" @@ -111,14 +109,10 @@ public: #endif // SOFA_GPU_CUDA_DOUBLE -} // namespace cuda - -} // namespace gpu +} // namespace gpu::cuda -namespace component -{ -namespace visualmodel +namespace component::visualmodel { using namespace gpu::cuda; @@ -482,9 +476,8 @@ void CudaVisualModel< TDataTypes >::computeBBox(const core::ExecParams* params, } -} // namespace visualmodel +} // namespace component::visualmodel -} // namespace component } // namespace sofa diff --git a/applications/plugins/SofaCUDA/sofa/gpu/cuda/mycuda.cpp b/applications/plugins/SofaCUDA/sofa/gpu/cuda/mycuda.cpp index 2162d9664bc..aada37fbe13 100644 --- a/applications/plugins/SofaCUDA/sofa/gpu/cuda/mycuda.cpp +++ b/applications/plugins/SofaCUDA/sofa/gpu/cuda/mycuda.cpp @@ -125,11 +125,8 @@ class rtstack: public std::runtime_error #endif #endif -namespace sofa -{ -namespace gpu -{ -namespace cuda + +namespace sofa::gpu::cuda { extern "C" @@ -236,6 +233,6 @@ void displayStack(const char * /*name*/) #endif -} // namespace cuda -} // namespace gpu -} // namespace sofa +} // namespace sofa::gpu::cuda + + diff --git a/applications/plugins/SofaCUDA/src/SofaCUDA/component/mapping/linear/CudaBarycentricMapping-3f1-f.cpp b/applications/plugins/SofaCUDA/src/SofaCUDA/component/mapping/linear/CudaBarycentricMapping-3f1-f.cpp index c097e326a03..5cd861a0b7c 100644 --- a/applications/plugins/SofaCUDA/src/SofaCUDA/component/mapping/linear/CudaBarycentricMapping-3f1-f.cpp +++ b/applications/plugins/SofaCUDA/src/SofaCUDA/component/mapping/linear/CudaBarycentricMapping-3f1-f.cpp @@ -27,10 +27,8 @@ namespace sofa { -namespace component -{ -namespace mapping +namespace component::mapping { using namespace sofa::defaulttype; @@ -43,15 +41,10 @@ using namespace sofa::gpu::cuda; // instanciations involving both CudaVec3f1Types and Vec3fTypes +} // namespace component::mapping -} // namespace mapping - -} // namespace component - -namespace gpu -{ -namespace cuda +namespace gpu::cuda { using namespace sofa::defaulttype; @@ -62,8 +55,7 @@ using namespace sofa::component::mapping::linear; int BarycentricMappingCudaClass_3f1_f = core::RegisterObject("Supports GPU-side computations using CUDA") ; -} // namespace cuda +} // namespace gpu::cuda -} // namespace gpu } // namespace sofa diff --git a/applications/plugins/SofaCUDA/src/SofaCUDA/component/mapping/linear/CudaBarycentricMapping-f.cpp b/applications/plugins/SofaCUDA/src/SofaCUDA/component/mapping/linear/CudaBarycentricMapping-f.cpp index 14f51c54cd4..044cd32411c 100644 --- a/applications/plugins/SofaCUDA/src/SofaCUDA/component/mapping/linear/CudaBarycentricMapping-f.cpp +++ b/applications/plugins/SofaCUDA/src/SofaCUDA/component/mapping/linear/CudaBarycentricMapping-f.cpp @@ -27,10 +27,8 @@ namespace sofa { -namespace component -{ -namespace mapping +namespace component::mapping { using namespace sofa::defaulttype; @@ -43,14 +41,10 @@ using namespace sofa::gpu::cuda; // Instantiations involving both CudaVec3fTypes and Vec3fTypes -} // namespace mapping - -} // namespace component +} // namespace component::mapping -namespace gpu -{ -namespace cuda +namespace gpu::cuda { using namespace sofa::defaulttype; @@ -61,8 +55,7 @@ using namespace sofa::component::mapping::linear; int BarycentricMappingCudaClass_f = core::RegisterObject("Supports GPU-side computations using CUDA") ; -} // namespace cuda +} // namespace gpu::cuda -} // namespace gpu } // namespace sofa diff --git a/applications/plugins/SofaCUDA/src/SofaCUDA/component/mass/CudaDiagonalMass.cpp b/applications/plugins/SofaCUDA/src/SofaCUDA/component/mass/CudaDiagonalMass.cpp index b44d223b130..896035e5498 100644 --- a/applications/plugins/SofaCUDA/src/SofaCUDA/component/mass/CudaDiagonalMass.cpp +++ b/applications/plugins/SofaCUDA/src/SofaCUDA/component/mass/CudaDiagonalMass.cpp @@ -36,10 +36,8 @@ namespace sofa { -namespace component -{ -namespace mass +namespace component::mass { template class SOFA_GPU_CUDA_API DiagonalMass; @@ -48,15 +46,10 @@ template class SOFA_GPU_CUDA_API DiagonalMass; template class SOFA_GPU_CUDA_API DiagonalMass; #endif -} // namespace mass - -} // namespace component +} // namespace component::mass -namespace gpu -{ - -namespace cuda +namespace gpu::cuda { @@ -71,9 +64,8 @@ int DiagonalMassCudaClass = core::RegisterObject("Supports GPU-side computations ; -} // namespace cuda +} // namespace gpu::cuda -} // namespace gpu } // namespace sofa diff --git a/applications/plugins/SofaCUDA/src/SofaCUDA/component/mass/CudaDiagonalMass.h b/applications/plugins/SofaCUDA/src/SofaCUDA/component/mass/CudaDiagonalMass.h index 62fa38325fc..215c8ccce9c 100644 --- a/applications/plugins/SofaCUDA/src/SofaCUDA/component/mass/CudaDiagonalMass.h +++ b/applications/plugins/SofaCUDA/src/SofaCUDA/component/mass/CudaDiagonalMass.h @@ -25,11 +25,8 @@ #include #include -namespace sofa -{ -namespace component -{ -namespace mass + +namespace sofa::component::mass { using namespace sofa::gpu::cuda; @@ -89,10 +86,7 @@ extern template class SOFA_GPU_CUDA_API component::mass::DiagonalMass @@ -164,9 +161,8 @@ void DiagonalMass::addForce(const core::MechanicalParams* /*mpar #endif -} // namespace mass +} // namespace component::mass -} // namespace component } // namespace sofa diff --git a/applications/plugins/SofaCUDA/src/SofaCUDA/component/mass/CudaMeshMatrixMass.cpp b/applications/plugins/SofaCUDA/src/SofaCUDA/component/mass/CudaMeshMatrixMass.cpp index a0ca4dd9662..55706d82cd7 100644 --- a/applications/plugins/SofaCUDA/src/SofaCUDA/component/mass/CudaMeshMatrixMass.cpp +++ b/applications/plugins/SofaCUDA/src/SofaCUDA/component/mass/CudaMeshMatrixMass.cpp @@ -40,10 +40,8 @@ namespace sofa { -namespace component -{ -namespace mass +namespace component::mass { template class SOFA_GPU_CUDA_API MeshMatrixMass; @@ -63,14 +61,10 @@ template class SOFA_GPU_CUDA_API MeshMatrixMass #include -namespace sofa -{ -namespace component -{ -namespace mass + +namespace sofa::component::mass { using namespace sofa::gpu::cuda; @@ -121,10 +118,7 @@ extern template class SOFA_GPU_CUDA_API MeshMatrixMass::accFromF(const core::MechanicalParams* /*mp } -} // namespace mass -} // namespace component +} // namespace component::mass + } // namespace sofa #endif // SOFA_COMPONENT_MASS_CUDAMESHMATRIXMASS_INL diff --git a/applications/plugins/SofaCUDA/src/SofaCUDA/component/mass/CudaUniformMass.cpp b/applications/plugins/SofaCUDA/src/SofaCUDA/component/mass/CudaUniformMass.cpp index cdfe6847065..296a02227e0 100644 --- a/applications/plugins/SofaCUDA/src/SofaCUDA/component/mass/CudaUniformMass.cpp +++ b/applications/plugins/SofaCUDA/src/SofaCUDA/component/mass/CudaUniformMass.cpp @@ -25,13 +25,8 @@ #include #include -namespace sofa -{ - -namespace gpu -{ -namespace cuda +namespace sofa::gpu::cuda { int UniformMassCudaClass = core::RegisterObject("Supports GPU-side computations using CUDA") @@ -45,8 +40,8 @@ int UniformMassCudaClass = core::RegisterObject("Supports GPU-side computations #endif // SOFA_GPU_CUDA_DOUBLE ; -} // namespace cuda +} // namespace sofa::gpu::cuda + + -} // namespace gpu -} // namespace sofa diff --git a/applications/plugins/SofaCUDA/src/SofaCUDA/component/mass/CudaUniformMass.inl b/applications/plugins/SofaCUDA/src/SofaCUDA/component/mass/CudaUniformMass.inl index 4e996628794..c2e782dd2cb 100644 --- a/applications/plugins/SofaCUDA/src/SofaCUDA/component/mass/CudaUniformMass.inl +++ b/applications/plugins/SofaCUDA/src/SofaCUDA/component/mass/CudaUniformMass.inl @@ -29,10 +29,8 @@ namespace sofa { -namespace gpu -{ -namespace cuda +namespace gpu::cuda { extern "C" @@ -62,14 +60,10 @@ extern "C" #endif // SOFA_GPU_CUDA_DOUBLE } -} // namespace cuda - -} // namespace gpu +} // namespace gpu::cuda -namespace component -{ -namespace mass +namespace component::mass { using namespace gpu::cuda; @@ -415,9 +409,8 @@ void UniformMass::draw(const core::visual::VisualPa #endif // SOFA_GPU_CUDA_DOUBLE -} // namespace mass +} // namespace component::mass -} // namespace component } // namespace sofa diff --git a/applications/plugins/SofaCUDA/src/SofaCUDA/component/solidmechanics/fem/hyperelastic/CudaStandardTetrahedralFEMForceField.cpp b/applications/plugins/SofaCUDA/src/SofaCUDA/component/solidmechanics/fem/hyperelastic/CudaStandardTetrahedralFEMForceField.cpp index 3529617309d..2345994a12c 100644 --- a/applications/plugins/SofaCUDA/src/SofaCUDA/component/solidmechanics/fem/hyperelastic/CudaStandardTetrahedralFEMForceField.cpp +++ b/applications/plugins/SofaCUDA/src/SofaCUDA/component/solidmechanics/fem/hyperelastic/CudaStandardTetrahedralFEMForceField.cpp @@ -28,10 +28,8 @@ namespace sofa { -namespace gpu -{ -namespace cuda +namespace gpu::cuda { int StandardTetrahedralFEMForceFieldCudaClass = core::RegisterObject("Supports GPU-side computations using CUDA") @@ -42,9 +40,7 @@ int StandardTetrahedralFEMForceFieldCudaClass = core::RegisterObject("Supports G ; -} // namespace cuda - -} // namespace gpu +} // namespace gpu::cuda template class SOFA_GPU_CUDA_API sofa::component::solidmechanics::fem::hyperelastic::StandardTetrahedralFEMForceField; diff --git a/applications/plugins/SofaCUDA/src/SofaCUDA/component/solidmechanics/tensormass/CudaTetrahedralTensorMassForceField.cpp b/applications/plugins/SofaCUDA/src/SofaCUDA/component/solidmechanics/tensormass/CudaTetrahedralTensorMassForceField.cpp index e7b426b9eaf..e6af7b2e940 100644 --- a/applications/plugins/SofaCUDA/src/SofaCUDA/component/solidmechanics/tensormass/CudaTetrahedralTensorMassForceField.cpp +++ b/applications/plugins/SofaCUDA/src/SofaCUDA/component/solidmechanics/tensormass/CudaTetrahedralTensorMassForceField.cpp @@ -27,10 +27,8 @@ namespace sofa { -namespace gpu -{ -namespace cuda +namespace gpu::cuda { int TetrahedralTensorMassForceFieldCudaClass = core::RegisterObject("Supports GPU-side computations using CUDA") .add< sofa::component::solidmechanics::tensormass::TetrahedralTensorMassForceField >() @@ -40,9 +38,7 @@ int TetrahedralTensorMassForceFieldCudaClass = core::RegisterObject("Supports GP ; -} // namespace cuda - -} // namespace gpu +} // namespace gpu::cuda template class SOFA_GPU_CUDA_API sofa::component::solidmechanics::tensormass::TetrahedralTensorMassForceField; diff --git a/applications/plugins/SofaSimpleGUI/Camera.cpp b/applications/plugins/SofaSimpleGUI/Camera.cpp index 46405e73d33..498cb77f94d 100644 --- a/applications/plugins/SofaSimpleGUI/Camera.cpp +++ b/applications/plugins/SofaSimpleGUI/Camera.cpp @@ -4,8 +4,9 @@ using std::cout; using std::endl; -namespace sofa{ -namespace simplegui{ + +namespace sofa::simplegui +{ Camera::Camera() { @@ -191,6 +192,5 @@ Camera::Vec3 Camera::eye() const { } -} // simplegui -} // sofa +} diff --git a/applications/plugins/SofaSimpleGUI/Camera.h b/applications/plugins/SofaSimpleGUI/Camera.h index 3c945af9e9c..1ef48542626 100644 --- a/applications/plugins/SofaSimpleGUI/Camera.h +++ b/applications/plugins/SofaSimpleGUI/Camera.h @@ -4,8 +4,9 @@ #include #include -namespace sofa{ -namespace simplegui{ + +namespace sofa::simplegui +{ /** * @brief The Camera class implements a simple viewpoint transformation, and its update using the mouse. @@ -79,7 +80,6 @@ class SOFA_SOFASIMPLEGUI_API Camera -} } diff --git a/applications/plugins/SofaSimpleGUI/Interactor.cpp b/applications/plugins/SofaSimpleGUI/Interactor.cpp index 4e99ff53440..dd5eeceab22 100644 --- a/applications/plugins/SofaSimpleGUI/Interactor.cpp +++ b/applications/plugins/SofaSimpleGUI/Interactor.cpp @@ -6,8 +6,9 @@ using namespace sofa; -namespace sofa{ -namespace simplegui{ + +namespace sofa::simplegui +{ Interactor::Interactor(const PickedPoint& picked) : _pickedPoint( picked ) @@ -31,4 +32,4 @@ void Interactor::detach() } } -} + diff --git a/applications/plugins/SofaSimpleGUI/Interactor.h b/applications/plugins/SofaSimpleGUI/Interactor.h index 0ab50fcb811..f7dd353a718 100644 --- a/applications/plugins/SofaSimpleGUI/Interactor.h +++ b/applications/plugins/SofaSimpleGUI/Interactor.h @@ -6,9 +6,8 @@ #include "PickedPoint.h" - -namespace sofa{ -namespace simplegui{ +namespace sofa::simplegui +{ class SofaScene; @@ -54,6 +53,6 @@ class SOFA_SOFASIMPLEGUI_API Interactor }; } -} + #endif // SOFA_Interactor_H diff --git a/applications/plugins/SofaSimpleGUI/PickedPoint.h b/applications/plugins/SofaSimpleGUI/PickedPoint.h index 37fab4c18e1..87f96ca53ce 100644 --- a/applications/plugins/SofaSimpleGUI/PickedPoint.h +++ b/applications/plugins/SofaSimpleGUI/PickedPoint.h @@ -9,8 +9,9 @@ using sofa::core::behavior::BaseMechanicalState; typedef std::size_t nat; typedef sofa::type::Vec3 Vec3; -namespace sofa{ -namespace simplegui{ + +namespace sofa::simplegui +{ /** * @brief The PickedPoint struct represents a vertex of a State, typically picked using the mouse. @@ -58,6 +59,6 @@ struct SOFA_SOFASIMPLEGUI_API PickedPoint }; } -} + #endif // GLPICKEDPOINT_H diff --git a/applications/plugins/SofaSimpleGUI/SofaGL.h b/applications/plugins/SofaSimpleGUI/SofaGL.h index b2f1bf404e2..d70320017bb 100644 --- a/applications/plugins/SofaSimpleGUI/SofaGL.h +++ b/applications/plugins/SofaSimpleGUI/SofaGL.h @@ -9,8 +9,9 @@ #include "PickedPoint.h" #include "SpringInteractor.h" -namespace sofa { -namespace simplegui { + +namespace sofa::simplegui +{ /** OpenGL interface to a SofaScene. * This is not a viewer, this is an object used by a viewer to display a Sofa scene and to pick objects in it. @@ -147,6 +148,6 @@ class SOFA_SOFASIMPLEGUI_API SofaGL }; } -} + #endif // SOFA_NEWGUI_SofaGL_H diff --git a/applications/plugins/SofaSimpleGUI/SpringInteractor.cpp b/applications/plugins/SofaSimpleGUI/SpringInteractor.cpp index c970c5f8b26..491f80ab117 100644 --- a/applications/plugins/SofaSimpleGUI/SpringInteractor.cpp +++ b/applications/plugins/SofaSimpleGUI/SpringInteractor.cpp @@ -5,8 +5,9 @@ #include #include -namespace sofa{ -namespace simplegui{ + +namespace sofa::simplegui +{ typedef sofa::component::constraint::projective::FixedConstraint FixedConstraint3; SpringInteractor::SpringInteractor(const PickedPoint &picked, SReal stiffness) @@ -64,5 +65,4 @@ void SpringInteractor::detach() _interactionNode->addObject(_spring); } -}//newgui -}//sofa +} diff --git a/applications/plugins/SofaSimpleGUI/SpringInteractor.h b/applications/plugins/SofaSimpleGUI/SpringInteractor.h index 94da4c96db9..86717c48107 100644 --- a/applications/plugins/SofaSimpleGUI/SpringInteractor.h +++ b/applications/plugins/SofaSimpleGUI/SpringInteractor.h @@ -8,8 +8,9 @@ #include #include -namespace sofa{ -namespace simplegui{ + +namespace sofa::simplegui +{ using sofa::defaulttype::Vec3Types ; using MechanicalObject3 = sofa::component::statecontainer::MechanicalObject ; using StiffSpringForceField3 = sofa::component::solidmechanics::spring::StiffSpringForceField ; @@ -48,6 +49,6 @@ class SOFA_SOFASIMPLEGUI_API SpringInteractor: public Interactor }; } -} + #endif // SOFA_SpringInteractor_H diff --git a/applications/plugins/SofaSimpleGUI/VisualPickVisitor.cpp b/applications/plugins/SofaSimpleGUI/VisualPickVisitor.cpp index 3cc8ac4efdb..c7b3203a8d7 100644 --- a/applications/plugins/SofaSimpleGUI/VisualPickVisitor.cpp +++ b/applications/plugins/SofaSimpleGUI/VisualPickVisitor.cpp @@ -9,10 +9,8 @@ using std::endl; #include #include -namespace sofa -{ -namespace simplegui +namespace sofa::simplegui { VisualPickVisitor::VisualPickVisitor(core::visual::VisualParams* params) @@ -135,6 +133,6 @@ void VisualPickVisitor::processVisualModel(simulation::Node* node, core::visual: } -}} +} diff --git a/applications/plugins/SofaSimpleGUI/VisualPickVisitor.h b/applications/plugins/SofaSimpleGUI/VisualPickVisitor.h index 29d44859cd3..fe72aa97004 100644 --- a/applications/plugins/SofaSimpleGUI/VisualPickVisitor.h +++ b/applications/plugins/SofaSimpleGUI/VisualPickVisitor.h @@ -3,9 +3,8 @@ #include #include -namespace sofa -{ -namespace simplegui + +namespace sofa::simplegui { /** @@ -39,6 +38,6 @@ class VisualPickVisitor : public ::sofa::simulation::VisualVisitor }; -}} +} #endif // SOFA_SIMPLEGUI_VisualPickVisitor_H diff --git a/applications/plugins/SofaSimpleGUI/initSimpleGUI.cpp b/applications/plugins/SofaSimpleGUI/initSimpleGUI.cpp index fafbda5d76a..7cdc42b84c1 100644 --- a/applications/plugins/SofaSimpleGUI/initSimpleGUI.cpp +++ b/applications/plugins/SofaSimpleGUI/initSimpleGUI.cpp @@ -21,10 +21,8 @@ ******************************************************************************/ #include -namespace sofa -{ -namespace component +namespace sofa::component { //Here are just several convenient functions to help user to know what contains the plugin @@ -79,4 +77,4 @@ namespace component } -} + diff --git a/applications/plugins/SofaSphFluid/src/SofaSphFluid/OglFluidModel.cpp b/applications/plugins/SofaSphFluid/src/SofaSphFluid/OglFluidModel.cpp index de26d8a53e0..5e5c07f2209 100755 --- a/applications/plugins/SofaSphFluid/src/SofaSphFluid/OglFluidModel.cpp +++ b/applications/plugins/SofaSphFluid/src/SofaSphFluid/OglFluidModel.cpp @@ -2,11 +2,8 @@ #include -namespace sofa -{ -namespace component -{ -namespace visualmodel + +namespace sofa::component::visualmodel { SOFA_DECL_CLASS(OglFluidModel) @@ -17,5 +14,5 @@ int OglFluidModelClass = sofa::core::RegisterObject("Particle model for OpenGL d template class SOFA_SPH_FLUID_API OglFluidModel; } -} -} + + diff --git a/applications/plugins/SofaSphFluid/src/SofaSphFluid/OglFluidModel.h b/applications/plugins/SofaSphFluid/src/SofaSphFluid/OglFluidModel.h index 56a3a434466..e4cea9c3319 100755 --- a/applications/plugins/SofaSphFluid/src/SofaSphFluid/OglFluidModel.h +++ b/applications/plugins/SofaSphFluid/src/SofaSphFluid/OglFluidModel.h @@ -29,11 +29,8 @@ #include #include -namespace sofa -{ -namespace component -{ -namespace visualmodel + +namespace sofa::component::visualmodel { /** * \brief Render volume using particles @@ -103,7 +100,7 @@ class SOFA_SPH_FLUID_API OglFluidModel : public core::visual::VisualModel } -} -} + + diff --git a/applications/plugins/SofaSphFluid/src/SofaSphFluid/OglFluidModel.inl b/applications/plugins/SofaSphFluid/src/SofaSphFluid/OglFluidModel.inl index b6708693928..32dea4bada5 100755 --- a/applications/plugins/SofaSphFluid/src/SofaSphFluid/OglFluidModel.inl +++ b/applications/plugins/SofaSphFluid/src/SofaSphFluid/OglFluidModel.inl @@ -13,11 +13,8 @@ #include #include -namespace sofa -{ -namespace component -{ -namespace visualmodel + +namespace sofa::component::visualmodel { using namespace sofa::type; @@ -777,6 +774,6 @@ void OglFluidModel::updateVertexBuffer() } -} -} + + diff --git a/applications/plugins/SofaSphFluid/src/SofaSphFluid/ParticleSink.cpp b/applications/plugins/SofaSphFluid/src/SofaSphFluid/ParticleSink.cpp index d48955dfefe..1efe5b31e9f 100644 --- a/applications/plugins/SofaSphFluid/src/SofaSphFluid/ParticleSink.cpp +++ b/applications/plugins/SofaSphFluid/src/SofaSphFluid/ParticleSink.cpp @@ -24,13 +24,8 @@ #include #include -namespace sofa -{ - -namespace component -{ -namespace misc +namespace sofa::component::misc { int ParticleSinkClass = core::RegisterObject("Parametrable particle generator") @@ -43,6 +38,6 @@ template class SOFA_SPH_FLUID_API ParticleSink; } -} -} + + diff --git a/applications/plugins/SofaSphFluid/src/SofaSphFluid/ParticleSink.h b/applications/plugins/SofaSphFluid/src/SofaSphFluid/ParticleSink.h index e4033afb939..ed5a075749f 100644 --- a/applications/plugins/SofaSphFluid/src/SofaSphFluid/ParticleSink.h +++ b/applications/plugins/SofaSphFluid/src/SofaSphFluid/ParticleSink.h @@ -43,13 +43,7 @@ #include -namespace sofa -{ - -namespace component -{ - -namespace misc +namespace sofa::component::misc { template @@ -118,11 +112,8 @@ extern template class SOFA_SPH_FLUID_API ParticleSink; #endif -} // namespace misc - -} // namespace component +} // namespace sofa::component::misc -} // namespace sofa #endif // SOFA_COMPONENT_MISC_PARTICLESINK_H diff --git a/applications/plugins/SofaSphFluid/src/SofaSphFluid/ParticleSink.inl b/applications/plugins/SofaSphFluid/src/SofaSphFluid/ParticleSink.inl index c39ec6eabfd..b0710732139 100644 --- a/applications/plugins/SofaSphFluid/src/SofaSphFluid/ParticleSink.inl +++ b/applications/plugins/SofaSphFluid/src/SofaSphFluid/ParticleSink.inl @@ -25,13 +25,8 @@ #include #include -namespace sofa -{ - -namespace component -{ -namespace misc +namespace sofa::component::misc { @@ -245,11 +240,8 @@ void ParticleSink::draw(const core::visual::VisualParams* vparams) vparams->drawTool()->drawQuad(vertices[0],vertices[1],vertices[2],vertices[3], cross((vertices[1] - vertices[0]), (vertices[2] - vertices[0])), sofa::type::RGBAColor(0.0f, 0.5f, 0.2f, 1.0f)); } -} // namespace misc - -} // namespace component +} // namespace sofa::component::misc -} // namespace sofa #endif // SOFA_COMPONENT_MISC_PARTICLESINK_INL diff --git a/applications/plugins/SofaSphFluid/src/SofaSphFluid/ParticleSource.cpp b/applications/plugins/SofaSphFluid/src/SofaSphFluid/ParticleSource.cpp index a8b7fd1c63e..c57302ab292 100644 --- a/applications/plugins/SofaSphFluid/src/SofaSphFluid/ParticleSource.cpp +++ b/applications/plugins/SofaSphFluid/src/SofaSphFluid/ParticleSource.cpp @@ -24,13 +24,8 @@ #include #include -namespace sofa -{ - -namespace component -{ -namespace misc +namespace sofa::component::misc { int ParticleSourceClass = core::RegisterObject("Parametrable particle generator") @@ -44,5 +39,5 @@ template class SOFA_SPH_FLUID_API ParticleSource; } -} -} + + diff --git a/applications/plugins/SofaSphFluid/src/SofaSphFluid/ParticleSource.h b/applications/plugins/SofaSphFluid/src/SofaSphFluid/ParticleSource.h index bef271f85f5..39d4ba12942 100644 --- a/applications/plugins/SofaSphFluid/src/SofaSphFluid/ParticleSource.h +++ b/applications/plugins/SofaSphFluid/src/SofaSphFluid/ParticleSource.h @@ -29,13 +29,8 @@ #include #include -namespace sofa -{ - -namespace component -{ -namespace misc +namespace sofa::component::misc { template @@ -149,11 +144,8 @@ extern template class SOFA_SPH_FLUID_API ParticleSource; #endif -} // namespace misc - -} // namespace component +} // namespace sofa::component::misc -} // namespace sofa #endif diff --git a/applications/plugins/SofaSphFluid/src/SofaSphFluid/ParticleSource.inl b/applications/plugins/SofaSphFluid/src/SofaSphFluid/ParticleSource.inl index 7f1d28d4c8e..0226d951205 100644 --- a/applications/plugins/SofaSphFluid/src/SofaSphFluid/ParticleSource.inl +++ b/applications/plugins/SofaSphFluid/src/SofaSphFluid/ParticleSource.inl @@ -28,13 +28,8 @@ #include #include -namespace sofa -{ - -namespace component -{ -namespace misc +namespace sofa::component::misc { template @@ -363,11 +358,8 @@ void ParticleSource::draw(const core::visual::VisualParams* vparams) vparams->drawTool()->drawPoints(pointsInit, 10, sofa::type::RGBAColor(1., 0.5, 0.5, 1.)); } -} // namespace misc - -} // namespace component +} // namespace sofa::component::misc -} // namespace sofa #endif // SOFA_COMPONENT_MISC_PARTICLESOURCE_INL diff --git a/applications/plugins/SofaSphFluid/src/SofaSphFluid/ParticlesRepulsionForceField.cpp b/applications/plugins/SofaSphFluid/src/SofaSphFluid/ParticlesRepulsionForceField.cpp index 4d201c6b3a3..24edf6ea07d 100644 --- a/applications/plugins/SofaSphFluid/src/SofaSphFluid/ParticlesRepulsionForceField.cpp +++ b/applications/plugins/SofaSphFluid/src/SofaSphFluid/ParticlesRepulsionForceField.cpp @@ -26,13 +26,7 @@ #include -namespace sofa -{ - -namespace component -{ - -namespace forcefield +namespace sofa::component::forcefield { using namespace sofa::defaulttype; @@ -49,10 +43,9 @@ template class SOFA_SPH_FLUID_API ParticlesRepulsionForceField; template class SOFA_SPH_FLUID_API ParticlesRepulsionForceField; +} // namespace sofa::component::forcefield + -} // namespace forcefield -} // namespace component -} // namespace sofa diff --git a/applications/plugins/SofaSphFluid/src/SofaSphFluid/ParticlesRepulsionForceField.h b/applications/plugins/SofaSphFluid/src/SofaSphFluid/ParticlesRepulsionForceField.h index 5ac66f8d1b0..542e8fd9b56 100644 --- a/applications/plugins/SofaSphFluid/src/SofaSphFluid/ParticlesRepulsionForceField.h +++ b/applications/plugins/SofaSphFluid/src/SofaSphFluid/ParticlesRepulsionForceField.h @@ -31,13 +31,7 @@ #include -namespace sofa -{ - -namespace component -{ - -namespace forcefield +namespace sofa::component::forcefield { template @@ -116,10 +110,7 @@ extern template class SOFA_SPH_FLUID_API ParticlesRepulsionForceField - - -namespace sofa -{ - -namespace component -{ - -namespace forcefield +namespace sofa::component::forcefield { template @@ -219,10 +211,7 @@ void ParticlesRepulsionForceField::draw(const core::visual::VisualPar vparams->drawTool()->drawLines(vertices,1,colorVector); } -} // namespace forcefield - -} // namespace component +} // namespace sofa::component::forcefield -} // namespace sofa #endif // SOFA_COMPONENT_FORCEFIELD_PARTICLESREPULSIONFORCEFIELD_INL diff --git a/applications/plugins/SofaSphFluid/src/SofaSphFluid/SPHFluidForceField.cpp b/applications/plugins/SofaSphFluid/src/SofaSphFluid/SPHFluidForceField.cpp index 3520836f247..7d3ac1155e7 100644 --- a/applications/plugins/SofaSphFluid/src/SofaSphFluid/SPHFluidForceField.cpp +++ b/applications/plugins/SofaSphFluid/src/SofaSphFluid/SPHFluidForceField.cpp @@ -26,13 +26,7 @@ #include -namespace sofa -{ - -namespace component -{ - -namespace forcefield +namespace sofa::component::forcefield { using namespace sofa::defaulttype; @@ -49,10 +43,9 @@ template class SOFA_SPH_FLUID_API SPHFluidForceField; template class SOFA_SPH_FLUID_API SPHFluidForceField; +} // namespace sofa::component::forcefield + -} // namespace forcefield -} // namespace component -} // namespace sofa diff --git a/applications/plugins/SofaSphFluid/src/SofaSphFluid/SPHFluidForceField.h b/applications/plugins/SofaSphFluid/src/SofaSphFluid/SPHFluidForceField.h index 4e66d918b8f..6051fe4175d 100644 --- a/applications/plugins/SofaSphFluid/src/SofaSphFluid/SPHFluidForceField.h +++ b/applications/plugins/SofaSphFluid/src/SofaSphFluid/SPHFluidForceField.h @@ -32,13 +32,7 @@ #include -namespace sofa -{ - -namespace component -{ - -namespace forcefield +namespace sofa::component::forcefield { /// This class can be overridden if needed for additionnal storage within template specializations. @@ -196,10 +190,7 @@ extern template class SOFA_SPH_FLUID_API SPHFluidForceField; #endif // !defined(SOFA_COMPONENT_FORCEFIELD_SPHFLUIDFORCEFIELD_CPP) -} // namespace forcefield - -} // namespace component +} // namespace sofa::component::forcefield -} // namespace sofa #endif // SOFA_COMPONENT_FORCEFIELD_SPHFLUIDFORCEFIELD_H diff --git a/applications/plugins/SofaSphFluid/src/SofaSphFluid/SPHFluidForceField.inl b/applications/plugins/SofaSphFluid/src/SofaSphFluid/SPHFluidForceField.inl index cdc0f7b8d0e..c7bd2a92282 100644 --- a/applications/plugins/SofaSphFluid/src/SofaSphFluid/SPHFluidForceField.inl +++ b/applications/plugins/SofaSphFluid/src/SofaSphFluid/SPHFluidForceField.inl @@ -29,13 +29,8 @@ #include #include -namespace sofa -{ - -namespace component -{ -namespace forcefield +namespace sofa::component::forcefield { template @@ -554,10 +549,7 @@ void SPHFluidForceField::draw(const core::visual::VisualParams* vpara colorVector.clear(); } -} // namespace forcefield - -} // namespace component +} // namespace sofa::component::forcefield -} // namespace sofa #endif // SOFA_COMPONENT_FORCEFIELD_SPHFLUIDFORCEFIELD_INL diff --git a/applications/plugins/SofaSphFluid/src/SofaSphFluid/SPHFluidSurfaceMapping.cpp b/applications/plugins/SofaSphFluid/src/SofaSphFluid/SPHFluidSurfaceMapping.cpp index 9a79aace0d9..f3f2c59896b 100644 --- a/applications/plugins/SofaSphFluid/src/SofaSphFluid/SPHFluidSurfaceMapping.cpp +++ b/applications/plugins/SofaSphFluid/src/SofaSphFluid/SPHFluidSurfaceMapping.cpp @@ -25,13 +25,7 @@ #include -namespace sofa -{ - -namespace component -{ - -namespace mapping +namespace sofa::component::mapping { using namespace sofa::defaulttype; @@ -45,11 +39,9 @@ int SPHFluidSurfaceMappingClass = core::RegisterObject("SPHFluidSurfaceMappingCl template class SOFA_SPH_FLUID_API SPHFluidSurfaceMapping< Vec3Types, Vec3Types >; +} // namespace sofa::component::mapping -} // namespace mapping -} // namespace component -} // namespace sofa diff --git a/applications/plugins/SofaSphFluid/src/SofaSphFluid/SPHFluidSurfaceMapping.h b/applications/plugins/SofaSphFluid/src/SofaSphFluid/SPHFluidSurfaceMapping.h index 9f12ef7989e..50cdd15560c 100644 --- a/applications/plugins/SofaSphFluid/src/SofaSphFluid/SPHFluidSurfaceMapping.h +++ b/applications/plugins/SofaSphFluid/src/SofaSphFluid/SPHFluidSurfaceMapping.h @@ -32,13 +32,8 @@ #include -namespace sofa -{ - -namespace component -{ -namespace mapping +namespace sofa::component::mapping { @@ -212,10 +207,7 @@ extern template class SOFA_SPH_FLUID_API SPHFluidSurfaceMapping< defaulttype::Ve #endif -} // namespace mapping - -} // namespace component +} // namespace sofa::component::mapping -} // namespace sofa #endif diff --git a/applications/plugins/SofaSphFluid/src/SofaSphFluid/SPHFluidSurfaceMapping.inl b/applications/plugins/SofaSphFluid/src/SofaSphFluid/SPHFluidSurfaceMapping.inl index a01c091dfdd..62c9be4a1f5 100644 --- a/applications/plugins/SofaSphFluid/src/SofaSphFluid/SPHFluidSurfaceMapping.inl +++ b/applications/plugins/SofaSphFluid/src/SofaSphFluid/SPHFluidSurfaceMapping.inl @@ -35,13 +35,7 @@ #include -namespace sofa -{ - -namespace component -{ - -namespace mapping +namespace sofa::component::mapping { @@ -570,10 +564,7 @@ void SPHFluidSurfaceMapping::draw(const core::visual::VisualParams* vpar vparams->drawTool()->drawLines(points3, 1, sofa::type::RGBAColor(0.,1.,0.,1.)); } -} // namespace mapping - -} // namespace component +} // namespace sofa::component::mapping -} // namespace sofa #endif diff --git a/applications/plugins/SofaSphFluid/src/SofaSphFluid/SPHKernel.h b/applications/plugins/SofaSphFluid/src/SofaSphFluid/SPHKernel.h index c972906f003..bd88b536e57 100644 --- a/applications/plugins/SofaSphFluid/src/SofaSphFluid/SPHKernel.h +++ b/applications/plugins/SofaSphFluid/src/SofaSphFluid/SPHKernel.h @@ -26,13 +26,7 @@ #include -namespace sofa -{ - -namespace component -{ - -namespace forcefield +namespace sofa::component::forcefield { enum SPHKernels @@ -554,10 +548,7 @@ class SPHKernel: public BaseSPHKernel } }; -} // namespace forcefield - -} // namespace component +} // namespace sofa::component::forcefield -} // namespace sofa #endif // SOFA_COMPONENT_FORCEFIELD_SPHKERNEL_H diff --git a/applications/plugins/SofaSphFluid/src/SofaSphFluid/SpatialGridContainer.cpp b/applications/plugins/SofaSphFluid/src/SofaSphFluid/SpatialGridContainer.cpp index 5a5f3047103..6c7f4f9cdde 100644 --- a/applications/plugins/SofaSphFluid/src/SofaSphFluid/SpatialGridContainer.cpp +++ b/applications/plugins/SofaSphFluid/src/SofaSphFluid/SpatialGridContainer.cpp @@ -24,13 +24,7 @@ #include -namespace sofa -{ - -namespace component -{ - -namespace container +namespace sofa::component::container { using namespace sofa::defaulttype; @@ -45,9 +39,9 @@ template class SOFA_SPH_FLUID_API SpatialGridContainer< Vec3Types >; template class SOFA_SPH_FLUID_API SpatialGrid< SpatialGridTypes< Vec3Types > >; -} // namespace container +} // namespace sofa::component::container + + -} // namespace component -} // namespace sofa diff --git a/applications/plugins/SofaSphFluid/src/SofaSphFluid/SpatialGridContainer.h b/applications/plugins/SofaSphFluid/src/SofaSphFluid/SpatialGridContainer.h index bfa18b7a87c..092163b0eb1 100644 --- a/applications/plugins/SofaSphFluid/src/SofaSphFluid/SpatialGridContainer.h +++ b/applications/plugins/SofaSphFluid/src/SofaSphFluid/SpatialGridContainer.h @@ -32,13 +32,8 @@ #include -namespace sofa -{ - -namespace component -{ -namespace container +namespace sofa::component::container { @@ -288,10 +283,7 @@ extern template class SOFA_SPH_FLUID_API SpatialGrid< SpatialGridTypes< sofa::de #endif -} // namespace container - -} // namespace component +} // namespace sofa::component::container -} // namespace sofa #endif diff --git a/applications/plugins/SofaSphFluid/src/SofaSphFluid/SpatialGridContainer.inl b/applications/plugins/SofaSphFluid/src/SofaSphFluid/SpatialGridContainer.inl index ce96ef84f81..7343a1815e7 100644 --- a/applications/plugins/SofaSphFluid/src/SofaSphFluid/SpatialGridContainer.inl +++ b/applications/plugins/SofaSphFluid/src/SofaSphFluid/SpatialGridContainer.inl @@ -37,13 +37,8 @@ #include #endif // SOFASPHFLUID_HAVE_SOFA_GL == 1 -namespace sofa -{ - -namespace component -{ -namespace container +namespace sofa::component::container { @@ -790,10 +785,7 @@ void SpatialGridContainer::draw(const core::visual::VisualParams* vpa grid->draw(vparams); } -} // namespace container - -} // namespace component +} // namespace sofa::component::container -} // namespace sofa #endif diff --git a/applications/plugins/SofaSphFluid/src/SofaSphFluid/SpatialGridPointModel.cpp b/applications/plugins/SofaSphFluid/src/SofaSphFluid/SpatialGridPointModel.cpp index 67d81cb32cb..d60c97b3f8a 100644 --- a/applications/plugins/SofaSphFluid/src/SofaSphFluid/SpatialGridPointModel.cpp +++ b/applications/plugins/SofaSphFluid/src/SofaSphFluid/SpatialGridPointModel.cpp @@ -25,13 +25,8 @@ #include #include -namespace sofa -{ - -namespace component -{ -namespace collision +namespace sofa::component::collision { using namespace sofa::component::collision::geometry; @@ -246,9 +241,9 @@ void SpatialGridPointModel::computeBoundingTree(int maxDepth) root->addCube(Cube(cubeModel,0), Cube(cubeModel,cubeModel->getSize())); } -} // namespace collision +} // namespace sofa::component::collision + + -} // namespace component -} // namespace sofa diff --git a/applications/plugins/SofaSphFluid/src/SofaSphFluid/SpatialGridPointModel.h b/applications/plugins/SofaSphFluid/src/SofaSphFluid/SpatialGridPointModel.h index 7b5dd51d960..799d006031c 100644 --- a/applications/plugins/SofaSphFluid/src/SofaSphFluid/SpatialGridPointModel.h +++ b/applications/plugins/SofaSphFluid/src/SofaSphFluid/SpatialGridPointModel.h @@ -28,13 +28,8 @@ #include #include -namespace sofa -{ - -namespace component -{ -namespace collision +namespace sofa::component::collision { @@ -84,10 +79,7 @@ class SOFA_SPH_FLUID_API SpatialGridPointModel : public geometry::PointCollision }; }; -} // namespace collision - -} // namespace component +} // namespace sofa::component::collision -} // namespace sofa #endif diff --git a/applications/plugins/SofaSphFluid/src/SofaSphFluid/initSPHFluid.cpp b/applications/plugins/SofaSphFluid/src/SofaSphFluid/initSPHFluid.cpp index ec2e98453cb..7bd8ae8d848 100644 --- a/applications/plugins/SofaSphFluid/src/SofaSphFluid/initSPHFluid.cpp +++ b/applications/plugins/SofaSphFluid/src/SofaSphFluid/initSPHFluid.cpp @@ -21,10 +21,8 @@ ******************************************************************************/ #include -namespace sofa -{ -namespace component +namespace sofa::component { extern "C" { @@ -72,6 +70,6 @@ const char* getModuleComponentList() } -} // namespace component +} // namespace sofa::component + -} // namespace sofa diff --git a/applications/plugins/VolumetricRendering/extensions/CUDA/src/VolumetricRendering/CUDA/CudaTetrahedralVisualModel.cpp b/applications/plugins/VolumetricRendering/extensions/CUDA/src/VolumetricRendering/CUDA/CudaTetrahedralVisualModel.cpp index 94afdbabd5e..cc312ad4411 100644 --- a/applications/plugins/VolumetricRendering/extensions/CUDA/src/VolumetricRendering/CUDA/CudaTetrahedralVisualModel.cpp +++ b/applications/plugins/VolumetricRendering/extensions/CUDA/src/VolumetricRendering/CUDA/CudaTetrahedralVisualModel.cpp @@ -23,11 +23,8 @@ #include -namespace sofa -{ -namespace component -{ -namespace visualmodel + +namespace sofa::component::visualmodel { int CudaOglTetrahedralModelClass = sofa::core::RegisterObject("Tetrahedral model for OpenGL display") @@ -37,5 +34,5 @@ int CudaOglTetrahedralModelClass = sofa::core::RegisterObject("Tetrahedral model template class OglTetrahedralModel; } -} -} + + diff --git a/applications/plugins/VolumetricRendering/extensions/CUDA/src/VolumetricRendering/CUDA/CudaTetrahedralVisualModel.h b/applications/plugins/VolumetricRendering/extensions/CUDA/src/VolumetricRendering/CUDA/CudaTetrahedralVisualModel.h index acf2ae51a4d..d27d823417e 100644 --- a/applications/plugins/VolumetricRendering/extensions/CUDA/src/VolumetricRendering/CUDA/CudaTetrahedralVisualModel.h +++ b/applications/plugins/VolumetricRendering/extensions/CUDA/src/VolumetricRendering/CUDA/CudaTetrahedralVisualModel.h @@ -25,11 +25,8 @@ #include #include -namespace sofa -{ -namespace component -{ -namespace visualmodel + +namespace sofa::component::visualmodel { template @@ -104,5 +101,5 @@ class OglTetrahedralModel< gpu::cuda::CudaVectorTypes > : p #endif /*OGLTETRAHEDRALMODEL_H_*/ } -} -} + + diff --git a/applications/plugins/VolumetricRendering/extensions/CUDA/src/VolumetricRendering/CUDA/CudaTetrahedralVisualModel.inl b/applications/plugins/VolumetricRendering/extensions/CUDA/src/VolumetricRendering/CUDA/CudaTetrahedralVisualModel.inl index db7a13e0020..f69adc0cf9b 100644 --- a/applications/plugins/VolumetricRendering/extensions/CUDA/src/VolumetricRendering/CUDA/CudaTetrahedralVisualModel.inl +++ b/applications/plugins/VolumetricRendering/extensions/CUDA/src/VolumetricRendering/CUDA/CudaTetrahedralVisualModel.inl @@ -26,11 +26,8 @@ #include -namespace sofa -{ -namespace component -{ -namespace visualmodel + +namespace sofa::component::visualmodel { using namespace sofa::defaulttype; @@ -163,7 +160,6 @@ bool OglTetrahedralModel< gpu::cuda::CudaVectorTypes >::add } } -} -} + #endif //OGLTETRAHEDRALMODEL_H_ diff --git a/applications/plugins/VolumetricRendering/src/VolumetricRendering/OglTetrahedralModel.h b/applications/plugins/VolumetricRendering/src/VolumetricRendering/OglTetrahedralModel.h index 0fd1ca8244a..1d093679995 100644 --- a/applications/plugins/VolumetricRendering/src/VolumetricRendering/OglTetrahedralModel.h +++ b/applications/plugins/VolumetricRendering/src/VolumetricRendering/OglTetrahedralModel.h @@ -32,11 +32,8 @@ #include #include -namespace sofa -{ -namespace component -{ -namespace visualmodel + +namespace sofa::component::visualmodel { /** @@ -97,11 +94,7 @@ extern template class SOFA_VOLUMETRICRENDERING_API OglTetrahedralModel #include -namespace sofa -{ -namespace component -{ -namespace visualmodel + +namespace sofa::component::visualmodel { template @@ -382,10 +379,6 @@ void OglTetrahedralModel::updateVertexBuffer() } -} // namespace visualmodel - -} // namesapce component - -} // namespace sofa +} // namespace sofa::component::visualmodel #endif //OGLTETRAHEDRALMODEL_H_ diff --git a/applications/plugins/VolumetricRendering/src/VolumetricRendering/OglVolumetricModel.h b/applications/plugins/VolumetricRendering/src/VolumetricRendering/OglVolumetricModel.h index 7fc4034afad..bb85a23d191 100644 --- a/applications/plugins/VolumetricRendering/src/VolumetricRendering/OglVolumetricModel.h +++ b/applications/plugins/VolumetricRendering/src/VolumetricRendering/OglVolumetricModel.h @@ -34,11 +34,7 @@ #include -namespace sofa -{ -namespace component -{ -namespace visualmodel +namespace sofa::component::visualmodel { /** @@ -113,11 +109,7 @@ class SOFA_VOLUMETRICRENDERING_API OglVolumetricModel : public core::visual::Vis }; -} // namespace visualmodel - -} // namesapce component - -} // namespace sofa +} // namespace sofa::component::visualmodel #endif // OGLVOLUMETRICMODEL_H_