CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
ThreadSafeStringCut< F, T > Class Template Reference

#include <ThreadSafeStringCut.h>

Public Member Functions

std::invoke_result_t< F, Toperator() (const T &t) const
 
 ThreadSafeStringCut (const std::string &expr)
 
 ThreadSafeStringCut (ThreadSafeStringCut &&other)
 

Private Attributes

const std::string expr_
 
const F func_
 
std::mutex mutex_
 

Detailed Description

template<class F, class T>
class ThreadSafeStringCut< F, T >

Definition at line 17 of file ThreadSafeStringCut.h.

Constructor & Destructor Documentation

template<class F, class T>
ThreadSafeStringCut< F, T >::ThreadSafeStringCut ( const std::string &  expr)
inline

Definition at line 19 of file ThreadSafeStringCut.h.

template<class F, class T>
ThreadSafeStringCut< F, T >::ThreadSafeStringCut ( ThreadSafeStringCut< F, T > &&  other)
inline

Definition at line 22 of file ThreadSafeStringCut.h.

23  : func_(std::move(other.func_)), expr_(std::move(other.expr_)) {}
const std::string expr_
def move(src, dest)
Definition: eostools.py:511

Member Function Documentation

template<class F, class T>
std::invoke_result_t<F, T> ThreadSafeStringCut< F, T >::operator() ( const T t) const
inline

Definition at line 25 of file ThreadSafeStringCut.h.

25  {
26  std::lock_guard<std::mutex> guard(mutex_);
27  return func_(t);
28  }

Member Data Documentation

template<class F, class T>
const std::string ThreadSafeStringCut< F, T >::expr_
private

Definition at line 32 of file ThreadSafeStringCut.h.

template<class F, class T>
const F ThreadSafeStringCut< F, T >::func_
private
template<class F, class T>
std::mutex ThreadSafeStringCut< F, T >::mutex_
mutableprivate