Created
September 14, 2014 07:22
-
-
Save egraldlo/be6fc959da8d6ef6ff39 to your computer and use it in GitHub Desktop.
expression design
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Expression { | |
public: | |
Expression(); | |
virtual ~Expression(); | |
virtual void* eval()=0; | |
virtual void initilize()=0; | |
public: | |
data_type return_type; | |
/* references will be a vector, because it can be presented as vector<column>. */ | |
vector<Column *> references; | |
void *val; | |
}; | |
class UnaryExpression: public Expression, public UnaryNode { | |
public: | |
UnaryExpression(){}; | |
virtual ~UnaryExpression(){}; | |
virtual void initilize(){}; | |
}; | |
class BinaryExpression: public Expression, public BinaryNode { | |
public: | |
BinaryExpression(){}; | |
virtual ~BinaryExpression(){}; | |
virtual void initilize(){}; | |
}; | |
class LeafExpression: public Expression, public LeafNode { | |
public: | |
LeafExpression(){}; | |
virtual ~LeafExpression(){}; | |
virtual void initilize(){}; | |
}; | |
class Column: public Expression { | |
public: | |
Column(); | |
virtual ~Column(); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment