libabigail
Public Member Functions | List of all members
filtered_symtab Class Reference

Helper class to allow range-for loops on symtabs for C++11 and later code. It serves as a proxy for the symtab iterator and provides a begin() method without arguments, as required for range-for loops (and possibly other iterator based transformations). More...

#include <abg-symtab-reader.h>

Public Member Functions

 filtered_symtab (const symtab &tab, const symtab_filter &filter)
 Construct the proxy object keeping references to the underlying symtab and the filter object. More...
 
symtab::const_iterator begin () const
 Pass through symtab.begin(), but also pass on the filter. More...
 
symtab::const_iterator end () const
 Pass through symtab.end(). More...
 

Detailed Description

Helper class to allow range-for loops on symtabs for C++11 and later code. It serves as a proxy for the symtab iterator and provides a begin() method without arguments, as required for range-for loops (and possibly other iterator based transformations).

Example usage:

for (const auto& symbol : filtered_symtab(tab, filter)) { std::cout << symbol->get_name() << "\n"; }

Definition at line 356 of file abg-symtab-reader.h.

Constructor & Destructor Documentation

◆ filtered_symtab()

filtered_symtab ( const symtab tab,
const symtab_filter filter 
)
inline

Construct the proxy object keeping references to the underlying symtab and the filter object.

Definition at line 364 of file abg-symtab-reader.h.

Member Function Documentation

◆ begin()

symtab::const_iterator begin ( ) const
inline

Pass through symtab.begin(), but also pass on the filter.

Definition at line 370 of file abg-symtab-reader.h.

◆ end()

symtab::const_iterator end ( ) const
inline

Pass through symtab.end().

Definition at line 375 of file abg-symtab-reader.h.


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