EMAN2
Classes | Namespaces | Functions | Variables
emutil.h File Reference
#include <cstring>
#include "emobject.h"
#include "emassert.h"
Include dependency graph for emutil.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  EMAN::EMUtil
 
struct  EMAN::ImageScore
 
class  EMAN::ImageSort
 

Namespaces

namespace  EMAN
 E2Exception class.
 

Functions

template<class T >
void EMDeletePtr (T &x)
 
template<class T >
void EMDeleteArray (T &x)
 

Variables

const int EMAN::EMDataTypeBits [] = { 0,8,8,16,16,32,32,32,64,32,32,64,0 }
 

Function Documentation

◆ EMDeleteArray()

template<class T >
void EMDeleteArray ( T &  x)
inline

Definition at line 62 of file emutil.h.

63{
64#ifdef _WIN32
65 if(x != NULL) {
66 delete x;
67 x = NULL;
68 }
69#else
70 {Assert(x != NULL);}
71 delete [] x;
72 x = NULL;
73#endif
74}
#define Assert(s)
Define Assert() function that is effective only when -DDEBUG is used.
Definition: emassert.h:42
#define x(i)
Definition: projector.cpp:1517

References Assert, and x.

Referenced by EMAN::PawelProjector::backproject3d(), EMAN::ChaoProjector::backproject3d(), EMAN::PawelProjector::project3d(), and EMAN::ChaoProjector::project3d().

◆ EMDeletePtr()

template<class T >
void EMDeletePtr ( T &  x)
inline

Definition at line 47 of file emutil.h.

48{
49#ifdef _WIN32
50 if(x != NULL) {
51 delete x;
52 x = NULL;
53 }
54#else
55 {Assert(x != NULL);}
56 delete x;
57 x = NULL;
58#endif
59}

References Assert, and x.