fix a bad transition in the transportFSM.
[ardour.git] / libs / ardour / element_import_handler.cc
1 /*
2  * Copyright (C) 2008 Sakari Bergen <sakari.bergen@beatwaves.net>
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 #include "ardour/libardour_visibility.h"
20 #include "ardour/element_import_handler.h"
21
22 #include <algorithm>
23
24 using namespace std;
25 using namespace ARDOUR;
26
27 bool ElementImportHandler::_dirty = false;
28 bool ElementImportHandler::_errors = false;
29
30 ElementImportHandler::~ElementImportHandler ()
31 {
32         _dirty = false;
33         _errors = false;
34 }
35
36 bool
37 ElementImportHandler::check_name (const string & name) const
38 {
39         return !names.count (name);
40 }
41
42 void
43 ElementImportHandler::add_name (string name)
44 {
45         names.insert (name);
46 }
47
48 void
49 ElementImportHandler::remove_name (const string & name)
50 {
51         names.erase (name);
52 }