Aeon Engine c550894
AeonGames Open Source Game Engine
Loading...
Searching...
No Matches
Plugin.cpp
1/*
2Copyright (C) 2018,2019,2025 Rodrigo Jose Hernandez Cordoba
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15*/
17#include "aeongames/Plugin.hpp"
18#include "aeongames/Component.hpp"
19#include "aeongames/StringId.hpp"
20#include "ModelComponent.h"
21#include "Camera.h"
22#include "PointLight.h"
23#include <iostream>
24
25extern "C"
26{
27 bool AeonEngineComponentsStartUp()
28 {
30 {
31 return std::make_unique<AeonGames::ModelComponent>();
32 } );
34 {
35 return std::make_unique<AeonGames::Camera>();
36 } );
38 {
39 return std::make_unique<AeonGames::PointLight>();
40 } );
41 return true;
42 }
43
44 void AeonEngineComponentsShutdown()
45 {
49 }
50
51 PLUGIN PluginModuleInterface PMI =
52 {
53 "AeonEngine Components",
54 "Default Component Implementations",
55 AeonEngineComponentsStartUp,
56 AeonEngineComponentsShutdown
57 };
58}
Defines the plugin module interface for dynamically loaded plugins.
static const StringId & GetClassId()
Returns the class identifier for the Camera component.
Definition Camera.cpp:31
static const StringId & GetClassId()
Returns the class identifier for the ModelComponent.
static const StringId & GetClassId()
Returns the class identifier for the PointLight component.
DLL bool RegisterComponentConstructor(const StringId &aIdentifier, const std::function< std::unique_ptr< Component >() > &aConstructor)
Registers a Component loader for a specific identifier.
DLL bool UnregisterComponentConstructor(const StringId &aIdentifier)
Unregisters a Component loader for a specific identifier.
Interface that every loadable plugin module must expose.
Definition Plugin.hpp:35