00001 // -*- c++ -*- 00002 //------------------------------------------------------------------------------ 00003 // MaskSet.h 00004 //------------------------------------------------------------------------------ 00005 // Copyright (c) 1999 by Vladislav Grinchenko 00006 // 00007 // This library is free software; you can redistribute it and/or 00008 // modify it under the terms of the GNU Library General Public 00009 // License as published by the Free Software Foundation; either 00010 // version 2 of the License, or (at your option) any later version. 00011 //------------------------------------------------------------------------------ 00012 #ifndef MASK_SET_H 00013 #define MASK_SET_H 00014 00015 #include "assa/FdSet.h" 00016 00017 namespace ASSA { 00018 00024 class MaskSet 00025 { 00026 public: 00028 FdSet m_rset; 00029 00031 FdSet m_wset; 00032 00034 FdSet m_eset; 00035 00036 public: 00038 void reset (); 00039 00041 void sync (); 00042 00044 void dump (); 00045 }; 00046 00047 inline void 00048 MaskSet:: 00049 sync () 00050 { 00051 m_rset.sync (); 00052 m_wset.sync (); 00053 m_eset.sync (); 00054 } 00055 00056 00057 inline void 00058 MaskSet:: 00059 reset () 00060 { 00061 m_rset.reset (); 00062 m_wset.reset (); 00063 m_eset.reset (); 00064 } 00065 00066 inline void 00067 MaskSet:: 00068 dump () 00069 { 00070 DL((REACTTRACE,"+---------------------------\n")); 00071 DL((REACTTRACE,"| RD FDs set %s\n", m_rset.dump_c_str ().c_str ())); 00072 DL((REACTTRACE,"| WR FDs set %s\n", m_wset.dump_c_str ().c_str ())); 00073 DL((REACTTRACE,"| EX FDs set %s\n", m_eset.dump_c_str ().c_str ())); 00074 DL((REACTTRACE,"+---------------------------\n")); 00075 } 00076 00077 } // end namespace ASSA 00078 00079 #endif /* MASK_SET_H */