BmnRoot
26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Toggle main menu visibility
Loading...
Searching...
No Matches
ElogContact.h
Go to the documentation of this file.
1
// ----------------------------------------------------------------------
2
// ElogContact header file
3
// Generated 13-04-2026
4
// ----------------------------------------------------------------------
5
6
/** /home/gertsen/bmnroot/database/elog_db/ElogContact.h
7
** Class for the table: contact_
8
**/
9
10
#ifndef ELOGCONTACT_H
11
#define ELOGCONTACT_H 1
12
13
#include "
ElogConnection.h
"
14
#include "
TDatime.h
"
15
#include "
TString.h
"
16
#include "
TTimeStamp.h
"
17
18
class
ElogContact
19
{
20
private
:
21
/* GENERATED PRIVATE MEMBERS (SHOULD NOT BE CHANGED MANUALLY) */
22
/// connection to the database
23
ElogConnection
*
connectionDB
;
24
25
/// contact id
26
int
i_contact_id
;
27
/// contact name
28
TString
*
str_contact_name
;
29
/// contact desc
30
TString
str_contact_desc
;
31
/// phones
32
TString
*
str_phones
;
33
/// email
34
TString
*
str_email
;
35
36
// Constructor
37
ElogContact
(
ElogConnection
* db_connect,
38
int
contact_id,
39
TString
* contact_name,
40
TString
contact_desc,
41
TString
* phones,
42
TString
* email);
43
/* END OF PRIVATE GENERATED PART (SHOULD NOT BE CHANGED MANUALLY) */
44
45
public
:
46
/* GENERATED PUBLIC MEMBERS (SHOULD NOT BE CHANGED MANUALLY) */
47
virtual
~ElogContact
();
// Destructor
48
49
// static class functions
50
/// add new contact to the database
51
static
ElogContact
*
CreateContact
(
TString
* contact_name,
TString
contact_desc,
TString
* phones,
TString
* email);
52
/// get contact from the database
53
static
ElogContact
*
GetContact
(
int
contact_id);
54
/// check contact exists in the database: 1- true, 0 - false, <0 - database operation error
55
static
int
CheckContactExists
(
int
contact_id);
56
/// delete contact from the database
57
static
int
DeleteContact
(
int
contact_id);
58
/// print all contacts
59
static
int
PrintAll
();
60
61
// Getters
62
/// get contact id of the current contact
63
int
GetContactId
() {
return
i_contact_id
; }
64
/// get contact name of the current contact
65
TString
*
GetContactName
()
66
{
67
if
(
str_contact_name
==
nullptr
)
68
return
nullptr
;
69
else
70
return
new
TString
(*
str_contact_name
);
71
}
72
/// get contact desc of the current contact
73
TString
GetContactDesc
() {
return
str_contact_desc
; }
74
/// get phones of the current contact
75
TString
*
GetPhones
()
76
{
77
if
(
str_phones
==
nullptr
)
78
return
nullptr
;
79
else
80
return
new
TString
(*
str_phones
);
81
}
82
/// get email of the current contact
83
TString
*
GetEmail
()
84
{
85
if
(
str_email
==
nullptr
)
86
return
nullptr
;
87
else
88
return
new
TString
(*
str_email
);
89
}
90
91
// Setters
92
/// set contact name of the current contact
93
int
SetContactName
(
TString
* contact_name);
94
/// set contact desc of the current contact
95
int
SetContactDesc
(
TString
contact_desc);
96
/// set phones of the current contact
97
int
SetPhones
(
TString
* phones);
98
/// set email of the current contact
99
int
SetEmail
(
TString
* email);
100
101
/// print information about current contact
102
void
Print
();
103
/* END OF PUBLIC GENERATED PART (SHOULD NOT BE CHANGED MANUALLY) */
104
105
ClassDef
(
ElogContact
, 1);
106
};
107
108
#endif
ClassDef
#define ClassDef(name, id)
TDatime.h
TString.h
TTimeStamp.h
ElogConnection
Definition
ElogConnection.h:27
ElogContact
/home/gertsen/bmnroot/database/elog_db/ElogContact.h Class for the table: contact_
Definition
ElogContact.h:19
ElogContact::ElogContact
ElogContact(ElogConnection *db_connect, int contact_id, TString *contact_name, TString contact_desc, TString *phones, TString *email)
Definition
ElogContact.cxx:16
ElogContact::SetContactName
int SetContactName(TString *contact_name)
set contact name of the current contact
Definition
ElogContact.cxx:318
ElogContact::PrintAll
static int PrintAll()
print all contacts
Definition
ElogContact.cxx:262
ElogContact::str_contact_name
TString * str_contact_name
contact name
Definition
ElogContact.h:28
ElogContact::GetContactName
TString * GetContactName()
get contact name of the current contact
Definition
ElogContact.h:65
ElogContact::GetPhones
TString * GetPhones()
get phones of the current contact
Definition
ElogContact.h:75
ElogContact::CreateContact
static ElogContact * CreateContact(TString *contact_name, TString contact_desc, TString *phones, TString *email)
add new contact to the database
Definition
ElogContact.cxx:46
ElogContact::str_email
TString * str_email
email
Definition
ElogContact.h:34
ElogContact::str_contact_desc
TString str_contact_desc
contact desc
Definition
ElogContact.h:30
ElogContact::GetContact
static ElogContact * GetContact(int contact_id)
get contact from the database
Definition
ElogContact.cxx:131
ElogContact::SetPhones
int SetPhones(TString *phones)
set phones of the current contact
Definition
ElogContact.cxx:390
ElogContact::SetContactDesc
int SetContactDesc(TString contact_desc)
set contact desc of the current contact
Definition
ElogContact.cxx:358
ElogContact::GetContactDesc
TString GetContactDesc()
get contact desc of the current contact
Definition
ElogContact.h:73
ElogContact::SetEmail
int SetEmail(TString *email)
set email of the current contact
Definition
ElogContact.cxx:430
ElogContact::CheckContactExists
static int CheckContactExists(int contact_id)
check contact exists in the database: 1- true, 0 - false, <0 - database operation error
Definition
ElogContact.cxx:192
ElogContact::DeleteContact
static int DeleteContact(int contact_id)
delete contact from the database
Definition
ElogContact.cxx:232
ElogContact::GetContactId
int GetContactId()
get contact id of the current contact
Definition
ElogContact.h:63
ElogContact::Print
void Print()
print information about current contact
Definition
ElogContact.cxx:471
ElogContact::connectionDB
ElogConnection * connectionDB
connection to the database
Definition
ElogContact.h:23
ElogContact::GetEmail
TString * GetEmail()
get email of the current contact
Definition
ElogContact.h:83
ElogContact::~ElogContact
virtual ~ElogContact()
Definition
ElogContact.cxx:33
ElogContact::i_contact_id
int i_contact_id
contact id
Definition
ElogContact.h:26
ElogContact::str_phones
TString * str_phones
phones
Definition
ElogContact.h:32
TString
ElogConnection.h
database
elog_db
ElogContact.h
Generated on
for BmnRoot by
1.17.0