00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00023 #ifndef BOSSCONTEXT_H
00024 #define BOSSCONTEXT_H
00025
00026 using namespace std;
00027
00028 #include <iostream>
00029 #include <fstream>
00030 #include <string>
00031 #include <sstream>
00032 #include <map>
00033
00034 struct CCStruct {
00035 string left1;
00036 string right1;
00037 string left2;
00038 string right2;
00039 };
00040
00041 class BOSS_context {
00042 public:
00043 BOSS_context(string & file);
00044 string left1(const string & s) {
00045 if((cmi = cmap.find(s)) == cmap.end()) return "";
00046 else return (*cmi).second.left1;
00047 }
00048 string right1(const string & s) {
00049 if((cmi = cmap.find(s)) == cmap.end()) return "";
00050 else return (*cmi).second.right1;
00051 }
00052 string left2(const string & s) {
00053 if((cmi = cmap.find(s)) == cmap.end()) return "";
00054 else return (*cmi).second.left2;
00055 }
00056 string right2(const string & s) {
00057 if((cmi = cmap.find(s)) == cmap.end()) return "";
00058 else return (*cmi).second.right2;
00059 }
00060 protected:
00061 map< string,CCStruct > cmap;
00062 map< string,CCStruct >::const_iterator cmi;
00063 };
00064
00065 #endif
00066
00067