1 /*
2 
3   Copyright (C) 2011 Grame
4 
5   This library is free software; you can redistribute it and/or
6   modify it under the terms of the GNU Lesser General Public
7   License as published by the Free Software Foundation; either
8   version 2.1 of the License, or (at your option) any later version.
9 
10   This library 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 GNU
13   Lesser General Public License for more details.
14 
15   You should have received a copy of the GNU Lesser General Public
16   License along with this library; if not, write to the Free Software
17   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
18 
19   Grame Research Laboratory, 9 rue du Garet, 69001 Lyon - France
20   research@grame.fr
21 
22 */
23 
24 
25 #ifndef __OSCAddress__
26 #define __OSCAddress__
27 
28 #include <string>
29 
30 namespace oscfaust
31 {
32 
33 
34 //--------------------------------------------------------------------------
35 /*! \brief OSC addresses utilities
36 */
37 class OSCAddress
38 {
39 	public:
40 		/*!
41 			\brief address decoding utility.
42 
43 			An address has a form similar to a unix path.
44 			\param address the osc address to be processed
45 			\return the first part of the address (without leading '/')
46 		*/
47 		static std::string	addressFirst (const std::string& address);
48 		/*!
49 			\brief address decoding utility.
50 			\param address the osc address to be processed
51 			\return the last part of an address.
52 		*/
53 		static std::string	addressLast (const std::string& address);
54 		/*!
55 			\brief address decoding utility.
56 
57 			An address has a form similar to a unix path.
58 			\param address the osc address to be processed
59 			\return the tail of an address after its first part.
60 		*/
61 		static std::string	addressTail (const std::string& address);
62 };
63 
64 
65 } // end namespoace
66 
67 #endif
68