|
Panini 1.4.0
Header-only library for generating C++, written in C++17
|
Collection of unique file system paths. More...
#include <IncludeSet.hpp>
Public Member Functions | |
| IncludeSet ()=default | |
| IncludeSet (std::initializer_list< IncludeEntry > entries) | |
| IncludeSet (std::initializer_list< std::filesystem::path > paths, IncludeStyle style) | |
| const std::vector< IncludeEntry > & | GetEntries () const |
| std::vector< IncludeEntry >::const_iterator | begin () const |
| std::vector< IncludeEntry >::iterator | begin () |
| std::vector< IncludeEntry >::const_iterator | end () const |
| std::vector< IncludeEntry >::iterator | end () |
| void | Add (const std::filesystem::path &path, IncludeStyle style=IncludeStyle::Inherit) |
| void | Sort (IncludeStyle resolvedStyle) |
Collection of unique file system paths.
Paths can be sorted by priority, which is based on their IncludeStyle and how many forward slashes (/) it contains. This causes paths that end in a filename to be sorted after paths with folders, even when the folder name is the same as the filename.
|
inlinedefault |
|
inline |
Construct an IncludeSet from a list of IncludeEntry.
|
inline |
Construct an IncludeSet from a list of paths and an IncludeStyle.
|
inline |
Add a path to the set with an include style.
|
inline |
STL-compatible method for getting an iterator to the start of the list of entries.
|
inline |
STL-compatible method for getting an iterator to the start of the list of entries.
|
inline |
STL-compatible method for getting an iterator to the end of the list of entries.
|
inline |
STL-compatible method for getting an iterator to the end of the list of entries.
|
inline |
Get entries as an std::vector.
|
inline |
Sort the paths in the collection based on an include style.
Entries are first sorted by include style:
And then by their paths.
The resolved style parameter is used to prioritize entries that have an include style of IncludeStyle::Inherit.