PicoScenes API Docs
 
Loading...
Searching...
No Matches
FrontEndFactory.hxx
Go to the documentation of this file.
1//
2// Created by Zhiping Jiang on 12/31/19.
3//
4
5#ifndef PICOSCENES_PLATFORM_FRONTENDFACTORY_HXX
6#define PICOSCENES_PLATFORM_FRONTENDFACTORY_HXX
7
9
24public:
32 static std::shared_ptr<AbstractFrontEnd> getFrontEndInstance(const std::string &referredInterfaceName);
33
43 static std::shared_ptr<FrontEndT> getTypedFrontEndInstance(const std::string &referredInterfaceName) {
44 auto baseFrontEnd = getFrontEndInstance(referredInterfaceName);
45 auto typedFrontEnd = std::dynamic_pointer_cast<FrontEndT>(baseFrontEnd);
46 return typedFrontEnd;
47 }
48
49private:
54 FrontEndFactory() = default;
55};
56
57
58#endif //PICOSCENES_PLATFORM_FRONTENDFACTORY_HXX
Factory class for creating and managing front-end instances.
static std::shared_ptr< FrontEndT > getTypedFrontEndInstance(const std::string &referredInterfaceName)
Get a typed front-end instance for the specified interface.
static std::shared_ptr< AbstractFrontEnd > getFrontEndInstance(const std::string &referredInterfaceName)
Get a front-end instance for the specified interface.