matio-cpp  v0.2.5
A C++ wrapper of the matio library, with memory ownership handling, to read and write .mat files.
matioCpp::MatvarHandler::PointerInfo Class Reference

#include <matioCpp/MatvarHandler.h>

Public Member Functions

 PointerInfo ()
 The deletion mode. More...
 
 PointerInfo (matvar_t *ptr, DeleteMode deleteMode)
 Constructor. More...
 
 ~PointerInfo ()
 Destructor. More...
 
void changePointer (matvar_t *ptr, DeleteMode deleteMode)
 Change the input pointer. More...
 
void deletePointer ()
 Delete the matvar pointer. More...
 
matvar_t * pointer ()
 Get the matvar pointer. More...
 
VariableType variableType () const
 Get the variable type. More...
 
ValueType valueType () const
 Get the value type. More...
 
DeleteMode deleteMode () const
 Get the deletion mode. More...
 
bool operator!= (const PointerInfo &other) const
 Comparison operator. More...
 

Static Public Member Functions

static void DeletePointer (matvar_t *ptr, DeleteMode deleteMode)
 Delete the given pointer given the mode. More...
 

Detailed Description

Definition at line 17 of file MatvarHandler.h.

Constructor & Destructor Documentation

◆ PointerInfo() [1/2]

matioCpp::MatvarHandler::PointerInfo::PointerInfo ( )

The deletion mode.

Default constructor

Definition at line 12 of file MatvarHandler.cpp.

References matioCpp::DoNotDelete, matioCpp::Unsupported, and matioCpp::UNSUPPORTED.

◆ PointerInfo() [2/2]

matioCpp::MatvarHandler::PointerInfo::PointerInfo ( matvar_t *  ptr,
DeleteMode  deleteMode 
)

Constructor.

Parameters
ptrThe input pointer
deleteModeThe deletion mode

Definition at line 20 of file MatvarHandler.cpp.

◆ ~PointerInfo()

matioCpp::MatvarHandler::PointerInfo::~PointerInfo ( )

Destructor.

Definition at line 25 of file MatvarHandler.cpp.

Member Function Documentation

◆ changePointer()

void matioCpp::MatvarHandler::PointerInfo::changePointer ( matvar_t *  ptr,
DeleteMode  deleteMode 
)

Change the input pointer.

Parameters
ptrThe new pointer
deleteModeThe corresponding deletion mode

Definition at line 30 of file MatvarHandler.cpp.

References matioCpp::get_types_from_matvart(), matioCpp::MatvarHandler::m_ptr, matioCpp::Unsupported, and matioCpp::UNSUPPORTED.

◆ deleteMode()

matioCpp::DeleteMode matioCpp::MatvarHandler::PointerInfo::deleteMode ( ) const

Get the deletion mode.

Returns
the deletion mode.

Definition at line 61 of file MatvarHandler.cpp.

◆ deletePointer()

void matioCpp::MatvarHandler::PointerInfo::deletePointer ( )

Delete the matvar pointer.

Definition at line 40 of file MatvarHandler.cpp.

References matioCpp::MatvarHandler::m_ptr.

◆ DeletePointer()

void matioCpp::MatvarHandler::PointerInfo::DeletePointer ( matvar_t *  ptr,
DeleteMode  deleteMode 
)
static

Delete the given pointer given the mode.

Parameters
ptrThe pointer to delete
deleteModeThe deletion mode

Definition at line 71 of file MatvarHandler.cpp.

References matioCpp::Delete, and matioCpp::ShallowDelete.

Referenced by matioCpp::MatvarHandler::Ownership::dropAll().

◆ operator!=()

bool matioCpp::MatvarHandler::PointerInfo::operator!= ( const PointerInfo other) const

Comparison operator.

Parameters
otherThe pointer to compare
Returns
True if input pointer is different from the other input pointer.

Definition at line 66 of file MatvarHandler.cpp.

References matioCpp::MatvarHandler::m_ptr.

◆ pointer()

matvar_t * matioCpp::MatvarHandler::PointerInfo::pointer ( )

Get the matvar pointer.

Returns
The inner matvar pointer.

Definition at line 46 of file MatvarHandler.cpp.

References matioCpp::MatvarHandler::m_ptr.

◆ valueType()

matioCpp::ValueType matioCpp::MatvarHandler::PointerInfo::valueType ( ) const

Get the value type.

Returns
the value type.

Definition at line 56 of file MatvarHandler.cpp.

◆ variableType()

matioCpp::VariableType matioCpp::MatvarHandler::PointerInfo::variableType ( ) const

Get the variable type.

Returns
the variable type.

Definition at line 51 of file MatvarHandler.cpp.


The documentation for this class was generated from the following files: