photoCollection.h

00001 
00002 // protect multiple inclusion
00003 #ifndef _PHOTOCOLLECTION_H_INCLUDED_
00004 #define _PHOTOCOLLECTION_H_INCLUDED_
00005 
00006 
00007 // forward declaration to prevent #include here
00008 class Photo;
00009 
00010 
00011 // definition of callback prototype
00012 typedef ERR_TYPE (*photoCollectionCheckForDeleteCallback_TYPE)( Photo* p );
00013 // shortcut for photo iterator
00014 typedef irr::core::list<Photo*>::Iterator photoIterator_TYPE;
00015 
00016 
00017 class PhotoCollection
00018 {
00019 public:
00020         PhotoCollection();
00021         ~PhotoCollection();
00022 
00023         // loads a wellknown mesh from file, loads a texture from file, set up new photo
00024         ERR_TYPE addPhoto( irr::core::stringc fileName, NxVec3 pos );
00025         // this function parses given directory for loadable images and then creates photo objects
00026         ERR_TYPE addPhotosFromDirectory( irr::core::stringc dirPath );
00027         // update all photos in our collection
00028         ERR_TYPE update( irr::u32 timeMS );
00029         // attach unknown function which checks whether a photo should be deleted or not
00030         ERR_TYPE registerCheckForDeleteCallback( photoCollectionCheckForDeleteCallback_TYPE anyCallBackFunction );
00031         // setup photos' position nicely
00032         ERR_TYPE resetPhotos();
00033         // dispose all photos in our list
00034         ERR_TYPE deleteAllPhotos();
00035 
00036 private:
00037         // dispose a photos from our collection
00038         ERR_TYPE deletePhoto( Photo* photo );
00039         // dispose a photos from our collection
00040         photoIterator_TYPE deletePhoto( photoIterator_TYPE it );
00041 
00042         irr::core::list<Photo*>                                                 photoList;
00043         photoCollectionCheckForDeleteCallback_TYPE              theOneToCallToCheckForPhotoDelete;
00044 
00045 };
00046 
00047 
00048 #endif // #ifndef _PHOTOCOLLECTION_H_INCLUDED_

Generated on Sun Dec 2 03:10:23 2007 for TableTop by  doxygen 1.5.4