made SearchConditionType public

This commit is contained in:
fgerlits 2005-04-24 12:51:56 +00:00
parent de3c9925c1
commit 3b2b457e3f

View file

@ -22,7 +22,7 @@
Author : $Author: fgerlits $ Author : $Author: fgerlits $
Version : $Revision: 1.1 $ Version : $Revision: 1.2 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/core/include/LiveSupport/Core/SearchCriteria.h,v $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/core/include/LiveSupport/Core/SearchCriteria.h,v $
------------------------------------------------------------------------------*/ ------------------------------------------------------------------------------*/
@ -93,6 +93,18 @@ namespace Core {
*/ */
class SearchCriteria class SearchCriteria
{ {
public:
/**
* A type to hold a single search condition.
*/
struct SearchConditionType
{
std::string key;
std::string comparisonOperator;
std::string value;
};
private: private:
/** /**
@ -105,16 +117,6 @@ class SearchCriteria
*/ */
std::string logicalOperator; std::string logicalOperator;
/**
* A type to hold a single search condition.
*/
struct SearchConditionType
{
std::string key;
std::string comparisonOperator;
std::string value;
};
/** /**
* A type to hold the list of search conditions. * A type to hold the list of search conditions.
*/ */
@ -241,6 +243,20 @@ class SearchCriteria
const std::string & value) const std::string & value)
throw(std::invalid_argument); throw(std::invalid_argument);
/**
* Add a search condition.
*
* @param condition the search condition to add
*/
void
addCondition(const SearchConditionType & condition)
throw(std::invalid_argument)
{
addCondition(condition.key,
condition.comparisonOperator,
condition.value);
}
/** /**
* Set the limit field. * Set the limit field.
* *