errorbase.h

来自「Amis - A maximum entropy estimator 一个最大」· C头文件 代码 · 共 58 行

H
58
字号
////////////////////////////////////////////////////////////////////////////  Copyright (c) 2000, Yusuke Miyao///  You may distribute under the terms of the Artistic License.//////  <id>$Id: ErrorBase.h,v 1.4 2003/05/11 18:12:09 yusuke Exp $</id>///  <collection>Maximum Entropy Estimator</collection>///  <name>ErrorBase.h</name>///  <overview>Base class for exception classes</overview>///  <desc>///  This file defines a base class for exception classes in///  this project.///  </desc>/////////////////////////////////////////////////////////////////////////#ifndef Amis_ErrorBase_h_#define Amis_ErrorBase_h_#include <amis/configure.h>#include <string>#include <iostream>AMIS_NAMESPACE_BEGIN///////////////////////////////////////////////////////////////////////// <classdef>/// <name>ErrorBase</name>/// <overview>Base class for exceptions</overview>/// <desc>/// The class is a base class for exception classes in this project./// </desc>/// <body>class ErrorBase {protected:  std::string m;  /// Error messagepublic:  ErrorBase() : m() {}  ErrorBase( const std::string& s ) { m = s; }  /// Initialize with an error message  ErrorBase( const char* s ) : m( s ) {}  /// Initialize with an error message  virtual ~ErrorBase() {}  virtual const std::string& message() const { return m; }  /// Get an error message};AMIS_NAMESPACE_END#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?