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 21 of file ThreadSafeStringCut.h.

22  : func_(expr)
23  , expr_(expr)
24  {}
const std::string expr_
template<class F, class T>
ThreadSafeStringCut< F, T >::ThreadSafeStringCut ( ThreadSafeStringCut< F, T > &&  other)
inline

Definition at line 26 of file ThreadSafeStringCut.h.

27  : func_(std::move(other.func_))
28  , expr_(std::move(other.expr_))
29  {}
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 31 of file ThreadSafeStringCut.h.

32  {
33  std::lock_guard<std::mutex> guard(mutex_);
34  return func_(t);
35  }

Member Data Documentation

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

Definition at line 40 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