First cut of StaticRegistries - separate from Context

This commit is contained in:
Phil Nash
2012-08-06 20:16:53 +01:00
parent 5234b15ff4
commit 1091ca81e6
21 changed files with 222 additions and 141 deletions

View File

@@ -17,12 +17,12 @@
namespace Catch {
class ExceptionTranslatorRegistry : public IExceptionTranslatorRegistry {
public:
~ExceptionTranslatorRegistry() {
deleteAll( m_translators );
}
virtual void registerTranslator( IExceptionTranslator* translator ) {
virtual void registerTranslator( const IExceptionTranslator* translator ) {
m_translators.push_back( translator );
}
@@ -54,7 +54,7 @@ namespace Catch {
}
}
std::string tryTranslators( std::vector<IExceptionTranslator*>::const_iterator it ) const {
std::string tryTranslators( std::vector<const IExceptionTranslator*>::const_iterator it ) const {
if( it == m_translators.end() )
return "Unknown exception";
@@ -67,7 +67,7 @@ namespace Catch {
}
private:
std::vector<IExceptionTranslator*> m_translators;
std::vector<const IExceptionTranslator*> m_translators;
};
}