Object PKCS#11 C++ Wrapper
Macros
macros.h File Reference
#include <stdio.h>
#include <iostream>

Go to the source code of this file.

Macros

#define NOT_IMPLEMENTED   TRACE("\e[34m[NOT IMPLEMENTED.]")
 
#define OK   TRACE("\e[32m[OK]")
 
#define FAILED   TRACE("\e[31m[FAILED]")
 
#define TRACE(x)
 
#define TRACEm(fmt, ...)
 
#define TRACE_ERROR(x)
 
#define TRACEm_ERROR(fmt, ...)
 
#define EXPECT_ZERO(x)
 
#define EXPECT_N_ZERO(x)
 
#define PRECONDITION(x)   EXPECT_N_ZERO(x)
 

Macro Definition Documentation

#define EXPECT_N_ZERO (   x)
#define EXPECT_ZERO (   x)
#define FAILED   TRACE("\e[31m[FAILED]")
#define NOT_IMPLEMENTED   TRACE("\e[34m[NOT IMPLEMENTED.]")
#define OK   TRACE("\e[32m[OK]")
#define PRECONDITION (   x)    EXPECT_N_ZERO(x)
#define TRACE (   x)

This macro can be used to write usefull trace messages. Example of use:
TRACE("Something went wrong here");
TRACE(exception.toString());

Output includes the File name, function and line number.

#define TRACE_ERROR (   x)
#define TRACEm (   fmt,
  ... 
)
#define TRACEm_ERROR (   fmt,
  ... 
)