rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
local_version_holder.h
Go to the documentation of this file.
1/**
2 * @file local_version_holder.h
3 *
4 * @date Mar 19, 2014
5 * @author Andrey Belomutskiy, (c) 2012-2020
6 */
7
8#pragma once
9
10#include "stdbool.h"
11
12/**
13 * this
14 */
16public:
17 /**
18 * Calling this method changes the internal state of the class - each consumer interested in tracking
19 * changes should have it's own instance of this class
20 *
21 * @return true if 'globalVersion' has changed since last time we've invoked this method
22 */
23 bool isOld(int globalVersion);
24 int getVersion() const;
25
26private:
27 /**
28 * we want local version to be 'old' on instantiation
29 */
30 int localVersion = -1;
31
32};
bool isOld(int globalVersion)