#include "tools/binary_size/libsupersize/viewer/caspian/tree_builder.h"
#include <algorithm>
#include <iostream>
#include <map>
#include <stack>
#include <utility>
namespace caspian {
namespace {
constexpr const char kComponentSep = …;
constexpr const char kPathSep = …;
}
TreeBuilder::TreeBuilder(SizeInfo* size_info)
: … { … }
TreeBuilder::TreeBuilder(DeltaSizeInfo* size_info)
: … { … }
TreeBuilder::~TreeBuilder() = default;
void TreeBuilder::Build(std::unique_ptr<BaseLens> lens,
char separator,
bool method_count_mode,
std::vector<FilterFunc> filters) { … }
namespace {
bool CompareAbsSize(const TreeNode* const& l, const TreeNode* const& r) { … }
bool CompareCount(const TreeNode* const& l, const TreeNode* const& r) { … }
}
TreeNode* TreeBuilder::Find(std::string_view path) { … }
Json::Value TreeBuilder::Open(const char* path) { … }
Json::Value TreeBuilder::GetAncestryById(uint32_t id) { … }
void TreeBuilder::AddFileEntry(GroupedPath grouped_path,
const std::vector<const BaseSymbol*>& symbols) { … }
TreeNode* TreeBuilder::GetOrMakeParentNode(TreeNode* child_node) { … }
void TreeBuilder::AttachToParent(TreeNode* child, TreeNode* parent) { … }
TreeNode* TreeBuilder::FindNodeById(int32_t id) { … }
ArtifactType TreeBuilder::ArtifactTypeFromChild(GroupedPath child_path) const { … }
bool TreeBuilder::ShouldIncludeSymbol(const GroupedPath& id_path,
const BaseSymbol& symbol) const { … }
void TreeBuilder::JoinDexMethodClasses(TreeNode* node) { … }
}