ATLAS Offline Software
Loading...
Searching...
No Matches
IdDictAltRegions.h
Go to the documentation of this file.
1 /*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef IDDICT_IdDictAltRegions_H
6#define IDDICT_IdDictAltRegions_H
7
9
10#include <string>
11#include <string_view>
12#include <map>
13#include <memory>
14
15class Range;
16class IdDictMgr;
18class IdDictRegion;
19
20
21
23public:
24 // ==================================
25 //** @name Constructor/destructor
26 // @{
27
30
31
33 // ==================================
34 //** @name Simple accessors.
35 // @{
36
38 virtual std::string group_name () const override;
39
42
43
45 // ==================================
46 //** @name Methods used to initialize the object.
47 // @{
48
50 void add_region (std::unique_ptr<IdDictRegion> region);
51
53 void select_region (const std::string& name);
54
55
56 virtual void set_index (size_t index) override;
57 virtual Range build_range () const override;
58 virtual void resolve_references (IdDictMgr& idd,
59 IdDictDictionary& dictionary) override;
60 virtual void generate_implementation (const IdDictMgr& idd,
61 IdDictDictionary& dictionary,
62 std::string_view tag = "") override;
63 virtual void reset_implementation () override;
64 virtual bool verify () const override;
65 virtual void clear () override;
66
67
69
70
71private:
72 using map_type = std::map<std::string, std::unique_ptr<IdDictRegion>, std::less<> >;
73 using map_iterator = map_type::iterator;
74 using value_type = map_type::value_type;
75
78};
79
80
82inline
87
88
89#endif
void select_region(const std::string &name)
Select the named region.
IdDictRegion * m_selected_region
void add_region(std::unique_ptr< IdDictRegion > region)
Add a new region, with key given by the tag.
virtual void clear() override
virtual void generate_implementation(const IdDictMgr &idd, IdDictDictionary &dictionary, std::string_view tag="") override
virtual void set_index(size_t index) override
virtual void resolve_references(IdDictMgr &idd, IdDictDictionary &dictionary) override
map_type::iterator map_iterator
virtual Range build_range() const override
virtual ~IdDictAltRegions()
IdDictRegion * selected_region()
Currently selected region.
virtual void reset_implementation() override
map_type::value_type value_type
std::map< std::string, std::unique_ptr< IdDictRegion >, std::less<> > map_type
virtual bool verify() const override
virtual std::string group_name() const override
Group name for this region.
A Range describes the possible ranges for the field values of an ExpandedIdentifier.
Definition index.py:1