The SKIRT project
advanced radiative transfer for astrophysics
Public Member Functions | List of all members
BoolPropertyHandler Class Reference

#include <BoolPropertyHandler.hpp>

Inheritance diagram for BoolPropertyHandler:
Inheritance graph
[legend]

Public Member Functions

void acceptVisitor (PropertyHandlerVisitor *visitor) override
 
bool defaultValue () const
 
void insertNames () override
 
bool isValidValue (string value) const override
 
 PropertyHandler (const PropertyHandler &)=delete
 
 PropertyHandler (Item *target, const PropertyDef *property, const SchemaDef *schema, NameManager *nameMgr)
 
void setValue (bool value)
 
bool value () const
 
- Public Member Functions inherited from PropertyHandler
 PropertyHandler (const PropertyHandler &)=delete
 
 PropertyHandler (Item *target, const PropertyDef *property, const SchemaDef *schema, NameManager *nameMgr)
 
virtual ~PropertyHandler ()=default
 
virtual void acceptVisitor (PropertyHandlerVisitor *visitor)=0
 
virtual vector< Item * > children () const
 
bool hasChanged () const
 
bool hasDefaultValue () const
 
virtual void insertNames ()=0
 
virtual bool isCompound () const
 
bool isConfigured ()
 
bool isConfiguredByUser ()
 
bool isDisplayed () const
 
bool isRelevant () const
 
bool isRequired () const
 
bool isSilent () const
 
virtual bool isValidValue (string value) const =0
 
string name () const
 
NameManagernameManager () const
 
PropertyHandleroperator= (const PropertyHandler &)=delete
 
void rebuildNames ()
 
Itemroot () const
 
const SchemaDefschema () const
 
void setConfiguredByUser (bool valid=true)
 
void setConfiguredToDefault ()
 
void setNotConfigured ()
 
string title () const
 
string type () const
 

Additional Inherited Members

- Protected Member Functions inherited from PropertyHandler
const PropertyDefproperty () const
 
void setChanged ()
 
Itemtarget () const
 

Detailed Description

This class handles SMILE data item properties of Boolean types.

Member Function Documentation

◆ acceptVisitor()

void BoolPropertyHandler::acceptVisitor ( PropertyHandlerVisitor visitor)
overridevirtual

Accepts the specified property handler visitor.

Implements PropertyHandler.

◆ defaultValue()

bool BoolPropertyHandler::defaultValue ( ) const

Returns the default value for the handled property, or false if unavailable.

◆ insertNames()

void BoolPropertyHandler::insertNames ( )
overridevirtual

Causes the name manager associated with this handler to insert names into the global and/or local name sets corresponding to the current value of the target property. For Boolean properties, the function inserts the target property's name if the current property value is true, and does not insert any names if the value is false. In addition, the function inserts the names provided in the conditional expression of the "insert" attribute of the target property, if any.

Implements PropertyHandler.

◆ isValidValue()

bool BoolPropertyHandler::isValidValue ( string  value) const
overridevirtual

Returns true if the given string can be successfully converted to a value of the property's type. For Boolean properties, the function returns true if the string is recognized as representing a Boolean by the StringUtils::isValidBool() function, and false otherwise.

Implements PropertyHandler.

◆ PropertyHandler() [1/2]

PropertyHandler::PropertyHandler ( const PropertyHandler )
delete

Constructs a property handler for the specified target item and property, with a given schema definition.

◆ PropertyHandler() [2/2]

PropertyHandler::PropertyHandler ( Item target,
const PropertyDef property,
const SchemaDef schema,
NameManager nameMgr 
)

Constructs a property handler for the specified target item and property, with a given schema definition.

◆ setValue()

void BoolPropertyHandler::setValue ( bool  value)

Sets the value of the handled property in the target item.

◆ value()

bool BoolPropertyHandler::value ( ) const

Returns the value of the handled property in the target item.


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