TFree


class description - source file - inheritance tree

class TFree : public TObject


    public:
TFree TFree() TFree TFree(TList* lfree, Seek_t first, Seek_t last) TFree TFree(TFree&) virtual void ~TFree() TFree* AddFree(TList* lfree, Seek_t first, Seek_t last) static TClass* Class() virtual void FillBuffer(char*& buffer) TFree* GetBestFree(TList* lfree, Int_t nbytes) Seek_t GetFirst() Seek_t GetLast() virtual TClass* IsA() const virtual void ReadBuffer(char*& buffer) void SetFirst(Seek_t first) void SetLast(Seek_t last) virtual void ShowMembers(TMemberInspector& insp, char* parent) Int_t Sizeof() const virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b)

Data Members

protected:
Seek_t fFirst First free word of segment Seek_t fLast Last free word of segment

Class Description

 Service class for TFile.
 Each file has a linked list of free segments. Each free segment
 is described by its firts and last address.
 When an object is written to a file via TObject::Write, a new Key (see TKey)
 is created. The first free segment big enough to accomodate the object
 is used.
 If the object size has a length corresponding to the size of the free segment,
 the free segment is deleted from the list of free segments.
 When an object is deleted from a file, a new TFree object is generated.
 If the deleted object is contiguous to an already deleted object, the free
 segments are merged in one single segment.


TFree()
*-*-*-*-*-*-*-*-*-*-*TFree default constructor*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                  =========================

TFree(TList *lfree, Seek_t first, Seek_t last)
*-*-*-*-*-*-*-*-*-*-*Constructor for a FREE segment*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                  ==============================

TFree* AddFree(TList *lfree, Seek_t first, Seek_t last)
*-*-*-*-*-*-*-*-*-*Add a new free segment to the list of free segments*-*-*
*-*                ===================================================
  If last just preceedes an existing free segment, then first becomes
     the new starting location of the free segment.
  if first just follows an existing free segment, then last becomes
     the new ending location of the free segment.
  if first just follows an existing free segment AND last just preceedes
     an existing free segment, these two segments are merged into
     one single segment.


~TFree()
*-*-*-*-*-*-*-*-*-*-*-*TFree Destructor*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                    ================

void FillBuffer(char *&buffer)
*-*-*-*-*-*-*-*-*-*-*Encode FREE structure into output buffer*-*-*-*-*-*-*
*-*                  ========================================

TFree* GetBestFree(TList *lfree, Int_t nbytes)
*-*-*-*-*-*-*-*-*-*Return the best free segment where to store nbytes*-*-*-*
*-*                ==================================================

void ReadBuffer(char *&buffer)
*-*-*-*-*-*-*-*-*-*-*-*Decode one FREE structure from input buffer*-*-*-*-*
*-*                    ===========================================



Inline Functions


             Seek_t GetFirst()
             Seek_t GetLast()
               void SetFirst(Seek_t first)
               void SetLast(Seek_t last)
              Int_t Sizeof() const
            TClass* Class()
            TClass* IsA() const
               void ShowMembers(TMemberInspector& insp, char* parent)
               void Streamer(TBuffer& b)
               void StreamerNVirtual(TBuffer& b)
              TFree TFree(TFree&)


Author: Rene Brun 28/12/94
Last update: root/base:$Name: $:$Id: TFree.cxx,v 1.2 2000/11/21 16:33:02 brun Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *


ROOT page - Class index - Top of the page

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.