File IntDescriptor.h

Copyright

This code is licensed under the 3-clause BSD license.

Copyright ETH Zurich, Laboratory for Physical Chemistry, Reiher Group.

See LICENSE.txt for details.

namespace Scine

This header file contains functions that allow for common notation for common things that can be done at a different degree of derivatives.

This header contains alias definitions defining which classes to use for the different degrees of derivatives.

namespace Utils
namespace UniversalSettings
class IntDescriptor : public Scine::Utils::UniversalSettings::SettingDescriptor
#include <IntDescriptor.h>

SettingDescriptor for an integer value.

Public Functions

IntDescriptor(std::string propertyDescription)

Constructor.

Parameters
  • propertyDescription: A string describing what the integer is for

std::unique_ptr<SettingDescriptor> clone() const

Create a heap-allocated base pointer copy of this instance.

Return

A heap-allocated copy of this instance

GenericValue getDefaultGenericValue() const

Creates a type-erased representation of the setting’s default value.

Return

A type-erased representation of the setting’s default value

bool validValue(const GenericValue &v) const

Checks if a particular type-erased representation of a setting is a valid value for this kind of setting.

Return

Whether the type-erased representation is a valid value for this kind of setting

Parameters
  • v: A type-erased setting representation

bool validValue(int v) const

Checks whether the supplied value is within the configured bounds.

int getMinimum() const

Returns the lower bound on valid values.

int getMaximum() const

Returns the upper bound on valid values.

int getDefaultValue() const

Returns the default value.

void setMinimum(int min)

Sets the lower bound on valid values.

void setMaximum(int max)

Sets the upper bound on valid values.

void setDefaultValue(int def)

Sets the default value.

Private Members

int minimum_
int maximum_
int defaultValue_