rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes
LocalVersionHolder Class Reference

#include <local_version_holder.h>

Collaboration diagram for LocalVersionHolder:
Collaboration graph
[legend]

Public Member Functions

bool isOld (int globalVersion)
 
int getVersion () const
 

Private Attributes

int localVersion = -1
 

Detailed Description

this

Definition at line 15 of file local_version_holder.h.

Member Function Documentation

◆ getVersion()

int LocalVersionHolder::getVersion ( ) const

Definition at line 10 of file local_version_holder.cpp.

10 {
11 return localVersion;
12}

◆ isOld()

bool LocalVersionHolder::isOld ( int  globalVersion)

Calling this method changes the internal state of the class - each consumer interested in tracking changes should have it's own instance of this class

Returns
true if 'globalVersion' has changed since last time we've invoked this method

Definition at line 14 of file local_version_holder.cpp.

14 {
15 if (globalVersion > localVersion) {
16 localVersion = globalVersion;
17 return true;
18 }
19 return false;
20}

Referenced by TriggerCentral::checkIfTriggerConfigChanged().

Here is the caller graph for this function:

Field Documentation

◆ localVersion

int LocalVersionHolder::localVersion = -1
private

we want local version to be 'old' on instantiation

Definition at line 30 of file local_version_holder.h.

Referenced by getVersion(), and isOld().


The documentation for this class was generated from the following files: