Gromacs  2019.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions
gmx::internal::EnumIndexStore< EnumType > Class Template Reference

#include <gromacs/options/basicoptions.h>

+ Inheritance diagram for gmx::internal::EnumIndexStore< EnumType >:
+ Collaboration diagram for gmx::internal::EnumIndexStore< EnumType >:

Description

template<typename EnumType>
class gmx::internal::EnumIndexStore< EnumType >

Type-specific implementation for IOptionValueStore for an enum option.

This class is instantiated for each enum type for which EnumOption is used, and takes care of managing int-to-enum conversions. Having this part in the header allows the actual storage implementation to not be in the header, which would require exposing all the internals through this one header...

Public Member Functions

 EnumIndexStore (EnumType *store, std::vector< EnumType > *storeVector)
 Initializes the storage for the given actual enum variables.
 
int valueCount () override
 Returns the number of values stored so far.
 
ArrayRef< int > values () override
 Returns a reference to the actual values.
 
void clear () override
 Removes all stored values.
 
void reserve (size_t count) override
 Reserves memory for additional count entries.
 
void append (const int &value) override
 Appends a value to the store.
 

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