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
56
Parserv3.h
56
Parserv3.h
|
@ -14,6 +14,7 @@ class Relation
|
|||
public:
|
||||
Relation()
|
||||
{
|
||||
name = NULL;
|
||||
}
|
||||
|
||||
Relation(string str)
|
||||
|
@ -36,6 +37,11 @@ class Attribute
|
|||
string name;
|
||||
|
||||
public:
|
||||
Attribute()
|
||||
{
|
||||
name = NULL;
|
||||
}
|
||||
|
||||
Attribute(string str)
|
||||
{
|
||||
name = str;
|
||||
|
@ -58,6 +64,12 @@ class Union
|
|||
string Un2;
|
||||
|
||||
public:
|
||||
Union()
|
||||
{
|
||||
Un1 = NULL;
|
||||
Un2 = NULL;
|
||||
}
|
||||
|
||||
Union (string s1, string s2)
|
||||
{
|
||||
Un1 = s1;
|
||||
|
@ -76,6 +88,12 @@ class Product
|
|||
string Pr2;
|
||||
|
||||
public:
|
||||
Product()
|
||||
{
|
||||
Pr1 = NULL;
|
||||
Pr2 = NULL;
|
||||
}
|
||||
|
||||
Product(string s1, string s2)
|
||||
{
|
||||
Pr1 = s1;
|
||||
|
@ -94,6 +112,12 @@ class Difference
|
|||
string D2;
|
||||
|
||||
public:
|
||||
Difference()
|
||||
{
|
||||
D1 = NULL;
|
||||
D2 = NULL;
|
||||
}
|
||||
|
||||
Difference(string s1, string s2)
|
||||
{
|
||||
D1 = s1;
|
||||
|
@ -112,6 +136,12 @@ class Renaming
|
|||
string oldName;
|
||||
|
||||
public:
|
||||
Renaming()
|
||||
{
|
||||
newName = NULL;
|
||||
oldName = NULL;
|
||||
}
|
||||
|
||||
Renaming(string s1, string s2)
|
||||
{
|
||||
newName = s1;
|
||||
|
@ -130,6 +160,12 @@ class Projection
|
|||
string oldName;
|
||||
|
||||
public:
|
||||
Projection()
|
||||
{
|
||||
newName = NULL;
|
||||
oldName = NULL;
|
||||
}
|
||||
|
||||
Projection(string s1, string s2)
|
||||
{
|
||||
newName = s1;
|
||||
|
@ -150,6 +186,7 @@ class Operand
|
|||
|
||||
Operand()
|
||||
{
|
||||
op = NULL;
|
||||
}
|
||||
|
||||
Operand(string str)
|
||||
|
@ -175,6 +212,7 @@ class Op
|
|||
public:
|
||||
Op()
|
||||
{
|
||||
op = NULL;
|
||||
}
|
||||
|
||||
Op(string str)
|
||||
|
@ -200,6 +238,12 @@ class Comparison
|
|||
Operand operand2;
|
||||
|
||||
public:
|
||||
Comparison()
|
||||
{
|
||||
op = NULL;
|
||||
operand1 = NULL;
|
||||
operand2 = NULL;
|
||||
}
|
||||
|
||||
Comparison(string str1, string str2, string str3)
|
||||
{
|
||||
|
@ -225,6 +269,11 @@ class Conjunction
|
|||
{
|
||||
string conj;
|
||||
public:
|
||||
Conjunction()
|
||||
{
|
||||
conj = NULL;
|
||||
}
|
||||
|
||||
Conjunction(string str)
|
||||
{
|
||||
conj = str;
|
||||
|
@ -248,6 +297,7 @@ class Condition
|
|||
|
||||
Condition()
|
||||
{
|
||||
cond = NULL;
|
||||
}
|
||||
|
||||
Condition(string str)
|
||||
|
@ -270,6 +320,11 @@ class Selection
|
|||
{
|
||||
string select;
|
||||
public:
|
||||
Selection()
|
||||
{
|
||||
select = NULL;
|
||||
}
|
||||
|
||||
Selection(string str)
|
||||
{
|
||||
select = str;
|
||||
|
@ -289,6 +344,7 @@ class Expression
|
|||
|
||||
Expression()
|
||||
{
|
||||
exp = NULL;
|
||||
}
|
||||
|
||||
Expression(string str)
|
||||
|
|
Reference in a new issue