BinaryValue Class Reference

#include <BinaryValue.h>

List of all members.

Public Member Functions

 BinaryValue (const char *s="")
 BinaryValue (const std::string &str)
 BinaryValue (const std::vector< char > &v)
virtual ~BinaryValue ()
virtual void netPack (cCommBuffer *b)
virtual void netUnpack (cCommBuffer *b)

Static Public Attributes

static const BinaryValue UNSPECIFIED_VALUE

Friends

std::ostream & operator<< (std::ostream &os, const BinaryValue &v)


Constructor & Destructor Documentation

BinaryValue::BinaryValue ( const char *  s = ""  ) 

00031                                      : vector<char>(strlen(s)) {
00032     copy(s, s+strlen(s), begin());  // Inherits vector<char>::begin()
00033 }

BinaryValue::BinaryValue ( const std::string &  str  ) 

00035                                              {
00036     *this = BinaryValue(str.c_str());
00037 }

BinaryValue::BinaryValue ( const std::vector< char > &  v  ) 

00039 : vector<char>(v) {};

virtual BinaryValue::~BinaryValue (  )  [inline, virtual]

00040 {};


Member Function Documentation

void BinaryValue::netPack ( cCommBuffer *  b  )  [virtual]

00090 {
00091     doPacking(b,size());
00092     doPacking(b, (const char*)(&(*begin())), size());
00093 }

void BinaryValue::netUnpack ( cCommBuffer *  b  )  [virtual]

00096 {
00097     int size;
00098     doUnpacking(b, size);
00099     resize(size);
00100     doUnpacking(b, (char*)(&(*begin())), size);
00101 }


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const BinaryValue v 
) [friend]

00042                                                                {
00043     copy(v.begin(), v.end(), ostream_iterator<char>(os, ""));
00044     return os;        // To allow (cout << a) << b;
00045 }


Member Data Documentation

const BinaryValue BinaryValue::UNSPECIFIED_VALUE [static]


The documentation for this class was generated from the following files:
Generated on Tue Jul 24 16:51:18 2007 for ITM OverSim by  doxygen 1.5.1