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

textureserver.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: textureserver.h,v 1.7 2004/04/18 16:28:20 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_TEXTURESERVER_H
00023 #define KEROSIN_TEXTURESERVER_H
00024 
00025 #ifdef HAVE_CONFIG_H
00026 #ifdef PACKAGE_BUGREPORT
00027 #undef PACKAGE_BUGREPORT
00028 #endif
00029 #ifdef PACKAGE_NAME
00030 #undef PACKAGE_NAME
00031 #endif
00032 #ifdef PACKAGE_STRING
00033 #undef PACKAGE_STRING
00034 #endif
00035 #ifdef PACKAGE_TARNAME
00036 #undef PACKAGE_TARNAME
00037 #endif
00038 #ifdef PACKAGE_VERSION
00039 #undef PACKAGE_VERSION
00040 #endif
00041 #include <config.h>
00042 #endif
00043 
00044 #include <zeitgeist/class.h>
00045 #include <zeitgeist/leaf.h>
00046 
00047 #if HAVE_HASH_MAP
00048 #include <hash_map>
00049 #else
00050 #include <map>
00051 #endif
00052 
00053 namespace kerosin
00054 {
00055 #if 0
00056 }
00057 #endif
00058 
00059 class OpenGLServer;
00060 class ImageServer;
00061 class Texture;
00062 
00063 class TextureServer : public zeitgeist::Leaf
00064 {
00065     //
00066     // types
00067     //
00068 private:
00069 #if HAVE_HASH_MAP
00070     typedef std::hash_map<std::string, boost::shared_ptr<Texture> > TTextureCache;
00071 #else
00072     typedef std::map<std::string, boost::shared_ptr<Texture> > TTextureCache;
00073 #endif
00074     //
00075     // functions
00076     //
00077 public:
00078     TextureServer();
00079     virtual ~TextureServer();
00080 
00084     boost::shared_ptr<OpenGLServer> GetOpenGLServer() const;
00085 
00087     boost::shared_ptr<Texture> GetTexture(const std::string &name);
00088 
00089 protected:
00091     virtual void OnLink();
00092 
00094     virtual void OnUnlink();
00095 
00096     //
00097     // members
00098     //
00099 private:
00101     boost::shared_ptr<OpenGLServer> mOpenGLServer;
00102 
00104     boost::shared_ptr<ImageServer> mImageServer;
00105 
00107     TTextureCache mTextureCache;
00108 };
00109 
00110 DECLARE_CLASS(TextureServer);
00111 
00112 } //kerosin
00113 
00114 #endif //KEROSIN_TEXTURESERVER_H

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