dbus-cxx logo
path.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2009,2010 by Rick L. Vinyard, Jr. *
3  * rvinyard@cs.nmsu.edu *
4  * *
5  * This file is part of the dbus-cxx library. *
6  * *
7  * The dbus-cxx library is free software; you can redistribute it and/or *
8  * modify it under the terms of the GNU General Public License *
9  * version 3 as published by the Free Software Foundation. *
10  * *
11  * The dbus-cxx library is distributed in the hope that it will be *
12  * useful, but WITHOUT ANY WARRANTY; without even the implied warranty *
13  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
14  * General Public License for more details. *
15  * *
16  * You should have received a copy of the GNU General Public License *
17  * along with this software. If not see <http://www.gnu.org/licenses/>. *
18  ***************************************************************************/
19 #include <string>
20 #include <vector>
21 
22 #ifndef DBUSCXX_PATH_H
23 #define DBUSCXX_PATH_H
24 
25 namespace DBus
26 {
27 
31  class Path: public std::string
32  {
33  public:
34 
35  typedef std::vector<std::string> Decomposed;
36 
37  Path();
38 
39  Path( const std::string& s, size_type pos = 0, size_type n = npos );
40 
41  Path( const char* );
42 
43  Path( const char* s, size_type n );
44 
45  Path( size_type n, char c );
46 
47  template<class InputIterator>
48  Path( InputIterator first, InputIterator last ): std::string( first, last ) { }
49 
50  ~Path();
51 
52  operator bool() const;
53 
54  bool is_valid() const;
55 
66  Decomposed decomposed() const;
67 
77  bool append_element(const std::string& element);
78 
79  };
80 
81 }
82 
83 #endif
Path()
Definition: path.cpp:26
Definition: accumulators.h:24
~Path()
Definition: path.cpp:50
STL namespace.
bool is_valid() const
Definition: path.cpp:59
Path(InputIterator first, InputIterator last)
Definition: path.h:48
const Signature::size_type npos
Definition: signature.cpp:24
std::vector< std::string > Decomposed
Definition: path.h:35
Definition: path.h:31
Decomposed decomposed() const
Decomposes the string into its component elements.
Definition: path.cpp:72
bool append_element(const std::string &element)
Adds the element string to the path ensuring delimeters are properly taken care of.
Definition: path.cpp:108

Generated on Sun Mar 19 2017 14:54:27 for dbus-cxx by doxygen 1.8.8