Rosetta  2020.37
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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_type size_type
 
typedef std::size_type 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

Constructor & Destructor Documentation

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

Count constructor.

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

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

Count.

References count_.

Member Data Documentation

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: