13 #ifndef FAUDES_TP_TIMECONSTRAINT_H
14 #define FAUDES_TP_TIMECONSTRAINT_H
67 ClockSet(
const std::string& rFilename,
const std::string& rLabel =
"Clocks");
85 virtual void DoAssign(
const ClockSet& rSourceSet);
95 virtual bool DoEqual(
const ClockSet& rOtherSet)
const;
131 typedef enum {
GreaterEqual, GreaterThan, LessThan, LessEqual} Operator;
136 static std::string OperatorName(Operator op);
178 Idx Clock(
void)
const;
186 void CompOperator(Operator newOp);
192 Operator CompOperator(
void)
const;
213 std::string Str(
void)
const;
223 bool operator== (
const ElemConstraint & otherElemConstraint)
const;
233 bool operator!= (
const ElemConstraint & otherElemConstraint)
const;
244 bool operator < (
const ElemConstraint& otherElemConstraint)
const;
279 typedef std::set<ElemConstraint>::const_iterator
Iterator;
282 typedef std::set<ElemConstraint>::const_reverse_iterator
RIterator;
310 TimeConstraint(
const std::string& rFilename,
const std::string& rLabel =
"TimeConstraint");
336 void Write(
void)
const;
352 void Write(
const std::string& rFileName,
const std::string& rLabel =
"TimeConstraint",
353 std::ios::openmode openmode = std::ios::out|std::ios::trunc)
const;
379 void Write(
TokenWriter& tw,
const std::string& rLabel)
const;
387 std::string ToString(
void)
const;
392 void DWrite(
void)
const;
416 void Read(
const std::string& rFileName,
const std::string& rLabel =
"TimeConstraint");
431 void Read(
TokenReader& tr,
const std::string& rLabel =
"TimeConstraint");
440 std::string
Name(
void)
const {
return mName;};
448 void Name(
const std::string& rName) { mName=rName; };
457 bool Empty(
void)
const;
464 Idx Size(
void)
const;
488 Iterator Insert(
const std::string clockname, Operator op,
const Time::Type timeconst);
502 Iterator Insert(
Idx clockindex, Operator op,
const Time::Type timeconst);
510 void Insert(
const std::list<ElemConstraint>& rNewConstraints);
529 this->Insert(rOtherTimeConstraint);
return *
this; };
540 this->Insert(rElemConstr);
return *
this; };
545 std::set<ElemConstraint> ClockConstraints(
void)
const;
556 Idx InsClock(
const std::string& rClockName)
const;
567 std::string ClockName(
Idx clockindex)
const;
578 Idx ClockIndex(
const std::string& rClockName)
const;
599 bool EraseByClock(
Idx clock);
610 Iterator Erase(Iterator it);
634 bool Erase(
const std::string& rClockName, Operator op,
const Time::Type timeconst);
648 bool Erase(
Idx clockindex, Operator op,
const Time::Type timeconst);
670 Iterator Begin(
void)
const;
678 Iterator End(
void)
const;
688 RIterator RBegin(
void)
const;
698 RIterator REnd(
void)
const;
706 Iterator Begin(
Idx clock)
const;
714 Iterator End(
Idx clock)
const;
738 TimeInterval Interval(
const std::string& clockname)
const;
761 void Interval(
const std::string& rClockName,
const TimeInterval& rInterval);
805 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)