summaryrefslogtreecommitdiff
path: root/src/modl.h
blob: 16dbdf3d22508b05b9bb84d79bce66bd3e81f47c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include "incl.h"

#ifndef MODL_H
#define MODL_H

#include "maps/shashmap.h"

using namespace std;

class modl : private shashmap<dynmod*>
{
private:
  static  void dlclose_( dynmod* mod   );
  dynmod* cache_module ( string s_name, bool b_print_sys_msg );
  void preload_modules( string s_path );

#ifdef NCURSES

  void print_cached( int i_mods );
#endif

public:
  modl();
  ~modl();

  dynmod* get_module( string s_name );
  dynmod* get_module( string s_name, string s_user );

  vector<string>* get_mod_vector()
  {
    vector<string>* p_ret = get_key_vector();
    return p_ret;
  }

  void unload_modules();
  void reload_modules();
};

#endif