 |
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef IDDICT_IdDictGroup_H
6 #define IDDICT_IdDictGroup_H
44 const std::string&
name()
const;
55 const std::vector<IdDictRegion*>&
regions();
67 const std::string&
tag =
"");
87 std::vector<const IdDictFieldImplementation*>* impls =
nullptr)
const;
123 std::vector<std::unique_ptr<IdDictDictEntry> >
m_entries;
202 std::unique_ptr<std::vector<const IdDictFieldImplementation*> >
m_other_impls;
217 static constexpr
unsigned END =
static_cast<unsigned> (-1);
std::vector< IdDictRegion * > m_regions
IdDictGroup & operator=(const IdDictGroup &)=delete
std::vector< std::unique_ptr< IdDictDictEntry > > m_entries
const std::string & name() const
void dump_tree() const
Dump the tree structure built from the regions for fast unpacking.
void generate_implementation(const IdDictMgr &idd, IdDictDictionary &dictionary, const std::string &tag="")
const IdDictRegion & region(size_t index) const
void build_region_tree()
Take the list of regions and build a tree structure for fast unpacking.
const IdDictFieldImplementation & m_impl
Reference to the the implementation field.
void add_dictentry(std::unique_ptr< IdDictDictEntry > entry)
MultiRange build_multirange() const
Get MultiRange for this group.
int unpack(const Identifier &id, const ExpandedIdentifier &prefix, size_t index2, ExpandedIdentifier &unpackedId, std::vector< const IdDictFieldImplementation * > *impls=nullptr) const
Unpack the value_type id to an expanded Identifier, considering the provided prefix (result will incl...
IdDictRegionTreeNode(const IdDictFieldImplementation &impl)
Constructor, taking a reference to the implementation.
const std::vector< IdDictRegion * > & regions()
Non-const access to regions.
IdDictGroup(const IdDictGroup &)=delete
std::vector< IdDictRegionTreeNode > m_region_tree
The list of region nodes.
static constexpr unsigned END
Special value used to indicate that we've reached the end.
A MultiRange combines several Ranges.
Tree structure for fast unpacking.
void optimize()
Compress the vector of node indices, if they are all the same.
void resolve_references(IdDictMgr &idd, IdDictDictionary &dictionary, size_t &index)
std::variant< std::vector< unsigned >, ChildPair > m_children
void reset_implementation()
bool m_generated_implementation
void add_tree_field(const IdDictRegion &re, unsigned ifield, unsigned inode)
Recursively add new nodes to the tree structure.
const boost::regex re(r_e)
IdDictFieldImplementation is used to capture the specification of a single field of an Identifier.
std::unique_ptr< std::vector< const IdDictFieldImplementation * > > m_other_impls
Implementations for other field descriptions that this ored field of the identifier may contain.
void dump_regions() const
Dump the list of regions for this group.
std::pair< size_t, unsigned > ChildPair
References to child nodes.
void dump() const
Dump regions and tree for this group.