You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-01 06:46:55 +03:00
MCOL-4530: toCppCode() method for ParseTree and TreeNode (#2777)
* toCppCode for ParseTree and TreeNode * generated tree is compiling * Put tree constructors into tests * Minor fixes * Fixed parse + some constructors * Fixed includes, removed debug and old data * Hopefully fix clang errors * Forgot an override * More overrides
This commit is contained in:
@ -65,13 +65,13 @@ class TreeNodeImpl : public TreeNode
|
||||
/**
|
||||
* Operations
|
||||
*/
|
||||
virtual const std::string toString() const;
|
||||
virtual const std::string toString() const override;
|
||||
|
||||
virtual const std::string data() const
|
||||
virtual const std::string data() const override
|
||||
{
|
||||
return fData;
|
||||
}
|
||||
virtual void data(const std::string data)
|
||||
virtual void data(const std::string data) override
|
||||
{
|
||||
fData = data;
|
||||
}
|
||||
@ -80,7 +80,7 @@ class TreeNodeImpl : public TreeNode
|
||||
*
|
||||
* deep copy of this pointer and return the copy
|
||||
*/
|
||||
inline virtual TreeNodeImpl* clone() const
|
||||
inline virtual TreeNodeImpl* clone() const override
|
||||
{
|
||||
return new TreeNodeImpl(*this);
|
||||
}
|
||||
@ -88,15 +88,15 @@ class TreeNodeImpl : public TreeNode
|
||||
/**
|
||||
* The serialization interface
|
||||
*/
|
||||
virtual void serialize(messageqcpp::ByteStream&) const;
|
||||
virtual void unserialize(messageqcpp::ByteStream&);
|
||||
virtual void serialize(messageqcpp::ByteStream&) const override;
|
||||
virtual void unserialize(messageqcpp::ByteStream&) override;
|
||||
|
||||
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
|
||||
*
|
||||
* Do a deep, strict (as opposed to semantic) equivalence test.
|
||||
* @return true iff every member of t is a duplicate copy of every member of this; false otherwise
|
||||
*/
|
||||
virtual bool operator==(const TreeNode* t) const;
|
||||
virtual bool operator==(const TreeNode* t) const override;
|
||||
|
||||
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
|
||||
*
|
||||
@ -110,7 +110,7 @@ class TreeNodeImpl : public TreeNode
|
||||
* Do a deep, strict (as opposed to semantic) equivalence test.
|
||||
* @return false iff every member of t is a duplicate copy of every member of this; true otherwise
|
||||
*/
|
||||
virtual bool operator!=(const TreeNode* t) const;
|
||||
virtual bool operator!=(const TreeNode* t) const override;
|
||||
|
||||
/** @brief Do a deep, strict (as opposed to semantic) equivalence test
|
||||
*
|
||||
@ -119,6 +119,7 @@ class TreeNodeImpl : public TreeNode
|
||||
*/
|
||||
bool operator!=(const TreeNodeImpl& t) const;
|
||||
|
||||
virtual std::string toCppCode(IncludeSet& includes) const override;
|
||||
private:
|
||||
// default okay
|
||||
// TreeNodeImpl& operator=(const TreeNodeImpl& rhs);
|
||||
|
Reference in New Issue
Block a user