CONFIG LIB 1.5
Configuration Files Library (by TGG 2020)
|
This file contains some smart functions, operators, macros for safe initializing end erasing the memory. More...
#include <memory>
#include <cstdlib>
#include <cstring>
#include <iostream>
Go to the source code of this file.
Classes | |
class | MEMFUN |
class with overloaded "new" operator initializing object with zeros More... | |
Macros | |
#define | NEW_TAB(Var, Typ, Len) |
Macro for initializing array with zeros. | |
#define | DELETE_(OBJ) |
Macro for safe deleteing the object and sets the pointer to zero. | |
#define | DELETE_TAB(OBJ) |
Macro for safe deleteing the array and sets the pointer to zero. | |
Functions | |
template<class typ > | |
void | ERASE (typ **ptr, const char *text="(No name specified)") |
Safe erasing of the object and sets the pointer to zero. | |
This file contains some smart functions, operators, macros for safe initializing end erasing the memory.
Definition in file memfun.h.
#define DELETE_ | ( | OBJ | ) |
Macro for safe deleteing the object and sets the pointer to zero.
OBJ | - pointer to the object |
Definition at line 84 of file memfun.h.
Referenced by AIRFOIL::ReadNaca().
#define DELETE_TAB | ( | OBJ | ) |
Macro for safe deleteing the array and sets the pointer to zero.
OBJ | - pointer to the array |
Definition at line 97 of file memfun.h.
Referenced by AIRFOIL::Clean(), GRID_ARRAYS::DeleteWyn(), and GRID_ARRAYS::~GRID_ARRAYS().
#define NEW_TAB | ( | Var, | |
Typ, | |||
Len ) |
Macro for initializing array with zeros.
Var | - pointer to the array |
Typ | - type of array (e.g. double) |
Len | - legth of array |
Definition at line 71 of file memfun.h.
Referenced by GRID_ARRAYS::InitCommon(), GRID_ARRAYS::InitForPanukl(), GRID_ARRAYS::InitForPress(), GRID_ARRAYS::InitRob(), GRID_ARRAYS::ReadDAT(), GRID_ARRAYS::ReadDATw(), GRID_ARRAYS::ReadIN1(), GRID_ARRAYS::ReadIN2(), and GRID_ARRAYS::ReadINP().
void ERASE | ( | typ ** | ptr, |
const char * | text = "(No name specified)" ) |
Safe erasing of the object and sets the pointer to zero.
ptr | - reference to the object pointer |
text | - optional comment to be printed to stderr |
Definition at line 52 of file memfun.h.