The Gaudi Framework  v41r0 (bdbe7744)
Loading...
Searching...
No Matches
Gaudi::Decays::CC::CmpCC Struct Reference

a bit specific comparison of strings, useful for ordering according to the length as the primary parameter More...

#include </builds/gaudi/Gaudi/GaudiPartProp/include/Gaudi/Decays/CC.h>

Public Member Functions

bool operator() (const std::string &v1, const std::string &v2) const
 the only one essential method The most long string is "less", otherwise the standard comparison is applicable.

Detailed Description

a bit specific comparison of strings, useful for ordering according to the length as the primary parameter

Author
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@n.nosp@m.ikhe.nosp@m.f.nl

Definition at line 24 of file CC.h.

Member Function Documentation

◆ operator()()

bool Gaudi::Decays::CC::CmpCC::operator() ( const std::string & v1,
const std::string & v2 ) const
inline

the only one essential method The most long string is "less", otherwise the standard comparison is applicable.

Definition at line 29 of file CC.h.

29 {
30 const std::string::size_type s1 = v1.size();
31 const std::string::size_type s2 = v2.size();
32 return s1 < s2 ? false : s2 < s1 ? true : ( v1 < v2 );
33 }

The documentation for this struct was generated from the following file:
  • GaudiPartProp/include/Gaudi/Decays/CC.h