PixelLightAPI  .
Device.h
Go to the documentation of this file.
00001 /*********************************************************\
00002  *  File: Device.h                                       *
00003  *
00004  *  Copyright (C) 2002-2012 The PixelLight Team (http://www.pixellight.org/)
00005  *
00006  *  This file is part of PixelLight.
00007  *
00008  *  PixelLight is free software: you can redistribute it and/or modify
00009  *  it under the terms of the GNU Lesser General Public License as published by
00010  *  the Free Software Foundation, either version 3 of the License, or
00011  *  (at your option) any later version.
00012  *
00013  *  PixelLight is distributed in the hope that it will be useful,
00014  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00016  *  GNU Lesser General Public License for more details.
00017  *
00018  *  You should have received a copy of the GNU Lesser General Public License
00019  *  along with PixelLight. If not, see <http://www.gnu.org/licenses/>.
00020 \*********************************************************/
00021 
00022 
00023 #ifndef __PLINPUT_DEVICE_H__
00024 #define __PLINPUT_DEVICE_H__
00025 #pragma once
00026 
00027 
00028 //[-------------------------------------------------------]
00029 //[ Includes                                              ]
00030 //[-------------------------------------------------------]
00031 #include "PLInput/Input/Controller.h"
00032 
00033 
00034 //[-------------------------------------------------------]
00035 //[ Namespace                                             ]
00036 //[-------------------------------------------------------]
00037 namespace PLInput {
00038 
00039 
00040 //[-------------------------------------------------------]
00041 //[ Forward declarations                                  ]
00042 //[-------------------------------------------------------]
00043 class DeviceImpl;
00044 
00045 
00046 //[-------------------------------------------------------]
00047 //[ Classes                                               ]
00048 //[-------------------------------------------------------]
00049 /**
00050 *  @brief
00051 *    Input device
00052 *
00053 *  @remarks
00054 *    A device is a controller that represents a real input device rather than a virtual controller.
00055 */
00056 class Device : public Controller {
00057 
00058 
00059     //[-------------------------------------------------------]
00060     //[ Class definition                                      ]
00061     //[-------------------------------------------------------]
00062     pl_class(PLINPUT_RTTI_EXPORT, Device, "PLInput", PLInput::Controller, "Real input device")
00063     pl_class_end
00064 
00065 
00066     //[-------------------------------------------------------]
00067     //[ Friends                                               ]
00068     //[-------------------------------------------------------]
00069     friend class DeviceImpl;
00070 
00071 
00072     //[-------------------------------------------------------]
00073     //[ Public functions                                      ]
00074     //[-------------------------------------------------------]
00075     public:
00076         /**
00077         *  @brief
00078         *    Constructor
00079         *
00080         *  @param[in] sName
00081         *    Controller name
00082         *  @param[in] sDescription
00083         *    Controller description
00084         *  @param[in] pImpl
00085         *    System specific device implementation, can, but shouldn't be a null pointer
00086         */
00087         PLINPUT_API Device(const PLCore::String &sName, const PLCore::String &sDescription, DeviceImpl *pImpl);
00088 
00089         /**
00090         *  @brief
00091         *    Destructor
00092         */
00093         PLINPUT_API virtual ~Device();
00094 
00095         /**
00096         *  @brief
00097         *    Get device implementation
00098         *
00099         *  @return
00100         *    System specific device implementation, can be a null pointer
00101         */
00102         PLINPUT_API DeviceImpl *GetImpl() const;
00103 
00104 
00105     //[-------------------------------------------------------]
00106     //[ Protected data                                        ]
00107     //[-------------------------------------------------------]
00108     protected:
00109         DeviceImpl *m_pImpl;        /**< System specific device implementation, can be a null pointer */
00110         bool        m_bDeleteImpl;  /**< Destroy device implementation automatically? */
00111 
00112 
00113 };
00114 
00115 
00116 //[-------------------------------------------------------]
00117 //[ Namespace                                             ]
00118 //[-------------------------------------------------------]
00119 } // PLInput
00120 
00121 
00122 #endif // __PLINPUT_DEVICE_H__


PixelLight PixelLight 0.9.11-R1
Copyright (C) 2002-2012 by The PixelLight Team
Last modified Thu Feb 23 2012 14:08:52
The content of this PixelLight document is published under the
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported