PhoenixDataStream  1.0.0
Framework to save/load/serialize/deserialize data
Loading...
Searching...
No Matches
data_stream_assert.h File Reference
#include <string>
+ Include dependency graph for data_stream_assert.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define __ASSERT_FUNCTION   __func__
 
#define data_stream_assert(isOk)
 

Functions

void data_stream_assertFull (bool isOk, const std::string &assertion, const std::string &fileName, size_t line, const std::string &functionName)
 Check if the assertion isOk is true, raise an assertion if isOk is false.
 

Macro Definition Documentation

◆ __ASSERT_FUNCTION

#define __ASSERT_FUNCTION   __func__

Definition at line 13 of file data_stream_assert.h.

◆ data_stream_assert

#define data_stream_assert ( isOk)
Value:
data_stream_assertFull(isOk, #isOk, __FILE__, __LINE__, __ASSERT_FUNCTION)
void data_stream_assertFull(bool isOk, const std::string &assertion, const std::string &fileName, size_t line, const std::string &functionName)
Check if the assertion isOk is true, raise an assertion if isOk is false.
#define __ASSERT_FUNCTION

Definition at line 16 of file data_stream_assert.h.

Function Documentation

◆ data_stream_assertFull()

void data_stream_assertFull ( bool isOk,
const std::string & assertion,
const std::string & fileName,
size_t line,
const std::string & functionName )

Check if the assertion isOk is true, raise an assertion if isOk is false.

Parameters
isOk: assertion which has to be true
assertion: text assertion (convertion of isOk expression into text)
fileName: name of the file where the test is called
line: line of the file where the test is called
functionName: name of the function where the problem happends

Definition at line 22 of file data_stream_assert.cpp.

22 {
23 if(!isOk){__assert_fail(assertion.c_str(), fileName.c_str(), line, functionName.c_str());}
24}