Quick Links:

bal | bbl | bdl | bsl

Public Types | Public Member Functions | Friends

bdlt::Timetable_CompactableTransition Class Reference

#include <bdlt_timetable.h>

List of all members.

Public Types

enum  { k_UNSET_TRANSITION_CODE }

Public Member Functions

 Timetable_CompactableTransition ()
 Timetable_CompactableTransition (const Time &time, int code)
 Timetable_CompactableTransition (const Timetable_CompactableTransition &original)
 ~Timetable_CompactableTransition ()
Timetable_CompactableTransitionoperator= (const Timetable_CompactableTransition &rhs)
const Timetime () const
int code () const
bsl::ostream & print (bsl::ostream &stream, int level=0, int spacesPerLevel=4) const

Friends

class Timetable
class Timetable_Day

Detailed Description

This simply-constrained attribute class represents a state transition, implemented as a time for when the transition occurs, and a code to indicate the new state.

See Component bdlt_timetable


Member Enumeration Documentation

anonymous enum
Enumerator:
k_UNSET_TRANSITION_CODE 

Constructor & Destructor Documentation

bdlt::Timetable_CompactableTransition::Timetable_CompactableTransition (  ) 

Create a Timetable_CompactableTransition having time value Time(0) and code k_UNSET_TRANSITION_CODE.

bdlt::Timetable_CompactableTransition::Timetable_CompactableTransition ( const Time time,
int  code 
)

Create a Timetable_CompactableTransition having the specified time and code. The behavior is undefined unless 24 > time.hour() and 0 <= code || k_UNSET_TRANSITION_CODE == code.

bdlt::Timetable_CompactableTransition::Timetable_CompactableTransition ( const Timetable_CompactableTransition original  ) 

Create a Timetable_CompactableTransition having the same value as the specified original object.

bdlt::Timetable_CompactableTransition::~Timetable_CompactableTransition (  ) 

Destroy this object.


Member Function Documentation

Timetable_CompactableTransition& bdlt::Timetable_CompactableTransition::operator= ( const Timetable_CompactableTransition rhs  ) 

Assign to this object the value of the specified rhs compactable transition, and return a reference providing modifiable access to this object.

const Time& bdlt::Timetable_CompactableTransition::time (  )  const

Return the time of this compactable transition.

int bdlt::Timetable_CompactableTransition::code (  )  const

Return the code of this compactable transition.

bsl::ostream& bdlt::Timetable_CompactableTransition::print ( bsl::ostream &  stream,
int  level = 0,
int  spacesPerLevel = 4 
) const

Format this object to the specified output stream at the (absolute value of) the optionally specified indentation level and return a reference to the modifiable stream. If level is specified, optionally specify spacesPerLevel, the number of spaces per indentation level for this and all of its nested objects. If level is negative, suppress indentation of the first line. If spacesPerLevel is negative, format the entire output on one line, suppressing all but the initial indentation (as governed by level). If stream is not valid on entry, this operation has no effect.


Friends And Related Function Documentation

friend class Timetable [friend]
friend class Timetable_Day [friend]

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