Doxygen
Loading...
Searching...
No Matches
MemberNameLinkedMap Class Reference

Ordered dictionary of MemberName objects. More...

#include <src/membername.h>

+ Inheritance diagram for MemberNameLinkedMap:
+ Collaboration diagram for MemberNameLinkedMap:

Public Member Functions

MemberName::Ptr take (const QCString &key, const MemberDef *value)
 
- Public Member Functions inherited from LinkedMap< MemberName >
const MemberNamefind (const std::string &key) const
 Find an object given the key.
 
const MemberNamefind (const QCString &key) const
 Find an object given the key.
 
const MemberNamefind (const char *key) const
 Find an object given the key.
 
MemberNamefind (const char *key)
 A non-const wrapper for find() const.
 
MemberNamefind (const QCString &key)
 A non-const wrapper for find() const.
 
MemberNamefind (const std::string &key)
 A non-const wrapper for find() const.
 
MemberNameadd (const char *k, Args &&... args)
 Adds a new object to the ordered vector if it was not added already.
 
MemberNameadd (const QCString &k, Args &&... args)
 
MemberNameadd (const char *k, Ptr &&ptr)
 Adds an existing object to the ordered vector (unless another object was already added under the same key).
 
MemberNameadd (const QCString &k, Ptr &&ptr)
 
MemberNameprepend (const char *k, Args &&... args)
 Prepends a new object to the ordered vector if it was not added already.
 
MemberNameprepend (const QCString &key, Args &&... args)
 
bool del (const QCString &key)
 Removes an object from the container and deletes it.
 
Ptroperator[] (size_t pos)
 
const Ptroperator[] (size_t pos) const
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
reverse_iterator rbegin ()
 
const_reverse_iterator rbegin () const
 
reverse_iterator rend ()
 
const_reverse_iterator rend () const
 
bool empty () const
 
size_t size () const
 
void clear ()
 

Additional Inherited Members

- Public Types inherited from LinkedMap< MemberName >
using Ptr
 
using Vec
 
using iterator
 
using const_iterator
 
using reverse_iterator
 
using const_reverse_iterator
 

Detailed Description

Ordered dictionary of MemberName objects.

Definition at line 62 of file membername.h.

Member Function Documentation

◆ take()

MemberName::Ptr MemberNameLinkedMap::take ( const QCString & key,
const MemberDef * value )
inline

Definition at line 65 of file membername.h.

66 {
67 MemberName::Ptr result;
68 MemberName *mn = find(key);
69 if (mn)
70 {
71 auto it = std::find_if(mn->begin(),mn->end(),[&value](const auto &el) { return el.get()==value; });
72 if (it != mn->end())
73 {
74 it->swap(result);
75 mn->erase(it);
76 }
77 if (mn->empty())
78 {
79 del(key);
80 }
81 }
82 return result;
83 }
bool del(const QCString &key)
Definition linkedmap.h:183
const MemberName * find(const std::string &key) const
Definition linkedmap.h:47
iterator erase(iterator it)
Definition membername.h:53
std::unique_ptr< MemberDef > Ptr
Definition membername.h:27
bool empty() const
Definition membername.h:47
iterator begin()
Definition membername.h:37
iterator end()
Definition membername.h:38

References MemberName::begin(), LinkedMap< MemberName >::del(), MemberName::empty(), MemberName::end(), MemberName::erase(), and LinkedMap< MemberName >::find().


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