Ardour  9.0-pre0-582-g084a23a80d
export_preset.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2008 Sakari Bergen <sakari.bergen@beatwaves.net>
3  * Copyright (C) 2009 David Robillard <d@drobilla.net>
4  * Copyright (C) 2011-2013 Paul Davis <paul@linuxaudiosystems.com>
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 #pragma once
22 
23 #include <string>
24 
25 #include "pbd/uuid.h"
26 #include "pbd/xml++.h"
27 
29 
30 namespace ARDOUR
31 {
32 
33 class Session;
34 
36  public:
37  ExportPreset (Session&, std::string const& filename = "");
39 
40  PBD::UUID const & id () const { return _id; }
41  std::string name () const { return _name; }
42 
43  void set_name (std::string const & name);
44 
45  // Note: The set_..._state functions take ownership of the XMLNode
46  void set_global_state (XMLNode & state);
47  void set_local_state (XMLNode & state);
48 
49  XMLNode const * get_global_state () const { return global.root(); }
50  XMLNode const * get_local_state () const { return local; }
51 
52  void save (std::string const & filename);
53  void remove_local () const;
54 
55  private:
56 
57  void set_id (std::string const & id);
58 
60  void save_instant_xml () const;
61  void remove_instant_xml () const;
62 
64  std::string _name;
65 
69 
70 };
71 
72 } // namespace ARDOUR
73 
void set_global_state(XMLNode &state)
void remove_instant_xml() const
ExportPreset(Session &, std::string const &filename="")
std::string name() const
Definition: export_preset.h:41
PBD::UUID const & id() const
Definition: export_preset.h:40
void save(std::string const &filename)
void set_id(std::string const &id)
void save_instant_xml() const
void set_name(std::string const &name)
XMLNode const * get_global_state() const
Definition: export_preset.h:49
XMLNode const * get_local_state() const
Definition: export_preset.h:50
XMLNode * get_instant_xml() const
void set_local_state(XMLNode &state)
void remove_local() const
Definition: uuid.h:31
Definition: xml++.h:114
Definition: xml++.h:74
GtkImageIconNameData name
Definition: gtkimage.h:6
#define LIBARDOUR_API