dbalnhelper.h

Go to the documentation of this file.
00001 #ifndef DBALNHELPER_H
00002 #define DBALNHELPER_H
00003 
00004 #include <mysql++.h>
00005 #include <string>
00006 
00007 using namespace std;
00008 using namespace mysqlpp;
00009 
00010 
00022 int table2map(map<int,string> &store, mysqlpp::Connection &conn, 
00023       const string &tab, string idcol="id", string seqcol="seq");
00024 
00033 int tableFillMap(map<int,string> &store, mysqlpp::Connection &conn, 
00034       const string &tab, string idcol="id", string seqcol="seq");
00037 int tableFillMapFirst(map<int,string> &store, 
00038       const vector<pair<int,int> > &guide,
00039       mysqlpp::Connection &conn, 
00040       const string &tab, string idcol="proteinId", string seqcol="seq");
00041 
00050 int table2pair(vector<pair<int,int> > &pairs, mysqlpp::Connection &conn,
00051       const string &tab, string id1col="seq1id", string id2col="seq2id");
00052 
00053 struct Alnrange {
00054    Alnrange() : seq1id(0), seq2id(0), s1b(0), s1e(0), s2b(0), s2e(0) { }
00055    Alnrange(int id1, int id2, int b1, int e1,  int b2, int e2) 
00056       : seq1id(id1), seq2id(id2), s1b(b1), s1e(e1), s2b(b2), s2e(e2) 
00057    { }
00058    int seq1id, seq2id;
00059    int s1b,s1e, s2b, s2e;
00060 };
00061 
00062 int table2vector(vector<Alnrange> &store, mysqlpp::Connection &conn,
00063       const string &tab, string id1col="seq1id", string id2col="seq2id");
00064 
00065 bool tableExists(mysqlpp::Connection &conn, const string &tab);
00066 
00067 #endif

Generated on Wed Aug 10 11:56:55 2011 for Softwares from Orpara by  doxygen 1.5.6