fixed: auto_ptr -> unique_ptr
[opensg.git] / Source / Contrib / ComplexSceneManager / Sensor / InterfaceSensors / Devices / OSGLinux2AxisEventInterface.h
blobbe95ec43d96d090dd30dcf07ae46c964d1056174
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 _OSGLINUX2AXISEVENTINTERFACE_H_
40 #define _OSGLINUX2AXISEVENTINTERFACE_H_
41 #ifdef __sgi
42 #pragma once
43 #endif
45 #include "OSGMouseDataDeviceInterface.h"
47 OSG_BEGIN_NAMESPACE
49 class OSG_CONTRIBCSM_DLLMAPPING Linux2AxisEventInterface :
50 public MouseDataDeviceInterface
53 /*========================== PUBLIC =================================*/
55 public:
57 OSG_GEN_INTERNAL_MEMOBJPTR(Linux2AxisEventInterface);
59 /*---------------------------------------------------------------------*/
60 /*! \name Reference Counting */
61 /*! \{ */
63 static ObjTransitPtr get (Char8 *szName, bool bGlobal);
64 static Linux2AxisEventInterface *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 MouseDataDeviceInterface Inherited;
87 static MPThreadType _type;
89 Real32 _rTxRange;
90 Real32 _rTyRange;
92 Int32 _iFileDesc;
93 #ifdef __linux
94 fd_set _rFds;
95 #endif
96 std::string _szPort;
98 /*---------------------------------------------------------------------*/
99 /*! \name Reference Counting */
100 /*! \{ */
102 static BaseThread *create(const Char8 *szName,
103 UInt32 uiId,
104 bool bGlobal);
106 /*! \} */
107 /*---------------------------------------------------------------------*/
108 /*! \name Constructors */
109 /*! \{ */
111 Linux2AxisEventInterface(const Char8 *szName, UInt32 uiId, bool bGlobal);
113 /*! \} */
114 /*---------------------------------------------------------------------*/
115 /*! \name Destructor */
116 /*! \{ */
118 virtual ~Linux2AxisEventInterface(void);
120 /*! \} */
121 /*---------------------------------------------------------------------*/
122 /*! \name Destructor */
123 /*! \{ */
125 virtual void workProc(void);
127 /*! \} */
128 /*---------------------------------------------------------------------*/
129 /*! \name Constructors */
130 /*! \{ */
132 void getRawData(void);
134 /*! \} */
135 /*========================== PRIVATE ================================*/
137 private:
139 /*!\brief prohibit default function (move to 'public' if needed) */
140 Linux2AxisEventInterface(const Linux2AxisEventInterface &source);
141 void operator =(const Linux2AxisEventInterface &source);
144 OSG_GEN_MEMOBJPTR(Linux2AxisEventInterface);
146 OSG_END_NAMESPACE
148 #include "OSGLinux2AxisEventInterface.inl"
150 #endif //_OSGLINUX2AXISEVENTINTERFACE_H_