 |
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef IDENTIFIER_IDENTIFIERFIELD_H
6 #define IDENTIFIER_IDENTIFIERFIELD_H
62 inline std::pair<element_type, element_type>
73 return std::get<element_vector>(
m_data);
95 void set (
bool wraparound);
101 operator std::string ()
const;
131 std::variant<element_vector, BoundedRange>
m_data{};
146 if (
const auto *
p{std::get_if<BoundedRange>(&
m_data)};
p) {
148 throw std::out_of_range(
"IdentifierField::get_value_at");
150 return (
p->first +
index);
152 return ((std::get<element_vector>(
m_data)).at(
index));
size_type get_bits() const
ExpandedIdentifier::element_type element_type
std::pair< element_type, element_type > get_minmax() const
bool overlaps_with(const IdentifierField &other) const
Check whether two IdentifierFields overlap.
element_type get_minimum() const
Query the values.
static constexpr int m_maxNumberOfIndices
const element_vector & get_values() const
element_type get_maximum() const
void set(element_type minimum, element_type maximum)
continuation_mode m_continuation_mode
void create_index_table()
Create index table from value table.
void set_minimum(element_type value)
bool match(element_type value) const
The basic match operation.
const index_vector & get_indexes() const
size_type get_value_index(element_type value) const
bool operator==(const IdentifierField &other) const
static constexpr auto minimum_possible
void set_maximum(element_type value)
std::variant< element_vector, BoundedRange > m_data
bool get_next(element_type current, element_type &next) const
bool isEnumerated() const
boost::container::small_vector< element_type, 12 >::size_type size_type
std::vector< element_type > element_vector
void set_previous(int previous)
bool check_for_both_bounded()
Check mode - switch from enumerated to both_bounded if possible.
ExpandedIdentifier::size_type size_type
static constexpr auto maximum_possible
const IdentifierField & operator[](IdentifierField::size_type index) const
std::vector< size_type > index_vector
void set(const element_vector &values)
void operator|=(const IdentifierField &other)
std::ostream & operator<<(std::ostream &out, const IdentifierField &c)
This is the individual specification for the range of one ExpandedIdentifier IdentifierField.
std::pair< element_type, element_type > BoundedRange
element_type get_value_at(size_type index) const
bool get_previous(element_type current, element_type &previous) const
Returns false if previous/next is at end of range, or not possible.
static constexpr auto invalidValues
void optimize()
Optimize - try to switch mode to both_bounded, set up lookup table for finding index from value.
std::istream & operator>>(std::istream &in, IdentifierField &c)
void add_value(element_type value)
size_type get_indices() const
IdentifierField()=default
Create a wild-card value.