#ifndef ROOT_TGTextBuffer
#define ROOT_TGTextBuffer
#ifndef ROOT_TString
#include "TString.h"
#endif
class TGTextBuffer {
private:
TString *fBuffer;
protected:
TGTextBuffer(const TGTextBuffer& tb): fBuffer(tb.fBuffer) { }
TGTextBuffer& operator=(const TGTextBuffer& tb)
{if(this!=&tb) fBuffer=tb.fBuffer; return *this;}
public:
TGTextBuffer(): fBuffer(new TString) { }
TGTextBuffer(Int_t length): fBuffer(new TString(length)) { }
virtual ~TGTextBuffer() { delete fBuffer; }
UInt_t GetTextLength() const { return fBuffer->Length(); }
UInt_t GetBufferLength() const { return fBuffer->Capacity(); }
const char *GetString() const { return fBuffer->Data(); }
void AddText(Int_t pos, const char *text) { fBuffer->Insert(pos, text); }
void AddText(Int_t pos, const char *text, Int_t length) { fBuffer->Insert(pos, text, length); }
void RemoveText(Int_t pos, Int_t length) { fBuffer->Remove(pos, length); }
void Clear() { fBuffer->Remove(0, fBuffer->Length()); }
ClassDef(TGTextBuffer,0)
};
#endif
Last change: Wed Jun 25 08:43:08 2008
Last generated: 2008-06-25 08:43
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.