PetaVision
Alpha
Main Page
Data Structures
BaseMessage.hpp
1
/*
2
* BaseMessage.hpp
3
*
4
* Created on: Aug 1, 2016
5
* Author: pschultz
6
*
7
* The base class for messages passed using Subject::notify and
8
* Observer::respond.
9
*/
10
11
#ifndef BASEMESSAGE_HPP_
12
#define BASEMESSAGE_HPP_
13
14
#include <string>
15
16
namespace
PV
{
17
18
class
BaseMessage
{
19
public
:
20
BaseMessage
() {}
21
virtual
~
BaseMessage
() {}
22
inline
std::string
const
&getMessageType()
const
{
return
mMessageType; }
23
24
protected
:
25
inline
void
setMessageType(std::string
const
&messageType) { mMessageType = messageType; }
26
inline
void
setMessageType(
char
const
*messageType) { mMessageType = messageType; }
27
28
private
:
29
std::string mMessageType =
""
;
30
};
31
32
}
// namespace PV
33
34
#endif
/* BASEMESSAGE_HPP_ */
PV::BaseMessage
Definition:
BaseMessage.hpp:18
PV
Definition:
CheckpointableFileStream.cpp:3
OpenPV
src
observerpattern
BaseMessage.hpp
Generated by
1.8.11