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... | |
| bool | hasUniverse (const std::string &name) const |
| return whether universe with given name exists in universe list More... | |
| std::unordered_map< std::string, std::unique_ptr< CSGUniverse > > & | getUniverseListMap () |
| Get non-const map of all names to universes in universe list. More... | |
| const std::unordered_map< std::string, std::unique_ptr< CSGUniverse > > & | getUniverseListMap () const |
| Get const 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... | |
| bool | operator== (const CSGUniverseList &other) const |
| Operator overload for checking if two CSGUniverseList objects are equal. More... | |
| bool | operator!= (const CSGUniverseList &other) const |
| Operator overload for checking if two CSGUniverseList objects are not equal. 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(), and operator==().
|
inlineprotected |
Get the root universe.
Definition at line 92 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::addUniverseToList(), CSG::CSGBase::checkUniverseInBase(), CSG::CSGBase::getUniverseByName(), operator==(), and CSG::CSGBase::removeCellFromUniverse().
|
inlineprotected |
Get non-const map of all names to universes in universe list.
Definition at line 57 of file CSGUniverseList.h.
Referenced by CSG::CSGBase::CSGBase(), and CSG::CSGBase::joinUniverseList().
|
inlineprotected |
Get const map of all names to universes in universe list.
Definition at line 67 of file CSGUniverseList.h.
|
inlineprotected |
return whether universe with given name exists in universe list
| name | name of universe |
Definition at line 47 of file CSGUniverseList.h.
Referenced by CSG::CSGBase::addUniverseToList(), and operator==().
|
protected |
Operator overload for checking if two CSGUniverseList objects are not equal.
Definition at line 101 of file CSGUniverseList.C.
|
protected |
Operator overload for checking if two CSGUniverseList objects are equal.
Definition at line 77 of file CSGUniverseList.C.
|
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 124 of file CSGUniverseList.h.
|
protected |
root universe for the CSGBase instance
Definition at line 121 of file CSGUniverseList.h.
Referenced by CSGUniverseList(), and getRoot().
|
protected |
Mapping of universe names to pointers of stored universe objects.
Definition at line 118 of file CSGUniverseList.h.
Referenced by addUniverse(), CSGUniverseList(), getAllUniverses(), getUniverse(), getUniverseListMap(), hasUniverse(), and renameUniverse().
1.8.14