Warning, file /include/root/TGTextBuffer.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef ROOT_TGTextBuffer
0013 #define ROOT_TGTextBuffer
0014
0015 #include "TString.h"
0016
0017 class TGTextBuffer {
0018
0019 private:
0020 TString fBuffer;
0021
0022 TGTextBuffer(const TGTextBuffer&) = delete;
0023 TGTextBuffer& operator=(const TGTextBuffer&) = delete;
0024
0025 public:
0026 TGTextBuffer() : fBuffer() {}
0027 TGTextBuffer(Int_t length): fBuffer(length) {}
0028 virtual ~TGTextBuffer() {}
0029
0030 UInt_t GetTextLength() const { return fBuffer.Length(); }
0031 UInt_t GetBufferLength() const { return fBuffer.Capacity(); }
0032 const char *GetString() const { return fBuffer.Data(); }
0033
0034 void AddText(Int_t pos, const char *text) { fBuffer.Insert(pos, text); }
0035 void AddText(Int_t pos, const char *text, Int_t length) { fBuffer.Insert(pos, text, length); }
0036 void RemoveText(Int_t pos, Int_t length) { fBuffer.Remove(pos, length); }
0037 void Clear() { fBuffer.Remove(0, fBuffer.Length()); }
0038
0039 ClassDef(TGTextBuffer,0)
0040 };
0041
0042 #endif