openModeller  Version 1.5.0
FileParser.hh
Go to the documentation of this file.
1 
28 #ifndef _FILE_PARSERHH_
29 #define _FILE_PARSERHH_
30 
31 #include <openmodeller/om_defs.hh>
33 
34 #include <vector>
35 #include <string>
36 #include <utility> // for std::pair
37 
42 class dllexp FileParser
43 {
44 public:
45 
46  FileParser( const std::string & file );
47 
48  ~FileParser();
49 
50  int load( const std::string & file );
51 
55  std::string get( const std::string & key ) const;
56 
60  int count( const std::string & key ) const;
61 
65  std::vector<std::string> getAll( const std::string & key ) const;
66 
70  int length() const
71  {
72  return f_lst.size();
73  }
74 
75 private:
76 
77  typedef std::pair<icstring,std::string> Item;
78  typedef std::vector<Item> ItemList;
79 
81 };
82 
83 #endif
int length() const
Definition: FileParser.hh:70
std::pair< icstring, std::string > Item
Definition: FileParser.hh:77
ItemList f_lst
Definition: FileParser.hh:80
std::vector< Item > ItemList
Definition: FileParser.hh:78