template<class T, class Enable = void>
class sofa::helper::WriteAccessor< T, Enable >
A WriteAccessor is a proxy class, holding a reference to a given container and providing access to its data, using an unified interface (similar to std::vector), hiding API differences within some containers.
Other advantadges of using a WriteAccessor 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.
- Accesses can be logged for debugging or task dependencies analysis.
The default implementation provides only minimal set of methods and operators, sufficient for scalar types but which should be overloaded for more complex types. Various template specializations are typically used, especially for core::objectmodel::Data<T>