Ardour  9.0-pre0-582-g084a23a80d
session_handle.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2009-2017 Paul Davis <paul@linuxaudiosystems.com>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17  */
18 
19 #pragma once
20 
21 #include "pbd/signals.h"
22 
24 
25 #ifndef NDEBUG
26 # define TRACE_SETSESSION_NULL
27 #endif
28 
29 namespace ARDOUR {
30  class Session;
31 
33 {
34 public:
36  virtual ~SessionHandleRef ();
37 
38 protected:
39  virtual void session_going_away ();
40  virtual void insanity_check ();
41 
43 };
44 
46 {
47 public:
50  virtual ~SessionHandlePtr () {}
51 
52  virtual void set_session (ARDOUR::Session *);
53  virtual ARDOUR::Session* session() const { return _session; }
54 
55 protected:
56  virtual void session_going_away ();
57 
60 
61 #ifdef TRACE_SETSESSION_NULL
62 private:
64 #endif
65 };
66 
67 } /* namespace */
68 
virtual void set_session(ARDOUR::Session *)
virtual void session_going_away()
SessionHandlePtr(ARDOUR::Session *s)
virtual ARDOUR::Session * session() const
ARDOUR::Session * _session
PBD::ScopedConnectionList _session_connections
virtual void session_going_away()
SessionHandleRef(ARDOUR::Session &s)
ARDOUR::Session & _session
virtual void insanity_check()
#define LIBARDOUR_API