cta_message.h File Reference

#include "cta_functions.h"

Go to the source code of this file.

Defines

#define CTA_WRITE_ERROR(message)   CTA_Message_Write(CLASSNAME,METHOD,message,'E')
 Macro for writing errors.
#define CTA_WRITE_INFO(message)   CTA_Message_Write(CLASSNAME,METHOD,message,'I')
 Macro for writing info messages.
#define CTA_WRITE_WARNING(message)   CTA_Message_Write(CLASSNAME,METHOD,message,'W')
 Macro for writing warnings.

Functions

CTAEXPORT void CTA_Message_Write (const char *className, const char *method, const char *message, char type)
 Write a message.
CTAEXPORT void CTA_Message_SetExternalWriter (CTA_Func externalWriter)
 Set an external writer for handling messages.
CTAEXPORT void CTA_Message_Quiet (int setting)
 Toggle message handler between quiet and normal mode. in the quiet mode no messages are send (not even to external writers).

Define Documentation

#define CTA_WRITE_ERROR ( message   )     CTA_Message_Write(CLASSNAME,METHOD,message,'E')

Macro for writing errors.

The name of the class and the method name must be set by the defines CLSNAM and METHOD

Parameters:
message I Error message

Definition at line 76 of file cta_message.h.

#define CTA_WRITE_INFO ( message   )     CTA_Message_Write(CLASSNAME,METHOD,message,'I')

Macro for writing info messages.

The name of the class and the method name must be set by the defines CLSNAM and METHOD

Parameters:
message I Info message

Definition at line 85 of file cta_message.h.

#define CTA_WRITE_WARNING ( message   )     CTA_Message_Write(CLASSNAME,METHOD,message,'W')

Macro for writing warnings.

The name of the class and the method name must be set by the defines CLSNAM and METHOD

Parameters:
message I Warning message

Definition at line 94 of file cta_message.h.


Function Documentation

CTAEXPORT void CTA_Message_Quiet ( int  setting  ) 

Toggle message handler between quiet and normal mode. in the quiet mode no messages are send (not even to external writers).

Parameters:
setting I set message handler in quiet mode CTA_TRUE/CTA_FALSE
CTAEXPORT void CTA_Message_SetExternalWriter ( CTA_Func  externalWriter  ) 

Set an external writer for handling messages.

An external writer must comply to the following C interface:

void my_writer(char *className, char *method, char *message, char type);

Parameters:
externalWriter I External writer
Note:
Fortran writers are not yet supported
CTAEXPORT void CTA_Message_Write ( const char *  className,
const char *  method,
const char *  message,
char  type 
)

Write a message.

Parameters:
className I name of class that writes the message
method I name of the method that writes the message
message I message
type I type of message -'M':message -'I':Info -'W':Warning -'E':Error -'F':Fatal error (will terminate application)

Generated on 4 Mar 2014 for OpenDA by  doxygen 1.6.1