FST  openfst-1.8.3
OpenFst Library
Classes | Macros | Functions
log.h File Reference
#include <cassert>
#include <cstdlib>
#include <iostream>
#include <ostream>
#include <string_view>
#include <fst/flags.h>
Include dependency graph for log.h:

Go to the source code of this file.

Classes

class  LogMessage
 

Macros

#define LOG(type)   LogMessage(#type).stream()
 
#define VLOG(level)   if ((level) <= FST_FLAGS_v) LOG(INFO)
 
#define CHECK(x)   FstCheck(static_cast<bool>(x), #x, __FILE__, __LINE__)
 
#define CHECK_EQ(x, y)   CHECK((x) == (y))
 
#define CHECK_LT(x, y)   CHECK((x) < (y))
 
#define CHECK_GT(x, y)   CHECK((x) > (y))
 
#define CHECK_LE(x, y)   CHECK((x) <= (y))
 
#define CHECK_GE(x, y)   CHECK((x) >= (y))
 
#define CHECK_NE(x, y)   CHECK((x) != (y))
 
#define DCHECK(x)   assert(x)
 
#define DCHECK_EQ(x, y)   DCHECK((x) == (y))
 
#define DCHECK_LT(x, y)   DCHECK((x) < (y))
 
#define DCHECK_GT(x, y)   DCHECK((x) > (y))
 
#define DCHECK_LE(x, y)   DCHECK((x) <= (y))
 
#define DCHECK_GE(x, y)   DCHECK((x) >= (y))
 
#define DCHECK_NE(x, y)   DCHECK((x) != (y))
 

Functions

 DECLARE_int32 (v)
 
void FstCheck (bool x, std::string_view expr, std::string_view file, int line)
 

Macro Definition Documentation

#define CHECK (   x)    FstCheck(static_cast<bool>(x), #x, __FILE__, __LINE__)

Definition at line 65 of file log.h.

#define CHECK_EQ (   x,
 
)    CHECK((x) == (y))

Definition at line 66 of file log.h.

#define CHECK_GE (   x,
 
)    CHECK((x) >= (y))

Definition at line 70 of file log.h.

#define CHECK_GT (   x,
 
)    CHECK((x) > (y))

Definition at line 68 of file log.h.

#define CHECK_LE (   x,
 
)    CHECK((x) <= (y))

Definition at line 69 of file log.h.

#define CHECK_LT (   x,
 
)    CHECK((x) < (y))

Definition at line 67 of file log.h.

#define CHECK_NE (   x,
 
)    CHECK((x) != (y))

Definition at line 71 of file log.h.

#define DCHECK (   x)    assert(x)

Definition at line 74 of file log.h.

#define DCHECK_EQ (   x,
 
)    DCHECK((x) == (y))

Definition at line 75 of file log.h.

#define DCHECK_GE (   x,
 
)    DCHECK((x) >= (y))

Definition at line 79 of file log.h.

#define DCHECK_GT (   x,
 
)    DCHECK((x) > (y))

Definition at line 77 of file log.h.

#define DCHECK_LE (   x,
 
)    DCHECK((x) <= (y))

Definition at line 78 of file log.h.

#define DCHECK_LT (   x,
 
)    DCHECK((x) < (y))

Definition at line 76 of file log.h.

#define DCHECK_NE (   x,
 
)    DCHECK((x) != (y))

Definition at line 80 of file log.h.

#define LOG (   type)    LogMessage(#type).stream()

Definition at line 53 of file log.h.

#define VLOG (   level)    if ((level) <= FST_FLAGS_v) LOG(INFO)

Definition at line 54 of file log.h.

Function Documentation

DECLARE_int32 ( )
void FstCheck ( bool  x,
std::string_view  expr,
std::string_view  file,
int  line 
)
inline

Definition at line 57 of file log.h.