PRISM
 v0.0.0
Loading...
Searching...
No Matches
BibTexHelper.h
1#pragma once
2#include <string>
3#include <unordered_set>
4#include <unordered_map>
5
6namespace prism
7{
8
14{
15public:
17 static BibTexHelper & instance();
19 void clear();
25 void checkCiteKey(const std::string & file, const std::string & citekey);
26
27#ifdef TESTING
28 void collectReferences(const std::string & bibfile);
29#endif
30
31private:
33 friend class NetworkParser;
35 BibTexHelper() {}
36
39 BibTexHelper(const BibTexHelper &) = delete;
40 BibTexHelper & operator=(const BibTexHelper &) = delete;
42
44 static BibTexHelper * _instance;
45
50 std::unordered_map<std::string, std::unordered_set<std::string>> _refs;
60#ifndef TESTING
69 void collectReferences(const std::string & bibfile);
70#endif
71};
72}
Class for collecting and managing cite keys from the user provided bib files.
Definition BibTexHelper.h:14
static BibTexHelper & instance()
Static function to get the instance of the singleton instance.
Definition BibTexHelper.C:17
void checkCiteKey(const std::string &file, const std::string &citekey)
Checks to see if a cite key belongs to a give bib file.
Definition BibTexHelper.C:71
void clear()
Empties all of the cite keys that are currently in the BibTexHelper.
Definition BibTexHelper.C:27
This is the class that processes reaction networks and allows for interaction with the data contained...
Definition NetworkParser.h:24