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 00040 #ifndef _GROUPSOCKPIPELINE_H_ 00041 #define _GROUPSOCKPIPELINE_H_ 00042 #ifdef __sgi 00043 #pragma once 00044 #endif 00045 00046 //--------------------------------------------------------------------------- 00047 // Includes 00048 //--------------------------------------------------------------------------- 00049 00050 #include <string> 00051 #include <OSGBase.h> 00052 #include <OSGBaseTypes.h> 00053 #include <OSGGroupSockConnection.h> 00054 #include <OSGTime.h> 00055 #include <OSGStreamSocket.h> 00056 #include <OSGDgramQueue.h> 00057 00058 OSG_BEGIN_NAMESPACE 00059 00060 class PointSockPipeline; 00061 00062 class OSG_BASE_DLLMAPPING GroupSockPipeline : 00063 public GroupSockConnection 00064 { 00065 /*========================== PUBLIC =================================*/ 00066 public: 00067 00068 /*---------------------------------------------------------------------*/ 00072 GroupSockPipeline ( void ); 00073 virtual ~GroupSockPipeline ( void ); 00074 00076 /*---------------------------------------------------------------------*/ 00080 virtual const ConnectionType *getType (void); 00081 00083 /*---------------------------------------------------------------------*/ 00087 virtual Channel connectPoint(const std::string &address, 00088 Time timeout=-1 ); 00089 virtual void disconnect ( Channel channel ); 00090 virtual Channel acceptPoint ( Time timeout=-1 ); 00091 00093 /*---------------------------------------------------------------------*/ 00097 static GroupConnection *create(void); 00098 00101 /*========================= PROTECTED ===============================*/ 00102 protected: 00103 00104 /*---------------------------------------------------------------------*/ 00108 StreamSocket _next; 00109 bool _initialized; 00110 00112 /*---------------------------------------------------------------------*/ 00116 virtual void write (MemoryHandle mem, UInt32 size); 00117 virtual void writeBuffer (void); 00118 00121 /*========================== PRIVATE ================================*/ 00122 private: 00123 00124 friend class PointSockPipeline; 00125 00126 /*---------------------------------------------------------------------*/ 00130 void initialize(void); 00131 00133 /*---------------------------------------------------------------------*/ 00137 static ConnectionType _type; 00138 00141 typedef GroupSockConnection Inherited; 00142 00143 // prohibit default functions (move to 'public' if you need one) 00144 GroupSockPipeline(const GroupSockPipeline &source); 00145 GroupSockPipeline& operator =(const GroupSockPipeline &source); 00146 }; 00147 00148 //--------------------------------------------------------------------------- 00149 // Exported Types 00150 //--------------------------------------------------------------------------- 00151 00152 // class pointer 00153 00154 typedef GroupSockPipeline *GroupSockPipelineP; 00155 00156 OSG_END_NAMESPACE 00157 00158 #define OSG_GROUPSOCKPIPELINE_HEADER_CVSID "@(#)$Id: $" 00159 00160 #endif /* _GROUPSOCKPIPELINE_H_ */
1.4.3