Ardour  9.0-pre0-350-gf17a656217
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 #pragma once
21 
22 #include <map>
23 #include <string>
24 #include <vector>
25 
26 #include "pbd/signals.h"
27 #include "pbd/stateful.h"
29 
30 class XMLNode;
31 
32 namespace PBD {
33 
35 {
36  public:
38  virtual ~Configuration() {}
39 
40  virtual void map_parameters (std::function<void (std::string)>&) = 0;
41  virtual int set_state (XMLNode const &, int) = 0;
42  virtual XMLNode & get_state () const = 0;
43  virtual XMLNode & get_variables (std::string const & nodename) const = 0;
44  virtual void set_variables (XMLNode const &) = 0;
45 
46  PBD::Signal<void(std::string)> ParameterChanged;
47 
48  typedef std::vector<std::string> Metadata;
49 
50  static Metadata const * get_metadata (std::string const &);
51  static std::map<std::string,Metadata> all_metadata;
52 };
53 
54 } // namespace PBD
55 
virtual void map_parameters(std::function< void(std::string)> &)=0
virtual void set_variables(XMLNode const &)=0
virtual int set_state(XMLNode const &, int)=0
static Metadata const * get_metadata(std::string const &)
virtual XMLNode & get_state() const =0
PBD::Signal< void(std::string)> ParameterChanged
Definition: configuration.h:46
virtual ~Configuration()
Definition: configuration.h:38
static std::map< std::string, Metadata > all_metadata
Definition: configuration.h:51
virtual XMLNode & get_variables(std::string const &nodename) const =0
std::vector< std::string > Metadata
Definition: configuration.h:48
Definition: xml++.h:114
#define LIBPBD_API
Definition: axis_view.h:42