⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 error.hpp

📁 面向对象的卡尔曼滤波器源码
💻 HPP
字号:
// error.hpp		Definition of an error reporting class// rcsid: @(#)error.hpp	1.6 12:20:23 6/9/95   EFC#ifndef _ERROR_REP_HPP_#define _ERROR_REP_HPP_		1.6#include <stdlib.h>#include <iostream.h>#ifdef __ZTC__#include <sstream.hpp>#ifndef LOCAL_STRBUF#define LOCAL_STRBUF#endif#else#ifdef __BORLANDC__#include <strstrea.h>#else#include <strstream.h>#endif#endifclass Error : public ostrstream{	private:	   ostream& my_os;	   char *prog;	   int len;#ifdef LOCAL_STRBUF	 strstreambuf buffr;#endif	   void report(const char *msg = NULL);	public:          Error(ostream& user_os = cerr) :  #ifdef LOCAL_STRBUF					ios(&buffr),#endif				my_os(user_os), prog(NULL), len(0) {}          	  Error(const char *s,ostream& user_os = cerr);	  ~Error() { if (len != 0) delete []prog; }	  virtual int sync() { report(); return my_os.rdbuf()->sync(); }	  void warning(const char *msg = NULL);	  void nonfatal(const char *msg = NULL) { warning(msg); }	  void fatal(const char * = NULL );	  void memory(const void * = NULL );	  // maninpulator version of fatal and warning          friend Error& fatal(Error& er)    { er.fatal();   return er; }          friend Error& warning(Error& er)  { er.warning(); return er; } 	  typedef Error& (*ErrManip)(Error&);	// applicators for the zero parameter manipulators       friend Error& operator<<(Error& err, ErrManip f) { (*f)( err ); return err; }};#endif

⌨️ 快捷键说明

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