summaryrefslogtreecommitdiff
path: root/name.cpp
blob: 56e73a2b72f44293f396f8f91aae9a585545ef7f (plain)
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
50
51
52
53
54
// class name implementation.

#ifndef NAME_CXX
#define NAME_CXX

#include "name.h"
#include "MUTX.h"

using namespace std;

name::name( string s_name )
{
#ifdef VERBOSE_
 pthread_mutex_lock  ( &MUTX::get().mut_stdout );
 cout << "name::name( \"" << s_name << "\" )" << endl;
 pthread_mutex_unlock( &MUTX::get().mut_stdout );
#endif

 set_name( s_name );
}

name::~name()
{
#ifdef VERBOSE_
 pthread_mutex_lock  ( &MUTX::get().mut_stdout );
 cout << "name::~name[ " << s_name << " ]" << endl;
 pthread_mutex_unlock( &MUTX::get().mut_stdout );
#endif
}

string
name::get_name() const
{
#ifdef VERBOSE_
 pthread_mutex_lock  ( &MUTX::get().mut_stdout );
 cout << "name::get_name()" << endl;
 pthread_mutex_unlock( &MUTX::get().mut_stdout );
#endif

 return s_name;
}

void
name::set_name( string s_name )
{
#ifdef VERBOSE_
 pthread_mutex_lock  ( &MUTX::get().mut_stdout );
 cout << "name::set_name( \"" << s_name << "\" )" << endl;
 pthread_mutex_unlock( &MUTX::get().mut_stdout );
#endif

 this->s_name = s_name;
}
#endif