Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

# Tools/Xabsl2/Xabsl2Engine/Xabsl2Tools.cpp

Go to the documentation of this file.

    00001 /**
    00002 * @file Xabsl2Tools.cpp
    00003 *
    00004 * Implementation of several helper classes for the XabslEngine.
    00005 *
    00006 * @author Martin Lötzsch
    00007 */
    00008
    00009 #include "Xabsl2Tools.h"
    00010 #include <stdarg.h>
    00011 #include <string.h>
    00012 #include <stdio.h>
    00013
    00014 void Xabsl2ErrorHandler::error(const char* format, ...)
    00015 {
    00016   // get the argument list
    00017   va_list args;
    00018   va_start(args,format);
    00019
    00020   // print the expression to the buffer
    00021   vsprintf(messageBuffer,format,args);
    00022
    00023   printError(messageBuffer);
    00024
    00025   // delete the argument list
    00026   va_end(args);
    00027   errorsOccurred = true;
    00028 }
    00029
    00030 void Xabsl2ErrorHandler::message(const char* format, ...)
    00031 {
    00032   // get the argument list
    00033   va_list args;
    00034   va_start(args,format);
    00035
    00036   // print the expression to the buffer
    00037   vsprintf(messageBuffer,format,args);
    00038
    00039   printMessage(messageBuffer);
    00040
    00041   // delete the argument list
    00042   va_end(args);
    00043 }