Logo ROOT   6.10/09
Reference Guide
TLDAPEntry.h
Go to the documentation of this file.
1 // @(#)root/ldap:$Id$
2 // Author: Evgenia Smirnova 21/09/2001
3 
4 /*************************************************************************
5  * For the licensing terms see $ROOTSYS/LICENSE. *
6  * For the list of contributors see $ROOTSYS/README/CREDITS. *
7  *************************************************************************/
8 
9 #ifndef ROOT_TLDAPEntry
10 #define ROOT_TLDAPEntry
11 
12 #include "TObject.h"
13 #include "TString.h"
14 #include "TList.h"
15 #include "CintLDAP.h"
16 
17 
18 class TLDAPServer;
19 class TLDAPAttribute;
20 
21 
22 class TLDAPEntry: public TObject {
23 
24 friend class TLDAPServer;
25 
26 private:
27  TString fDn; // Distinguished name of entry
28  TList *fAttr; // List of attributes
29  mutable Int_t fNCount; // Index of attribute to be returned from GetAttribute()
30 
31  LDAPMod **GetMods(Int_t op); // Get array of LDAPMod structures of the entry
32 
33 protected:
35 
36 public:
37  TLDAPEntry(const char *dn);
38  TLDAPEntry(const TLDAPEntry &e);
39  virtual ~TLDAPEntry();
40 
41  const char *GetDn() const { return fDn; }
42  void SetDn(const char *dn) { fDn = dn; }
43  void AddAttribute(const TLDAPAttribute &attr);
45  TLDAPAttribute *GetAttribute(const char *name) const;
46  void DeleteAttribute(const char *name);
47  Int_t GetCount() const { return fAttr->GetSize(); }
48  Bool_t IsReferral() const;
49  TList *GetReferrals() const;
50  void Print(Option_t * = "") const;
51 
52  ClassDef(TLDAPEntry, 0) //describe one entry in LDAP
53 };
54 
55 #endif
virtual ~TLDAPEntry()
Deletes all the attributes of the entry.
Definition: TLDAPEntry.cxx:60
TLDAPEntry & operator=(const TLDAPEntry &)
Equal operator.
Definition: TLDAPEntry.cxx:47
TList * GetReferrals() const
Get the TList of referrals.
Definition: TLDAPEntry.cxx:169
const char Option_t
Definition: RtypesCore.h:62
void DeleteAttribute(const char *name)
Delete attribute by name.
Definition: TLDAPEntry.cxx:127
Basic string class.
Definition: TString.h:129
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
void AddAttribute(const TLDAPAttribute &attr)
Add an attribute to the entry.
Definition: TLDAPEntry.cxx:69
Bool_t IsReferral() const
Check if entry is referal.
Definition: TLDAPEntry.cxx:142
TList * fAttr
Definition: TLDAPEntry.h:28
#define ClassDef(name, id)
Definition: Rtypes.h:297
TLDAPEntry(const char *dn)
Creates the new TLDAPEntry object with the specified DN (distinguished name) and the empty list of at...
Definition: TLDAPEntry.cxx:22
void Print(Option_t *="") const
Print entry in LDIF format.
Definition: TLDAPEntry.cxx:77
TLDAPAttribute * GetAttribute() const
Get next attribute of the entry.
Definition: TLDAPEntry.cxx:96
A doubly linked list.
Definition: TList.h:43
TString fDn
Definition: TLDAPEntry.h:27
LDAPMod ** GetMods(Int_t op)
Get array of "LDAPMod" structures for entry.
Definition: TLDAPEntry.cxx:185
void SetDn(const char *dn)
Definition: TLDAPEntry.h:42
Int_t fNCount
Definition: TLDAPEntry.h:29
you should not use this method at all Int_t Int_t Double_t Double_t Double_t e
Definition: TRolke.cxx:630
Mother of all ROOT objects.
Definition: TObject.h:37
const char * GetDn() const
Definition: TLDAPEntry.h:41
Int_t GetCount() const
Definition: TLDAPEntry.h:47
virtual Int_t GetSize() const
Definition: TCollection.h:89