NANDRAD Data Model Library
Version 2.0
NANDRAD
|
An IDGroup references one or more IDs and handles the encoding/decoding of an IDGroup-string.
Definition at line 47 of file NANDRAD_IDGroup.h.
#include <NANDRAD_IDGroup.h>
Public Member Functions | |
void | setEncodedString (const std::string &encodedString) |
Set ID group data from an encoded string. More... | |
std::string | encodedString () const |
Encode ID group data into a string representation. More... | |
bool | empty () const |
Returns true if neither the wildcard flag m_allIDs is set, nor any IDs are specified in m_ids or m_idIntervals. More... | |
bool | contains (unsigned int id) const |
Returns true if either the wildcard flag m_allIDs is set, or the id is in m_ids or enclosed in m_idIntervals. | |
const IDGroup | operator+ (const IDGroup &) |
Merges two id groups. More... | |
bool | operator== (const IDGroup &other) const |
Comparison operator by value. More... | |
bool | operator!= (const IDGroup &other) const |
Not-equal comparison operator by value. More... | |
Public Attributes | |
bool | m_allIDs = false |
If true, the encoded string containted a wildcard character * to indicate all IDs. More... | |
std::set< unsigned int > | m_ids |
Set of individually listed IDs. More... | |
std::vector< std::pair< unsigned int, unsigned int > > | m_idIntervals |
Model id intervals. More... | |
void NANDRAD::IDGroup::setEncodedString | ( | const std::string & | encodedString | ) |
Set ID group data from an encoded string.
This function throws an exception, if an invalid format is encountered or IDs are specified in addition to a wildcard character.
std::string NANDRAD::IDGroup::encodedString | ( | ) | const |
Encode ID group data into a string representation.
bool NANDRAD::IDGroup::empty | ( | ) | const |
Returns true if neither the wildcard flag m_allIDs is set, nor any IDs are specified in m_ids or m_idIntervals.
|
inline |
Comparison operator by value.
Definition at line 72 of file NANDRAD_IDGroup.h.
bool NANDRAD::IDGroup::operator!= | ( | const IDGroup & | other | ) | const |
Not-equal comparison operator by value.
bool NANDRAD::IDGroup::m_allIDs = false |
If true, the encoded string containted a wildcard character * to indicate all IDs.
Definition at line 82 of file NANDRAD_IDGroup.h.
std::set<unsigned int> NANDRAD::IDGroup::m_ids |
Set of individually listed IDs.
Definition at line 84 of file NANDRAD_IDGroup.h.
std::vector<std::pair<unsigned int, unsigned int> > NANDRAD::IDGroup::m_idIntervals |
Model id intervals.
Definition at line 86 of file NANDRAD_IDGroup.h.