OpenCMISS-Zinc C++ API Documentation
Public Types | Public Member Functions | Protected Attributes | List of all members
OpenCMISS::Zinc::Logger Class Reference

Font object controlling attributes of rendering text. More...

#include <logger.hpp>

Public Types

enum  ChangeFlag { CHANGE_FLAG_NONE = CMZN_LOGGER_CHANGE_FLAG_NONE, CHANGE_FLAG_NEW_MESSAGE = CMZN_LOGGER_CHANGE_FLAG_NEW_MESSAGE, CHANGE_FLAG_FINAL = CMZN_LOGGER_CHANGE_FLAG_FINAL }
 
enum  MessageType { MESSAGE_TYPE_INVALID = CMZN_LOGGER_MESSAGE_TYPE_INVALID, MESSAGE_TYPE_ERROR = CMZN_LOGGER_MESSAGE_TYPE_ERROR, MESSAGE_TYPE_WARNING = CMZN_LOGGER_MESSAGE_TYPE_WARNING, MESSAGE_TYPE_INFORMATION = CMZN_LOGGER_MESSAGE_TYPE_INFORMATION }
 
typedef int ChangeFlags
 

Public Member Functions

 Logger (cmzn_logger_id in_logger_id)
 
 Logger (const Logger &logger)
 
Loggeroperator= (const Logger &logger)
 
bool isValid () const
 
cmzn_logger_id getId () const
 
int getNumberOfMessages ()
 
MessageType getMessageTypeAtIndex (int index)
 
char * getMessageTextAtIndex (int index)
 
int setMaximumNumberOfMessages (int number)
 
int removeAllMessages ()
 
Loggernotifier createLoggernotifier ()
 

Protected Attributes

cmzn_logger_id id
 

Detailed Description

Font object controlling attributes of rendering text.

Font object incorporating typeface, size and other attributes for rendering text in graphics.

Member Typedef Documentation

Type for passing logical OR of ChangeFlag

See also
Loggerevent::getChangeFlags

Member Enumeration Documentation

Enumerator
CHANGE_FLAG_NONE 

logger(s) not changed

CHANGE_FLAG_NEW_MESSAGE 

logger(s) not changed

CHANGE_FLAG_FINAL 

final notification: owning logger has been destroyed

Enumeration of available logger message types.

Enumerator
MESSAGE_TYPE_INVALID 

Unspecified message type

MESSAGE_TYPE_ERROR 

Message for critical errors

MESSAGE_TYPE_WARNING 

Message for warnings

MESSAGE_TYPE_INFORMATION 

Message for non-critical informations.

Member Function Documentation

Loggernotifier OpenCMISS::Zinc::Logger::createLoggernotifier ( )
inline

Create a notifier for getting callbacks for changes to the messages in the logger.

Returns
Handle to new logger notifier, or NULL/invalid handle on failure.
cmzn_logger_id OpenCMISS::Zinc::Logger::getId ( ) const
inline

Return the C handle of the Logger object.

Returns
C handle of Logger if this objects is valid, 0 otherwise.
char* OpenCMISS::Zinc::Logger::getMessageTextAtIndex ( int  index)
inline

Return text of the message at index, oldest message index being 1 and newest message index being number_of_messages;

Parameters
indexindex of the message to enquire.
Returns
text of message at index, otherwise 0.
MessageType OpenCMISS::Zinc::Logger::getMessageTypeAtIndex ( int  index)
inline

Return type of the message at index, oldest message index being 1 and newest message index being number_of_messages;

See also
Logger::MessageType
Parameters
indexindex of the message to enquire.
Returns
type of message at index, otherwise.
int OpenCMISS::Zinc::Logger::getNumberOfMessages ( )
inline

Return the number of messages currently in the logger.

Returns
number of message, or 0 on failure.
bool OpenCMISS::Zinc::Logger::isValid ( ) const
inline

Check if this is a valid Logger object.

Returns
Status True if object is valid, false otherwise.
int OpenCMISS::Zinc::Logger::removeAllMessages ( )
inline

Remove all messages in logger. This will clear all messages.

Returns
OpenCMISS::Zinc::OK on success, otherwise OpenCMISS::Zinc::ERROR_ARGUMENT.
int OpenCMISS::Zinc::Logger::setMaximumNumberOfMessages ( int  number)
inline

Set the maximum number of messages stored in the logger. The default number is 500.

Parameters
numbermaximum number of messages to set to.
Returns
OpenCMISS::Zinc::OK on success, otherwise OpenCMISS::Zinc::ERROR_ARGUMENT.

The documentation for this class was generated from the following file: