CppUnit project page
FAQ
CppUnit home page
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 <
cppunit/portability/CppUnitDeque.h
>
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
{
21
public
:
22
~ProtectorChain
();
23
24
void
push
(
Protector
*protector );
25
26
void
pop
();
27
28
int
count
()
const
;
29
30
bool
protect
(
const
Functor
&functor,
31
const
ProtectorContext
&context );
32
33
private
:
34
class
ProtectFunctor
;
35
36
private
:
37
typedef
CppUnitDeque<Protector *>
Protectors
;
38
Protectors
m_protectors
;
39
40
typedef
CppUnitDeque<Functor *>
Functors
;
41
};
42
43
44
CPPUNIT_NS_END
45
46
#if CPPUNIT_NEED_DLL_DECL
47
#pragma warning( pop )
48
#endif
49
50
#endif
// CPPUNIT_PROTECTORCHAIN_H
51
CPPUNIT_API
#define CPPUNIT_API
Definition
CppUnitApi.h:27
CppUnitDeque.h
CppUnitDeque
#define CppUnitDeque
Definition
CppUnitDeque.h:20
CPPUNIT_NS_END
#define CPPUNIT_NS_END
Definition
Portability.h:120
CPPUNIT_NS_BEGIN
#define CPPUNIT_NS_BEGIN
Definition
Portability.h:119
Protector.h
Functor
Definition
Protector.h:15
ProtectorChain::ProtectFunctor
Definition
ProtectorChain.cpp:7
ProtectorChain
Protector chain (Implementation). Implementation detail.
Definition
ProtectorChain.h:20
ProtectorChain::Functors
CppUnitDeque< Functor * > Functors
Definition
ProtectorChain.h:40
ProtectorChain::pop
void pop()
Definition
ProtectorChain.cpp:45
ProtectorChain::Protectors
CppUnitDeque< Protector * > Protectors
Definition
ProtectorChain.h:37
ProtectorChain::count
int count() const
Definition
ProtectorChain.cpp:52
ProtectorChain::push
void push(Protector *protector)
Definition
ProtectorChain.cpp:38
ProtectorChain::m_protectors
Protectors m_protectors
Definition
ProtectorChain.h:38
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
hosts this site.
Send comments to:
CppUnit Developers