FST  openfst-1.7.1
OpenFst Library
Classes | Macros | Functions
log.h File Reference
#include <cassert>
#include <iostream>
#include <string>
#include <fst/types.h>
#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) <= 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))
 
#define ATTRIBUTE_DEPRECATED   __attribute__((deprecated))
 

Functions

 DECLARE_int32 (v)
 
void FstCheck (bool x, const char *expr, const char *file, int line)
 

Macro Definition Documentation

#define ATTRIBUTE_DEPRECATED   __attribute__((deprecated))

Definition at line 80 of file log.h.

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

Definition at line 61 of file log.h.

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

Definition at line 62 of file log.h.

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

Definition at line 66 of file log.h.

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

Definition at line 64 of file log.h.

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

Definition at line 65 of file log.h.

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

Definition at line 63 of file log.h.

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

Definition at line 67 of file log.h.

#define DCHECK (   x)    assert(x)

Definition at line 70 of file log.h.

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

Definition at line 71 of file log.h.

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

Definition at line 75 of file log.h.

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

Definition at line 73 of file log.h.

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

Definition at line 74 of file log.h.

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

Definition at line 72 of file log.h.

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

Definition at line 76 of file log.h.

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

Definition at line 48 of file log.h.

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

Definition at line 49 of file log.h.

Function Documentation

DECLARE_int32 ( )
void FstCheck ( bool  x,
const char *  expr,
const char *  file,
int  line 
)
inline

Definition at line 52 of file log.h.