#include <MaterialMixFamily.hpp>
Public Member Functions | |
virtual const MaterialMix * | mix (const Array ¶meters) const =0 |
virtual vector< SnapshotParameter > | parameterInfo () const =0 |
![]() | |
template<class T > | |
T * | find (bool setup=true) const |
template<class T > | |
T * | interface (int levels=-999999, bool setup=true) const |
virtual string | itemName () const |
void | setup () |
string | typeAndName () const |
![]() | |
Item (const Item &)=delete | |
virtual | ~Item () |
void | addChild (Item *child) |
const vector< Item * > & | children () const |
virtual void | clearItemListProperty (const PropertyDef *property) |
void | destroyChild (Item *child) |
virtual bool | getBoolProperty (const PropertyDef *property) const |
virtual vector< double > | getDoubleListProperty (const PropertyDef *property) const |
virtual double | getDoubleProperty (const PropertyDef *property) const |
virtual string | getEnumProperty (const PropertyDef *property) const |
virtual int | getIntProperty (const PropertyDef *property) const |
virtual vector< Item * > | getItemListProperty (const PropertyDef *property) const |
virtual Item * | getItemProperty (const PropertyDef *property) const |
virtual string | getStringProperty (const PropertyDef *property) const |
int | getUtilityProperty (string name) const |
virtual void | insertIntoItemListProperty (const PropertyDef *property, int index, Item *item) |
Item & | operator= (const Item &)=delete |
Item * | parent () const |
virtual void | removeFromItemListProperty (const PropertyDef *property, int index) |
virtual void | setBoolProperty (const PropertyDef *property, bool value) |
virtual void | setDoubleListProperty (const PropertyDef *property, vector< double > value) |
virtual void | setDoubleProperty (const PropertyDef *property, double value) |
virtual void | setEnumProperty (const PropertyDef *property, string value) |
virtual void | setIntProperty (const PropertyDef *property, int value) |
virtual void | setItemProperty (const PropertyDef *property, Item *item) |
virtual void | setStringProperty (const PropertyDef *property, string value) |
void | setUtilityProperty (string name, int value) |
virtual string | type () const |
Protected Member Functions | |
MaterialMixFamily () | |
![]() | |
SimulationItem () | |
virtual bool | offersInterface (const std::type_info &interfaceTypeInfo) const |
virtual void | setupSelfAfter () |
virtual void | setupSelfBefore () |
![]() | |
Item () | |
Private Types | |
using | BaseType = SimulationItem |
using | ItemType = MaterialMixFamily |
Friends | |
class | ItemRegistry |
MaterialMixFamily is an abstract class for representing a family of material mixes of the same material type (i.e. either dust, electrons or gas; never a mixture of these). Each subclass implements a material mix family from which a particular material mix can be chosen based on one or more parameters. This base class offers a generic interface for obtaining information on the number and type of parameters appropriate for the subclass, and for actually selecting a material mix given specific parameter values.
Because each material mix is represented by a distinct C++ object, a material mix family must by necessity consist of a discrete number of family members. As a result, each subclass must implement a mechanism to map specified parameter values from their continuous ranges to one of a discrete set of material mixes.
Also, because a material mix object often consumes a significant amount of memory for holding material properties and precalculated values, the number of material mixes that can be offered by a material mix family is limited by the available memory resources.
|
inlineprotected |
Default constructor for abstract Item subclass MaterialMixFamily : "a family of material mixes" .
|
pure virtual |
This function returns (a pointer to) the material mix corresponding to the given parameter values, or some default material mix if one or more of the parameter values are out of range. The material mix family retains ownership of the returned material mix, and guarantees that it will not be destroyed until the family itself is destroyed.
The number and type of parameters must match the information returned by the parameterInfo() function; if not the behavior is undefined.
Implemented in SelectDustMixFamily.
|
pure virtual |
This function returns the number and type of parameters used by this particular material mix family as a list of SnapshotParameter objects. Each of these objects specifies unit information and a human-readable descripton for the parameter.
Implemented in SelectDustMixFamily.