proxygen
folly::symbolizer::SignalSafeElfCache::Path Class Reference
Inheritance diagram for folly::symbolizer::SignalSafeElfCache::Path:

Public Member Functions

 Path ()
 
 Path (StringPiece s)
 
void assign (StringPiece s)
 
bool operator< (const Path &other) const
 
bool operator== (const Path &other) const
 
const char * data () const
 

Static Public Attributes

static constexpr size_t kMaxSize = PATH_MAX - 1
 

Private Attributes

char data_ [kMaxSize+1]
 

Detailed Description

Definition at line 72 of file ElfCache.h.

Constructor & Destructor Documentation

folly::symbolizer::SignalSafeElfCache::Path::Path ( )
inline

Definition at line 74 of file ElfCache.h.

folly::symbolizer::SignalSafeElfCache::Path::Path ( StringPiece  s)
inlineexplicit

Definition at line 78 of file ElfCache.h.

78  {
79  assign(s);
80  }
static set< string > s

Member Function Documentation

void folly::symbolizer::SignalSafeElfCache::Path::assign ( StringPiece  s)
inline

Definition at line 82 of file ElfCache.h.

References folly::Range< Iter >::data(), data_, folly::Range< Iter >::empty(), and folly::Range< Iter >::size().

Referenced by folly::symbolizer::SignalSafeElfCache::getFile().

82  {
83  DCHECK_LE(s.size(), kMaxSize);
84  if (!s.empty()) {
85  memcpy(data_, s.data(), s.size());
86  }
87  data_[s.size()] = '\0';
88  }
static set< string > s
const char* folly::symbolizer::SignalSafeElfCache::Path::data ( ) const
inline

Definition at line 98 of file ElfCache.h.

References data_.

Referenced by folly::symbolizer::SignalSafeElfCache::getFile().

98  {
99  return data_;
100  }
bool folly::symbolizer::SignalSafeElfCache::Path::operator< ( const Path other) const
inline

Definition at line 90 of file ElfCache.h.

References data_, and data_.

90  {
91  return strcmp(data_, other.data_) < 0;
92  }
bool folly::symbolizer::SignalSafeElfCache::Path::operator== ( const Path other) const
inline

Definition at line 94 of file ElfCache.h.

References data_, and data_.

94  {
95  return strcmp(data_, other.data_) == 0;
96  }

Member Data Documentation

char folly::symbolizer::SignalSafeElfCache::Path::data_[kMaxSize+1]
private

Definition at line 105 of file ElfCache.h.

Referenced by operator<(), and operator==().

constexpr size_t folly::symbolizer::SignalSafeElfCache::Path::kMaxSize = PATH_MAX - 1
static

Definition at line 102 of file ElfCache.h.

Referenced by folly::symbolizer::SignalSafeElfCache::getFile().


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