libIntegra
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
node.h
Go to the documentation of this file.
1 /* libIntegra modular audio framework
2  *
3  * Copyright (C) 2007 Birmingham City University
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
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
18  * USA.
19  */
20 
26 #ifndef INTEGRA_NODE_API_H
27 #define INTEGRA_NODE_API_H
28 
29 #include "common_typedefs.h"
30 #include "node_endpoint.h"
31 #include "path.h"
32 
33 
34 namespace integra_api
35 {
36  class INode;
37  class IInterfaceDefinition;
38 
40  typedef std::unordered_map<string, INode *> node_map;
41 
42 
49  class INTEGRA_API INode
50  {
51  protected:
52 
53  INode() {}
54 
55  public:
56 
57  virtual ~INode() {}
58 
60  virtual const IInterfaceDefinition &get_interface_definition() const = 0;
61 
63  virtual const string &get_name() const = 0;
64 
66  virtual const CPath &get_path() const = 0;
67 
71  virtual const INode *get_parent() const = 0;
72 
78  virtual const CPath &get_parent_path() const = 0;
79 
86  virtual const node_map &get_children() const = 0;
87 
93  virtual const INode *get_child( const string &child_name ) const = 0;
94 
98  virtual const node_endpoint_map &get_node_endpoints() const = 0;
99 
105  virtual const INodeEndpoint *get_node_endpoint( const string &endpoint_name ) const = 0;
106 
111  virtual void get_all_node_paths( path_list &results ) const = 0;
112  };
113 }
114 
115 
116 #endif
Defines class INodeEndpoint.
Represents a node endpoint.
Definition: node_endpoint.h:48
Represents a node.
Definition: node.h:49
Top level container for an Integra Module interface.
Definition: interface_definition.h:66
Defines class CPath.
Represents the address of a node endpoint, absolutely or relatively.
Definition: path.h:48
#defines and typedefs used throughout the application