BmnRoot
26.10.0-210-gc52d34b0
Software framework of the BM@N experiment
Toggle main menu visibility
Loading...
Searching...
No Matches
ElogAttachment.h
Go to the documentation of this file.
1
// ----------------------------------------------------------------------
2
// ElogAttachment header file
3
// Generated 27-11-2017
4
// ----------------------------------------------------------------------
5
6
/** ElogAttachment.h
7
** Class for the table: attachment_
8
**/
9
10
#ifndef ElogAttachment_H
11
#define ElogAttachment_H 1
12
13
#include "
ElogConnection.h
"
14
#include "
TDatime.h
"
15
#include "
TString.h
"
16
17
class
ElogAttachment
18
{
19
private
:
20
/* GENERATED PRIVATE MEMBERS (SHOULD NOT BE CHANGED MANUALLY) */
21
/// connection to the database
22
ElogConnection
*
connectionDB
;
23
24
/// record id
25
int
i_record_id
;
26
/// attachment number
27
int
i_attachment_number
;
28
/// file path
29
TString
str_file_path
;
30
31
// Constructor
32
ElogAttachment
(
ElogConnection
* db_connect,
int
record_id,
int
attachment_number,
TString
file_path);
33
/* END OF PRIVATE GENERATED PART (SHOULD NOT BE CHANGED MANUALLY) */
34
35
public
:
36
/* GENERATED PUBLIC MEMBERS (SHOULD NOT BE CHANGED MANUALLY) */
37
virtual
~ElogAttachment
();
// Destructor
38
39
// static class functions
40
/// add new attachment to the database
41
static
ElogAttachment
*
CreateAttachment
(
int
record_id,
int
attachment_number,
TString
file_path);
42
/// get attachment from the database
43
static
ElogAttachment
*
GetAttachment
(
int
record_id,
int
attachment_number);
44
/// get attachment from the database
45
static
ElogAttachment
*
GetAttachment
(
TString
file_path);
46
/// check attachment exists in the database: 1- true, 0 - false, <0 - database operation error
47
static
int
CheckAttachmentExists
(
int
record_id,
int
attachment_number);
48
/// check attachment exists in the database: 1- true, 0 - false, <0 - database operation error
49
static
int
CheckAttachmentExists
(
TString
file_path);
50
/// delete attachment from the database
51
static
int
DeleteAttachment
(
int
record_id,
int
attachment_number);
52
/// delete attachment from the database
53
static
int
DeleteAttachment
(
TString
file_path);
54
/// print all attachments
55
static
int
PrintAll
();
56
57
// Getters
58
/// get record id of the current attachment
59
int
GetRecordId
() {
return
i_record_id
; }
60
/// get attachment number of the current attachment
61
int
GetAttachmentNumber
() {
return
i_attachment_number
; }
62
/// get file path of the current attachment
63
TString
GetFilePath
() {
return
str_file_path
; }
64
65
// Setters
66
/// set record id of the current attachment
67
int
SetRecordId
(
int
record_id);
68
/// set attachment number of the current attachment
69
int
SetAttachmentNumber
(
int
attachment_number);
70
/// set file path of the current attachment
71
int
SetFilePath
(
TString
file_path);
72
73
/// print information about current attachment
74
void
Print
();
75
/* END OF PUBLIC GENERATED PART (SHOULD NOT BE CHANGED MANUALLY) */
76
77
ClassDef
(
ElogAttachment
, 1);
78
};
79
80
#endif
ElogConnection.h
ClassDef
#define ClassDef(name, id)
TDatime.h
TString.h
ElogAttachment
ElogAttachment.h Class for the table: attachment_.
Definition
ElogAttachment.h:18
ElogAttachment::GetAttachment
static ElogAttachment * GetAttachment(int record_id, int attachment_number)
get attachment from the database
Definition
ElogAttachment.cxx:71
ElogAttachment::Print
void Print()
print information about current attachment
Definition
ElogAttachment.cxx:451
ElogAttachment::PrintAll
static int PrintAll()
print all attachments
Definition
ElogAttachment.cxx:308
ElogAttachment::GetAttachmentNumber
int GetAttachmentNumber()
get attachment number of the current attachment
Definition
ElogAttachment.h:61
ElogAttachment::i_record_id
int i_record_id
record id
Definition
ElogAttachment.h:25
ElogAttachment::str_file_path
TString str_file_path
file path
Definition
ElogAttachment.h:29
ElogAttachment::DeleteAttachment
static int DeleteAttachment(int record_id, int attachment_number)
delete attachment from the database
Definition
ElogAttachment.cxx:247
ElogAttachment::CreateAttachment
static ElogAttachment * CreateAttachment(int record_id, int attachment_number, TString file_path)
add new attachment to the database
Definition
ElogAttachment.cxx:33
ElogAttachment::GetRecordId
int GetRecordId()
get record id of the current attachment
Definition
ElogAttachment.h:59
ElogAttachment::GetFilePath
TString GetFilePath()
get file path of the current attachment
Definition
ElogAttachment.h:63
ElogAttachment::connectionDB
ElogConnection * connectionDB
connection to the database
Definition
ElogAttachment.h:22
ElogAttachment::i_attachment_number
int i_attachment_number
attachment number
Definition
ElogAttachment.h:27
ElogAttachment::SetRecordId
int SetRecordId(int record_id)
set record id of the current attachment
Definition
ElogAttachment.cxx:351
ElogAttachment::ElogAttachment
ElogAttachment(ElogConnection *db_connect, int record_id, int attachment_number, TString file_path)
Definition
ElogAttachment.cxx:16
ElogAttachment::~ElogAttachment
virtual ~ElogAttachment()
Definition
ElogAttachment.cxx:26
ElogAttachment::SetFilePath
int SetFilePath(TString file_path)
set file path of the current attachment
Definition
ElogAttachment.cxx:417
ElogAttachment::SetAttachmentNumber
int SetAttachmentNumber(int attachment_number)
set attachment number of the current attachment
Definition
ElogAttachment.cxx:384
ElogAttachment::CheckAttachmentExists
static int CheckAttachmentExists(int record_id, int attachment_number)
check attachment exists in the database: 1- true, 0 - false, <0 - database operation error
Definition
ElogAttachment.cxx:167
ElogConnection
Definition
ElogConnection.h:27
TString
database
elog_db
ElogAttachment.h
Generated on
for BmnRoot by
1.17.0