00001 // 00002 // aegis - project change supervisor 00003 // Copyright (C) 1994-1996, 2002, 2005-2008 Peter Miller 00004 // 00005 // This program is free software; you can redistribute it and/or modify 00006 // it under the terms of the GNU General Public License as published by 00007 // the Free Software Foundation; either version 3 of the License, or 00008 // (at your option) any later version. 00009 // 00010 // This program is distributed in the hope that it will be useful, 00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 // GNU General Public License for more details. 00014 // 00015 // You should have received a copy of the GNU General Public License 00016 // along with this program. If not, see 00017 // <http://www.gnu.org/licenses/>. 00018 // 00019 00020 #ifndef AEGIS_AER_VALUE_ERROR_H 00021 #define AEGIS_AER_VALUE_ERROR_H 00022 00023 #include <common/nstring.h> 00024 #include <libaegis/aer/pos.h> 00025 #include <libaegis/aer/value.h> 00026 00027 00032 class rpt_value_error: 00033 public rpt_value 00034 { 00035 public: 00039 virtual ~rpt_value_error(); 00040 00041 private: 00051 rpt_value_error(const rpt_position::pointer &where, const nstring &what); 00052 00053 public: 00061 static rpt_value::pointer create(string_ty *what) DEPRECATED; 00062 00070 static rpt_value::pointer create(const nstring &what); 00071 00081 static rpt_value::pointer create(const rpt_position::pointer &where, 00082 string_ty *what) DEPRECATED; 00083 00093 static rpt_value::pointer create(const rpt_position::pointer &where, 00094 const nstring &what); 00095 00100 nstring query() const; 00101 00106 void setpos(const rpt_position::pointer &where); 00107 00112 void print() const; 00113 00114 protected: 00115 // See base class for documentation. 00116 const char *name() const; 00117 00118 // See base class for documentation. 00119 bool is_an_error() const; 00120 00121 private: 00126 rpt_position::pointer where; 00127 00132 nstring what; 00133 00137 rpt_value_error(); 00138 00142 rpt_value_error(const rpt_value_error &); 00143 00147 rpt_value_error &operator=(const rpt_value_error &); 00148 }; 00149 00150 #endif // AEGIS_AER_VALUE_ERROR_H