Public Member Functions | Private Attributes

Less< ElementType > Class Template Reference

Less-than bound class. More...

#include <keyvalue/key/generic/bound/Less.h>

List of all members.

Public Member Functions

 Less (const ElementType &bound)
 Constructs and sets bound.
bool check (const ElementType &x) const
 Performs the check.
const ElementType & getBound () const
 Gets bound value.
const char * getName () const
 Gets comparison name.

Private Attributes

const ElementType bound_

Detailed Description

template<typename ElementType>
class keyvalue::key::Less< ElementType >

Less-than bound class.

Given a value x this class checks if x < bound, where bound is fixed at construction time.

Parameters:
ElementType : (template parameter) Type of bound. Accepted types are double, ptime, string and unsigned int. (Other types will generate a link error.)

Constructor & Destructor Documentation

Less ( const ElementType &  bound  )  [explicit]

Constructs and sets bound.

Parameters:
bound : The bound value.

Member Function Documentation

bool check ( const ElementType &  x  )  const

Performs the check.

Parameters:
x : Value to be checked.
Returns:
x > bound.
const ElementType& getBound (  )  const

Gets bound value.

Returns:
The bound.
const char* getName (  )  const

Gets comparison name.

Returns:
This method returns "less than" unless ElementType is ptime, in which case it returns "earlier than".