UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | List of all members
dcf::Sem Class Referenceabstract

#include <sem.hpp>

Inheritance diagram for dcf::Sem:
dcf::UnnamedSem

Public Member Functions

 Sem (int)
 
virtual ~Sem ()
 
virtual dcf::error_t allocate (int rn)=0
 
virtual dcf::error_t release (int rn)=0
 
virtual dcf::error_t available (int &rn) const =0
 
dcf::error_t operator-- ()
 
dcf::error_t operator++ ()
 

Detailed Description

Abstract semaphore object.

Constructor & Destructor Documentation

dcf::Sem::Sem ( int  )
inline

Constructor with number of resources provided.

virtual dcf::Sem::~Sem ( )
inlinevirtual

Destructs object.

Member Function Documentation

virtual dcf::error_t dcf::Sem::allocate ( int  rn)
pure virtual
Allocates provided number of resources or waits if all resources are allocated. 

Should be reimplemented.

Implemented in dcf::UnnamedSem.

virtual dcf::error_t dcf::Sem::available ( int &  rn) const
pure virtual

Gets number of free resources. Should be reimplemented.

Implemented in dcf::UnnamedSem.

dcf::error_t dcf::Sem::operator++ ( )
inline

Releases one resource.

dcf::error_t dcf::Sem::operator-- ( )
inline

Allocates one resource.

virtual dcf::error_t dcf::Sem::release ( int  rn)
pure virtual
Releases provided number of resources. 

Should be reimplemented.

Implemented in dcf::UnnamedSem.


The documentation for this class was generated from the following file: