3 * Copyright 2003-2014 The OpenLDAP Foundation, All Rights Reserved.
4 * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
8 #include "LDAPObjClass.h"
11 LDAPObjClass::LDAPObjClass(){
12 DEBUG(LDAP_DEBUG_CONSTRUCT,
13 "LDAPObjClass::LDAPObjClass( )" << endl);
17 names = StringList ();
23 LDAPObjClass::LDAPObjClass (const LDAPObjClass &oc){
24 DEBUG(LDAP_DEBUG_CONSTRUCT,
25 "LDAPObjClass::LDAPObjClass( )" << endl);
36 LDAPObjClass::LDAPObjClass (string oc_item, int flags ) {
38 DEBUG(LDAP_DEBUG_CONSTRUCT,
39 "LDAPObjClass::LDAPObjClass( )" << endl);
44 o = ldap_str2objectclass ( oc_item.c_str(), &ret, &errp, flags );
47 this->setNames (o->oc_names);
48 this->setDesc (o->oc_desc);
49 this->setOid (o->oc_oid);
50 this->setKind (o->oc_kind);
51 this->setMust (o->oc_at_oids_must);
52 this->setMay (o->oc_at_oids_may);
53 this->setSup (o->oc_sup_oids);
58 LDAPObjClass::~LDAPObjClass() {
59 DEBUG(LDAP_DEBUG_DESTROY,"LDAPObjClass::~LDAPObjClass()" << endl);
62 void LDAPObjClass::setKind (int oc_kind) {
66 void LDAPObjClass::setNames (char **oc_names) {
67 names = StringList (oc_names);
70 void LDAPObjClass::setMust (char **oc_must) {
71 must = StringList (oc_must);
74 void LDAPObjClass::setMay (char **oc_may) {
75 may = StringList (oc_may);
78 void LDAPObjClass::setSup (char **oc_sup) {
79 sup = StringList (oc_sup);
82 void LDAPObjClass::setDesc (char *oc_desc) {
88 void LDAPObjClass::setOid (char *oc_oid) {
94 string LDAPObjClass::getOid() const {
98 string LDAPObjClass::getDesc() const {
102 StringList LDAPObjClass::getNames() const {
106 StringList LDAPObjClass::getMust() const {
110 StringList LDAPObjClass::getMay() const {
114 StringList LDAPObjClass::getSup() const {
118 string LDAPObjClass::getName() const {
123 return *(names.begin());
126 int LDAPObjClass::getKind() const {