dbus-cxx logo

DBus::Path Class Reference

#include <path.h>

Inherits std::string.

List of all members.

Public Types

typedef std::vector< std::string > Decomposed

Public Member Functions

 Path ()
 Path (const std::string &s, size_type pos=0, size_type n=npos)
 Path (const char *)
 Path (const char *s, size_type n)
 Path (size_type n, char c)
template<class InputIterator >
 Path (InputIterator first, InputIterator last)
 ~Path ()
 operator bool () const
bool is_valid () const
Decomposed decomposed () const
 Decomposes the string into its component elements.
bool append_element (const std::string &element)
 Adds the element string to the path ensuring delimeters are properly taken care of.

Detailed Description

Author:
Rick L Vinyard Jr <rvinyard@cs.nmsu.edu>
Examples:

calculator_client.cpp, calculator_watcher.cpp, and hal_proxy.cpp.


Member Typedef Documentation

typedef std::vector<std::string> DBus::Path::Decomposed

Constructor & Destructor Documentation

DBus::Path::Path (  ) 
DBus::Path::Path ( const std::string &  s,
size_type  pos = 0,
size_type  n = npos 
)
DBus::Path::Path ( const char *  s  ) 
DBus::Path::Path ( const char *  s,
size_type  n 
)
DBus::Path::Path ( size_type  n,
char  c 
)
template<class InputIterator >
DBus::Path::Path ( InputIterator  first,
InputIterator  last 
) [inline]
DBus::Path::~Path (  ) 

Member Function Documentation

bool DBus::Path::append_element ( const std::string &  element  ) 

Adds the element string to the path ensuring delimeters are properly taken care of.

An element that contains invalid characters will not be added to the path.

Returns:
True if the element was succesfully added, false otherwise.

References DBUSCXX_VALID_PATH_CHARACTERS, and DBus::npos.

Path::Decomposed DBus::Path::decomposed (  )  const

Decomposes the string into its component elements.

If the path is invalid or non-existant an empty vector will be returned.

If the path is the root path a vector containing a single empty string will be returned. In this way a valid root path is differentiated from an invalid or empty path.

References is_valid().

bool DBus::Path::is_valid (  )  const
DBus::Path::operator bool (  )  const

References is_valid().


The documentation for this class was generated from the following files:

Generated on Wed Sep 30 11:15:18 2009 for dbus-cxx by doxygen 1.6.1