17 #ifndef __EXAMPLES_UTILS_HPP__ 18 #define __EXAMPLES_UTILS_HPP__ 30 for (
int i = 0; i < offer.resources_size(); i++) {
31 const Resource& resource = offer.resources(i);
32 if (resource.name() == name &&
33 resource.type() == Value::SCALAR) {
34 value = resource.scalar().value();
43 #endif // __EXAMPLES_UTILS_HPP__ double getScalarResource(const Offer &offer, const std::string &name)
Definition: utils.hpp:26
constexpr const char * name
Definition: shell.hpp:41