pmt: add [] operators to Map_t and builder

This commit is contained in:
2025-09-07 10:53:59 +03:00
parent ab35740fb6
commit 1984825dec
3 changed files with 35 additions and 0 deletions

View File

@@ -84,6 +84,9 @@ public:
bool operator==(const basic_partition_map &other) const;
bool operator!=(const basic_partition_map &other) const;
Info operator[](int index) const;
BasicInf operator[](const std::string_view& name) const;
operator std::vector<Info>() const;
operator int() const;
@@ -350,6 +353,16 @@ public:
*/
const Map_t &operator*() const;
/**
* Get Info structure with given index
*/
Info operator[](int index) const;
/**
* Get BasicInfo structure with given index
*/
BasicInf operator[](const std::string_view& name) const;
/**
* Get map contents as vector (PartitionManager::Info type).
*/