Changeset 6786 for source/ariba/utility
- Timestamp:
- Nov 2, 2009, 1:31:19 AM (15 years ago)
- Location:
- source/ariba/utility
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
source/ariba/utility/addressing/facades/address_v.hpp
r5284 r6786 2 2 #define ADDRESS_V_H_ 3 3 4 #include <stdint.h> 4 5 #include <string> 5 6 #include <iostream> -
source/ariba/utility/addressing/facades/to_bytes_v.hpp
r5284 r6786 5 5 6 6 #include <memory> 7 #include <stdint.h> 7 8 #include "vfacade.hpp" 8 9 -
source/ariba/utility/addressing/port_address.hpp
r5284 r6786 5 5 6 6 #include<string> 7 #include<cstdio> 8 7 9 #include<boost/tr1/functional.hpp> 8 10 -
source/ariba/utility/messages/Message.h
r5484 r6786 105 105 * data. 106 106 */ 107 inline Message( const Data& data ) :107 explicit inline Message( const Data& data ) : 108 108 srcAddr(NULL),destAddr(NULL), releasePayload(true) { 109 109 this->payload = data.clone(); -
source/ariba/utility/serialization/Data.hpp
r5870 r6786 49 49 template<typename T = uint8_t, typename DataModel = DefaultDataModel<uint8_t> > class DataTpl; 50 50 typedef DataTpl<> Data; 51 template<typename T, typename DataModel> std::ostream& operator<<(std::ostream& stream, DataTpl<T, DataModel>& data);51 template<typename T, typename DataModel> std::ostream& operator<<(std::ostream& stream, const DataTpl<T, DataModel>& data); 52 52 53 53 //== internal includes == … … 324 324 }; 325 325 326 /* default human readable text output */327 template<typename T, typename DataModel>328 std::ostream& operator<<(std::ostream& stream, DataTpl<T, DataModel>& data) {329 stream << "[" << bitstr(data.getBuffer(), data.getLength(), 4)330 << "|'";331 char* buffer = (char*) data.getBuffer();332 for (size_t i = 0; i < data.getLength() / 8; i++) {333 char c = buffer[i] < 32 ? '.' : buffer[i];334 stream << c;335 }336 stream << "']";337 return stream;338 }339 340 326 /* unspecified type */ 341 327 template<typename T, typename DataModel> … … 397 383 398 384 finline int32_t length() const { 399 return bufferLen;385 return (bufferLen == -1) ? 0 : bufferLen; 400 386 } 401 387 … … 442 428 }sznEnd(); 443 429 430 /* default human readable text output */ 431 template<typename T, typename DataModel> 432 std::ostream& operator<<(std::ostream& stream, const DataTpl<T, DataModel>& data) { 433 stream << "[" << bitstr(data.getBuffer(), data.getLength(), 4) 434 << "|'"; 435 const char* buffer = (const char*) data.getBuffer(); 436 for (size_t i = 0; i < data.getLength() / 8; i++) { 437 char c = buffer[i] < 32 ? '.' : buffer[i]; 438 stream << c; 439 } 440 stream << "']"; 441 return stream; 442 } 444 443 #endif /* DATA_HPP_ */ -
source/ariba/utility/transport/tcpip/protlib/address.cpp
r5876 r6786 534 534 char ipstr[INET6_ADDRSTRLEN] = {0}; 535 535 // look for / 536 i = strchr( str,'/');536 i = strchr((char*)str,'/'); 537 537 if (i) { 538 538 iplen = i-str;
Note:
See TracChangeset
for help on using the changeset viewer.