clang API Documentation

Public Member Functions | Public Attributes
clang::RopePiece Struct Reference

#include <RewriteRope.h>

Collaboration diagram for clang::RopePiece:
Collaboration graph
[legend]

List of all members.

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

Detailed Description

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.


Constructor & Destructor Documentation

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.


Member Function Documentation

const char& clang::RopePiece::operator[] ( unsigned  Offset) const [inline]

Definition at line 70 of file RewriteRope.h.

References StartOffs, and StrData.

char& clang::RopePiece::operator[] ( unsigned  Offset) [inline]

Definition at line 73 of file RewriteRope.h.

References StartOffs, and StrData.

unsigned clang::RopePiece::size ( ) const [inline]

Member Data Documentation

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[]().


The documentation for this struct was generated from the following file: