00001 #ifndef _FSMErrorCodes_h_
00002 #define _FSMErrorCodes_h_
00003
00004 #if _MSC_VER > 1000
00005 #pragma once
00006 #endif // _MSC_VER > 1000
00007
00008 /*
00009 * The Finite State Machine (FSM) Library
00010 * Copyright (C) 2002 Siemens C-LAB Paderborn
00011 * All rights reserved.
00012 *
00013 * This program is free software; you can redistribute it and/or modify it
00014 * under the terms of the GNU Lesser General Public License as published by
00015 * the Free Software Foundation; either version 2.1 of the License, or (at
00016 * your option) any later version.
00017 *
00018 * This program is distributed in the hope that it will be useful, but
00019 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
00020 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
00021 * License for more details.
00022 *
00023 * You should have received a copy of the GNU Lesser General Public License
00024 * along with this program; if not, write to the Free Software Foundation,
00025 * Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00026 */
00027
00028 // $Log: FSMErrorCodes.h,v $
00029 // Revision 1.1 2002/08/20 14:48:41 vofka
00030 // FiniteStateMachine-config.h removed from installing. Loading exported to the loader class. Saver introduced. Error codes exported to FSMErrorCodes.
00031 //
00032
00033 #ifdef HAVE_LIBIERROR
00034 #include <iError.h>
00035 namespace FSM {
00036 using iERR::iError;
00037 using iERR::iErrorCode;
00038 using iERR::GENERIC;
00039 };
00040 #else
00041 #define INFO(err) 1
00042 #define WARNING(err) 2
00043 #define CRITICAL(err) 3
00044 #define EXCEPTION(err) 4
00045 #define iHandleLastError()
00046 #define iRethrow()
00047 class iErrorCode {public: iErrorCode(const char *) {};};
00048 inline void iThrow(int, ...) {};
00049 #endif
00050
00051
00052 namespace FSM {
00053 extern iErrorCode FSM_UNKNOWN_CONDITION_VALUE;
00054 extern iErrorCode FSM_OPEN_FILE_FAILED;
00055 extern iErrorCode FSM_LOAD_STARTED;
00056 extern iErrorCode FSM_LOAD_NOT_IMPLEMENTED;
00057 extern iErrorCode FSM_TRANSITION_NOT_FOUND;
00058 extern iErrorCode FSM_ACTION_NOT_FOUND;
00059 extern iErrorCode FSM_CONDITION_NOT_FOUND;
00060 extern iErrorCode FSM_STATE_DEFINED_TWICE;
00061 extern iErrorCode FSM_STATE_NOT_FOUND;
00062 extern iErrorCode FSM_CANNOT_DELETE_CURRENT;
00063 extern iErrorCode FSM_VARAIBLE_DEFINED_TWICE;
00064 extern iErrorCode FSM_VARIABLE_NOT_FOUND;
00065 extern iErrorCode FSM_INITIAL_AFTER_START;
00066 extern iErrorCode FSM_ALREADY_STARTED;
00067 extern iErrorCode FSM_NOT_STARTED;
00068 extern iErrorCode FSM_CLEAR_STARTED;
00069 extern iErrorCode FSM_TAG_NOT_FOUND;
00070 extern iErrorCode FSM_MISSED_ATTRIBUTE;
00071 extern iErrorCode FSM_UNKNOWN_TAG;
00072 extern iErrorCode FSM_UNKNOWN_PARAM;
00073 extern iErrorCode FSM_UNKNOWN_CONDITION_VALUE;
00074 extern iErrorCode FSM_UNKNOWN_CONDITION;
00075 extern iErrorCode FSM_PARAM_NOT_SET;
00076 extern iErrorCode FSM_CLASS_REGISTERED_TWICE;
00077 extern iErrorCode FSM_CANNOT_CREATE_CLASS;
00078 extern iErrorCode FSM_PARAM_NOT_READ;
00079 }; // namespace FSM
00080
00081 #endif // ifndef _FSMErrorCodes_h_