Base API nvidia_logo_transpbg.gif Up
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
mi::base::ILogger Class Referenceabstract

The ILogger interface class supports logging of messages. More...

#include <ilogger.h>

Inheritance diagram for mi::base::ILogger:

Public Types

typedef Interface_declare< id1, ... > Self
 Own type. More...
 
typedef Uuid_t< id1, ... > IID
 Declares the interface ID (IID) of this interface. More...
 

Public Member Functions

virtual void message (Message_severity level, const char *module_category, const char *message)
 Emits a message to the application's log. More...
 
virtual void message (Message_severity level, const char *module_category, const Message_details &, const char *message)=0
 Emits a message to the application's log. More...
 
void printf (Message_severity level, const char *module_category, const char *message,...) __attribute__((format(printf
 Emits a message to the application's log. More...
 
void printf (Message_severity level, const char *module_category, const Message_details &details, const char *message,...) __attribute__((format(printf
 Emits a message to the application's log. More...
 
virtual Uint32 retain () const =0
 Increments the reference count. More...
 
virtual Uint32 release () const =0
 Decrements the reference count. More...
 
virtual const IInterfaceget_interface (const Uuid &interface_id) const =0
 Acquires a const interface from another. More...
 
template<class T>
const T * get_interface () const
 Acquires a const interface from another. More...
 
virtual IInterfaceget_interface (const Uuid &interface_id)=0
 Acquires a mutable interface from another. More...
 
template<class T>
T * get_interface ()
 Acquires a mutable interface from another. More...
 
virtual Uuid get_iid () const =0
 Returns the interface ID of the most derived interface. More...
 

Static Public Member Functions

static bool compare_iid (const Uuid &iid)
 Compares the interface ID iid against the interface ID of this interface and of its ancestors. More...
 

Detailed Description

The ILogger interface class supports logging of messages.

Plugins based on mi::base::Plugin are provided with a logger, such that plugins can be written to use the same message log as the host application.

Different APIs allow to register your own implementation of a logger to override their internal implementation. Note that in such case the object implementing this interface shall not be created on the stack, since this might lead to premature destruction of such instances while still being in use by the API.

The following message categories are used in some APIs. There might be other, undocumented categories.

category purpose
"DATABASE" database
"DISK" raw disk I/O, swapping
"GEOMETRY" geometry processing, e.g., tessellation
"IMAGE" texture processing, image and video plugins
"IO" scene data import and export
"MAIN" reserved for the application itself
"MISC" other
"MEMORY" memory management
"NETWORK" networking
"PLUGIN" plugins (unless other categories fit better)
"RENDER" rendering

Member Typedef Documentation

 IID

typedef Uuid_t<id1,id2,id3,id4,id5,id6,id7,id8,id9,id10,id11> mi::base::Interface_declare< id1, ... >::IID
inherited

Declares the interface ID (IID) of this interface.

 Self

typedef Interface_declare<id1,id2,id3,id4,id5,id6,id7,id8,id9,id10,id11,IInterface > mi::base::Interface_declare< id1, ... >::Self
inherited

Own type.

Member Function Documentation

 compare_iid()

static bool mi::base::Interface_declare< id1, ... >::compare_iid ( const Uuid iid)
inlinestaticinherited

Compares the interface ID iid against the interface ID of this interface and of its ancestors.

Returns
true if iid == IID() or is equal to one of the interface IDs of its ancestors, and false otherwise.