rad 6.2.0
Loading...
Searching...
No Matches
Assert.h
Go to the documentation of this file.
1
10/*
11 * scampl4cpp/engine
12 *
13 * Copyright by European Southern Observatory, 2012
14 * All rights reserved
15 *
16 * This library is free software; you can redistribute it and/or
17 * modify it under the terms of the GNU Lesser General Public
18 * License as published by the Free Software Foundation; either
19 * version 2.1 of the License, or (at your option) any later version.
20 *
21 * This library is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
24 * Lesser General Public License for more details.
25 *
26 * You should have received a copy of the GNU Lesser General Public
27 * License along with this library; if not, write to the Free Software
28 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
29 * 02111-1307 USA.
30 */
31
32#include "scxml4cpp/Log.h"
33
34#ifndef SCXML4CPP_ASSERT_H
35#define SCXML4CPP_ASSERT_H
36
37#ifndef __cplusplus
38#error This is a C++ include file and cannot be used from plain C
39#endif
40
44#ifndef SCXML4CPP_DISABLE_ASSERT
45#define SCXML4CPP_ASSERT(a) scxml4cpp_assert(a, __FILE__, __FUNCTION__, __LINE__)
46#define SCXML4CPP_ASSERTPTR(a) scxml4cpp_assert(a != NULL, __FILE__, __FUNCTION__, __LINE__)
47#define SCXML4CPP_ASSERTNEVER() scxml4cpp_assert(false, __FILE__, __FUNCTION__, __LINE__)
48#else
49#define SCXML4CPP_ASSERT(a)
50#define SCXML4CPP_ASSERTPTR(a)
51#define SCXML4CPP_ASSERTNEVER()
52#endif
53
54void scxml4cpp_assert(bool condition, const char* fileName, const char* functionName, int lineNumber);
55
56#endif // SCXML4CPP_ASSERT_H
57
58
59
void scxml4cpp_assert(bool condition, const char *fileName, const char *functionName, int lineNumber)
Definition Assert.cpp:34
Log header based on Logging facility described by Petru Marginean at: http://www.drdobbs....