Fawkes API  Fawkes Development Version
syncpoint_call.h
1 /***************************************************************************
2  * syncpoint_call.h - Utility class to represent a call to a SyncPoint
3  *
4  * Created: Fri Aug 15 18:12:42 2014
5  * Copyright 2014 Till Hofmann
6  *
7  ****************************************************************************/
8 
9 /* This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU Library General Public License for more details.
18  *
19  * Read the full text in the LICENSE.GPL file in the doc directory.
20  */
21 
22 #ifndef _SYNCPOINT_SYNCPOINT_CALL_H_
23 #define _SYNCPOINT_SYNCPOINT_CALL_H_
24 
25 #include <utils/time/time.h>
26 
27 #include <string>
28 
29 namespace fawkes {
30 
32 {
33 public:
34  SyncPointCall(const std::string &caller, Time call_time = Time(), Time wait_time = Time(0.f));
35 
36 public:
37  Time get_call_time() const;
38  Time get_wait_time() const;
39  std::string get_caller() const;
40 
41 private:
42  const std::string caller_;
43  const Time call_time_;
44  const Time wait_time_;
45 };
46 
47 } // namespace fawkes
48 
49 #endif
Fawkes library namespace.
A call (wait() or emit()) to a SyncPoint.
A class for handling time.
Definition: time.h:92
Time get_call_time() const
Get the time when the call was made.
std::string get_caller() const
Get the name of the component which made the call.
SyncPointCall(const std::string &caller, Time call_time=Time(), Time wait_time=Time(0.f))
Constructor.
Time get_wait_time() const
Get the wait time.