00001 /* 00002 * Copyright 2006 Sony Computer Entertainment Inc. 00003 * 00004 * Licensed under the MIT Open Source License, for details please see license.txt or the website 00005 * http://www.opensource.org/licenses/mit-license.php 00006 * 00007 */ 00008 00009 #ifndef _DAE_ERROR_HANDLER_ 00010 #define _DAE_ERROR_HANDLER_ 00011 00012 #include <memory> 00013 #include <dae/daeTypes.h> 00014 00020 class DLLSPEC daeErrorHandler { 00021 public: 00025 daeErrorHandler(); 00029 virtual ~daeErrorHandler(); 00030 00036 virtual void handleError( daeString msg ) = 0; 00042 virtual void handleWarning( daeString msg ) = 0; 00043 00048 static void setErrorHandler( daeErrorHandler *eh ); 00054 static daeErrorHandler *get(); 00055 00056 private: 00057 static daeErrorHandler *_instance; 00058 static std::auto_ptr<daeErrorHandler> _defaultInstance; 00059 }; 00060 00061 #endif