| 1 | /* This file is part of the FaCT++ DL reasoner |
| 2 | Copyright (C) 2006-2015 Dmitry Tsarkov and The University of Manchester |
| 3 | Copyright (C) 2015-2017 Dmitry Tsarkov |
| 4 | |
| 5 | This library is free software; you can redistribute it and/or |
| 6 | modify it under the terms of the GNU Lesser General Public |
| 7 | License as published by the Free Software Foundation; either |
| 8 | version 2.1 of the License, or (at your option) any later version. |
| 9 | |
| 10 | This library is distributed in the hope that it will be useful, |
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 | Lesser General Public License for more details. |
| 14 | |
| 15 | You should have received a copy of the GNU Lesser General Public |
| 16 | License along with this library; if not, write to the Free Software |
| 17 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 18 | */ |
| 19 | |
| 20 | #ifndef EFPPCANTREGNAME_H |
| 21 | #define EFPPCANTREGNAME_Hcxx . . $ `Kernel/eFPPCantRegName.h:21:9`! |
| 22 | |
| 23 | #include <string> |
| 24 | |
| 25 | #include "eFaCTPlusPlus.h"cxx . . $ `<file>/Kernel/eFaCTPlusPlus.h`/ |
| 26 | |
| 27 | /// exception thrown in case name can't be registered |
| 28 | class EFPPCantRegNamecxx . . $ EFPPCantRegName#: public EFaCTPlusPluscxx . . $ EFaCTPlusPlus# |
| 29 | { |
| 30 | private: // members |
| 31 | /// error string |
| 32 | stdcxx . . $ std/::stringcxx . . $ std/string# strcxx . . $ EFPPCantRegName#str.; |
| 33 | /// name string |
| 34 | stdcxx . . $ std/::stringcxx . . $ std/string# Namecxx . . $ EFPPCantRegName#Name.; |
| 35 | |
| 36 | public: // interface |
| 37 | /// c'tor: create an output string |
| 38 | EFPPCantRegNamecxx . . $ EFPPCantRegName#EFPPCantRegName(c3ca1c130ce09c52). ( const stdcxx . . $ std/::stringcxx . . $ std/string#& name, const stdcxx . . $ std/::stringcxx . . $ std/string#& type ) |
| 39 | : EFaCTPlusPluscxx . . $ EFaCTPlusPlus#EFaCTPlusPlus(49f6e7a06ebc5aa8).() |
| 40 | , Namecxx . . $ std/__cxx11/basic_string#basic_string(a47f53d4115f6ce5).(name) |
| 41 | { |
| 42 | strcxx . . $ EFPPCantRegName#str. =cxx . . $ std/__cxx11/basic_string#`operator=`(978ca1133b5f6e74). "Unable to register '"; |
| 43 | strcxx . . $ EFPPCantRegName#str. +=cxx . . $ std/__cxx11/basic_string#`operator+=`(c0b47be1fddc0e75). name; |
| 44 | strcxx . . $ EFPPCantRegName#str. +=cxx . . $ std/__cxx11/basic_string#`operator+=`(978ca1133b5f6e74). "' as a "; |
| 45 | strcxx . . $ EFPPCantRegName#str. +=cxx . . $ std/__cxx11/basic_string#`operator+=`(c0b47be1fddc0e75). type; |
| 46 | reasoncxx . . $ EFaCTPlusPlus#reason. = strcxx . . $ EFPPCantRegName#str..c_strcxx . . $ std/__cxx11/basic_string#c_str(1016ee5406d91ab9).(); |
| 47 | } |
| 48 | |
| 49 | /// get access to the unregistered name |
| 50 | const char* getNamecxx . . $ EFPPCantRegName#getName(a9f41ea0e82d88cf). ( void ) const { return Namecxx . . $ EFPPCantRegName#Name..c_strcxx . . $ std/__cxx11/basic_string#c_str(1016ee5406d91ab9).(); } |
| 51 | }; // EFPPCantRegName |
| 52 | |
| 53 | #endif |
| 54 | |
| 55 |