eLynx SDK
v3.3.0 C++ image processing API reference |
00001 //============================================================================ 00002 // CoreMacros.h Core.Component package 00003 //============================================================================ 00004 // Usage: declare fundamental macros 00005 //---------------------------------------------------------------------------- 00006 // Copyright (C) 2006 by eLynx project 00007 // 00008 // This library is free software; you can redistribute it and/or 00009 // modify it under the terms of the GNU Library General Public 00010 // License as published by the Free Software Foundation; either 00011 // version 2 of the License, or (at your option) any later version. 00012 // 00013 // This library is distributed in the hope that it will be useful, 00014 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00016 // See the GNU Library General Public License for more details. 00017 //---------------------------------------------------------------------------- 00018 #ifndef __CoreMacros_h__ 00019 #define __CoreMacros_h__ 00020 00021 #include <elx/core/CoreOS.h> 00022 00024 #ifndef elxSAFE_DELETE 00025 #define elxSAFE_DELETE(_p_) { if (NULL != (_p_)) { delete (_p_); (_p_) = NULL; } } 00026 #endif 00027 00029 #ifndef elxSAFE_DELETE_LIST 00030 #define elxSAFE_DELETE_LIST(_p_) { if (NULL != (_p_)) { delete [] (_p_); (_p_) = NULL; } } 00031 #endif 00032 00034 #ifndef elxSAFE_RELEASE 00035 #define elxSAFE_RELEASE(_p_) { if (NULL != (_p_)) { (_p_)->Release(); (_p_) = NULL; } } 00036 #endif 00037 00039 #ifdef elxDEBUG // Debug mode 00040 00042 #include <assert.h> 00043 00045 #define elxASSERT(_ibCondition_) { assert((_ibCondition_)); } 00046 00047 #else // Release mode 00048 00049 // No assert 00050 # define elxASSERT(_ibCondition_) 00051 00052 #endif 00053 00054 #endif // __CoreMacros_h__