MVault 0.0.1
Loading...
Searching...
No Matches
Public Member Functions | List of all members
mvlt::DataMultiMap Class Reference

Specialization of class DataContainer, used as a type std::multimap<std::string, DataSaver> More...

#include <DataContainer.h>

Inheritance diagram for mvlt::DataMultiMap:
Inheritance graph
[legend]
Collaboration diagram for mvlt::DataMultiMap:
Collaboration graph
[legend]

Public Member Functions

std::pair< DataContainer::const_iterator, DataContainer::const_iteratorGetAllData (const std::string &key) const noexcept
 A function for searching for multiple elements with the same keys.
 
- Public Member Functions inherited from mvlt::DataContainer< std::multimap< std::string, DataSaver > >
iterator begin () noexcept
 Begin provides access to the Data iterator.
 
const_iterator cbegin () const noexcept
 Cbegin provides access to the Data const_iterator.
 
iterator end () noexcept
 End provides access to the Data iterator.
 
const_iterator cend () const noexcept
 Cend provides access to the Data const_iterator.
 
void AddData (const std::string &key, const T &data) noexcept
 Template method for adding a new data to the container.
 
void AddData (const std::string &key, const T &data, F &&deleteFunc) noexcept
 Template method for adding a new data to the container and a function to delete this data.
 
void AddDataFromDataSaver (const std::string &key, const DataSaver &dataSaver) noexcept
 Method for adding a new data to the container.
 
void SetData (const std::string &key, const T &data) noexcept
 Method for changing the value of a data inside a container using a key.
 
void SetData (const std::string &key, const T &data, F &&deleteFunc) noexcept
 Method for changing the value of a data inside a container using a key.
 
void SetDataFromDataSaver (const std::string &key, const DataSaver &dataSaver) noexcept
 Method for changing the value of a data inside a container using a key.
 
bool SetDataFromString (const std::string &key, const std::string &str) noexcept
 Method for setting data by key.
 
bool GetData (const std::string &key, T &data) const noexcept
 Method for getting data from a container using a key.
 
bool GetDataSaver (const std::string &key, DataSaver &dataSaver) const noexcept
 Method for getting dataSaver from a container using a key.
 
bool GetDataAsString (const std::string &key, std::string &str) const noexcept
 Method for getting data converted to string from a container using a key.
 
bool IsData (const std::string &key) const noexcept
 A method for checking whether data with such a key is in the container.
 
void EraseData (const std::string &key) noexcept
 Function for erasing data from a container.
 
void Clear () noexcept
 Method for clear all data inside container.
 
std::size_t Size () const noexcept
 Method for getting the container size.
 

Additional Inherited Members

- Public Types inherited from mvlt::DataContainer< std::multimap< std::string, DataSaver > >
typedef C::iterator iterator
 Redefine iterator from C container.
 
typedef C::const_iterator const_iterator
 Redefine const_iterator from C container.
 
- Protected Attributes inherited from mvlt::DataContainer< std::multimap< std::string, DataSaver > >
std::multimap< std::string, DataSaverContainer
 Container to store all data inside C container.
 

Detailed Description

Specialization of class DataContainer, used as a type std::multimap<std::string, DataSaver>

Member Function Documentation

◆ GetAllData()

std::pair< DataContainer::const_iterator, DataContainer::const_iterator > mvlt::DataMultiMap::GetAllData ( const std::string &  key) const
inlinenoexcept

A function for searching for multiple elements with the same keys.

Wrapper over std::unordered_multimap<std::string, DataSaver>::equal_range

Parameters
[in]keykey to find in container
Returns
pair of iterators. The first iterator points to the first element with the same key, and the second to the last element

The documentation for this class was generated from the following file: