Changeset 6922
- Timestamp:
- Nov 13, 2009, 8:05:41 PM (15 years ago)
- Location:
- source/ariba
- Files:
-
- 1 added
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
source/ariba/Makefile.am
r6919 r6922 22 22 # compiler flags ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 23 23 24 AM_CPPFLAGS = - DLINUX -D_LINUX -I../ -D_REENTRANT -DSCTP_KERN24 AM_CPPFLAGS = -Wall -Werror -DLINUX -D_LINUX -I../ -D_REENTRANT -DSCTP_KERN 25 25 AM_CPPFLAGS += $(BOOST_CPPFLAGS) 26 26 … … 374 374 375 375 libariba_la_SOURCES += \ 376 utility/serialization/Serialization.cpp 376 utility/serialization/Serialization.cpp \ 377 utility/serialization/TestSerialization.cpp 377 378 378 379 nobase_libariba_la_HEADERS += \ 379 380 utility/serialization/DataUtilities.hpp \ 380 381 utility/serialization/Serialization.hpp \ 382 utility/serialization/TestSerialization.h \ 381 383 utility/serialization/Data.hpp \ 382 384 utility/serialization/DataStream.hpp -
source/ariba/utility/serialization/Data.hpp
r6786 r6922 44 44 #include <iostream> 45 45 #include <boost/cstdint.hpp> 46 #include <boost/type_traits/make_unsigned.hpp> 46 47 47 48 // forward declaration … … 119 120 template<typename X> 120 121 finline void get(X& value, size_t length = sizeof(X) * 8, if_int(X)) const { 121 _unsigned(value) = bitget<X> (bits.buffer(), index, length); 122 typedef typename boost::make_unsigned<X>::type unsigned_type; 123 _unsigned(value) = bitget<unsigned_type> (bits.buffer(), index, length); 122 124 } 123 125 -
source/ariba/utility/serialization/DataStream.hpp
r6921 r6922 543 543 544 544 sznMethodBegin(X) 545 for (size_t i=0; i<l; i++) X && v[i];545 for (size_t i=0; i<l; i++) X && v[i]; 546 546 sznMethodEnd() 547 547 }; -
source/ariba/utility/serialization/TestSerialization.cpp
r3690 r6922 37 37 // [License] 38 38 39 #include "TestSerialization.h" 39 40 #include "Data.hpp" 40 41 #include "DataStream.hpp" … … 54 55 Aclass* vclass; 55 56 bool vcls; 57 uint8_t* static_array; 56 58 57 59 Aclass(bool vcls = false) { 58 60 text = new char[80]; 61 static_array = new uint8_t[20]; 62 for (size_t i=0; i<20; i++) static_array[i] = i; 59 63 strcpy(text, "Hallo!"); 60 64 str = "std::string:)"; … … 94 98 95 99 sznBeginDefault( Aclass, X ){ 100 double xpos; 96 101 X && x && b && I(y,6) && T(text) && T(str) && A(v,4) && I(z) && vcls; 102 X && static_A(static_array,20); 103 X && static_A( (uint8_t*)&xpos, 8 ); 97 104 if (vcls) X && VO(vclass); 98 105 }sznEnd() … … 100 107 vsznDefault( Aclass ); 101 108 102 int main() {109 int test_serialization() { 103 110 using namespace std; 104 111 -
source/ariba/utility/transport/tcpip/protlib/address.h
r6919 r6922 38 38 #include "ie.h" 39 39 40 #include <ext/hash_map> 40 #include <boost/unordered_map.hpp> 41 #include <boost/functional/hash.hpp> 42 41 43 #include <netinet/in.h> 42 44 #include <set> … … 1404 1406 /*********************************** hash functions ***********************************/ 1405 1407 1406 namespace __gnu_cxx{1408 namespace boost { 1407 1409 /// hostaddress hasher 1408 1410 template <> struct hash<protlib::hostaddress> { … … 1439 1441 1440 1442 /// appladdress equal_to 1443 1441 1444 template <> struct equal_to<protlib::appladdress> { 1442 1445 inline bool operator()(const protlib::appladdress& addr1, const protlib::appladdress& addr2) const { return addr1.equiv(addr2); } -
source/ariba/utility/transport/tcpip/protlib/connectionmap.h
r5284 r6922 31 31 32 32 #include "assocdata.h" 33 #include <ext/hash_map> 33 #include <boost/unordered_map.hpp> 34 using boost::unordered_map; 34 35 35 36 namespace protlib { 37 38 36 39 37 40 /* @class ConnectionMap … … 62 65 size_t get_size() const; 63 66 private: 64 // this hash_map uses the standard hashfunction on the first entry, int67 // this unordered_map uses the standard hashfunction on the first entry, int 65 68 66 69 // only typedefs 67 typedef hash_map<socketfd_t ,AssocData*> ass2data_t;70 typedef unordered_map<socketfd_t ,AssocData*> ass2data_t; 68 71 typedef ass2data_t::const_iterator const_ass2data_it_t; 69 typedef hash_map<appladdress,AssocData*> addr2data_t;72 typedef unordered_map<appladdress,AssocData*> addr2data_t; 70 73 typedef addr2data_t::const_iterator const_addr2data_it_t; 71 74 -
source/ariba/utility/transport/tcpip/protlib/connectionmap_uds.cpp
r5284 r6922 32 32 namespace protlib { 33 33 using namespace log; 34 using boost::unordered_map; 34 35 35 36 /** @ingroup tptcp -
source/ariba/utility/transport/tcpip/protlib/connectionmap_uds.h
r5284 r6922 32 32 33 33 #include "assocdata_uds.h" 34 #include < ext/hash_map>34 #include <boost/unordered_map.hpp> 35 35 36 36 namespace protlib { 37 38 using boost::unordered_map; 37 39 38 40 /* @class ConnectionMap … … 63 65 size_t get_size() const; 64 66 private: 65 // this hash_map uses the standard hashfunction on the first entry, int67 // this unordered_map uses the standard hashfunction on the first entry, int 66 68 67 69 // only typedefs 68 typedef hash_map<socketfd_t ,AssocDataUDS*> ass2data_t;70 typedef unordered_map<socketfd_t ,AssocDataUDS*> ass2data_t; 69 71 typedef ass2data_t::const_iterator const_ass2data_it_t; 70 typedef hash_map<udsaddress,AssocDataUDS*> addr2data_t;72 typedef unordered_map<udsaddress,AssocDataUDS*> addr2data_t; 71 73 typedef addr2data_t::const_iterator const_addr2data_it_t; 72 74 -
source/ariba/utility/transport/tcpip/protlib/ie.h
r5284 r6922 45 45 #define _PROTLIB__IE_H_ 46 46 47 #include < ext/hash_map>47 #include <boost/unordered_map.hpp> 48 48 #include <deque> 49 49 #include <string> … … 53 53 #include "protlib_types.h" 54 54 #include "network_message.h" 55 56 using boost::unordered_map; 55 57 56 58 namespace protlib { … … 463 465 464 466 private: 465 typedef hash_map<IE_Key, IE *, hash_IE_Key> category_map_t;467 typedef unordered_map<IE_Key, IE *, hash_IE_Key> category_map_t; 466 468 467 469 category_map_t registry; -
source/ariba/utility/transport/tcpip/protlib/llhashers.h
r5284 r6922 31 31 #define PROTLIB_LL_HASHERS_H 32 32 33 #include <boost/functional/hash.hpp> 33 34 34 35 /** @addtogroup hashers Hash function objects … … 40 41 */ 41 42 42 namespace __gnu_cxx{43 namespace boost { 43 44 44 45 /// long long int hasher -
source/ariba/utility/transport/tcpip/protlib/messages.h
r5284 r6922 37 37 38 38 #include <pthread.h> 39 #include < ext/hash_set>39 #include <boost/unordered_set.hpp> 40 40 41 41 #include "protlib_types.h" … … 180 180 } // end namespace protlib 181 181 182 namespace __gnu_cxx{182 namespace boost { 183 183 184 184 /// message pointer hasher -
source/ariba/utility/transport/tcpip/protlib/threads.h
r5284 r6922 46 46 #define PROTLIB__THREADS_H 47 47 48 #include <vector> 48 49 #include <pthread.h> 49 50 #include <signal.h> -
source/ariba/utility/transport/tcpip/protlib/timer.h
r5284 r6922 51 51 #include <sys/time.h> 52 52 #include <list> 53 #include < ext/hash_map>53 #include <boost/unordered_map.hpp> 54 54 55 55 #include "protlib_types.h" … … 124 124 }; // end struct timer 125 125 /// timer manager hashmap 126 typedef hash_map<timer_id_t,timer*> timer_hashmap_t;126 typedef boost::unordered_map<timer_id_t,timer*> timer_hashmap_t; 127 127 /// hashmap iterator 128 128 typedef timer_hashmap_t::iterator timer_hashmap_it_t; -
source/ariba/utility/transport/tcpip/protlib/timer_module.h
r5284 r6922 37 37 #define _PROTLIB__TIMER_MODULE_H 38 38 39 #include < ext/hash_map>39 #include <boost/unordered_map.hpp> 40 40 41 41 #include "messages.h" … … 43 43 #include "llhashers.h" 44 44 #include "timer.h" 45 46 using boost::unordered_map; 45 47 46 48 namespace protlib { … … 248 250 void clear(bool dispose = true); 249 251 private: 250 typedef hash_map<message::id_t,timer_id_t> mid2tid_t;252 typedef unordered_map<message::id_t,timer_id_t> mid2tid_t; 251 253 typedef mid2tid_t::const_iterator const_mid2tid_it_t; 252 typedef hash_map<timer_id_t,message::id_t> tid2mid_t;254 typedef unordered_map<timer_id_t,message::id_t> tid2mid_t; 253 255 typedef tid2mid_t::const_iterator const_tid2mid_it_t; 254 typedef hash_map<timer_id_t,TimerMsg*> tid2msg_t;256 typedef unordered_map<timer_id_t,TimerMsg*> tid2msg_t; 255 257 typedef tid2msg_t::const_iterator const_tid2msg_it_t; 256 258 mid2tid_t mid2tid; -
source/ariba/utility/transport/tcpip/protlib/tp_over_tcp.h
r5284 r6922 35 35 #define TP_OVER_TCP_H 36 36 37 #include < ext/hash_map>37 #include <boost/unordered_map.hpp> 38 38 39 39 #include "tp.h" … … 202 202 203 203 /// store per receiver thread arguments, e.g. for signaling termination 204 typedef hash_map<pthread_t, receiver_thread_arg_t*> recv_thread_argmap_t;204 typedef boost::unordered_map<pthread_t, receiver_thread_arg_t*> recv_thread_argmap_t; 205 205 recv_thread_argmap_t recv_thread_argmap; 206 206 207 207 /// store sender thread related information 208 typedef hash_map<appladdress, FastQueue*> sender_thread_queuemap_t;208 typedef boost::unordered_map<appladdress, FastQueue*> sender_thread_queuemap_t; 209 209 sender_thread_queuemap_t senderthread_queuemap; 210 210 -
source/ariba/utility/transport/tcpip/protlib/tp_over_udp.h
r5284 r6922 35 35 #define TP_OVER_UDP_H 36 36 37 #include < ext/hash_map>37 #include <boost/unordered_map.hpp> 38 38 39 39 #include "tp.h"
Note:
See TracChangeset
for help on using the changeset viewer.