This template function reads back nodes as written by writeNodes<>()
INSERTER
must have operator() (NODE*)
(for example, class NodeInserter
)
NODE
must have a static
method dummyRead(istream&)
, and a (non-static) method readFrom(istream&)
, and it must be default constructible
NODE2
must be a base type of NODE
For each node address read from the stream:
where
, a new node get constructed and added to the map. After construction, the node's readFrom()
gets called, and then the node is passed to ins()
.class NeuralNet
), NODE::dummyRead()
gets called, to eat up the useless information from the stream.