00001 //================================================================================================== 00002 // Copyright (C) 2010 Brian Tietz sdbtietz at yahoo dot com 00003 // 00004 // This program is free software; you can redistribute it and/or modify it under the terms of the 00005 // GNU General Public License as published by the Free Software Foundation, version 2.0 of the 00006 // License. 00007 // 00008 // This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without 00009 // even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00010 // General Public License for more details. 00011 // 00012 // You should have received a copy of the GNU General Public License along with this program; if 00013 // not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 00014 // 02110-1301, USA. 00015 // 00016 // For commercial software, the copyright holder (Brian Tietz, email sdbtietz at yahoo dot com) 00017 // reserves the right and is willing to waive the proprietary source code disclosure aspects of that 00018 // license as applied to the UT library in exchange for either substantial contributions to the 00019 // development of the UT library or other forms of compensation. Any such waiver must be 00020 // established in writing between the copyright holder and the commercial entity obtaining such a 00021 // waiver. 00022 //================================================================================================== 00023 00024 00025 #ifndef _UT_REGISTERED_ERROR_H_ 00026 #define _UT_REGISTERED_ERROR_H_ 00027 00028 00029 //================================================================================================== 00030 //=== Project headers 00031 //================================================================================================== 00032 #include "UT.h" 00033 00034 00035 // \cond DOXYGEN_DOCUMENT_NEVER 00036 00037 //================================================================================================== 00038 class UT_EXPORT RegisteredError_t 00039 //================================================================================================== 00040 { 00041 //---------------------------------------------------------------------------------------------- 00042 public: 00043 //---------------------------------------------------------------------------------------------- 00044 RegisteredError_t( error_code_t error_code, 00045 stringliteral* string ); 00046 00047 //---------------------------------------------------------------------------------------------- 00048 private: 00049 //---------------------------------------------------------------------------------------------- 00050 static void Register(RegisteredError_t* error); 00051 static const utf8* FindRegisteredErrorString(error_code_t error_code); 00052 00053 //---------------------------------------------------------------------------------------------- 00054 private: 00055 //---------------------------------------------------------------------------------------------- 00056 error_code_t m_error_code; 00057 const utf8* m_string; 00058 RegisteredError_t* m_next; 00059 00060 static RegisteredError_t* ms_first; 00061 00062 friend class String_t; 00063 }; 00064 00065 // \endcond 00066 00067 00068 #endif // _UT_REGISTERED_ERROR_H_