OSB_LIB::Status Class Reference

Collaboration diagram for OSB_LIB::Status:

Collaboration graph
[legend]
List of all members.

Detailed Description

Status of Associate and contracted entities.

The class describes the status of an object of the class Associate, Contract, PersProduct and PersProductNode.

Definition at line 456 of file status.h.

Public Member Functions

Private Attributes


Constructor & Destructor Documentation

OSB_LIB::Status::Status (  )  [inline]

Default constructor.

Sets status_ to svNone.

Definition at line 574 of file status.h.

OSB_LIB::Status::Status ( StatusValue  status,
const StatusReason::Oid reason 
)

Constructor with status and reason.

Parameters:
status Applicable status.
reason Id of the reason for the applicable status.


Member Function Documentation

bool OSB_LIB::Status::changeStatus ( const StatusChange sc  ) 

Change the status.

Parameters:
sc Status change with the new status and reason.
Returns:
true if the status change is allowed, else false.

bool OSB_LIB::Status::changeStatus ( const Status newStatus  )  [inline]

Change the status.

Parameters:
newStatus The new status for the entity.
Returns:
true if the status change is allowed, else false.

Definition at line 606 of file status.h.

References changeStatus(), reasonId_, and status_.

bool OSB_LIB::Status::changeStatus ( StatusValue  newStatus,
const StatusReason::Oid reasonId 
)

Change the status.

Changes the status if the transition is technically allowed. The function does not verify if the reason is valid for the pair old/new status value and the entity who's status is changed.

Parameters:
newStatus New status value.
reasonId Reason id for the change to the new status.
Returns:
true if the status change is allowed, else false.

Referenced by changeStatus().

bool OSB_LIB::Status::operator!= ( const Status rhs  )  const [inline]

Compare by status and reason.

Parameters:
rhs Status to compare.
Returns:
true if either the status and the reason is different, else false.

Definition at line 601 of file status.h.

bool OSB_LIB::Status::operator== ( const StatusReason::Oid rhs  )  const [inline]

Compare by reason.

Parameters:
rhs Status to compare.
Returns:
true if the status and the reason are the same, else false.

Definition at line 596 of file status.h.

References reasonId_.

bool OSB_LIB::Status::operator== ( const Status rhs  )  const [inline]

Compare by status and reason.

Parameters:
rhs Status to compare.
Returns:
true if the status and the reason are the same, else false.

Definition at line 590 of file status.h.

References reasonId_, and status_.

StatusReason::Oid OSB_LIB::Status::reason (  )  const [inline]

Get the reason id for the status.

Definition at line 585 of file status.h.

References reasonId_.

StatusValue OSB_LIB::Status::status (  )  const [inline]

Get the status value.

Definition at line 580 of file status.h.

References status_.

Referenced by OSB_LIB::StatusChange::adjustNewStatus().

std::ostream& OSB_LIB::Status::write ( std::ostream &  os  )  const

Print to an output stream.

Parameters:
os Output stream to write to.
Returns:
Reference to the argument ostream.


Member Data Documentation

StatusReason::Oid OSB_LIB::Status::reasonId_ [private]

Reason for the status.

Definition at line 553 of file status.h.

Referenced by changeStatus(), operator==(), and reason().

StatusValue OSB_LIB::Status::status_ [private]

Value of the status.

Definition at line 551 of file status.h.

Referenced by changeStatus(), operator==(), and status().


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