Go to the documentation of this file.
10 #include <Wt/WAbstractItemModel.h>
52 void setRepositoryPath(
const std::string& repositoryPath);
59 void loadRevision(
const std::string& revName);
119 : parentId(aParent), index(anIndex) { }
126 else return index < other.
index;
139 : index_(parentId, index),
154 int index()
const {
return index_.index; }
202 int getTreeId(
int parentId,
int childIndex)
const;
211 #endif // GIT_MODEL_H_
A model that retrieves revision trees from a git repository.
std::map< ChildIndex, int > ChildPointerMap
Git::ObjectId treeObject_
const Git::ObjectId & treeObject() const
Returns the SHA1 id for the git tree object.
Index usable as a key to a map, that identifies a child/row within a tree.
int rowCount() const
Returns the (cached) row count.
static const ItemDataRole ContentsRole
The role which may be used on a file to retrieve its contents.
Git utility class for browsing git archives.
virtual cpp17::any data(const WModelIndex &index, ItemDataRole role=ItemDataRole::Display) const=0
int index() const
Returns the child index within the parent folder.
ChildIndex(int aParent, int anIndex)
std::vector< Tree > treeData_
List of folder objects.
static constexpr const int Display
ChildPointerMap childPointer_
Maps child indexes to tree indexes.
static const ItemDataRole FilePathRole
int parentId() const
Returns the parent id.
Tree(int parentId, int index, const Git::ObjectId &object, int rowCount)
Constructor.
Git git_
The git repository.
Used to uniquely locate a folder within the folder hierarchy.
Generated on Thu Mar 26 2020 for the
C++ Web Toolkit (Wt) by
1.8.17