Back to index

im-sdk  12.3.91
IMNSMapConf.hh
Go to the documentation of this file.
00001 #ifndef IMNSMAPCONF_HH_
00002 #define IMNSMAPCONF_HH_
00003 
00004 #include "SunIM.h"
00005 
00006 #define MAX_LINE_LEN 1024
00007 #define COMMENT '#'
00008 
00009 class IMNSMapConf {
00010 private:
00011     string fname;
00012     int count;
00013     IMNsMapStruct *nsmp; 
00014     bool read_ns_map_config(char *buf, int fsize);
00015     int get_line(char *buf, int fsize, char **curptr, char *line);
00016     void print_core(IMNsMapStruct *nsm);
00017 
00018 public:
00019     bool load();
00020     IMNsMapStruct *get_nsmap_info(int *num_nsmap_entries) {
00021        *num_nsmap_entries = count;
00022        return nsmp;
00023     }
00024     IMNSMapConf(const char *nsm_fname);
00025     ~IMNSMapConf();
00026 };
00027 
00028 #endif /* IMNSMAPCONF_HH_ */