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 } 00044 00045 /* 00046 * Change Log: 00047 * 00048 * $Log: Xabsl2Tools.cpp,v $ 00049 * Revision 1.1.1.1 2004/05/22 17:37:58 cvsadm 00050 * created new repository GT2004_WM 00051 * 00052 * Revision 1.1 2003/10/07 10:13:25 cvsadm 00053 * Created GT2004 (M.J.) 00054 * 00055 * Revision 1.3 2003/09/30 10:51:11 dueffert 00056 * typos fixed 00057 * 00058 * Revision 1.2 2003/08/09 14:53:10 dueffert 00059 * files and docu beautified 00060 * 00061 * Revision 1.1.1.1 2003/07/02 09:40:29 cvsadm 00062 * created new repository for the competitions in Padova from the 00063 * tamara CVS (Tuesday 2:00 pm) 00064 * 00065 * removed unused solutions 00066 * 00067 * Revision 1.2 2002/12/02 19:56:32 loetzsch 00068 * - Xabsl2Array now seems to work for more than 1 element 00069 * - Basic behaviors now can be registered at the engine 00070 * - Basic behaviors have access to their parameters 00071 * 00072 * Revision 1.1 2002/12/01 17:54:29 loetzsch 00073 * continued Xabsl2Engine: Xabsl2Array seems to work now 00074 * 00075 */