diff options
author | Mike Buland <eichlan@xagasoft.com> | 2012-04-06 06:16:33 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2012-04-06 06:16:33 +0000 |
commit | fba73219e3c7bf65b459a3303f579fd83c8fd0af (patch) | |
tree | 7de25030a1ef0e5899da243c2fb5c0e4900c0a49 /src/list.cpp | |
parent | b01618b1be4831d30dbf8706a48e71c62d617b99 (diff) | |
download | libgats-fba73219e3c7bf65b459a3303f579fd83c8fd0af.tar.gz libgats-fba73219e3c7bf65b459a3303f579fd83c8fd0af.tar.bz2 libgats-fba73219e3c7bf65b459a3303f579fd83c8fd0af.tar.xz libgats-fba73219e3c7bf65b459a3303f579fd83c8fd0af.zip |
Everything supports clone now.
Diffstat (limited to 'src/list.cpp')
-rw-r--r-- | src/list.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/list.cpp b/src/list.cpp index d15f3b9..d081a22 100644 --- a/src/list.cpp +++ b/src/list.cpp | |||
@@ -21,6 +21,16 @@ Gats::List::~List() | |||
21 | } | 21 | } |
22 | } | 22 | } |
23 | 23 | ||
24 | Gats::Object *Gats::List::clone() const | ||
25 | { | ||
26 | Gats::List *pClone = new Gats::List; | ||
27 | for( const_iterator i = begin(); i; i++ ) | ||
28 | { | ||
29 | pClone->append( (*i)->clone() ); | ||
30 | } | ||
31 | return pClone; | ||
32 | } | ||
33 | |||
24 | void Gats::List::write( Bu::Stream &rOut ) const | 34 | void Gats::List::write( Bu::Stream &rOut ) const |
25 | { | 35 | { |
26 | rOut.write("l", 1 ); | 36 | rOut.write("l", 1 ); |