object_instance_list.h

Go to the documentation of this file.
00001 //
00002 // yet more classes! stuart meikle 
00003 // Fri Jul  7 10:50:46 2000
00004 //
00005 
00006 
00007 #ifndef OBJECT_INSTANCE_LIST_H
00008 #define OBJECT_INSTANCE_LIST_H
00009 
00010 #include <boost/shared_ptr.hpp>
00011 #include <list>
00012 #include "object.h"
00013 #include "coordinate_xform.h"
00014 
00015 namespace mimas {
00027 class object_instance_list : public object
00028 {
00029     //NB: because this is an object too we can have lists of lists!
00030 
00031     //this only really makes sense w.r.t. some other fixed co-ordinate system
00032     //eg the global gui co-ordinate system or something.
00033     private:
00034         object_ptr o;
00035         coordinate_xform_ptr_list locations;
00036     
00037     public:
00038   object_instance_list(void)
00039   {
00040      // o=NULL;
00041 
00042   }
00043 //  ~object_instance_list(void)
00044 //  {
00045 //        coordinate_xform_ptr_list::iterator it;
00046   
00047 //      for(it = locations.begin(); it != locations.end(); it++)
00048 //      {
00049 //    delete (*it);
00050     
00051 //    #ifdef MODS
00052 //       cout << "@STU -> check that ~object_inst_list can delete lists of lists" << std::endl;
00053 //    #endif
00054 //      }
00055 //  }
00056   
00057   void  setObject( object_ptr ob ) { o=ob; }
00058   object_ptr getObject(void)
00059     { return o; }
00060   
00061   bool  empty(void)
00062     { return locations.empty(); }
00063    coordinate_xform_ptr_list& getList(void) 
00064     { return locations; }
00065   void  push_back( coordinate_xform_ptr m )
00066     { locations.push_back(m); }
00067 };
00068 
00069 typedef boost::shared_ptr< object_instance_list > object_instance_list_ptr;
00070 
00071 }
00072 
00073 #endif
00074 

[GNU/Linux] [Qt] [Mesa] [STL] [Lapack] [Boost] [Magick++] [Xalan-C and Xerces-C] [doxygen] [graphviz] [FFTW] [popt] [xine] [Gnuplot] [gnu-arch] [gcc] [gstreamer] [autoconf/automake/make] [freshmeat.net] [opensource.org] [sourceforge.net] [MMVL]
mimas 2.1 - Copyright Mon Oct 30 11:31:17 2006, Bala Amavasai, Stuart Meikle, Arul Selvan, Fabio Caparrelli, Jan Wedekind, Manuel Boissenin, ...