source: flair-src/branches/sanscv/lib/FlairCore/src/Semaphore.cpp @ 326

Last change on this file since 326 was 324, checked in by Sanahuja Guillaume, 2 years ago

removing opencv dependency

File size: 1.1 KB
Line 
1// %flair:license{
2// This file is part of the Flair framework distributed under the
3// CECILL-C License, Version 1.0.
4// %flair:license}
5//  created:    2016/11/16
6//  filename:   Semaphore.cpp
7//
8//  author:     Thomas Fuhrmann
9//              Copyright Heudiasyc UMR UTC/CNRS 7253
10//
11//  version:    $Id: $
12//
13//  purpose:    Class defining a semaphore
14//
15//
16/*********************************************************************/
17
18#include "Semaphore.h"
19#include "Semaphore_impl.h"
20
21using std::string;
22
23namespace flair {
24namespace core {
25
26Semaphore::Semaphore(const Object *parent, uint32_t initialValue, string name, Type type)
27    : Object(parent, name, "semaphore"),type(type) {
28  pimpl_ = new Semaphore_impl(this, name, initialValue,type);
29}
30
31Semaphore::~Semaphore() { delete pimpl_; }
32
33bool Semaphore::TryGetSemaphore() const { return pimpl_->TryGetSemaphore(); }
34bool Semaphore::GetSemaphore(Time timeout) const { return pimpl_->GetSemaphore(timeout); }
35
36bool Semaphore::ReleaseSemaphore(void) const { return pimpl_->ReleaseSemaphore(); }
37
38} // end namespace core
39} // end namespace flair
Note: See TracBrowser for help on using the repository browser.