#include <SkSLPosition.h>
Definition at line 18 of file SkSLPosition.h.
◆ Position()
SkSL::Position::Position |
( |
| ) |
|
|
inline |
Definition at line 20 of file SkSLPosition.h.
21 : fStartOffset(-1)
22 , fLength(0) {}
◆ after()
Position SkSL::Position::after |
( |
| ) |
const |
|
inline |
Definition at line 62 of file SkSLPosition.h.
62 {
65 }
static Position Range(int startOffset, int endOffset)
◆ endOffset()
int SkSL::Position::endOffset |
( |
| ) |
const |
|
inline |
Definition at line 45 of file SkSLPosition.h.
45 {
47 return fStartOffset + fLength;
48 }
◆ line()
int SkSL::Position::line |
( |
std::string_view |
source | ) |
const |
Definition at line 14 of file SkSLPosition.cpp.
14 {
16 if (fStartOffset == -1) {
17 return -1;
18 }
20 return -1;
21 }
22
29 }
30 }
32}
int line(std::string_view source) const
static float min(float r, float g, float b)
◆ operator!=()
bool SkSL::Position::operator!= |
( |
const Position & |
other | ) |
const |
|
inline |
Definition at line 71 of file SkSLPosition.h.
71 {
72 return !(*this == other);
73 }
◆ operator<()
bool SkSL::Position::operator< |
( |
const Position & |
other | ) |
const |
|
inline |
Definition at line 83 of file SkSLPosition.h.
83 {
84 return fStartOffset < other.fStartOffset;
85 }
◆ operator<=()
bool SkSL::Position::operator<= |
( |
const Position & |
other | ) |
const |
|
inline |
Definition at line 87 of file SkSLPosition.h.
87 {
88 return fStartOffset <= other.fStartOffset;
89 }
◆ operator==()
bool SkSL::Position::operator== |
( |
const Position & |
other | ) |
const |
|
inline |
Definition at line 67 of file SkSLPosition.h.
67 {
68 return fStartOffset == other.fStartOffset && fLength == other.fLength;
69 }
◆ operator>()
bool SkSL::Position::operator> |
( |
const Position & |
other | ) |
const |
|
inline |
Definition at line 75 of file SkSLPosition.h.
75 {
76 return fStartOffset > other.fStartOffset;
77 }
◆ operator>=()
bool SkSL::Position::operator>= |
( |
const Position & |
other | ) |
const |
|
inline |
Definition at line 79 of file SkSLPosition.h.
79 {
80 return fStartOffset >= other.fStartOffset;
81 }
◆ Range()
static Position SkSL::Position::Range |
( |
int |
startOffset, |
|
|
int |
endOffset |
|
) |
| |
|
inlinestatic |
Definition at line 24 of file SkSLPosition.h.
24 {
32 }
static constexpr int kMaxOffset
◆ rangeThrough()
Definition at line 51 of file SkSLPosition.h.
51 {
52 if (fStartOffset == -1 ||
end.fStartOffset == -1) {
53 return *this;
54 }
56 "Invalid range: (%d-%d) - (%d-%d)\n", this->startOffset(), this->endOffset(),
57 end.startOffset(),
end.endOffset());
59 }
#define SkASSERTF(cond, fmt,...)
◆ startOffset()
int SkSL::Position::startOffset |
( |
| ) |
const |
|
inline |
◆ valid()
bool SkSL::Position::valid |
( |
| ) |
const |
|
inline |
Definition at line 34 of file SkSLPosition.h.
34 {
35 return fStartOffset != -1;
36 }
◆ kMaxOffset
constexpr int SkSL::Position::kMaxOffset = 0x7FFFFF |
|
staticconstexpr |
The documentation for this class was generated from the following files: