thepeg is hosted by Hepforge, IPPP Durham
ThePEG 2.3.0
InterfaceBase.xh
1// -*- C++ -*-
2//
3// InterfaceBase.xh is a part of ThePEG - Toolkit for HEP Event Generation
4// Copyright (C) 1999-2019 Leif Lonnblad
5//
6// ThePEG is licenced under version 3 of the GPL, see COPYING for details.
7// Please respect the MCnet academic guidelines, see GUIDELINES for details.
8//
9#ifndef ThePEG_InterfaceBase_XH
10#define ThePEG_InterfaceBase_XH
11//
12// This is the declarations of the exception classes used by the
13// InterfaceBase class.
14//
15
16#include "InterfaceBase.fh"
17#include "ThePEG/Utilities/Exception.h"
18
19namespace ThePEG {
20
21/** @cond EXCEPTIONCLASSES */
22/** Exception class used as base class for errors detected by
23 * interface classes. */
24struct InterfaceException: public Exception {
25 /** Standard constructor. */
26 InterfaceException() {};
27};
28
29/** Exception class used when an interface is called for an object of
30 * the wrong class. */
31struct InterExClass: public InterfaceException {
32 /** Standard constructor. */
33 InterExClass(const InterfaceBase & i, const InterfacedBase & o);
34};
35
36/** Exception class used in case an interface is not properly
37 * setup. */
38struct InterExSetup: public InterfaceException {
39 /** Standard constructor. */
40 InterExSetup(const InterfaceBase & i, const InterfacedBase & o);
41};
42
43/** Exception class used in case of an unkown error whenn accessing an
44 * object via an interface. */
45struct InterExUnknown: public InterfaceException {
46 /** Standard constructor. */
47 InterExUnknown(const InterfaceBase & i, const InterfacedBase & o);
48};
49
50/** Exception class used in case an a read-only interface is used to
51 * try to change an object. */
52struct InterExReadOnly: public InterfaceException {
53 /** Standard constructor. */
54 InterExReadOnly(const InterfaceBase & i, const InterfacedBase & o);
55};
56
57/** Exception class used when a reference non-nullable interface tries
58 to set a reference to null. */
59struct InterExNoNull: public InterfaceException {
60 /** Standard constructor. */
61 InterExNoNull(const InterfaceBase & i, const InterfacedBase & o);
62};
63/** @endcond */
64
65}
66
67#endif /* ThePEG_InterfaceBase_XH */