SMTK
@SMTK_VERSION@
Simulation Modeling Tool Kit
|
Initialize nodes after they have been deserialized. More...
#include <NodeInitializer.h>
Public Member Functions | |
NodeInitializer (Resource *resource, const json &source) | |
template<typename NodeType > | |
void | evaluate (std::size_t ii) const |
Public Attributes | |
Resource * | m_resource = nullptr |
const json & | m_source |
Initialize nodes after they have been deserialized.
At the point this functor's evaluate() method is invoked, all nodes and arcs in the resource have been created but the nodes have not been initialized. This functor gives nodes a chance to update references to other nodes by following arcs without having to worry about deserialization order. (Note that you cannot depend on the order of nodes being initialized, only that they all exist at this point and have all their arcs in place.)