#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <stdexcept>
#include <cassert>
#include "SGTools/SGVersionedKey.h"
Go to the source code of this file.
◆ operator<()
sort according to highest key version 
Definition at line 91 of file SGVersionedKey.cxx.
   93   unsigned char lhsVersion(0);
 
   94   lhs.
decode(lhskey, lhsVersion);
 
   95   unsigned char rhsVersion(0);
 
   97   rhs.
decode(rhskey, rhsVersion);
 
   98   int keyCompare(strcmp(lhskey.c_str(), rhskey.c_str()));
 
   99   return ( ( keyCompare < 0) ||
 
  100        ( (keyCompare == 0) && (lhsVersion < rhsVersion) ) ) ;
 
 
 
 
 
void decode(std::string &outKey, unsigned char &version) const
sets outKey to point to base key, and version to encoded version (0 is taken to mean default version)...