SST/macro
waiter.h
Go to the documentation of this file.
1 /*
2  * This file is part of SST/macroscale:
3  * The macroscale architecture simulator from the SST suite.
4  * Copyright (c) 2009 Sandia Corporation.
5  * This software is distributed under the BSD License.
6  * Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
7  * the U.S. Government retains certain rights in this software.
8  * For more information, see the LICENSE file in the top
9  * SST/macroscale directory.
10  */
11 
12 #ifndef SSTMAC_SOFTWARE_PROCESS_WAITER_H_INCLUDED
13 #define SSTMAC_SOFTWARE_PROCESS_WAITER_H_INCLUDED
14 
15 #include <string>
16 
17 namespace sstmac {
18 namespace sw {
19 
20 /**
21  * The main interface for something that can wait in a certain way for an event that is important to it.
22  */
23 class waiter
24 {
25 
26  public:
27  virtual std::string
28  to_string() const {
29  return "waiter";
30  }
31 
32  virtual bool
33  is_blocking() const {
34  return false;
35  }
36 
37  virtual bool
38  is_callback() const {
39  return false;
40  }
41 
42  virtual
43  ~waiter() {}
44 
45  virtual void
46  wait() {}
47 
48 
49 };
50 
51 class callback_waiter : public waiter
52 {
53 
54  public:
55  bool
56  is_callback() const {
57  return true;
58  }
59 
60 
61 };
62 }
63 } // end of namespace sstmac
64 #endif
65 
virtual ~waiter()
Definition: waiter.h:43
virtual void wait()
Definition: waiter.h:46
bool is_callback() const
Definition: waiter.h:56
SUMI = Simulator unified messagine interface It is also the name for a solid ink in Japanese - i...
virtual bool is_blocking() const
Definition: waiter.h:33
virtual std::string to_string() const
Definition: waiter.h:28
virtual bool is_callback() const
Definition: waiter.h:38
The main interface for something that can wait in a certain way for an event that is important to it...
Definition: waiter.h:23