|
Ninja
|
Utility functions for normalizing include paths on Windows. More...
#include <includes_normalize.h>
Public Member Functions | |
| IncludesNormalize (const std::string &relative_to) | |
| Normalize path relative to |relative_to|. | |
| bool | Normalize (const std::string &input, std::string *result, std::string *err) const |
| Normalize by fixing slashes style, fixing redundant . | |
Static Public Member Functions | |
| static std::string | AbsPath (StringPiece s, std::string *err) |
| static std::string | Relativize (StringPiece path, const std::vector< StringPiece > &start_list, std::string *err) |
Private Attributes | |
| std::string | relative_to_ |
| std::vector< StringPiece > | split_relative_to_ |
Utility functions for normalizing include paths on Windows.
TODO: this likely duplicates functionality of CanonicalizePath; refactor.
Definition at line 25 of file includes_normalize.h.
| IncludesNormalize::IncludesNormalize | ( | const std::string & | relative_to | ) |
Normalize path relative to |relative_to|.
Definition at line 129 of file includes_normalize-win32.cc.
References AbsPath(), Fatal(), relative_to_, split_relative_to_, and SplitStringPiece().
|
static |
Definition at line 138 of file includes_normalize-win32.cc.
References StringPiece::AsString().
Referenced by IncludesNormalize(), Normalize(), Relativize(), and TEST().
| bool IncludesNormalize::Normalize | ( | const std::string & | input, |
| std::string * | result, | ||
| std::string * | err ) const |
Normalize by fixing slashes style, fixing redundant .
. and . and makes the path |input| relative to |this->relative_to_| and store to |result|.
Definition at line 184 of file includes_normalize-win32.cc.
References AbsPath(), StringPiece::AsString(), CanonicalizePath(), relative_to_, Relativize(), and split_relative_to_.
Referenced by CLParser::Parse(), TEST(), and TEST().
|
static |
Definition at line 159 of file includes_normalize-win32.cc.
References AbsPath(), EqualsCaseInsensitiveASCII(), JoinStringPiece(), and SplitStringPiece().
Referenced by Normalize().
|
private |
Definition at line 41 of file includes_normalize.h.
Referenced by IncludesNormalize(), and Normalize().
|
private |
Definition at line 42 of file includes_normalize.h.
Referenced by IncludesNormalize(), and Normalize().