SPH
Public Member Functions | List of all members
IntervalEntry< TEnum > Class Template Reference

Entry connecting to either lower or upper bound of an interval stored in settings. More...

#include <SpecialEntries.h>

Inheritance diagram for IntervalEntry< TEnum >:
IVirtualEntry Polymorphic

Public Member Functions

 IntervalEntry (Settings< TEnum > &settings, const TEnum id, const std::string &name, const IntervalBound bound)
 
virtual bool enabled () const override
 Returns if this entry is currently enabled. More...
 
virtual bool set (const Value &value) override
 Modifies the current value of the entry. More...
 
virtual Value get () const override
 Returns the currently stored value. More...
 
virtual bool isValid (const Value &UNUSED(value)) const override
 
virtual Type getType () const override
 Returns the type of this entry. More...
 
virtual std::string getName () const override
 Returns a descriptive name of the entry. More...
 
- Public Member Functions inherited from IVirtualEntry
virtual bool isValid (const Value &value) const =0
 Checks if the given value is a valid input for this entry. More...
 
virtual std::string getTooltip () const
 Returns an optional description of the entry. More...
 
virtual bool hasSideEffect () const
 Returns true if the entry can modify multiple values simultaneously. More...
 
virtual Optional< PathTypegetPathType () const
 Returns the type of the path. More...
 
virtual Array< FileFormatgetFileFormats () const
 Returns the allowed file format for this file entry. More...
 
- Public Member Functions inherited from Polymorphic
virtual ~Polymorphic ()
 

Additional Inherited Members

- Public Types inherited from IVirtualEntry
enum class  Type {
  BOOL , INT , FLOAT , VECTOR ,
  INTERVAL , STRING , PATH , ENUM ,
  EXTRA , FLAGS
}
 
enum class  PathType { DIRECTORY , INPUT_FILE , OUTPUT_FILE }
 
using Value = Variant< bool, int, Float, Vector, Interval, std::string, Path, EnumWrapper, ExtraEntry >
 

Detailed Description

template<typename TEnum>
class IntervalEntry< TEnum >

Entry connecting to either lower or upper bound of an interval stored in settings.

Definition at line 20 of file SpecialEntries.h.

Constructor & Destructor Documentation

◆ IntervalEntry()

template<typename TEnum >
IntervalEntry< TEnum >::IntervalEntry ( Settings< TEnum > &  settings,
const TEnum  id,
const std::string &  name,
const IntervalBound  bound 
)
inline

Definition at line 28 of file SpecialEntries.h.

Member Function Documentation

◆ enabled()

template<typename TEnum >
virtual bool IntervalEntry< TEnum >::enabled ( ) const
inlineoverridevirtual

Returns if this entry is currently enabled.

Implementation may return false if the entry does not have any effect for current setup of the job, for example if the entry is associated with a parameter of a solver which is not being used.

Implements IVirtualEntry.

Definition at line 37 of file SpecialEntries.h.

◆ get()

template<typename TEnum >
virtual Value IntervalEntry< TEnum >::get ( ) const
inlineoverridevirtual

Returns the currently stored value.

Implements IVirtualEntry.

Definition at line 54 of file SpecialEntries.h.

◆ getName()

template<typename TEnum >
virtual std::string IntervalEntry< TEnum >::getName ( ) const
inlineoverridevirtual

Returns a descriptive name of the entry.

This name is intended to be presented to the user (in UI, printed in log, etc.). It may be the same as the key associated with an entry, although the key is only used as an unique identifier and does not have to be human-readable.

Implements IVirtualEntry.

Definition at line 71 of file SpecialEntries.h.

◆ getType()

template<typename TEnum >
virtual Type IntervalEntry< TEnum >::getType ( ) const
inlineoverridevirtual

Returns the type of this entry.

Implements IVirtualEntry.

Definition at line 67 of file SpecialEntries.h.

◆ isValid()

template<typename TEnum >
virtual bool IntervalEntry< TEnum >::isValid ( const Value UNUSEDvalue) const
inlineoverridevirtual

Definition at line 63 of file SpecialEntries.h.

◆ set()

template<typename TEnum >
virtual bool IntervalEntry< TEnum >::set ( const Value value)
inlineoverridevirtual

Modifies the current value of the entry.

Function shall throw Exception (or derived type) if the type of the value differs from type of the entry.

Returns
True if the value was changed, false if it was rejected.

Implements IVirtualEntry.

Definition at line 41 of file SpecialEntries.h.


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