![]() |
ATLAS Offline Software
|
This is the individual specification for the range of one ExpandedIdentifier field. More...
#include <Range.h>
Public Types | |
enum | mode { unbounded, low_bounded, high_bounded, both_bounded, enumerated } |
Characterizes the four possible modes of any field specification. More... | |
enum | continuation_mode { none, has_next, has_previous, has_both, has_wrap_around } |
typedef std::vector< element_type > | element_vector |
typedef std::vector< size_type > | index_vector |
Public Member Functions | |
field () | |
Create a wild-card value. More... | |
field (const field &other) | |
Create a field copy. More... | |
field (field &&other) | |
Move constructor. More... | |
field (element_type value) | |
Create a unique value (understood as : low bound = high bound = value) More... | |
field (element_type minimum, element_type maximum) | |
Create a full range specification (with explicit min and max) More... | |
bool | is_valued () const |
Some combined query functions on the specification mode. More... | |
bool | has_minimum () const |
bool | has_maximum () const |
bool | wrap_around () const |
mode | get_mode () const |
Query the values. More... | |
element_type | get_minimum () const |
element_type | get_maximum () const |
const element_vector & | get_values () const |
bool | get_previous (element_type current, element_type &previous) const |
Returns false if previous/next is at end of range, or not possible. More... | |
bool | get_next (element_type current, element_type &next) const |
size_type | get_indices () const |
index_vector | get_indexes () const |
size_type | get_bits () const |
element_type | get_value_at (size_type index) const |
size_type | get_value_index (element_type value) const |
bool | match_any () const |
Check if this is a pure wild card field. More... | |
bool | match (element_type value) const |
The basic match operation. More... | |
bool | overlaps_with (const field &other) const |
Check whether two fields overlap. More... | |
void | clear () |
Set methods. More... | |
void | set (element_type minimum, element_type maximum) |
void | set_minimum (element_type value) |
void | set_maximum (element_type value) |
void | add_value (element_type value) |
void | set (const element_vector &values) |
void | set (bool wraparound) |
void | set_next (int next) |
void | set_previous (int previous) |
field & | operator= (const field &other) |
void | operator|= (const field &other) |
operator std::string () const | |
bool | operator== (const field &other) const |
bool | operator!= (const field &other) const |
void | show () const |
void | optimize () |
Optimize - try to switch mode to both_bounded, set up lookup table for finding index from value. More... | |
Private Types | |
enum | max_values { max_indexes = 100 } |
Private Member Functions | |
void | check_for_both_bounded () |
Check mode - switch from enumerated to both_bounded if possible. More... | |
void | create_index_table () |
Create index table from value table. More... | |
void | set_indices () |
Set m_indices. More... | |
This is the individual specification for the range of one ExpandedIdentifier field.
Definition at line 36 of file DetectorDescription/Identifier/Identifier/Range.h.
typedef std::vector<element_type> Range::field::element_vector |
Definition at line 61 of file DetectorDescription/Identifier/Identifier/Range.h.
typedef std::vector<size_type> Range::field::index_vector |
Definition at line 62 of file DetectorDescription/Identifier/Identifier/Range.h.
Enumerator | |
---|---|
none | |
has_next | |
has_previous | |
has_both | |
has_wrap_around |
Definition at line 52 of file DetectorDescription/Identifier/Identifier/Range.h.
|
private |
Enumerator | |
---|---|
max_indexes |
Definition at line 133 of file DetectorDescription/Identifier/Identifier/Range.h.
enum Range::field::mode |
Characterizes the four possible modes of any field specification.
Enumerator | |
---|---|
unbounded | |
low_bounded | |
high_bounded | |
both_bounded | |
enumerated |
Definition at line 43 of file DetectorDescription/Identifier/Identifier/Range.h.
Range::field::field | ( | ) |
Create a wild-card value.
Definition at line 317 of file DetectorDescription/Identifier/src/Range.cxx.
Range::field::field | ( | field && | other | ) |
Range::field::field | ( | element_type | value | ) |
Create a unique value (understood as : low bound = high bound = value)
Definition at line 359 of file DetectorDescription/Identifier/src/Range.cxx.
Range::field::field | ( | element_type | minimum, |
element_type | maximum | ||
) |
Create a full range specification (with explicit min and max)
Definition at line 371 of file DetectorDescription/Identifier/src/Range.cxx.
void Range::field::add_value | ( | element_type | value | ) |
Definition at line 729 of file DetectorDescription/Identifier/src/Range.cxx.
|
private |
Check mode - switch from enumerated to both_bounded if possible.
Definition at line 1119 of file DetectorDescription/Identifier/src/Range.cxx.
void Range::field::clear | ( | ) |
|
private |
Create index table from value table.
Create index table from value table
Definition at line 1143 of file DetectorDescription/Identifier/src/Range.cxx.
|
inline |
Definition at line 560 of file DetectorDescription/Identifier/Identifier/Range.h.
|
inline |
Definition at line 552 of file DetectorDescription/Identifier/Identifier/Range.h.
|
inline |
Definition at line 545 of file DetectorDescription/Identifier/Identifier/Range.h.
|
inline |
Definition at line 531 of file DetectorDescription/Identifier/Identifier/Range.h.
|
inline |
Definition at line 524 of file DetectorDescription/Identifier/Identifier/Range.h.
|
inline |
Query the values.
Definition at line 517 of file DetectorDescription/Identifier/Identifier/Range.h.
bool Range::field::get_next | ( | element_type | current, |
element_type & | next | ||
) | const |
Definition at line 479 of file DetectorDescription/Identifier/src/Range.cxx.
bool Range::field::get_previous | ( | element_type | current, |
element_type & | previous | ||
) | const |
Returns false if previous/next is at end of range, or not possible.
Definition at line 414 of file DetectorDescription/Identifier/src/Range.cxx.
|
inline |
Definition at line 583 of file DetectorDescription/Identifier/Identifier/Range.h.
|
inline |
Definition at line 609 of file DetectorDescription/Identifier/Identifier/Range.h.
|
inline |
Definition at line 538 of file DetectorDescription/Identifier/Identifier/Range.h.
bool Range::field::has_maximum | ( | ) | const |
Definition at line 398 of file DetectorDescription/Identifier/src/Range.cxx.
bool Range::field::has_minimum | ( | ) | const |
Definition at line 390 of file DetectorDescription/Identifier/src/Range.cxx.
bool Range::field::is_valued | ( | ) | const |
Some combined query functions on the specification mode.
Definition at line 384 of file DetectorDescription/Identifier/src/Range.cxx.
|
inline |
The basic match operation.
Definition at line 641 of file DetectorDescription/Identifier/Identifier/Range.h.
bool Range::field::match_any | ( | ) | const |
Check if this is a pure wild card field.
Definition at line 542 of file DetectorDescription/Identifier/src/Range.cxx.
Range::field::operator std::string | ( | ) | const |
Definition at line 959 of file DetectorDescription/Identifier/src/Range.cxx.
bool Range::field::operator!= | ( | const field & | other | ) | const |
Definition at line 1028 of file DetectorDescription/Identifier/src/Range.cxx.
Range::field & Range::field::operator= | ( | const field & | other | ) |
Definition at line 809 of file DetectorDescription/Identifier/src/Range.cxx.
Definition at line 1017 of file DetectorDescription/Identifier/src/Range.cxx.
If there is no overlap we should build a multi-segment specification. The current algorithm is only correct if the overlap in not empty !! A multi-segment specification might also be implemented as an expanded enumerated set (not very optimized !!)
If there is no overlap we should build a multi-segment specification. The current algorithm is only correct if the overlap in not empty !!
(in addition, the expanded solution - to enumerated - is not possible due to the unbounded nature of this mode)
If there is no overlap we should build a multi-segment specification. The current algorithm is only correct if the overlap in not empty !!
(in addition, the expanded solution - to enumerated - is not possible due to the unbounded nature of this mode)
Definition at line 827 of file DetectorDescription/Identifier/src/Range.cxx.
void Range::field::optimize | ( | ) |
Optimize - try to switch mode to both_bounded, set up lookup table for finding index from value.
Check mode - switch from enumerated to both_bounded if possible
Create index table from value table
Definition at line 1094 of file DetectorDescription/Identifier/src/Range.cxx.
Check whether two fields overlap.
Definition at line 551 of file DetectorDescription/Identifier/src/Range.cxx.
void Range::field::set | ( | bool | wraparound | ) |
Definition at line 776 of file DetectorDescription/Identifier/src/Range.cxx.
void Range::field::set | ( | const element_vector & | values | ) |
void Range::field::set | ( | element_type | minimum, |
element_type | maximum | ||
) |
Definition at line 665 of file DetectorDescription/Identifier/src/Range.cxx.
|
private |
Set m_indices.
Set the number of indices
Definition at line 1106 of file DetectorDescription/Identifier/src/Range.cxx.
void Range::field::set_maximum | ( | element_type | value | ) |
Definition at line 707 of file DetectorDescription/Identifier/src/Range.cxx.
void Range::field::set_minimum | ( | element_type | value | ) |
Definition at line 685 of file DetectorDescription/Identifier/src/Range.cxx.
void Range::field::set_next | ( | int | next | ) |
Definition at line 784 of file DetectorDescription/Identifier/src/Range.cxx.
void Range::field::set_previous | ( | int | previous | ) |
Definition at line 797 of file DetectorDescription/Identifier/src/Range.cxx.
void Range::field::show | ( | ) | const |
Definition at line 1035 of file DetectorDescription/Identifier/src/Range.cxx.
bool Range::field::wrap_around | ( | ) | const |
Definition at line 406 of file DetectorDescription/Identifier/src/Range.cxx.
|
private |
Definition at line 155 of file DetectorDescription/Identifier/Identifier/Range.h.
|
private |
Definition at line 150 of file DetectorDescription/Identifier/Identifier/Range.h.
|
private |
Definition at line 151 of file DetectorDescription/Identifier/Identifier/Range.h.
|
private |
Definition at line 148 of file DetectorDescription/Identifier/Identifier/Range.h.
|
private |
Definition at line 147 of file DetectorDescription/Identifier/Identifier/Range.h.
|
private |
Definition at line 154 of file DetectorDescription/Identifier/Identifier/Range.h.
|
private |
Definition at line 153 of file DetectorDescription/Identifier/Identifier/Range.h.
|
private |
Definition at line 152 of file DetectorDescription/Identifier/Identifier/Range.h.
|
private |
Definition at line 149 of file DetectorDescription/Identifier/Identifier/Range.h.