CSGLatticeList creates a container for CSGLattice objects to pass to CSGBase. More...
#include <CSGLatticeList.h>
Protected Member Functions | |
| CSGLatticeList () | |
| Default constructor. More... | |
| virtual | ~CSGLatticeList ()=default |
| Destructor. More... | |
| CSGLattice & | addLattice (std::unique_ptr< CSGLattice > lattice, const bool ignore_identical_lattice=false) |
| add an existing lattice to list. More... | |
| bool | hasLattice (const std::string &name) const |
| return whether lattice with given name exists in lattice list More... | |
| std::unordered_map< std::string, std::unique_ptr< CSGLattice > > & | getLatticeListMap () |
| Get map of all names to lattices in lattice list. More... | |
| const std::unordered_map< std::string, std::unique_ptr< CSGLattice > > & | getLatticeListMap () const |
| Get const map of all names to lattices in lattice list. More... | |
| std::vector< std::reference_wrapper< const CSGLattice > > | getAllLattices () const |
| Get all the lattices in CSGBase instance. More... | |
| CSGLattice & | getLattice (const std::string &name) const |
| Get a Lattice from the list by its name. More... | |
| void | renameLattice (const CSGLattice &lattice, const std::string &name) |
| rename the specified lattice More... | |
| bool | operator== (const CSGLatticeList &other) const |
| Operator overload for checking if two CSGLatticeList objects are equal. More... | |
| bool | operator!= (const CSGLatticeList &other) const |
| Operator overload for checking if two CSGLatticeList objects are not equal. More... | |
Protected Attributes | |
| std::unordered_map< std::string, std::unique_ptr< CSGLattice > > | _lattices |
| Mapping of lattice names to pointers of stored lattice objects. More... | |
Friends | |
| class | CSGBase |
CSGLatticeList creates a container for CSGLattice objects to pass to CSGBase.
Definition at line 20 of file CSGLatticeList.h.
|
protected |
|
protectedvirtualdefault |
Destructor.
|
protected |
add an existing lattice to list.
Ownership of lattice will be transferred to CSGLatticeList object that calls this function
| lattice | pointer to lattice to add |
| ignore_identical_lattice | skip adding lattice if an identical lattice exists in lattice list |
Definition at line 37 of file CSGLatticeList.C.
Referenced by CSG::CSGBase::addLattice(), CSG::CSGBase::joinLatticeList(), and renameLattice().
|
protected |
Get all the lattices in CSGBase instance.
Definition at line 28 of file CSGLatticeList.C.
Referenced by CSG::CSGBase::deleteUniverse(), CSG::CSGBase::getAllLattices(), and operator==().
|
protected |
Get a Lattice from the list by its name.
| name | name of lattice |
Definition at line 18 of file CSGLatticeList.C.
Referenced by CSG::CSGBase::addLatticeToList(), CSG::CSGBase::addTransformation(), CSG::CSGBase::checkLatticeInBase(), CSG::CSGBase::getLatticeByName(), operator==(), CSG::CSGBase::resetLatticeOuter(), CSG::CSGBase::setLatticeOuter(), CSG::CSGBase::setLatticeUniverses(), and CSG::CSGBase::setUniverseAtLatticeIndex().
|
inlineprotected |
Get map of all names to lattices in lattice list.
Definition at line 61 of file CSGLatticeList.h.
Referenced by CSG::CSGBase::CSGBase(), CSG::CSGBase::deleteLattice(), CSG::CSGBase::joinLatticeList(), CSG::CSGBase::replaceUniverseRefsByName(), and CSG::CSGBase::updateIncomingCSGReferences().
|
inlineprotected |
Get const map of all names to lattices in lattice list.
Definition at line 71 of file CSGLatticeList.h.
|
inlineprotected |
return whether lattice with given name exists in lattice list
| name | name of the lattice |
Definition at line 51 of file CSGLatticeList.h.
Referenced by CSG::CSGBase::addLatticeToList(), CSG::CSGBase::hasLattice(), and operator==().
|
protected |
Operator overload for checking if two CSGLatticeList objects are not equal.
Definition at line 102 of file CSGLatticeList.C.
|
protected |
Operator overload for checking if two CSGLatticeList objects are equal.
Definition at line 78 of file CSGLatticeList.C.
|
protected |
rename the specified lattice
| lattice | reference to lattice whose name should be renamed |
| name | new name |
Definition at line 62 of file CSGLatticeList.C.
Referenced by CSG::CSGBase::renameLattice().
|
friend |
Definition at line 109 of file CSGLatticeList.h.
|
protected |
Mapping of lattice names to pointers of stored lattice objects.
Definition at line 106 of file CSGLatticeList.h.
Referenced by addLattice(), getAllLattices(), getLattice(), getLatticeListMap(), hasLattice(), and renameLattice().
1.8.14