File: Oops.h

package info (click to toggle)
mummy 1.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,628 kB
  • ctags: 1,000
  • sloc: cpp: 10,667; cs: 1,107; makefile: 22; xml: 8; sh: 5
file content (43 lines) | stat: -rw-r--r-- 810 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#ifndef _Oops_h
#define _Oops_h

#include "VehiclesConfig.h"
#include <string>

// Yeah-yeah-yeah-...
//
#if defined(_MSC_VER)
#pragma warning(disable:4251) /* class needs to have dll-interface to be used by clients */
#endif

// This is the sample exception class...

class base_dll Oops
{
public:
  // Constructor/destructor:
  Oops(const char* description);
  virtual ~Oops();

  // Exception classes need a clone method:
  Oops* Clone();

  // Exception classes need a disposal method:
  void Delete();

  // Exception classes need some wrappable way to extract information
  // out of them:
  //
  const char* Description();

protected:
  virtual Oops* CloneInternal();

private:
  std::string m_Description;

  // unimplemented : can only be instantiated by the public ctor or Clone
  Oops();
};

#endif