blob: 6e8c4f1a53e91504e306029beb0585e3731d9fc1 [file] [log] [blame]
#pragma once
#include <map>
class SensorCache
{
public:
typedef std::map<std::pair<std::string, std::string>,
int> container_t;
bool update(const container_t::key_type& k,
const container_t::mapped_type& v)
{
auto& i = container[k];
if (v == i)
{
return false;
}
else
{
i = v;
return true;
}
}
private:
container_t container;
};
// vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4