Go to the documentation of this file.00001 #ifndef CPR_BODY_H
00002 #define CPR_BODY_H
00003
00004 #include <cstring>
00005
00006 #include <initializer_list>
00007 #include <string>
00008
00009 #include "defines.h"
00010
00011 namespace cpr {
00012
00013 class Body : public std::string {
00014 public:
00015 Body() = default;
00016 Body(const Body& rhs) = default;
00017 Body(Body&& rhs) = default;
00018 Body& operator=(const Body& rhs) = default;
00019 Body& operator=(Body&& rhs) = default;
00020 explicit Body(const char* raw_string) : std::string(raw_string) {}
00021 explicit Body(const char* raw_string, size_t length) : std::string(raw_string, length) {}
00022 explicit Body(size_t to_fill, char character) : std::string(to_fill, character) {}
00023 explicit Body(const std::string& std_string) : std::string(std_string) {}
00024 explicit Body(const std::string& std_string, size_t position, size_t length = std::string::npos)
00025 : std::string(std_string, position, length) {}
00026 explicit Body(std::string&& std_string) : std::string(std::move(std_string)) {}
00027 explicit Body(std::initializer_list<char> il) : std::string(il) {}
00028 template <class InputIterator>
00029 explicit Body(InputIterator first, InputIterator last)
00030 : std::string(first, last) {}
00031 };
00032
00033 }
00034
00035 #endif