IBR-DTNSuite  0.10
AdministrativeBlock.h
Go to the documentation of this file.
1 /*
2  * AdministrativeBlock.h
3  *
4  * Created on: 10.01.2013
5  * Author: morgenro
6  */
7 
8 #ifndef ADMINISTRATIVEBLOCK_H_
9 #define ADMINISTRATIVEBLOCK_H_
10 
12 
13 namespace dtn
14 {
15  namespace data
16  {
18  public:
20  {
21  public:
22  WrongRecordException(string what = "This administrative block is not of the expected type.") throw() : ibrcommon::Exception(what)
23  {
24  };
25  };
26 
27  AdministrativeBlock(char admfield);
28  virtual ~AdministrativeBlock() = 0;
29 
30  virtual bool refsFragment() const;
31  virtual void setFragment(bool val);
32 
33  virtual void read(const dtn::data::PayloadBlock &p) throw (WrongRecordException) = 0;
34  virtual void write(dtn::data::PayloadBlock &p) const = 0;
35 
36  char _admfield;
37  };
38  } /* namespace data */
39 } /* namespace dtn */
40 #endif /* ADMINISTRATIVEBLOCK_H_ */