Added default constructor values to classes for Parser.
This commit is contained in:
parent
bcd025153a
commit
c6c5caaf02
1 changed files with 57 additions and 1 deletions
58
Parserv3.h
58
Parserv3.h
|
@ -14,6 +14,7 @@ class Relation
|
||||||
public:
|
public:
|
||||||
Relation()
|
Relation()
|
||||||
{
|
{
|
||||||
|
name = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
Relation(string str)
|
Relation(string str)
|
||||||
|
@ -36,6 +37,11 @@ class Attribute
|
||||||
string name;
|
string name;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
Attribute()
|
||||||
|
{
|
||||||
|
name = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
Attribute(string str)
|
Attribute(string str)
|
||||||
{
|
{
|
||||||
name = str;
|
name = str;
|
||||||
|
@ -58,6 +64,12 @@ class Union
|
||||||
string Un2;
|
string Un2;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
Union()
|
||||||
|
{
|
||||||
|
Un1 = NULL;
|
||||||
|
Un2 = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
Union (string s1, string s2)
|
Union (string s1, string s2)
|
||||||
{
|
{
|
||||||
Un1 = s1;
|
Un1 = s1;
|
||||||
|
@ -76,6 +88,12 @@ class Product
|
||||||
string Pr2;
|
string Pr2;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
Product()
|
||||||
|
{
|
||||||
|
Pr1 = NULL;
|
||||||
|
Pr2 = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
Product(string s1, string s2)
|
Product(string s1, string s2)
|
||||||
{
|
{
|
||||||
Pr1 = s1;
|
Pr1 = s1;
|
||||||
|
@ -94,6 +112,12 @@ class Difference
|
||||||
string D2;
|
string D2;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
Difference()
|
||||||
|
{
|
||||||
|
D1 = NULL;
|
||||||
|
D2 = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
Difference(string s1, string s2)
|
Difference(string s1, string s2)
|
||||||
{
|
{
|
||||||
D1 = s1;
|
D1 = s1;
|
||||||
|
@ -112,6 +136,12 @@ class Renaming
|
||||||
string oldName;
|
string oldName;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
Renaming()
|
||||||
|
{
|
||||||
|
newName = NULL;
|
||||||
|
oldName = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
Renaming(string s1, string s2)
|
Renaming(string s1, string s2)
|
||||||
{
|
{
|
||||||
newName = s1;
|
newName = s1;
|
||||||
|
@ -130,6 +160,12 @@ class Projection
|
||||||
string oldName;
|
string oldName;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
Projection()
|
||||||
|
{
|
||||||
|
newName = NULL;
|
||||||
|
oldName = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
Projection(string s1, string s2)
|
Projection(string s1, string s2)
|
||||||
{
|
{
|
||||||
newName = s1;
|
newName = s1;
|
||||||
|
@ -150,6 +186,7 @@ class Operand
|
||||||
|
|
||||||
Operand()
|
Operand()
|
||||||
{
|
{
|
||||||
|
op = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
Operand(string str)
|
Operand(string str)
|
||||||
|
@ -175,6 +212,7 @@ class Op
|
||||||
public:
|
public:
|
||||||
Op()
|
Op()
|
||||||
{
|
{
|
||||||
|
op = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
Op(string str)
|
Op(string str)
|
||||||
|
@ -200,7 +238,13 @@ class Comparison
|
||||||
Operand operand2;
|
Operand operand2;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
Comparison()
|
||||||
|
{
|
||||||
|
op = NULL;
|
||||||
|
operand1 = NULL;
|
||||||
|
operand2 = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
Comparison(string str1, string str2, string str3)
|
Comparison(string str1, string str2, string str3)
|
||||||
{
|
{
|
||||||
operand1.setOperand(str1);
|
operand1.setOperand(str1);
|
||||||
|
@ -225,6 +269,11 @@ class Conjunction
|
||||||
{
|
{
|
||||||
string conj;
|
string conj;
|
||||||
public:
|
public:
|
||||||
|
Conjunction()
|
||||||
|
{
|
||||||
|
conj = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
Conjunction(string str)
|
Conjunction(string str)
|
||||||
{
|
{
|
||||||
conj = str;
|
conj = str;
|
||||||
|
@ -248,6 +297,7 @@ class Condition
|
||||||
|
|
||||||
Condition()
|
Condition()
|
||||||
{
|
{
|
||||||
|
cond = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
Condition(string str)
|
Condition(string str)
|
||||||
|
@ -270,6 +320,11 @@ class Selection
|
||||||
{
|
{
|
||||||
string select;
|
string select;
|
||||||
public:
|
public:
|
||||||
|
Selection()
|
||||||
|
{
|
||||||
|
select = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
Selection(string str)
|
Selection(string str)
|
||||||
{
|
{
|
||||||
select = str;
|
select = str;
|
||||||
|
@ -289,6 +344,7 @@ class Expression
|
||||||
|
|
||||||
Expression()
|
Expression()
|
||||||
{
|
{
|
||||||
|
exp = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
Expression(string str)
|
Expression(string str)
|
||||||
|
|
Reference in a new issue