dbus-cxx logo

signatureiterator.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2009,2010 by Rick L. Vinyard, Jr.                       *
00003  *   rvinyard@cs.nmsu.edu                                                  *
00004  *                                                                         *
00005  *   This file is part of the dbus-cxx library.                            *
00006  *                                                                         *
00007  *   The dbus-cxx library is free software; you can redistribute it and/or *
00008  *   modify it under the terms of the GNU General Public License           *
00009  *   version 3 as published by the Free Software Foundation.               *
00010  *                                                                         *
00011  *   The dbus-cxx library is distributed in the hope that it will be       *
00012  *   useful, but WITHOUT ANY WARRANTY; without even the implied warranty   *
00013  *   of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU   *
00014  *   General Public License for more details.                              *
00015  *                                                                         *
00016  *   You should have received a copy of the GNU General Public License     *
00017  *   along with this software. If not see <http://www.gnu.org/licenses/>.  *
00018  ***************************************************************************/
00019 #include <string>
00020 #include <vector>
00021 
00022 #include <dbus/dbus.h>
00023 
00024 #include <dbus-cxx/enums.h>
00025 #include <dbus-cxx/error.h>
00026 #include <dbus-cxx/pointer.h>
00027 
00028 #ifndef DBUSCXX_SIGNATUREITERATOR_H
00029 #define DBUSCXX_SIGNATUREITERATOR_H
00030 
00031 namespace DBus
00032 {
00033 
00041   class SignatureIterator
00042   {
00043     public:
00044 
00045       SignatureIterator();
00046 
00047       SignatureIterator( const std::string& signature );
00048 
00050       DBusSignatureIter* cobj();
00051 
00053       bool init( const std::string& signature );
00054 
00056       void invalidate();
00057 
00059       bool is_valid() const;
00060 
00062       operator bool() const;
00063 
00069       bool next();
00070 
00071       SignatureIterator& operator ++();
00072 
00073       SignatureIterator operator ++( int );
00074 
00075       bool operator==( const SignatureIterator& other );
00076 
00078       Type type() const;
00079 
00085       Type element_type() const;
00086 
00088       bool is_basic() const;
00089 
00091       bool is_fixed() const;
00092 
00094       bool is_container() const;
00095 
00097       bool is_array() const;
00098 
00100       bool is_dict() const;
00101 
00107       SignatureIterator recurse();
00108 
00110       std::string signature() const;
00111 
00112     protected:
00113       DBusSignatureIter m_cobj;
00114 
00115       bool m_valid;
00116 
00117   };
00118 
00119 }
00120 
00121 #endif

Generated on Thu Mar 18 09:30:55 2010 for dbus-cxx by doxygen 1.6.1