SST/macro
illustration.h
Go to the documentation of this file.
1 #ifndef tutorials_programming_illustration_h
2 #define tutorials_programming_illustration_h
3 
4 #include <sprockit/ptr_type.h>
5 
6 namespace sstmac {
7 namespace tutorial {
8 
9 /**
10 * @brief Basic class structure tutorial
11 * @class illustration
12 */
13 class illustration :
14  public sprockit::ptr_type
15 {
16  /** Public typedefs */
17  public:
20 
21 
22  /** Public functions and constructors */
23  public:
24  std::string
25  to_string() const {
26  return "message class";
27  }
28 
29  illustration(const std::string& msg)
30  : message_(msg) {
31  }
32 
33  void
35  std::cout << message_ << std::endl;
36  }
37 
38  std::string
39  message() const {
40  return message_;
41  }
42 
43  void
44  set_message(const std::string& msg) {
45  message_ = msg;
46  }
47 
48  /** Member variables */
49  protected:
50  std::string message_;
51 
52 };
53 
54 }
55 }
56 
57 #endif
58 
std::string message_
Member variables.
Definition: illustration.h:50
sprockit::refcount_ptr< illustration > ptr
Public typedefs.
Definition: illustration.h:18
std::string to_string() const
Public functions and constructors.
Definition: illustration.h:25
sprockit::refcount_ptr< const illustration > const_ptr
Definition: illustration.h:19
void set_message(const std::string &msg)
Definition: illustration.h:44
SUMI = Simulator unified messagine interface It is also the name for a solid ink in Japanese - i...
std::string message() const
Definition: illustration.h:39
illustration(const std::string &msg)
Definition: illustration.h:29
Basic class structure tutorial.
Definition: illustration.h:13