From fba73219e3c7bf65b459a3303f579fd83c8fd0af Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Fri, 6 Apr 2012 06:16:33 +0000 Subject: Everything supports clone now. --- src/list.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/list.cpp') 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() } } +Gats::Object *Gats::List::clone() const +{ + Gats::List *pClone = new Gats::List; + for( const_iterator i = begin(); i; i++ ) + { + pClone->append( (*i)->clone() ); + } + return pClone; +} + void Gats::List::write( Bu::Stream &rOut ) const { rOut.write("l", 1 ); -- cgit v1.2.3