Log of /trunk/io/xml/src/TKeyXML.cxx
Parent Directory
Revision
17419 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Jan 22 05:58:29 2007 UTC (8 years ago) by
brun
Original Path:
trunk/xml/src/TKeyXML.cxx
File length: 9684 byte(s)
Diff to
previous 17412
WARNING!!! This is an important change.
This is the continuation of the effort to structure libCore into
independent sub-packages.
A new class TDirectoryFile is introduced. It derives from TDirectory
and takes from TDirectory all the I/O functions.
All the classes (except TROOT) deriving from TDirectory are now derived
from TDirectoryFile. TDirectory keeps the previous API for back compatibility
with several functions made virtual.
This change should be back compatible, except if the user codes creates
a file sub-directory by direct invokation of the TDirectory constructor
instead of calling TDirectory::mkdir.
Note that TMapFile is not yet fully adapted to the new scheme.
Revision
17412 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sat Jan 20 19:29:35 2007 UTC (8 years ago) by
brun
Original Path:
trunk/xml/src/TKeyXML.cxx
File length: 9672 byte(s)
Diff to
previous 15512
-Remove Varargs.h from TString.h and TObject.h and add this include
in the few files that need it.
-Move the following enums from TBuffer.h to TBufferFile.h
enum { kMapSize = 503 };
enum { kStreamedMemberWise = BIT(14) }; //added to version number to know if a collection has been stored member-wise
enum { kNotDecompressed = BIT(15) }; //indicates a weird buffer, used by TBasket
enum { kCannotHandleMemberWiseStreaming = BIT(17), //if set TClonesArray should not use memeber wise streaming
kTextBasedStreaming = BIT(18) }; // indicates if buffer used for XML/SQL object streaming
Revision
15512 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Jun 22 08:21:23 2006 UTC (8 years, 7 months ago) by
brun
Original Path:
trunk/xml/src/TKeyXML.cxx
File length: 9666 byte(s)
Diff to
previous 13977
From Sergey Linev:
1. Implementation of TDirectory I/O for TSQLFile and TXMLFile
2. In TSQLFile identifier length is now controled.
Important for Oracle, where table or column name cannot be more than 32 symbols.
3. Adding usage of TSQLStatement class where possible.
4. Small performance improvment.
Revision
13977 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Feb 1 18:57:41 2006 UTC (8 years, 11 months ago) by
pcanal
Original Path:
trunk/xml/src/TKeyXML.cxx
File length: 7804 byte(s)
Diff to
previous 13927
From Sergei Linev:
Move CreateKey from TDirectory to TFile
Here is also optimisation of SQL statements and adjustement for Oracle.
Implementation of ClassBegin()/ClassMember()/ClassEnd() methdos for TBufferSQL2 and TBufferXML.
I also implementation for ClassMemeber() method for case of "raw:data" for SQL and XML cases.
Revision
13871 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Jan 20 01:12:13 2006 UTC (9 years ago) by
pcanal
Original Path:
trunk/xml/src/TKeyXML.cxx
File length: 6938 byte(s)
Diff to
previous 13317
From Sergei Linev:
1. Better support of TClonesArray.
Now TBufferXML all set bit, that member-wise streaming is not supported.
Therefore, objects in TClonesArray are stored in XML file in "normal" form
and you can see correctly them in xml.
2. Object conversion to/from XML
Some times ago I get a request to convert object directly to XML form without
file I/O. I implement four static methods in TBufferXML:
static TString ConvertToXML(TObject* obj, Bool_t GenericLayout = kFALSE, Bool_t UseNamespaces = kFALSE);
static TString ConvertToXML(void* obj, TClass* cl, Bool_t GenericLayout = kFALSE, Bool_t UseNamespaces = kFALSE);
static TObject* ConvertFromXML(const char* str, Bool_t GenericLayout = kFALSE, Bool_t UseNamespaces = kFALSE);
static void* ConvertFromXMLAny(const char* str, TClass** cl = 0, Bool_t GenericLayout = kFALSE, Bool_t UseNamespaces = kFALSE);
They convert object to/from string with XML nodes. Simplest code is look like:
TH1* h = new TH1I("name","title", 1000, 0, 1000);
TString s = TBufferXML::ConvertToXML(h);
cout << s << endl;
TObject* obj = TBufferXML::ConvertFromXML(s);
if (obj) obj->Draw();
3. More information stored in XML file.
I now store file creation/modification time, file UUID, file title, key title and creation time.
I also put TXMLFile version into file itself to support old format of XML file for case of TClonesArray.
4. Preparation for custom streamers support
I already put implementation of methods
virtual void ClassBegin(const TClass*, Version_t = -1);
virtual void ClassEnd(const TClass*);
virtual void ClassMember(const char* name, const char* typeName = 0, Int_t arrsize1 = -1, Int_t arrsize2 = -1);
into TBufferXML class to enable support for custom streamers.
They work the same way as I did for TBufferSQL2 class,
but to enable them, I need declaration of that functions in TBuffer class.
For TBuffer these functions does not required any implementation.
Revision
13317 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Nov 22 20:42:37 2005 UTC (9 years, 2 months ago) by
pcanal
Original Path:
trunk/xml/src/TKeyXML.cxx
File length: 5890 byte(s)
Diff to
previous 13291
From Sergei:
Fix white spaces, add more comment to functions, add CVS tag lines and copyright.
It should now work for array of objects and most stl classes.
I put limitation for array size. If array with fixed size exceed limit (default 20),
array will be converted to raw data, otherwise each element of array will be presented as
single column.
Revision
11743 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Added
Fri May 6 14:25:34 2005 UTC (9 years, 8 months ago) by
brun
Original Path:
trunk/xml/src/TKeyXML.cxx
File length: 6209 byte(s)
Rename classes TXMLBuffer to TBufferXML and TXMLKey to TKeyXML.
This to be consistent with naming conventions and the introduction
of the future classes TTreeSQL, TBasketSQL and TBufferSQL
This form allows you to request diffs between any two revisions of this file.
For each of the two "sides" of the diff,
enter a numeric revision.