data: compare signatures when storing overloaded functions and methods
Function and method nodes are now distincted by their signature when added to the graph. A different node for each overloaded declaration is created with the signature as member field. fortune cookie message = Deine harte Arbeit wird schnell belohnt werden.
This commit is contained in:
@@ -39,9 +39,11 @@ public:
|
||||
void addEdge(Edge* edge);
|
||||
void removeEdge(Edge* edge);
|
||||
|
||||
Node* getParentNode() const;
|
||||
Edge* getMemberEdge() const;
|
||||
|
||||
Edge* findEdge(std::function<bool(Edge*)> func) const;
|
||||
Edge* findEdgeOfType(Edge::EdgeType type) const;
|
||||
Edge* findEdgeOfType(Edge::EdgeType type, std::function<bool(Edge*)> func) const;
|
||||
|
||||
void forEachEdge(std::function<void(Edge*)> func) const;
|
||||
@@ -60,6 +62,9 @@ public:
|
||||
bool isStatic() const;
|
||||
void setStatic(bool isStatic);
|
||||
|
||||
std::string getSignature() const;
|
||||
void setSignature(const std::string& signature);
|
||||
|
||||
// Logging.
|
||||
std::string getTypeString(NodeType type) const;
|
||||
std::string getAsString() const;
|
||||
@@ -76,6 +81,8 @@ private:
|
||||
// Additional fields for different NodeTypes.
|
||||
bool m_isConst;
|
||||
bool m_isStatic;
|
||||
|
||||
std::string m_signature;
|
||||
};
|
||||
|
||||
std::ostream& operator<<(std::ostream& ostream, const Node& node);
|
||||
|
||||
Reference in New Issue
Block a user