Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

OSGSocketSelection.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002  *                                OpenSG                                     *
00003  *                                                                           *
00004  *                                                                           *
00005  *             Copyright (C) 2000-2002 by the OpenSG Forum                   *
00006  *                                                                           *
00007  *                            www.opensg.org                                 *
00008  *                                                                           *
00009  *   contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de          *
00010  *                                                                           *
00011 \*---------------------------------------------------------------------------*/
00012 /*---------------------------------------------------------------------------*\
00013  *                                License                                    *
00014  *                                                                           *
00015  * This library is free software; you can redistribute it and/or modify it   *
00016  * under the terms of the GNU Library General Public License as published    *
00017  * by the Free Software Foundation, version 2.                               *
00018  *                                                                           *
00019  * This library is distributed in the hope that it will be useful, but       *
00020  * WITHOUT ANY WARRANTY; without even the implied warranty of                *
00021  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU         *
00022  * Library General Public License for more details.                          *
00023  *                                                                           *
00024  * You should have received a copy of the GNU Library General Public         *
00025  * License along with this library; if not, write to the Free Software       *
00026  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.                 *
00027  *                                                                           *
00028 \*---------------------------------------------------------------------------*/
00029 /*---------------------------------------------------------------------------*\
00030  *                                Changes                                    *
00031  *                                                                           *
00032  *                                                                           *
00033  *                                                                           *
00034  *                                                                           *
00035  *                                                                           *
00036  *                                                                           *
00037 \*---------------------------------------------------------------------------*/
00038 
00039 #ifndef _SELECTION_H_
00040 #define _SELECTION_H_
00041 #ifdef __sgi
00042 #pragma once
00043 #endif
00044 
00045 //---------------------------------------------------------------------------
00046 //  Includes
00047 //---------------------------------------------------------------------------
00048 #ifdef WIN32
00049 #include <windows.h>
00050 #else
00051 #include <sys/types.h>
00052 #endif
00053 #include <string>
00054 #include "OSGBase.h"
00055 
00056 OSG_BEGIN_NAMESPACE
00057 
00058 //---------------------------------------------------------------------------
00059 //  Forward References
00060 //---------------------------------------------------------------------------
00061 class Socket;
00062 
00063 class OSG_BASE_DLLMAPPING SocketSelection
00064 {
00065     /*==========================  PUBLIC  =================================*/
00066   public:
00067 
00068     /*---------------------------------------------------------------------*/
00072     SocketSelection();
00073     SocketSelection(const SocketSelection &source);
00074 
00076     /*---------------------------------------------------------------------*/
00080     ~SocketSelection();
00081 
00083     /*---------------------------------------------------------------------*/
00087     void clear     (void                                );
00088     void clearRead (const Socket &soc                   );
00089     void clearWrite(const Socket &soc                   );
00090     void setRead   (const Socket &soc                   );
00091     void setWrite  (const Socket &soc                   );
00092     bool isSetRead (const Socket &soc                   );
00093     bool isSetWrite(const Socket &soc                   );
00094     int  select    (double time                         );
00095     int  select    (double time,SocketSelection &result ) const;
00096 
00098     /*---------------------------------------------------------------------*/
00102     const SocketSelection & operator =(const SocketSelection &source);
00103 
00106     /*=========================  PROTECTED  ===============================*/
00107   protected:
00108     fd_set _fdSetRead;
00109     fd_set _fdSetWrite;
00110 
00111     /*==========================  PRIVATE  ================================*/
00112 };
00113 
00114 OSG_END_NAMESPACE
00115 
00116 #define OSG_SOCKET_SELECTION_HEADER_CVSID "@(#)$Id: $"
00117 
00118 #endif
00119 

Generated on Thu Aug 25 04:10:26 2005 for OpenSG by  doxygen 1.4.3