Flow123d
master-f44eb46
|
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 | 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 105 of file global_defs.h.
#define _TOKENPASTE2 | ( | x, | |
y | |||
) | _TOKENPASTE(x, y) |
Definition at line 106 of file global_defs.h.
#define DBGCOUT | ( | ... | ) |
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_PERMANENT 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 88 of file global_defs.h.
#define DBGVAR | ( | var | ) |
Definition at line 89 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 104 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 107 of file global_defs.h.