MEPP2 Project
Public Member Functions | Static Public Member Functions | List of all members
FEVV::Assert Class Reference

This class may be used to draw Asserts in your code. More...

#include <Assert.h>

Collaboration diagram for FEVV::Assert:
Collaboration graph

Public Member Functions

 Assert ()=delete
 
 Assert (const Assert &_Assert)=delete
 
 ~Assert ()=delete
 

Static Public Member Functions

static bool check (const bool _check, const std::string &_message, const std::string &_where="")
 

Detailed Description

This class may be used to draw Asserts in your code.

class Assert

The code below shows a possible use of this class.

#include "Base/Assert.h"
using namespace FEVV;
// ...
{
int a = 7;
Assert::check( a <= 10, "my value is greater than 10", "main()"); // will
not raised an assert Assert::check( a >= 10, "my value is lower than 10",
"main()"); // will raised an assert
}

Definition at line 38 of file Assert.h.

Constructor & Destructor Documentation

◆ Assert() [1/2]

FEVV::Assert::Assert ( )
delete

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.

Member Function Documentation

◆ 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]_checkif _check is false, assert is raised.
[in]_messagea message to show in standard output if an assert is raised.
[in]_wherethe function name where the assert is checked. (default: "").
Returns
_check

Definition at line 70 of file Assert.h.

Here is the caller graph for this function:

The documentation for this class was generated from the following file:
FEVV
Interfaces for plugins These interfaces will be used for different plugins.
Definition: Assert.h:16
FEVV::Assert::check
static bool check(const bool _check, const std::string &_message, const std::string &_where="")
Definition: Assert.h:70
Assert.h