KaliVeda
Toolkit for HIC analysis
Loading...
Searching...
No Matches
KVDBRecord.h
1/***************************************************************************
2$Id: KVDBRecord.h,v 1.19 2007/05/31 09:59:22 franklan Exp $
3 KVDataBase.h - description
4 -------------------
5 begin : jeu fév 6 2003
6 copyright : (C) 2003 by Alexis Mignon
7 email : mignon@ganil.fr
8 ***************************************************************************/
9
10/***************************************************************************
11 * *
12 * This program is free software; you can redistribute it and/or modify *
13 * it under the terms of the GNU General Public License as published by *
14 * the Free Software Foundation; either version 2 of the License, or *
15 * (at your option) any later version. *
16 * *
17 ***************************************************************************/
18
19#ifndef __KVDBRECORD_H
20#define __KVDBRECORD_H
21
22#include "TFolder.h"
23#include "TList.h"
24#include "TRef.h"
25#include "KVRList.h"
26
27class KVDBKey;
28class KVDBTable;
29
43class KVDBRecord: public TFolder {
44
45protected:
46
49
50public:
51
52 KVDBRecord();
53 KVDBRecord(const Char_t* name, const Char_t* title = "");
54 virtual ~ KVDBRecord();
55
56 virtual KVDBKey* GetKey(const Char_t* key) const;
57 virtual TList* GetKeys() const;
58 virtual Bool_t AddLink(const Char_t* key_name, KVDBRecord* rec,
59 Bool_t linkback = kTRUE);
60 virtual void RemoveLink(const Char_t* key_name, KVDBRecord* rec,
61 Bool_t linkback = kTRUE);
62 virtual Bool_t AddKey(KVDBKey* key, Bool_t check = kTRUE);
63 virtual KVDBKey* AddKey(const Char_t* name, const Char_t* title,
64 Bool_t check = kTRUE);
65 virtual KVDBRecord* GetLink(const Char_t* key,
66 const Char_t* link) const;
67 virtual KVRList* GetLinks(const Char_t* key) const;
68 virtual void RemoveAllLinks(const Char_t* key);
69 virtual KVDBTable* GetTable() const;
70 virtual void SetTable(const KVDBTable* table);
71 virtual void Print(Option_t* option = "") const;
72 virtual void ls(Option_t* option = "*") const;
73 virtual Int_t GetNumber() const
74 {
75 return fNumber;
76 };
77 virtual void SetNumber(Int_t n)
78 {
79 fNumber = n;
80 };
81 virtual Int_t Compare(const TObject* obj) const;
82
83 ClassDef(KVDBRecord, 3)//Base Class for a record
84};
85
86#endif
int Int_t
bool Bool_t
char Char_t
const char Option_t
#define ClassDef(name, id)
Cross-reference in a KVDataBase.
Definition KVDBKey.h:38
Record folder for the database.
Definition KVDBRecord.h:43
virtual void SetNumber(Int_t n)
Definition KVDBRecord.h:77
virtual void SetTable(const KVDBTable *table)
virtual void Print(Option_t *option="") const
virtual KVDBKey * GetKey(const Char_t *key) const
virtual void ls(Option_t *option="*") const
virtual Bool_t AddKey(KVDBKey *key, Bool_t check=kTRUE)
virtual KVDBRecord * GetLink(const Char_t *key, const Char_t *link) const
Returns the record named "link" in the table named "key".
virtual Int_t Compare(const TObject *obj) const
TString fFullPathTable
full path to parent table in folder structure
Definition KVDBRecord.h:47
virtual Bool_t AddLink(const Char_t *key_name, KVDBRecord *rec, Bool_t linkback=kTRUE)
virtual void RemoveLink(const Char_t *key_name, KVDBRecord *rec, Bool_t linkback=kTRUE)
Remove the link between this record and the record "rec" in the DB table"key_name".
virtual KVRList * GetLinks(const Char_t *key) const
Returns the list of records linked to this record in table "key".
virtual void RemoveAllLinks(const Char_t *key)
Remove all links between this record and the records in the DB table"key_name".
Int_t fNumber
number which can be used to identify/sort record
Definition KVDBRecord.h:48
virtual Int_t GetNumber() const
Definition KVDBRecord.h:73
virtual TList * GetKeys() const
virtual KVDBTable * GetTable() const
Table in a database.
Definition KVDBTable.h:34
Wrapper for TRefArray adding some functionality.
Definition KVRList.h:37
Table in an SQLite database.
const Int_t n