mirror of
https://github.com/zoriya/react-native-omni.git
synced 2026-08-05 21:58:54 +00:00
68 lines
1.8 KiB
C++
Generated
68 lines
1.8 KiB
C++
Generated
///
|
|
/// HybridOmniPlayerFactorySpec.hpp
|
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
/// https://github.com/mrousavy/nitro
|
|
/// Copyright © Marc Rousavy @ Margelo
|
|
///
|
|
|
|
#pragma once
|
|
|
|
#if __has_include(<NitroModules/HybridObject.hpp>)
|
|
#include <NitroModules/HybridObject.hpp>
|
|
#else
|
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
#endif
|
|
|
|
// Forward declaration of `HybridOmniPlayerSpec` to properly resolve imports.
|
|
namespace margelo::nitro::omni { class HybridOmniPlayerSpec; }
|
|
// Forward declaration of `Source` to properly resolve imports.
|
|
namespace margelo::nitro::omni { struct Source; }
|
|
|
|
#include <memory>
|
|
#include "HybridOmniPlayerSpec.hpp"
|
|
#include "Source.hpp"
|
|
|
|
namespace margelo::nitro::omni {
|
|
|
|
using namespace margelo::nitro;
|
|
|
|
/**
|
|
* An abstract base class for `OmniPlayerFactory`
|
|
* Inherit this class to create instances of `HybridOmniPlayerFactorySpec` in C++.
|
|
* You must explicitly call `HybridObject`'s constructor yourself, because it is virtual.
|
|
* @example
|
|
* ```cpp
|
|
* class HybridOmniPlayerFactory: public HybridOmniPlayerFactorySpec {
|
|
* public:
|
|
* HybridOmniPlayerFactory(...): HybridObject(TAG) { ... }
|
|
* // ...
|
|
* };
|
|
* ```
|
|
*/
|
|
class HybridOmniPlayerFactorySpec: public virtual HybridObject {
|
|
public:
|
|
// Constructor
|
|
explicit HybridOmniPlayerFactorySpec(): HybridObject(TAG) { }
|
|
|
|
// Destructor
|
|
~HybridOmniPlayerFactorySpec() override = default;
|
|
|
|
public:
|
|
// Properties
|
|
|
|
|
|
public:
|
|
// Methods
|
|
virtual std::shared_ptr<HybridOmniPlayerSpec> createPlayer(const Source& props) = 0;
|
|
|
|
protected:
|
|
// Hybrid Setup
|
|
void loadHybridMethods() override;
|
|
|
|
protected:
|
|
// Tag for logging
|
|
static constexpr auto TAG = "OmniPlayerFactory";
|
|
};
|
|
|
|
} // namespace margelo::nitro::omni
|