-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathagent.cc
More file actions
49 lines (31 loc) · 1.18 KB
/
agent.cc
File metadata and controls
49 lines (31 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// Time-stamp: <2016-02-28 22:29:31 daniel>
//
// agent.cc: Member functions for the class parsec::agent_t
//
// Required header files
//-----------------------------------------------------------------------------
#include <string> // std::string
#include "agent.hh" // parsec::agent_t
// Namespace shorthand
//-----------------------------------------------------------------------------
using namespace std; // standard library
using namespace parsec; // project NS
// Constructor
//-----------------------------------------------------------------------------
agent_t::agent_t( const char* id ) : id_( id ) {
}; // end constructor
// destructor
//-----------------------------------------------------------------------------
agent_t::~agent_t( ) {
}; // end destructor
// Return the name of this agent
//-----------------------------------------------------------------------------
const string& agent_t::id() const {
return id_;
}; // end id
// dump the name of the agent
//-----------------------------------------------------------------------------
ostream& parsec::operator<<( ostream& out, const agent_t& agent ) {
out << agent.id_;
return out;
}; // end operator<<