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