- Cal3D 0.9 API Reference -

Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages  

error.h

00001 //****************************************************************************//
00002 // error.h                                                                    //
00003 // Copyright (C) 2001, 2002 Bruno 'Beosil' Heidelberger                       //
00004 //****************************************************************************//
00005 // This library is free software; you can redistribute it and/or modify it    //
00006 // under the terms of the GNU Lesser General Public License as published by   //
00007 // the Free Software Foundation; either version 2.1 of the License, or (at    //
00008 // your option) any later version.                                            //
00009 //****************************************************************************//
00010 
00011 #ifndef CAL_ERROR_H
00012 #define CAL_ERROR_H
00013 
00014 //****************************************************************************//
00015 // Includes                                                                   //
00016 //****************************************************************************//
00017 
00018 #include "cal3d/global.h"
00019 
00020 //****************************************************************************//
00021 // Class declaration                                                          //
00022 //****************************************************************************//
00023 
00024  /*****************************************************************************/
00028 class CAL3D_API CalError
00029 {
00030 // misc
00031 public:
00032   enum Code
00033   {
00034     OK = 0,
00035     INTERNAL,
00036     INVALID_HANDLE,
00037     MEMORY_ALLOCATION_FAILED,
00038     FILE_NOT_FOUND,
00039     INVALID_FILE_FORMAT,
00040     FILE_PARSER_FAILED,
00041     INDEX_BUILD_FAILED,
00042     NO_PARSER_DOCUMENT,
00043     INVALID_ANIMATION_DURATION,
00044     BONE_NOT_FOUND,
00045     INVALID_ATTRIBUTE_VALUE,
00046     INVALID_KEYFRAME_COUNT,
00047     INVALID_ANIMATION_TYPE,
00048     FILE_CREATION_FAILED,
00049     FILE_WRITING_FAILED,
00050     INCOMPATIBLE_FILE_VERSION,
00051     NO_MESH_IN_MODEL,
00052     BAD_DATA_SOURCE,
00053     NULL_BUFFER,
00054     MAX_ERROR_CODE
00055   };
00056 
00057 // member variables
00058 protected:
00059   static Code m_lastErrorCode;
00060   static std::string m_strLastErrorFile;
00061   static int m_lastErrorLine;
00062   static std::string m_strLastErrorText;
00063 
00064 // constructors/destructor
00065 protected:
00066   CalError();
00067   virtual ~CalError();
00068 
00069 // member functions 
00070 public:
00071   static Code getLastErrorCode();
00072   static std::string getLastErrorDescription();
00073   static const std::string& getLastErrorFile();
00074   static int getLastErrorLine();
00075   static const std::string& getLastErrorText();
00076   static void printLastError();
00077   static void setLastError(Code code, const std::string& strFile, int line, const std::string& strText = "");
00078 };
00079 
00080 #endif
00081 
00082 //****************************************************************************//

Generated at Sun Oct 12 18:38:47 2003 by The Cal3D Team with doxygen 1.2.14 © 1997-2001 Dimitri van Heesch