22 #ifndef NODEHANDSHAKE_H_
23 #define NODEHANDSHAKE_H_
51 virtual std::ostream&
serialize(std::ostream&)
const = 0;
52 virtual std::istream&
deserialize(std::istream&) = 0;
63 std::ostream&
serialize(std::ostream&)
const;
81 std::ostream&
serialize(std::ostream&)
const;
134 typedef std::map<dtn::data::Number, std::stringstream* > stream_map;
144 typedef std::set<dtn::data::Number> request_set;
145 request_set _requests;
147 typedef std::list<NodeHandshakeItem*> item_set;
150 StreamMap _raw_items;
164 if (!_raw_items.has(T::identifier))
167 T *item_template =
new T();
168 item_template->deserialize( _raw_items.get(T::identifier) );
171 _raw_items.remove(T::identifier);
174 _items.push_back(item_template);
176 return (*item_template);
179 return dynamic_cast<T&
>(*item);