libIntegra
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
path.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_PATH_H
27 #define INTEGRA_PATH_H
28 
29 #include "common_typedefs.h"
30 
31 #include <list>
32 
33 namespace integra_api
34 {
48  class INTEGRA_API CPath
49  {
50  public:
51 
53  CPath();
54 
56  CPath( const string &path_string );
57 
59  CPath( const CPath &to_copy );
60  ~CPath();
61 
63  const CPath &operator=( const CPath &to_copy );
64 
66  bool operator==( const CPath &to_compare ) const;
67 
69  int get_number_of_elements() const;
70 
75  const string &operator[]( int index ) const;
76 
78  const string &get_string() const;
79 
81  operator const string &() const;
82 
87  string pop_element();
88 
92  void append_element( const string &element );
93 
94  private:
95 
96  void copy_from( const CPath &to_copy );
97 
98  void rebuild_string();
99 
100  string_vector m_elements;
101 
102  string m_string;
103  bool m_string_is_valid;
104  };
105 
106 
108  typedef std::list<CPath> path_list;
109 }
110 
111 
112 
113 #endif
Represents the address of a node endpoint, absolutely or relatively.
Definition: path.h:48
#defines and typedefs used throughout the application