Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

CdbNTupleIsLessComparator.hh

Go to the documentation of this file.
00001 #ifndef CDB_NTUPLE_IS_LESS_COMPARATOR_HH
00002 #define CDB_NTUPLE_IS_LESS_COMPARATOR_HH
00003 
00004 // File and Version Information:
00005 //      $Id: CdbNTupleIsLessComparator.hh,v 1.1 2004/03/16 19:22:43 gapon Exp $
00006 
00007 #include "CdbBase/CdbCommon.hh"
00008 
00009 #include <vector>
00010 
00011 /// An abstract base class for the "isLess" comparator of two rows in an n-tuple.
00012 /**
00013   * This class provides a base interface for actual implementations of the comparision
00014   * operation carrying a user defined semantics.
00015   *
00016   * NOTE: Although the number of columns parameter is not directly used in this
00017   *       interface it's still requires as it may be used in actual implementation
00018   *       of the comparision operation. This will also enforce using the right
00019   *       comparator class matching the n-tuple with the same signature.
00020   *
00021   * @see class CdbNTuple
00022   */
00023 template < class T, unsigned int NCOL >
00024 class CdbNTupleIsLessComparator {
00025 
00026 public:
00027 
00028   /// The destructor
00029   /**
00030     * Just to enforce the virtual destructor.
00031     */
00032     virtual ~CdbNTupleIsLessComparator( );
00033 
00034   /// Compare two rows
00035   /**
00036     * This method has to be implemented by a subclass.
00037     *
00038     * The method will return "true" if "theLeftRow" is strictly less than "theRightRow".
00039     */
00040     virtual bool isLess( const std::vector<T>& theLeftRow,
00041                          const std::vector<T>& theRightRow ) const = 0;
00042 };
00043 
00044 #ifdef     BABAR_COMP_INST
00045 #include "CdbTable/CdbNTupleIsLessComparator.cc"
00046 #endif  // BABAR_COMP_INST
00047 
00048 #endif // CDB_NTUPLE_IS_LESS_COMPARATOR_HH
00049 

Generated on Mon Dec 5 18:22:07 2005 for CDB by doxygen1.3-rc3