Gromacs
2016.6
|
#include <gromacs/options/options-impl.h>
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. | |
Options * | findSubSection (const char *name) const |
Finds a subsection by name. More... | |
AbstractOptionStorage * | findOption (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... | |
Options * | parent_ |
Options object that contains this object as a subsection, or NULL. | |
AbstractOptionStorage * gmx::internal::OptionsImpl::findOption | ( | const char * | name | ) | const |
Finds an option by name.
[in] | name | Name to search for. |
Does not throw.
Options * gmx::internal::OptionsImpl::findSubSection | ( | const char * | name | ) | const |
Finds a subsection by name.
[in] | name | Name to search for. |
Does not throw.
void gmx::internal::OptionsImpl::startSource | ( | ) |
Calls AbstractOptionStorage::startSource() for all options, including subsections.
Does not throw.
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.