clang API Documentation
#include <RewriteRope.h>
Public Member Functions | |
RopePiece () | |
RopePiece (llvm::IntrusiveRefCntPtr< RopeRefCountString > Str, unsigned Start, unsigned End) | |
const char & | operator[] (unsigned Offset) const |
char & | operator[] (unsigned Offset) |
unsigned | size () const |
Public Attributes | |
llvm::IntrusiveRefCntPtr < 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 59 of file RewriteRope.h.
clang::RopePiece::RopePiece | ( | ) | [inline] |
Definition at line 64 of file RewriteRope.h.
clang::RopePiece::RopePiece | ( | llvm::IntrusiveRefCntPtr< RopeRefCountString > | Str, |
unsigned | Start, | ||
unsigned | End | ||
) | [inline] |
Definition at line 66 of file RewriteRope.h.
const char& clang::RopePiece::operator[] | ( | unsigned | Offset | ) | const [inline] |
Definition at line 70 of file RewriteRope.h.
char& clang::RopePiece::operator[] | ( | unsigned | Offset | ) | [inline] |
Definition at line 73 of file RewriteRope.h.
unsigned clang::RopePiece::size | ( | ) | const [inline] |
Definition at line 77 of file RewriteRope.h.
References EndOffs, and StartOffs.
Referenced by clang::RopePieceBTreeIterator::operator++(), and clang::RopePieceBTreeIterator::piece().
Definition at line 62 of file RewriteRope.h.
Referenced by size().
Definition at line 61 of file RewriteRope.h.
Referenced by operator[](), and size().
llvm::IntrusiveRefCntPtr<RopeRefCountString> clang::RopePiece::StrData |
Definition at line 60 of file RewriteRope.h.
Referenced by operator[]().