CppUnit project page FAQ CppUnit home page

Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

ProtectorChain.h

Go to the documentation of this file.
00001 #ifndef CPPUNIT_PROTECTORCHAIN_H
00002 #define CPPUNIT_PROTECTORCHAIN_H
00003 
00004 #include <cppunit/Protector.h>
00005 #include <cppunit/portability/CppUnitDeque.h>
00006 
00007 #if CPPUNIT_NEED_DLL_DECL
00008 #pragma warning( push )
00009 #pragma warning( disable: 4251 )  // X needs to have dll-interface to be used by clients of class Z
00010 #endif
00011 
00012 
00013 CPPUNIT_NS_BEGIN
00014 
00019 class CPPUNIT_API ProtectorChain : public Protector
00020 {
00021 public:
00022   ~ProtectorChain();
00023 
00024   void push( Protector *protector );
00025 
00026   void pop();
00027 
00028   int count() const;
00029 
00030   bool protect( const Functor &functor,
00031                 const ProtectorContext &context );
00032 
00033 private:
00034   class ProtectFunctor;
00035 
00036 private:
00037   typedef CppUnitDeque<Protector *> Protectors;
00038   Protectors m_protectors;
00039 
00040   typedef CppUnitDeque<Functor *> Functors;
00041 };
00042 
00043 
00044 CPPUNIT_NS_END
00045 
00046 #if CPPUNIT_NEED_DLL_DECL
00047 #pragma warning( pop )
00048 #endif
00049 
00050 #endif // CPPUNIT_PROTECTORCHAIN_H
00051 

SourceForge Logo hosts this site. Send comments to:
CppUnit Developers