clang API Documentation
#include <RewriteRope.h>

Public Member Functions | |
| RopePiece () | |
| RopePiece (RopeRefCountString *Str, unsigned Start, unsigned End) | |
| RopePiece (const RopePiece &RP) | |
| ~RopePiece () | |
| void | operator= (const RopePiece &RHS) |
| const char & | operator[] (unsigned Offset) const |
| char & | operator[] (unsigned Offset) |
| unsigned | size () const |
Public Attributes | |
| RopeRefCountString * | StrData |
| unsigned | StartOffs |
| unsigned | EndOffs |
RopePiece - This class represents a view into a RopeRefCountString object. This allows references to string data to be efficiently chopped up and moved around without having to push around the string data itself.
For example, we could have a 1M RopePiece and want to insert something into the middle of it. To do this, we split it into two RopePiece objects that both refer to the same underlying RopeRefCountString (just with different offsets) which is a nice constant time operation.
Definition at line 57 of file RewriteRope.h.
| clang::RopePiece::RopePiece | ( | ) | [inline] |
Definition at line 62 of file RewriteRope.h.
| clang::RopePiece::RopePiece | ( | RopeRefCountString * | Str, |
| unsigned | Start, | ||
| unsigned | End | ||
| ) | [inline] |
Definition at line 64 of file RewriteRope.h.
References clang::RopeRefCountString::addRef(), and StrData.
| clang::RopePiece::RopePiece | ( | const RopePiece & | RP | ) | [inline] |
Definition at line 68 of file RewriteRope.h.
References clang::RopeRefCountString::addRef(), and StrData.
| clang::RopePiece::~RopePiece | ( | ) | [inline] |
Definition at line 73 of file RewriteRope.h.
References clang::RopeRefCountString::dropRef(), and StrData.
| void clang::RopePiece::operator= | ( | const RopePiece & | RHS | ) | [inline] |
Definition at line 77 of file RewriteRope.h.
References clang::RopeRefCountString::addRef(), clang::RopeRefCountString::dropRef(), EndOffs, StartOffs, and StrData.
| const char& clang::RopePiece::operator[] | ( | unsigned | Offset | ) | const [inline] |
Definition at line 87 of file RewriteRope.h.
References clang::RopeRefCountString::Data, StartOffs, and StrData.
| char& clang::RopePiece::operator[] | ( | unsigned | Offset | ) | [inline] |
Definition at line 90 of file RewriteRope.h.
References clang::RopeRefCountString::Data, StartOffs, and StrData.
| unsigned clang::RopePiece::size | ( | ) | const [inline] |
Definition at line 94 of file RewriteRope.h.
References EndOffs, and StartOffs.
Referenced by clang::RopePieceBTreeIterator::operator++().
| unsigned clang::RopePiece::EndOffs |
Definition at line 60 of file RewriteRope.h.
Referenced by operator=(), and size().
| unsigned clang::RopePiece::StartOffs |
Definition at line 59 of file RewriteRope.h.
Referenced by operator=(), operator[](), and size().
Definition at line 58 of file RewriteRope.h.
Referenced by operator=(), operator[](), RopePiece(), and ~RopePiece().