Changeset 3690 for source/ariba/utility/serialization
- Timestamp:
- May 26, 2009, 1:40:23 AM (16 years ago)
- Location:
- source/ariba/utility/serialization
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
source/ariba/utility/serialization/Data.hpp
r3689 r3690 1 // [Licen ce]1 // [License] 2 2 // The Ariba-Underlay Copyright 3 3 // … … 35 35 // official policies, either expressed or implied, of the Institute of 36 36 // Telematics. 37 // [Licen ce]37 // [License] 38 38 39 39 #ifndef DATA_HPP_ -
source/ariba/utility/serialization/DataStream.hpp
r3689 r3690 1 // [Licen ce]1 // [License] 2 2 // The Ariba-Underlay Copyright 3 3 // … … 35 35 // official policies, either expressed or implied, of the Institute of 36 36 // Telematics. 37 // [Licen ce]37 // [License] 38 38 39 39 #ifndef DATASTREAM_HPP_ … … 42 42 //== Library includes == 43 43 #include <boost/cstdint.hpp> 44 #include <boost/type_traits/make_unsigned.hpp> 45 44 46 #include <iostream> 45 47 #include <vector> … … 153 155 template<typename X> 154 156 finline void remove(X& obj, if_uint(X)) { 157 if (!isMeasure()) bits[index].get(obj); 158 index += sizeof(X) * 8; 159 } 160 161 /* support signed ints */ 162 template<typename X> 163 finline void add(X& sobj, if_int(X)) { 164 typedef typename boost::make_unsigned<X>::type UX; 165 UX& obj = *((UX*)&sobj); 166 if (!isMeasure()) 167 bitcpy( sobj, 0, bits.getBuffer(), index); 168 index += sizeof(X) * 8; 169 } 170 171 template<typename X> 172 finline void remove(X& sobj, if_int(X)) { 173 typedef typename boost::make_unsigned<X>::type UX; 174 UX& obj = *((UX*)&sobj); 155 175 if (!isMeasure()) bits[index].get(obj); 156 176 index += sizeof(X) * 8; -
source/ariba/utility/serialization/DataUtilities.hpp
r3689 r3690 1 // [Licen ce]1 // [License] 2 2 // The Ariba-Underlay Copyright 3 3 // … … 35 35 // official policies, either expressed or implied, of the Institute of 36 36 // Telematics. 37 // [Licen ce]37 // [License] 38 38 39 39 /* This file implements some common bit operations for unsigned integer types -
source/ariba/utility/serialization/Serialization.cpp
r3689 r3690 1 // [Licen ce]1 // [License] 2 2 // The Ariba-Underlay Copyright 3 3 // … … 35 35 // official policies, either expressed or implied, of the Institute of 36 36 // Telematics. 37 // [Licen ce]37 // [License] 38 38 39 39 #include "Serialization.hpp" -
source/ariba/utility/serialization/Serialization.hpp
r3689 r3690 1 // [Licen ce]1 // [License] 2 2 // The Ariba-Underlay Copyright 3 3 // … … 35 35 // official policies, either expressed or implied, of the Institute of 36 36 // Telematics. 37 // [Licen ce]37 // [License] 38 38 39 39 #ifndef SERIALIZATION_HPP_ -
source/ariba/utility/serialization/TestSerialization.cpp
r3689 r3690 1 // [Licen ce]1 // [License] 2 2 // The Ariba-Underlay Copyright 3 3 // … … 35 35 // official policies, either expressed or implied, of the Institute of 36 36 // Telematics. 37 // [Licen ce]37 // [License] 38 38 39 39 #include "Data.hpp"
Note:
See TracChangeset
for help on using the changeset viewer.