StatusRequests holds a list of StatusRequest that apply to the interval defined by period_.
If the list with the status requests is not empty, then the class provides enough information to determine the perferred status of the related entity for every time with the interval.
Definition at line 335 of file statusrequest.h.
typedef Cont::const_iterator OSB_LIB::StatusRequests::ConstIter |
typedef Cont::const_reverse_iterator OSB_LIB::StatusRequests::ConstRiter |
typedef std::set<StatusRequest, Cmp> OSB_LIB::StatusRequests::Cont |
STL container to store the status requests.
They are sorted in ascending order of the valid-from date.
Definition at line 359 of file statusrequest.h.
OSB_LIB::StatusRequests::StatusRequests | ( | ) |
Empty default constructor.
OSB_LIB::StatusRequests::StatusRequests | ( | const Period & | period | ) |
Constructor with time period to use.
StatusRequests::ConstIter OSB_LIB::StatusRequests::begin | ( | ) | const [inline] |
Begin of status requests.
Definition at line 507 of file statusrequest.h.
References requests_.
Referenced by countIf().
size_t OSB_LIB::StatusRequests::countIf | ( | Pred | pred | ) | const [inline] |
bool OSB_LIB::StatusRequests::empty | ( | ) | const [inline] |
List of status requests empty?
Definition at line 497 of file statusrequest.h.
References requests_.
StatusRequests::ConstIter OSB_LIB::StatusRequests::end | ( | ) | const [inline] |
End of status requests.
Definition at line 512 of file statusrequest.h.
References requests_.
Referenced by countIf().
const StatusRequest& OSB_LIB::StatusRequests::first | ( | ) | const |
const StatusRequest* OSB_LIB::StatusRequests::getReqStatus | ( | const OSB_LIB::DateTime & | ts | ) | const |
Get the requested status for a given time.
ts | Date and time to use. |
valid-from <= ts
exists in requests_.const StatusRequest& OSB_LIB::StatusRequests::last | ( | ) | const |
const Period& OSB_LIB::StatusRequests::period | ( | ) | const |
Time period covered by the status requests.
StatusRequests::ConstRiter OSB_LIB::StatusRequests::rbegin | ( | ) | const [inline] |
Begin of reversed status requests.
Definition at line 517 of file statusrequest.h.
References requests_.
StatusRequests::ConstRiter OSB_LIB::StatusRequests::rend | ( | ) | const [inline] |
End of reversed status requests.
Definition at line 522 of file statusrequest.h.
References requests_.
const Cont& OSB_LIB::StatusRequests::requests | ( | ) | const |
Read access to list of status requests.
void OSB_LIB::StatusRequests::setPeriod | ( | const Period & | period | ) |
Set the time period.
period | New time period to use. |
size_t OSB_LIB::StatusRequests::size | ( | ) | const [inline] |
Number of status requests in the list.
Definition at line 502 of file statusrequest.h.
References requests_.
void OSB_LIB::StatusRequests::swap | ( | StatusRequests & | rhs | ) | throw () |
Swap two status request lists.
friend class OSB_DB::StatusRequestGw [friend] |
Read and populate status requests from the database.
Definition at line 337 of file statusrequest.h.
Period OSB_LIB::StatusRequests::period_ [private] |
Cont OSB_LIB::StatusRequests::requests_ [private] |
List of status requests for the time period.
An empty list implies that the status requests have not been read from the database.
ToDo: Should be introduce a flag that tell us that there are no valid status requests at all for the entity?
Definition at line 458 of file statusrequest.h.
Referenced by begin(), empty(), end(), rbegin(), rend(), and size().