Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

imageserver.h

Go to the documentation of this file.
00001 /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*-
00002 
00003    this file is part of rcssserver3D
00004    Fri May 9 2003
00005    Copyright (C) 2002,2003 Koblenz University
00006    Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group
00007    $Id: imageserver.h,v 1.9 2004/04/18 16:24:21 rollmark Exp $
00008 
00009    This program is free software; you can redistribute it and/or modify
00010    it under the terms of the GNU General Public License as published by
00011    the Free Software Foundation; version 2 of the License.
00012 
00013    This program is distributed in the hope that it will be useful,
00014    but WITHOUT ANY WARRANTY; without even the implied warranty of
00015    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016    GNU General Public License for more details.
00017 
00018    You should have received a copy of the GNU General Public License
00019    along with this program; if not, write to the Free Software
00020    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00021 */
00022 #ifndef KEROSIN_IMAGESERVER_H
00023 #define KEROSIN_IMAGESERVER_H
00024 
00025 #include <IL/il.h>
00026 #include <zeitgeist/class.h>
00027 
00028 namespace kerosin
00029 {
00030 
00031 class Image;
00032 
00033 /*
00034   ImageServer - Global Interface For All Image-Related Functionality
00035 
00036   What the ImageServer does:
00037   - Load/Save images
00038   - Create images with different formats
00039   - Conversion between formats
00040 
00041   NOTE:
00042 
00043   HISTORY:
00044                 14.07.01 - MK
00045                         - Initial version
00046                 29.07.01 - MK
00047                         - Uses classserver
00048                 29.08.01 - MK
00049                         - Doesn't use classserver anymore :(
00050                         - Switched to DevIL for image loading needs, since the task of supporting
00051                           all major formats would have been too time consuming
00052                         - Cleaned up the interface of the imageserver quite a bit
00053                 11.10.01 - MK
00054                         - Made singleton functionality more secure
00055                 02.10.02 - MK
00056                         - Moved to Kerosin
00057 
00058         TODO:
00059                 - Image creation
00060                 - Image conversion
00061                 - Pixel-level access
00062 
00063         TOFIX:
00064 */
00065 
00066 class ImageServer : public zeitgeist::Leaf
00067 {
00068 public:
00069     ImageServer();
00070 
00071     // load/save
00072 
00074     boost::shared_ptr<Image> Load(const std::string& inName,
00075                                   ILenum inType = IL_TYPE_UNKNOWN);
00076 
00078     bool Save(const boost::shared_ptr<Image> &inImage, const std::string& inName,
00079               ILenum inType = IL_TYPE_UNKNOWN);
00080 
00081 private:
00083     bool    HandleErrors();
00084 };
00085 
00086 DECLARE_CLASS(ImageServer);
00087 
00088 } // namespace kerosin
00089 
00090 #endif //KEROSIN_IMAGESERVER_H

Generated on Thu Apr 6 15:25:38 2006 for rcssserver3d by  doxygen 1.4.4