13 #ifndef FAUDES_TP_TIMECONSTRAINT_H
14 #define FAUDES_TP_TIMECONSTRAINT_H
67 ClockSet(
const std::string& rFilename,
const std::string& rLabel =
"Clocks");
87 virtual void DoAssign(
const ClockSet& rSourceSet);
97 virtual bool DoEqual(
const ClockSet& rOtherSet)
const;
133 typedef enum {
GreaterEqual, GreaterThan, LessThan, LessEqual} Operator;
138 static std::string OperatorName(Operator op);
180 Idx Clock(
void)
const;
188 void CompOperator(Operator newOp);
194 Operator CompOperator(
void)
const;
215 std::string Str(
void)
const;
225 bool operator== (
const ElemConstraint & otherElemConstraint)
const;
235 bool operator!= (
const ElemConstraint & otherElemConstraint)
const;
246 bool operator < (
const ElemConstraint& otherElemConstraint)
const;
281 typedef std::set<ElemConstraint>::const_iterator
Iterator;
284 typedef std::set<ElemConstraint>::const_reverse_iterator
RIterator;
312 TimeConstraint(
const std::string& rFilename,
const std::string& rLabel =
"TimeConstraint");
338 void Write(
void)
const;
354 void Write(
const std::string& rFileName,
const std::string& rLabel =
"TimeConstraint",
355 std::ios::openmode openmode = std::ios::out|std::ios::trunc)
const;
381 void Write(
TokenWriter& tw,
const std::string& rLabel)
const;
389 std::string ToString(
void)
const;
394 void DWrite(
void)
const;
418 void Read(
const std::string& rFileName,
const std::string& rLabel =
"TimeConstraint");
433 void Read(
TokenReader& tr,
const std::string& rLabel =
"TimeConstraint");
442 std::string
Name(
void)
const {
return mName;};
450 void Name(
const std::string& rName) { mName=rName; };
459 bool Empty(
void)
const;
466 Idx Size(
void)
const;
490 Iterator Insert(
const std::string clockname, Operator op,
const Time::Type timeconst);
504 Iterator Insert(
Idx clockindex, Operator op,
const Time::Type timeconst);
512 void Insert(
const std::list<ElemConstraint>& rNewConstraints);
531 this->Insert(rOtherTimeConstraint);
return *
this; };
542 this->Insert(rElemConstr);
return *
this; };
547 std::set<ElemConstraint> ClockConstraints(
void)
const;
558 Idx InsClock(
const std::string& rClockName)
const;
569 std::string ClockName(
Idx clockindex)
const;
580 Idx ClockIndex(
const std::string& rClockName)
const;
601 bool EraseByClock(
Idx clock);
612 Iterator Erase(Iterator it);
636 bool Erase(
const std::string& rClockName, Operator op,
const Time::Type timeconst);
650 bool Erase(
Idx clockindex, Operator op,
const Time::Type timeconst);
672 Iterator Begin(
void)
const;
680 Iterator End(
void)
const;
690 RIterator RBegin(
void)
const;
700 RIterator REnd(
void)
const;
708 Iterator Begin(
Idx clock)
const;
716 Iterator End(
Idx clock)
const;
740 TimeInterval Interval(
const std::string& clockname)
const;
763 void Interval(
const std::string& rClockName,
const TimeInterval& rInterval);
807 typedef std::set<ElemConstraint>::iterator
iterator;
#define FAUDES_TYPE_DECLARATION(ftype, ctype, cbase)
faudes type declaration macro
Container class to model a set of clocks.
Model of an elementary clock constraint formula.
Operator
Typedef for comparison operators in elementary clock constraints.
Time::Type mTimeConstant
Time constant to compare with clock value.
Operator mCompOperator
Comparative operator.
Idx mClockIndex
Index of clock.
Set of indices with symbolic names.
A SymbolTable associates sybolic names with indices.
A TimeConstraint is a set of elementary clock constraints.
void Name(const std::string &rName)
Set name of Constraint.
std::set< ElemConstraint >::const_iterator Iterator
Iterator to access ElemConstraints.
std::set< ElemConstraint > mClockConstraints
Set of elementary clock constraints.
ElemConstraint::Operator Operator
Convenience typedef for operators.
std::set< ElemConstraint >::const_reverse_iterator RIterator
Reverse iterator to access ElemConstraints.
std::string Name(void) const
Return name of Constraint.
SymbolTable * mpClockSymbolTable
SymbolTable for clock names.
std::set< ElemConstraint >::iterator iterator
nonconst iterator to access ElemConstraints
std::string mName
My name.
Model of a time interval.
Int Type
Datatype for point on time axis.
A TokenReader reads sequential tokens from a file or string.
A TokenWriter writes sequential tokens to a file, a string or stdout.
Includes all libFAUDES headers, no plugins.
libFAUDES resides within the namespace faudes.
uint32_t Idx
Type definition for index type (allways 32bit)