]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/rgw/rgw_xml.h
import quincy beta 17.1.0
[ceph.git] / ceph / src / rgw / rgw_xml.h
index b3e1e8ee681fc671dfbd79c013e556754d753848..c56c8c5247d74d38ae13225ac20cd1daba6436bd 100644 (file)
@@ -16,8 +16,8 @@ class RGWXMLParser;
 
 class XMLObjIter {
 public:
-  typedef map<std::string, XMLObj *>::iterator map_iter_t;
-  typedef map<std::string, XMLObj *>::iterator const_map_iter_t;
+  typedef std::map<std::string, XMLObj *>::iterator map_iter_t;
+  typedef std::map<std::string, XMLObj *>::iterator const_map_iter_t;
 
   XMLObjIter();
   ~XMLObjIter();
@@ -76,7 +76,7 @@ public:
   // return the first sub-tags matching the name
   XMLObj *find_first(const std::string& name);
 
-  friend ostream& operator<<(ostream &out, const XMLObj &obj);
+  friend std::ostream& operator<<(std::ostream &out, const XMLObj &obj);
   friend RGWXMLParser;
 };
 
@@ -165,7 +165,7 @@ namespace RGWXMLDecoder {
   void decode_xml(const char *name, T& val, T& default_val, XMLObj* obj);
 }
 
-static inline ostream& operator<<(ostream &out, RGWXMLDecoder::err& err)
+static inline std::ostream& operator<<(std::ostream &out, RGWXMLDecoder::err& err)
 {
   return out << err.what();
 }
@@ -176,7 +176,7 @@ void decode_xml_obj(T& val, XMLObj *obj)
   val.decode_xml(obj);
 }
 
-static inline void decode_xml_obj(string& val, XMLObj *obj)
+static inline void decode_xml_obj(std::string& val, XMLObj *obj)
 {
   val = obj->get_data();
 }
@@ -200,7 +200,7 @@ void decode_xml_obj(std::optional<T>& val, XMLObj *obj)
 }
 
 template<class T>
-void do_decode_xml_obj(list<T>& l, const string& name, XMLObj *obj)
+void do_decode_xml_obj(std::list<T>& l, const std::string& name, XMLObj *obj)
 {
   l.clear();
 
@@ -221,7 +221,7 @@ bool RGWXMLDecoder::decode_xml(const char *name, T& val, XMLObj *obj, bool manda
   XMLObj *o = iter.get_next();
   if (!o) {
     if (mandatory) {
-      string s = "missing mandatory field " + string(name);
+      std::string s = "missing mandatory field " + std::string(name);
       throw err(s);
     }
     val = T();
@@ -231,7 +231,7 @@ bool RGWXMLDecoder::decode_xml(const char *name, T& val, XMLObj *obj, bool manda
   try {
     decode_xml_obj(val, o);
   } catch (const err& e) {
-    string s = string(name) + ": ";
+    std::string s = std::string(name) + ": ";
     s.append(e.what());
     throw err(s);
   }
@@ -249,7 +249,7 @@ bool RGWXMLDecoder::decode_xml(const char *name, std::vector<T>& v, XMLObj *obj,
 
   if (!o) {
     if (mandatory) {
-      string s = "missing mandatory field " + string(name);
+      std::string s = "missing mandatory field " + std::string(name);
       throw err(s);
     }
     return false;
@@ -260,7 +260,7 @@ bool RGWXMLDecoder::decode_xml(const char *name, std::vector<T>& v, XMLObj *obj,
     try {
       decode_xml_obj(val, o);
     } catch (const err& e) {
-      string s = string(name) + ": ";
+      std::string s = std::string(name) + ": ";
       s.append(e.what());
       throw err(s);
     }
@@ -278,7 +278,7 @@ bool RGWXMLDecoder::decode_xml(const char *name, C& container, void (*cb)(C&, XM
   XMLObj *o = iter.get_next();
   if (!o) {
     if (mandatory) {
-      string s = "missing mandatory field " + string(name);
+      std::string s = "missing mandatory field " + std::string(name);
       throw err(s);
     }
     return false;
@@ -287,7 +287,7 @@ bool RGWXMLDecoder::decode_xml(const char *name, C& container, void (*cb)(C&, XM
   try {
     decode_xml_obj(container, cb, o);
   } catch (const err& e) {
-    string s = string(name) + ": ";
+    std::string s = std::string(name) + ": ";
     s.append(e.what());
     throw err(s);
   }
@@ -309,7 +309,7 @@ void RGWXMLDecoder::decode_xml(const char *name, T& val, T& default_val, XMLObj
     decode_xml_obj(val, o);
   } catch (const err& e) {
     val = default_val;
-    string s = string(name) + ": ";
+    std::string s = std::string(name) + ": ";
     s.append(e.what());
     throw err(s);
   }
@@ -331,7 +331,7 @@ static void encode_xml(const char *name, const char *ns, const T& val, ceph::For
   f->close_section();
 }
 
-void encode_xml(const char *name, const string& val, ceph::Formatter *f);
+void encode_xml(const char *name, const std::string& val, ceph::Formatter *f);
 void encode_xml(const char *name, const char *val, ceph::Formatter *f);
 void encode_xml(const char *name, bool val, ceph::Formatter *f);
 void encode_xml(const char *name, int val, ceph::Formatter *f);