ccdevnet / openc2e

openc2e

openc2e / Catalogue.h
100644 25 lines (19 sloc) 0.664 kb
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
#include <iostream>
#include <map>
#include <string>
#include <vector>
#include <istream>
#include "boost/filesystem/path.hpp"
 
class Catalogue {
//protected:
public:
std::map<std::string, std::vector<std::string> > data;
 
public:
friend std::istream &operator >> (std::istream &, Catalogue &);
 
const std::vector<std::string> &getTag(std::string t) const { return (*data.find(t)).second; }
bool hasTag(std::string t) const { return (data.find(t) != data.end()); }
const std::string getAgentName(unsigned char family, unsigned char genus, unsigned short species) const;
  
void reset();
void initFrom(boost::filesystem::path path);
};
 
/* vim: set noet: */