Ardour  8.12
configuration.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2009-2014 Paul Davis <paul@linuxaudiosystems.com>
3  * Copyright (C) 2014 John Emmas <john@creativepost.co.uk>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License along
16  * with this program; if not, write to the Free Software Foundation, Inc.,
17  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18  */
19 
20 #ifndef __libpbd_configuration_h__
21 #define __libpbd_configuration_h__
22 
23 #include <map>
24 #include <string>
25 #include <vector>
26 
27 #include <boost/function.hpp>
28 #include "pbd/signals.h"
29 #include "pbd/stateful.h"
31 
32 class XMLNode;
33 
34 namespace PBD {
35 
37 {
38  public:
40  virtual ~Configuration() {}
41 
42  virtual void map_parameters (boost::function<void (std::string)>&) = 0;
43  virtual int set_state (XMLNode const &, int) = 0;
44  virtual XMLNode & get_state () const = 0;
45  virtual XMLNode & get_variables (std::string const & nodename) const = 0;
46  virtual void set_variables (XMLNode const &) = 0;
47 
48  PBD::Signal1<void,std::string> ParameterChanged;
49 
50  typedef std::vector<std::string> Metadata;
51 
52  static Metadata const * get_metadata (std::string const &);
53  static std::map<std::string,Metadata> all_metadata;
54 };
55 
56 } // namespace PBD
57 
58 #endif /* __libpbd_configuration_h__ */
virtual void set_variables(XMLNode const &)=0
virtual int set_state(XMLNode const &, int)=0
static Metadata const * get_metadata(std::string const &)
virtual void map_parameters(boost::function< void(std::string)> &)=0
virtual XMLNode & get_state() const =0
virtual ~Configuration()
Definition: configuration.h:40
static std::map< std::string, Metadata > all_metadata
Definition: configuration.h:53
PBD::Signal1< void, std::string > ParameterChanged
Definition: configuration.h:48
virtual XMLNode & get_variables(std::string const &nodename) const =0
std::vector< std::string > Metadata
Definition: configuration.h:50
Definition: xml++.h:114
#define LIBPBD_API
Definition: axis_view.h:42