22 #ifndef NODEHANDSHAKE_H_
23 #define NODEHANDSHAKE_H_
52 virtual std::ostream&
serialize(std::ostream&)
const = 0;
53 virtual std::istream&
deserialize(std::istream&) = 0;
64 std::ostream&
serialize(std::ostream&)
const;
82 std::ostream&
serialize(std::ostream&)
const;
135 typedef std::map<dtn::data::Number, std::stringstream* > stream_map;
145 typedef std::set<dtn::data::Number> request_set;
146 request_set _requests;
148 typedef std::list<NodeHandshakeItem*> item_set;
151 StreamMap _raw_items;
165 if (!_raw_items.has(T::identifier))
168 T *item_template =
new T();
169 item_template->deserialize( _raw_items.get(T::identifier) );
172 _raw_items.remove(T::identifier);
175 _items.push_back(item_template);
177 return (*item_template);
180 return dynamic_cast<T&
>(*item);