My Project
UDK 3.2.7 C/C++ API Reference
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
salhelper
condition.hxx
Go to the documentation of this file.
1
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
/*************************************************************************
3
*
4
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5
*
6
* Copyright 2000, 2010 Oracle and/or its affiliates.
7
*
8
* OpenOffice.org - a multi-platform office productivity suite
9
*
10
* This file is part of OpenOffice.org.
11
*
12
* OpenOffice.org is free software: you can redistribute it and/or modify
13
* it under the terms of the GNU Lesser General Public License version 3
14
* only, as published by the Free Software Foundation.
15
*
16
* OpenOffice.org is distributed in the hope that it will be useful,
17
* but WITHOUT ANY WARRANTY; without even the implied warranty of
18
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
* GNU Lesser General Public License version 3 for more details
20
* (a copy is included in the LICENSE file that accompanied this code).
21
*
22
* You should have received a copy of the GNU Lesser General Public License
23
* version 3 along with OpenOffice.org. If not, see
24
* <http://www.openoffice.org/license.html>
25
* for a copy of the LGPLv3 License.
26
*
27
************************************************************************/
28
29
30
#ifndef _SALHELPER_CONDITION_HXX_
31
#define _SALHELPER_CONDITION_HXX_
32
33
34
#include <
osl/conditn.h
>
35
#include <
osl/mutex.hxx
>
36
#include "
salhelperdllapi.h
"
37
38
namespace
salhelper
39
{
40
class
ConditionModifier
;
41
class
ConditionWaiter
;
42
43
44
class
SALHELPER_DLLPUBLIC
Condition
45
{
46
friend
class
ConditionModifier
;
47
friend
class
ConditionWaiter
;
48
49
public
:
50
51
Condition
(
osl::Mutex
& aMutex);
52
53
virtual
~
Condition
();
54
55
56
protected
:
57
58
virtual
bool
applies()
const
= 0;
59
60
61
private
:
62
SALHELPER_DLLPRIVATE
Condition
(
Condition
&);
// not defined
63
SALHELPER_DLLPRIVATE
void
operator =(
Condition
&);
// not defined
64
65
osl::Mutex
& m_aMutex;
66
oslCondition
m_aCondition;
67
};
68
69
70
71
class
SALHELPER_DLLPUBLIC
ConditionModifier
72
{
73
public
:
74
75
ConditionModifier
(
Condition
& aCond);
76
77
~
ConditionModifier
();
78
79
80
private
:
81
SALHELPER_DLLPRIVATE
ConditionModifier
(
ConditionModifier
&);
// not defined
82
SALHELPER_DLLPRIVATE
void
operator =(ConditionModifier &);
// not defined
83
84
Condition
& m_aCond;
85
};
86
87
88
89
class
SALHELPER_DLLPUBLIC
ConditionWaiter
90
{
91
public
:
92
93
ConditionWaiter
(
Condition
& aCond);
94
95
struct
SALHELPER_DLLPUBLIC
timedout
{
96
timedout
();
97
98
timedout(timedout
const
&);
99
100
virtual
~timedout();
101
102
timedout & operator =(timedout
const
&);
103
};
104
105
ConditionWaiter
(
Condition
& aCond,sal_uInt32 milliSec)
106
throw
(
107
timedout
108
);
109
110
111
~
ConditionWaiter
();
112
113
114
private
:
115
SALHELPER_DLLPRIVATE
ConditionWaiter
(
ConditionWaiter
&);
// not defined
116
SALHELPER_DLLPRIVATE
void
operator =(
ConditionWaiter
&);
// not defined
117
118
Condition
& m_aCond;
119
};
120
121
122
}
// namespace salhelper
123
124
125
#endif
126
127
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Generated on Mon Oct 8 2012 00:36:42 for My Project by
1.8.1.2