Sese Framework  2.3.0
A cross-platform framework
Loading...
Searching...
No Matches
Marco.h File Reference

Module utility macros. More...

#include "sese/plugin/ModuleInfo.h"
#include "sese/Util.h"

Go to the source code of this file.

Macros

#define SESE_EXTERN   extern "C"
 
#define GET_MODULE_INFO_FUNC_NAME   getModuleInfo
 
#define GET_CLASS_FACTORY_FUNC_NAME   getFactory
 
#define REGISTER_CLASS(type)
 
#define DEFINE_CLASS_FACTORY(name, version, description)
 

Detailed Description

Module utility macros.

Author
kaoru
Version
1.0

Macro Definition Documentation

◆ DEFINE_CLASS_FACTORY

#define DEFINE_CLASS_FACTORY ( name,
version,
description )
Value:
class name final : public sese::plugin::ClassFactory { \
public: \
name() : ClassFactory() { \
} \
void init() override; \
}; \
static sese::plugin::ModuleInfo info{#name, version, description}; \
return &info; \
} \
static name factory; \
return &factory; \
} \
void name::init()

◆ GET_CLASS_FACTORY_FUNC_NAME

#define GET_CLASS_FACTORY_FUNC_NAME   getFactory

◆ GET_MODULE_INFO_FUNC_NAME

#define GET_MODULE_INFO_FUNC_NAME   getModuleInfo

◆ REGISTER_CLASS

#define REGISTER_CLASS ( type)
Value:
{ \
auto t = &typeid(type); \
auto real_name = sese::getClassName(t); \
this->infoMap[real_name] = {t, [] { return std::make_shared<type>(); }}; \
} \

◆ SESE_EXTERN

#define SESE_EXTERN   extern "C"