CppUnit - The Unit Testing Library

CppUnit project page | FAQ

ProtectorChain.h
Go to the documentation of this file.
1#ifndef CPPUNIT_PROTECTORCHAIN_H
2#define CPPUNIT_PROTECTORCHAIN_H
3
4#include <cppunit/Protector.h>
5#include <deque>
6
7#if CPPUNIT_NEED_DLL_DECL
8#pragma warning( push )
9#pragma warning( disable: 4251 ) // X needs to have dll-interface to be used by clients of class Z
10#endif
11
12
13 CPPUNIT_NS_BEGIN
14
19 class CPPUNIT_API ProtectorChain : public Protector
20{
21public:
22 ProtectorChain();
23
24 ~ProtectorChain();
25
26 void push( Protector *protector );
27
28 void pop();
29
30 int count() const;
31
32 bool protect( const Functor &functor,
33 const ProtectorContext &context );
34
35private:
36 class ProtectFunctor;
37
38private:
39 typedef std::deque<Protector *> Protectors;
40 Protectors m_protectors;
41
42 typedef std::deque<Functor *> Functors;
43};
44
45
46 CPPUNIT_NS_END
47
48#if CPPUNIT_NEED_DLL_DECL
49#pragma warning( pop )
50#endif
51
52#endif // CPPUNIT_PROTECTORCHAIN_H
53
CPPUNIT_API
#define CPPUNIT_API
Definition CppUnitApi.h:27
CPPUNIT_NS_END
#define CPPUNIT_NS_END
Definition Portability.h:106
CPPUNIT_NS_BEGIN
#define CPPUNIT_NS_BEGIN
Definition Portability.h:105
Protector.h
Functor
Definition Protector.h:15
ProtectorChain::ProtectFunctor
Definition ProtectorChain.cpp:7
ProtectorChain::pop
void pop()
Definition ProtectorChain.cpp:54
ProtectorChain::Functors
std::deque< Functor * > Functors
Definition ProtectorChain.h:42
ProtectorChain::count
int count() const
Definition ProtectorChain.cpp:61
ProtectorChain::ProtectorChain
ProtectorChain()
Definition ProtectorChain.cpp:34
ProtectorChain::push
void push(Protector *protector)
Definition ProtectorChain.cpp:47
ProtectorChain::m_protectors
Protectors m_protectors
Definition ProtectorChain.h:40
ProtectorChain::Protectors
std::deque< Protector * > Protectors
Definition ProtectorChain.h:39
ProtectorContext
Protector context (Implementation). Implementation detail.
Definition ProtectorContext.h:18
Protector
Protects one or more test case run.
Definition Protector.h:48
Protector::protect
virtual bool protect(const Functor &functor, const ProtectorContext &context)=0

| Send comments to: CppUnit Developers