1 |
afaq |
1.1 |
#ifndef _RowInterface_hpp_included_
|
2 |
|
|
#define _RowInterface_hpp_included_
|
3 |
|
|
///This class defines Interface class for the Rows of a Table
|
4 |
|
|
#include <string>
|
5 |
|
|
#include <map>
|
6 |
|
|
#include <vector>
|
7 |
|
|
#include <iostream>
|
8 |
|
|
|
9 |
|
|
class RowMap {
|
10 |
|
|
public:
|
11 |
|
|
std::string name;
|
12 |
|
|
void* obj;
|
13 |
|
|
RowMap(){};
|
14 |
|
|
void set(std::string name ,void* obj){
|
15 |
|
|
//this->RowMap::name = name;
|
16 |
|
|
this->name = name;
|
17 |
|
|
this->obj = obj;
|
18 |
|
|
}
|
19 |
|
|
};
|
20 |
|
|
|
21 |
|
|
class RowInterface {
|
22 |
|
|
|
23 |
|
|
public:
|
24 |
|
|
RowInterface(){};
|
25 |
|
|
virtual void* getValue(std::string){};//cout<<"INSIDE getValue RowInterface"<<endl;
|
26 |
|
|
|
27 |
|
|
virtual void setValue(std::string, void*){};//cout<<"INSIDE setValue RowInterface"<<endl;};
|
28 |
|
|
//virtual void setValue(string, void*)=0;
|
29 |
|
|
std::string toUpper(std::string);
|
30 |
|
|
//virtual string* getTableName(void){};
|
31 |
|
|
//RowInterface& getConstituentRow(string, string);
|
32 |
|
|
void* getConstituentRow(std::string, std::string);
|
33 |
|
|
std::vector<std::string> getConstituentList(void);
|
34 |
|
|
protected:
|
35 |
|
|
//multimap<string, RowInterface> constituentObjects;
|
36 |
|
|
std::vector<RowMap> constituentObjects;
|
37 |
|
|
RowMap rowMap;
|
38 |
|
|
};
|
39 |
|
|
|
40 |
|
|
|
41 |
|
|
typedef std::multimap<std::string, RowInterface> ObjMap;
|
42 |
|
|
typedef std::multimap<std::string, RowInterface>::value_type ObjEntry;
|
43 |
|
|
typedef std::multimap<std::string, RowInterface>::iterator ObjMap_iter;
|
44 |
|
|
|
45 |
|
|
#endif
|
46 |
|
|
|