Jpp  18.5.0
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JPersons.hh
Go to the documentation of this file.
1 #ifndef __JDB_JPERSONS__
2 #define __JDB_JPERSONS__
3 
4 #include <TROOT.h>
5 #include <TObject.h>
6 
7 #include <string>
8 
9 #include "JDB/JDBString.hh"
10 #include "JDB/JSonSupportkit.hh"
11 
12 /**
13  * \author mdejong
14  */
15 namespace JDATABASE {}
16 namespace JPP { using namespace JDATABASE; }
17 
18 namespace JDATABASE {
19 
20  struct JPersons :
21  public TObject
22  {
23  static const char* const getName() { return "persons"; } //!< Table name
24 
35 
36  ClassDef(JPersons, 1);
37  };
38 
39  namespace APIV2 {
40 
41  struct JPerson :
42  public JSonHelper<JPerson>,
43  public TObject
44  {
45  static const char* const getName() { return "Person"; } //!< Table name
46 
47  JPerson() {}
48 
49  /**
50  * Copy constructor.
51  *
52  * \param person person
53  */
54  JPerson(const JPersons& person) :
55  OID (person.OID),
56  Login (person.LOGIN),
57  Name (person.NAME),
58  Surname (person.SURNAME),
59  Location (person.LOCATIONID)
60  {}
61 
62  /**
63  * Type conversion operator.
64  *
65  * \return person
66  */
67  operator JPersons() const
68  {
69  JPersons person;
70 
71  person.OID = this->OID;
72  person.LOGIN = this->Login;
73  person.NAME = this->Name;
74  person.SURNAME = this->Surname;
75  person.LOCATIONID = this->Location;
76 
77  return person;
78  }
79 
89 
90  ClassDef(JPerson, 1);
91  };
92  }
93 }
94 
95 #endif
ClassDef(JPersons, 1)
set_variable LOCATIONID(getLocationID-L ${LOGIN}) if(($
Definition: JEditTuneHV.sh:80
std::string MEMBERSTATUS
Definition: JPersons.hh:33
std::string LOGIN
Definition: JPersons.hh:26
Wrapper class to read string until end-of-line.
Definition: JDBString.hh:19
std::string CreationDate
Definition: JPersons.hh:88
Definition: JRoot.hh:19
std::string Occupation
Definition: JPersons.hh:87
JDBString ADDRESS
Definition: JPersons.hh:31
static const char *const getName()
Table name.
Definition: JPersons.hh:23
std::string LOCATIONID
Definition: JPersons.hh:29
JPerson(const JPersons &person)
Copy constructor.
Definition: JPersons.hh:54
Auxiliary base class for JSon I/O based on ROOT dictionary.
JDBString NAME
Definition: JPersons.hh:27
then awk string
std::string OID
Definition: JPersons.hh:25
JDBString CITY
Definition: JPersons.hh:30
JDBString SURNAME
Definition: JPersons.hh:28
std::string AUTHORSTATUS
Definition: JPersons.hh:34
std::string ACTIVESTATUS
Definition: JPersons.hh:32
static const char *const getName()
Table name.
Definition: JPersons.hh:45