Gromacs  2016.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Classes | Public Types | Public Member Functions | Public Attributes
gmx::internal::OptionsImpl Class Reference

#include <gromacs/options/options-impl.h>

+ Collaboration diagram for gmx::internal::OptionsImpl:

Description

Private implementation class for Options.

Note that in addition to Options, the OptionsAssigner and OptionsIterator classes also directly access this class.

Classes

class  Group
 Describes a group of options (see Options::addGroup()). More...
 

Public Types

typedef std::unique_ptr
< AbstractOptionStorage
AbstractOptionStoragePointer
 Smart pointer for managing an AbstractOptionStorage object.
 
typedef std::vector< Options * > SubSectionList
 Convenience type for list of sections.
 
typedef std::map< std::string,
AbstractOptionStoragePointer
OptionMap
 Convenience typedef for a map that contains all the options.
 

Public Member Functions

 OptionsImpl (const char *name, const char *title)
 Sets the name and title.
 
OptionsfindSubSection (const char *name) const
 Finds a subsection by name. More...
 
AbstractOptionStoragefindOption (const char *name) const
 Finds an option by name. More...
 
void startSource ()
 Calls AbstractOptionStorage::startSource() for all options, including subsections. More...
 

Public Attributes

std::string name_
 Name for the Options object.
 
OptionManagerContainer managers_
 Option managers set for this collection. More...
 
Group rootGroup_
 Group that contains all options (and subgroups). More...
 
OptionMap optionMap_
 Map from option names to options; owns the option storage objects.
 
SubSectionList subSections_
 List of subsections, in insertion order. More...
 
Optionsparent_
 Options object that contains this object as a subsection, or NULL.
 

Member Function Documentation

AbstractOptionStorage * gmx::internal::OptionsImpl::findOption ( const char *  name) const

Finds an option by name.

Parameters
[in]nameName to search for.
Returns
Pointer to the found option, or NULL if not found.

Does not throw.

Options * gmx::internal::OptionsImpl::findSubSection ( const char *  name) const

Finds a subsection by name.

Parameters
[in]nameName to search for.
Returns
Pointer to the found subsection, or NULL if not found.

Does not throw.

void gmx::internal::OptionsImpl::startSource ( )

Calls AbstractOptionStorage::startSource() for all options, including subsections.

Does not throw.

Member Data Documentation

OptionManagerContainer gmx::internal::OptionsImpl::managers_

Option managers set for this collection.

This is non-empty only for the top-level Options object.

Group gmx::internal::OptionsImpl::rootGroup_

Group that contains all options (and subgroups).

This is used to store the insertion order of options.

SubSectionList gmx::internal::OptionsImpl::subSections_

List of subsections, in insertion order.

This container contains only references to external objects; memory management is performed elsewhere.


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