📄 oops.h
字号:
//-----------------------------------------------------------------------//// File: Oops.h//// Purpose: Basic exception that one can add strings to//// Version: $Id: oops.h,v 1.7 2005/04/25 23:33:38 yew Exp $//// Copyright 1999-2001, Tech-X Corporation////-----------------------------------------------------------------------#ifndef OOPS_H#define OOPS_H// system includes#include <stdio.h>// From configure#ifdef HAVE_CONFIG_H#include <config.h>#endif// txbase includes#include <txc_std.h> #include <txc_streams.h>#ifdef _MSC_VER#pragma warning ( disable: 4290) #endif/** * Exception holding a string. * */class Oops { public:/// Default constructor Oops();/// Constructor taking a string. Oops(const TXSTD::string&);/// Copy constructor Oops(const Oops&);/// Destructor: virtual -- All resources released implicitly virtual ~Oops();/// Assign from another of the same Oops& operator=(const Oops&);/** Sets the message */ Oops& operator=(const TXSTD::string& s) { msg = s; return *this; }/** pre-pend */ void prepend(const TXSTD::string &s);/** Clear out the message */ void clear() { msg = ""; }/** Returns a string of the accumulated messages */ TXSTD::string getMessage() const { return msg; }/** Appends a string */ Oops& Oops::operator<<(TXSTD::string str); protected:/// Output stream for debug info TXSTD::string msg; private:// Prevent use};#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -