Bool HsPlayer::RegisterModules() { #define REGISTER_MODULE(module_name) { m_vModule.push_back(new HsPlayer##module_name(this, #module_name)); } REGISTER_MODULE(LoginModule); #undef REGISTER_MODULE return true; }
NF_EXPORT void DllStartPlugin( NFIPluginManager* pm ) { #if NF_PLATFORM == NF_PLATFORM_WIN SetConsoleTitle( "NFSLG" ); #endif CREATE_PLUGIN( pm, NFSLGPlugin ) }; NF_EXPORT void DllStopPlugin( NFIPluginManager* pm ) { DESTROY_PLUGIN( pm, NFSLGPlugin ) }; #endif ////////////////////////////////////////////////////////////////////////// const int NFSLGPlugin::GetPluginVersion() { return 0; } const std::string NFSLGPlugin::GetPluginName() { return GET_CLASS_NAME( NFSLGPlugin ) } void NFSLGPlugin::Install() { REGISTER_MODULE( pPluginManager, NFCSLGModule ) REGISTER_MODULE( pPluginManager, NFCSLGBuildingModule ) REGISTER_MODULE( pPluginManager, NFCSLGShopModule ) } void NFSLGPlugin::Uninstall() { UNREGISTER_MODULE( pPluginManager, NFCSLGShopModule ) UNREGISTER_MODULE( pPluginManager, NFCSLGBuildingModule ) UNREGISTER_MODULE( pPluginManager, NFCSLGModule ) }
int32_t luaopen_chuck(lua_State *L) { signal(SIGPIPE,SIG_IGN); lua_newtable(L); REGISTER_MODULE(L,"timer",register_timer); REGISTER_MODULE(L,"event_loop",register_event_loop); REGISTER_MODULE(L,"socket",register_socket); REGISTER_MODULE(L,"redis",register_redis); REGISTER_MODULE(L,"buffer",register_buffer); REGISTER_MODULE(L,"packet",register_packet); return 1; }
NF_EXPORT void DllStartPlugin(NFIPluginManager* pm) { #if NF_PLATFORM == NF_PLATFORM_WIN SetConsoleTitle("Tutorial5"); #endif CREATE_PLUGIN(pm, Tutorial5Plugin) }; NF_EXPORT void DllStopPlugin(NFIPluginManager* pm) { DESTROY_PLUGIN(pm, Tutorial5Plugin) }; #endif ////////////////////////////////////////////////////////////////////////// const int Tutorial5Plugin::GetPluginVersion() { return 0; } const std::string Tutorial5Plugin::GetPluginName() { return GET_CLASS_NAME(Tutorial5Plugin) } void Tutorial5Plugin::Install() { REGISTER_MODULE(pPluginManager, HelloWorld5Module, HelloWorld5Module) REGISTER_COMPONENT(pPluginManager, NFCTestComponent) } void Tutorial5Plugin::Uninstall() { UNREGISTER_COMPONENT(pPluginManager, NFCTestComponent) UNREGISTER_MODULE(pPluginManager, HelloWorld5Module, HelloWorld5Module) }
BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: REGISTER_MODULE(hModule); // to be able to use the resources //START_FACTORY_INIT(); REGISTER_OBJECT_TO_FACTORY(CSpaceMouse); break; case DLL_THREAD_ATTACH: break; case DLL_THREAD_DETACH: break; case DLL_PROCESS_DETACH: break; } return TRUE; }
NF_EXPORT void DllStartPlugin(NFIPluginManager* pm) { #if NF_PLATFORM == NF_PLATFORM_WIN SetConsoleTitle("NFMasterServer"); #endif CREATE_PLUGIN(pm, NFMasterServerPlugin) //std::cout << "DllStartPlugin::thread id=" << GetCurrentThreadId() << std::endl; }; NF_EXPORT void DllStopPlugin(NFIPluginManager* pm) { DESTROY_PLUGIN(pm, NFMasterServerPlugin) }; #endif ////////////////////////////////////////////////////////////////////////// const int NFMasterServerPlugin::GetPluginVersion() { return 0; } const std::string NFMasterServerPlugin::GetPluginName() { return GET_CLASS_NAME(NFMasterServerPlugin) } void NFMasterServerPlugin::Install() { REGISTER_MODULE(pPluginManager, NFCMasterModule) } void NFMasterServerPlugin::Uninstall() { UNREGISTER_MODULE(pPluginManager, NFCMasterModule) }
NF_EXPORT void DllStartPlugin(NFIPluginManager* pm) { #if NF_PLATFORM == NF_PLATFORM_WIN SetConsoleTitle("NFLoginServer"); #endif CREATE_PLUGIN(pm, NFLoginLogicPlugin) }; NF_EXPORT void DllStopPlugin(NFIPluginManager* pm) { DESTROY_PLUGIN(pm, NFLoginLogicPlugin) }; #endif ////////////////////////////////////////////////////////////////////////// const int NFLoginLogicPlugin::GetPluginVersion() { return 0; } const std::string NFLoginLogicPlugin::GetPluginName() { GET_PLUGIN_NAME(NFLoginLogicPlugin) } void NFLoginLogicPlugin::Install() { REGISTER_MODULE(pPluginManager, NFCLoginLogicModule) } void NFLoginLogicPlugin::Uninstall() { UNREGISTER_MODULE(pPluginManager, NFCLoginLogicModule) }
NF_EXPORT void DllStartPlugin(NFIPluginManager* pm) { #if NF_PLATFORM == NF_PLATFORM_WIN SetConsoleTitle("Tutorial6"); #endif CREATE_PLUGIN(pm, Tutorial6Plugin) }; NF_EXPORT void DllStopPlugin(NFIPluginManager* pm) { DESTROY_PLUGIN(pm, Tutorial6Plugin) }; #endif ////////////////////////////////////////////////////////////////////////// const int Tutorial6Plugin::GetPluginVersion() { return 0; } const std::string Tutorial6Plugin::GetPluginName() { GET_PLUGIN_NAME(Tutorial6Plugin) } void Tutorial6Plugin::Install() { REGISTER_MODULE(pPluginManager, HelloWorld6Module) } void Tutorial6Plugin::Uninstall() { UNREGISTER_MODULE(pPluginManager, HelloWorld6Module) }
CREATE_PLUGIN(pm, NFAIPlugin) }; NF_EXPORT void DllStopPlugin(NFIPluginManager* pm) { DESTROY_PLUGIN(pm, NFAIPlugin) }; #endif ////////////////////////////////////////////////////////////////////////// const int NFAIPlugin::GetPluginVersion() { return 0; } const std::string NFAIPlugin::GetPluginName() { return GET_CLASS_NAME(NFAIPlugin) } void NFAIPlugin::Install() { REGISTER_MODULE(pPluginManager, NFCAIModule) } void NFAIPlugin::Uninstall() { UNREGISTER_MODULE(pPluginManager, NFCAIModule) }
{ DESTROY_PLUGIN(pm, NFKernelPlugin) }; #endif ////////////////////////////////////////////////////////////////////////// const int NFKernelPlugin::GetPluginVersion() { return 0; } const std::string NFKernelPlugin::GetPluginName() { return GET_CLASS_NAME(NFKernelPlugin) } void NFKernelPlugin::Install() { REGISTER_MODULE(pPluginManager, NFIUUIDModule, NFCUUIDModule) REGISTER_MODULE(pPluginManager, NFISceneModule, NFCSceneModule) REGISTER_MODULE(pPluginManager, NFIKernelModule, NFCKernelModule) } void NFKernelPlugin::Uninstall() { UNREGISTER_MODULE(pPluginManager, NFIKernelModule, NFCKernelModule) UNREGISTER_MODULE(pPluginManager, NFISceneModule, NFCSceneModule) UNREGISTER_MODULE(pPluginManager, NFIUUIDModule, NFCUUIDModule) }
void YogBuiltins_boot(YogEnv* env, YogHandle* builtins) { SAVE_LOCALS(env); YogVal errno_ = YUNDEF; YogVal e = YUNDEF; PUSH_LOCALS2(env, errno_, e); #define DEFINE_FUNCTION(name, f) do { \ YogPackage_define_function(env, HDL2VAL(builtins), name, f); \ } while (0) DEFINE_FUNCTION("classmethod", classmethod); DEFINE_FUNCTION("disable_gc_stress", disable_gc_stress); DEFINE_FUNCTION("enable_gc_stress", enable_gc_stress); DEFINE_FUNCTION("get_current_thread", get_current_thread); DEFINE_FUNCTION("include_module", include_module); DEFINE_FUNCTION("join_path", join_path); DEFINE_FUNCTION("property", property); DEFINE_FUNCTION("puts", puts_); DEFINE_FUNCTION("raise_exception", raise_exception); #undef DEFINE_FUNCTION #define DEFINE_FUNCTION2(name, f, ...) do { \ YogPackage_define_function2(env, builtins, (name), (f), __VA_ARGS__); \ } while (0) DEFINE_FUNCTION2("import_package", import_package, "name", NULL); DEFINE_FUNCTION2("load_lib", load_lib, "path", NULL); DEFINE_FUNCTION2("locals", locals, NULL); DEFINE_FUNCTION2("major_gc", major_gc, NULL); DEFINE_FUNCTION2("minor_gc", minor_gc, NULL); DEFINE_FUNCTION2("mkdir", mkdir_, "path", NULL); DEFINE_FUNCTION2("print", print, "*", NULL); #undef DEFINE_FUNCTION2 #define REGISTER_CLASS(c) do { \ YogVal klass = env->vm->c; \ ID name = PTR_AS(YogClass, klass)->name; \ YogObj_set_attr_id(env, HDL2VAL(builtins), name, klass); \ } while (0) REGISTER_CLASS(cArray); REGISTER_CLASS(cBinary); REGISTER_CLASS(cBuffer); REGISTER_CLASS(cCoroutine); REGISTER_CLASS(cDatetime); REGISTER_CLASS(cDict); REGISTER_CLASS(cDir); REGISTER_CLASS(cFile); REGISTER_CLASS(cInt); REGISTER_CLASS(cObject); REGISTER_CLASS(cPath); REGISTER_CLASS(cPointer); REGISTER_CLASS(cProcess); REGISTER_CLASS(cRegexp); REGISTER_CLASS(cSet); REGISTER_CLASS(cString); REGISTER_CLASS(cStructClass); REGISTER_CLASS(cSymbol); REGISTER_CLASS(cThread); REGISTER_CLASS(cUnionClass); REGISTER_CLASS(eAttributeError); REGISTER_CLASS(eException); REGISTER_CLASS(eImportError); REGISTER_CLASS(eIndexError); REGISTER_CLASS(eKeyError); REGISTER_CLASS(eNotImplementedError); REGISTER_CLASS(eSyntaxError); REGISTER_CLASS(eSystemError); REGISTER_CLASS(eValueError); #undef REGISTER_CLASS #define REGISTER_MODULE(m) do { \ YogVal mod = env->vm->m; \ ID name = PTR_AS(YogModule, mod)->name; \ YogObj_set_attr_id(env, HDL2VAL(builtins), name, mod); \ } while (0) REGISTER_MODULE(mComparable); REGISTER_MODULE(mEnumerable); #undef REGISTER_MODULE e = YogEnv_new(env); YogObj_set_attr(env, HDL2VAL(builtins), "ENV", e); YogObj_set_attr(env, HDL2VAL(builtins), "ENCODINGS", env->vm->encodings); YogVal enc = env->vm->default_encoding; YogObj_set_attr(env, HDL2VAL(builtins), "DEFAULT_ENCODING", enc); YogVal STDIN = create_stdio(env, stdin); YogObj_set_attr(env, HDL2VAL(builtins), "STDIN", STDIN); YogVal STDOUT = create_stdio(env, stdout); YogObj_set_attr(env, HDL2VAL(builtins), "STDOUT", STDOUT); YogVal STDERR = create_stdio(env, stderr); YogObj_set_attr(env, HDL2VAL(builtins), "STDERR", STDERR); set_path_separator(env, builtins); #define REGISTER_ERRNO(e) do { \ errno_ = YogVal_from_int(env, (e)); \ YogObj_set_attr(env, HDL2VAL(builtins), #e, errno_); \ } while (0) #include "errno.inc" #undef REGISTER_ERRNO const char* src = #include "builtins.inc" ; YogMisc_eval_source(env, builtins, src); RETURN_VOID(env); }
void moFactory::init() { // Keep the alphabetical order when adding new modules! REGISTER_MODULE(Amplify); REGISTER_MODULE(BackgroundSubtract); REGISTER_MODULE(BinaryMask); REGISTER_MODULE(BlobFinder) REGISTER_MODULE(Calibration); REGISTER_MODULE(Camera); REGISTER_MODULE(Canny); REGISTER_MODULE(Combine); REGISTER_MODULE(Dilate); REGISTER_MODULE(DistanceTransform); REGISTER_MODULE(Dump); REGISTER_MODULE(Erode); REGISTER_MODULE(EqualizeHist); REGISTER_MODULE(FiducialFinder); REGISTER_MODULE(FingerTipFinder); REGISTER_MODULE(GrayScale); REGISTER_MODULE(GreedyBlobTracker); REGISTER_MODULE(Highpass); REGISTER_MODULE(Hsv); REGISTER_MODULE(HuObjectFinder); REGISTER_MODULE(Image); REGISTER_MODULE(ImageDisplay); REGISTER_MODULE(Invert); REGISTER_MODULE(Justify); REGISTER_MODULE(Mask); REGISTER_MODULE(MirrorImage); REGISTER_MODULE(MunkresBlobTracker); REGISTER_MODULE(PeakFinder); REGISTER_MODULE(Roi); REGISTER_MODULE(Smooth); REGISTER_MODULE(Threshold); REGISTER_MODULE(Tuio); REGISTER_MODULE(Tuio2); REGISTER_MODULE(Video); REGISTER_MODULE(YCrCbThreshold); //DoNotRemoveThisComment LOG(MO_INFO, "registered " << moFactory::getInstance()->list().size() << " modules"); }
NF_EXPORT void DllStopPlugin(NFIPluginManager* pm) { DESTROY_PLUGIN(pm, Tutorial3Plugin) }; #endif ////////////////////////////////////////////////////////////////////////// const int Tutorial3Plugin::GetPluginVersion() { return 0; } const std::string Tutorial3Plugin::GetPluginName() { return GET_CLASS_NAME(Tutorial3Plugin); } void Tutorial3Plugin::Install() { REGISTER_MODULE(pPluginManager, HelloWorld3Module, HelloWorld3Module) } void Tutorial3Plugin::Uninstall() { UNREGISTER_MODULE(pPluginManager, HelloWorld3Module, HelloWorld3Module) }
NF_EXPORT void DllStopPlugin(NFIPluginManager* pm) { DESTROY_PLUGIN(pm, NFMasterServerPlugin) }; #endif ////////////////////////////////////////////////////////////////////////// const int NFMasterServerPlugin::GetPluginVersion() { return 0; } const std::string NFMasterServerPlugin::GetPluginName() { return GET_CLASS_NAME(NFMasterServerPlugin); } void NFMasterServerPlugin::Install() { REGISTER_MODULE(pPluginManager, NFIMasterModule, NFCMasterModule) } void NFMasterServerPlugin::Uninstall() { UNREGISTER_MODULE(pPluginManager, NFIMasterModule, NFCMasterModule) }
#include "AFWorldNetClientPlugin.h" #include "AFCWorldToMasterModule.h" #ifdef ARK_DYNAMIC_PLUGIN ARK_DLL_PLUGIN_ENTRY(AFWorldNetClientPlugin) ARK_DLL_PLUGIN_EXIT(AFWorldNetClientPlugin) #endif ////////////////////////////////////////////////////////////////////////// int AFWorldNetClientPlugin::GetPluginVersion() { return 0; } const std::string AFWorldNetClientPlugin::GetPluginName() { return GET_CLASS_NAME(AFWorldNetClientPlugin) } void AFWorldNetClientPlugin::Install() { REGISTER_MODULE(pPluginManager, AFIWorldToMasterModule, AFCWorldToMasterModule) } void AFWorldNetClientPlugin::Uninstall() { UNREGISTER_MODULE(pPluginManager, AFIWorldToMasterModule, AFCWorldToMasterModule) }
{ CREATE_PLUGIN(pm, NFWorldLogicPlugin) }; NF_EXPORT void DllStopPlugin(NFIPluginManager* pm) { DESTROY_PLUGIN(pm, NFWorldLogicPlugin) }; ////////////////////////////////////////////////////////////////////////// const int NFWorldLogicPlugin::GetPluginVersion() { return 0; } const std::string NFWorldLogicPlugin::GetPluginName() { return GET_CLASS_NAME(NFWorldLogicPlugin); } void NFWorldLogicPlugin::Install() { REGISTER_MODULE(pPluginManager, NFIWorldLogicModule, NFCWorldLogicModule) } void NFWorldLogicPlugin::Uninstall() { UNREGISTER_MODULE(pPluginManager, NFIWorldLogicModule, NFCWorldLogicModule) }
CREATE_PLUGIN(pm, NFLogPlugin) }; NF_EXPORT void DllStopPlugin(NFIPluginManager* pm) { DESTROY_PLUGIN(pm, NFLogPlugin) }; #endif ////////////////////////////////////////////////////////////////////////// const int NFLogPlugin::GetPluginVersion() { return 0; } const std::string NFLogPlugin::GetPluginName() { return GET_CLASS_NAME(NFLogPlugin); } void NFLogPlugin::Install() { REGISTER_MODULE(pPluginManager, NFILogModule, NFLogModule) } void NFLogPlugin::Uninstall() { UNREGISTER_MODULE(pPluginManager, NFILogModule, NFLogModule) }
CREATE_PLUGIN(pm, Tutorial1) }; NF_EXPORT void DllStopPlugin(NFIPluginManager* pm) { DESTROY_PLUGIN(pm, Tutorial1) }; #endif ////////////////////////////////////////////////////////////////////////// const int Tutorial1::GetPluginVersion() { return 0; } const std::string Tutorial1::GetPluginName() { return GET_CLASS_NAME(Tutorial1); } void Tutorial1::Install() { REGISTER_MODULE(pPluginManager, HelloWorld1, HelloWorld1) } void Tutorial1::Uninstall() { UNREGISTER_MODULE(pPluginManager, HelloWorld1, HelloWorld1) }
static struct audio_desc audio_play_jack_query_format(void *state, struct audio_desc desc) { struct state_jack_playback *s = (struct state_jack_playback *) state; return (struct audio_desc){4, s->jack_sample_rate, min(s->jack_ports_count, desc.ch_count), AC_PCM}; } static int audio_play_jack_reconfigure(void *state, struct audio_desc desc) { struct state_jack_playback *s = (struct state_jack_playback *) state; const char **ports; int i; assert(desc.bps == 4 && desc.sample_rate == s->jack_sample_rate && desc.codec == AC_PCM); jack_deactivate(s->client); ports = jack_get_ports(s->client, s->jack_ports_pattern, NULL, JackPortIsInput); if(ports == NULL) { fprintf(stderr, "[JACK playback] Unable to input ports matching %s.\n", s->jack_ports_pattern); return FALSE; } if(desc.ch_count > s->jack_ports_count) { fprintf(stderr, "[JACK playback] Warning: received %d audio channels, JACK can process only %d.", desc.ch_count, s->jack_ports_count); } for(i = 0; i < MAX_PORTS; ++i) { ring_buffer_destroy(s->data[i]); s->data[i] = NULL; } /* for all channels previously connected */ for(i = 0; i < desc.ch_count; ++i) { jack_disconnect(s->client, jack_port_name (s->output_port[i]), ports[i]); fprintf(stderr, "[JACK playback] Port %d: %s\n", i, ports[i]); } free(s->channel); free(s->converted); s->desc.bps = desc.bps; s->desc.ch_count = desc.ch_count; s->desc.sample_rate = desc.sample_rate; s->channel = malloc(s->desc.bps * desc.sample_rate); s->converted = (float *) malloc(desc.sample_rate * sizeof(float)); for(i = 0; i < desc.ch_count; ++i) { s->data[i] = ring_buffer_init(sizeof(float) * s->jack_sample_rate); } if(jack_activate(s->client)) { fprintf(stderr, "[JACK capture] Cannot activate client.\n"); return FALSE; } for(i = 0; i < desc.ch_count; ++i) { if (jack_connect (s->client, jack_port_name (s->output_port[i]), ports[i])) { fprintf (stderr, "Cannot connect output port: %d.\n", i); return FALSE; } } free(ports); return TRUE; } static void audio_play_jack_put_frame(void *state, struct audio_frame *frame) { struct state_jack_playback *s = (struct state_jack_playback *) state; assert(frame->bps == 4); int channel_size = frame->data_len / frame->ch_count; for (int i = 0; i < frame->ch_count; ++i) { demux_channel(s->channel, frame->data, frame->bps, frame->data_len, frame->ch_count, i); int2float((char *) s->converted, (char *) s->channel, channel_size); ring_buffer_write(s->data[i], (char *) s->converted, channel_size); } } static void audio_play_jack_done(void *state) { struct state_jack_playback *s = (struct state_jack_playback *) state; int i; jack_client_close(s->client); free(s->channel); free(s->converted); free(s->jack_ports_pattern); for(i = 0; i < MAX_PORTS; ++i) { ring_buffer_destroy(s->data[i]); } free(s); } static const struct audio_playback_info aplay_jack_info = { audio_play_jack_help, audio_play_jack_init, audio_play_jack_put_frame, audio_play_jack_query_format, audio_play_jack_reconfigure, audio_play_jack_done }; REGISTER_MODULE(jack, &aplay_jack_info, LIBRARY_CLASS_AUDIO_PLAYBACK, AUDIO_PLAYBACK_ABI_VERSION);
////////////////////////////////////////////////////////////////////////// const int NFKernelPlugin::GetPluginVersion() { return 0; } const std::string NFKernelPlugin::GetPluginName() { return GET_CLASS_NAME(NFKernelPlugin); } void NFKernelPlugin::Install() { REGISTER_MODULE(pPluginManager, NFISceneAOIModule, NFCSceneAOIModule) REGISTER_MODULE(pPluginManager, NFIKernelModule, NFCKernelModule) REGISTER_MODULE(pPluginManager, NFIEventModule, NFCEventModule) REGISTER_MODULE(pPluginManager, NFIScheduleModule, NFCScheduleModule) REGISTER_MODULE(pPluginManager, NFIDataTailModule, NFCDataTailModule) /* REGISTER_TEST_MODULE(pPluginManager, NFISceneAOIModule, NFCSceneAOITestModule) REGISTER_TEST_MODULE(pPluginManager, NFIKernelModule, NFCKernelTestModule) REGISTER_TEST_MODULE(pPluginManager, NFIEventModule, NFCEventTestModule) REGISTER_TEST_MODULE(pPluginManager, NFIScheduleModule, NFCScheduleTestModule) */ } void NFKernelPlugin::Uninstall() {
}; NF_EXPORT void DllStopPlugin(NFIPluginManager* pm) { DESTROY_PLUGIN(pm, NFScalePlugin) }; #endif ////////////////////////////////////////////////////////////////////////// const int NFScalePlugin::GetPluginVersion() { return 0; } const std::string NFScalePlugin::GetPluginName() { return GET_CLASS_NAME(NFScalePlugin); } void NFScalePlugin::Install() { REGISTER_MODULE(pPluginManager, NFIScaleModule, NFScaleModule) } void NFScalePlugin::Uninstall() { UNREGISTER_MODULE(pPluginManager, NFIScaleModule, NFScaleModule) }
//3. Register module: sets name, type (if provided), and associates name to list. // Available types: ACQUISITION, INITIALIZATION, SEGMENTATION, TRACKING, ANALYSIS, OTHER void VideoAnalysis::setAvailableModules() { REGISTER_MODULE(AcquisitionCameraModule, ACQUISITION); REGISTER_MODULE(AcquisitionModule, ACQUISITION); REGISTER_MODULE(ETISEOAcquisitionModule, ACQUISITION); REGISTER_MODULE(ContextModule, INITIALIZATION); REGISTER_MODULE(FakeSegmentationModule, SEGMENTATION); REGISTER_MODULE(segmentationModule, SEGMENTATION); REGISTER_MODULE(BackgroundInitializationModule, SEGMENTATION); REGISTER_MODULE(ConnectedComponentsTwoStepsModule, SEGMENTATION); REGISTER_MODULE(ConnectedComponentsRLEModule, SEGMENTATION); REGISTER_MODULE(FakeTrackingModule, TRACKING); REGISTER_MODULE(trackingModule, TRACKING); REGISTER_MODULE(ReliabilityTracking2DModule, TRACKING); REGISTER_MODULE(ReliabilityTrackingModule, TRACKING); REGISTER_MODULE(ReliabilityMultiModelTrackingModule, TRACKING); REGISTER_MODULE(OpencvTracking, TRACKING); REGISTER_MODULE(BlobFilteringModule, OTHER); REGISTER_MODULE(ETISEOOutputModule, OTHER); REGISTER_MODULE(IncrementalEventLearningModule, ANALYSIS); REGISTER_MODULE(ObjectFilteringModule, OTHER); REGISTER_MODULE(PlanarStatisticsModule, OTHER); REGISTER_MODULE(regionalSegmentationModule, SEGMENTATION); REGISTER_MODULE(HullToObjectModule, ANALYSIS); REGISTER_MODULE(DeguObjectModule, ANALYSIS); REGISTER_MODULE(PersonalityModule, OTHER); REGISTER_MODULE(segmentationWithColorFilterModule, SEGMENTATION); REGISTER_MODULE(MorphologyModule, SEGMENTATION); REGISTER_MODULE(ViBeModule, SEGMENTATION); REGISTER_MODULE(GrayCodeModule, OTHER); REGISTER_MODULE(HMTrackingModule, TRACKING); }
}; NF_EXPORT void DllStopPlugin(NFIPluginManager* pm) { DESTROY_PLUGIN(pm, NFLoginNet_ServerPlugin) }; #endif ////////////////////////////////////////////////////////////////////////// const int NFLoginNet_ServerPlugin::GetPluginVersion() { return 0; } const std::string NFLoginNet_ServerPlugin::GetPluginName() { return GET_CLASS_NAME(NFLoginNet_ServerPlugin) } void NFLoginNet_ServerPlugin::Install() { REGISTER_MODULE(pPluginManager, NFCLoginNet_ServerModule) } void NFLoginNet_ServerPlugin::Uninstall() { UNREGISTER_MODULE(pPluginManager, NFCLoginNet_ServerModule) }
NF_EXPORT void DllStopPlugin(NFIPluginManager* pm) { DESTROY_PLUGIN(pm, NFSkillPlugin) }; #endif ////////////////////////////////////////////////////////////////////////// const int NFSkillPlugin::GetPluginVersion() { return 0; } const std::string NFSkillPlugin::GetPluginName() { return GET_CLASS_NAME(NFSkillPlugin); } void NFSkillPlugin::Install() { REGISTER_MODULE(pPluginManager, NFISkillConsumeManagerModule, NFCSkillConsumeManagerModule) REGISTER_MODULE(pPluginManager, NFISkillModule, NFCSkillModule) } void NFSkillPlugin::Uninstall() { UNREGISTER_MODULE(pPluginManager, NFISkillModule, NFCSkillModule) UNREGISTER_MODULE(pPluginManager, NFISkillConsumeManagerModule, NFCSkillConsumeManagerModule) }
}; NF_EXPORT void DllStopPlugin(NFIPluginManager* pm) { DESTROY_PLUGIN(pm, NFGameServerNet_ServerPlugin) }; #endif ////////////////////////////////////////////////////////////////////////// const int NFGameServerNet_ServerPlugin::GetPluginVersion() { return 0; } const std::string NFGameServerNet_ServerPlugin::GetPluginName() { return GET_CLASS_NAME(NFGameServerNet_ServerPlugin) } void NFGameServerNet_ServerPlugin::Install() { REGISTER_MODULE(pPluginManager, NFCGameServerNet_ServerModule) } void NFGameServerNet_ServerPlugin::Uninstall() { UNREGISTER_MODULE(pPluginManager, NFCGameServerNet_ServerModule) }
////////////////////////////////////////////////////////////////////////// const int NFGameLogicPlugin::GetPluginVersion() { return 0; } const std::string NFGameLogicPlugin::GetPluginName() { GET_PLUGIN_NAME( NFGameLogicPlugin ) } void NFGameLogicPlugin::Install() { REGISTER_MODULE( pPluginManager, NFCGameLogicModule ) REGISTER_MODULE( pPluginManager, NFCBuffModule ) REGISTER_MODULE( pPluginManager, NFCItemModule ) REGISTER_MODULE( pPluginManager, NFCPackModule ) REGISTER_MODULE( pPluginManager, NFCSkillModule ) REGISTER_MODULE( pPluginManager, NFCRebornItemConsumeProcessModule ) REGISTER_MODULE( pPluginManager, NFCItemConsumeManagerModule ) REGISTER_MODULE( pPluginManager, NFCPotionItemConsumeProcessModule ) REGISTER_MODULE( pPluginManager, NFCCardItemConsumeProcessModule ) //Continue to add other item types of consumption REGISTER_MODULE( pPluginManager, NFCSkillConsumeManagerModule ) REGISTER_MODULE( pPluginManager, NFCBriefSkillConsumeProcessModule ) REGISTER_MODULE( pPluginManager, NFCBulletSkillConsumeProcessModule )
#endif ////////////////////////////////////////////////////////////////////////// const int NFDBLogicPlugin::GetPluginVersion() { return 0; } const std::string NFDBLogicPlugin::GetPluginName() { return GET_CLASS_NAME(NFDBLogicPlugin); } void NFDBLogicPlugin::Install() { REGISTER_MODULE(pPluginManager, NFIRankRedisModule, NFRankRedisModule) REGISTER_MODULE(pPluginManager, NFIPlayerRedisModule, NFPlayerRedisModule) REGISTER_MODULE(pPluginManager, NFIClanRedisModule, NFClanRedisModule) REGISTER_MODULE(pPluginManager, NFIBigMapRedisModule, NFBigMapRedisModule) REGISTER_MODULE(pPluginManager, NFICommonRedisModule, NFCommonRedisModule) REGISTER_MODULE(pPluginManager, NFIMailRedisModule, NFMailRedisModule) REGISTER_MODULE(pPluginManager, NFIAccountRedisModule, NFAccountRedisModule) } void NFDBLogicPlugin::Uninstall() { UNREGISTER_MODULE(pPluginManager, NFIAccountRedisModule, NFAccountRedisModule) UNREGISTER_MODULE(pPluginManager, NFIMailRedisModule, NFMailRedisModule) UNREGISTER_MODULE(pPluginManager, NFICommonRedisModule, NFCommonRedisModule) UNREGISTER_MODULE(pPluginManager, NFIBigMapRedisModule, NFBigMapRedisModule) UNREGISTER_MODULE(pPluginManager, NFIClanRedisModule, NFClanRedisModule)
NF_EXPORT void DllStopPlugin(NFIPluginManager* pm) { DESTROY_PLUGIN(pm, NFDataNoSqlPlugin) }; #endif ////////////////////////////////////////////////////////////////////////// const int NFDataNoSqlPlugin::GetPluginVersion() { return 0; } const std::string NFDataNoSqlPlugin::GetPluginName() { return GET_CLASS_NAME(NFDataNoSqlPlugin) } void NFDataNoSqlPlugin::Install() { //因为有好几个进程都在用此插件,隐藏此插件不能设置Title //SetConsoleTitle( "NFDataBaseServer" ); REGISTER_MODULE(pPluginManager, NFCDataNoSqlModule) REGISTER_MODULE(pPluginManager, NFCPlatformDataModule) } void NFDataNoSqlPlugin::Uninstall() { UNREGISTER_MODULE(pPluginManager, NFCPlatformDataModule) UNREGISTER_MODULE(pPluginManager, NFCDataNoSqlModule) }
void osd_common_t::register_options() { REGISTER_MODULE(m_mod_man, FONT_OSX); REGISTER_MODULE(m_mod_man, FONT_WINDOWS); REGISTER_MODULE(m_mod_man, FONT_DWRITE); REGISTER_MODULE(m_mod_man, FONT_SDL); REGISTER_MODULE(m_mod_man, FONT_NONE); REGISTER_MODULE(m_mod_man, SOUND_XAUDIO2); REGISTER_MODULE(m_mod_man, SOUND_DSOUND); REGISTER_MODULE(m_mod_man, SOUND_COREAUDIO); REGISTER_MODULE(m_mod_man, SOUND_JS); REGISTER_MODULE(m_mod_man, SOUND_SDL); REGISTER_MODULE(m_mod_man, SOUND_NONE); REGISTER_MODULE(m_mod_man, MONITOR_SDL); REGISTER_MODULE(m_mod_man, MONITOR_WIN32); REGISTER_MODULE(m_mod_man, MONITOR_DXGI); #ifdef SDLMAME_MACOSX REGISTER_MODULE(m_mod_man, DEBUG_OSX); #endif #ifndef OSD_MINI REGISTER_MODULE(m_mod_man, DEBUG_WINDOWS); REGISTER_MODULE(m_mod_man, DEBUG_QT); REGISTER_MODULE(m_mod_man, DEBUG_IMGUI); REGISTER_MODULE(m_mod_man, DEBUG_NONE); #endif REGISTER_MODULE(m_mod_man, NETDEV_TAPTUN); REGISTER_MODULE(m_mod_man, NETDEV_PCAP); REGISTER_MODULE(m_mod_man, NETDEV_NONE); #ifndef NO_USE_MIDI REGISTER_MODULE(m_mod_man, MIDI_PM); #endif REGISTER_MODULE(m_mod_man, MIDI_NONE); REGISTER_MODULE(m_mod_man, KEYBOARDINPUT_SDL); REGISTER_MODULE(m_mod_man, KEYBOARDINPUT_RAWINPUT); REGISTER_MODULE(m_mod_man, KEYBOARDINPUT_DINPUT); REGISTER_MODULE(m_mod_man, KEYBOARDINPUT_WIN32); REGISTER_MODULE(m_mod_man, KEYBOARD_NONE); REGISTER_MODULE(m_mod_man, MOUSEINPUT_SDL); REGISTER_MODULE(m_mod_man, MOUSEINPUT_RAWINPUT); REGISTER_MODULE(m_mod_man, MOUSEINPUT_DINPUT); REGISTER_MODULE(m_mod_man, MOUSEINPUT_WIN32); REGISTER_MODULE(m_mod_man, MOUSE_NONE); REGISTER_MODULE(m_mod_man, LIGHTGUN_X11); REGISTER_MODULE(m_mod_man, LIGHTGUNINPUT_RAWINPUT); REGISTER_MODULE(m_mod_man, LIGHTGUNINPUT_WIN32); REGISTER_MODULE(m_mod_man, LIGHTGUN_NONE); REGISTER_MODULE(m_mod_man, JOYSTICKINPUT_SDL); REGISTER_MODULE(m_mod_man, JOYSTICKINPUT_WINHYBRID); REGISTER_MODULE(m_mod_man, JOYSTICKINPUT_DINPUT); REGISTER_MODULE(m_mod_man, JOYSTICKINPUT_XINPUT); REGISTER_MODULE(m_mod_man, JOYSTICK_NONE); REGISTER_MODULE(m_mod_man, OUTPUT_NONE); REGISTER_MODULE(m_mod_man, OUTPUT_CONSOLE); REGISTER_MODULE(m_mod_man, OUTPUT_NETWORK); REGISTER_MODULE(m_mod_man, OUTPUT_WIN32); // after initialization we know which modules are supported const char *names[20]; int num; std::vector<const char *> dnames; m_mod_man.get_module_names(OSD_MONITOR_PROVIDER, 20, &num, names); for (int i = 0; i < num; i++) dnames.push_back(names[i]); update_option(OSD_MONITOR_PROVIDER, dnames); m_mod_man.get_module_names(OSD_FONT_PROVIDER, 20, &num, names); dnames.clear(); for (int i = 0; i < num; i++) dnames.push_back(names[i]); update_option(OSD_FONT_PROVIDER, dnames); m_mod_man.get_module_names(OSD_KEYBOARDINPUT_PROVIDER, 20, &num, names); dnames.clear(); for (int i = 0; i < num; i++) dnames.push_back(names[i]); update_option(OSD_KEYBOARDINPUT_PROVIDER, dnames); m_mod_man.get_module_names(OSD_MOUSEINPUT_PROVIDER, 20, &num, names); dnames.clear(); for (int i = 0; i < num; i++) dnames.push_back(names[i]); update_option(OSD_MOUSEINPUT_PROVIDER, dnames); m_mod_man.get_module_names(OSD_LIGHTGUNINPUT_PROVIDER, 20, &num, names); dnames.clear(); for (int i = 0; i < num; i++) dnames.push_back(names[i]); update_option(OSD_LIGHTGUNINPUT_PROVIDER, dnames); m_mod_man.get_module_names(OSD_JOYSTICKINPUT_PROVIDER, 20, &num, names); dnames.clear(); for (int i = 0; i < num; i++) dnames.push_back(names[i]); update_option(OSD_JOYSTICKINPUT_PROVIDER, dnames); m_mod_man.get_module_names(OSD_SOUND_PROVIDER, 20, &num, names); dnames.clear(); for (int i = 0; i < num; i++) dnames.push_back(names[i]); update_option(OSD_SOUND_PROVIDER, dnames); #if 0 // Register midi options and update options m_mod_man.get_module_names(OSD_MIDI_PROVIDER, 20, &num, names); dnames.clear(); for (int i = 0; i < num; i++) dnames.push_back(names[i]); update_option(OSD_MIDI_PROVIDER, dnames); #endif // Register debugger options and update options m_mod_man.get_module_names(OSD_DEBUG_PROVIDER, 20, &num, names); dnames.clear(); for (int i = 0; i < num; i++) dnames.push_back(names[i]); update_option(OSD_DEBUG_PROVIDER, dnames); m_mod_man.get_module_names(OSD_OUTPUT_PROVIDER, 20, &num, names); dnames.clear(); for (int i = 0; i < num; i++) dnames.push_back(names[i]); update_option(OSD_OUTPUT_PROVIDER, dnames); // Register video options and update options video_options_add("none", nullptr); video_register(); update_option(OSDOPTION_VIDEO, m_video_names); }
void osd_common_t::register_options() { REGISTER_MODULE(m_mod_man, FONT_OSX); REGISTER_MODULE(m_mod_man, FONT_WINDOWS); REGISTER_MODULE(m_mod_man, FONT_SDL); REGISTER_MODULE(m_mod_man, FONT_NONE); REGISTER_MODULE(m_mod_man, SOUND_DSOUND); REGISTER_MODULE(m_mod_man, SOUND_COREAUDIO); REGISTER_MODULE(m_mod_man, SOUND_JS); REGISTER_MODULE(m_mod_man, SOUND_SDL); REGISTER_MODULE(m_mod_man, SOUND_NONE); #ifdef SDLMAME_MACOSX REGISTER_MODULE(m_mod_man, DEBUG_OSX); #endif #ifndef OSD_MINI REGISTER_MODULE(m_mod_man, DEBUG_WINDOWS); REGISTER_MODULE(m_mod_man, DEBUG_QT); REGISTER_MODULE(m_mod_man, DEBUG_INTERNAL); REGISTER_MODULE(m_mod_man, DEBUG_NONE); #endif REGISTER_MODULE(m_mod_man, NETDEV_TAPTUN); REGISTER_MODULE(m_mod_man, NETDEV_PCAP); REGISTER_MODULE(m_mod_man, NETDEV_NONE); #ifndef NO_USE_MIDI REGISTER_MODULE(m_mod_man, MIDI_PM); #endif REGISTER_MODULE(m_mod_man, MIDI_NONE); // after initialization we know which modules are supported const char *names[20]; int num; m_mod_man.get_module_names(OSD_FONT_PROVIDER, 20, &num, names); dynamic_array<const char *> dnames; for (int i = 0; i < num; i++) dnames.append(names[i]); update_option(OSD_FONT_PROVIDER, dnames); m_mod_man.get_module_names(OSD_SOUND_PROVIDER, 20, &num, names); dnames.reset(); for (int i = 0; i < num; i++) dnames.append(names[i]); update_option(OSD_SOUND_PROVIDER, dnames); #if 0 // Register midi options and update options m_mod_man.get_module_names(OSD_MIDI_PROVIDER, 20, &num, names); dnames.reset(); for (int i = 0; i < num; i++) dnames.append(names[i]); update_option(OSD_MIDI_PROVIDER, dnames); #endif // Register debugger options and update options m_mod_man.get_module_names(OSD_DEBUG_PROVIDER, 20, &num, names); dnames.reset(); for (int i = 0; i < num; i++) dnames.append(names[i]); update_option(OSD_DEBUG_PROVIDER, dnames); // Register video options and update options video_options_add("none", NULL); video_register(); update_option(OSDOPTION_VIDEO, m_video_names); }