Public Member Functions | Private Member Functions | Private Attributes | List of all members
movie_publisher::StackGuard Class Reference

RAII guard saving a function call to stack. Can be used to protect against infinite recursion. More...

#include <metadata_manager.h>

Public Member Functions

 StackGuard (decltype(MetadataManager::callStack)&stack, const std::string &fn, const MetadataExtractor *extractor)
 Constructor. More...
 
 ~StackGuard ()
 

Private Member Functions

std::string getStackDescription () const
 Get a human-readable representation of the whole call stack. More...
 

Private Attributes

const MetadataExtractorextractor
 The extractor that calls the function. More...
 
std::string fn
 The called function. More...
 
decltype(MetadataManager::callStack) & stack
 The stack to operate on. More...
 

Detailed Description

RAII guard saving a function call to stack. Can be used to protect against infinite recursion.

Definition at line 182 of file metadata_manager.h.

Constructor & Destructor Documentation

◆ StackGuard()

movie_publisher::StackGuard::StackGuard ( decltype(MetadataManager::callStack)&  stack,
const std::string &  fn,
const MetadataExtractor extractor 
)

Constructor.

Parameters
[in]stackThe stack where this guard should be recorded.
[in]fnThe called function.
[in]extractorThe extractor that calls the function.

◆ ~StackGuard()

movie_publisher::StackGuard::~StackGuard ( )

Member Function Documentation

◆ getStackDescription()

std::string movie_publisher::StackGuard::getStackDescription ( ) const
private

Get a human-readable representation of the whole call stack.

Member Data Documentation

◆ extractor

const MetadataExtractor* movie_publisher::StackGuard::extractor
private

The extractor that calls the function.

Definition at line 197 of file metadata_manager.h.

◆ fn

std::string movie_publisher::StackGuard::fn
private

The called function.

Definition at line 196 of file metadata_manager.h.

◆ stack

decltype(MetadataManager::callStack) & movie_publisher::StackGuard::stack
private

The stack to operate on.

Definition at line 195 of file metadata_manager.h.


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


movie_publisher
Author(s): Martin Pecka
autogenerated on Wed May 28 2025 02:07:22