![]() |
ATLAS Offline Software
|
A Range describes the possible ranges for the field values of an ExpandedIdentifier. More...
#include <Range.h>
Classes | |
class | const_identifier_factory |
class | field |
This is the individual specification for the range of one ExpandedIdentifier field. More... | |
class | identifier_factory |
This factory is able to generate all possible identifiers, from a fully bounded Range. More... | |
Public Types | |
typedef ExpandedIdentifier::element_type | element_type |
typedef ExpandedIdentifier::size_type | size_type |
typedef std::vector< field > | field_vector |
Public Member Functions | |
Range () | |
Constructors. More... | |
Range (const Range &other) | |
Range (Range &&other) | |
Range & | operator= (const Range &other) |
Assignment. More... | |
Range & | operator= (Range &&other) |
Range (const Range &other, size_type start) | |
This is a sub-range copy constructor. More... | |
Range (const ExpandedIdentifier &root) | |
Constructor with setup from a textual description. More... | |
void | build (const std::string &text) |
Build a range from a textual description. More... | |
void | build (const ExpandedIdentifier &root) |
Build a range from a single ExpandedIdentifier (see similar constructor for comment) More... | |
void | clear () |
Modifications. More... | |
void | add () |
Add a wild card field. More... | |
void | add (element_type value) |
Add a required value. (ie. low = high = value) More... | |
void | add (element_type minimum, element_type maximum) |
Add a bounded value. More... | |
void | add_minimum (element_type minimum) |
Add a range bounded by a minimum. More... | |
void | add_maximum (element_type maximum) |
Add a range bounded by a maximum. More... | |
void | add (const field &f) |
Add a range specified using a field More... | |
void | add (field &&f) |
Add a range specified using a field, with move semantics. More... | |
void | add (const Range &subrange) |
Append a subrange. More... | |
void | add (Range &&subrange) |
Append a subrange, with move semantics. More... | |
int | match (const ExpandedIdentifier &id) const |
Match an identifier. More... | |
const field & | operator[] (size_type index) const |
Accessors. More... | |
size_type | fields () const |
bool | is_empty () const |
ExpandedIdentifier | minimum () const |
min and max ExpandedIdentifiers (if they exist, ie. More... | |
ExpandedIdentifier | maximum () const |
size_type | cardinality () const |
Computes a possible cardinality : More... | |
size_type | cardinalityUpTo (const ExpandedIdentifier &id) const |
Get the cardinality from the beginning up to the given ExpandedIdentifier. More... | |
size_type | cardinalityUpTo (const int *id) const |
Get the cardinality from the beginning up to the given Identifier expanded into a int array. More... | |
identifier_factory | factory_begin () |
Identifier_factory management. More... | |
const_identifier_factory | factory_begin () const |
identifier_factory | factory_end () |
const_identifier_factory | factory_end () const |
bool | overlaps_with (const Range &other) const |
Check if two Ranges overlap. More... | |
void | show () const |
void | show (std::ostream &s) const |
operator std::string () const | |
Produce a textual representation of the range using the input format. More... | |
bool | operator== (const Range &other) const |
bool | operator!= (const Range &other) const |
Private Attributes | |
field_vector | m_fields |
A Range describes the possible ranges for the field values of an ExpandedIdentifier.
Specifications can be : No bound * Low bound n: High bound :m Both bounds n:m Enumeration v1, v2, v3, ... , vn
Trailing * are implicit for all trailing fields
Definition at line 26 of file DetectorDescription/Identifier/Identifier/Range.h.
Definition at line 30 of file DetectorDescription/Identifier/Identifier/Range.h.
typedef std::vector<field> Range::field_vector |
Definition at line 158 of file DetectorDescription/Identifier/Identifier/Range.h.
Definition at line 31 of file DetectorDescription/Identifier/Identifier/Range.h.
Range::Range | ( | ) |
Constructors.
Definition at line 1176 of file DetectorDescription/Identifier/src/Range.cxx.
Definition at line 1181 of file DetectorDescription/Identifier/src/Range.cxx.
Range::Range | ( | Range && | other | ) |
Definition at line 1187 of file DetectorDescription/Identifier/src/Range.cxx.
This is a sub-range copy constructor.
It copies the portion of the other Range, starting from the
specified starting index up to its last field.
Definition at line 1209 of file DetectorDescription/Identifier/src/Range.cxx.
Range::Range | ( | const ExpandedIdentifier & | root | ) |
Constructor with setup from a textual description.
The syntax is :
range : <value-range> [ "/" <value-range> ... ]
value-range : "*" | <value> | ":" <max> | <min> ":" | <min> ":" <max> | <value> "," <value> "," ... "," <value> Construct from a simple ExpandedIdentifier. This implies that all fields will have their min=max=id[i]
Definition at line 1227 of file DetectorDescription/Identifier/src/Range.cxx.
void Range::add | ( | ) |
Add a wild card field.
Definition at line 1255 of file DetectorDescription/Identifier/src/Range.cxx.
Add a range specified using a field
Definition at line 1291 of file DetectorDescription/Identifier/src/Range.cxx.
void Range::add | ( | element_type | minimum, |
element_type | maximum | ||
) |
void Range::add | ( | element_type | value | ) |
Add a required value. (ie. low = high = value)
Definition at line 1261 of file DetectorDescription/Identifier/src/Range.cxx.
void Range::add | ( | field && | f | ) |
Add a range specified using a field, with move semantics.
Add a range specified using a field, using move semantics.
Definition at line 1297 of file DetectorDescription/Identifier/src/Range.cxx.
void Range::add | ( | Range && | subrange | ) |
Append a subrange, with move semantics.
Definition at line 1312 of file DetectorDescription/Identifier/src/Range.cxx.
void Range::add_maximum | ( | element_type | maximum | ) |
void Range::add_minimum | ( | element_type | minimum | ) |
void Range::build | ( | const ExpandedIdentifier & | root | ) |
Build a range from a single ExpandedIdentifier (see similar constructor for comment)
Definition at line 1242 of file DetectorDescription/Identifier/src/Range.cxx.
void Range::build | ( | const std::string & | text | ) |
Build a range from a textual description.
Definition at line 1234 of file DetectorDescription/Identifier/src/Range.cxx.
Range::size_type Range::cardinality | ( | ) | const |
Computes a possible cardinality :
Definition at line 1477 of file DetectorDescription/Identifier/src/Range.cxx.
Range::size_type Range::cardinalityUpTo | ( | const ExpandedIdentifier & | id | ) | const |
Get the cardinality from the beginning up to the given ExpandedIdentifier.
Definition at line 1497 of file DetectorDescription/Identifier/src/Range.cxx.
|
inline |
Get the cardinality from the beginning up to the given Identifier expanded into a int array.
Definition at line 703 of file DetectorDescription/Identifier/Identifier/Range.h.
void Range::clear | ( | ) |
Modifications.
Definition at line 1327 of file DetectorDescription/Identifier/src/Range.cxx.
Range::identifier_factory Range::factory_begin | ( | ) |
Identifier_factory management.
Definition at line 1713 of file DetectorDescription/Identifier/src/Range.cxx.
Range::const_identifier_factory Range::factory_begin | ( | ) | const |
Definition at line 1721 of file DetectorDescription/Identifier/src/Range.cxx.
Range::identifier_factory Range::factory_end | ( | ) |
Definition at line 1729 of file DetectorDescription/Identifier/src/Range.cxx.
Range::const_identifier_factory Range::factory_end | ( | ) | const |
Definition at line 1738 of file DetectorDescription/Identifier/src/Range.cxx.
|
inline |
Definition at line 669 of file DetectorDescription/Identifier/Identifier/Range.h.
|
inline |
Definition at line 690 of file DetectorDescription/Identifier/Identifier/Range.h.
int Range::match | ( | const ExpandedIdentifier & | id | ) | const |
ExpandedIdentifier Range::maximum | ( | ) | const |
Definition at line 1410 of file DetectorDescription/Identifier/src/Range.cxx.
ExpandedIdentifier Range::minimum | ( | ) | const |
min and max ExpandedIdentifiers
(if they exist, ie.
for fully bounded Ranges) Question : what if the Range has wild cards ??
Definition at line 1371 of file DetectorDescription/Identifier/src/Range.cxx.
Range::operator std::string | ( | ) | const |
Produce a textual representation of the range using the input format.
Definition at line 1661 of file DetectorDescription/Identifier/src/Range.cxx.
bool Range::operator!= | ( | const Range & | other | ) | const |
Definition at line 1705 of file DetectorDescription/Identifier/src/Range.cxx.
Assignment.
Definition at line 1193 of file DetectorDescription/Identifier/src/Range.cxx.
Definition at line 1201 of file DetectorDescription/Identifier/src/Range.cxx.
Definition at line 1690 of file DetectorDescription/Identifier/src/Range.cxx.
|
inline |
Check if two Ranges overlap.
Check overlap between two Ranges :
As soon as one pair of corresponding fields do not match, the global overlap is empty.
Definition at line 1601 of file DetectorDescription/Identifier/src/Range.cxx.
void Range::show | ( | ) | const |
Definition at line 1619 of file DetectorDescription/Identifier/src/Range.cxx.
void Range::show | ( | std::ostream & | s | ) | const |
Definition at line 1624 of file DetectorDescription/Identifier/src/Range.cxx.
|
private |
Definition at line 344 of file DetectorDescription/Identifier/Identifier/Range.h.