logic: Show non-indexed nodes within their parents and their childs
* Added support for access nodes without title
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <set>
|
||||
#include <vector>
|
||||
|
||||
#include "utility/types.h"
|
||||
@@ -12,16 +13,21 @@ class HierarchyCache
|
||||
public:
|
||||
void clear();
|
||||
|
||||
void createConnection(Id edgeId, Id fromId, Id toId, bool fromVisible);
|
||||
void createConnection(Id edgeId, Id fromId, Id toId, bool sourceVisible, bool sourceIndexed, bool targetIndexed);
|
||||
|
||||
Id getLastVisibleParentNodeId(Id nodeId) const;
|
||||
size_t getIndexOfLastVisibleParentNode(Id nodeId) const;
|
||||
|
||||
void addAllChildIdsForNodeId(Id nodeId, std::vector<Id>* nodeIds, std::vector<Id>* edgeIds) const;
|
||||
void addAllChildIdsForNodeId(Id nodeId, std::set<Id>* nodeIds, std::set<Id>* edgeIds) const;
|
||||
void addAllVisibleParentsAndChildIdsForNodeId(Id nodeId, std::set<Id>* nodeIds, std::set<Id>* edgeIds) const;
|
||||
void addAllVisibleParentsRecursive(Id nodeId, std::set<Id>* nodeIds, std::set<Id>* edgeIds) const;
|
||||
|
||||
void addFirstChildIdsForNodeId(Id nodeId, std::vector<Id>* nodeIds) const;
|
||||
void addFirstVisibleChildIdsForNodeId(Id nodeId, std::vector<Id>* nodeIds) const;
|
||||
|
||||
bool isChildOfVisibleNodeOrInvisible(Id nodeId) const;
|
||||
bool isIndexed(Id nodeId) const;
|
||||
|
||||
bool nodeHasChildren(Id nodeId) const;
|
||||
|
||||
private:
|
||||
@@ -42,12 +48,16 @@ private:
|
||||
const std::vector<HierarchyNode*>& getChildren() const;
|
||||
|
||||
void addChildIds(std::vector<Id>* nodeIds) const;
|
||||
void addChildIdsRecursive(std::vector<Id>* nodeIds, std::vector<Id>* edgeIds) const;
|
||||
void addChildIds(std::set<Id>* nodeIds, std::set<Id>* edgeIds) const;
|
||||
void addChildIdsRecursive(std::set<Id>* nodeIds, std::set<Id>* edgeIds) const;
|
||||
void addVisibleNodeIdsRecursive(std::vector<Id>* nodeIds) const;
|
||||
|
||||
bool isVisible() const;
|
||||
void setIsVisible(bool isVisible);
|
||||
|
||||
bool isIndexed() const;
|
||||
void setIsIndexed(bool isIndexed);
|
||||
|
||||
private:
|
||||
const Id m_nodeId;
|
||||
Id m_edgeId;
|
||||
@@ -56,6 +66,7 @@ private:
|
||||
std::vector<HierarchyNode*> m_children;
|
||||
|
||||
bool m_isVisible;
|
||||
bool m_isIndexed;
|
||||
};
|
||||
|
||||
HierarchyNode* getNode(Id nodeId) const;
|
||||
|
||||
Reference in New Issue
Block a user