PixelLightAPI  .
SceneRendererManager.h
Go to the documentation of this file.
00001 /*********************************************************\
00002  *  File: SceneRendererManager.h                         *
00003  *
00004  *  Copyright (C) 2002-2012 The PixelLight Team (http://www.pixellight.org/)
00005  *
00006  *  This file is part of PixelLight.
00007  *
00008  *  PixelLight is free software: you can redistribute it and/or modify
00009  *  it under the terms of the GNU Lesser General Public License as published by
00010  *  the Free Software Foundation, either version 3 of the License, or
00011  *  (at your option) any later version.
00012  *
00013  *  PixelLight 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 Lesser General Public License for more details.
00017  *
00018  *  You should have received a copy of the GNU Lesser General Public License
00019  *  along with PixelLight. If not, see <http://www.gnu.org/licenses/>.
00020 \*********************************************************/
00021 
00022 
00023 #ifndef __PLSCENE_COMPOSITING_SCENERENDERERMANAGER_H__
00024 #define __PLSCENE_COMPOSITING_SCENERENDERERMANAGER_H__
00025 #pragma once
00026 
00027 
00028 //[-------------------------------------------------------]
00029 //[ Includes                                              ]
00030 //[-------------------------------------------------------]
00031 #include <PLCore/Container/ResourceManager.h>
00032 #include "PLScene/Compositing/SceneRendererHandler.h"
00033 
00034 
00035 //[-------------------------------------------------------]
00036 //[ Namespace                                             ]
00037 //[-------------------------------------------------------]
00038 namespace PLScene {
00039 
00040 
00041 //[-------------------------------------------------------]
00042 //[ Forward declarations                                  ]
00043 //[-------------------------------------------------------]
00044 class SceneContext;
00045 class SceneRenderer;
00046 
00047 
00048 //[-------------------------------------------------------]
00049 //[ Classes                                               ]
00050 //[-------------------------------------------------------]
00051 /**
00052 *  @brief
00053 *    This is a manager for the scene renderer resource
00054 *
00055 *  @note
00056 *    - Unloads unused resources automatically by default
00057 */
00058 class SceneRendererManager : public PLCore::ResourceManager<SceneRenderer> {
00059 
00060 
00061     //[-------------------------------------------------------]
00062     //[ Friends                                               ]
00063     //[-------------------------------------------------------]
00064     friend class SceneContext;
00065 
00066 
00067     //[-------------------------------------------------------]
00068     //[ Public functions                                      ]
00069     //[-------------------------------------------------------]
00070     public:
00071         /**
00072         *  @brief
00073         *    Returns the owner scene context
00074         *
00075         *  @return
00076         *    The owner scene context
00077         */
00078         PLS_API SceneContext &GetSceneContext() const;
00079 
00080 
00081     //[-------------------------------------------------------]
00082     //[ Private functions                                     ]
00083     //[-------------------------------------------------------]
00084     private:
00085         /**
00086         *  @brief
00087         *    Constructor
00088         *
00089         *  @param[in] cSceneContext
00090         *    Owner scene context
00091         */
00092         SceneRendererManager(SceneContext &cSceneContext);
00093 
00094         /**
00095         *  @brief
00096         *    Destructor
00097         */
00098         virtual ~SceneRendererManager();
00099 
00100 
00101     //[-------------------------------------------------------]
00102     //[ Private virtual PLCore::ResourceManager functions     ]
00103     //[-------------------------------------------------------]
00104     private:
00105         virtual SceneRenderer *CreateResource(const PLCore::String &sName) override;
00106 
00107 
00108     //[-------------------------------------------------------]
00109     //[ Private data                                          ]
00110     //[-------------------------------------------------------]
00111     private:
00112         SceneContext *m_pSceneContext;  /**< Owner scene context (always valid!) */
00113 
00114 
00115 };
00116 
00117 
00118 //[-------------------------------------------------------]
00119 //[ Namespace                                             ]
00120 //[-------------------------------------------------------]
00121 } // PLScene
00122 
00123 
00124 #endif // __PLSCENE_COMPOSITING_SCENERENDERERMANAGER_H__


PixelLight PixelLight 0.9.11-R1
Copyright (C) 2002-2012 by The PixelLight Team
Last modified Thu Feb 23 2012 14:08:59
The content of this PixelLight document is published under the
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported