Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/trunk/src/ois/OISFactoryCreator.h @ 2251

Last change on this file since 2251 was 1505, checked in by rgrieder, 17 years ago

f* svn: It doesn't even inform you if you attempt to set a non existing property. It is svn:eol-style and not eol-style when using the command by the way…

  • Property svn:eol-style set to native
File size: 2.4 KB
RevLine 
[1505]1/*
2The zlib/libpng License
3
4Copyright (c) 2005-2007 Phillip Castaneda (pjcast -- www.wreckedgames.com)
5
6This software is provided 'as-is', without any express or implied warranty. In no event will
7the authors be held liable for any damages arising from the use of this software.
8
9Permission is granted to anyone to use this software for any purpose, including commercial
10applications, and to alter it and redistribute it freely, subject to the following
11restrictions:
12
13    1. The origin of this software must not be misrepresented; you must not claim that
14                you wrote the original software. If you use this software in a product,
15                an acknowledgment in the product documentation would be appreciated but is
16                not required.
17
18    2. Altered source versions must be plainly marked as such, and must not be
19                misrepresented as being the original software.
20
21    3. This notice may not be removed or altered from any source distribution.
22*/
23#ifndef OIS_FactoryCreator_H
24#define OIS_FactoryCreator_H
25
26#include "OISPrereqs.h"
27
28namespace OIS
29{
30        /**
31                Interface for creating devices - all devices ultimately get enumerated/created via a factory.
32                A factory can create multiple types of objects.
33        */
34        class _OISExport FactoryCreator
35        {
36        public:
37                /**
38                        @remarks Virtual Destructor
39                */
40                virtual ~FactoryCreator() {};
41
42                /**
43                        @remarks Return a list of all unused devices the factory maintains
44                */
45                virtual DeviceList freeDeviceList() = 0;
46
47                /**
48                        @remarks Number of total devices of requested type
49                        @param iType Type of devices to check
50                */
51                virtual int totalDevices(Type iType) = 0;
52
53                /**
54                        @remarks Number of free devices of requested type
55                        @param iType Type of devices to check
56                */
57                virtual int freeDevices(Type iType) = 0;
58
59                /**
60                        @remarks Does a Type exist with the given vendor name
61                        @param iType Type to check
62                        @param vendor Vendor name to test
63                */
64                virtual bool vendorExist(Type iType, const std::string & vendor) = 0;
65
66                /**
67                        @remarks Creates the object
68                        @param iType Type to create
69                        @param bufferMode True to setup for buffered events
70                        @param vendor Create a device with the vendor name, "" means vendor name is unimportant
71                */
72                virtual Object* createObject(InputManager* creator, Type iType, bool bufferMode, const std::string & vendor = "") = 0;
73
74                /**
75                        @remarks Destroys object
76                        @param obj Object to destroy
77                */
78                virtual void destroyObject(Object* obj) = 0;
79        };
80}
81#endif //OIS_FactoryCreator_H
Note: See TracBrowser for help on using the repository browser.