BmnRoot
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
10#ifndef ElogAttachment_H
11#define ElogAttachment_H 1
12
13#include "ElogConnection.h"
14#include "TDatime.h"
15#include "TString.h"
16
18{
19 private:
20 /* GENERATED PRIVATE MEMBERS (SHOULD NOT BE CHANGED MANUALLY) */
22 ElogConnection* connectionDB;
23
25 int i_record_id;
27 int i_attachment_number;
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
41 static ElogAttachment* CreateAttachment(int record_id, int attachment_number, TString file_path);
43 static ElogAttachment* GetAttachment(int record_id, int attachment_number);
45 static ElogAttachment* GetAttachment(TString file_path);
47 static int CheckAttachmentExists(int record_id, int attachment_number);
49 static int CheckAttachmentExists(TString file_path);
51 static int DeleteAttachment(int record_id, int attachment_number);
53 static int DeleteAttachment(TString file_path);
55 static int PrintAll();
56
57 // Getters
59 int GetRecordId() { return i_record_id; }
61 int GetAttachmentNumber() { return i_attachment_number; }
63 TString GetFilePath() { return str_file_path; }
64
65 // Setters
67 int SetRecordId(int record_id);
69 int SetAttachmentNumber(int attachment_number);
71 int SetFilePath(TString file_path);
72
74 void Print();
75 /* END OF PUBLIC GENERATED PART (SHOULD NOT BE CHANGED MANUALLY) */
76
78};
79
80#endif
virtual ~ElogAttachment()
static int CheckAttachmentExists(int record_id, int attachment_number)
check attachment exists in the database: 1- true, 0 - false, <0 - database operation error
static ElogAttachment * GetAttachment(TString file_path)
get attachment from the database
void Print()
print information about current attachment
ClassDef(ElogAttachment, 1)
int GetAttachmentNumber()
get attachment number of the current attachment
static int DeleteAttachment(int record_id, int attachment_number)
delete attachment from the database
static ElogAttachment * CreateAttachment(int record_id, int attachment_number, TString file_path)
add new attachment to the database
static int CheckAttachmentExists(TString file_path)
check attachment exists in the database: 1- true, 0 - false, <0 - database operation error
int GetRecordId()
get record id of the current attachment
TString GetFilePath()
get file path of the current attachment
static ElogAttachment * GetAttachment(int record_id, int attachment_number)
get attachment from the database
static int DeleteAttachment(TString file_path)
delete attachment from the database
int SetRecordId(int record_id)
set record id of the current attachment
static int PrintAll()
print all attachments
int SetFilePath(TString file_path)
set file path of the current attachment
int SetAttachmentNumber(int attachment_number)
set attachment number of the current attachment