Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
us::LDAPProp Class Reference

A fluent API for creating LDAP filter strings. More...

#include <usLDAPProp.h>

Public Member Functions

 LDAPProp (const std::string &property)
 Create a LDAPProp instance for the named LDAP property. More...
 
 operator LDAPPropExpr () const
 Conversion operator to LDAPPropExpr for property presence checks. More...
 
LDAPPropExpr operator! () const
 States the absence of the LDAP property. More...
 
LDAPPropExpr operator== (const std::string &s) const
 LDAP equality '='. More...
 
LDAPPropExpr operator== (const us::Any &s) const
 LDAP equality '='. More...
 
template<class T >
LDAPPropExpr operator== (const T &s) const
 LDAP equality '='. More...
 
LDAPPropExpr operator!= (const std::string &s) const
 Convenience operator for LDAP inequality. More...
 
LDAPPropExpr operator!= (const us::Any &s) const
 Convenience operator for LDAP inequality. More...
 
template<class T >
LDAPPropExpr operator!= (const T &s) const
 Convenience operator for LDAP inequality. More...
 
LDAPPropExpr operator>= (const std::string &s) const
 LDAP greater or equal '>='. More...
 
LDAPPropExpr operator>= (const us::Any &s) const
 LDAP greater or equal '>='. More...
 
template<class T >
LDAPPropExpr operator>= (const T &s) const
 LDAP greater or equal '>='. More...
 
LDAPPropExpr operator<= (const std::string &s) const
 LDAP less or equal '<='. More...
 
LDAPPropExpr operator<= (const us::Any &s) const
 LDAP less or equal '<='. More...
 
template<class T >
LDAPPropExpr operator<= (const T &s) const
 LDAP less or equal '<='. More...
 
LDAPPropExpr Approx (const std::string &s) const
 LDAP approximation '~='. More...
 
LDAPPropExpr Approx (const us::Any &s) const
 LDAP approximation '~='. More...
 
template<class T >
LDAPPropExpr Approx (const T &s) const
 LDAP approximation '~='. More...
 

Detailed Description

A fluent API for creating LDAP filter strings.

Examples for creating LDAPFilter objects:

// This creates the filter "(&(name=Ben)(!(count=1)))"
LDAPFilter filter(LDAPProp("name") == "Ben" && !(LDAPProp("count") == 1));
// This creates the filter "(|(presence=*)(!(absence=*)))"
LDAPFilter filter(LDAPProp("presence") || !LDAPProp("absence"));
// This creates the filter "(&(ge>=-3)(approx~=hi))"
LDAPFilter filter(LDAPProp("ge") >= -3 && LDAPProp("approx").Approx("hi"));
LDAPPropExpr Approx(const std::string &s) const
LDAP approximation '~='.
LDAPProp(const std::string &property)
Create a LDAPProp instance for the named LDAP property.
See also
LDAPFilter

Definition at line 63 of file usLDAPProp.h.

Constructor & Destructor Documentation

◆ LDAPProp()

us::LDAPProp::LDAPProp ( const std::string &  property)

Create a LDAPProp instance for the named LDAP property.

Parameters
[in]propertyThe name of the LDAP property.

Member Function Documentation

◆ Approx() [1/3]

LDAPPropExpr us::LDAPProp::Approx ( const std::string &  s) const

LDAP approximation '~='.

Parameters
[in]sA type convertible to std::string.
Returns
A LDAP expression object.

◆ Approx() [2/3]

template<class T >
LDAPPropExpr us::LDAPProp::Approx ( const T &  s) const
inline

LDAP approximation '~='.

Parameters
[in]sA type convertible to std::string.
Returns
A LDAP expression object.

Definition at line 181 of file usLDAPProp.h.

◆ Approx() [3/3]

LDAPPropExpr us::LDAPProp::Approx ( const us::Any &  s) const

LDAP approximation '~='.

Parameters
[in]sA type convertible to std::string.
Returns
A LDAP expression object.

◆ operator LDAPPropExpr()

us::LDAPProp::operator LDAPPropExpr ( ) const

Conversion operator to LDAPPropExpr for property presence checks.

◆ operator!()

LDAPPropExpr us::LDAPProp::operator! ( ) const

States the absence of the LDAP property.

Returns
A LDAP expression object.

◆ operator!=() [1/3]

LDAPPropExpr us::LDAPProp::operator!= ( const std::string &  s) const

Convenience operator for LDAP inequality.

Writing either

LDAPProp("attr") != "val"

or

!(LDAPProp("attr") == "val")

leads to the same string "(!(attr=val))".

Parameters
[in]sA type convertible to std::string.
Returns
A LDAP expression object.

◆ operator!=() [2/3]

template<class T >
LDAPPropExpr us::LDAPProp::operator!= ( const T &  s) const
inline

Convenience operator for LDAP inequality.

Writing either

LDAPProp("attr") != "val"

or

!(LDAPProp("attr") == "val")

leads to the same string "(!(attr=val))".

Parameters
[in]sA type convertible to std::string.
Returns
A LDAP expression object.

Definition at line 124 of file usLDAPProp.h.

References mitk::operator!=().

◆ operator!=() [3/3]

LDAPPropExpr us::LDAPProp::operator!= ( const us::Any &  s) const

Convenience operator for LDAP inequality.

Writing either

LDAPProp("attr") != "val"

or

!(LDAPProp("attr") == "val")

leads to the same string "(!(attr=val))".

Parameters
[in]sA type convertible to std::string.
Returns
A LDAP expression object.

◆ operator<=() [1/3]

LDAPPropExpr us::LDAPProp::operator<= ( const std::string &  s) const

LDAP less or equal '<='.

Parameters
[in]sA type convertible to std::string.
Returns
A LDAP expression object.

◆ operator<=() [2/3]

template<class T >
LDAPPropExpr us::LDAPProp::operator<= ( const T &  s) const
inline

LDAP less or equal '<='.

Parameters
[in]sA type convertible to std::string.
Returns
A LDAP expression object.

Definition at line 162 of file usLDAPProp.h.

◆ operator<=() [3/3]

LDAPPropExpr us::LDAPProp::operator<= ( const us::Any &  s) const

LDAP less or equal '<='.

Parameters
[in]sA type convertible to std::string.
Returns
A LDAP expression object.

◆ operator==() [1/3]

LDAPPropExpr us::LDAPProp::operator== ( const std::string &  s) const

LDAP equality '='.

Parameters
[in]sA type convertible to std::string.
Returns
A LDAP expression object.

◆ operator==() [2/3]

template<class T >
LDAPPropExpr us::LDAPProp::operator== ( const T &  s) const
inline

LDAP equality '='.

Parameters
[in]sA type convertible to std::string.
Returns
A LDAP expression object.

Definition at line 85 of file usLDAPProp.h.

◆ operator==() [3/3]

LDAPPropExpr us::LDAPProp::operator== ( const us::Any &  s) const

LDAP equality '='.

Parameters
[in]sA type convertible to std::string.
Returns
A LDAP expression object.

◆ operator>=() [1/3]

LDAPPropExpr us::LDAPProp::operator>= ( const std::string &  s) const

LDAP greater or equal '>='.

Parameters
[in]sA type convertible to std::string.
Returns
A LDAP expression object.

◆ operator>=() [2/3]

template<class T >
LDAPPropExpr us::LDAPProp::operator>= ( const T &  s) const
inline

LDAP greater or equal '>='.

Parameters
[in]sA type convertible to std::string.
Returns
A LDAP expression object.

Definition at line 143 of file usLDAPProp.h.

◆ operator>=() [3/3]

LDAPPropExpr us::LDAPProp::operator>= ( const us::Any &  s) const

LDAP greater or equal '>='.

Parameters
[in]sA type convertible to std::string.
Returns
A LDAP expression object.

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