]> git.llucax.com Git - software/bife/bife++.git/blob - chit.cpp
Cleaned up the code:
[software/bife/bife++.git] / chit.cpp
1 // vim: set expandtab tabstop=4 shiftwidth=4:
2
3 #include "chit.h"
4
5 #ifdef DEBUG
6 #include <iostream>
7 using std::cerr;
8 using std::endl;
9 #endif
10
11 CHIT::CHIT(string root, string postfix, string group): GHIT(root, postfix, group) {
12 #ifdef DEBUG
13     cerr << "In CHIT::CHIT(root = '" << root << "', postfix = '" << postfix
14         << "', group = '" << group << "');" << endl;
15 #endif
16 }
17
18 CHIT::~CHIT(void) {
19 #ifdef DEBUG
20     cerr << "In CHIT destructor." << endl;
21 #endif
22 }
23
24 string CHIT::getFileContent(string filename) {
25     Hash::iterator c = cache.find(filename);
26     if (c == cache.end()) {
27         cache[filename] = GHIT::getFileContent(filename);
28         return cache[filename];
29     } else {
30         return c->second;
31     }
32 }
33