SOFA API  1e111313
Open source framework for multi-physics simuation
sofa Namespace Reference

This allow Base object to interact with the messaging system. More...


 Utility class to handle the mechanism of masks.


struct  AdvancedTimerTest
struct  DefaultAnimationLoop_test
class  TemplateAliasTest


template<class DATA , class WIDGET >
using GenericDataWidget = sofa::gui::qt::GenericDataWidget< DATA, WIDGET >


 TEST_F (TemplateAliasTest, Register)
template<class mat >
helper::OwnershipSPtr< mat > convertSPtr (const defaulttype::BaseMatrix *m)
 TEST_F (AdvancedTimerTest, IsEnabled)
 TEST_F (AdvancedTimerTest, SetOutputType)
 TEST_F (AdvancedTimerTest, End)
 TEST_F (DefaultAnimationLoop_test, testOneStep)
void initSofaFramework ()
void initSofaSimulation ()

Detailed Description

This allow Base object to interact with the messaging system.


This register the TriangleLoader object to the logging system so that we can use msg_*(this)

This allow MeshTrian to interact with the messaging system.

Forward declaration.

for std::pair

This line registers the DefaultMultiMatrixAccessor to the messaging system allowing to use msg_info() instead of msg_info("DefaultMultiMatrixAccessor")

For size_t For std::string

Helpers to apply Eigen matrix methods to the Mat sofa type

Utility to compute the sorted permutation of a container. See example at the end of the file Francois Faure, April 2012

This file organization:

  • PRIVATE DECLARATION (the class that are only used internally)
  • PRIVATE DEFINITION (the implementation of the private classes)
  • PUBLIC DEFINITION (the implementation of the public classes)

This file is providing an API to combine gtest and msg_* API. The underlying idea is to be able to test sofa's message.

The API is composed of two macro:


The first one generates a gtest failure when a message of a given type is not emitted. So You need to use it express that the good behavior from the object is to rise a message.

The second one generates a gtest failure when a message of a given type is emitted.

Examples of use: for(BaseLoader* b : objectlist) { EXPECT_MESSAGE_NOEMIT(Warning); EXPECT_MESSAGE_EMIT(Error); b->load("Invalid file"); }

To work the API need to a specific handler to be install in the messaging system. This means that we need to install the message handler using. This is not done automatically To not add something with a linear time complexity in the process.

Example of installation: MessageDispatcher::addHandler( MainGtestMessageHandler::getInstance() ) ;

NB: This is done automatically if you are inhering from Sofa_test.

Typedef Documentation

template<class DATA , class WIDGET >
using sofa::GenericDataWidget = typedef sofa::gui::qt::GenericDataWidget<DATA,WIDGET>

Function Documentation

template<class mat >
helper::OwnershipSPtr<mat> sofa::convertSPtr ( const defaulttype::BaseMatrix m)

Converts a BaseMatrix to a eigen sparse matrix encapsulted in a OwnershipSPtr. It the conversion needs to create a temporary matrix, it will be automatically deleted by the OwnershipSPtr (with ownership). It the conversion did not create a temporary data, and points to an existing matrix, the OwnershipSPtr does not take the ownership and won't delete anything. move this somewhere else?

Matthieu Nesme
void SOFA_SOFAFRAMEWORK_API sofa::initSofaFramework ( )
void SOFA_SOFASIMULATION_API sofa::initSofaSimulation ( )
sofa::TEST_F ( DefaultAnimationLoop_test  ,
sofa::TEST_F ( TemplateAliasTest  ,
sofa::TEST_F ( AdvancedTimerTest  ,
sofa::TEST_F ( AdvancedTimerTest  ,
sofa::TEST_F ( AdvancedTimerTest  ,