Essentia  2.1-beta6-dev
connector.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2021 Music Technology Group - Universitat Pompeu Fabra
3  *
4  * This file is part of Essentia
5  *
6  * Essentia is free software: you can redistribute it and/or modify it under
7  * the terms of the GNU Affero General Public License as published by the Free
8  * Software Foundation (FSF), either version 3 of the License, or (at your
9  * option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful, but WITHOUT
12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
14  * details.
15  *
16  * You should have received a copy of the Affero GNU General Public License
17  * version 3 along with this program. If not, see http://www.gnu.org/licenses/
18  */
19 
20 #ifndef ESSENTIA_CONNECTOR_H
21 #define ESSENTIA_CONNECTOR_H
22 
23 #include "types.h"
24 #include "streamconnector.h"
25 
26 namespace essentia {
27 namespace streaming {
28 
29 class SinkBase;
30 class Algorithm;
31 
32 
40 class Connector : public TypeProxy, public StreamConnector {
41  protected:
43 
44  public:
45  Connector(Algorithm* parent = 0, const std::string& name = "Unnamed") :
46  TypeProxy(name),
47  _parent(parent) {}
48 
49  Connector(const std::string& name) :
50  TypeProxy(name),
51  _parent(0) {}
52 
53  const Algorithm* parent() const { return _parent; }
54  Algorithm* parent() { return _parent; }
56 
60  std::string parentName() const;
61 
66  std::string fullName() const;
67 
68 };
69 
70 } // namespace streaming
71 } // namespace essentia
72 
73 #endif // ESSENTIA_CONNECTOR_H
Definition: types.h:274
const std::string & name() const
Definition: types.h:284
Definition: streamingalgorithm.h:140
Definition: connector.h:40
std::string fullName() const
Connector(const std::string &name)
Definition: connector.h:49
Algorithm * parent()
Definition: connector.h:54
void setParent(Algorithm *parent)
Definition: connector.h:55
std::string parentName() const
const Algorithm * parent() const
Definition: connector.h:53
Algorithm * _parent
Definition: connector.h:42
Connector(Algorithm *parent=0, const std::string &name="Unnamed")
Definition: connector.h:45
Definition: streamconnector.h:34
Definition: algorithm.h:28