SOFA API  73d8bb95
Open source framework for multi-physics simuation
sofa::core::objectmodel::WriteAccessWithRawPtr Class Reference

#include <BaseData.h>

Detailed Description

A WriteAccessWithRawPtr is a RAII class, holding a reference to a given container and providing access to its data through a non-const void* ptr taking care of the beginEdit/endEdit pairs.

Advantadges of using a WriteAccessWithRawPtr are :

  • It can be faster that the default methods and operators of the container, as verifications and changes notifications can be handled in the accessor's constructor and destructor instead of at each item access.

Public Attributes

void * ptr
 

Public Member Functions

 WriteAccessWithRawPtr (BaseData *data)
 
 ~WriteAccessWithRawPtr ()
 

Attribute details

void* sofa::core::objectmodel::WriteAccessWithRawPtr::ptr

Constructor details

sofa::core::objectmodel::WriteAccessWithRawPtr::WriteAccessWithRawPtr ( BaseData data)
inline
sofa::core::objectmodel::WriteAccessWithRawPtr::~WriteAccessWithRawPtr ( )
inline