| |
libFAUDES
Sections
Index
|
faudes::TimeConstraint Class Reference |
ClockConstraints | Set of elementary clock constraints |
Public Types | |
typedef std::set < ElemConstraint > ::const_iterator | Iterator |
Iterator to access ElemConstraints. | |
typedef std::set < ElemConstraint > ::const_reverse_iterator | RIterator |
Reverse iterator to access ElemConstraints. | |
typedef ElemConstraint::Operator | Operator |
Convenience typedef for operators. | |
Public Member Functions | |
TimeConstraint (void) | |
Construct an empty TimeConstraint (allways satisfied). | |
TimeConstraint (const TimeConstraint &rOtherTimeConstraint) | |
Copy constructor. | |
TimeConstraint (const std::string &rFilename, const std::string &rLabel="TimeConstraint") | |
Constructor from file. | |
~TimeConstraint (void) | |
Destructor. | |
SymbolTable * | ClockSymbolTablep (void) const |
Get Pointer to mpClockSymbolTable. | |
void | ClockSymbolTablep (SymbolTable *pSymTab) |
Set Pointer to mpClockSymbolTable. | |
void | Write (void) const |
Write to console. | |
void | Write (const std::string &rFileName, const std::string &rLabel="TimeConstraint", std::ios::openmode openmode=std::ios::out|std::ios::trunc) const |
Write to file with label (default: "TimeConstraint") and openmode (default: truncate file). | |
void | Write (TokenWriter &tw) const |
Write to TokenWriter. | |
void | Write (TokenWriter &tw, const std::string &rLabel) const |
Write to TokenWriter with a given label. | |
std::string | ToString (void) const |
Write to a std::string. | |
void | DWrite (void) const |
Write NameSet to console, debug version. | |
void | DWrite (TokenWriter &tw) const |
Write to TokenWriter, debug version. | |
void | Read (const std::string &rFileName, const std::string &rLabel="TimeConstraint") |
Read from file. | |
void | Read (TokenReader &tr, const std::string &rLabel="TimeConstraint") |
Read from tokenreader. | |
std::string | Name (void) const |
Return name of Constraint. | |
void | Name (const std::string &rName) |
Set name of Constraint. | |
bool | Empty (void) const |
Checks if TimeConstraint containts no ElemConstraints. | |
Idx | Size (void) const |
Returns number of ElemConstraint s. | |
Iterator | Insert (const ElemConstraint &rElemConstr) |
Adds an elementary clock constraint to the time constraint. | |
Iterator | Insert (const std::string clockname, Operator op, const tpTime::Type timeconst) |
Adds an elementary clock constraint to the time constraint. | |
Iterator | Insert (Idx clockindex, Operator op, const tpTime::Type timeconst) |
Adds an elementary clock constraint to the time constraint. | |
void | Insert (const std::list< ElemConstraint > &rNewConstraints) |
Adds a list of elementary clock constraints to the time constraint. | |
void | Insert (const TimeConstraint &rOtherTimeConstraint) |
Adds elementary clock constraints from other TimeConstant to the time constraint. | |
TimeConstraint & | operator<< (const TimeConstraint &rOtherTimeConstraint) |
Convenience operator to combine a TimeConstraint with another TimeConstraint. | |
TimeConstraint & | operator<< (const ElemConstraint &rElemConstr) |
Convenience operator to combines a TimeConstraint with an elementary TimeConstraint. | |
std::set< ElemConstraint > | ClockConstraints (void) const |
Returns copy of ClockConstraints. | |
Idx | InsClock (const std::string &rClockName) const |
Advertise clock to ClockSymbolTable and retrive index. | |
std::string | ClockName (Idx clockindex) const |
Lookup clock name. | |
Idx | ClockIndex (const std::string &rClockName) const |
Lookup clock index. | |
std::string | EStr (const ElemConstraint &rElemConstr) const |
Pretty printable string of elem. | |
bool | EraseByClock (Idx clock) |
Removes all elementary clock constraints refering to a specified clock. | |
Iterator | Erase (Iterator it) |
Calls std::set::erase(iterator). | |
bool | Erase (const ElemConstraint &rElemConstr) |
Removes elementary clock constraint. | |
bool | Erase (const std::string &rClockName, Operator op, const tpTime::Type timeconst) |
Removes elementary clock constraint. | |
bool | Erase (Idx clockindex, Operator op, const tpTime::Type timeconst) |
Removes elementary clock constraint. | |
void | Clear (void) |
Clear all. | |
bool | Exists (const ElemConstraint &rElemConstr) const |
Checks if elementary clock constraint is contained in constraint. | |
Iterator | Begin (void) const |
Iterator to begin of set. | |
Iterator | End (void) const |
Iterator to end of set. | |
RIterator | RBegin (void) const |
Reverse iterator that yields the ElemConstraints in reverse order starting at the last element and ending after the first. | |
RIterator | REnd (void) const |
Reverse iterator that yields the ElemConstraints in reverse order starting at the last element and ending after the first. | |
Iterator | Begin (Idx clock) const |
Iterator to first constraint with specified clock. | |
Iterator | End (Idx clock) const |
Iterator to first constraint just behind specified clock. | |
ClockSet | ActiveClocks (void) const |
Returns a Clockset containing all clocks used by the TimeConstraint. | |
TimeInterval | Interval (Idx clockindex) const |
Given a clock, compute the timeinterval in which the constraint is satisfied. | |
TimeInterval | Interval (const std::string &clockname) const |
Given a clock, compute the timeinterval in which the constraint is satisfied. | |
void | Interval (Idx clockindex, const TimeInterval &rInterval) |
Given a clock and an interval, set up the constraint such that it is valid in the given interval. | |
void | Interval (const std::string &rClockName, const TimeInterval &rInterval) |
Given a clock and an interval, set up the constraint such that it is valid in the given interval. | |
void | Minimize (void) |
Minimize by eliminating redundant elementary constraints. | |
Protected Types | |
typedef std::set < ElemConstraint >::iterator | iterator |
nonconst iterator to access ElemConstraints | |
Protected Attributes | |
std::string | mName |
My name. | |
std::set< ElemConstraint > | mClockConstraints |
Set of elementary clock constraints. | |
SymbolTable * | mpClockSymbolTable |
SymbolTable for clock names. |
typedef std::set<ElemConstraint>::const_iterator faudes::TimeConstraint::Iterator |
Iterator to access ElemConstraints.
typedef std::set<ElemConstraint>::const_reverse_iterator faudes::TimeConstraint::RIterator |
Reverse iterator to access ElemConstraints.
Convenience typedef for operators.
typedef std::set<ElemConstraint>::iterator faudes::TimeConstraint::iterator [protected] |
nonconst iterator to access ElemConstraints
faudes::TimeConstraint::TimeConstraint | ( | void | ) |
Construct an empty TimeConstraint (allways satisfied).
faudes::TimeConstraint::TimeConstraint | ( | const TimeConstraint & | rOtherTimeConstraint | ) |
Copy constructor.
rOtherTimeConstraint | Time constraint to copy |
faudes::TimeConstraint::TimeConstraint | ( | const std::string & | rFilename, | |
const std::string & | rLabel = "TimeConstraint" | |||
) |
Constructor from file.
Uses Read() to scan a file for specified label to read the constraint.
rFilename | File to read | |
rLabel | Section label for the set in the file. |
faudes::TimeConstraint::~TimeConstraint | ( | void | ) |
Destructor.
SymbolTable * faudes::TimeConstraint::ClockSymbolTablep | ( | void | ) | const |
Get Pointer to mpClockSymbolTable.
void faudes::TimeConstraint::ClockSymbolTablep | ( | SymbolTable * | pSymTab | ) |
Set Pointer to mpClockSymbolTable.
void faudes::TimeConstraint::Write | ( | void | ) | const |
Write to console.
void faudes::TimeConstraint::Write | ( | const std::string & | rFileName, | |
const std::string & | rLabel = "TimeConstraint" , |
|||
std::ios::openmode | openmode = std::ios::out|std::ios::trunc | |||
) | const |
void faudes::TimeConstraint::Write | ( | TokenWriter & | tw | ) | const |
Write to TokenWriter.
The name of the constraint is used as the label in the file.
tw | Reference to TokenWriter |
std::ios::failure | Thrown on i/o error. |
void faudes::TimeConstraint::Write | ( | TokenWriter & | tw, | |
const std::string & | rLabel | |||
) | const |
Write to TokenWriter with a given label.
tw | Reference to TokenWriter | |
rLabel | Label for set in file |
std::ios::failure | Thrown on i/o error. |
std::string faudes::TimeConstraint::ToString | ( | void | ) | const |
void faudes::TimeConstraint::DWrite | ( | void | ) | const |
Write NameSet to console, debug version.
void faudes::TimeConstraint::DWrite | ( | TokenWriter & | tw | ) | const |
Write to TokenWriter, debug version.
tw | Reference to TokenWriter |
std::ios::failure | Thrown on i/o error. |
void faudes::TimeConstraint::Read | ( | const std::string & | rFileName, | |
const std::string & | rLabel = "TimeConstraint" | |||
) |
void faudes::TimeConstraint::Read | ( | TokenReader & | tr, | |
const std::string & | rLabel = "TimeConstraint" | |||
) |
Read from tokenreader.
Clears before. It is an error if the file contains an index
tr | Reference to tokenreader | |
rLabel | Label to read |
std::ios::failure | Thrown on i/o error. |
std::string faudes::TimeConstraint::Name | ( | void | ) | const [inline] |
Return name of Constraint.
void faudes::TimeConstraint::Name | ( | const std::string & | rName | ) | [inline] |
Set name of Constraint.
rName | BaseSet name |
bool faudes::TimeConstraint::Empty | ( | void | ) | const |
Checks if TimeConstraint containts no ElemConstraints.
Idx faudes::TimeConstraint::Size | ( | void | ) | const |
TimeConstraint::Iterator faudes::TimeConstraint::Insert | ( | const ElemConstraint & | rElemConstr | ) |
Adds an elementary clock constraint to the time constraint.
rElemConstr | Elementary clock constraint that is to be added to time constraint |
TimeConstraint::Iterator faudes::TimeConstraint::Insert | ( | const std::string | clockname, | |
Operator | op, | |||
const tpTime::Type | timeconst | |||
) |
Adds an elementary clock constraint to the time constraint.
clockname | Clock for new ElemConstraint | |
op | Operator for new ElemConstraint | |
timeconst | Time constant for new ElemConstraint |
TimeConstraint::Iterator faudes::TimeConstraint::Insert | ( | Idx | clockindex, | |
Operator | op, | |||
const tpTime::Type | timeconst | |||
) |
Adds an elementary clock constraint to the time constraint.
clockindex | Clock for new ElemConstraint | |
op | Operator for new ElemConstraint | |
timeconst | Time constant for new ElemConstraint |
void faudes::TimeConstraint::Insert | ( | const std::list< ElemConstraint > & | rNewConstraints | ) |
Adds a list of elementary clock constraints to the time constraint.
rNewConstraints | Set of elementary clock constraints that is to be added to time constraint. |
void faudes::TimeConstraint::Insert | ( | const TimeConstraint & | rOtherTimeConstraint | ) |
Adds elementary clock constraints from other TimeConstant to the time constraint.
rOtherTimeConstraint | Time constraint whos clock constraints are to be added to time constraint. |
TimeConstraint& faudes::TimeConstraint::operator<< | ( | const TimeConstraint & | rOtherTimeConstraint | ) | [inline] |
Convenience operator to combine a TimeConstraint with another TimeConstraint.
rOtherTimeConstraint | other TimeConstraint |
TimeConstraint& faudes::TimeConstraint::operator<< | ( | const ElemConstraint & | rElemConstr | ) | [inline] |
Convenience operator to combines a TimeConstraint with an elementary TimeConstraint.
rElemConstr | extra elemtary constraint |
std::set< ElemConstraint > faudes::TimeConstraint::ClockConstraints | ( | void | ) | const |
Returns copy of ClockConstraints.
Idx faudes::TimeConstraint::InsClock | ( | const std::string & | rClockName | ) | const |
Advertise clock to ClockSymbolTable and retrive index.
rClockName | symbolic name of clock |
std::string faudes::TimeConstraint::ClockName | ( | Idx | clockindex | ) | const |
Lookup clock name.
clockindex | index of clock |
Idx faudes::TimeConstraint::ClockIndex | ( | const std::string & | rClockName | ) | const |
Lookup clock index.
rClockName | Symbolic name of clock |
std::string faudes::TimeConstraint::EStr | ( | const ElemConstraint & | rElemConstr | ) | const |
Pretty printable string of elem.
constraint
rElemConstr | ref to elem constraint |
bool faudes::TimeConstraint::EraseByClock | ( | Idx | clock | ) |
Removes all elementary clock constraints refering to a specified clock.
clock | Clock whos constraints are to be removed. |
TimeConstraint::Iterator faudes::TimeConstraint::Erase | ( | Iterator | it | ) |
Calls std::set::erase(iterator).
ElemConstraint refered by it is removed from constraint.
it | TimeConstraint::Iterator pointing to ElemConstraint that is removed. |
bool faudes::TimeConstraint::Erase | ( | const ElemConstraint & | rElemConstr | ) |
Removes elementary clock constraint.
rElemConstr | Constraint to be removed. |
bool faudes::TimeConstraint::Erase | ( | const std::string & | rClockName, | |
Operator | op, | |||
const tpTime::Type | timeconst | |||
) |
Removes elementary clock constraint.
rClockName | Clock | |
op | Operator | |
timeconst | Time constant |
bool faudes::TimeConstraint::Erase | ( | Idx | clockindex, | |
Operator | op, | |||
const tpTime::Type | timeconst | |||
) |
Removes elementary clock constraint.
clockindex | Clock | |
op | Operator | |
timeconst | Time constant |
void faudes::TimeConstraint::Clear | ( | void | ) |
Clear all.
bool faudes::TimeConstraint::Exists | ( | const ElemConstraint & | rElemConstr | ) | const |
Checks if elementary clock constraint is contained in constraint.
rElemConstr | elementary constraint |
TimeConstraint::Iterator faudes::TimeConstraint::Begin | ( | void | ) | const |
TimeConstraint::Iterator faudes::TimeConstraint::End | ( | void | ) | const |
TimeConstraint::RIterator faudes::TimeConstraint::RBegin | ( | void | ) | const |
Reverse iterator that yields the ElemConstraints in reverse order starting at the last element and ending after the first.
See set<...>rbegin(void). Returns the "End".
TimeConstraint::RIterator faudes::TimeConstraint::REnd | ( | void | ) | const |
Reverse iterator that yields the ElemConstraints in reverse order starting at the last element and ending after the first.
See set<...>rend(void). Returns the "Begin".
TimeConstraint::Iterator faudes::TimeConstraint::Begin | ( | Idx | clock | ) | const |
TimeConstraint::Iterator faudes::TimeConstraint::End | ( | Idx | clock | ) | const |
ClockSet faudes::TimeConstraint::ActiveClocks | ( | void | ) | const |
Returns a Clockset containing all clocks used by the TimeConstraint.
TimeInterval faudes::TimeConstraint::Interval | ( | Idx | clockindex | ) | const |
TimeInterval faudes::TimeConstraint::Interval | ( | const std::string & | clockname | ) | const |
void faudes::TimeConstraint::Interval | ( | Idx | clockindex, | |
const TimeInterval & | rInterval | |||
) |
Given a clock and an interval, set up the constraint such that it is valid in the given interval.
clockindex | specifies the clock | |
rInterval | reference to time interval |
void faudes::TimeConstraint::Interval | ( | const std::string & | rClockName, | |
const TimeInterval & | rInterval | |||
) |
Given a clock and an interval, set up the constraint such that it is valid in the given interval.
rClockName | specifies the clock | |
rInterval | reference to time interval |
void faudes::TimeConstraint::Minimize | ( | void | ) |
Minimize by eliminating redundant elementary constraints.
The current implemantation retrieves the time constraints as intervals per clock and then converts back to a time constraint.
std::string faudes::TimeConstraint::mName [protected] |
My name.
std::set<ElemConstraint> faudes::TimeConstraint::mClockConstraints [protected] |
Set of elementary clock constraints.
SymbolTable* faudes::TimeConstraint::mpClockSymbolTable [protected] |
SymbolTable for clock names.
libFAUDES 2.13a c++ source docu by doxygen 1.5.6