SheafSystem  0.0.0.0
sheaf::lexographical_compare_policy Class Reference

A stl_scoped_index comparison policy for lexographical comparison. More...

#include <stl_scoped_index.h>

Static Public Member Functions

static bool less_than (const scoped_index &xindex1, const scoped_index &xindex2)
 True, if xindex1 is less than xindex2. More...
 
static bool equal (const scoped_index &xindex1, const scoped_index &xindex2)
 True, if xindex1 is equal to xindex2. More...
 

Detailed Description

A stl_scoped_index comparison policy for lexographical comparison.

Definition at line 42 of file stl_scoped_index.h.

Member Function Documentation

◆ equal()

bool sheaf::lexographical_compare_policy::equal ( const scoped_index xindex1,
const scoped_index xindex2 
)
static

True, if xindex1 is equal to xindex2.

Postcondition
  • result == (xindex1 == xindex2)

Definition at line 61 of file stl_scoped_index.cc.

References sheaf::equivalence_compare_policy::less_than().

Referenced by less_than().

◆ less_than()

bool sheaf::lexographical_compare_policy::less_than ( const scoped_index xindex1,
const scoped_index xindex2 
)
static

True, if xindex1 is less than xindex2.

Precondition
  • xindex1.is_scoped()
  • xindex2.is_scoped()
Postcondition
  • (xindex1.scope_id() == xindex2.scope_id()) ? result == xindex1.pod() < xindex2.pod() : (xindex1.scope_id() < xindex2.scope_id())

Definition at line 32 of file stl_scoped_index.cc.

References equal(), sheaf::scoped_index::is_scoped(), sheaf::scoped_index::pod(), and sheaf::scoped_index::scope_id().


The documentation for this class was generated from the following files: