IBR-DTNSuite 0.6

ibrdtn/ibrdtn/data/BundleMerger.h

Go to the documentation of this file.
00001 /*
00002  * BundleMerger.h
00003  *
00004  *  Created on: 25.01.2010
00005  *      Author: morgenro
00006  */
00007 
00008 #ifndef BUNDLEMERGER_H_
00009 #define BUNDLEMERGER_H_
00010 
00011 #include "ibrcommon/data/BLOB.h"
00012 #include "ibrdtn/data/Bundle.h"
00013 
00014 namespace dtn
00015 {
00016         namespace data
00017         {
00018                 class BundleMerger
00019                 {
00020                 public:
00021                         class Container
00022                         {
00023                         public:
00024                                 Container(dtn::data::Bundle &b, ibrcommon::BLOB::Reference &ref);
00025                                 virtual ~Container();
00026                                 bool isComplete();
00027 
00028                                 Bundle getBundle();
00029 
00030                                 friend Container &operator<<(Container &c, dtn::data::Bundle &obj);
00031 
00032                         private:
00033                                 dtn::data::Bundle _bundle;
00034                                 ibrcommon::BLOB::Reference _blob;
00035                         };
00036 
00037                         static Container getContainer(dtn::data::Bundle &b);
00038                         static Container getContainer(dtn::data::Bundle &b, ibrcommon::BLOB::Reference &ref);
00039                 };
00040         }
00041 }
00042 
00043 
00044 #endif /* BUNDLEMERGER_H_ */