⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stafnotificationlist.h

📁 Software Testing Automation Framework (STAF)的开发代码
💻 H
字号:
/*****************************************************************************//* Software Testing Automation Framework (STAF)                              *//* (C) Copyright IBM Corp. 2001                                              *//*                                                                           *//* This software is licensed under the Common Public License (CPL) V1.0.     *//*****************************************************************************/#ifndef STAF_NotificationList#define STAF_NotificationList#include <list>#include "STAF.h"#include "STAFString.h"#include "STAFService.h"#include "STAFRefPtr.h"#include "STAFMutexSem.h"class STAFNotificationList;typedef STAFRefPtr<STAFNotificationList> STAFNotificationListPtr;class STAFNotificationList{public:    class Notifiee    {    public:        enum NameOrHandle { kHandle, kName };        Notifiee(STAFString aMachine = STAFString(), STAFHandle_t aHandle = 0,                 unsigned int aPriority = 0)            : nameOrHandle(kHandle), machine(aMachine), process(STAFString()),              handle(aHandle), priority(aPriority)        { /* Do Nothing */ }        Notifiee(STAFString aMachine, STAFString aName,                 unsigned int aPriority)            : nameOrHandle(kName), machine(aMachine), process(aName),              handle(0), priority(aPriority)        { /* Do Nothing */ }        NameOrHandle nameOrHandle;        STAFString machine;        STAFString process;        STAFHandle_t handle;        unsigned int priority;    };    typedef std::list<Notifiee> NotifieeList;    STAFNotificationList();    STAFRC_t reg(const STAFString &machine, const STAFHandle_t handle,                 unsigned int priority);    STAFRC_t reg(const STAFString &machine, const STAFString &process,                 unsigned int priority);    STAFRC_t unregister(const STAFString &machine, const STAFHandle_t handle,                         unsigned int priority);    STAFRC_t unregister(const STAFString &machine, const STAFString &process,                         unsigned int priority);    unsigned int sendNotification(const STAFString &type,                                   const STAFString &message);    NotifieeList getNotifieeListCopy();    ~STAFNotificationList();private:    // Don't allow copy construction or assignment    STAFNotificationList(const STAFNotificationList &);    STAFNotificationList &operator=(const STAFNotificationList &);    STAFRC_t sendNotificationToHandle(const STAFString &where,                                      const STAFHandle_t handle,                                      unsigned int priority,                                      const STAFString &type,                                      const STAFString &message);    STAFRC_t sendNotificationToName(const STAFString &where,                                    const STAFString &name,                                    unsigned int priority,                                    const STAFString &type,                                    const STAFString &message);    STAFMutexSem fNotifieeListSem;    NotifieeList fNotifieeList;};#endif

⌨️ 快捷键说明

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