Sha256: 52a3871b8cc49c563dc6d8648855f4835c144a55fcf008de4a52bcd15c260e53

Contents?: true

Size: 1002 Bytes

Versions: 4

Compression:

Stored size: 1002 Bytes

Contents

#ifndef LIMONP_HANDY_MACRO_HPP
#define LIMONP_HANDY_MACRO_HPP

#include <cstdio>
#include <cstdlib>

#define LIMONP_CHECK(exp) \
    if(!(exp)){fprintf(stderr, "File:%s, Line:%d Exp:[" #exp "] is true, abort.\n", __FILE__, __LINE__); abort();}

#define print(x) cout<< #x": " << x <<endl
/*
#define XX_GET_SET(varType, varName, funName)\
private: varType varName;\
public: inline varType get##funName(void) const {return varName;}\
public: inline void set##funName(varType var) {varName = var;}

#define XX_GET(varType, varName, funName)\
private: varType varName;\
public: inline varType get##funName(void) const {return varName;}

#define XX_SET(varType, varName, funName)\
private: varType varName;\
public: inline void set##funName(varType var) {varName = var;}

#define XX_GET_SET_BY_REF(varType, varName, funName)\
private: varType varName;\
public: inline const varType& get##funName(void) const {return varName;}\
public: inline void set##funName(const varType& var){varName = var;}
*/

#endif

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
jieba_rb-0.0.5 ext/cppjieba/src/Limonp/HandyMacro.hpp
jieba_rb-0.0.2 ext/cppjieba/src/Limonp/HandyMacro.hpp
jieba_rb-0.0.1 ext/cppjieba/src/Limonp/HandyMacro.hpp
jieba_ffi-0.0.3 ext/libcppjieba/include/Limonp/HandyMacro.hpp