pingus-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pingus-CVS] CVS: Games/Pingus/src entrance_data.cxx,1.2,1.3 exit_data.c


From: grumbel
Subject: [Pingus-CVS] CVS: Games/Pingus/src entrance_data.cxx,1.2,1.3 exit_data.cxx,1.2,1.3 groundpiece_data.cxx,1.4,1.5 groundpiece_data.hxx,1.8,1.9 hotspot_data.cxx,1.2,1.3 liquid_data.cxx,1.3,1.4 liquid_data.hxx,1.4,1.5 trap_data.cxx,1.2,1.3 trap_data.hxx,1.4,1.5 weather_data.cxx,1.1,1.2 weather_data.hxx,1.2,1.3 worldobj_data.hxx,1.3,1.4 worldobj_group_data.cxx,1.5,1.6
Date: 2 Jul 2002 10:42:41 -0000

Update of /usr/local/cvsroot/Games/Pingus/src
In directory dark:/tmp/cvs-serv9717

Modified Files:
        entrance_data.cxx exit_data.cxx groundpiece_data.cxx 
        groundpiece_data.hxx hotspot_data.cxx liquid_data.cxx 
        liquid_data.hxx trap_data.cxx trap_data.hxx weather_data.cxx 
        weather_data.hxx worldobj_data.hxx worldobj_group_data.cxx 
Log Message:
replaced std::list<shared_ptr> with std::vector<EditorObj*>

Index: entrance_data.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/entrance_data.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- entrance_data.cxx   25 Jun 2002 12:20:31 -0000      1.2
+++ entrance_data.cxx   2 Jul 2002 10:42:38 -0000       1.3
@@ -128,7 +128,7 @@
 EntranceData::create_EditorObj()
 {
   EditorObjLst lst;
-  lst.push_back (boost::shared_ptr<EditorObj> (new EntranceObj (*this)));
+  lst.push_back (new EntranceObj (*this));
   return lst;
 }
 

Index: exit_data.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/exit_data.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- exit_data.cxx       25 Jun 2002 12:20:31 -0000      1.2
+++ exit_data.cxx       2 Jul 2002 10:42:38 -0000       1.3
@@ -95,7 +95,7 @@
 ExitData::create_EditorObj()
 {
   EditorObjLst lst;
-  lst.push_back (boost::shared_ptr<EditorObj> (new ExitObj (*this)));
+  lst.push_back (new ExitObj (*this));
   return lst;
 }
 

Index: groundpiece_data.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/groundpiece_data.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- groundpiece_data.cxx        25 Jun 2002 12:20:31 -0000      1.4
+++ groundpiece_data.cxx        2 Jul 2002 10:42:38 -0000       1.5
@@ -118,11 +118,11 @@
   }
 
 
-std::list<boost::shared_ptr<EditorObj> >
+EditorObjLst
 GroundpieceData::create_EditorObj()
 {
-  std::list<boost::shared_ptr<EditorObj> > lst;
-  lst.push_back(boost::shared_ptr<EditorObj>(new EditorGroundpieceObj(*this)));
+  EditorObjLst lst;
+  lst.push_back(new EditorGroundpieceObj(*this));
   return lst;
 }
 

Index: groundpiece_data.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/groundpiece_data.hxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- groundpiece_data.hxx        26 Jun 2002 11:23:54 -0000      1.8
+++ groundpiece_data.hxx        2 Jul 2002 10:42:38 -0000       1.9
@@ -25,6 +25,7 @@
 #include <ClanLib/Display/Display/surface.h>
 #include "libxmlfwd.hxx"
 #include "res_descriptor.hxx"
+#include "worldobj_data.hxx"
 
 class EditorObj;
 
@@ -61,7 +62,7 @@
   GroundpieceData ();
   GroundpieceData (xmlDocPtr doc, xmlNodePtr cur);
 
-  std::list<boost::shared_ptr<EditorObj> > create_EditorObj();
+  EditorObjLst create_EditorObj();
   void write_xml(std::ostream& xml);
 
   static GPType string_to_type(const std::string& arg_type);

Index: hotspot_data.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/hotspot_data.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- hotspot_data.cxx    25 Jun 2002 12:20:31 -0000      1.2
+++ hotspot_data.cxx    2 Jul 2002 10:42:38 -0000       1.3
@@ -79,7 +79,7 @@
 HotspotData::create_EditorObj()
 {
   EditorObjLst lst;
-  lst.push_back (boost::shared_ptr<EditorObj> (new EditorHotspot (*this)));
+  lst.push_back (new EditorHotspot (*this)) ;
   return lst;
 }
 

Index: liquid_data.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/liquid_data.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- liquid_data.cxx     25 Jun 2002 12:20:31 -0000      1.3
+++ liquid_data.cxx     2 Jul 2002 10:42:38 -0000       1.4
@@ -91,7 +91,7 @@
 { 
   std::cout << "LiquidData::create_EditorObj ()" << std::endl;
   EditorObjLst lst; 
-  lst.push_back (boost::shared_ptr<EditorObj>(new LiquidObj (*this)));
+  lst.push_back (new LiquidObj (*this));
   return lst;
 }
 

Index: liquid_data.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/liquid_data.hxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- liquid_data.hxx     25 Jun 2002 12:20:31 -0000      1.4
+++ liquid_data.hxx     2 Jul 2002 10:42:38 -0000       1.5
@@ -63,7 +63,7 @@
   WorldObj* create_WorldObj ();
 
   /** Create an EditorObj from the given data object */
-  std::list<boost::shared_ptr<EditorObj> > create_EditorObj ();
+  EditorObjLst create_EditorObj ();
 };
 
 #endif

Index: trap_data.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/trap_data.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- trap_data.cxx       25 Jun 2002 12:20:31 -0000      1.2
+++ trap_data.cxx       2 Jul 2002 10:42:38 -0000       1.3
@@ -96,7 +96,7 @@
 TrapData::create_EditorObj () 
 { 
   EditorObjLst lst; 
-  lst.push_back(boost::shared_ptr<EditorObj> (new TrapObj(*this)));
+  lst.push_back(new TrapObj(*this));
   return lst;
 }
 

Index: trap_data.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/trap_data.hxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- trap_data.hxx       25 Jun 2002 12:20:31 -0000      1.4
+++ trap_data.hxx       2 Jul 2002 10:42:38 -0000       1.5
@@ -54,7 +54,7 @@
   WorldObj* create_WorldObj ();
 
   /** Create an EditorObj from the given data object */
-  std::list<boost::shared_ptr<EditorObj> > create_EditorObj ();
+  EditorObjLst create_EditorObj ();
 };
 
 #endif

Index: weather_data.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/weather_data.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- weather_data.cxx    12 Jun 2002 19:09:38 -0000      1.1
+++ weather_data.cxx    2 Jul 2002 10:42:38 -0000       1.2
@@ -17,15 +17,16 @@
 //  along with this program; if not, write to the Free Software
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
+#include <iostream>
 #include "editor/editorobj.hxx"
 #include "weather_data.hxx"
 #include "boost/smart_ptr.hpp"
 
-std::list<boost::shared_ptr<EditorObj> > 
+EditorObjLst
 WeatherData::create_EditorObj ()
 {
-  std::list<boost::shared_ptr<EditorObj> > lst;
-  // FIXME: Not implemented
+  EditorObjLst lst;
+  std::cout << "WeatherData::create_EditorObj ():  FIXME: Not implemented" << 
std::endl;
   return lst;
 }
 

Index: weather_data.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/weather_data.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- weather_data.hxx    24 Jun 2002 22:52:57 -0000      1.2
+++ weather_data.hxx    2 Jul 2002 10:42:38 -0000       1.3
@@ -21,7 +21,7 @@
 #define HEADER_PINGUS_WEATHER_DATA_HXX
 
 #include <string>
-#include <list>
+#include "worldobj_data.hxx"
 
 class EditorObj;
 
@@ -37,7 +37,7 @@
 public:
   std::string type;
 
-  std::list<boost::shared_ptr<EditorObj> > create_EditorObj ();
+  EditorObjLst create_EditorObj ();
 };
 
 #endif

Index: worldobj_data.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobj_data.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- worldobj_data.hxx   25 Jun 2002 12:20:31 -0000      1.3
+++ worldobj_data.hxx   2 Jul 2002 10:42:38 -0000       1.4
@@ -20,7 +20,7 @@
 #ifndef HEADER_PINGUS_WORLDOBJ_DATA_HXX
 #define HEADER_PINGUS_WORLDOBJ_DATA_HXX
 
-#include <list>
+#include <vector>
 
 #include "editor/editorobj.hxx"
 
@@ -31,7 +31,7 @@
   template <class T> class shared_ptr;
 }
 
-typedef std::list<boost::shared_ptr<EditorObj> > EditorObjLst;
+typedef std::vector<EditorObj*> EditorObjLst;
 
 /** The root data class for all objects in the Pingus world.  Each
     objects needs a data object for creating, which should be
@@ -53,7 +53,8 @@
   /** Create an WorldObj from the given data object */
   virtual WorldObj* create_WorldObj () =0;
 
-  /** Create an EditorObj from the given data object */
+  /** Create an EditorObj from the given data object, caller is
+      responible for deleting the pointers in the vector */
   virtual EditorObjLst create_EditorObj () =0;
 };
 

Index: worldobj_group_data.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobj_group_data.cxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- worldobj_group_data.cxx     1 Jul 2002 18:36:39 -0000       1.5
+++ worldobj_group_data.cxx     2 Jul 2002 10:42:38 -0000       1.6
@@ -125,14 +125,14 @@
 {
   EditorObjLst lst;
   EditorObjGroup* group = new EditorObjGroup();
-  lst.push_back (boost::shared_ptr<EditorObj>(group));
+  lst.push_back (group);
   
   for (ObjsIter i = objs.begin (); i != objs.end (); ++i)
     {
       EditorObjLst sublst ((*i)->create_EditorObj ());
       for (EditorObjLstIter j = sublst.begin (); j != sublst.end (); ++j)
        {
-         group->add (j->get ());
+         group->add (*j);
        }
     }
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]