changed: gcc8 base update
[opensg.git] / Source / Contrib / ComplexSceneManager / Sensor / InterfaceSensors / Devices / OSGLinux3AxisEventInterface.h
blob1d0f20ed958eb9e41a57ce5af9e6bded993b6143
1 /*---------------------------------------------------------------------------*\
2 * OpenSG *
3 * *
4 * *
5 * Copyright (C) 2000-2006 by the OpenSG Forum *
6 * *
7 * www.opensg.org *
8 * *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de *
10 * *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
13 * License *
14 * *
15 * This library is free software; you can redistribute it and/or modify it *
16 * under the terms of the GNU Library General Public License as published *
17 * by the Free Software Foundation, version 2. *
18 * *
19 * This library is distributed in the hope that it will be useful, but *
20 * WITHOUT ANY WARRANTY; without even the implied warranty of *
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
22 * Library General Public License for more details. *
23 * *
24 * You should have received a copy of the GNU Library General Public *
25 * License along with this library; if not, write to the Free Software *
26 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
27 * *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
30 * Changes *
31 * *
32 * *
33 * *
34 * *
35 * *
36 * *
37 \*---------------------------------------------------------------------------*/
39 #ifndef _OSGLINUX3AXISEVENTINTERFACE_H_
40 #define _OSGLINUX3AXISEVENTINTERFACE_H_
41 #ifdef __sgi
42 #pragma once
43 #endif
45 #include "OSGTransformationDeviceInterface.h"
47 OSG_BEGIN_NAMESPACE
49 class OSG_CONTRIBCSM_DLLMAPPING Linux3AxisEventInterface :
50 public TransformationDeviceInterface
53 /*========================== PUBLIC =================================*/
55 public:
57 OSG_GEN_INTERNAL_MEMOBJPTR(Linux3AxisEventInterface);
59 /*---------------------------------------------------------------------*/
60 /*! \name Reference Counting */
61 /*! \{ */
63 static ObjTransitPtr get (Char8 *szName, bool bGlobal);
64 static Linux3AxisEventInterface *find(Char8 *szName);
66 /*---------------------------------------------------------------------*/
67 /*! \name Reference Counting */
68 /*! \{ */
70 virtual bool start (void);
71 virtual void shutdown(void);
73 /*! \} */
74 /*---------------------------------------------------------------------*/
75 /*! \name Constructors */
76 /*! \{ */
78 virtual void setOptions(InterfaceOptions *pOptions);
80 /*! \} */
81 /*========================= PROTECTED ===============================*/
83 protected:
85 typedef TransformationDeviceInterface Inherited;
87 static MPThreadType _type;
89 Real32 _rTxRange;
90 Real32 _rTyRange;
91 Real32 _rTzRange;
92 Real32 _rRxRange;
93 Real32 _rRyRange;
94 Real32 _rRzRange;
96 Int32 _iFileDesc;
97 #ifdef __linux
98 fd_set _rFds;
99 #endif
100 std::string _szPort;
103 /*---------------------------------------------------------------------*/
104 /*! \name Reference Counting */
105 /*! \{ */
107 static BaseThread *create(const Char8 *szName,
108 UInt32 uiId,
109 bool bGlobal);
111 /*! \} */
112 /*---------------------------------------------------------------------*/
113 /*! \name Constructors */
114 /*! \{ */
116 Linux3AxisEventInterface(const Char8 *szName, UInt32 uiId, bool bGlobal);
118 /*! \} */
119 /*---------------------------------------------------------------------*/
120 /*! \name Destructor */
121 /*! \{ */
123 virtual ~Linux3AxisEventInterface(void);
125 /*! \} */
126 /*---------------------------------------------------------------------*/
127 /*! \name Destructor */
128 /*! \{ */
130 virtual void workProc(void);
132 /*! \} */
133 /*---------------------------------------------------------------------*/
134 /*! \name Constructors */
135 /*! \{ */
137 void getRawData(void);
139 /*! \} */
140 /*========================== PRIVATE ================================*/
142 private:
144 /*!\brief prohibit default function (move to 'public' if needed) */
145 Linux3AxisEventInterface(const Linux3AxisEventInterface &source);
146 void operator =(const Linux3AxisEventInterface &source);
149 OSG_GEN_MEMOBJPTR(Linux3AxisEventInterface);
151 OSG_END_NAMESPACE
153 #include "OSGLinux3AxisEventInterface.inl"
155 #endif //_OSGLINUX3AXISEVENTINTERFACE_H_