diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-06-30 15:59:34 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-06-30 15:59:34 +0100 |
commit | 4355a7843e156b189214bed35b93b86439a68064 (patch) | |
tree | 6e73ccf9da53df411808433de24798205bd76e58 /sal/inc/cppunittester | |
parent | 5a85cf5045d449e29b202ea32016da4ec664d6c0 (diff) |
extend CppUnit::Protector for context-less protection
Diffstat (limited to 'sal/inc/cppunittester')
-rw-r--r-- | sal/inc/cppunittester/protectorfactory.hxx | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/sal/inc/cppunittester/protectorfactory.hxx b/sal/inc/cppunittester/protectorfactory.hxx index c309dbe8aa85..916f89f74d40 100644 --- a/sal/inc/cppunittester/protectorfactory.hxx +++ b/sal/inc/cppunittester/protectorfactory.hxx @@ -32,14 +32,20 @@ #include "sal/types.h" -namespace CppUnit { class Protector; } - -namespace cppunittester { - -// The type of CppUnit::Protector factory functions that can be plugged into -// cppunittester: -extern "C" typedef CppUnit::Protector * SAL_CALL ProtectorFactory(); - +#include <cppunit/Protector.h> + +namespace cppunittester +{ + class LibreOfficeProtector : public CppUnit::Protector + { + public: + virtual bool protect(CppUnit::Functor const & functor) = 0; + using CppUnit::Protector::protect; + }; + + // The type of CppUnit::Protector factory functions that can be plugged into + // cppunittester: + extern "C" typedef LibreOfficeProtector * SAL_CALL ProtectorFactory(); } #endif |