OSDLRenderer.h

Go to the documentation of this file.
00001 #ifndef OSDL_RENDERER_H_
00002 #define OSDL_RENDERER_H_
00003 
00004 
00005 #include "OSDLEvents.h"               // for RenderingTick
00006 
00007 #include "OSDLException.h"            // for Exception
00008 
00009 #include "Ceylan.h"                   // for inheritance
00010 
00011 #include <string>
00012 #include <list>
00013 
00014 
00015 
00016 
00017 
00018 namespace OSDL
00019 {
00020 
00021 
00022     namespace Rendering 
00023     {
00024     
00025                 
00031         class OSDL_DLL RenderingException : public OSDL::Exception
00032         {
00033             public:
00034 
00035                 explicit RenderingException( const std::string & reason )
00036                     throw() ;
00037                 virtual ~RenderingException() throw() ;
00038 
00039         } ;
00040 
00041         
00046         typedef Ceylan::Uint32 RenderCount ;        
00047                 
00048                 
00049                 
00084         class OSDL_DLL Renderer : public Ceylan::Object
00085         {
00086         
00087         
00088             public:
00089             
00090             
00103                 explicit Renderer( bool registerToScheduler = true ) 
00104                     throw( RenderingException ) ;
00105                 
00106                 
00111                 virtual ~Renderer() throw() ;
00112             
00113 
00125                 virtual void render( 
00126                     Events::RenderingTick currentRenderingTick = 0 ) throw() ;
00127 
00128                 
00141                 virtual void onRenderingSkipped( 
00142                     Events::RenderingTick skippedRenderingTick ) throw() ;
00143                 
00144                     
00157                 virtual const std::string toString( 
00158                         Ceylan::VerbosityLevels level = Ceylan::high ) 
00159                     const throw() ;
00160 
00161 
00162 
00163                 // Static section.
00164 
00165 
00172                 static bool HasExistingRootRenderer() throw() ;
00173                  
00174                  
00191                 static Renderer & GetExistingRootRenderer() 
00192                     throw( RenderingException ) ;
00193 
00194 
00201                 static void DeleteExistingRootRenderer() 
00202                     throw( RenderingException ) ;
00203         
00204         
00209                 static void DeleteRootRenderer() throw() ;
00210                     
00211         
00212                     
00213                     
00214             protected:
00215             
00216 
00221                 RenderCount _renderingDone ;
00222         
00223         
00228                 RenderCount _renderingSkipped ;
00229         
00230         
00237                 Events::RenderingTick _lastRender ;
00238         
00239 
00245                  //std::list<View *> _registeredViews ;
00246                  
00247                  
00248             
00249             private:
00250             
00251             
00260                 explicit Renderer( const Renderer & source ) throw() ;
00261             
00262             
00271                 Renderer & operator = ( const Renderer & source ) throw() ;
00272                 
00273                 
00279                 static Renderer * _internalRootRenderer ;
00280                 
00281                 
00282         } ;
00283 
00284     }
00285 
00286 }
00287 
00288 
00289 #endif // OSDL_RENDERER_H_

Generated on Fri Mar 30 14:46:59 2007 for OSDL by  doxygen 1.5.1