Mercurial > illumos > onarm
annotate usr/src/cmd/man/src/util/nsgmls.src/include/CopyOwner.cxx @ 4:1a15d5aaf794
synchronized with onnv_86 (6202) in onnv-gate
author | Koji Uno <koji.uno@sun.com> |
---|---|
date | Mon, 31 Aug 2009 14:38:03 +0900 |
parents | c9caec207d52 |
children |
rev | line source |
---|---|
0 | 1 // Copyright (c) 1994 James Clark |
2 // See the file COPYING for copying permission. | |
4
1a15d5aaf794
synchronized with onnv_86 (6202) in onnv-gate
Koji Uno <koji.uno@sun.com>
parents:
0
diff
changeset
|
3 #pragma ident "%Z%%M% %I% %E% SMI" |
0 | 4 |
5 #ifndef CopyOwner_DEF_INCLUDED | |
6 #define CopyOwner_DEF_INCLUDED 1 | |
7 | |
8 #ifdef SP_NAMESPACE | |
9 namespace SP_NAMESPACE { | |
10 #endif | |
11 | |
12 template<class T> | |
13 CopyOwner<T>::CopyOwner(const CopyOwner<T> &o) | |
14 : Owner<T>(o.pointer() ? o.pointer()->copy() : 0) | |
15 { | |
16 } | |
17 | |
18 template<class T> | |
19 void CopyOwner<T>::operator=(const CopyOwner<T> &o) | |
20 { | |
21 Owner<T>::operator=(o.pointer() ? o.pointer()->copy() : 0); | |
22 } | |
23 | |
24 #ifdef SP_NAMESPACE | |
25 } | |
26 #endif | |
27 | |
28 #endif /* not CopyOwner_DEF_INCLUDED */ |