SPH
Public Member Functions | List of all members
Detail::SettingsEntry< TValue, TEnum, std::enable_if_t< FlagsTraits< TValue >::isFlags > > Class Template Reference

Partial specialization for Flags. More...

#include <VirtualSettings.inl.h>

Inheritance diagram for Detail::SettingsEntry< TValue, TEnum, std::enable_if_t< FlagsTraits< TValue >::isFlags > >:
EntryControl IVirtualEntry Polymorphic

Public Member Functions

 SettingsEntry (Settings< TEnum > &settings, const TEnum id, const std::string &name)
 
virtual void setImpl (const Value &value) override
 
virtual Value get () const override
 Returns the currently stored value. More...
 
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 EntryControl
EntryControlsetTooltip (const std::string &newTooltip)
 Adds or replaces the previous tooltip associanted with the entry. More...
 
EntryControlsetUnits (const Float newMult)
 Sets units in which the entry is stored. More...
 
EntryControlsetEnabler (const Enabler &newEnabler)
 Adds or replaces the enabler functor of the entry. More...
 
EntryControladdAccessor (const SharedToken &owner, const Accessor &accessor)
 Adds a functor called when the entry changes, i.e. when set function is called. More...
 
EntryControlsetValidator (const Validator &newValidator)
 Adds or replaces the functor called to validate the new value. More...
 
EntryControlsetSideEffect ()
 Specifies that the entry has a side effect, i.e. in changes values of other entries. More...
 
EntryControlsetPathType (const PathType &newType)
 Sets the type of the path. More...
 
EntryControlsetFileFormats (Array< FileFormat > &&formats)
 Sets the allowed file formats. More...
 
- Public Member Functions inherited from Polymorphic
virtual ~Polymorphic ()
 

Additional Inherited Members

- Public Types inherited from EntryControl
using Enabler = Function< bool()>
 
using Accessor = Function< void(const Value &newValue)>
 
using Validator = Function< bool(const Value &newValue)>
 
- 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 >
 
- Protected Member Functions inherited from EntryControl
virtual bool enabled () const override final
 Returns if this entry is currently enabled. More...
 
virtual std::string getTooltip () const override final
 Returns an optional description of the entry. More...
 
virtual bool hasSideEffect () const override final
 Returns true if the entry can modify multiple values simultaneously. More...
 
virtual Optional< PathTypegetPathType () const override final
 Returns the type of the path. More...
 
virtual Array< FileFormatgetFileFormats () const override final
 Returns the allowed file format for this file entry. More...
 
virtual bool isValid (const Value &value) const override final
 Checks if the given value is a valid input for this entry. More...
 
- Protected Attributes inherited from EntryControl
std::string tooltip
 
Float mult = 1._f
 
Optional< PathTypepathType = NOTHING
 
Array< FileFormatfileFormats
 
Enabler enabler = nullptr
 
CallbackSet< Accessoraccessors
 
Validator validator = nullptr
 
bool sideEffect = false
 

Detailed Description

template<typename TValue, typename TEnum>
class Detail::SettingsEntry< TValue, TEnum, std::enable_if_t< FlagsTraits< TValue >::isFlags > >

Partial specialization for Flags.

Definition at line 184 of file VirtualSettings.inl.h.

Constructor & Destructor Documentation

◆ SettingsEntry()

template<typename TValue , typename TEnum >
Detail::SettingsEntry< TValue, TEnum, std::enable_if_t< FlagsTraits< TValue >::isFlags > >::SettingsEntry ( Settings< TEnum > &  settings,
const TEnum  id,
const std::string &  name 
)
inline

Definition at line 191 of file VirtualSettings.inl.h.

Member Function Documentation

◆ get()

template<typename TValue , typename TEnum >
virtual Value Detail::SettingsEntry< TValue, TEnum, std::enable_if_t< FlagsTraits< TValue >::isFlags > >::get ( ) const
inlineoverridevirtual

Returns the currently stored value.

Implements IVirtualEntry.

Definition at line 202 of file VirtualSettings.inl.h.

◆ getName()

template<typename TValue , typename TEnum >
virtual std::string Detail::SettingsEntry< TValue, TEnum, std::enable_if_t< FlagsTraits< TValue >::isFlags > >::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 210 of file VirtualSettings.inl.h.

◆ getType()

template<typename TValue , typename TEnum >
virtual Type Detail::SettingsEntry< TValue, TEnum, std::enable_if_t< FlagsTraits< TValue >::isFlags > >::getType ( ) const
inlineoverridevirtual

Returns the type of this entry.

Implements IVirtualEntry.

Definition at line 206 of file VirtualSettings.inl.h.

◆ setImpl()

template<typename TValue , typename TEnum >
virtual void Detail::SettingsEntry< TValue, TEnum, std::enable_if_t< FlagsTraits< TValue >::isFlags > >::setImpl ( const Value value)
inlineoverridevirtual

Implements EntryControl.

Definition at line 198 of file VirtualSettings.inl.h.


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