OSB_LIB::StatusChanges Class Reference

Collaboration diagram for OSB_LIB::StatusChanges:

Collaboration graph
[legend]
List of all members.

Detailed Description

List of status changes.

StatusChanges holds a list of StatusChange that apply to the interval defined by period_.

If the list with the status changes is not empty, then the class provides enough information to determine the effective status of the related entity for every time with the interval.

Definition at line 193 of file statuschange.h.

Public Types

Public Member Functions

Private Attributes

Friends

Classes


Member Typedef Documentation

typedef Cont::const_iterator OSB_LIB::StatusChanges::ConstIter

Const iterator over the status changes.

Definition at line 215 of file statuschange.h.

typedef Cont::const_reverse_iterator OSB_LIB::StatusChanges::ConstRiter

Const reverse iterator over the status changes.

Definition at line 217 of file statuschange.h.

typedef std::set<StatusChange, Cmp> OSB_LIB::StatusChanges::Cont

STL container to store the status changes.

Definition at line 213 of file statuschange.h.


Constructor & Destructor Documentation

OSB_LIB::StatusChanges::StatusChanges (  )  [inline]

Empty default constructor.

Definition at line 333 of file statuschange.h.

OSB_LIB::StatusChanges::StatusChanges ( const Period period  )  [inline]

Constructor with time period to use.

Definition at line 338 of file statuschange.h.


Member Function Documentation

void OSB_LIB::StatusChanges::add ( const StatusChanges rhs  ) 

Add the status changes of another list.

Parameters:
rhs List of status changes to add.

StatusChanges::ConstIter OSB_LIB::StatusChanges::begin (  )  const [inline]

Begin of status changes.

Definition at line 365 of file statuschange.h.

References changes_.

Referenced by countIf().

const StatusChanges::Cont & OSB_LIB::StatusChanges::changes (  )  const [inline]

Read access to list of status changes.

Definition at line 360 of file statuschange.h.

References changes_.

void OSB_LIB::StatusChanges::clear (  ) 

Clear the list with the status changes, i.e., changes_.

template<typename Pred>
size_t OSB_LIB::StatusChanges::countIf ( Pred  pred  )  const [inline]

Count the changes using a predicate.

Definition at line 386 of file statuschange.h.

References begin(), and end().

bool OSB_LIB::StatusChanges::empty (  )  const [inline]

List of status requests empty?

Definition at line 350 of file statuschange.h.

References changes_.

StatusChanges::ConstIter OSB_LIB::StatusChanges::end (  )  const [inline]

End of status changes.

Definition at line 370 of file statuschange.h.

References changes_.

Referenced by countIf().

const Period & OSB_LIB::StatusChanges::period (  )  const [inline]

Time period covered by the status requests.

Definition at line 345 of file statuschange.h.

References period_.

StatusChanges::ConstRiter OSB_LIB::StatusChanges::rbegin (  )  const [inline]

Begin of reversed status changes.

Definition at line 375 of file statuschange.h.

References changes_.

StatusChanges::ConstRiter OSB_LIB::StatusChanges::rend (  )  const [inline]

End of reversed status changes.

Definition at line 380 of file statuschange.h.

References changes_.

void OSB_LIB::StatusChanges::setPeriod ( const Period period  ) 

Set the time period.

Parameters:
period New time period to use.
Clears the list of status changes.

size_t OSB_LIB::StatusChanges::size (  )  const [inline]

Number of status requests in the list.

Definition at line 355 of file statuschange.h.

References changes_.

void OSB_LIB::StatusChanges::swap ( StatusChanges rhs  )  throw ()

Swap two status change lists.


Friends And Related Function Documentation

friend class OSB_DB::StatusChangeGw [friend]

Read and populate status changes from the database.

Definition at line 195 of file statuschange.h.


Member Data Documentation

Cont OSB_LIB::StatusChanges::changes_ [private]

List of status changes for the time period.

An empty list implies that the status changes have not been read from the database.

Todo:
Should we introduce a flag that tell us that there are no valid status changes at all for the entity?

Definition at line 295 of file statuschange.h.

Referenced by begin(), changes(), empty(), end(), rbegin(), rend(), and size().

Period OSB_LIB::StatusChanges::period_ [private]

Time period covered by the status requests.

Definition at line 285 of file statuschange.h.

Referenced by period().


The documentation for this class was generated from the following file:
Generated on Sat Sep 2 14:13:10 2006 for OSB Library by  doxygen 1.4.7