From 39bc8e7ecc0bbe9af210904de41c4e19f9e3e26b Mon Sep 17 00:00:00 2001 From: Ralf Haferkamp Date: Wed, 25 Jun 2003 18:12:06 +0000 Subject: [PATCH] honor superior Objectclasses --- contrib/ldapc++/src/LDAPObjClass.cpp | 11 +++++++++++ contrib/ldapc++/src/LDAPObjClass.h | 8 +++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/contrib/ldapc++/src/LDAPObjClass.cpp b/contrib/ldapc++/src/LDAPObjClass.cpp index 320fe59c6c..c78a675db8 100644 --- a/contrib/ldapc++/src/LDAPObjClass.cpp +++ b/contrib/ldapc++/src/LDAPObjClass.cpp @@ -16,6 +16,7 @@ LDAPObjClass::LDAPObjClass(){ names = StringList (); must = StringList(); may = StringList(); + sup = StringList(); } LDAPObjClass::LDAPObjClass (const LDAPObjClass &oc){ @@ -28,6 +29,7 @@ LDAPObjClass::LDAPObjClass (const LDAPObjClass &oc){ must = oc.must; may = oc.may; kind = oc.kind; + sup = oc.sup; } LDAPObjClass::LDAPObjClass (string oc_item) { @@ -47,6 +49,7 @@ LDAPObjClass::LDAPObjClass (string oc_item) { this->setKind (o->oc_kind); this->setMust (o->oc_at_oids_must); this->setMay (o->oc_at_oids_may); + this->setSup (o->oc_sup_oids); } // else? -> error } @@ -71,6 +74,10 @@ void LDAPObjClass::setMay (char **oc_may) { may = StringList (oc_may); } +void LDAPObjClass::setSup (char **oc_sup) { + sup = StringList (oc_sup); +} + void LDAPObjClass::setDesc (char *oc_desc) { desc = string (); if (oc_desc) @@ -103,6 +110,10 @@ StringList LDAPObjClass::getMay () { return may; } +StringList LDAPObjClass::getSup () { + return sup; +} + string LDAPObjClass::getName () { if (names.empty()) diff --git a/contrib/ldapc++/src/LDAPObjClass.h b/contrib/ldapc++/src/LDAPObjClass.h index 13cdea1f62..4a383d6dfd 100644 --- a/contrib/ldapc++/src/LDAPObjClass.h +++ b/contrib/ldapc++/src/LDAPObjClass.h @@ -21,7 +21,7 @@ using namespace std; */ class LDAPObjClass{ private : - StringList names, must, may; + StringList names, must, may, sup; string desc, oid; int kind; @@ -81,6 +81,11 @@ class LDAPObjClass{ * Returns list of allowed (and not required) attributes */ StringList getMay(); + + /** + * Returns list of the OIDs of the superior ObjectClasses + */ + StringList getSup(); void setNames (char **oc_names); void setMay (char **oc_may); @@ -88,6 +93,7 @@ class LDAPObjClass{ void setDesc (char *oc_desc); void setOid (char *oc_oid); void setKind (int oc_kind); + void setSup (char **oc_sup); }; -- 2.39.5