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

#include <AbstractItemPropertyHandler.hpp>

Inheritance diagram for AbstractItemPropertyHandler:
Inheritance graph
[legend]

Public Member Functions

vector< string > allowedAndDisplayedDescendants ()
 
string baseType () const
 
string defaultType () const
 
bool isCompound () const override
 
bool isValidValue (string value) const override
 
 PropertyHandler (const PropertyHandler &)=delete
 
 PropertyHandler (Item *target, const PropertyDef *property, const SchemaDef *schema, NameManager *nameMgr)
 
- 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

AbstractItemPropertyHandler serves as an abstract base class for handling SMILE data item properties that hold one or more pointers to other SMILE data items.

Member Function Documentation

◆ allowedAndDisplayedDescendants()

vector< string > AbstractItemPropertyHandler::allowedAndDisplayedDescendants ( )

Returns a list of item types, in order of addition to the item registry, which inherit the base type of the target item and which are allowed and should be displayed for the current dataset configuration. For each candidate type, the function obtains a compound conditional expression by concatenating the "allowedIf" and "displayedIf" attribute values for that type and for any of its base types, recursively, with the AND operator into a single Boolean expression. After replacing names currently present in the global or local name sets by true, and other names by false, it then evaluates this expression to determine whether the type is to be included in the returned list.

◆ baseType()

string AbstractItemPropertyHandler::baseType ( ) const

Returns the base type of the item being pointed to by the handled property.

◆ defaultType()

string AbstractItemPropertyHandler::defaultType ( ) const

Returns the default type for the handled property, or empty if unavailable.

◆ isCompound()

bool AbstractItemPropertyHandler::isCompound ( ) const
overridevirtual

Returns true, indicating that the handled property type is compound, i.e. it aggregates other items that are part of the item hierarchy.

Reimplemented from PropertyHandler.

◆ isValidValue()

bool AbstractItemPropertyHandler::isValidValue ( string  value) const
overridevirtual

Returns true if the given string can be successfully converted to a value of the property's type. For item and item list properties, the function returns true if the string matches the type name of one of the currently allowed descendants, 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.


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