Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooStringView Class Reference

The RooStringView is a wrapper around a C-syle string that can also be constructed from a std::string or a Tstring.

As such, it serves as a drop-in replacement for const char* in public RooFit interfaces, keeping the possibility to pass a C-style string without copying but also accepting a std::string.

Definition at line 27 of file RooStringView.h.

Public Member Functions

 RooStringView (const char *str)
 
 RooStringView (std::string &&str)
 
 RooStringView (std::string const &str)
 
 RooStringView (TString const &str)
 
 operator const char * ()
 

Private Attributes

const char * _cstr
 
std::shared_ptr< std::string > _strp
 

#include <RooStringView.h>

Constructor & Destructor Documentation

◆ RooStringView() [1/4]

RooStringView::RooStringView ( const char *  str)
inline

Definition at line 29 of file RooStringView.h.

◆ RooStringView() [2/4]

RooStringView::RooStringView ( TString const &  str)
inline

Definition at line 30 of file RooStringView.h.

◆ RooStringView() [3/4]

RooStringView::RooStringView ( std::string const &  str)
inline

Definition at line 31 of file RooStringView.h.

◆ RooStringView() [4/4]

RooStringView::RooStringView ( std::string &&  str)
inline

Definition at line 33 of file RooStringView.h.

Member Function Documentation

◆ operator const char *()

RooStringView::operator const char * ( )
inline

Definition at line 34 of file RooStringView.h.

Member Data Documentation

◆ _cstr

const char* RooStringView::_cstr
private

Definition at line 39 of file RooStringView.h.

◆ _strp

std::shared_ptr<std::string> RooStringView::_strp
private

Definition at line 38 of file RooStringView.h.

Libraries for RooStringView:

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