stafeventseminlimpl.cpp

来自「Software Testing Automation Framework (S」· C++ 代码 · 共 75 行

CPP
75
字号
/*****************************************************************************//* Software Testing Automation Framework (STAF)                              *//* (C) Copyright IBM Corp. 2001                                              *//*                                                                           *//* This software is licensed under the Common Public License (CPL) V1.0.     *//*****************************************************************************/#ifndef STAF_EventSemInlImpl#define STAF_EventSemInlImpl#include "STAF.h"#include "STAFEventSem.h"#include "STAFRefPtr.h"#include "STAFString.h"#include "STAFException.h"STAF_INLINE STAFEventSem::STAFEventSem(const char *name) : fEventImpl(0){    unsigned int osRC = 0;    STAFRC_t rc = STAFEventSemConstruct(&fEventImpl, name, &osRC);    STAFException::checkRC(rc, "STAFEventSemConstruct", osRC);}STAF_INLINE void STAFEventSem::post(){    unsigned int osRC = 0;    STAFRC_t rc = STAFEventSemPost(fEventImpl, &osRC);    STAFException::checkRC(rc, "STAFEventSemPost", osRC);}STAF_INLINE void STAFEventSem::reset(){    unsigned int osRC = 0;    STAFRC_t rc = STAFEventSemReset(fEventImpl, &osRC);    STAFException::checkRC(rc, "STAFEventSemReset", osRC);}STAF_INLINE STAFRC_t STAFEventSem::wait(unsigned int timeout){    unsigned int osRC = 0;    STAFRC_t rc = STAFEventSemWait(fEventImpl, timeout, &osRC);    if ((rc != kSTAFOk) && (rc != kSTAFTimeout))        STAFException::checkRC(rc, "STAFEventSemWait", osRC);    return rc;}STAF_INLINE STAFEventSemState_t STAFEventSem::query(){    unsigned int osRC = 0;    STAFEventSemState_t state = kSTAFEventSemReset;    STAFRC_t rc = STAFEventSemQuery(fEventImpl, &state, &osRC);    STAFException::checkRC(rc, "STAFEventSemQuery: %d", osRC);    return state;}STAF_INLINE STAFEventSem::~STAFEventSem(){  unsigned int osRC = 0;  STAFRC_t rc = STAFEventSemDestruct(&fEventImpl, &osRC);}#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?