aboutsummaryrefslogtreecommitdiff
path: root/src/list.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2012-04-06 06:16:33 +0000
committerMike Buland <eichlan@xagasoft.com>2012-04-06 06:16:33 +0000
commitfba73219e3c7bf65b459a3303f579fd83c8fd0af (patch)
tree7de25030a1ef0e5899da243c2fb5c0e4900c0a49 /src/list.cpp
parentb01618b1be4831d30dbf8706a48e71c62d617b99 (diff)
downloadlibgats-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.cpp10
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
24Gats::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
24void Gats::List::write( Bu::Stream &rOut ) const 34void Gats::List::write( Bu::Stream &rOut ) const
25{ 35{
26 rOut.write("l", 1 ); 36 rOut.write("l", 1 );