class Warrior{
public:
virtual std::string getDescription() const = 0;
};
PLUMA_PROVIDER_HEADER(Warrior);
#include "Warrior.hpp"
PLUMA_PROVIDER_SOURCE(Warrior, 1, 1);
#include "Warrior.hpp"
class Eagle: public Warrior{
public:
std::string getDescription(){
return "Eagle Warrior: soldier of the sun";
}
};
PLUMA_INHERIT_PROVIDER(Type, BaseType)
PLUMA_INHERIT_PROVIDER(Eagle, Warrior);
#include <Pluma/Pluma.hpp>
#include <Pluma/Connector.hpp>
PLUMA_CONNECTOR
bool connect(pluma::Host& host){
...
}
host.add( new EagleProvider() );
host.add( new JaguarProvider() );
pluma::Pluma manager;
manager.acceptProviderType< WarriorProvider >();
manager.load("plugins", "elite-warriors");
pluma.loadFromFolder("plugins", true);
std::vector<WarriorProvider*> providers;
manager.getProviders(providers);
std::vector<WarriorProvider*>::iterator it;
for (it = providers.begin() ; it != providers.end() ; ++it){
Warrior* warrior = (*it)->create();
std::cout << warrior->getDescription() << std::endl;
delete warrior;
}
▲Windows에서 MinGW 7.3.0 컴파일 후 실행. Plugin.dll (플러그인)을 로드하여 각각 Description을 출력한다.
번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|
15 |
C++를 위한 Lottie 라이브러리 with SDL2
![]() | makersweb | 2021.08.15 | 979 |
14 |
ZeroMQ 를 이용한 Qt 응용프로그램 간 통신
![]() | makersweb | 2021.08.28 | 874 |
13 |
VSCode 와 Qbs 플러그인으로 C/C++ 개발환경 구성
![]() | makersweb | 2021.09.12 | 874 |
12 |
Flutter/Dart 와 Qt/QML 비교
![]() | makersweb | 2021.11.07 | 1441 |
11 |
CopperSpice 에 대해서 (C++ Gui 라이브러리)
![]() | makersweb | 2022.01.02 | 552 |
10 |
Flutter Application 에서 한글(EUC-KR) 깨져서 나오는 문제
![]() | makersweb | 2022.01.06 | 2758 |
9 |
Chromium과 Ozone 층
![]() | makersweb | 2022.03.03 | 754 |
8 |
AGL (Automotive Grade Linux) 개요
![]() | makersweb | 2022.06.19 | 1903 |
7 | OTA 오픈소스 프로젝트 | makersweb | 2022.08.03 | 501 |
6 |
NAppGUI, C언어용 크로스 플랫폼 GUI 라이브러리
![]() | makersweb | 2022.10.10 | 900 |
5 |
Windows에서 Qt Creator + CMake + vcpkg 로 C++ 개발환경 구성 (POCO 라이브러리 DirectoryWatcher 예제)
![]() | makersweb | 2023.01.14 | 724 |
4 |
LVGL 을 통해 GUI 구현 시 한글 폰트 추가
![]() | makersweb | 2023.02.07 | 1237 |
3 |
openFrameworks 한글 폰트 설정 및 출력하기
![]() | makersweb | 2023.02.19 | 226 |
2 |
[NodeGui] JavaScript로 데스크탑 응용프로그램 작성
![]() | makersweb | 2023.02.21 | 1277 |
1 |
Flutter 위젯의 상태관리에 대해서
![]() | makersweb | 2023.04.06 | 468 |