00001 /*---------------------------------------------------------------------\ 00002 | ____ _ __ __ ___ | 00003 | |__ / \ / / . \ . \ | 00004 | / / \ V /| _/ _/ | 00005 | / /__ | | | | | | | 00006 | /_____||_| |_| |_| | 00007 | | 00008 \---------------------------------------------------------------------*/ 00012 #ifndef DEVEL_DEVEL_DMACVICAR_SERIALIZE_H 00013 #define DEVEL_DEVEL_DMACVICAR_SERIALIZE_H 00014 00015 #include <iosfwd> 00016 00017 #include "zypp/base/PtrTypes.h" 00018 #include "Backend.h" 00019 00020 #include <zypp/Message.h> 00021 #include <zypp/Resolvable.h> 00022 #include <zypp/Patch.h> 00023 #include <zypp/Package.h> 00024 #include <zypp/Script.h> 00025 #include <zypp/Atom.h> 00026 #include <zypp/Message.h> 00027 #include <zypp/Language.h> 00028 #include <zypp/Pattern.h> 00029 #include <zypp/Selection.h> 00030 #include <zypp/Product.h> 00031 #include <zypp/Edition.h> 00032 #include <zypp/CapSet.h> 00033 00034 00035 #include <zypp/Capability.h> 00036 //#include <zypp/capability/CapabilityImpl.h> 00037 00039 namespace zypp 00040 { 00041 00042 namespace storage 00043 { 00044 00045 template<class T> 00046 std::string toXML( const T &obj ); //undefined 00047 00048 template<> 00049 std::string toXML( const Edition &edition ); 00050 00051 template<> 00052 std::string toXML( const Arch &arch ); 00053 00054 template<> 00055 std::string toXML( const Capability &cap ); 00056 00057 template<> 00058 std::string toXML( const CapSet &caps ); 00059 00060 template<> 00061 std::string toXML( const Dependencies &dep ); 00062 00068 template<> 00069 std::string toXML( const Resolvable::constPtr &obj ); 00070 00074 template<> 00075 std::string toXML( const ResObject::constPtr &obj ); 00076 00080 std::string castedToXML( const Resolvable::constPtr &ret ); 00081 00085 std::string resolvableTypeToString( const Resolvable::constPtr &resolvable, bool plural = false ); 00086 00090 std::string resolvableKindToString( const Resolvable::Kind &kind, bool plural = false ); 00091 00092 template<> 00093 std::string toXML( const Package::constPtr &obj ); 00094 00095 template<> 00096 std::string toXML( const Script::constPtr &obj ); 00097 00098 template<> 00099 std::string toXML( const Message::constPtr &obj ); 00100 00101 template<> 00102 std::string toXML( const Patch::constPtr &obj ); 00103 00104 template<> 00105 std::string toXML( const Atom::constPtr &obj ); 00106 00107 template<> 00108 std::string toXML( const Pattern::constPtr &obj ); 00109 00110 template<> 00111 std::string toXML( const Selection::constPtr &obj ); 00112 00113 template<> 00114 std::string toXML( const Product::constPtr &obj ); 00115 00116 template<> 00117 std::string toXML( const Language::constPtr &obj ); 00118 00119 template<> 00120 std::string toXML( const PersistentStorage::SourceData &obj ); 00121 00123 } // namespace storage 00126 } // namespace zypp 00128 #endif // DEVEL_DEVEL_DMACVICAR_SQLITEBACKEND_H 00129