Called when a submessage is started. For example, when: child { is found, it triggers AddChild("child"); If nullptr is returned, the contents of the submessage will be ignored. Otherwise, the returned Message will be used to handle new fields and new submessages. The caller should not take ownership of the returned pointer.
| 55 | // Otherwise, the returned Message will be used to handle new fields and new |
| 56 | // submessages. The caller should not take ownership of the returned pointer. |
| 57 | virtual Message* AddChild(const std::string& name) { return nullptr; } |
| 58 | |
| 59 | // Called when a submessage is completed, that is, whenever a '}' is found. |
| 60 | virtual void Finish() {} |