CSGSurfaceList is a container for storing CSGSurface objects in the CSGBase object. More...
#include <CSGSurfaceList.h>
Protected Member Functions | |
| CSGSurfaceList () | |
| Default constructor. More... | |
| CSGSurfaceList (const CSGSurfaceList &other_surface_list) | |
| Copy constructor. More... | |
| virtual | ~CSGSurfaceList ()=default |
| Destructor. More... | |
| std::unordered_map< std::string, std::unique_ptr< CSGSurface > > & | getSurfaceListMap () |
| Get non-const map of all names to surfaces in surface list. More... | |
| const std::unordered_map< std::string, std::unique_ptr< CSGSurface > > & | getSurfaceListMap () const |
| Get const map of all names to surfaces in surface list. More... | |
| std::vector< std::reference_wrapper< const CSGSurface > > | getAllSurfaces () const |
| Get list of references to all surfaces in surface list. More... | |
| bool | hasSurface (const std::string &name) const |
| return whether surface with given name exists in surface list More... | |
| CSGSurface & | getSurface (const std::string &name) const |
| Get a surface by name. More... | |
| CSGSurface & | addSurface (std::unique_ptr< CSGSurface > surf) |
| add a surface object to existing SurfaceList. More... | |
| void | renameSurface (const CSGSurface &surface, const std::string &name) |
| rename the specified surface More... | |
| bool | operator== (const CSGSurfaceList &other) const |
| Operator overload for checking if two CSGSurfaceList objects are equal. More... | |
| bool | operator!= (const CSGSurfaceList &other) const |
| Operator overload for checking if two CSGSurfaceList objects are not equal. More... | |
Protected Attributes | |
| std::unordered_map< std::string, std::unique_ptr< CSGSurface > > | _surfaces |
| Mapping of surface names to pointers of stored surface objects. More... | |
Friends | |
| class | CSGBase |
CSGSurfaceList is a container for storing CSGSurface objects in the CSGBase object.
Definition at line 20 of file CSGSurfaceList.h.
|
protected |
|
protected |
Copy constructor.
Definition at line 22 of file CSGSurfaceList.C.
|
protectedvirtualdefault |
Destructor.
|
protected |
add a surface object to existing SurfaceList.
Ownership of surface will be transferred to surface list object that calls this function
| surf | CSGSurface to add |
Definition at line 48 of file CSGSurfaceList.C.
Referenced by CSG::CSGBase::addSurface(), CSG::CSGBase::joinSurfaceList(), and renameSurface().
|
protected |
Get list of references to all surfaces in surface list.
Definition at line 39 of file CSGSurfaceList.C.
Referenced by CSG::CSGBase::getAllSurfaces(), and operator==().
|
protected |
Get a surface by name.
| name | name of surface |
Definition at line 29 of file CSGSurfaceList.C.
Referenced by CSG::CSGBase::checkRegionSurfaces(), CSG::CSGBase::getSurface(), CSG::CSGBase::getSurfaceByName(), and operator==().
|
inlineprotected |
Get non-const map of all names to surfaces in surface list.
Definition at line 43 of file CSGSurfaceList.h.
Referenced by CSGSurfaceList(), and CSG::CSGBase::joinSurfaceList().
|
inlineprotected |
Get const map of all names to surfaces in surface list.
Definition at line 53 of file CSGSurfaceList.h.
|
inlineprotected |
return whether surface with given name exists in surface list
| name | name of surface |
Definition at line 71 of file CSGSurfaceList.h.
Referenced by operator==().
|
protected |
Operator overload for checking if two CSGSurfaceList objects are not equal.
Definition at line 98 of file CSGSurfaceList.C.
|
protected |
Operator overload for checking if two CSGSurfaceList objects are equal.
Definition at line 74 of file CSGSurfaceList.C.
|
protected |
rename the specified surface
| name | new name of surface |
Definition at line 58 of file CSGSurfaceList.C.
Referenced by CSG::CSGBase::renameSurface().
|
friend |
Definition at line 112 of file CSGSurfaceList.h.
|
protected |
Mapping of surface names to pointers of stored surface objects.
Definition at line 109 of file CSGSurfaceList.h.
Referenced by addSurface(), CSGSurfaceList(), getAllSurfaces(), getSurface(), getSurfaceListMap(), hasSurface(), and renameSurface().
1.8.14