CSGUniverseList creates a container for CSGUniverse objects to pass to CSGBase. More...
#include <CSGUniverseList.h>
Protected Member Functions | |
| CSGUniverseList () | |
| Default constructor. More... | |
| virtual | ~CSGUniverseList ()=default |
| Destructor. More... | |
| CSGUniverse & | addUniverse (const std::string &name) |
| create an empty universe More... | |
| std::unordered_map< std::string, std::unique_ptr< CSGUniverse > > & | getUniverseListMap () |
| Get map of all names to universes in universe list. More... | |
| std::vector< std::reference_wrapper< const CSGUniverse > > | getAllUniverses () const |
| Get all the universes in CSGBase instance. More... | |
| CSGUniverse & | getUniverse (const std::string &name) const |
| Get a Universe from the list by its name. More... | |
| const CSGUniverse & | getRoot () const |
| Get the root universe. More... | |
| CSGUniverse & | addUniverse (std::unique_ptr< CSGUniverse > universe) |
| add an existing universe to list. More... | |
| void | renameUniverse (const CSGUniverse &universe, const std::string &name) |
| rename the specified universe More... | |
Protected Attributes | |
| std::unordered_map< std::string, std::unique_ptr< CSGUniverse > > | _universes |
| Mapping of universe names to pointers of stored universe objects. More... | |
| const CSGUniverse * | _root_universe |
| root universe for the CSGBase instance More... | |
Friends | |
| class | CSGBase |
CSGUniverseList creates a container for CSGUniverse objects to pass to CSGBase.
Definition at line 20 of file CSGUniverseList.h.
|
protected |
Default constructor.
Definition at line 15 of file CSGUniverseList.C.
|
protectedvirtualdefault |
Destructor.
|
protected |
create an empty universe
| name | unique name of universe |
Definition at line 44 of file CSGUniverseList.C.
Referenced by CSG::CSGBase::createUniverse(), CSG::CSGBase::joinUniverseList(), and renameUniverse().
|
protected |
add an existing universe to list.
Ownership of universe will be transferred to universe list object that calls this function
| universe | pointer to universe to add |
Definition at line 50 of file CSGUniverseList.C.
|
protected |
Get all the universes in CSGBase instance.
Definition at line 35 of file CSGUniverseList.C.
Referenced by CSG::CSGBase::getAllUniverses().
|
inlineprotected |
Get the root universe.
Definition at line 71 of file CSGUniverseList.h.
Referenced by CSG::CSGBase::getRootUniverse(), and CSG::CSGBase::renameRootUniverse().
|
protected |
Get a Universe from the list by its name.
| name | name of universe |
Definition at line 25 of file CSGUniverseList.C.
Referenced by CSG::CSGBase::addCellToUniverse(), CSG::CSGBase::checkUniverseInBase(), CSG::CSGBase::getUniverseByName(), and CSG::CSGBase::removeCellFromUniverse().
|
inlineprotected |
Get map of all names to universes in universe list.
Definition at line 46 of file CSGUniverseList.h.
Referenced by CSG::CSGBase::joinUniverseList().
|
protected |
rename the specified universe
| universe | reference to universe whose name should be renamed |
| name | new name |
Definition at line 60 of file CSGUniverseList.C.
Referenced by CSG::CSGBase::renameRootUniverse(), and CSG::CSGBase::renameUniverse().
|
friend |
Definition at line 97 of file CSGUniverseList.h.
|
protected |
root universe for the CSGBase instance
Definition at line 94 of file CSGUniverseList.h.
Referenced by CSGUniverseList(), and getRoot().
|
protected |
Mapping of universe names to pointers of stored universe objects.
Definition at line 91 of file CSGUniverseList.h.
Referenced by addUniverse(), CSGUniverseList(), getAllUniverses(), getUniverse(), getUniverseListMap(), and renameUniverse().
1.8.14