uuid_key.h
Go to the documentation of this file.
00001 /* 00002 * Copyright 2010 Savarese Software Research Corporation 00003 * 00004 * Licensed under the Apache License, Version 2.0 (the "License"); 00005 * you may not use this file except in compliance with the License. 00006 * You may obtain a copy of the License at 00007 * 00008 * https://www.savarese.com/software/ApacheLicense-2.0 00009 * 00010 * Unless required by applicable law or agreed to in writing, software 00011 * distributed under the License is distributed on an "AS IS" BASIS, 00012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00013 * See the License for the specific language governing permissions and 00014 * limitations under the License. 00015 */ 00016 00022 #ifndef __SSRC_WSPR_UTILITY_UUID_KEY_H 00023 #define __SSRC_WSPR_UTILITY_UUID_KEY_H 00024 00025 #include <ssrc/wispers/types.h> 00026 #include <ssrc/wispers/database/types.h> 00027 00028 #include <boost/serialization/is_bitwise_serializable.hpp> 00029 00030 #include <iosfwd> 00031 00032 __BEGIN_NS_SSRC_WSPR 00033 00034 std::ostream & operator<<(std::ostream & out, const uuid_key_type & uuid_key); 00035 00036 __END_NS_SSRC_WSPR 00037 00038 __BEGIN_NS_SSRC_WSPR_DATABASE 00039 00040 template<> inline uuid_key_type 00041 values<uuid_key_type>(const ResultSet & result_set) { 00042 return uuid_key_type{result_set.value<std::int64_t>(0), 00043 result_set.value<std::int64_t>(1)}; 00044 } 00045 00046 __END_NS_SSRC_WSPR_DATABASE 00047 00048 namespace boost { 00049 namespace serialization { 00050 template<class Archive> 00051 inline void serialize(Archive & ar, NS_SSRC_WSPR::uuid_key_type & uuid_key, 00052 const unsigned int version) 00053 { 00054 ar & uuid_key.high_bits & uuid_key.low_bits; 00055 } 00056 } 00057 } 00058 00059 BOOST_IS_BITWISE_SERIALIZABLE(NS_SSRC_WSPR::uuid_key_type) 00060 00061 #endif
Copyright © 2006-2011 Savarese Software Research Corporation. All rights reserved.