Ardour  8.12
session_object.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2007-2011 David Robillard <d@drobilla.net>
3  * Copyright (C) 2008-2013 Paul Davis <paul@linuxaudiosystems.com>
4  * Copyright (C) 2009-2010 Carl Hetherington <carl@carlh.net>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License along
17  * with this program; if not, write to the Free Software Foundation, Inc.,
18  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19  */
20 
21 #ifndef __ardour_session_object_h__
22 #define __ardour_session_object_h__
23 
24 #include <string>
26 #include "pbd/signals.h"
27 #include "pbd/properties.h"
28 
29 #include "ardour/ardour.h"
30 #include "ardour/session_handle.h"
31 
32 namespace ARDOUR {
33 
34 namespace Properties {
36  /* this has no inherent connection to SessionObject, but it needs to go * somewhere so .... */
38 }
39 
40 class Session;
41 
47 {
48  public:
49  static void make_property_quarks ();
50 
51  SessionObject (Session& session, const std::string& name)
53  , _name (Properties::name, name)
54  {
55  add_property (_name);
56  }
57 
58  Session& session() const { return _session; }
59  std::string name() const { return _name; }
60 
61  virtual bool set_name (const std::string& str) {
62  if (_name != str) {
63  _name = str;
64  PropertyChanged (PBD::PropertyChange (Properties::name));
65  }
66  return true;
67  }
68 
69  protected:
71 };
72 
73 } // namespace ARDOUR
74 
75 #endif /*__ardour_io_h__ */
PBD::Property< std::string > _name
std::string name() const
static void make_property_quarks()
SessionObject(Session &session, const std::string &name)
Session & session() const
virtual bool set_name(const std::string &str)
GtkImageIconNameData name
Definition: gtkimage.h:6
#define LIBARDOUR_API
void session(lua_State *L)
PBD::PropertyDescriptor< std::string > name
PBD::PropertyDescriptor< Temporal::TimeDomain > time_domain
DebugBits Properties