ThePEG  1.8.0
BaseRepository.xh
1 // -*- C++ -*-
2 //
3 // BaseRepository.xh is a part of ThePEG - Toolkit for HEP Event Generation
4 // Copyright (C) 1999-2011 Leif Lonnblad
5 //
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.
8 //
9 #ifndef ThePEG_BaseRepository_XH
10 #define ThePEG_BaseRepository_XH
11 //
12 // This is the declarations of the exception classes used by the
13 // BaseRepository class.
14 //
15 
16 #include "ThePEG/Interface/InterfaceBase.xh"
17 
18 namespace ThePEG {
19 
20 /** @cond EXCEPTIONCLASSES */
21 /** Exception class used by BaseRepository if an object does not
22  implement the InterfacedBase::clone() function properly. */
23 struct BadClassClone: public InterfaceException {
24  /** Standard constructor. */
25  BadClassClone(const InterfacedBase &);
26 };
27 
28 /** Exception class used by BaseRepository if an objects
29  InterfacedBase::clone() function throws an exception. */
30 struct BadClone: public InterfaceException {
31  /** Standard constructor. */
32  BadClone(const InterfacedBase &);
33 };
34 
35 /** Exception class used by BaseRepository if the name of an object in
36  the repository has been changed outside the repository. */
37 struct RepoNameException: public InterfaceException {
38  /** Standard constructor. */
39  RepoNameException(string);
40 };
41 
42 /** Exception class used by BaseRepository when trying to access a
43  non-existing directory. */
44 struct RepositoryNoDirectory: public InterfaceException {
45  /** Standard constructor. */
46  RepositoryNoDirectory(string);
47 };
48 
49 /** Exception class used by BaseRepository when trying to access a
50  non-existent object. */
51 struct RepositoryNotFound: public InterfaceException {
52  /** Standard constructor. */
53  RepositoryNotFound(string name);
54 };
55 
56 /** Exception class used by BaseRepository if a specified object was
57  not of the expected class. */
58 struct RepositoryClassMisMatch: public InterfaceException {
59  /** Standard constructor. */
60  RepositoryClassMisMatch(const InterfacedBase & o, string name);
61 };
62 /** @endcond */
63 
64 }
65 
66 #endif /* ThePEG_BaseRepository_XH */
67