Specialization of YAML::convert for std::shared_ptr<Component>, use this for to read in a component written by the convert<SurgSim::Framework::Component> converter, or a reference to a component written by this converter.
More...
Specialization of YAML::convert for std::shared_ptr<Component>, use this for to read in a component written by the convert<SurgSim::Framework::Component> converter, or a reference to a component written by this converter.
This specialization, is slightly asymmetric, on encode it will only encode a components name, id and className. When decoding this conversion will check whether a component with the same id has already been encountered. If no a new instance will be created and stored in a local Registry. If yes, the entry from the registry will be returned, this makes sure that all references to the same id will use the correct, copy of the smart pointer. Additionally this class contains a class factory that can be used to generate the class from its name.