pmt: add [] operators to Map_t and builder
This commit is contained in:
@@ -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).
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user