#ifndef IMNSMAPCONF_HH_
#define IMNSMAPCONF_HH_

#include "SunIM.h"

#define MAX_LINE_LEN 1024
#define COMMENT '#'

class IMNSMapConf {
private:
    string fname;
    int count;
    IMNsMapStruct *nsmp; 
    bool read_ns_map_config(char *buf, int fsize);
    int get_line(char *buf, int fsize, char **curptr, char *line);
    void print_core(IMNsMapStruct *nsm);

public:
    bool load();
    IMNsMapStruct *get_nsmap_info(int *num_nsmap_entries) {
       *num_nsmap_entries = count;
       return nsmp;
    }
    IMNSMapConf(const char *nsm_fname);
    ~IMNSMapConf();
};

#endif /* IMNSMAPCONF_HH_ */
