Logo coherent WaveBurst  
Library Reference Guide
Logo
HistoryLine.hh
Go to the documentation of this file.
1 /*
2 # Copyright (C) 2019 Stefano Longo, Gabriele Vedovato
3 #
4 # This program is free software: you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation, either version 3 of the License, or
7 # (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <https://www.gnu.org/licenses/>.
16 */
17 
18 
19 /***************************************************************************
20  HistoryLine.h - description
21  -------------------
22  begin : ven set 2 2005
23  copyright : (C) 2005 by Stefano Longo
24  email : Stefano.Longo@lnl.infn.it
25  ***************************************************************************/
26 
27 /***************************************************************************
28  * *
29  * This program is free software; you can redistribute it and/or modify *
30  * it under the terms of the GNU General Public License as published by *
31  * the Free Software Foundation; either version 2 of the License, or *
32  * (at your option) any later version. *
33  * *
34  ***************************************************************************/
35 
36 #ifndef AULHISTORYLINE_H
37 #define AULHISTORYLINE_H
38 
39 #include "TObject.h"
40 #include "HistoryDefines.hh"
41 #include "TTimeStamp.h"
42 #include "TBuffer.h"
43 #include <stdlib.h>
44 
45 /**
46  *@author Stefano Longo
47  */
48 
49 using namespace std;
50 
51 namespace CWB {
52 
53 class HistoryLine : public TObject {
54 public:
55  HistoryLine(char* Type = NULL, char* Comment = NULL, char* History = NULL);
57  ~HistoryLine();
58 
59  void SetHistory(char* Type, char* Comment, char* History);
60  char* SetHistoryType(char* Type);
61  char* SetHistoryComment(char* Comment);
62  char* SetHistoryStr(char* History);
63 
64  char* GetHistoryType();
65  char* GetHistoryComment();
66  char* GetHistoryStr();
67 
68  virtual void Browse(TBrowser *b);
69  void Print();
70 
71  bool IsSortable() const;
72  int Compare(const TObject* Obj) const;
73 
74  SortOrderType SetSortOrder(SortOrderType SortOrder);
75  SortOrderType GetSortOrder();
76 
77  bool IsSortOrderInsertion();
78  bool IsSortOrderDate();
79  bool IsSortOrderAlphabetical();
80 
81  bool SetAscendingSortOrder();
82  bool SetDescendantSortOrder();
83 
84  bool GetAscendingSortOrder();
85  bool GetDescendantSortOrder();
86 
87  TTimeStamp GetCreationTimeStamp();
88 
89  void HistoryLineException(int type, const char *location, const char *msgfmt, ...);
90 
91 private:
92  void Init();
93  void Destroy();
94  void TypeSet(char* Type);
95  void CommentSet(char* Comment);
96  void HistorySet(char* History);
97 
98  int TypeLength; //Type's char number + 1
99  int HistoryLength; //History's char number + 1
100 
101  char* Type; //[TypeLength]
102  char* History; //[HistoryLength]
103 
104  int CommentLength; //Comment's char number + 1
105  char* Comment; //[CommentLength]
106 
109 
112 
113  ClassDef(HistoryLine, 3)
114 };
115 
116 } // end namespace
117 
118 #endif
void Init()
Definition: ChirpMass.C:284
Definition: ced.hh:42
SortOrderType
STL namespace.
MDC Print()
SortOrderType SortOrder
Definition: HistoryLine.hh:107
Type
Definition: FrDisplay.cc:123