SHOGUN  3.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Macros | Enumerations
SGIO.h File Reference

Go to the source code of this file.

Classes

struct  substring
 struct Substring, specified by start position and end position. More...
class  SGIO
 Class SGIO, used to do input output operations throughout shogun. More...

Macros

#define NUM_LOG_LEVELS   10
#define FBUFSIZE   4096
#define CONST_DIRENT_T   const struct dirent
#define SG_SET_LOCALE_C   setlocale(LC_ALL, "C")
#define SG_RESET_LOCALE   setlocale(LC_ALL, "")
#define SG_UNLIKELY(expr)   expr
#define SG_GCDEBUG(...)
#define SG_DEBUG(...)
#define SG_OBJ_DEBUG(o,...)
#define SG_INFO(...)
#define SG_CLASS_INFO(c,...)
#define SG_WARNING(...)   { io->message(MSG_WARN, __PRETTY_FUNCTION__, __FILE__, __LINE__, __VA_ARGS__); }
#define SG_ERROR(...)   { io->message(MSG_ERROR, __PRETTY_FUNCTION__, __FILE__, __LINE__, __VA_ARGS__); }
#define SG_OBJ_ERROR(o,...)   { o->io->message(MSG_ERROR, __PRETTY_FUNCTION__, __FILE__, __LINE__, __VA_ARGS__); }
#define SG_CLASS_ERROR(c,...)   { c::io->message(MSG_ERROR, __PRETTY_FUNCTION__, __FILE__, __LINE__, __VA_ARGS__); }
#define SG_UNSTABLE(func,...)
#define SG_PRINT(...)   { io->message(MSG_MESSAGEONLY, __PRETTY_FUNCTION__, __FILE__, __LINE__, __VA_ARGS__); }
#define SG_OBJ_PRINT(o,...)   { o->io->message(MSG_MESSAGEONLY, __PRETTY_FUNCTION__, __FILE__, __LINE__, __VA_ARGS__); }
#define SG_NOTIMPLEMENTED   { io->not_implemented(__PRETTY_FUNCTION__, __FILE__, __LINE__); }
#define SG_DEPRECATED   { io->deprecated(__PRETTY_FUNCTION__, __FILE__, __LINE__); }
#define SG_PROGRESS(...)
#define SG_OBJ_PROGRESS(o,...)
#define SG_ABS_PROGRESS(...)
#define SG_DONE()
#define SG_SGCDEBUG(...)
#define SG_SDEBUG(...)
#define SG_SINFO(...)
#define SG_SWARNING(...)   { sg_io->message(MSG_WARN,__PRETTY_FUNCTION__, __FILE__, __LINE__, __VA_ARGS__); }
#define SG_SERROR(...)   { sg_io->message(MSG_ERROR,__PRETTY_FUNCTION__, __FILE__, __LINE__, __VA_ARGS__); }
#define SG_SPRINT(...)   { sg_io->message(MSG_MESSAGEONLY,__PRETTY_FUNCTION__, __FILE__, __LINE__, __VA_ARGS__); }
#define SG_SPROGRESS(...)
#define SG_SABS_PROGRESS(...)
#define SG_SDONE()
#define SG_SNOTIMPLEMENTED   { sg_io->not_implemented(__PRETTY_FUNCTION__, __FILE__, __LINE__); }
#define SG_SDEPRECATED   { sg_io->deprecated(__PRETTY_FUNCTION__, __FILE__, __LINE__); }
#define ASSERT(x)
#define REQUIRE(x,...)

Enumerations

enum  EMessageType {
  MSG_GCDEBUG = 0, MSG_DEBUG = 1, MSG_INFO = 2, MSG_NOTICE = 3,
  MSG_WARN = 4, MSG_ERROR = 5, MSG_CRITICAL = 6, MSG_ALERT = 7,
  MSG_EMERGENCY = 8, MSG_MESSAGEONLY = 9
}
enum  EMessageLocation { MSG_NONE = 0, MSG_FUNCTION = 1, MSG_LINE_AND_FILE = 2 }

Macro Definition Documentation

#define ASSERT (   x)
Value:
{ \
if (SG_UNLIKELY(!(x))) \
SG_SERROR("assertion %s failed in %s file %s line %d\n",#x, __PRETTY_FUNCTION__, __FILE__, __LINE__) \
}

Definition at line 202 of file SGIO.h.

#define CONST_DIRENT_T   const struct dirent

Definition at line 83 of file SGIO.h.

#define FBUFSIZE   4096

Definition at line 70 of file SGIO.h.

#define NUM_LOG_LEVELS   10

Definition at line 69 of file SGIO.h.

#define REQUIRE (   x,
  ... 
)
Value:
{ \
if (SG_UNLIKELY(!(x))) \
SG_SERROR(__VA_ARGS__) \
}

Definition at line 207 of file SGIO.h.

#define SG_ABS_PROGRESS (   ...)
Value:
{ \
if (SG_UNLIKELY(io->get_show_progress())) \
io->absolute_progress(__VA_ARGS__); \
}

Definition at line 153 of file SGIO.h.

#define SG_CLASS_ERROR (   c,
  ... 
)    { c::io->message(MSG_ERROR, __PRETTY_FUNCTION__, __FILE__, __LINE__, __VA_ARGS__); }

Definition at line 132 of file SGIO.h.

#define SG_CLASS_INFO (   c,
  ... 
)
Value:
{ \
if (SG_UNLIKELY(c::io->loglevel_above(MSG_INFO))) \
c::io->message(MSG_INFO, __PRETTY_FUNCTION__, __FILE__, __LINE__, __VA_ARGS__); \
}

Definition at line 124 of file SGIO.h.

#define SG_DEBUG (   ...)
Value:
{ \
if (SG_UNLIKELY(io->loglevel_above(MSG_DEBUG))) \
io->message(MSG_DEBUG, __PRETTY_FUNCTION__, __FILE__, __LINE__, __VA_ARGS__); \
}

Definition at line 108 of file SGIO.h.

#define SG_DEPRECATED   { io->deprecated(__PRETTY_FUNCTION__, __FILE__, __LINE__); }

Definition at line 141 of file SGIO.h.

#define SG_DONE ( )
Value:
{ \
if (SG_UNLIKELY(io->get_show_progress())) \
io->done(); \
}

Definition at line 158 of file SGIO.h.

#define SG_ERROR (   ...)    { io->message(MSG_ERROR, __PRETTY_FUNCTION__, __FILE__, __LINE__, __VA_ARGS__); }

Definition at line 130 of file SGIO.h.

#define SG_GCDEBUG (   ...)
Value:
{ \
if (SG_UNLIKELY(io->loglevel_above(MSG_GCDEBUG))) \
io->message(MSG_GCDEBUG, __PRETTY_FUNCTION__, __FILE__, __LINE__, __VA_ARGS__); \
}

Definition at line 103 of file SGIO.h.

#define SG_INFO (   ...)
Value:
{ \
if (SG_UNLIKELY(io->loglevel_above(MSG_INFO))) \
io->message(MSG_INFO, __PRETTY_FUNCTION__, __FILE__, __LINE__, __VA_ARGS__); \
}

Definition at line 119 of file SGIO.h.

#define SG_NOTIMPLEMENTED   { io->not_implemented(__PRETTY_FUNCTION__, __FILE__, __LINE__); }

Definition at line 140 of file SGIO.h.

#define SG_OBJ_DEBUG (   o,
  ... 
)
Value:
{ \
if (SG_UNLIKELY(o->io->loglevel_above(MSG_DEBUG))) \
o->io->message(MSG_DEBUG, __PRETTY_FUNCTION__, __FILE__, __LINE__, __VA_ARGS__); \
}

Definition at line 113 of file SGIO.h.

#define SG_OBJ_ERROR (   o,
  ... 
)    { o->io->message(MSG_ERROR, __PRETTY_FUNCTION__, __FILE__, __LINE__, __VA_ARGS__); }

Definition at line 131 of file SGIO.h.

#define SG_OBJ_PRINT (   o,
  ... 
)    { o->io->message(MSG_MESSAGEONLY, __PRETTY_FUNCTION__, __FILE__, __LINE__, __VA_ARGS__); }

Definition at line 139 of file SGIO.h.

#define SG_OBJ_PROGRESS (   o,
  ... 
)
Value:
{ \
if (SG_UNLIKELY(o->io->get_show_progress()))\
o->io->progress(__VA_ARGS__); \
}

Definition at line 148 of file SGIO.h.

#define SG_PRINT (   ...)    { io->message(MSG_MESSAGEONLY, __PRETTY_FUNCTION__, __FILE__, __LINE__, __VA_ARGS__); }

Definition at line 138 of file SGIO.h.

#define SG_PROGRESS (   ...)
Value:
{ \
if (SG_UNLIKELY(io->get_show_progress())) \
io->progress(__VA_ARGS__); \
}

Definition at line 143 of file SGIO.h.

#define SG_RESET_LOCALE   setlocale(LC_ALL, "")

Definition at line 87 of file SGIO.h.

#define SG_SABS_PROGRESS (   ...)
Value:
{ \
sg_io->absolute_progress(__VA_ARGS__); \
}

Definition at line 189 of file SGIO.h.

#define SG_SDEBUG (   ...)
Value:
{ \
sg_io->message(MSG_DEBUG,__PRETTY_FUNCTION__, __FILE__, __LINE__, __VA_ARGS__); \
}

Definition at line 169 of file SGIO.h.

#define SG_SDEPRECATED   { sg_io->deprecated(__PRETTY_FUNCTION__, __FILE__, __LINE__); }

Definition at line 200 of file SGIO.h.

#define SG_SDONE ( )
Value:
{ \
sg_io->done(); \
}

Definition at line 194 of file SGIO.h.

#define SG_SERROR (   ...)    { sg_io->message(MSG_ERROR,__PRETTY_FUNCTION__, __FILE__, __LINE__, __VA_ARGS__); }

Definition at line 180 of file SGIO.h.

#define SG_SET_LOCALE_C   setlocale(LC_ALL, "C")

Definition at line 86 of file SGIO.h.

#define SG_SGCDEBUG (   ...)
Value:
{ \
sg_io->message(MSG_GCDEBUG,__PRETTY_FUNCTION__, __FILE__, __LINE__, __VA_ARGS__);\
}

Definition at line 164 of file SGIO.h.

#define SG_SINFO (   ...)
Value:
{ \
sg_io->message(MSG_INFO,__PRETTY_FUNCTION__, __FILE__, __LINE__, __VA_ARGS__); \
}

Definition at line 174 of file SGIO.h.

#define SG_SNOTIMPLEMENTED   { sg_io->not_implemented(__PRETTY_FUNCTION__, __FILE__, __LINE__); }

Definition at line 199 of file SGIO.h.

#define SG_SPRINT (   ...)    { sg_io->message(MSG_MESSAGEONLY,__PRETTY_FUNCTION__, __FILE__, __LINE__, __VA_ARGS__); }

Definition at line 181 of file SGIO.h.

#define SG_SPROGRESS (   ...)
Value:
{ \
sg_io->progress(__VA_ARGS__); \
}

Definition at line 184 of file SGIO.h.

#define SG_SWARNING (   ...)    { sg_io->message(MSG_WARN,__PRETTY_FUNCTION__, __FILE__, __LINE__, __VA_ARGS__); }

Definition at line 179 of file SGIO.h.

#define SG_UNLIKELY (   expr)    expr

Definition at line 93 of file SGIO.h.

#define SG_UNSTABLE (   func,
  ... 
)
Value:
{ io->message(MSG_WARN, __PRETTY_FUNCTION__, __FILE__, __LINE__, \
__FILE__ ":" func ": Unstable method! Please report if it seems to " \
"work or not to the Shogun mailing list. Thanking you in " \
"anticipation. " __VA_ARGS__); }

Definition at line 133 of file SGIO.h.

#define SG_WARNING (   ...)    { io->message(MSG_WARN, __PRETTY_FUNCTION__, __FILE__, __LINE__, __VA_ARGS__); }

Definition at line 129 of file SGIO.h.


SHOGUN Machine Learning Toolbox - Documentation