Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET
Apache Qpid Documentation
Main Page
Modules
Namespaces
Classes
Files
File List
File Members
qpid
sys
windows
Condition.h
Go to the documentation of this file.
1
#ifndef _sys_windows_Condition_h
2
#define _sys_windows_Condition_h
3
4
/*
5
*
6
* Licensed to the Apache Software Foundation (ASF) under one
7
* or more contributor license agreements. See the NOTICE file
8
* distributed with this work for additional information
9
* regarding copyright ownership. The ASF licenses this file
10
* to you under the Apache License, Version 2.0 (the
11
* "License"); you may not use this file except in compliance
12
* with the License. You may obtain a copy of the License at
13
*
14
* http://www.apache.org/licenses/LICENSE-2.0
15
*
16
* Unless required by applicable law or agreed to in writing,
17
* software distributed under the License is distributed on an
18
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
19
* KIND, either express or implied. See the License for the
20
* specific language governing permissions and limitations
21
* under the License.
22
*
23
*/
24
25
#include "
qpid/sys/Mutex.h
"
26
#include "
qpid/sys/Time.h
"
27
28
#include <time.h>
29
#include <boost/noncopyable.hpp>
30
#include <boost/thread/condition.hpp>
31
#include <boost/thread/thread_time.hpp>
32
#include <windows.h>
33
34
namespace
qpid
{
35
namespace
sys {
36
40
class
Condition :
private
boost::noncopyable
41
{
42
public
:
43
inline
Condition
();
44
inline
~Condition
();
45
inline
void
wait
(Mutex&);
46
inline
bool
wait
(Mutex&,
const
AbsTime& absoluteTime);
47
inline
void
notify
();
48
inline
void
notifyAll
();
49
50
private
:
51
boost::condition_variable_any condition;
52
};
53
54
Condition::Condition
() {
55
}
56
57
Condition::~Condition
() {
58
}
59
60
void
Condition::wait
(Mutex& mutex) {
61
condition.wait(mutex.mutex);
62
}
63
64
bool
Condition::wait
(Mutex& mutex,
const
AbsTime& absoluteTime){
65
return
condition.timed_wait(mutex.mutex, absoluteTime.timepoint);
66
}
67
68
void
Condition::notify
(){
69
condition.notify_one();
70
}
71
72
void
Condition::notifyAll
(){
73
condition.notify_all();
74
}
75
76
}}
77
#endif
Mutex.h
Time.h
qpid::sys::Condition::Condition
Condition()
Definition:
Condition.h:54
qpid
This file was automatically generated from the AMQP specification.
Definition:
Address.h:27
qpid::sys::Condition::~Condition
~Condition()
Definition:
Condition.h:58
qpid::sys::Condition::notifyAll
void notifyAll()
Definition:
Condition.h:81
qpid::sys::Condition::wait
void wait(Mutex &)
Definition:
Condition.h:62
qpid::sys::Condition::notify
void notify()
Definition:
Condition.h:77
Qpid C++ API Reference
Generated on Wed Jul 29 2015 for Qpid C++ Client API by
1.8.9.1