libXDispatch 0.6
include/QtDispatch/qdispatchsemaphore.h
Go to the documentation of this file.
00001 /*
00002 * Copyright (c) 2011 MLBA. All rights reserved.
00003 *
00004 * @MLBA_OPEN_LICENSE_HEADER_START@
00005 *
00006 * Licensed under the Apache License, Version 2.0 (the "License");
00007 * you may not use this file except in compliance with the License.
00008 * You may obtain a copy of the License at
00009 * 
00010 *     http://www.apache.org/licenses/LICENSE-2.0
00011 * 
00012 * Unless required by applicable law or agreed to in writing, software
00013 * distributed under the License is distributed on an "AS IS" BASIS,
00014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00015 * See the License for the specific language governing permissions and
00016 * limitations under the License.
00017 *
00018 * @MLBA_OPEN_LICENSE_HEADER_END@
00019 */
00020 
00021 
00022 #ifndef QDISPATCH_SEMAPHORE_H_
00023 #define QDISPATCH_SEMAPHORE_H_
00024 
00025 #include "qdispatchglobal.h"
00026 #include "../xdispatch/dispatch.h"
00027 
00028 QT_BEGIN_HEADER
00029 QT_BEGIN_NAMESPACE
00030 
00031 class QTime;
00032 
00033 QT_MODULE(Dispatch)
00034 
00035 
00043 class Q_DISPATCH_EXPORT QDispatchSemaphore : public xdispatch::semaphore {
00044 
00045 public:
00057     QDispatchSemaphore(int = 1);
00058        QDispatchSemaphore(const QDispatchSemaphore&);
00059     QDispatchSemaphore(dispatch_semaphore_t);
00060     QDispatchSemaphore(const xdispatch::semaphore&);
00061        ~QDispatchSemaphore();
00062 
00072     bool tryAcquire(const QTime&);
00073     bool tryAcquire(dispatch_time_t);
00074     bool tryAcquire(struct tm*);
00075 
00076 };
00077 
00078 Q_DECL_EXPORT QDebug operator<<(QDebug, const QDispatchSemaphore&);
00079 
00080 QT_END_NAMESPACE
00081 QT_END_HEADER
00082 
00083 #endif /* QDISPATCH_SEMAPHORE_H_ */

Generated on Wed Feb 22 2012 19:57:00 for libXDispatch by Doxygen 1.7.4
Content © 2011-2012 MLBA (about | privacy) – Design © 2010-2012 Emzeat. All Rights reserved.