thepeg is hosted by Hepforge, IPPP Durham
ThePEG 2.3.0
BaseRepository.xh
1// -*- C++ -*-
2//
3// BaseRepository.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_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
18namespace ThePEG {
19
20/** @cond EXCEPTIONCLASSES */
21/** Exception class used by BaseRepository if an object does not
22 implement the InterfacedBase::clone() function properly. */
23struct 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. */
30struct 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. */
37struct RepoNameException: public InterfaceException {
38 /** Standard constructor. */
39 RepoNameException(string);
40};
41
42/** Exception class used by BaseRepository if creating an object with
43 a name that already exists in the repository.. */
44struct RepoNameExistsException: public InterfaceException {
45 /** Standard constructor. */
46 RepoNameExistsException(string);
47};
48
49/** Exception class used by BaseRepository when trying to access a
50 non-existing directory. */
51struct RepositoryNoDirectory: public InterfaceException {
52 /** Standard constructor. */
53 RepositoryNoDirectory(string);
54};
55
56/** Exception class used by BaseRepository when trying to access a
57 non-existent object. */
58struct RepositoryNotFound: public InterfaceException {
59 /** Standard constructor. */
60 RepositoryNotFound(string name);
61};
62
63/** Exception class used by BaseRepository if a specified object was
64 not of the expected class. */
65struct RepositoryClassMisMatch: public InterfaceException {
66 /** Standard constructor. */
67 RepositoryClassMisMatch(const InterfacedBase & o, string name);
68};
69/** @endcond */
70
71}
72
73#endif /* ThePEG_BaseRepository_XH */
74