Flow123d
jenkins-Flow123d-windows32-release-multijob-51
|
Class used for marking specified times at which some events occur. More...
#include <time_marks.hh>
Public Types | |
typedef unsigned long int | Type |
Public Member Functions | |
TimeMark (double time, Type type) | |
Type | mark_type () const |
Getter for mark type. More... | |
double | time () const |
Getter for the time of the TimeMark. More... | |
bool | match_mask (const TimeMark::Type &mask) const |
void | add_to_type (const TimeMark::Type &type) |
bool | operator< (const TimeMark &another) const |
Static Public Attributes | |
static const Type | every_type = ~0x0 |
Mask that matches every type of TimeMark. More... | |
static const Type | none_type = 0x0 |
Mask that matches no type of TimeMark. More... | |
Private Attributes | |
double | time_ |
The marked time. More... | |
Type | mark_type_ |
The type of the TimeMark. More... | |
Class used for marking specified times at which some events occur.
This class represents one record in the TimeMarks simple database. Class members can not be modified after the item is created.
Definition at line 44 of file time_marks.hh.
typedef unsigned long int TimeMark::Type |
MarkType is a bitmap where each bit represents one base type such as (Output, Input, BC change, Fixed...) This allow more complex queries through bitwise operations. Also one TimeMark can be shared by more events. In the context of TimeMarks the Type can be either fixed or vague. If a TimeGovernor is connected to the TimeMarks object the TimeMarks with fixed Type are used to match exactly their times. Base Types should be created/obtained from TimeMarks class through the TimeMarks::new_mark_type method. There are three Types predefined in TimeMarks constructor:
Definition at line 59 of file time_marks.hh.
|
inline |
Constructor for a TimeMarks::Mark
time | time of the mark |
type | type of the mark |
In order to create a fixed TimeMark (at time=0.1) with base TimeMark::Type my_type, use the TimeMarks class: TimeMark( 0.1, timemarks.type_fixed_time() | my_type)
Definition at line 74 of file time_marks.hh.
|
inline |
Add more bits that a mark satisfies.
type | type that should be modified |
Definition at line 99 of file time_marks.hh.
|
inline |
Getter for mark type.
Definition at line 79 of file time_marks.hh.
|
inline |
Returns true if TimeMark's type has 1 on all positions where mask has 1.
mask | {Select bits that should be 1 for matching mark types. |
Definition at line 93 of file time_marks.hh.
|
inline |
Comparison of time marks according to their time.
another | is another Timemark which should be compared. |
Definition at line 105 of file time_marks.hh.
|
inline |
Getter for the time of the TimeMark.
Definition at line 84 of file time_marks.hh.
|
static |
Mask that matches every type of TimeMark.
Definition at line 62 of file time_marks.hh.
|
private |
The type of the TimeMark.
Definition at line 113 of file time_marks.hh.
|
static |
Mask that matches no type of TimeMark.
Definition at line 64 of file time_marks.hh.
|
private |
The marked time.
Definition at line 111 of file time_marks.hh.