ldapsdk  0.0.1
LDAPAttrType.h
Go to the documentation of this file.
1 // $OpenLDAP$
2 /*
3  * Copyright 2003-2013 The OpenLDAP Foundation, All Rights Reserved.
4  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
5  */
6 
7 #ifndef LDAP_ATTRTYPE_H
8 #define LDAP_ATTRTYPE_H
9 
10 #include <ldap_schema.h>
11 #include <string>
12 
13 #include "StringList.h"
14 
15 using namespace std;
16 
21  private :
22  StringList names;
23  std::string desc, oid, superiorOid, equalityOid;
24  std::string orderingOid, substringOid, syntaxOid;
25  bool single;
26  int usage;
27 
28  public :
29 
33  LDAPAttrType();
34 
43  LDAPAttrType (string at_item, int flags = LDAP_SCHEMA_ALLOW_NO_OID |
44  LDAP_SCHEMA_ALLOW_QUOTED );
45 
49  virtual ~LDAPAttrType();
50 
51 
55  string getDesc() const;
56 
60  string getOid() const;
61 
65  string getName() const;
66 
70  StringList getNames() const;
71 
75  bool isSingle() const;
76 
82  int getUsage () const;
83  std::string getSuperiorOid() const;
84  std::string getEqualityOid() const;
85  std::string getOrderingOid() const;
86  std::string getSubstringOid() const;
87  std::string getSyntaxOid() const;
88 
89  void setNames( char **at_names);
90  void setDesc(const char *at_desc);
91  void setOid(const char *at_oid);
92  void setSingle(int at_single_value);
93  void setUsage(int at_usage );
94  void setSuperiorOid( const char *oid );
95  void setEqualityOid( const char *oid );
96  void setOrderingOid( const char *oid );
97  void setSubstringOid( const char *oid );
98  void setSyntaxOid( const char *oid );
99 };
100 
101 #endif // LDAP_ATTRTYPE_H
LDAPAttrType::getNames
StringList getNames() const
Returns all attribute names.
Definition: LDAPAttrType.cpp:112
LDAPAttrType::getEqualityOid
std::string getEqualityOid() const
Definition: LDAPAttrType.cpp:132
LDAPAttrType
Represents the Attribute Type (from LDAP schema)
Definition: LDAPAttrType.h:20
LDAPAttrType::setSyntaxOid
void setSyntaxOid(const char *oid)
Definition: LDAPAttrType.cpp:95
StringList::begin
const_iterator begin() const
Definition: StringList.cpp:65
LDAPAttrType.h
LDAPAttrType::~LDAPAttrType
virtual ~LDAPAttrType()
Destructor.
Definition: LDAPAttrType.cpp:47
StringList.h
DEBUG
#define DEBUG(level, arg)
Definition: debug.h:30
LDAPAttrType::setSuperiorOid
void setSuperiorOid(const char *oid)
Definition: LDAPAttrType.cpp:75
LDAP_DEBUG_DESTROY
#define LDAP_DEBUG_DESTROY
Definition: debug.h:14
LDAPAttrType::getSuperiorOid
std::string getSuperiorOid() const
Definition: LDAPAttrType.cpp:128
StringList::empty
bool empty() const
Definition: StringList.cpp:61
LDAPAttrType::getSubstringOid
std::string getSubstringOid() const
Definition: LDAPAttrType.cpp:140
LDAPAttrType::setNames
void setNames(char **at_names)
Definition: LDAPAttrType.cpp:55
LDAPAttrType::setOrderingOid
void setOrderingOid(const char *oid)
Definition: LDAPAttrType.cpp:85
LDAPAttrType::setSingle
void setSingle(int at_single_value)
Definition: LDAPAttrType.cpp:51
LDAP_DEBUG_CONSTRUCT
#define LDAP_DEBUG_CONSTRUCT
Definition: debug.h:13
LDAPAttrType::getUsage
int getUsage() const
Return the 'usage' value: (0=userApplications, 1=directoryOperation, 2=distributedOperation,...
Definition: LDAPAttrType.cpp:124
LDAPAttrType::LDAPAttrType
LDAPAttrType()
Constructor.
Definition: LDAPAttrType.cpp:11
LDAPAttrType::setOid
void setOid(const char *at_oid)
Definition: LDAPAttrType.cpp:65
LDAPAttrType::getDesc
string getDesc() const
Returns attribute description.
Definition: LDAPAttrType.cpp:108
LDAPAttrType::setDesc
void setDesc(const char *at_desc)
Definition: LDAPAttrType.cpp:59
LDAPAttrType::getSyntaxOid
std::string getSyntaxOid() const
Definition: LDAPAttrType.cpp:144
LDAPAttrType::isSingle
bool isSingle() const
Returns true if attribute type allows only single value.
Definition: LDAPAttrType.cpp:100
LDAPAttrType::getOrderingOid
std::string getOrderingOid() const
Definition: LDAPAttrType.cpp:136
LDAPAttrType::setSubstringOid
void setSubstringOid(const char *oid)
Definition: LDAPAttrType.cpp:90
LDAPAttrType::setEqualityOid
void setEqualityOid(const char *oid)
Definition: LDAPAttrType.cpp:80
StringList
Container class to store multiple string-objects.
Definition: StringList.h:15
LDAPAttrType::getOid
string getOid() const
Returns attribute oid.
Definition: LDAPAttrType.cpp:104
LDAPAttrType::getName
string getName() const
Returns attribute name (first one if there are more of them)
Definition: LDAPAttrType.cpp:116
LDAPAttrType::setUsage
void setUsage(int at_usage)
Definition: LDAPAttrType.cpp:71
debug.h