Back to index

openldap  2.4.31
Public Types | Public Member Functions | Private Attributes
LDAPModification Class Reference

#include <LDAPModification.h>

Collaboration diagram for LDAPModification:
Collaboration graph
[legend]

List of all members.

Public Types

enum  mod_op { OP_ADD, OP_DELETE, OP_REPLACE }

Public Member Functions

 LDAPModification (const LDAPAttribute &attr, mod_op op)
LDAPModtoLDAPMod () const
const LDAPAttributegetAttribute () const
mod_op getOperation () const

Private Attributes

LDAPAttribute m_attr
mod_op m_mod_op

Detailed Description

Definition at line 14 of file LDAPModification.h.


Member Enumeration Documentation

Enumerator:
OP_ADD 
OP_DELETE 
OP_REPLACE 

Definition at line 16 of file LDAPModification.h.


Constructor & Destructor Documentation

Definition at line 13 of file LDAPModification.cpp.

                                                                      {
    DEBUG(LDAP_DEBUG_CONSTRUCT,"LDAPModification::LDAPModification()" << endl);
    DEBUG(LDAP_DEBUG_CONSTRUCT | LDAP_DEBUG_PARAMETER,
            "   attr:" << attr << endl);
    m_attr = attr;
    m_mod_op = op;
}

Member Function Documentation

Definition at line 42 of file LDAPModification.cpp.

                                                          {
       return &m_attr;
}

Definition at line 46 of file LDAPModification.cpp.

                                                            {
       return m_mod_op;
}

Definition at line 21 of file LDAPModification.cpp.

                                            {
    DEBUG(LDAP_DEBUG_TRACE,"LDAPModification::toLDAPMod()" << endl);
    LDAPMod* ret=m_attr.toLDAPMod();

    //The mod_op value of the LDAPMod-struct needs to be ORed with the right
    // LDAP_MOD_* constant to preserve the BIN-flag (see CAPI-draft for 
    // explanation of the LDAPMod struct)
    switch (m_mod_op){
       case OP_ADD :
           ret->mod_op |= LDAP_MOD_ADD;
       break;
       case OP_DELETE :
           ret->mod_op |= LDAP_MOD_DELETE;
       break;
       case OP_REPLACE :
           ret->mod_op |= LDAP_MOD_REPLACE;
       break;
    }
    return ret;
}

Member Data Documentation

Definition at line 25 of file LDAPModification.h.

Definition at line 26 of file LDAPModification.h.


The documentation for this class was generated from the following files: