LRDE Tiger Compiler
1.34a $Id: 7fef12e1f5fa43449d667a0eec1d837c40fc1202 $
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
unique.hxx
Go to the documentation of this file.
1
6
#ifndef MISC_UNIQUE_HXX
7
# define MISC_UNIQUE_HXX
8
9
# include <
misc/unique.hh
>
10
# include <
misc/contract.hh
>
11
12
namespace
misc
13
{
14
// FIXME: Some code was deleted here.
15
16
template
<
typename
T,
class
C>
17
inline
typename
unique<T, C>::value_type&
18
unique<T, C>::operator=
(
const
value_type
& rhs)
19
{
20
if
(
this
!= &rhs)
21
obj_ = rhs.
obj_
;
22
return
*
this
;
23
}
24
25
template
<
typename
T,
class
C>
26
inline
bool
27
unique<T, C>::operator==
(
const
value_type
& rhs)
const
28
{
29
return
obj_ == rhs.
obj_
;
30
}
31
32
template
<
typename
T,
class
C>
33
inline
bool
34
unique<T, C>::operator!=
(
const
value_type
& rhs)
const
35
{
36
return
!
operator==
(rhs);
37
}
38
39
template
<
typename
T,
class
C>
40
inline
bool
41
unique<T, C>::operator<
(
const
value_type
& rhs)
const
42
{
43
C cmp;
44
assertion
(obj_);
45
assertion
(rhs.
obj_
);
46
return
cmp(*obj_, *rhs.
obj_
);
47
}
48
49
template
<
typename
T,
class
C>
50
inline
std::ostream&
51
operator<<(std::ostream& ostr, const unique<T, C>& the)
52
{
53
return
ostr << the.object_get();
54
}
55
56
}
57
58
#endif // !MISC_UNIQUE_HXX
misc
unique.hxx
Generated on Wed Mar 5 2014 15:47:36 for LRDE Tiger Compiler by
1.8.1.2