Ignore:
Timestamp:
May 26, 2009, 1:40:23 AM (16 years ago)
Author:
mies
Message:

Merged 20090512-mies-connectors changes r3472:r3689 into trunk.

Location:
source/ariba/utility/serialization
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • source/ariba/utility/serialization/Data.hpp

    r3689 r3690  
    1 // [Licence]
     1// [License]
    22// The Ariba-Underlay Copyright
    33//
     
    3535// official policies, either expressed or implied, of the Institute of
    3636// Telematics.
    37 // [Licence]
     37// [License]
    3838
    3939#ifndef DATA_HPP_
  • source/ariba/utility/serialization/DataStream.hpp

    r3689 r3690  
    1 // [Licence]
     1// [License]
    22// The Ariba-Underlay Copyright
    33//
     
    3535// official policies, either expressed or implied, of the Institute of
    3636// Telematics.
    37 // [Licence]
     37// [License]
    3838
    3939#ifndef DATASTREAM_HPP_
     
    4242//== Library includes ==
    4343#include <boost/cstdint.hpp>
     44#include <boost/type_traits/make_unsigned.hpp>
     45
    4446#include <iostream>
    4547#include <vector>
     
    153155        template<typename X>
    154156        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);
    155175                if (!isMeasure()) bits[index].get(obj);
    156176                index += sizeof(X) * 8;
  • source/ariba/utility/serialization/DataUtilities.hpp

    r3689 r3690  
    1 // [Licence]
     1// [License]
    22// The Ariba-Underlay Copyright
    33//
     
    3535// official policies, either expressed or implied, of the Institute of
    3636// Telematics.
    37 // [Licence]
     37// [License]
    3838
    3939/* This file implements some common bit operations for unsigned integer types
  • source/ariba/utility/serialization/Serialization.cpp

    r3689 r3690  
    1 // [Licence]
     1// [License]
    22// The Ariba-Underlay Copyright
    33//
     
    3535// official policies, either expressed or implied, of the Institute of
    3636// Telematics.
    37 // [Licence]
     37// [License]
    3838
    3939#include "Serialization.hpp"
  • source/ariba/utility/serialization/Serialization.hpp

    r3689 r3690  
    1 // [Licence]
     1// [License]
    22// The Ariba-Underlay Copyright
    33//
     
    3535// official policies, either expressed or implied, of the Institute of
    3636// Telematics.
    37 // [Licence]
     37// [License]
    3838
    3939#ifndef SERIALIZATION_HPP_
  • source/ariba/utility/serialization/TestSerialization.cpp

    r3689 r3690  
    1 // [Licence]
     1// [License]
    22// The Ariba-Underlay Copyright
    33//
     
    3535// official policies, either expressed or implied, of the Institute of
    3636// Telematics.
    37 // [Licence]
     37// [License]
    3838
    3939#include "Data.hpp"
Note: See TracChangeset for help on using the changeset viewer.