vrecko
virtual reality framework
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
vrecko
Vrecko - the Virtual Reality Engine
Dynamic Art module
L-system plant modeler - module for Vrecko
Head Up Display module
Space Partitioning - module for Vrecko
Todo List
Deprecated List
Namespaces
Classes
Files
File List
include
base
helpers
BufFile.h
DynamicArray.h
DynamicTree.h
Heaps.cpp
Heaps.h
HelperMacros.h
StringHelpers.h
XercesXMLUtils.h
vrecko
vreckoAP
vreckoDP
vreckoUtils
src
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
HelperMacros.h
Go to the documentation of this file.
1
#ifndef HELPER_MACROS_H
2
#define HELPER_MACROS_H
3
4
#include <
vrecko/Logger.h
>
5
6
// Macros for error handling:
7
//
8
9
#define BFAILGOTO(Function) { if (!(Function)) { OUTPUTSTR3("\n%s(%d): An error occured!", __FILE__, __LINE__); goto FuncFailed; } }
10
#define BFAILGOTO_TEXT(Function, TextFunc) { if (!(Function)) { { OUTPUTSTR3("\n%s(%d): Following error occured:", __FILE__, __LINE__); TextFunc; } goto FuncFailed; } }
11
#define BFAILRET(Function) { if (!(Function)) { OUTPUTSTR3("\n%s(%d): An error occured!", __FILE__, __LINE__); return false; } }
12
#define BFAILRET_TEXT(Function, TextFunc) { if (!(Function)) { { OUTPUTSTR3("\n%s(%d): Following error occured:", __FILE__, __LINE__); TextFunc; } return false; } }
13
14
15
#ifndef SAFE_DELETE
16
#define SAFE_DELETE(p) { if(p) { delete (p); (p)=NULL; } }
17
#endif
18
19
#ifndef SAFE_FREE
20
#define SAFE_FREE(p) { if(p) { free (p); (p)=NULL; } }
21
#endif
22
23
24
#endif
include
helpers
HelperMacros.h
Generated on Tue Feb 19 2013 10:23:41 for vrecko by
1.8.3.1