56 void setManaged(
const Range& r);
62 [[nodiscard]]
const Range& getManaged()
const;
143 bool setAutoManaged(
bool flag =
true);
155 void setDebug(
bool debug);
161 bool _autoManaged{
false};
191 std::swap(flag, _autoManaged);
197 return _managedRange;
212 return _actualRequests;
This class manages range requests made by clients identified by ID's in the ranges.
Definition RangeManager.h:26
bool setAccessible(const Range &r, Range::Vector &rl_req)
Same as setAccessible but now for a single Range element.
RangeManager()=default
Default constructor.
void setDebug(bool debug)
Sets the debug flag for this instance.
Definition RangeManager.h:184
void unitTest(Range::Vector *accessibles, Range::Vector *actual_requests=nullptr, Range::Vector *requests=nullptr)
Test function for set privates during a unit test.
bool setAutoManaged(bool flag=true)
Determines if the managed range is automatically determined and set when setAccessible is called....
Definition RangeManager.h:189
void flushRequests(Range::id_type id)
Flushes all the requests having the range identifier.
const Range::Vector & getRequests() const
Retrieves the current request list.
Definition RangeManager.h:215
void setManaged(const Range &r)
Sets the limiting range on requests. If the managed range is not set (empty) requests get the rmOutOf...
Definition RangeManager.h:200
bool isAccessible(const Range &r) const
Returns if this range is accessible. Using the managed range and the current accessible ranges as a r...
~RangeManager()=default
Destructor.
EResult request(const Range &r, Range::Vector &rrl)
Called by client to request access for a range.
bool flush()
Flushes all ranges and range list as if it were initialized.
bool setAccessible(const Range::Vector &rl, Range::Vector &rl_req)
This function is called by a derived server class to as a reply to an event. The function will return...
bool isFlushable() const
Checks if flushing has any effect.
const Range::Vector & getActualRequests() const
Retrieves actual request list of ranges missing to fulfill requests. These are the resulting-request...
Definition RangeManager.h:210
const Range & getManaged() const
Retrieves the limit on the maximum requestable range span from zero.
Definition RangeManager.h:195
EResult
Enumerate for return values used by request method.
Definition RangeManager.h:95
const Range::Vector & getAccessibles() const
Retrieves the current accessible list of ranges.
Definition RangeManager.h:205
Type to contain and manipulate range lists.
Definition Range.h:67
Class to manage 64-bit integer ranges.
Definition Range.h:52
RANGE::id_type id_type
Integer type used for the ID.
Definition Range.h:61
#define _MISC_CLASS
Definition misc/global.h:40
Definition Application.h:10