CSGEngUnit is the abstract base class for all "engineering unit" types in the CSG system. More...
#include <CSGEngUnit.h>
Public Member Functions | |
| virtual | ~CSGEngUnit () |
| virtual const std::string & | getName () const =0 |
| Get the unique instance name of this engineering unit. More... | |
| const std::string | getBehavior () const |
| Get the behavior of this engineering unit (surface (i.e. More... | |
| const std::string | getUnitType () const |
| Get the type name of this engineering unit. More... | |
| virtual std::unordered_map< std::string, AttributeVariant > | getAttributes () const =0 |
| Get the attributes that define this engineering unit. More... | |
| virtual const std::vector< std::pair< TransformationType, std::tuple< Real, Real, Real > > > & | getTransformations () const =0 |
| Get the list of transformations applied to this engineering unit. More... | |
| virtual std::vector< std::pair< std::string, std::tuple< Real, Real, Real > > > | getTransformationsAsStrings () const =0 |
| Get the transformations with string representations for types. More... | |
| bool | operator== (const CSGEngUnit &other) const |
| Operator overload for checking if two CSGEngUnit objects are equal. More... | |
| bool | operator!= (const CSGEngUnit &other) const |
| Operator overload for checking if two CSGEngUnit objects are not equal. More... | |
Protected Member Functions | |
| CSGEngUnit (const std::string &behavior) | |
| Constructor for intermediate EngUnit abstract classes. More... | |
| virtual void | expandUnit ()=0 |
| Expand this engineering unit into basic CSG objects stored in _internal_base. More... | |
| CSGBase & | getBase () |
| Get the internal CSGBase owned by this engineering unit. More... | |
| std::unique_ptr< CSGBase > | releaseBase () |
| Transfer ownership of the internal CSGBase out of this unit. More... | |
Protected Attributes | |
| std::unique_ptr< CSGBase > | _internal_base |
| CSGBase populated by expandUnit(); joined into the parent CSGBase by expandEngUnit() More... | |
| MooseEnum | _behavior {"SURFACE CELL UNIVERSE"} |
| The basic CSG type this unit produces: "SURFACE", "CELL", or "UNIVERSE". More... | |
Friends | |
| class | CSGBase |
CSGEngUnit is the abstract base class for all "engineering unit" types in the CSG system.
It captures the interface shared by CSGSurfaceEngUnit, CSGCellEngUnit, and CSGUniverseEngUnit: a name, a domain-specific attribute map, and a protected expandUnit() method that is called exclusively by CSGBase to convert the EngUnit into equivalent basic CSG objects.
Derived classes (CSGSurfaceEngUnit, CSGCellEngUnit, CSGUniverseEngUnit) further specialise the expansion contract for their respective CSG object types and allow the units to act as those basic types during CSGBase object creation.
Definition at line 32 of file CSGEngUnit.h.
|
virtualdefault |
|
protected |
Constructor for intermediate EngUnit abstract classes.
| behavior | the basic CSG type this unit produces. Must be "SURFACE", "CELL", or "UNIVERSE"; set by the intermediate class, not the concrete derived class |
Definition at line 18 of file CSGEngUnit.C.
|
protectedpure virtual |
Expand this engineering unit into basic CSG objects stored in _internal_base.
Called exclusively by CSGBase via the typed expandEngUnit() overloads. The implementation must create all necessary basic CSG objects by calling the appropriate methods on _internal_base (e.g., _internal_base->addSurface(...), _internal_base->createCell(...)). CSGBase::expandEngUnit() then joins _internal_base into the parent CSGBase after this method returns.
Implemented in CSG::CSGNPolygonUnit, CSG::CSGSurfaceEngUnit, CSG::CSGCellEngUnit, and CSG::CSGUniverseEngUnit.
|
pure virtual |
Get the attributes that define this engineering unit.
Returns a map of domain-specific parameter names to their values, describing the EngUnit in meaningful engineering terms.
Implemented in CSG::CSGNPolygonUnit.
Referenced by operator==().
|
inlineprotected |
Get the internal CSGBase owned by this engineering unit.
Definition at line 117 of file CSGEngUnit.h.
|
inline |
Get the behavior of this engineering unit (surface (i.e.
region), cell, or universe).
Returns "SURFACE", "CELL", or "UNIVERSE" depending on which intermediate EngUnit class the concrete type derives from. Set automatically at construction.
Definition at line 56 of file CSGEngUnit.h.
Referenced by operator==().
|
pure virtual |
Get the unique instance name of this engineering unit.
Satisfied by the getName() inherited from the corresponding CSG base class (CSGSurface, CSGCell, or CSGUniverse) via the disambiguation override in each intermediate EngUnit class.
Implemented in CSG::CSGSurfaceEngUnit, CSG::CSGCellEngUnit, and CSG::CSGUniverseEngUnit.
Referenced by CSG::CSGEngUnitList::addEngUnit(), CSG::CSGBase::addTransformation(), CSG::CSGBase::checkEngUnitInBase(), CSG::CSGBase::deleteEngUnit(), operator==(), and CSG::CSGBase::renameEngUnit().
|
pure virtual |
Get the list of transformations applied to this engineering unit.
Implemented in CSG::CSGSurfaceEngUnit, CSG::CSGUniverseEngUnit, and CSG::CSGCellEngUnit.
Referenced by operator==().
|
pure virtual |
Get the transformations with string representations for types.
Implemented in CSG::CSGSurfaceEngUnit, CSG::CSGUniverseEngUnit, and CSG::CSGCellEngUnit.
|
inline |
Get the type name of this engineering unit.
Definition at line 63 of file CSGEngUnit.h.
Referenced by CSG::CSGCellEngUnit::getExpandedCell(), CSG::CSGUniverseEngUnit::getExpandedUniverse(), and operator==().
| bool CSG::CSGEngUnit::operator!= | ( | const CSGEngUnit & | other | ) | const |
Operator overload for checking if two CSGEngUnit objects are not equal.
Definition at line 50 of file CSGEngUnit.C.
Referenced by CSG::CSGCellEngUnit::operator!=(), CSG::CSGUniverseEngUnit::operator!=(), and CSG::CSGSurfaceEngUnit::operator!=().
| bool CSG::CSGEngUnit::operator== | ( | const CSGEngUnit & | other | ) | const |
Operator overload for checking if two CSGEngUnit objects are equal.
Definition at line 34 of file CSGEngUnit.C.
Referenced by CSG::CSGCellEngUnit::operator==(), CSG::CSGUniverseEngUnit::operator==(), and CSG::CSGSurfaceEngUnit::operator==().
|
protected |
Transfer ownership of the internal CSGBase out of this unit.
Called once by CSGBase::expandEngUnit() to join the internal base into the parent. After this call _internal_base is null.
Definition at line 28 of file CSGEngUnit.C.
|
friend |
Definition at line 135 of file CSGEngUnit.h.
|
protected |
The basic CSG type this unit produces: "SURFACE", "CELL", or "UNIVERSE".
Definition at line 133 of file CSGEngUnit.h.
Referenced by CSGEngUnit(), and getBehavior().
|
protected |
CSGBase populated by expandUnit(); joined into the parent CSGBase by expandEngUnit()
Definition at line 130 of file CSGEngUnit.h.
Referenced by CSG::CSGNPolygonUnit::expandUnit(), getBase(), CSG::CSGCellEngUnit::getExpandedCell(), CSG::CSGUniverseEngUnit::getExpandedUniverse(), and releaseBase().
1.8.14