MACE
1.0.0
|
00001 // 00002 // header.hpp 00003 // ~~~~~~~~~~ 00004 // 00005 // Copyright (c) 2003-2012 Christopher M. Kohlhoff (chris at kohlhoff dot com) 00006 // 00007 // Distributed under the Boost Software License, Version 1.0. (See accompanying 00008 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 00009 // 00010 00011 #ifndef MACE_RPC_HTTP_HEADER_HPP 00012 #define MACE_RPC_HTTP_HEADER_HPP 00013 #include <string> 00014 00015 namespace mace { namespace rpc { namespace http { 00016 00017 struct header { 00018 header(){} 00019 00020 header( header&& h ) 00021 :name(std::move(h.name)),value(std::move(h.value)){} 00022 00023 template<typename N, typename V> 00024 header( N&& n, V&& v ) 00025 :name(std::forward<N>(n)),value( std::forward<V>(v)){} 00026 00027 header& operator=( header&& h ) { 00028 std::swap(h.name,name); 00029 std::swap(h.value,value); 00030 return *this; 00031 } 00032 00033 std::string name; 00034 std::string value; 00035 }; 00036 00037 } } } // mace::rpc::http 00038 00039 00040 00041 #endif // MACE_RPC_HTTP_HEADER_HPP