The SKIRT project
advanced radiative transfer for astrophysics
ItemUtils Class Referencefinal

#include <ItemUtils.hpp>

Static Public Member Functions

static bool isItemComplete (Item *item)
static int propertyConfiguredState (Item *item, string property)
static int retrieveSelectedRow (Item *item, string property)
static void setHierarchyComplete (Item *root)
static void setHierarchyConfigured (const SchemaDef *schema, Item *root)
static void setItemComplete (Item *item)
static void setItemIncomplete (Item *item)
static void setPropertyConfiguredState (Item *item, string property, int configured)
static void storeSelectedRow (Item *item, string property, int row)

Detailed Description

This class offers a set of static utility functions for working with SMILE dataset items in the context of a wizard that needs to move back and forth in the hierarchy.

Member Function Documentation

◆ isItemComplete()

bool ItemUtils::isItemComplete ( Item * item)
static

This function returns the complete state for the specified item. If the complete state has never been set for this item, the function returns false.

◆ propertyConfiguredState()

int ItemUtils::propertyConfiguredState ( Item * item,
string property )
static

This function returns the configured state for the specified property in the specified item. If the configured state has never been set for this property and item, the function returns zero.

◆ retrieveSelectedRow()

int ItemUtils::retrieveSelectedRow ( Item * item,
string property )
static

This function returns the stored selected row index for the specified property in the specified item. If the selected row index has never been stored for this property and item, the function returns zero.

◆ setHierarchyComplete()

void ItemUtils::setHierarchyComplete ( Item * root)
static

This function sets the complete state for all items in the specified dataset hierarchy to true. The function calls itself recursively to process the children of the specified root item.

◆ setHierarchyConfigured()

void ItemUtils::setHierarchyConfigured ( const SchemaDef * schema,
Item * root )
static

This function sets the configured state of all properties in the specified dataset hierarchy to one. The function calls itself recursively to process the children of the specified root item.

◆ setItemComplete()

void ItemUtils::setItemComplete ( Item * item)
static

This function sets the complete state for the specified item to true. A newly created item has a complete state of false.

◆ setItemIncomplete()

void ItemUtils::setItemIncomplete ( Item * item)
static

This function clears the complete state for the specified item and for all its ascendants in the run-time hierarchy.

◆ setPropertyConfiguredState()

void ItemUtils::setPropertyConfiguredState ( Item * item,
string property,
int configured )
static

This function sets the configured state for the specified property in the specified item to the specified integer value. A newly created item has a configured state of zero.

◆ storeSelectedRow()

void ItemUtils::storeSelectedRow ( Item * item,
string property,
int row )
static

This function stores the selected row index for the specified property in the specified item to the specified integer value. The function should be called only for item list properties, but the current implementation does not enforce this.


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