ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
TSQLStructure Class Reference

This is hierarhical structure, which is created when data is written by TBufferSQL2.

It contains data all structurual information such: version of written class, data memeber types of that class, value for each data memeber and so on. Such structure in some sense similar to XML node and subnodes structure Once it created, it converted to SQL statements, which are submitted to database server.

Definition at line 107 of file TSQLStructure.h.

Public Types

enum  ESQLTypes {
  kSqlObject = 10001, kSqlPointer = 10002, kSqlVersion = 10003, kSqlStreamerInfo = 10004,
  kSqlClassStreamer = 10005, kSqlElement = 10006, kSqlValue = 10007, kSqlArray = 10008,
  kSqlObjectData = 10009, kSqlCustomClass = 10010, kSqlCustomElement = 10011
}
 
enum  ESQLColumns {
  kColUnknown = 0, kColSimple = 1, kColSimpleArray = 2, kColParent = 3,
  kColObject = 4, kColObjectArray = 5, kColNormObject = 6, kColNormObjectArray = 7,
  kColObjectPtr = 8, kColTString = 9, kColRawData = 10
}
 
enum  ESQLIdType { kIdTable = 0, kIdRawTable = 1, kIdColumn = 2 }
 
- Public Types inherited from TObject
enum  EStatusBits {
  kCanDelete = BIT(0), kMustCleanup = BIT(3), kObjInCanvas = BIT(3), kIsReferenced = BIT(4),
  kHasUUID = BIT(5), kCannotPick = BIT(6), kNoContextMenu = BIT(8), kInvalidObject = BIT(13)
}
 
enum  { kIsOnHeap = 0x01000000, kNotDeleted = 0x02000000, kZombie = 0x04000000, kBitMask = 0x00ffffff }
 
enum  { kSingleKey = BIT(0), kOverwrite = BIT(1), kWriteDelete = BIT(2) }
 

Public Member Functions

 TSQLStructure ()
 
virtual ~TSQLStructure ()
 destructor More...
 
TSQLStructureGetParent () const
 
void SetParent (TSQLStructure *p)
 
Int_t NumChilds () const
 number of child structures More...
 
TSQLStructureGetChild (Int_t n) const
 return child structure of index n More...
 
void SetType (Int_t typ)
 
Int_t GetType () const
 
void SetObjectRef (Long64_t refid, const TClass *cl)
 set structure type as kSqlObject More...
 
void SetObjectPointer (Long64_t ptrid)
 set structure type as kSqlPointer More...
 
void SetVersion (const TClass *cl, Int_t version=-100)
 set structure type as kSqlVersion More...
 
void SetClassStreamer (const TClass *cl)
 set structure type as kSqlClassStreamer More...
 
void SetStreamerInfo (const TStreamerInfo *info)
 set structure type as kSqlStreamerInfo More...
 
void SetStreamerElement (const TStreamerElement *elem, Int_t number)
 set structure type as kSqlElement More...
 
void SetCustomClass (const TClass *cl, Version_t version)
 set structure type as kSqlCustomClass More...
 
void SetCustomElement (TStreamerElement *elem)
 set structure type as kSqlCustomElement More...
 
void SetValue (const char *value, const char *tname=0)
 set structure type as kSqlValue More...
 
void SetArrayIndex (Int_t indx, Int_t cnt=1)
 set array index for this structure More...
 
void SetArray (Int_t sz=-1)
 Set structure as array element. More...
 
void ChangeValueOnly (const char *value)
 change value of this structure used as "workaround" to keep object id in kSqlElement node More...
 
TClassGetObjectClass () const
 return object class if type kSqlObject More...
 
TClassGetVersionClass () const
 return class for version tag if type is kSqlVersion More...
 
TStreamerInfoGetStreamerInfo () const
 return TStreamerInfo* if type is kSqlStreamerInfo More...
 
TStreamerElementGetElement () const
 return TStremerElement* if type is kSqlElement More...
 
Int_t GetElementNumber () const
 returns number of TStremerElement in TStreamerInfo More...
 
TClassGetCustomClass () const
 return element custom class if strutures is kSqlCustomClass More...
 
Version_t GetCustomClassVersion () const
 return custom class version if strutures is kSqlCustomClass More...
 
Bool_t GetClassInfo (TClass *&cl, Version_t &version)
 provides class info if structure kSqlStreamerInfo or kSqlCustomClass More...
 
const char * GetValueType () const
 return value type if structure is kSqlValue More...
 
const char * GetValue () const
 returns value for different structure kinds has different sense For kSqlVersion it version, for kSqlReference it is object id and so on More...
 
Int_t GetArrayIndex () const
 
Int_t GetRepeatCounter () const
 
void Add (TSQLStructure *child)
 Add child strucure. More...
 
void AddVersion (const TClass *cl, Int_t version=-100)
 add child as version More...
 
void AddValue (const char *value, const char *tname=0)
 Add child structure as value. More...
 
void ChildArrayIndex (Int_t index, Int_t cnt=1)
 set array index for last child element if (cnt<=1) return; More...
 
Long64_t DefineObjectId (Bool_t recursive=kTRUE)
 defines current object id, to which this structure belong make life complicated, because some objects do not get id automatically in TBufferSQL, but afterwards More...
 
void SetObjectData (TSQLObjectData *objdata)
 set element to be used for object data More...
 
void AddObjectData (TSQLObjectData *objdata)
 add element with pointer to object data More...
 
TSQLObjectDataGetObjectData (Bool_t search=false)
 searchs for objects data More...
 
virtual void Print (Option_t *option="") const
 print content of complete structure More...
 
void PrintLevel (Int_t level) const
 print content of current structure More...
 
Bool_t ConvertToTables (TSQLFile *f, Long64_t keyid, TObjArray *cmds)
 Convert structure to sql statements This function is called immidiately after TBufferSQL2 produces this structure with object data Should be only called for toplevel structure. More...
 
Int_t LocateElementColumn (TSQLFile *f, TBufferSQL2 *buf, TSQLObjectData *data)
 find column in TSQLObjectData object, which correspond to current element More...
 
 ClassDef (TSQLStructure, 1)
 
- Public Member Functions inherited from TObject
 TObject ()
 
 TObject (const TObject &object)
 TObject copy ctor. More...
 
TObjectoperator= (const TObject &rhs)
 TObject assignment operator. More...
 
virtual ~TObject ()
 TObject destructor. More...
 
virtual void AppendPad (Option_t *option="")
 Append graphics object to current pad. More...
 
virtual void Browse (TBrowser *b)
 Browse object. May be overridden for another default action. More...
 
virtual const char * ClassName () const
 Returns name of class to which the object belongs. More...
 
virtual void Clear (Option_t *="")
 
virtual TObjectClone (const char *newname="") const
 Make a clone of an object using the Streamer facility. More...
 
virtual Int_t Compare (const TObject *obj) const
 Compare abstract method. More...
 
virtual void Copy (TObject &object) const
 Copy this to obj. More...
 
virtual void Delete (Option_t *option="")
 Delete this object. More...
 
virtual Int_t DistancetoPrimitive (Int_t px, Int_t py)
 Computes distance from point (px,py) to the object. More...
 
virtual void Draw (Option_t *option="")
 Default Draw method for all objects. More...
 
virtual void DrawClass () const
 Draw class inheritance tree of the class to which this object belongs. More...
 
virtual TObjectDrawClone (Option_t *option="") const
 Draw a clone of this object in the current pad. More...
 
virtual void Dump () const
 Dump contents of object on stdout. More...
 
virtual void Execute (const char *method, const char *params, Int_t *error=0)
 Execute method on this object with the given parameter string, e.g. More...
 
virtual void Execute (TMethod *method, TObjArray *params, Int_t *error=0)
 Execute method on this object with parameters stored in the TObjArray. More...
 
virtual void ExecuteEvent (Int_t event, Int_t px, Int_t py)
 Execute action corresponding to an event at (px,py). More...
 
virtual TObjectFindObject (const char *name) const
 Must be redefined in derived classes. More...
 
virtual TObjectFindObject (const TObject *obj) const
 Must be redefined in derived classes. More...
 
virtual Option_tGetDrawOption () const
 Get option used by the graphics system to draw this object. More...
 
virtual UInt_t GetUniqueID () const
 Return the unique object id. More...
 
virtual const char * GetName () const
 Returns name of object. More...
 
virtual const char * GetIconName () const
 Returns mime type name of object. More...
 
virtual Option_tGetOption () const
 
virtual char * GetObjectInfo (Int_t px, Int_t py) const
 Returns string containing info about the object at position (px,py). More...
 
virtual const char * GetTitle () const
 Returns title of object. More...
 
virtual Bool_t HandleTimer (TTimer *timer)
 Execute action in response of a timer timing out. More...
 
virtual ULong_t Hash () const
 Return hash value for this object. More...
 
virtual Bool_t InheritsFrom (const char *classname) const
 Returns kTRUE if object inherits from class "classname". More...
 
virtual Bool_t InheritsFrom (const TClass *cl) const
 Returns kTRUE if object inherits from TClass cl. More...
 
virtual void Inspect () const
 Dump contents of this object in a graphics canvas. More...
 
virtual Bool_t IsFolder () const
 Returns kTRUE in case object contains browsable objects (like containers or lists of other objects). More...
 
virtual Bool_t IsEqual (const TObject *obj) const
 Default equal comparison (objects are equal if they have the same address in memory). More...
 
virtual Bool_t IsSortable () const
 
Bool_t IsOnHeap () const
 
Bool_t IsZombie () const
 
virtual Bool_t Notify ()
 This method must be overridden to handle object notification. More...
 
virtual void ls (Option_t *option="") const
 The ls function lists the contents of a class on stdout. More...
 
virtual void Paint (Option_t *option="")
 This method must be overridden if a class wants to paint itself. More...
 
virtual void Pop ()
 Pop on object drawn in a pad to the top of the display list. More...
 
virtual Int_t Read (const char *name)
 Read contents of object with specified name from the current directory. More...
 
virtual void RecursiveRemove (TObject *obj)
 Recursively remove this object from a list. More...
 
virtual void SaveAs (const char *filename="", Option_t *option="") const
 Save this object in the file specified by filename. More...
 
virtual void SavePrimitive (std::ostream &out, Option_t *option="")
 Save a primitive as a C++ statement(s) on output stream "out". More...
 
virtual void SetDrawOption (Option_t *option="")
 Set drawing option for object. More...
 
virtual void SetUniqueID (UInt_t uid)
 Set the unique object id. More...
 
virtual void UseCurrentStyle ()
 Set current style settings in this object This function is called when either TCanvas::UseCurrentStyle or TROOT::ForceStyle have been invoked. More...
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0)
 Write this object to the current directory. More...
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0) const
 Write this object to the current directory. More...
 
voidoperator new (size_t sz)
 
voidoperator new[] (size_t sz)
 
voidoperator new (size_t sz, void *vp)
 
voidoperator new[] (size_t sz, void *vp)
 
void operator delete (void *ptr)
 Operator delete. More...
 
void operator delete[] (void *ptr)
 Operator delete []. More...
 
void SetBit (UInt_t f, Bool_t set)
 Set or unset the user status bits as specified in f. More...
 
void SetBit (UInt_t f)
 
void ResetBit (UInt_t f)
 
Bool_t TestBit (UInt_t f) const
 
Int_t TestBits (UInt_t f) const
 
void InvertBit (UInt_t f)
 
virtual void Info (const char *method, const char *msgfmt,...) const
 Issue info message. More...
 
virtual void Warning (const char *method, const char *msgfmt,...) const
 Issue warning message. More...
 
virtual void Error (const char *method, const char *msgfmt,...) const
 Issue error message. More...
 
virtual void SysError (const char *method, const char *msgfmt,...) const
 Issue system error message. More...
 
virtual void Fatal (const char *method, const char *msgfmt,...) const
 Issue fatal error message. More...
 
void AbstractMethod (const char *method) const
 Use this method to implement an "abstract" method that you don't want to leave purely abstract. More...
 
void MayNotUse (const char *method) const
 Use this method to signal that a method (defined in a base class) may not be called in a derived class (in principle against good design since a child class should not provide less functionality than its parent, however, sometimes it is necessary). More...
 
void Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const
 Use this method to declare a method obsolete. More...
 

Static Public Member Functions

static Bool_t UnpackTObject (TSQLFile *f, TBufferSQL2 *buf, TSQLObjectData *data, Long64_t objid, Int_t clversion)
 Unpack TObject data in form, understodable by custom TObject streamer. More...
 
static Bool_t UnpackTString (TSQLFile *f, TBufferSQL2 *buf, TSQLObjectData *data, Long64_t objid, Int_t clversion)
 Unpack TString data in form, understodable by custom TString streamer. More...
 
static Bool_t IsNumericType (Int_t typ)
 defines if value is numeric and not requires quotes when writing More...
 
static const char * GetSimpleTypeName (Int_t typ)
 provides name for basic types used as suffix for column name or field suffix in raw table More...
 
static TString MakeArrayIndex (TStreamerElement *elem, Int_t n)
 produce string with complete index like [1][2][0] More...
 
static Int_t DefineElementColumnType (TStreamerElement *elem, TSQLFile *f)
 defines which kind of column can be assigned for this element Possible cases kColSimple - basic data type kColSimpleArray - fixed arary of basic types kColParent - parent class kColObject - object as data memeber kColObjectPtr - object as pointer kColTString - TString kColRawData - anything else as raw data More...
 
static TString DefineElementColumnName (TStreamerElement *elem, TSQLFile *f, Int_t indx=0)
 returns name of the column in class table for that element More...
 
static void AddStrBrackets (TString &s, const char *quote)
 adds quotes arround string value and replaces some special symbols More...
 
- Static Public Member Functions inherited from TObject
static Long_t GetDtorOnly ()
 Return destructor only flag. More...
 
static void SetDtorOnly (void *obj)
 Set destructor only flag. More...
 
static Bool_t GetObjectStat ()
 Get status of object stat flag. More...
 
static void SetObjectStat (Bool_t stat)
 Turn on/off tracking of objects in the TObjectTable. More...
 

Protected Member Functions

Bool_t CheckNormalClassPair (TSQLStructure *vers, TSQLStructure *info)
 check if pair of two element corresponds to start of object, stored in normal form More...
 
Long64_t FindMaxObjectId ()
 define maximum reference id, used for objects More...
 
void PerformConversion (TSqlRegistry *reg, TSqlRawBuffer *blobs, const char *topname, Bool_t useblob=kFALSE)
 perform conversion of structure to sql statements first tries convert it to normal form if fails, produces data for raw table More...
 
Bool_t StoreObject (TSqlRegistry *reg, Long64_t objid, TClass *cl, Bool_t registerobj=kTRUE)
 convert object data to sql statements if normal (columnwise) representation is not possible, complete object will be converted to raw format More...
 
Bool_t StoreObjectInNormalForm (TSqlRegistry *reg)
 this function verify object child elements and calls transformation to class table More...
 
Bool_t StoreClassInNormalForm (TSqlRegistry *reg)
 produces data for complete class table where not possible, raw data for some elements are created More...
 
Bool_t StoreElementInNormalForm (TSqlRegistry *reg, TSQLTableData *columns)
 tries to store element data in column More...
 
Bool_t TryConvertObjectArray (TSqlRegistry *reg, TSqlRawBuffer *blobs)
 tries to write array of objects as lis of object refereneces in streamer table, while objects itself will be stored in other tables. More...
 
Bool_t StoreTObject (TSqlRegistry *reg)
 store data of TObject in special table workaround custom TObject streamer More...
 
Bool_t StoreTString (TSqlRegistry *reg)
 store data of TString in special table it is required when TString stored as pointer and reference to it possible More...
 
Bool_t RecognizeTString (const char *&value)
 prove that structure containes TString data More...
 
- Protected Member Functions inherited from TObject
void MakeZombie ()
 
virtual void DoError (int level, const char *location, const char *fmt, va_list va) const
 Interface to ErrorHandler (protected). More...
 

Protected Attributes

TSQLStructurefParent
 
Int_t fType
 
const voidfPointer
 
TString fValue
 
Int_t fArrayIndex
 
Int_t fRepeatCnt
 
TObjArray fChilds
 

#include <TSQLStructure.h>

Inheritance diagram for TSQLStructure:
[legend]

Member Enumeration Documentation

Enumerator
kColUnknown 
kColSimple 
kColSimpleArray 
kColParent 
kColObject 
kColObjectArray 
kColNormObject 
kColNormObjectArray 
kColObjectPtr 
kColTString 
kColRawData 

Definition at line 214 of file TSQLStructure.h.

Enumerator
kIdTable 
kIdRawTable 
kIdColumn 

Definition at line 228 of file TSQLStructure.h.

Enumerator
kSqlObject 
kSqlPointer 
kSqlVersion 
kSqlStreamerInfo 
kSqlClassStreamer 
kSqlElement 
kSqlValue 
kSqlArray 
kSqlObjectData 
kSqlCustomClass 
kSqlCustomElement 

Definition at line 200 of file TSQLStructure.h.

Constructor & Destructor Documentation

TSQLStructure::TSQLStructure ( )

Definition at line 371 of file TSQLStructure.cxx.

Referenced by AddObjectData(), AddValue(), and AddVersion().

TSQLStructure::~TSQLStructure ( )
virtual

destructor

Definition at line 387 of file TSQLStructure.cxx.

Member Function Documentation

void TSQLStructure::Add ( TSQLStructure child)

Add child strucure.

Definition at line 637 of file TSQLStructure.cxx.

Referenced by AddObjectData(), AddValue(), AddVersion(), and TBufferSQL2::PushStack().

void TSQLStructure::AddObjectData ( TSQLObjectData objdata)

add element with pointer to object data

Definition at line 703 of file TSQLStructure.cxx.

Referenced by LocateElementColumn(), TBufferSQL2::SqlReadObjectDirect(), and TBufferSQL2::WorkWithClass().

void TSQLStructure::AddStrBrackets ( TString s,
const char *  quote 
)
static

adds quotes arround string value and replaces some special symbols

Definition at line 2383 of file TSQLStructure.cxx.

Referenced by TSQLFile::DirWriteHeader(), and TSQLFile::UpdateKeyData().

void TSQLStructure::AddValue ( const char *  value,
const char *  tname = 0 
)

Add child structure as value.

Definition at line 658 of file TSQLStructure.cxx.

Referenced by TBufferSQL2::SqlWriteValue().

void TSQLStructure::AddVersion ( const TClass cl,
Int_t  version = -100 
)

add child as version

Definition at line 648 of file TSQLStructure.cxx.

Referenced by TBufferSQL2::WriteVersion().

void TSQLStructure::ChangeValueOnly ( const char *  value)

change value of this structure used as "workaround" to keep object id in kSqlElement node

Definition at line 507 of file TSQLStructure.cxx.

Referenced by TBufferSQL2::WorkWithClass().

Bool_t TSQLStructure::CheckNormalClassPair ( TSQLStructure vers,
TSQLStructure info 
)
protected

check if pair of two element corresponds to start of object, stored in normal form

Definition at line 1821 of file TSQLStructure.cxx.

Referenced by StoreObjectInNormalForm(), and TryConvertObjectArray().

void TSQLStructure::ChildArrayIndex ( Int_t  index,
Int_t  cnt = 1 
)

set array index for last child element if (cnt<=1) return;

Definition at line 525 of file TSQLStructure.cxx.

TSQLStructure::ClassDef ( TSQLStructure  ,
 
)
Bool_t TSQLStructure::ConvertToTables ( TSQLFile f,
Long64_t  keyid,
TObjArray cmds 
)

Convert structure to sql statements This function is called immidiately after TBufferSQL2 produces this structure with object data Should be only called for toplevel structure.

Definition at line 1262 of file TSQLStructure.cxx.

Referenced by TSQLFile::StoreObjectInTables().

TString TSQLStructure::DefineElementColumnName ( TStreamerElement elem,
TSQLFile f,
Int_t  indx = 0 
)
static

returns name of the column in class table for that element

Definition at line 2052 of file TSQLStructure.cxx.

Referenced by LocateElementColumn(), TSQLFile::ProduceClassSelectQuery(), and StoreElementInNormalForm().

Int_t TSQLStructure::DefineElementColumnType ( TStreamerElement elem,
TSQLFile f 
)
static

defines which kind of column can be assigned for this element Possible cases kColSimple - basic data type kColSimpleArray - fixed arary of basic types kColParent - parent class kColObject - object as data memeber kColObjectPtr - object as pointer kColTString - TString kColRawData - anything else as raw data

Definition at line 1948 of file TSQLStructure.cxx.

Referenced by DefineElementColumnName(), LocateElementColumn(), TSQLFile::ProduceClassSelectQuery(), StoreClassInNormalForm(), and StoreElementInNormalForm().

Long64_t TSQLStructure::DefineObjectId ( Bool_t  recursive = kTRUE)

defines current object id, to which this structure belong make life complicated, because some objects do not get id automatically in TBufferSQL, but afterwards

Definition at line 670 of file TSQLStructure.cxx.

Referenced by ConvertToTables(), FindMaxObjectId(), LocateElementColumn(), PerformConversion(), TBufferSQL2::SqlReadCharStarValue(), StoreElementInNormalForm(), and TBufferSQL2::WorkWithClass().

Long64_t TSQLStructure::FindMaxObjectId ( )
protected

define maximum reference id, used for objects

Definition at line 1244 of file TSQLStructure.cxx.

Referenced by ConvertToTables(), and FindMaxObjectId().

Int_t TSQLStructure::GetArrayIndex ( ) const
inline

Definition at line 168 of file TSQLStructure.h.

Referenced by StoreElementInNormalForm().

TSQLStructure * TSQLStructure::GetChild ( Int_t  n) const
Bool_t TSQLStructure::GetClassInfo ( TClass *&  cl,
Version_t version 
)

provides class info if structure kSqlStreamerInfo or kSqlCustomClass

Definition at line 608 of file TSQLStructure.cxx.

Referenced by CheckNormalClassPair(), StoreClassInNormalForm(), and TryConvertObjectArray().

TClass * TSQLStructure::GetCustomClass ( ) const

return element custom class if strutures is kSqlCustomClass

Definition at line 592 of file TSQLStructure.cxx.

Referenced by GetClassInfo().

Version_t TSQLStructure::GetCustomClassVersion ( ) const

return custom class version if strutures is kSqlCustomClass

Definition at line 600 of file TSQLStructure.cxx.

Referenced by GetClassInfo().

TStreamerElement * TSQLStructure::GetElement ( ) const

return TStremerElement* if type is kSqlElement

Definition at line 568 of file TSQLStructure.cxx.

Referenced by TBufferSQL2::DecrementLevel(), LocateElementColumn(), StoreClassInNormalForm(), StoreElementInNormalForm(), StoreObject(), and TryConvertObjectArray().

Int_t TSQLStructure::GetElementNumber ( ) const

returns number of TStremerElement in TStreamerInfo

Definition at line 576 of file TSQLStructure.cxx.

TClass * TSQLStructure::GetObjectClass ( ) const

return object class if type kSqlObject

Definition at line 544 of file TSQLStructure.cxx.

Referenced by ConvertToTables(), PerformConversion(), and StoreElementInNormalForm().

TSQLObjectData * TSQLStructure::GetObjectData ( Bool_t  search = false)

searchs for objects data

Definition at line 713 of file TSQLStructure.cxx.

Referenced by TBufferSQL2::ClassEnd(), TBufferSQL2::DecrementLevel(), GetObjectData(), and TBufferSQL2::WorkWithElement().

TSQLStructure* TSQLStructure::GetParent ( ) const
inline
Int_t TSQLStructure::GetRepeatCounter ( ) const
inline

Definition at line 169 of file TSQLStructure.h.

Referenced by StoreElementInNormalForm().

const char * TSQLStructure::GetSimpleTypeName ( Int_t  typ)
static

provides name for basic types used as suffix for column name or field suffix in raw table

Definition at line 812 of file TSQLStructure.cxx.

Referenced by DefineElementColumnName().

TStreamerInfo * TSQLStructure::GetStreamerInfo ( ) const

return TStreamerInfo* if type is kSqlStreamerInfo

Definition at line 560 of file TSQLStructure.cxx.

Referenced by GetClassInfo(), PerformConversion(), TBufferSQL2::SetStreamerElementNumber(), and StoreObject().

Int_t TSQLStructure::GetType ( ) const
inline
const char * TSQLStructure::GetValue ( ) const

returns value for different structure kinds has different sense For kSqlVersion it version, for kSqlReference it is object id and so on

Definition at line 629 of file TSQLStructure.cxx.

Referenced by DefineObjectId(), PerformConversion(), StoreElementInNormalForm(), and StoreTObject().

const char * TSQLStructure::GetValueType ( ) const

return value type if structure is kSqlValue

Definition at line 584 of file TSQLStructure.cxx.

Referenced by StoreTObject().

TClass * TSQLStructure::GetVersionClass ( ) const

return class for version tag if type is kSqlVersion

Definition at line 552 of file TSQLStructure.cxx.

Referenced by CheckNormalClassPair().

Bool_t TSQLStructure::IsNumericType ( Int_t  typ)
static

defines if value is numeric and not requires quotes when writing

Definition at line 785 of file TSQLStructure.cxx.

Referenced by StoreElementInNormalForm().

Int_t TSQLStructure::LocateElementColumn ( TSQLFile f,
TBufferSQL2 buf,
TSQLObjectData data 
)

find column in TSQLObjectData object, which correspond to current element

Definition at line 2141 of file TSQLStructure.cxx.

Referenced by TBufferSQL2::WorkWithElement().

TString TSQLStructure::MakeArrayIndex ( TStreamerElement elem,
Int_t  n 
)
static

produce string with complete index like [1][2][0]

Definition at line 1553 of file TSQLStructure.cxx.

Referenced by DefineElementColumnName().

Int_t TSQLStructure::NumChilds ( ) const
void TSQLStructure::PerformConversion ( TSqlRegistry *  reg,
TSqlRawBuffer *  blobs,
const char *  topname,
Bool_t  useblob = kFALSE 
)
protected

perform conversion of structure to sql statements first tries convert it to normal form if fails, produces data for raw table

Definition at line 1289 of file TSQLStructure.cxx.

Referenced by PerformConversion(), StoreClassInNormalForm(), and StoreObject().

void TSQLStructure::Print ( Option_t option = "") const
virtual

print content of complete structure

Reimplemented from TObject.

Definition at line 726 of file TSQLStructure.cxx.

Referenced by TBufferSQL2::SqlWriteAny().

void TSQLStructure::PrintLevel ( Int_t  level) const

print content of current structure

Definition at line 734 of file TSQLStructure.cxx.

Referenced by Print(), PrintLevel(), and StoreElementInNormalForm().

Bool_t TSQLStructure::RecognizeTString ( const char *&  value)
protected

prove that structure containes TString data

Definition at line 1907 of file TSQLStructure.cxx.

Referenced by StoreElementInNormalForm(), and StoreTString().

void TSQLStructure::SetArray ( Int_t  sz = -1)

Set structure as array element.

Definition at line 535 of file TSQLStructure.cxx.

void TSQLStructure::SetArrayIndex ( Int_t  indx,
Int_t  cnt = 1 
)

set array index for this structure

Definition at line 515 of file TSQLStructure.cxx.

Referenced by ChildArrayIndex().

void TSQLStructure::SetClassStreamer ( const TClass cl)

set structure type as kSqlClassStreamer

Definition at line 449 of file TSQLStructure.cxx.

void TSQLStructure::SetCustomClass ( const TClass cl,
Version_t  version 
)

set structure type as kSqlCustomClass

Definition at line 477 of file TSQLStructure.cxx.

Referenced by TBufferSQL2::ClassBegin().

void TSQLStructure::SetCustomElement ( TStreamerElement elem)

set structure type as kSqlCustomElement

Definition at line 487 of file TSQLStructure.cxx.

Referenced by TBufferSQL2::WorkWithElement().

void TSQLStructure::SetObjectData ( TSQLObjectData objdata)

set element to be used for object data

Definition at line 694 of file TSQLStructure.cxx.

Referenced by AddObjectData().

void TSQLStructure::SetObjectPointer ( Long64_t  ptrid)

set structure type as kSqlPointer

Definition at line 429 of file TSQLStructure.cxx.

Referenced by TBufferSQL2::SqlWriteObject().

void TSQLStructure::SetObjectRef ( Long64_t  refid,
const TClass cl 
)

set structure type as kSqlObject

Definition at line 419 of file TSQLStructure.cxx.

Referenced by TBufferSQL2::SqlReadObjectDirect(), and TBufferSQL2::SqlWriteObject().

void TSQLStructure::SetParent ( TSQLStructure p)
inline

Definition at line 137 of file TSQLStructure.h.

Referenced by Add().

void TSQLStructure::SetStreamerElement ( const TStreamerElement elem,
Int_t  number 
)

set structure type as kSqlElement

Definition at line 467 of file TSQLStructure.cxx.

Referenced by TBufferSQL2::WorkWithElement().

void TSQLStructure::SetStreamerInfo ( const TStreamerInfo info)

set structure type as kSqlStreamerInfo

Definition at line 458 of file TSQLStructure.cxx.

Referenced by TBufferSQL2::IncrementLevel().

void TSQLStructure::SetType ( Int_t  typ)
inline

Definition at line 141 of file TSQLStructure.h.

void TSQLStructure::SetValue ( const char *  value,
const char *  tname = 0 
)

set structure type as kSqlValue

Definition at line 496 of file TSQLStructure.cxx.

Referenced by AddValue().

void TSQLStructure::SetVersion ( const TClass cl,
Int_t  version = -100 
)

set structure type as kSqlVersion

Definition at line 438 of file TSQLStructure.cxx.

Referenced by AddVersion().

Bool_t TSQLStructure::StoreClassInNormalForm ( TSqlRegistry *  reg)
protected

produces data for complete class table where not possible, raw data for some elements are created

Definition at line 1478 of file TSQLStructure.cxx.

Referenced by StoreObject(), and StoreObjectInNormalForm().

Bool_t TSQLStructure::StoreElementInNormalForm ( TSqlRegistry *  reg,
TSQLTableData columns 
)
protected

tries to store element data in column

Definition at line 1571 of file TSQLStructure.cxx.

Referenced by StoreClassInNormalForm().

Bool_t TSQLStructure::StoreObject ( TSqlRegistry *  reg,
Long64_t  objid,
TClass cl,
Bool_t  registerobj = kTRUE 
)
protected

convert object data to sql statements if normal (columnwise) representation is not possible, complete object will be converted to raw format

Definition at line 1396 of file TSQLStructure.cxx.

Referenced by ConvertToTables(), PerformConversion(), StoreElementInNormalForm(), and TryConvertObjectArray().

Bool_t TSQLStructure::StoreObjectInNormalForm ( TSqlRegistry *  reg)
protected

this function verify object child elements and calls transformation to class table

Definition at line 1461 of file TSQLStructure.cxx.

Referenced by StoreObject().

Bool_t TSQLStructure::StoreTObject ( TSqlRegistry *  reg)
protected

store data of TObject in special table workaround custom TObject streamer

Definition at line 1841 of file TSQLStructure.cxx.

Referenced by StoreObject().

Bool_t TSQLStructure::StoreTString ( TSqlRegistry *  reg)
protected

store data of TString in special table it is required when TString stored as pointer and reference to it possible

Definition at line 1885 of file TSQLStructure.cxx.

Referenced by StoreObject().

Bool_t TSQLStructure::TryConvertObjectArray ( TSqlRegistry *  reg,
TSqlRawBuffer *  blobs 
)
protected

tries to write array of objects as lis of object refereneces in streamer table, while objects itself will be stored in other tables.

If not successfull, object data will be stored in streamer table

Definition at line 1780 of file TSQLStructure.cxx.

Referenced by StoreClassInNormalForm().

Bool_t TSQLStructure::UnpackTObject ( TSQLFile f,
TBufferSQL2 buf,
TSQLObjectData data,
Long64_t  objid,
Int_t  clversion 
)
static

Unpack TObject data in form, understodable by custom TObject streamer.

Definition at line 2322 of file TSQLStructure.cxx.

Referenced by LocateElementColumn(), and TBufferSQL2::SqlReadObjectDirect().

Bool_t TSQLStructure::UnpackTString ( TSQLFile f,
TBufferSQL2 buf,
TSQLObjectData data,
Long64_t  objid,
Int_t  clversion 
)
static

Unpack TString data in form, understodable by custom TString streamer.

Definition at line 2353 of file TSQLStructure.cxx.

Referenced by TBufferSQL2::SqlReadObjectDirect().

Member Data Documentation

Int_t TSQLStructure::fArrayIndex
protected
TObjArray TSQLStructure::fChilds
protected
TSQLStructure* TSQLStructure::fParent
protected

Definition at line 124 of file TSQLStructure.h.

Referenced by GetParent(), and SetParent().

const void* TSQLStructure::fPointer
protected
Int_t TSQLStructure::fRepeatCnt
protected

Definition at line 129 of file TSQLStructure.h.

Referenced by GetRepeatCounter(), PerformConversion(), PrintLevel(), and SetArrayIndex().

Int_t TSQLStructure::fType
protected
TString TSQLStructure::fValue
protected
Collaboration diagram for TSQLStructure:
[legend]

The documentation for this class was generated from the following files: