Update Parserv3.h
This commit is contained in:
parent
32fbf439f8
commit
049183c4cb
1 changed files with 124 additions and 64 deletions
60
Parserv3.h
60
Parserv3.h
|
@ -11,6 +11,11 @@ class Relation
|
|||
{
|
||||
string name;
|
||||
|
||||
public:
|
||||
Relation()
|
||||
{
|
||||
}
|
||||
|
||||
Relation(string str)
|
||||
{
|
||||
name = str;
|
||||
|
@ -26,13 +31,33 @@ class Relation
|
|||
}
|
||||
};
|
||||
|
||||
class Attribute
|
||||
{
|
||||
string name;
|
||||
|
||||
public:
|
||||
Attribute(string str)
|
||||
{
|
||||
name = str;
|
||||
}
|
||||
|
||||
void setAttribute(string str)
|
||||
{
|
||||
name = str;
|
||||
}
|
||||
|
||||
string getAttribute()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
};
|
||||
|
||||
class Union
|
||||
{
|
||||
string Un1;
|
||||
string Un2;
|
||||
|
||||
public:
|
||||
Union (string s1, string s2)
|
||||
{
|
||||
Un1 = s1;
|
||||
|
@ -50,6 +75,7 @@ class Product
|
|||
string Pr1;
|
||||
string Pr2;
|
||||
|
||||
public:
|
||||
Product(string s1, string s2)
|
||||
{
|
||||
Pr1 = s1;
|
||||
|
@ -67,6 +93,7 @@ class Difference
|
|||
string D1;
|
||||
string D2;
|
||||
|
||||
public:
|
||||
Difference(string s1, string s2)
|
||||
{
|
||||
D1 = s1;
|
||||
|
@ -84,6 +111,7 @@ class Renaming
|
|||
string newName;
|
||||
string oldName;
|
||||
|
||||
public:
|
||||
Renaming(string s1, string s2)
|
||||
{
|
||||
newName = s1;
|
||||
|
@ -101,6 +129,7 @@ class Projection
|
|||
string newName;
|
||||
string oldName;
|
||||
|
||||
public:
|
||||
Projection(string s1, string s2)
|
||||
{
|
||||
newName = s1;
|
||||
|
@ -216,6 +245,11 @@ class Condition
|
|||
{
|
||||
string cond;
|
||||
public:
|
||||
|
||||
Condition()
|
||||
{
|
||||
}
|
||||
|
||||
Condition(string str)
|
||||
{
|
||||
cond = str;
|
||||
|
@ -246,3 +280,29 @@ class Selection
|
|||
return select;
|
||||
}
|
||||
};
|
||||
|
||||
class Expression
|
||||
{
|
||||
string exp;
|
||||
|
||||
public:
|
||||
|
||||
Expression()
|
||||
{
|
||||
}
|
||||
|
||||
Expression(string str)
|
||||
{
|
||||
exp = str;
|
||||
}
|
||||
|
||||
void setExpression(string str)
|
||||
{
|
||||
exp = str;
|
||||
}
|
||||
|
||||
string getExpression()
|
||||
{
|
||||
return exp;
|
||||
}
|
||||
};
|
||||
|
|
Reference in a new issue