Map volume indices to volume names and vice versa.
More...
#include <detray/core/name_map.hpp>
|
| decltype(auto) | at (const std::string &name) const |
| | Returns the index associated with a volume name.
|
| decltype(auto) | at (const std::string_view name) const |
| | Returns the index associated with a volume name.
|
| decltype(auto) | at (dindex idx) |
| | Returns the name associated with a volume index.
|
| decltype(auto) | at (dindex idx) const |
| | Returns the name associated with a volume index.
|
|
void | clear () |
| | Clears the name map.
|
|
void | clear_names () |
| | Clears the volume name mapping, but keeps detector name.
|
| bool | contains (dindex idx) const |
| bool | contains (std::string_view name) const |
| void | emplace (dindex idx, const std::string &name) |
| | emplace a new index <-> name mapping
|
| bool | empty () const |
| const std::string & | get_detector_name () const |
| void | set_detector_name (const std::string_view name) |
| | set the name of the detector
|
Map volume indices to volume names and vice versa.
◆ at() [1/4]
| decltype(auto) detray::name_map::at |
( |
const std::string & | name | ) |
const |
Returns the index associated with a volume name.
- Parameters
-
| name | Volume name to look up. |
- Returns
- the index of a volume given the volume name
name
◆ at() [2/4]
| decltype(auto) detray::name_map::at |
( |
const std::string_view | name | ) |
const |
Returns the index associated with a volume name.
- Parameters
-
| name | Volume name to look up. |
- Returns
- the index of a volume given the volume name
name
◆ at() [3/4]
| decltype(auto) detray::name_map::at |
( |
dindex | idx | ) |
|
Returns the name associated with a volume index.
- Parameters
-
| idx | Volume index to look up. |
- Returns
- the name of a volume given the volume index
idx
◆ at() [4/4]
| decltype(auto) detray::name_map::at |
( |
dindex | idx | ) |
const |
Returns the name associated with a volume index.
- Parameters
-
| idx | Volume index to look up. |
- Returns
- the name of a volume given the volume index
idx - const
◆ contains() [1/2]
| bool detray::name_map::contains |
( |
dindex | idx | ) |
const |
- Parameters
-
| idx | Volume index to look up. |
- Returns
- whether the name map contains a given volume index
◆ contains() [2/2]
| bool detray::name_map::contains |
( |
std::string_view | name | ) |
const |
- Parameters
-
| name | Volume name to look up. |
- Returns
- whether the name map contains a given volume name
◆ emplace()
| void detray::name_map::emplace |
( |
dindex | idx, |
|
|
const std::string & | name ) |
emplace a new index <-> name mapping
- Parameters
-
| idx | Volume index. |
| name | Volume name to copy into the map. |
◆ empty()
| bool detray::name_map::empty |
( |
| ) |
const |
- Returns
- whether the name map is empty
◆ get_detector_name()
| const std::string & detray::name_map::get_detector_name |
( |
| ) |
const |
- Returns
- the name of the detector
◆ set_detector_name()
| void detray::name_map::set_detector_name |
( |
const std::string_view | name | ) |
|
set the name of the detector
- Parameters
-
| name | Name to assign to the detector. |