File kernel/src/utils/SiconosTools/SiconosPointers.hpp¶
Go to the source code of this file
Siconos interface to reference-counting pointers
Siconos pointers are reference counting pointers. Memory pointed by a Siconos pointer is automaticaly deallocated.
Basic usage :
to declare a Siconos pointer on a Siconos Object:
SP::<Siconos Object> myobject;
to set a Siconos pointer :
myobject.reset(new <Siconos Object>(...));
Siconos pointers are boost smart pointers.
More documentation on smart pointers and reference counting:
Defines
-
NAME_SPACE_SPTR(X)¶
-
NAME_SPACE_SAPTR(X)¶
-
TYPEDEF_SPTR(X)¶
-
TYPEDEF_SAPTR(X)¶
-
DEFINE_SPTR(X)¶
-
DEFINE_SPTR_STRUCT(X)¶
-
DEFINE_SAPTR(X)¶
-
NAME_SPACE_TPL1_SPTR(N, X, Y)¶
-
TYPEDEF_TPL1_SPTR(N, X, Y)¶
-
struct nullDeleter¶
- #include <>
Using a shared_ptr to hold a pointer to a statically allocated object use create<type>SPtr(<type> &x) cf http://www.boost.org/doc/.
Public Functions
-
inline void operator()(void const*) const¶
-
inline void operator()(void const*) const¶
-
namespace SP¶
Namespace for Siconos smart pointers : memory pointed by a Siconos smart pointers is automaticaly deallocated.
-
namespace SPC¶
Namespace for const shared pointers : memory pointed by a const shared pointers is automaticaly deallocated.
-
namespace SA¶
Namespace for Siconos shared arrays : Siconos shared arrays are automaticaly deallocated.