dbus-cxx logo

types.h

Go to the documentation of this file.
00001 /*
00002  *
00003  *  D-Bus++ - C++ bindings for D-Bus
00004  *
00005  *  Copyright (C) 2005-2007  Paolo Durante <shackan@gmail.com>
00006  *
00007  *
00008  *  This library is free software; you can redistribute it and/or
00009  *  modify it under the terms of the GNU Lesser General Public
00010  *  License as published by the Free Software Foundation; either
00011  *  version 2.1 of the License, or (at your option) any later version.
00012  *
00013  *  This library is distributed in the hope that it will be useful,
00014  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016  *  Lesser General Public License for more details.
00017  *
00018  *  You should have received a copy of the GNU Lesser General Public
00019  *  License along with this library; if not, write to the Free Software
00020  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00021  *
00022  */
00023 
00024 
00025 // #ifndef __DBUSXX_TYPES_H
00026 // #define __DBUSXX_TYPES_H
00027 // 
00028 // #include <stdint.h>
00029 // #include <string>
00030 // #include <vector>
00031 // #include <map>
00032 // 
00033 // #include <boost/variant.hpp>
00034 // #include <boost/tuple/tuple.hpp>
00035 // 
00036 // #define Struct boost::tuple
00037 
00038 // #include "util.h"
00039 // #include "message.h"
00040 // #include "error.h"
00041 
00042 // namespace DBus {
00043 //   
00044 // struct Path : public std::string
00045 // {
00046 //      Path() {}
00047 //      Path( const std::string& s ) : std::string(s) {}
00048 //      Path( const char* c ) : std::string(c) {}
00049 //      Path& operator = ( std::string& s )
00050 //      {
00051 //              std::string::operator = (s);
00052 //              return *this;
00053 //      }
00054 // };
00055 
00056 // struct Invalid {};
00057 
00058 // typedef boost::variant<uint8_t,bool,int16_t,uint16_t,int32_t,uint32_t,int64_t,uint64_t,double,std::string> Variant;
00059 
00060 // template<typename K, typename V>
00061 // inline bool dict_has_key( const std::map<K,V>& map, const K& key )
00062 // {
00063 //      return map.find(key) != map.end();
00064 // }
00065 
00066 // template <typename T>
00067 // struct type
00068 // {
00069 //      static std::string sig()
00070 //      {
00071 //              throw ErrorInvalidArgs("unknown type");
00072 //              return "";
00073 //      }
00074 // };
00075 //
00076 // template <typename E>
00077 // struct type< std::vector<E> >
00078 // { static std::string sig(){ return "a" + type<E>::sig(); } };
00079 //
00080 // template <typename K, typename V>
00081 // struct type< std::map<K,V> >
00082 // { static std::string sig(){ return "a{" + type<K>::sig() + type<V>::sig() + "}"; } };
00083 //
00084 
00085 // }
00086 
00087 // #endif//__DBUSXX_TYPES_H
00088 

Generated on Thu May 28 16:50:50 2009 for dbus-cxx by doxygen 1.5.7.1