All pastes #180883 Raw Edit

Unnamed

public cpp v1 · immutable
#180883 ·published 2006-09-24 07:59 UTC
rendered paste body
#ifndef MODULE_WRAPPER_H#define MODULE_WRAPPER_H 1#endif#include <stdio.h>#include <stdlib.h>#include <dlfcn.h>#include <iostream>class IRCModuleWrapper;#ifndef BOT_H#include "bot.h"#endif#ifndef MODULE_H#include "module.h"#endifstruct IRCModuleList {	bool loaded;	IRCModuleInfo* info;	IRCModule *module;	IRCModuleList *next;};enum IRCModuleLoadResult {	LOAD_SUCCESS = 0,	LOAD_NO_OBJ_PTR = 1,	LOAD_FILE_NOT_FOUND = 2,	LOAD_UNKNOWN_ERROR = 10};class IRCModuleWrapper {	public:		IRCModuleWrapper(IRCBot *bot_pointer);		~IRCModuleWrapper();				IRCModuleLoadResult LoadModule(char *filename);		void UnloadModule(char *module_id);		void UnloadAllModules();	protected:		//	private:		IRCModuleList *module_list;		IRCBot *bot_ptr;				void RegisterModule(IRCModuleList *mod_list, IRCModuleInfo *info, IRCModule *module);		void UnregisterModule(IRCModuleList *mod_list, bool recursive);};