Ocean
PatternFactory.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) Meta Platforms, Inc. and affiliates.
3  *
4  * This source code is licensed under the MIT license found in the
5  * LICENSE file in the root directory of this source tree.
6  */
7 
8 #ifndef META_OCEAN_DEVICES_PATTERN_FACTORY_H
9 #define META_OCEAN_DEVICES_PATTERN_FACTORY_H
10 
12 
13 #include "ocean/devices/Factory.h"
14 
15 namespace Ocean
16 {
17 
18 namespace Devices
19 {
20 
21 namespace Pattern
22 {
23 
24 /**
25  * This class implements a device factory for the Pattern feature based tracking system.
26  * @ingroup devicespattern
27  */
28 class OCEAN_DEVICES_PATTERN_EXPORT PatternFactory : public Factory
29 {
30  public:
31 
32  /**
33  * Registers this factory at the manager.
34  * Beware: Unregister this factory if not needed anymore.
35  * @return True, if this factory hasn't been registered before
36  */
37  static bool registerFactory();
38 
39  /**
40  * Unregisters this factory at the manger.
41  * This unregistration should be done after all created devices have been released.
42  * @return True, if this factory chould be unregistered
43  */
44  static bool unregisterFactory();
45 
46  private:
47 
48  /**
49  * Creates a new factory.
50  */
52 
53  /**
54  * Creates a tracker object.
55  * @param name The name of the new tracker, must be valid
56  * @param deviceType The device type of the tracker, must be valid
57  * @return New created device object.
58  */
59  static Device* createTracker6DOF(const std::string& name, const Device::DeviceType& deviceType);
60 };
61 
62 }
63 
64 }
65 
66 }
67 
68 #endif // META_OCEAN_DEVICES_PATTERN_FACTORY_H
Definition of a class holding the major and minor device type.
Definition: devices/Device.h:62
This class is the base class for all devices of any type.
Definition: devices/Device.h:28
This class implements a factory able to create instances of devices.
Definition: devices/Factory.h:28
This class implements a device factory for the Pattern feature based tracking system.
Definition: PatternFactory.h:29
static bool unregisterFactory()
Unregisters this factory at the manger.
static bool registerFactory()
Registers this factory at the manager.
static Device * createTracker6DOF(const std::string &name, const Device::DeviceType &deviceType)
Creates a tracker object.
PatternFactory()
Creates a new factory.
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15