Rosetta
Public Types | Public Member Functions | Private Attributes | List of all members
utility::keys::KeyCount Class Reference

Key counter functor. More...

#include <KeyCount.hh>

Public Types

typedef std::size_t size_type
 
typedef std::size_t Size
 

Public Member Functions

 KeyCount (Size const count_a)
 Count constructor. More...
 
 KeyCount (Size const count_a, Size const expected_count)
 Count + expected count constructor. More...
 
Size operator() () const
 Count. More...
 

Private Attributes

Size count_
 Count of keys. More...
 

Detailed Description

Key counter functor.

Member Typedef Documentation

◆ Size

typedef std::size_t utility::keys::KeyCount::Size

◆ size_type

Constructor & Destructor Documentation

◆ KeyCount() [1/2]

utility::keys::KeyCount::KeyCount ( Size const  count_a)
inlineexplicit

Count constructor.

◆ KeyCount() [2/2]

utility::keys::KeyCount::KeyCount ( Size const  count_a,
Size const  expected_count 
)
inlineexplicit

Count + expected count constructor.

Note
Useful if a namespace constant is stored with the number of keys so that other namespace-scoped UserKeys can set contiguous indexes without global initialization order issues

References count_, and debug_assert.

Member Function Documentation

◆ operator()()

Size utility::keys::KeyCount::operator() ( ) const
inline

Count.

References count_.

Member Data Documentation

◆ count_

Size utility::keys::KeyCount::count_
private

Count of keys.

Referenced by KeyCount(), and operator()().


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