9 #ifndef CMZN_LOGGER_HPP__ 10 #define CMZN_LOGGER_HPP__ 12 #include "opencmiss/zinc/logger.h" 13 #include "opencmiss/zinc/context.hpp" 39 explicit Logger(cmzn_logger_id in_logger_id) :
44 id(cmzn_logger_access(logger.id))
49 cmzn_logger_id temp_id = cmzn_logger_access(logger.id);
52 cmzn_logger_destroy(&
id);
62 cmzn_logger_destroy(&
id);
124 return cmzn_logger_get_number_of_messages(
id);
138 return static_cast<MessageType>(cmzn_logger_get_message_type_at_index(
151 return cmzn_logger_get_message_text_at_index(
id, index);
163 return cmzn_logger_set_maximum_number_of_messages(
id, number);
173 return cmzn_logger_remove_all_messages(
id);
186 inline bool operator==(
const Logger& a,
const Logger& b)
200 cmzn_loggerevent_id id;
208 explicit Loggerevent(cmzn_loggerevent_id in_logger_event_id) :
209 id(in_logger_event_id)
213 id(cmzn_loggerevent_access(loggerEvent.id))
218 cmzn_loggerevent_id temp_id = cmzn_loggerevent_access(loggerEvent.id);
220 cmzn_loggerevent_destroy(&
id);
229 cmzn_loggerevent_destroy(&
id);
264 return cmzn_loggerevent_get_change_flags(
id);
286 return cmzn_loggerevent_get_message_text(
id);
296 return Logger(cmzn_loggerevent_get_logger(
id));
316 static void C_callback(cmzn_loggerevent_id loggerevent_id,
void *callbackVoid)
318 Loggerevent loggerevent(cmzn_loggerevent_access(loggerevent_id));
320 (*callback)(loggerevent);
323 virtual void operator()(
const Loggerevent &loggerevent) = 0;
342 cmzn_loggernotifier_id id;
350 explicit Loggernotifier(cmzn_loggernotifier_id in_loggernotifier_id) :
351 id(in_loggernotifier_id)
355 id(cmzn_loggernotifier_access(loggerNotifier.id))
360 cmzn_loggernotifier_id temp_id = cmzn_loggernotifier_access(loggerNotifier.id);
363 cmzn_loggernotifier_destroy(&
id);
373 cmzn_loggernotifier_destroy(&
id);
392 cmzn_loggernotifier_id
getId()
const 409 return cmzn_loggernotifier_set_callback(
id, callback.C_callback, static_cast<void*>(&callback));
420 return cmzn_loggernotifier_clear_callback(
id);
431 return Logger(cmzn_context_get_logger(
id));
int removeAllMessages()
Definition: logger.hpp:171
int setMaximumNumberOfMessages(int number)
Definition: logger.hpp:161
bool isValid() const
Definition: logger.hpp:382
char * getMessageText() const
Definition: logger.hpp:284
bool isValid() const
Definition: logger.hpp:238
Definition: logger.hpp:83
int setCallback(Loggercallback &callback)
Definition: logger.hpp:407
cmzn_logger_id getId() const
Definition: logger.hpp:112
int clearCallback()
Definition: logger.hpp:418
Logger::MessageType getMessageType() const
Definition: logger.hpp:273
ChangeFlag
Definition: logger.hpp:66
Font object controlling attributes of rendering text.
Definition: logger.hpp:28
char * getMessageTextAtIndex(int index)
Definition: logger.hpp:149
Base class functor for logger notifier callbacks.
Definition: logger.hpp:309
Definition: logger.hpp:68
Definition: logger.hpp:87
cmzn_loggerevent_id getId() const
Definition: logger.hpp:248
int ChangeFlags
Definition: logger.hpp:95
Logger::ChangeFlags getChangeFlags() const
Definition: logger.hpp:262
cmzn_loggernotifier_id getId() const
Definition: logger.hpp:392
MessageType
Definition: logger.hpp:79
Manages individual user notification of changes with a logger.
Definition: logger.hpp:339
Definition: logger.hpp:85
Information about changes to messages in the logger.
Definition: logger.hpp:197
int getNumberOfMessages()
Definition: logger.hpp:122
Loggernotifier createLoggernotifier()
Definition: logger.hpp:424
The OpenCMISS namespace.
Definition: context.hpp:20
bool isValid() const
Definition: logger.hpp:102
Definition: logger.hpp:81
Definition: logger.hpp:72
MessageType getMessageTypeAtIndex(int index)
Definition: logger.hpp:136
Definition: logger.hpp:70
Logger getLogger() const
Definition: logger.hpp:294
Logger getLogger()
Definition: logger.hpp:429