Flow123d
JS_before_hm-1804-gf2ad740aa
|
Global macros to enhance readability and debugging, general constants. More...
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "system/exc_common.hh"
#include "config.h"
#include "mpi.h"
#include "logger.hh"
#include "asserts.hh"
Go to the source code of this file.
Macros | |
#define | OLD_ASSERT(...) |
#define | OLD_WARN_ASSERT(...) |
#define | OLD_ASSERT_EQUAL(a, b) |
#define | OLD_ASSERT_LESS(a, b) |
#define | OLD_ASSERT_LE(a, b) |
#define | OLD_ASSERT_PTR(ptr) |
#define | DBGCOUT(...) |
#define | DBGVAR(var) |
#define | FLOW123D_FORCE_LINK_IN_CHILD(x) int force_link_##x = 0; |
#define | _TOKENPASTE(x, y) func_ ## x ## y |
#define | _TOKENPASTE2(x, y) _TOKENPASTE(x, y) |
#define | FLOW123D_FORCE_LINK_IN_PARENT(x) extern int force_link_##x; void _TOKENPASTE2(x, __LINE__)(void) { force_link_##x = 1; } |
Global macros to enhance readability and debugging, general constants.
* Copyright (C) 2015 Technical University of Liberec. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 3 as published by the Free Software Foundation. (http://www.gnu.org/licenses/gpl-3.0.en.html)
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
Definition in file global_defs.h.
#define _TOKENPASTE | ( | x, | |
y | |||
) | func_ ## x ## y |
Definition at line 158 of file global_defs.h.
#define _TOKENPASTE2 | ( | x, | |
y | |||
) | _TOKENPASTE(x, y) |
Definition at line 159 of file global_defs.h.
#define DBGCOUT | ( | ... | ) |
Definition at line 141 of file global_defs.h.
#define DBGVAR | ( | var | ) |
Definition at line 142 of file global_defs.h.
#define FLOW123D_FORCE_LINK_IN_CHILD | ( | x | ) | int force_link_##x = 0; |
These macros are necessary in classes that contain Input::Type::Abstract (PARENT macro) and in classes contain descendant of this Abstract (CHILD macro) if these descendants are initialized through methods of Input::Factory
class.
These macros are necessary for initializing of static variables in classes that contain descendants of parent Abstract.
Definition at line 157 of file global_defs.h.
#define FLOW123D_FORCE_LINK_IN_PARENT | ( | x | ) | extern int force_link_##x; void _TOKENPASTE2(x, __LINE__)(void) { force_link_##x = 1; } |
Definition at line 160 of file global_defs.h.
#define OLD_ASSERT | ( | ... | ) |
Actually there are following debugging switches FLOW123D_DEBUG_MESSAGES - use various debugging messages introduced by DBGCOUT FLOW123D_DEBUG_ASSERTS - use assertion checks introduced by ASSERT FLOW123D_DEBUG_PROFILER - use profiling introduced by START_TIMER, END_TIMER
You can turn all off defining: FLOW123D_NODEBUG or turn all on defining: FLOW123D_DEBUG
FLOW123D_DEBUG overrides FLOW123D_NODEBUG
Definition at line 108 of file global_defs.h.
#define OLD_ASSERT_EQUAL | ( | a, | |
b | |||
) |
Definition at line 110 of file global_defs.h.
#define OLD_ASSERT_LE | ( | a, | |
b | |||
) |
Definition at line 112 of file global_defs.h.
#define OLD_ASSERT_LESS | ( | a, | |
b | |||
) |
Definition at line 111 of file global_defs.h.
#define OLD_ASSERT_PTR | ( | ptr | ) |
Definition at line 113 of file global_defs.h.
#define OLD_WARN_ASSERT | ( | ... | ) |
Definition at line 109 of file global_defs.h.