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

📄 handleset.h

📁 This is a source code of VxWorks
💻 H
字号:
/* HandleSet - Encapsulates a set of fd's for select/poll *//* Copyright (c) 1999 Wind River Systems, Inc. *//*modification history--------------------01e,18aug99,aim  removed inline for SIMNT build01d,21jul99,aim  quantify tweaks01c,20jul99,aim  added inline statements01b,18jun99,aim  added copy ctor and operator=01a,07may99,aim  created*/#ifndef __INCHandleSet_h#define __INCHandleSet_h#include "ReactorTypes.h"#include "iostream"class HandleSet    {  public:    virtual ~HandleSet();    HandleSet ();    HandleSet (REACTOR_HANDLE_SET_TYPE mask);    HandleSet (const HandleSet&);    HandleSet& operator= (const HandleSet&);    int count () const;    int sync (REACTOR_HANDLE = maxSize ());    void reset ();    bool isSet (REACTOR_HANDLE h) const;    void clr (REACTOR_HANDLE h);    void set (REACTOR_HANDLE h);    REACTOR_HANDLE maxHandle () const;    operator REACTOR_HANDLE_SET_TYPE* ();    friend class HandleSetIterator;    friend ostream& operator<<	(	ostream&,	const HandleSet&	);    static int maxSize ();  private:    REACTOR_HANDLE maxHandleSet ();        int				m_count;    REACTOR_HANDLE		m_maxHandle;    REACTOR_HANDLE_SET_TYPE	m_mask;    };class HandleSetIterator    {  public:    HandleSetIterator (const HandleSet &hs);    REACTOR_HANDLE end() const;    bool last() const;    REACTOR_HANDLE operator() ();    // "Next" operator.  Returns the next <REACTOR_HANDLE> in the    // <HandleSet> up to <HandleSet->maxHandle>.  When all the Handles    // have been seen returns <INVALID_REACTOR_HANDLE>.  private:    const HandleSet&	m_handleSet;    int			m_count;    int			m_index;    int			m_maxHandle;    // unsupported    HandleSetIterator ();    HandleSetIterator (const HandleSetIterator&);    HandleSetIterator& operator= (HandleSetIterator&);    };#endif // __INCHandleSet_h

⌨️ 快捷键说明

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