3 // InterfaceBase.xh is a part of ThePEG - Toolkit for HEP Event Generation
4 // Copyright (C) 1999-2011 Leif Lonnblad
6 // ThePEG is licenced under version 2 of the GPL, see COPYING for details.
7 // Please respect the MCnet academic guidelines, see GUIDELINES for details.
9 #ifndef ThePEG_InterfaceBase_XH
10 #define ThePEG_InterfaceBase_XH
12 // This is the declarations of the exception classes used by the
13 // InterfaceBase class.
16 #include "InterfaceBase.fh"
17 #include "ThePEG/Utilities/Exception.h"
21 /** @cond EXCEPTIONCLASSES */
22 /** Exception class used as base class for errors detected by
23 * interface classes. */
24 struct InterfaceException: public Exception {
25 /** Standard constructor. */
26 InterfaceException() {};
29 /** Exception class used when an interface is called for an object of
31 struct InterExClass: public InterfaceException {
32 /** Standard constructor. */
33 InterExClass(const InterfaceBase & i, const InterfacedBase & o);
36 /** Exception class used in case an interface is not properly
38 struct InterExSetup: public InterfaceException {
39 /** Standard constructor. */
40 InterExSetup(const InterfaceBase & i, const InterfacedBase & o);
43 /** Exception class used in case of an unkown error whenn accessing an
44 * object via an interface. */
45 struct InterExUnknown: public InterfaceException {
46 /** Standard constructor. */
47 InterExUnknown(const InterfaceBase & i, const InterfacedBase & o);
50 /** Exception class used in case an a read-only interface is used to
51 * try to change an object. */
52 struct InterExReadOnly: public InterfaceException {
53 /** Standard constructor. */
54 InterExReadOnly(const InterfaceBase & i, const InterfacedBase & o);
57 /** Exception class used when a reference non-nullable interface tries
58 to set a reference to null. */
59 struct InterExNoNull: public InterfaceException {
60 /** Standard constructor. */
61 InterExNoNull(const InterfaceBase & i, const InterfacedBase & o);
67 #endif /* ThePEG_InterfaceBase_XH */