23 #ifndef ADF_CompositeFrame
43 fCurrentKeys.SetOwner(
false); fStackOfKeys.SetOwner(
true);
59 fCurrentKeys.SetOwner(
false); fStackOfKeys.SetOwner(
true);
69 fCurrentKeys.Clear(); fStackOfKeys.Delete();
75 UInt_t nb_current = fCurrentKeys.GetSize();
78 Key *key = fStackOfKeys.At(nb_current);
85 fStackOfKeys.Add(key);
92 UInt_t sum_data_size = 0u;
109 fCurrentKeys.Add(nextsubkey);
117 return sum_data_size;
142 Key *nextsubkey = 0x0;
158 fCurrentKeys.Add(nextsubkey);
165 Key *subkey = fCurrentKeys.At(whichsubkey);
191 if ( subkey == from.
GetKey() ) {
215 GetKey()->SetDataLength(
GetKey()->GetDataLength()+needed);
virtual const Key * GetSubKey(UInt_t) const =0
Returns one of the sub-key in case this is a composite frame.
virtual Bool_t Reserve(UInt_t size)
to reserve a given size (from the current position) to be sure one are able to write something ...
virtual BufferIO * RealBuffer()
virtual Key * GetKey()=0
To get the Key associated to this frame.
Char_t * CurrentAddress()
for classes that needs it to write directly data into it.
virtual const BufferIO * GetRealBuffer() const =0
give access to the underlying buffer of the data part
virtual Key * GetKey()
To get the Key associated to this frame.
virtual Bool_t IsASubFrame(const Frame &)
to check if a subframe could be added to the composite frame
virtual UInt_t GetDataLength() const
Key * fSubKeyConst
ConstKey remains unchanged (unlinked) to be sure the comparison IsAKey is always good.
virtual Bool_t ExportData(BufferIO &buf) const =0
Export the content of the frame (data part only) in a buffer.
UInt_t Offset() const
it returns the current position in the buffer
virtual Bool_t IsComposite() const
tells if this frame is a composite frame i.e. if it is composed of sub-frames
virtual Bool_t AddSubFrame(const Frame &)
Add a subframe to that frame (only if composite)
virtual UInt_t GetKeyLength() const
Unique number corresponding to a type of Key.
virtual const Char_t * GetAddress() const
virtual Bool_t Copy(const Char_t *from, UInt_t from_size)
copy an external buffer to this.
virtual UInt_t Scan()
Scan this CompositeFrame. If it is a composite frame, it looks for the keys of sub-frames.
virtual Bool_t Link(const Char_t *, UInt_t)
Link an external buffer to this key.
virtual Bool_t Convert(const Key *akey)
convert a key to another key ... not an easy task ... use it carefully
Key * NewSubKey()
to get a new subkey
virtual Bool_t LinkSubFrame(UInt_t, Frame *)
Attach the sub-frame corresponding to the given subkey to the Frame given in the second argument...
virtual Bool_t Link(const Char_t *, UInt_t, const char= 'b')=0
Link a buffer to this Frame.
virtual Bool_t TransfertSubFrame(const Frame &from, UInt_t whichsub)
copy the sub-frame #i to the CompositeFrame given in the second argument
virtual ~CompositeFrame()
Key * fSubKey
Key used to scan the main frame (link to parts of the main frame)
static MainKeyFactory & theMainFactory()
the main (global) keyfactory
virtual Key * New(const FactoryItem &)
build a key using item.
virtual Bool_t IsAKey(const Key *akey) const
Compares two keys.
virtual UInt_t GetFrameLength() const
Base class that described an item in a Factory.
UInt_t SetOffset(UInt_t off=0u) const
change the current position.