matio-cpp
v0.2.5
A C++ wrapper of the matio library, with memory ownership handling, to read and write .mat files.
|
#include <matioCpp/SharedMatvar.h>
Public Member Functions | |
SharedMatvar () | |
Default constructor. More... | |
SharedMatvar (const SharedMatvar &other) | |
Copy constructor. More... | |
SharedMatvar (SharedMatvar &&other) | |
Move constructor. More... | |
SharedMatvar (matvar_t *inputPtr) | |
Import an existing matvar_t and take control of it (it will be deallocated when no other SharedMatvar objects point to it). More... | |
~SharedMatvar () | |
Destructor. More... | |
virtual matvar_t * | get () const final |
Docs inherited. More... | |
virtual bool | isShared () const final |
Docs inherited. More... | |
virtual bool | duplicateMatvar (const matvar_t *inputPtr) final |
Docs inherited. More... | |
virtual bool | importMatvar (matvar_t *inputPtr) final |
Docs inherited. More... | |
virtual MatvarHandler * | pointerToDuplicate () const final |
Docs inherited. More... | |
virtual WeakMatvar | weakOwnership () const final |
Docs inherited. More... | |
virtual void | dropOwnedPointer (matvar_t *previouslyOwnedPointer) final |
Docs inherited. More... | |
SharedMatvar & | operator= (const SharedMatvar &other) |
Copy assignement. More... | |
SharedMatvar & | operator= (SharedMatvar &&other) |
Move assignement. More... | |
std::weak_ptr< MatvarHandler::Ownership > | ownership () const |
Get a weak_ptr to the ownership. More... | |
Public Member Functions inherited from matioCpp::MatvarHandler | |
MatvarHandler () | |
Default constructor. More... | |
MatvarHandler (matvar_t *inputPtr, matioCpp::DeleteMode deleteMode=matioCpp::DeleteMode::Delete) | |
Constructor from an already existing matvar_t pointer. More... | |
MatvarHandler (const MatvarHandler &other) | |
Copy constructor. More... | |
MatvarHandler (MatvarHandler &&other) | |
Move constructor. More... | |
virtual | ~MatvarHandler () |
Default destructor. More... | |
ValueType | valueType () const |
Get the value type of the pointer. More... | |
VariableType | variableType () const |
Get the variable type of the pointer. More... | |
Static Public Member Functions | |
static SharedMatvar | GetMatvarShallowDuplicate (const matvar_t *inputPtr) |
Get the shallow duplicate of an input Matvar. More... | |
Static Public Member Functions inherited from matioCpp::MatvarHandler | |
static matvar_t * | GetMatvarDuplicate (const matvar_t *inputPtr) |
Get a duplicate of the input matvar pointer/. More... | |
static void | DeleteMatvar (matvar_t *pointerToDelete, DeleteMode mode=DeleteMode::Delete) |
Delete the specified Matvar. More... | |
Additional Inherited Members | |
Protected Attributes inherited from matioCpp::MatvarHandler | |
std::shared_ptr< PointerInfo > | m_ptr |
Shared pointer to a PointerInfo. More... | |
Definition at line 15 of file SharedMatvar.h.
matioCpp::SharedMatvar::SharedMatvar | ( | ) |
Default constructor.
It initialize the matvar_t to nullptr and it is the only owner of it.
Definition at line 14 of file SharedMatvar.cpp.
matioCpp::SharedMatvar::SharedMatvar | ( | const SharedMatvar & | other | ) |
Copy constructor.
other | The other object from which to copy. |
Definition at line 21 of file SharedMatvar.cpp.
matioCpp::SharedMatvar::SharedMatvar | ( | matioCpp::SharedMatvar && | other | ) |
Move constructor.
other | The other object from which to get the context. |
Definition at line 28 of file SharedMatvar.cpp.
matioCpp::SharedMatvar::SharedMatvar | ( | matvar_t * | inputPtr | ) |
Import an existing matvar_t and take control of it (it will be deallocated when no other SharedMatvar objects point to it).
inputPtr | The input pointer to control. |
Definition at line 35 of file SharedMatvar.cpp.
matioCpp::SharedMatvar::~SharedMatvar | ( | ) |
Destructor.
Definition at line 42 of file SharedMatvar.cpp.
|
finalvirtual |
|
finalvirtual |
Docs inherited.
Implements matioCpp::MatvarHandler.
Definition at line 58 of file SharedMatvar.cpp.
References matioCpp::MatvarHandler::GetMatvarDuplicate().
|
finalvirtual |
Docs inherited.
Implements matioCpp::MatvarHandler.
Definition at line 47 of file SharedMatvar.cpp.
Referenced by matioCpp::MatvarHandler::GetMatvarDuplicate(), and matioCpp::File::write().
|
static |
Get the shallow duplicate of an input Matvar.
inputPtr | The pointer do duplicate in a shallow way |
Definition at line 111 of file SharedMatvar.cpp.
References matioCpp::MatvarHandler::m_ptr, and matioCpp::ShallowDelete.
Referenced by matioCpp::MatvarHandler::GetMatvarDuplicate(), and matioCpp::File::write().
|
finalvirtual |
Docs inherited.
Implements matioCpp::MatvarHandler.
Definition at line 63 of file SharedMatvar.cpp.
References matioCpp::Delete.
|
finalvirtual |
matioCpp::SharedMatvar & matioCpp::SharedMatvar::operator= | ( | const SharedMatvar & | other | ) |
Copy assignement.
other | The other object to copy. |
Definition at line 92 of file SharedMatvar.cpp.
References matioCpp::MatvarHandler::m_ptr.
matioCpp::SharedMatvar & matioCpp::SharedMatvar::operator= | ( | matioCpp::SharedMatvar && | other | ) |
Move assignement.
other | The other object to get the context. |
Definition at line 99 of file SharedMatvar.cpp.
std::weak_ptr< matioCpp::MatvarHandler::Ownership > matioCpp::SharedMatvar::ownership | ( | ) | const |
Get a weak_ptr to the ownership.
Definition at line 106 of file SharedMatvar.cpp.
|
finalvirtual |
|
finalvirtual |
Docs inherited.
Implements matioCpp::MatvarHandler.
Definition at line 79 of file SharedMatvar.cpp.
References matioCpp::MatvarHandler::m_ptr.
Referenced by matioCpp::WeakMatvar::operator=(), and matioCpp::WeakMatvar::WeakMatvar().