ThePEG
1.8.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
Utilities
Named.h
1
// -*- C++ -*-
2
//
3
// Named.h is a part of ThePEG - Toolkit for HEP Event Generation
4
// Copyright (C) 1999-2011 Leif Lonnblad
5
//
6
// ThePEG is licenced under version 2 of the GPL, see COPYING for details.
7
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
8
//
9
#ifndef ThePEG_Named_H
10
#define ThePEG_Named_H
11
// This is the declaration of the Named class.
12
13
14
#include <string>
15
16
namespace
ThePEG {
17
24
class
Named
{
25
26
public
:
27
31
Named
(
const
string
& newName =
string
())
32
:
theName
(newName) {}
33
37
const
string
&
name
()
const
{
return
theName
; }
38
42
bool
operator ==
(
const
Named
& other)
const
43
{
44
return
theName
== other.
name
();
45
}
46
50
bool
operator <
(
const
Named
& other)
const
51
{
52
return
theName
< other.
name
();
53
}
54
55
protected
:
56
60
const
Named
&
operator =
(
const
Named
& other)
61
{
62
if
(
this
!= &other)
63
theName
= other.
name
();
64
return
*
this
;
65
}
66
70
const
string
&
name
(
const
string
& newName)
71
{
72
return
theName
= newName;
73
}
74
75
private
:
76
80
string
theName
;
81
82
};
83
84
}
85
86
#endif
/* ThePEG_Named_H */
Generated on Sat Jun 16 2012 16:51:04 for ThePEG by
1.8.1.1