• Main Page
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

ibrdtn/ibrdtn/api/StringBundle.cpp

Go to the documentation of this file.
00001 /*
00002  * StringBundle.cpp
00003  *
00004  *  Created on: 24.07.2009
00005  *      Author: morgenro
00006  */
00007 
00008 #include "ibrdtn/config.h"
00009 #include "ibrdtn/api/StringBundle.h"
00010 
00011 
00012 namespace dtn
00013 {
00014         namespace api
00015         {
00016                 StringBundle::StringBundle(dtn::data::EID destination)
00017                  : Bundle(destination), _payload(_b.push_back<dtn::data::PayloadBlock>())
00018                 {
00019                 }
00020 
00021                 StringBundle::~StringBundle()
00022                 {
00023                 }
00024 
00025                 void StringBundle::append(string data)
00026                 {
00027                         ibrcommon::BLOB::Reference ref = _payload.getBLOB();
00028                         ibrcommon::MutexLock l(ref);
00029                         (*ref).seekp(0, ios::end);
00030                         (*ref) << data;
00031                 }
00032         }
00033 }

Generated on Thu Nov 11 2010 09:49:47 for IBR-DTNSuite by  doxygen 1.7.1