diff options
author | Daniel M. Pelt <D.M.Pelt@cwi.nl> | 2015-03-13 17:12:42 +0100 |
---|---|---|
committer | Daniel M. Pelt <D.M.Pelt@cwi.nl> | 2015-03-13 17:12:42 +0100 |
commit | f21700e00e81538d5510973a51b8ae97fb4a24dd (patch) | |
tree | d1dcd07f2a29243e279fe2915c5db7814e99ea13 /include/astra/Logging.h | |
parent | e4614cf09b90cc9a0e38d370bb090a11f3877b33 (diff) | |
download | astra-f21700e00e81538d5510973a51b8ae97fb4a24dd.tar.gz astra-f21700e00e81538d5510973a51b8ae97fb4a24dd.tar.bz2 astra-f21700e00e81538d5510973a51b8ae97fb4a24dd.tar.xz astra-f21700e00e81538d5510973a51b8ae97fb4a24dd.zip |
Enable logging to Matlab window using callback function
Also introduces a mex initialize function that is called
at the first invocation of any mex method.
Diffstat (limited to 'include/astra/Logging.h')
-rw-r--r-- | include/astra/Logging.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/astra/Logging.h b/include/astra/Logging.h index 5695663..e822c24 100644 --- a/include/astra/Logging.h +++ b/include/astra/Logging.h @@ -75,7 +75,7 @@ public: * @param ... * Any additional format arguments. */ - static void debug(const char *sfile, int sline, const char *fmt, ...); + static void debug(const char *sfile, int sline, const char *fmt, ...); static void info(const char *sfile, int sline, const char *fmt, ...); static void warn(const char *sfile, int sline, const char *fmt, ...); static void error(const char *sfile, int sline, const char *fmt, ...); @@ -143,6 +143,13 @@ public: static void disableScreen(); static void disableFile(); + /** + * Set callback function for logging to screen. + * @return whether callback was set succesfully. + * + */ + static bool setCallbackScreen(void (*cb)(const char *msg, size_t len)); + }; } |