]> git.tdb.fi Git - r2c2.git/blob - source/libmarklin/except.h
Allow intercepting and denying turnout route and locomotive speed changes
[r2c2.git] / source / libmarklin / except.h
1 /* $Id$
2
3 This file is part of the MSP Märklin suite
4 Copyright © 2009  Mikkosoft Productions, Mikko Rasa
5 Distributed under the GPL
6 */
7
8 #ifndef LIBMARKLIN_EXCEPT_H_
9 #define LIBMARKLIN_EXCEPT_H_
10
11 #include <msp/core/except.h>
12
13 namespace Marklin {
14
15 class Train;
16
17 class TurnoutBusy: public Msp::Exception
18 {
19 private:
20         Train *train;
21
22 public:
23         TurnoutBusy(Train *t): Exception("Turnout is busy"), train(t) { }
24         virtual ~TurnoutBusy() throw() { }
25
26         Train *get_train() const throw() { return train; }
27 };
28
29 }
30
31 #endif