version 3.3

VRS::TimeRequirement Class Reference

VRSTime Requirement of Behavior Nodes. More...

#include <vrs/sg/timerequirement.h>

List of all members.

Public Member Functions

 TimeRequirement (bool isInfinite=false)
 TimeRequirement (VRSTime natural, VRSTime shrink, VRSTime stretch, double relativeAlignment=0.0)
void mergeMax (const TimeRequirement &tr, double k)
void mergeMin (const TimeRequirement &tr, double k)
bool operator== (const TimeRequirement &) const
void setNatural (VRSTime time)
void setShrink (VRSTime time)
void setStretch (VRSTime time)
VRSTime getNatural () const
VRSTime getShrink () const
VRSTime getStretch () const
 Return the stored time segments.
VRSTime maximum () const
VRSTime minimum () const
 Return natural+stretch and natural+shrink.
void setAlignment (double alignment)
double getAlignment () const
void setToInfinite ()
void setToUndefined ()
void setToDefined ()
bool isDefined () const
bool isUndefined () const
bool isInfinite () const
TimeRequirement operator+ (const TimeRequirement &) const
TimeRequirementoperator+= (const TimeRequirement &)
TimeRequirementoperator* (double)
TimeRequirementoperator/ (double)
 VRS_SERIALIZABLE_NO_SO_CLASS (TimeRequirement)

Static Public Attributes

static const TimeRequirement infinite
 A requirement may be infinite, defined or undefined.


Detailed Description

VRSTime Requirement of Behavior Nodes.

Constructor & Destructor Documentation

VRS::TimeRequirement::TimeRequirement ( bool  isInfinite = false  ) 

VRS::TimeRequirement::TimeRequirement ( VRSTime  natural,
VRSTime  shrink,
VRSTime  stretch,
double  relativeAlignment = 0.0 
)

A time requirement is by default undefined. It can be set to infinite, too. Alternatively, natural time, stretchability, and shrinkability can be specified.


Member Function Documentation

void VRS::TimeRequirement::mergeMax ( const TimeRequirement tr,
double  k 
)

void VRS::TimeRequirement::mergeMin ( const TimeRequirement tr,
double  k 
)

`mergeMax' sets x (either natural, shrink, stretch) to (1-k)*x + k*max(x,tr.x). If one requirement is undefined, the other requirement is chosen (if may be undefined as well). `mergeMin' works similar. If the current time requirement is infinite, `tr' is ignored. If the current time requirement is finite and `tr' is infinite, the values of `tr' are copied if k is not 0, otherwise they are ignored.

bool VRS::TimeRequirement::operator== ( const TimeRequirement  )  const

void VRS::TimeRequirement::setNatural ( VRSTime  time  )  [inline]

void VRS::TimeRequirement::setShrink ( VRSTime  time  )  [inline]

void VRS::TimeRequirement::setStretch ( VRSTime  time  )  [inline]

A requirement consists of three time segments: Natural: Defines the desired time Shrink: Defines to what amount the natural time may be shrinked at least. Stretch: Defines to what amount the natural time may be stretched at most. VRS_Assertions shrink<=natural<=stretch

VRSTime VRS::TimeRequirement::getNatural (  )  const [inline]

VRSTime VRS::TimeRequirement::getShrink (  )  const [inline]

VRSTime VRS::TimeRequirement::getStretch (  )  const [inline]

Return the stored time segments.

VRSTime VRS::TimeRequirement::maximum (  )  const [inline]

VRSTime VRS::TimeRequirement::minimum (  )  const [inline]

Return natural+stretch and natural+shrink.

void VRS::TimeRequirement::setAlignment ( double  alignment  )  [inline]

double VRS::TimeRequirement::getAlignment (  )  const [inline]

Set resp. relative alignment. Value must be in [0,1]

void VRS::TimeRequirement::setToInfinite (  ) 

void VRS::TimeRequirement::setToUndefined (  ) 

void VRS::TimeRequirement::setToDefined (  ) 

bool VRS::TimeRequirement::isDefined (  )  const [inline]

bool VRS::TimeRequirement::isUndefined (  )  const [inline]

bool VRS::TimeRequirement::isInfinite (  )  const [inline]

TimeRequirement VRS::TimeRequirement::operator+ ( const TimeRequirement  )  const

TimeRequirement& VRS::TimeRequirement::operator+= ( const TimeRequirement  ) 

TimeRequirement& VRS::TimeRequirement::operator* ( double   ) 

TimeRequirement& VRS::TimeRequirement::operator/ ( double   ) 

VRS::TimeRequirement::VRS_SERIALIZABLE_NO_SO_CLASS ( TimeRequirement   ) 


Member Data Documentation

A requirement may be infinite, defined or undefined.


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

Generated on Wed May 23 06:00:28 2012 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact