|
#include <slhaea.h>
|
template<class InputIterator > |
static InputIterator | find (InputIterator first, InputIterator last, const key_type &blockName) |
| Tries to locate a Block in a range. More...
|
|
template<class InputIterator > |
static InputIterator | find (InputIterator first, InputIterator last, const value_type::key_type &key) |
| Tries to locate a Block in a range. More...
|
|
static Coll | from_str (const std::string &coll) |
| Constructs a Coll with content from a string. More...
|
|
Container of Blocks that resembles a complete SLHA structure. This class is a container of Blocks that resembles a complete SLHA structure. Its name is an abbreviation of "collection" since it is a collection of Blocks. The elements of Coll objects can be accessed via their names (which are always compared case-insensitive) with the operator[]() and at() functions and access to single fields, Lines and Blocks via the Key type is provided by the field(), line() and block() functions. To fill this container, the functions read() or str() can be used which read data from an input stream or a string, respectively.
Definition at line 1613 of file slhaea.h.
◆ const_iterator
◆ const_pointer
◆ const_reference
◆ const_reverse_iterator
◆ difference_type
◆ impl_type
◆ iterator
◆ key_type
◆ pointer
◆ reference
◆ reverse_iterator
◆ size_type
◆ value_type
◆ Coll() [1/2]
◆ Coll() [2/2]
SLHAea::Coll::Coll |
( |
std::istream & |
is | ) |
|
|
inlineexplicit |
Constructs a Coll with content from an input stream.
- Parameters
-
is | Input stream to read content from. |
- See also
- read()
Definition at line 1645 of file slhaea.h.
References read().
◆ at() [1/4]
Locates a Block in the Coll.
- Parameters
-
blockName | Name of the Block to be located. |
- Returns
- Read/write reference to sought-after Block.
- Exceptions
-
std::out_of_range | If no Block with the name blockName exists. |
Definition at line 1742 of file slhaea.h.
References block(), end(), and find().
Referenced by block().
◆ at() [2/4]
Locates a Block in the Coll.
- Parameters
-
blockName | Name of the Block to be located. |
- Returns
- Read-only (constant) reference to sought-after Block.
- Exceptions
-
std::out_of_range | If no Block with the name blockName exists. |
Definition at line 1758 of file slhaea.h.
References block(), end(), and find().
◆ at() [3/4]
Locates a Block in the Coll.
- Parameters
-
key | First strings of the block definition of the Block to be located. |
- Returns
- Read/write reference to sought-after Block.
- Exceptions
-
std::out_of_range | If key does not match any block definition. |
This functions takes a vector of strings and locates the Block whose first strings of the block definition are equal to the strings in key . If no such Block exists, std::out_of_range is thrown.
Definition at line 1780 of file slhaea.h.
References block(), end(), and find().
◆ at() [4/4]
Locates a Block in the Coll.
- Parameters
-
key | First strings of the block definition of the Block to be located. |
- Returns
- Read-only (constant) reference to sought-after Block.
- Exceptions
-
std::out_of_range | If key does not match any block definition. |
This functions takes a vector of strings and locates the Block whose first strings of the block definition are equal to the strings in key . If no such Block exists, std::out_of_range is thrown.
Definition at line 1803 of file slhaea.h.
References block(), end(), and find().
◆ back() [1/2]
◆ back() [2/2]
Returns a read-only (constant) reference to the last element of the Coll.
Definition at line 1839 of file slhaea.h.
References impl_.
◆ begin() [1/2]
◆ begin() [2/2]
Returns a read-only (constant) iterator that points to the first element in the Coll. Iteration is done in ordinary element order.
Definition at line 1919 of file slhaea.h.
References impl_.
◆ block() [1/2]
Accesses a Block in the Coll.
- Parameters
-
key | Key that refers to the Block that should be accessed. |
- Returns
- Read/write reference to the Block referred to by
key .
- Exceptions
-
std::out_of_range | If key refers to a non-existing Block. |
Definition at line 2508 of file slhaea.h.
References at().
Referenced by at(), erase(), erase_first(), erase_if_empty(), erase_last(), insert(), line(), SLHAea::Coll::key_matches::operator()(), SLHAea::Coll::key_matches_block_def::operator()(), operator[](), push_back(), push_front(), and read().
◆ block() [2/2]
Accesses a Block in the Coll.
- Parameters
-
key | Key that refers to the Block that should be accessed. |
- Returns
- Read-only (constant) reference to the Block referred to by
key .
- Exceptions
-
std::out_of_range | If key refers to a non-existing Block. |
Definition at line 2512 of file slhaea.h.
References at().
◆ cbegin()
Returns a read-only (constant) iterator that points to the first element in the Coll. Iteration is done in ordinary element order.
Definition at line 1928 of file slhaea.h.
References impl_.
◆ cend()
Returns a read-only (constant) iterator that points one past the last element in the Coll. Iteration is done in ordinary element order.
Definition at line 1955 of file slhaea.h.
References impl_.
◆ clear()
void SLHAea::Coll::clear |
( |
| ) |
|
|
inline |
Erases all the elements in the Coll.
Definition at line 2323 of file slhaea.h.
References impl_.
Referenced by str().
◆ comment()
void SLHAea::Coll::comment |
( |
| ) |
|
|
inline |
◆ count()
Counts all Blocks with a given name.
- Parameters
-
blockName | Name of the Blocks that will be counted. |
- Returns
- Number of blocks whose name equals
blockName .
Definition at line 2120 of file slhaea.h.
References begin(), and end().
◆ crbegin()
Returns a read-only (constant) reverse iterator that points to the last element in the Coll. Iteration is done in reverse element order.
Definition at line 1981 of file slhaea.h.
References impl_.
◆ crend()
Returns a read-only (constant) reverse iterator that points to one before the first element in the Coll. Iteration is done in reverse element order.
Definition at line 2008 of file slhaea.h.
References impl_.
◆ empty()
bool SLHAea::Coll::empty |
( |
| ) |
const |
|
inline |
Returns true if the Coll is empty.
Definition at line 2136 of file slhaea.h.
References impl_.
◆ end() [1/2]
Returns a read/write iterator that points one past the last element in the Coll. Iteration is done in ordinary element order.
Definition at line 1937 of file slhaea.h.
References impl_.
Referenced by at(), comment(), count(), erase(), erase_first(), erase_if_empty(), erase_last(), find(), SLHAea::operator<(), SLHAea::operator<<(), SLHAea::operator==(), operator[](), reformat(), and uncomment().
◆ end() [2/2]
Returns a read-only (constant) iterator that points one past the last element in the Coll. Iteration is done in ordinary element order.
Definition at line 1946 of file slhaea.h.
References impl_.
◆ erase() [1/3]
Erases all Blocks with a given name.
- Parameters
-
blockName | Name of the Blocks to be erased. |
- Returns
- The number of Blocks erased.
Definition at line 2296 of file slhaea.h.
References begin(), block(), end(), and erase().
◆ erase() [2/3]
Erases a range of elements.
- Parameters
-
first | Iterator pointing to the first element to be erased. |
last | Iterator pointing to one past the last element to be erased. |
- Returns
- Iterator pointing to the element pointed to by
last prior to erasing (or end()).
This function erases the elements in the range [first , last ) and shortens the Coll accordingly.
Definition at line 2253 of file slhaea.h.
References impl_.
◆ erase() [3/3]
Erases element at given position .
- Parameters
-
position | Iterator pointing to the element to be erased. |
- Returns
- Iterator pointing to the next element (or end()).
This function erases the element at the given position and thus shortens the Coll by one.
Definition at line 2238 of file slhaea.h.
References impl_.
Referenced by erase(), erase_first(), erase_if_empty(), and erase_last().
◆ erase_first()
Erases first Block with a given name.
- Parameters
-
blockName | Name of the Block to be erased. |
- Returns
- Iterator pointing to the next element (or end()).
This function takes a key and erases the first Block whose name matches blockName . If the Coll contains such Block, the function returns an iterator pointing to the next element (or end()). If no such Block exists, end() is returned.
Definition at line 2267 of file slhaea.h.
References block(), end(), erase(), and find().
◆ erase_if_empty()
◆ erase_last()
Erases last Block with a given name.
- Parameters
-
blockName | Name of the Block to be erased. |
- Returns
- Iterator pointing to the next element (or end()).
This function takes a key and erases the last Block whose name matches blockName . If the Coll contains such Block, the function returns an iterator pointing to the next element (or end()). If no such Block exists, end() is returned.
Definition at line 2284 of file slhaea.h.
References block(), end(), erase(), find(), rbegin(), and rend().
◆ field() [1/2]
Accesses a single field in the Coll.
- Parameters
-
key | Key that refers to the field that should be accessed. |
- Returns
- Read/write reference to the field referred to by
key .
- Exceptions
-
std::out_of_range | If key refers to a non-existing field. |
Definition at line 2524 of file slhaea.h.
References SLHAea::Line::at(), and line().
◆ field() [2/2]
Accesses a single field in the Coll.
- Parameters
-
key | Key that refers to the field that should be accessed. |
- Returns
- Read-only (constant) reference to the field referred to by
key .
- Exceptions
-
std::out_of_range | If key refers to a non-existing field. |
Definition at line 2528 of file slhaea.h.
References SLHAea::Line::at(), and line().
◆ find() [1/6]
Tries to locate a Block in the Coll.
- Parameters
-
blockName | Name of the Block to be located. |
- Returns
- Read/write iterator pointing to sought-after element, or end() if not found.
This function takes a key and tries to locate the Block whose name matches blockName . If successful the function returns a read/write iterator pointing to the sought after Block. If unsuccessful it returns end().
Definition at line 2024 of file slhaea.h.
References begin(), end(), and flexiblesusy::meta::find_if().
Referenced by at(), erase_first(), erase_if_empty(), erase_last(), operator[](), flexiblesusy::SLHA_io::read_block(), flexiblesusy::SLHA_io::read_entry(), flexiblesusy::detail::read_matrix_(), flexiblesusy::SLHA_io::read_scale(), and flexiblesusy::detail::read_vector_().
◆ find() [2/6]
Tries to locate a Block in the Coll.
- Parameters
-
blockName | Name of the Block to be located. |
- Returns
- Read-only (constant) iterator pointing to sought-after element, or end() const if not found.
This function takes a key and tries to locate the Block whose name matches blockName . If successful the function returns a read-only (constant) iterator pointing to the sought after Block. If unsuccessful it returns end() const.
Definition at line 2039 of file slhaea.h.
References begin(), end(), and flexiblesusy::meta::find_if().
◆ find() [3/6]
Tries to locate a Block in the Coll.
- Parameters
-
key | First strings of the block definition of the Block to be located. |
- Returns
- Read/write iterator pointing to sought-after element, or end() if not found.
This functions takes a vector of strings and tries to locate the Block whose first strings of the block definition are equal to the strings in key . If successful the function returns a read/write iterator pointing to the sought after Block. If unsuccessful it returns end().
Definition at line 2073 of file slhaea.h.
References begin(), end(), and flexiblesusy::meta::find_if().
◆ find() [4/6]
Tries to locate a Block in the Coll.
- Parameters
-
key | First strings of the block definition of the Block to be located. |
- Returns
- Read-only (constant) iterator pointing to sought-after element, or end() const if not found.
This functions takes a vector of strings and tries to locate the Block whose first strings of the block definition are equal to the strings in key . If successful the function returns a read-only (constant) iterator pointing to the sought after Block. If unsuccessful it returns end() const.
Definition at line 2090 of file slhaea.h.
References begin(), end(), and flexiblesusy::meta::find_if().
◆ find() [5/6]
template<class InputIterator >
static InputIterator SLHAea::Coll::find |
( |
InputIterator |
first, |
|
|
InputIterator |
last, |
|
|
const key_type & |
blockName |
|
) |
| |
|
inlinestatic |
Tries to locate a Block in a range.
- Parameters
-
first,last | Input iterators to the initial and final positions in a sequence. |
blockName | Name of the Block to be located. |
- Returns
- Iterator pointing to sought-after element, or
last if not found.
This function tries to locate in the range [first , last ) the Block whose name matches blockName . If successful the function returns an iterator pointing to the sought after Block. If unsuccessful it returns last .
Definition at line 2056 of file slhaea.h.
References flexiblesusy::meta::find_if().
◆ find() [6/6]
template<class InputIterator >
static InputIterator SLHAea::Coll::find |
( |
InputIterator |
first, |
|
|
InputIterator |
last, |
|
|
const value_type::key_type & |
key |
|
) |
| |
|
inlinestatic |
Tries to locate a Block in a range.
- Parameters
-
first,last | Input iterators to the initial and final positions in a sequence. |
key | First strings of the block definition of the Block to be located. |
- Returns
- Iterator pointing to sought-after element, or
last if not found.
This function tries to locate in the range [first , last ) the Block whose first strings of the block definition are equal to the strings in key . If successful the function returns an iterator pointing to the sought after Block. If unsuccessful it returns last .
Definition at line 2109 of file slhaea.h.
References flexiblesusy::meta::find_if().
◆ from_str()
static Coll SLHAea::Coll::from_str |
( |
const std::string & |
coll | ) |
|
|
inlinestatic |
Constructs a Coll with content from a string.
- Parameters
-
coll | String to read content from. |
Definition at line 1653 of file slhaea.h.
References Coll().
◆ front() [1/2]
Returns a read/write reference to the first element of the Coll.
Definition at line 1816 of file slhaea.h.
References impl_.
◆ front() [2/2]
Returns a read-only (constant) reference to the first element of the Coll.
Definition at line 1824 of file slhaea.h.
References impl_.
◆ insert() [1/2]
Inserts a Block before given position .
- Parameters
-
position | Iterator into the Coll. |
block | Block to be inserted. |
- Returns
- Iterator pointing to the inserted element.
This function inserts a copy of block before the specified position and thus enlarges the Coll by one.
Definition at line 2212 of file slhaea.h.
References block(), and impl_.
◆ insert() [2/2]
template<class InputIterator >
void SLHAea::Coll::insert |
( |
iterator |
position, |
|
|
InputIterator |
first, |
|
|
InputIterator |
last |
|
) |
| |
|
inline |
Inserts a range into the Coll.
- Parameters
-
position | Iterator into the Coll. |
first,last | Input iterators to the initial and final positions in a sequence. |
This function inserts copies of the Blocks in the range [first , last ) into the Coll before the specified position and thus enlarges the Coll accordingly.
Definition at line 2226 of file slhaea.h.
References impl_.
◆ line() [1/2]
Accesses a single Line in the Coll.
- Parameters
-
key | Key that refers to the Line that should be accessed. |
- Returns
- Read/write reference to the Line referred to by
key .
- Exceptions
-
std::out_of_range | If key refers to a non-existing Line. |
Definition at line 2516 of file slhaea.h.
References SLHAea::Block::at(), and block().
Referenced by field(), and read().
◆ line() [2/2]
Accesses a single Line in the Coll.
- Parameters
-
key | Key that refers to the Line that should be accessed. |
- Returns
- Read-only (constant) reference to the Line referred to by
key .
- Exceptions
-
std::out_of_range | If key refers to a non-existing Line. |
Definition at line 2520 of file slhaea.h.
References SLHAea::Block::at(), and block().
◆ max_size()
◆ operator[]()
Locates a Block in the Coll.
- Parameters
-
blockName | Name of the Block to be located. |
- Returns
- Read/write reference to sought-after Block.
This function locates the first Block whose name equals blockName . If no such Block is present, an empty Block with this name is added to the end of the Coll and a reference to it is then returned.
Definition at line 1725 of file slhaea.h.
References back(), block(), end(), find(), and push_back().
◆ pop_back()
void SLHAea::Coll::pop_back |
( |
| ) |
|
|
inline |
Removes the last element. This function shrinks the size() of the Coll by one.
Definition at line 2199 of file slhaea.h.
References impl_.
◆ push_back() [1/2]
void SLHAea::Coll::push_back |
( |
const std::string & |
blockString | ) |
|
|
inline |
Adds a Block to the end of the Coll.
- Parameters
-
blockString | String that is used to construct the Block that will be added. |
This function creates an element at the end of the Coll and assigns the Block that is constructed from blockString to it.
Definition at line 2160 of file slhaea.h.
References block(), impl_, and SLHAea::Block::str().
◆ push_back() [2/2]
void SLHAea::Coll::push_back |
( |
const value_type & |
block | ) |
|
|
inline |
◆ push_back_named_block()
◆ push_front() [1/2]
void SLHAea::Coll::push_front |
( |
const std::string & |
blockString | ) |
|
|
inline |
Adds a Block to the begin of the Coll.
- Parameters
-
blockString | String that is used to construct the Block that will be added. |
This function creates an element at the begin of the Coll and assigns the Block that is constructed from blockString to it.
Definition at line 2187 of file slhaea.h.
References block(), impl_, and SLHAea::Block::str().
◆ push_front() [2/2]
void SLHAea::Coll::push_front |
( |
const value_type & |
block | ) |
|
|
inline |
Adds a Block to the begin of the Coll.
- Parameters
-
This function creates an element at the begin of the Coll and assigns the given block to it.
Definition at line 2175 of file slhaea.h.
References block(), and impl_.
◆ rbegin() [1/2]
Returns a read/write reverse iterator that points to the last element in the Coll. Iteration is done in reverse element order.
Definition at line 1963 of file slhaea.h.
References impl_.
Referenced by erase_last().
◆ rbegin() [2/2]
Returns a read-only (constant) reverse iterator that points to the last element in the Coll. Iteration is done in reverse element order.
Definition at line 1972 of file slhaea.h.
References impl_.
◆ read()
Coll & SLHAea::Coll::read |
( |
std::istream & |
is | ) |
|
|
inline |
Assigns content from an input stream to the Coll.
- Parameters
-
is | Input stream to read content from. |
- Returns
- Reference to
*this .
This function reads non-empty lines from is , transforms them into Lines, which are collected into the corresponding Blocks that are added to the Coll.
Definition at line 1669 of file slhaea.h.
References block(), erase_if_empty(), SLHAea::detail::is_all_whitespace(), SLHAea::Line::is_block_def(), line(), SLHAea::Block::push_back(), push_back_named_block(), size(), and SLHAea::Line::str().
Referenced by Coll(), SLHAea::operator>>(), and str().
◆ reformat()
void SLHAea::Coll::reformat |
( |
| ) |
|
|
inline |
◆ rend() [1/2]
Returns a read/write reverse iterator that points to one before the first element in the Coll. Iteration is done in reverse element order.
Definition at line 1990 of file slhaea.h.
References impl_.
Referenced by erase_last().
◆ rend() [2/2]
Returns a read-only (constant) reverse iterator that points to one before the first element in the Coll. Iteration is done in reverse element order.
Definition at line 1999 of file slhaea.h.
References impl_.
◆ size()
◆ str() [1/2]
std::string SLHAea::Coll::str |
( |
| ) |
const |
|
inline |
Returns a string representation of the Coll.
Definition at line 1706 of file slhaea.h.
◆ str() [2/2]
Coll & SLHAea::Coll::str |
( |
const std::string & |
coll | ) |
|
|
inline |
Assigns content from a string to the Coll.
- Parameters
-
coll | String that is used as content for the Coll. |
- Returns
- Reference to
*this .
Definition at line 1696 of file slhaea.h.
References clear(), and read().
◆ swap()
void SLHAea::Coll::swap |
( |
Coll & |
coll | ) |
|
|
inline |
Swaps data with another Coll.
- Parameters
-
coll | Coll to be swapped with. |
Definition at line 2318 of file slhaea.h.
References impl_.
◆ uncomment()
void SLHAea::Coll::uncomment |
( |
| ) |
|
|
inline |
◆ impl_
Definition at line 2412 of file slhaea.h.
Referenced by back(), begin(), cbegin(), cend(), clear(), crbegin(), crend(), empty(), end(), erase(), front(), insert(), max_size(), pop_back(), push_back(), push_front(), rbegin(), rend(), size(), and swap().
The documentation for this class was generated from the following file:
|