Mercurial > hg > piper-cpp
comparison utilities/json-to-capnp.cpp @ 58:c38e12d4bbdd
Merge from branch outputid-string-in-featureset
author | Chris Cannam <c.cannam@qmul.ac.uk> |
---|---|
date | Mon, 19 Sep 2016 14:48:43 +0100 |
parents | 38780f15ac8d |
children |
comparison
equal
deleted
inserted
replaced
48:ce6cb3308bd7 | 58:c38e12d4bbdd |
---|---|
53 VampnProto::buildConfigurationRequest | 53 VampnProto::buildConfigurationRequest |
54 (req, VampJson::toConfigurationRequest(payload, mapper), mapper); | 54 (req, VampJson::toConfigurationRequest(payload, mapper), mapper); |
55 | 55 |
56 } else if (type == "configurationresponse") { | 56 } else if (type == "configurationresponse") { |
57 auto resp = message.initRoot<ConfigurationResponse>(); | 57 auto resp = message.initRoot<ConfigurationResponse>(); |
58 PreservingPluginHandleMapper mapper; | |
58 VampnProto::buildConfigurationResponse | 59 VampnProto::buildConfigurationResponse |
59 (resp, VampJson::toConfigurationResponse(payload)); | 60 (resp, VampJson::toConfigurationResponse(payload, mapper), mapper); |
60 | 61 |
61 } else if (type == "feature") { | 62 } else if (type == "feature") { |
62 auto f = message.initRoot<Feature>(); | 63 auto f = message.initRoot<Feature>(); |
63 VampnProto::buildFeature | 64 VampnProto::buildFeature |
64 (f, VampJson::toFeature(payload, serialisation)); | 65 (f, VampJson::toFeature(payload, serialisation)); |
65 | 66 |
66 } else if (type == "featureset") { | 67 } else if (type == "featureset") { |
67 auto fs = message.initRoot<FeatureSet>(); | 68 auto fs = message.initRoot<FeatureSet>(); |
69 PreservingPluginOutputIdMapper omapper; | |
68 VampnProto::buildFeatureSet | 70 VampnProto::buildFeatureSet |
69 (fs, VampJson::toFeatureSet(payload, serialisation)); | 71 (fs, VampJson::toFeatureSet(payload, omapper, serialisation), omapper); |
70 | 72 |
71 } else if (type == "loadrequest") { | 73 } else if (type == "loadrequest") { |
72 auto req = message.initRoot<LoadRequest>(); | 74 auto req = message.initRoot<LoadRequest>(); |
73 VampnProto::buildLoadRequest | 75 VampnProto::buildLoadRequest |
74 (req, VampJson::toLoadRequest(payload)); | 76 (req, VampJson::toLoadRequest(payload)); |