This class may be used to draw Asserts in your code.
More...
#include <Assert.h>
|
static bool | check (const bool _check, const std::string &_message, const std::string &_where="") |
|
This class may be used to draw Asserts in your code.
class Assert
The code below shows a possible use of this class.
{
int a = 7;
Assert::check( a <= 10,
"my value is greater than 10",
"main()");
not raised an assert
Assert::check( a >= 10,
"my value is lower than 10",
"main()");
}
Definition at line 38 of file Assert.h.
◆ Assert() [1/2]
Default constructor.
- Note
- Disable by default.
◆ Assert() [2/2]
FEVV::Assert::Assert |
( |
const Assert & |
_Assert | ) |
|
|
delete |
Copy constructor.
- Note
- Disable by default.
◆ ~Assert()
FEVV::Assert::~Assert |
( |
| ) |
|
|
delete |
Destructor.
- Note
- Disable by default.
◆ check()
static bool FEVV::Assert::check |
( |
const bool |
_check, |
|
|
const std::string & |
_message, |
|
|
const std::string & |
_where = "" |
|
) |
| |
|
inlinestatic |
Check if we need to raise an assert.
- Parameters
-
[in] | _check | if _check is false, assert is raised. |
[in] | _message | a message to show in standard output if an assert is raised. |
[in] | _where | the function name where the assert is checked. (default: ""). |
- Returns
- _check
Definition at line 70 of file Assert.h.
The documentation for this class was generated from the following file:
- /Users/mac/builds/efd823a3/0/MEPP-team/MEPP2/Base/Assert.h