// -*- mode: c++ -*- // $Id: BrDbPerson.h,v 1.3 2001/10/08 10:31:17 cholm Exp $ // $Author: cholm $ // $Date: 2001/10/08 10:31:17 $ // $Copyright: 2000 Brahms Collaboration // #ifndef BRAT_BrPerson #define BRAT_BrPerson #ifndef ROOT_TObjArray #include "TObjArray.h" #endif #ifndef ROOT_TSQLServer #include "TSQLServer.h" #endif #ifndef ROOT_TSQLResult #include "TSQLResult.h" #endif #ifndef ROOT_TSQLRow #include "TSQLRow.h" #endif #ifndef BRAT_BrDbTable #include "BrDbTable.h" #endif #ifndef BRAT_BrDbQuery #include "BrDbQuery.h" #endif #ifndef WIN32 #include #else #include #endif #define PERSON_NAME "Person" class BrDbPerson : public BrDbTable { private: Char_t fFirstNames[64]; Char_t fLastName[64]; Char_t fEmail[64]; Char_t fInstitute[64]; public: BrDbPerson(const Char_t* lastname, const Char_t* firstnames, const Char_t* email=0, const Char_t* institute=0); static const Char_t* kTableName; static BrDbQuery* Create(void); static BrDbPerson* SingleInstance(TSQLRow*); static TObjArray* MultipleInstance(TSQLResult*); virtual BrDbQuery* Insert(void); void SetLastName(const Char_t* lastname); void SetFirstNames(const Char_t* firstnames); void SetEmail(const Char_t* email); void SetInstitute(const Char_t* institute); const Char_t* GetLastName(void) const { return fLastName; } const Char_t* GetFirstNames(void) const { return fFirstNames; } const Char_t* GetEmail(void) const { return fEmail; } const Char_t* GetInstitute(void) const { return fInstitute; } static void SplitName(const Char_t* n, Char_t* l, Char_t* f); ClassDef(BrDbPerson,1) // Person class } ; R__EXTERN BrDbPerson* gPerson; ostream& operator<<(ostream& o, BrDbPerson& p); #endif // _BRPERSON_HH