Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
#include <usLDAPFilter.h>
Public Member Functions | |
LDAPFilter () | |
LDAPFilter (const std::string &filter) | |
LDAPFilter (const LDAPFilter &other) | |
~LDAPFilter () | |
operator bool_type () const | |
bool | Match (const ServiceReferenceBase &reference) const |
bool | Match (const ServiceProperties &dictionary) const |
bool | MatchCase (const ServiceProperties &dictionary) const |
std::string | ToString () const |
bool | operator== (const LDAPFilter &other) const |
LDAPFilter & | operator= (const LDAPFilter &filter) |
Protected Attributes | |
SharedDataPointer< LDAPFilterData > | d |
An RFC 1960-based Filter.
A LDAPFilter
can be used numerous times to determine if the match argument matches the filter string that was used to create the LDAPFilter
.
Some examples of LDAP filters are:
Definition at line 59 of file usLDAPFilter.h.
us::LDAPFilter::LDAPFilter | ( | ) |
Creates in invalid LDAPFilter
object. Test the validity by using the boolean conversion operator.
Calling methods on an invalid LDAPFilter
will result in undefined behavior.
Definition at line 50 of file usLDAPFilter.cpp.
us::LDAPFilter::LDAPFilter | ( | const std::string & | filter | ) |
Creates a LDAPFilter
object. This LDAPFilter
object may be used to match a ServiceReference
object or a ServiceProperties
object.
If the filter cannot be parsed, an std::invalid_argument will be thrown with a human readable message where the filter became unparsable.
filter | The filter string. |
LDAPFilter
object encapsulating the filter string. std::invalid_argument | If filter contains an invalid filter string that cannot be parsed. |
Definition at line 55 of file usLDAPFilter.cpp.
References d.
us::LDAPFilter::LDAPFilter | ( | const LDAPFilter & | other | ) |
Definition at line 68 of file usLDAPFilter.cpp.
us::LDAPFilter::~LDAPFilter | ( | ) |
Definition at line 73 of file usLDAPFilter.cpp.
bool us::LDAPFilter::Match | ( | const ServiceReferenceBase & | reference | ) | const |
Filter using a service's properties.
This LDAPFilter
is executed using the keys and values of the referenced service's properties. The keys are looked up in a case insensitive manner.
reference | The reference to the service whose properties are used in the match. |
true
if the service's properties match this LDAPFilter
false
otherwise. Definition at line 82 of file usLDAPFilter.cpp.
References d.
bool us::LDAPFilter::Match | ( | const ServiceProperties & | dictionary | ) | const |
Filter using a ServiceProperties
object with case insensitive key lookup. This LDAPFilter
is executed using the specified ServiceProperties
's keys and values. The keys are looked up in a case insensitive manner.
dictionary | The ServiceProperties whose key/value pairs are used in the match. |
true
if the ServiceProperties
's values match this filter; false
otherwise. Definition at line 87 of file usLDAPFilter.cpp.
References d.
bool us::LDAPFilter::MatchCase | ( | const ServiceProperties & | dictionary | ) | const |
Filter using a ServiceProperties
. This LDAPFilter
is executed using the specified ServiceProperties
's keys and values. The keys are looked up in a normal manner respecting case.
dictionary | The ServiceProperties whose key/value pairs are used in the match. |
true
if the ServiceProperties
's values match this filter; false
otherwise. Definition at line 92 of file usLDAPFilter.cpp.
References d.
us::LDAPFilter::operator bool_type | ( | ) | const |
Definition at line 77 of file usLDAPFilter.cpp.
References d.
LDAPFilter & us::LDAPFilter::operator= | ( | const LDAPFilter & | filter | ) |
Definition at line 107 of file usLDAPFilter.cpp.
References d.
bool us::LDAPFilter::operator== | ( | const LDAPFilter & | other | ) | const |
Compares this LDAPFilter
to another LDAPFilter
.
This implementation returns the result of calling this->ToString() == other.ToString()
.
other | The object to compare against this LDAPFilter . |
this->ToString() == other.ToString()
. Definition at line 102 of file usLDAPFilter.cpp.
References d.
std::string us::LDAPFilter::ToString | ( | ) | const |
Returns this LDAPFilter
's filter string.
The filter string is normalized by removing whitespace which does not affect the meaning of the filter.
LDAPFilter
's filter string. Definition at line 97 of file usLDAPFilter.cpp.
References d.
|
protected |
Definition at line 165 of file usLDAPFilter.h.
Referenced by LDAPFilter(), Match(), MatchCase(), operator bool_type(), operator=(), operator==(), and ToString().