NPL
Neurological Programs and Libraries
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
macros.h
Go to the documentation of this file.
1
/******************************************************************************
2
* Copyright 2014 Micah C Chambers (micahc.vt@gmail.com)
3
*
4
* NPL is free software: you can redistribute it and/or modify it under the
5
* terms of the BSD 2-Clause License available in LICENSE or at
6
* http://opensource.org/licenses/BSD-2-Clause
7
*
8
* @file macros.h Useful macros.
9
*
10
*****************************************************************************/
11
12
#ifndef MACROS_H
13
#define MACROS_H
14
15
#include <string>
16
#include <stdexcept>
17
18
#define INVALID_ARGUMENT(EXP) \
19
std::invalid_argument(__PRETTY_FUNCTION__+std::string(" -> ")+std::string(EXP))
20
21
#define RUNTIME_ERROR(EXP) \
22
std::runtime_error(__PRETTY_FUNCTION__+std::string(" -> ")+std::string(EXP))
23
24
#ifdef VERYDEBUG
25
#define DBG3(EXP) EXP
26
#else
27
#define DBG3(EXP)
28
#endif
29
30
#ifdef DEBUG
31
#define DBG2(EXP) EXP
32
#else
33
#define DBG2(EXP)
34
#endif
35
36
#ifndef NDEBUG
37
#define DBG1(EXP) EXP
38
#else
39
#define DBG1(EXP)
40
#endif
41
42
#endif
lib
macros.h
Generated on Tue May 5 2015 22:14:57 for NPL by
1.8.9.1