Public Types | Public Member Functions | Public Attributes | Static Public Attributes | Static Private Member Functions | Private Attributes | List of all members
google::protobuf::StringPiece Class Reference

#include <stringpiece.h>

Public Types

typedef std::reverse_iterator< const_iteratorconst_reverse_iterator
 
typedef ptrdiff_t difference_type
 
typedef std::reverse_iterator< iteratorreverse_iterator
 
typedef size_t size_type
 
typedef char value_type
 

Public Member Functions

void AppendToString (string *target) const
 
string as_string () const
 
iterator begin () const
 
stringpiece_ssize_type capacity () const
 
void clear ()
 
int compare (StringPiece x) const
 
bool Consume (StringPiece x)
 
bool ConsumeFromEnd (StringPiece x)
 
bool contains (StringPiece s) const
 
stringpiece_ssize_type copy (char *buf, size_type n, size_type pos=0) const
 
void CopyToString (string *target) const
 
const char * data () const
 
bool empty () const
 
iterator end () const
 
bool ends_with (StringPiece x) const
 
stringpiece_ssize_type find (char c, size_type pos=0) const
 
stringpiece_ssize_type find (StringPiece s, size_type pos=0) const
 
stringpiece_ssize_type find_first_not_of (char c, size_type pos=0) const
 
stringpiece_ssize_type find_first_not_of (StringPiece s, size_type pos=0) const
 
stringpiece_ssize_type find_first_of (char c, size_type pos=0) const
 
stringpiece_ssize_type find_first_of (StringPiece s, size_type pos=0) const
 
stringpiece_ssize_type find_last_not_of (char c, size_type pos=npos) const
 
stringpiece_ssize_type find_last_not_of (StringPiece s, size_type pos=npos) const
 
stringpiece_ssize_type find_last_of (char c, size_type pos=npos) const
 
stringpiece_ssize_type find_last_of (StringPiece s, size_type pos=npos) const
 
stringpiece_ssize_type length () const
 
stringpiece_ssize_type max_size () const
 
 operator string () const
 
char operator[] (stringpiece_ssize_type i) const
 
const_reverse_iterator rbegin () const
 
void remove_prefix (stringpiece_ssize_type n)
 
void remove_suffix (stringpiece_ssize_type n)
 
const_reverse_iterator rend () const
 
stringpiece_ssize_type rfind (char c, size_type pos=npos) const
 
stringpiece_ssize_type rfind (StringPiece s, size_type pos=npos) const
 
void set (const char *data, stringpiece_ssize_type len)
 
void set (const char *str)
 
void set (const void *data, stringpiece_ssize_type len)
 
stringpiece_ssize_type size () const
 
bool starts_with (StringPiece x) const
 
 StringPiece ()
 
 StringPiece (const char *offset, stringpiece_ssize_type len)
 
 StringPiece (const char *str)
 
template<class Allocator >
 StringPiece (const std::basic_string< char, std::char_traits< char >, Allocator > &str)
 
 StringPiece (StringPiece x, stringpiece_ssize_type pos)
 
 StringPiece (StringPiece x, stringpiece_ssize_type pos, stringpiece_ssize_type len)
 
StringPiece substr (size_type pos, size_type n=npos) const
 
string ToString () const
 

Public Attributes

const typedef char * const_iterator
 
const typedef char & const_reference
 
const typedef char * iterator
 
const typedef char * pointer
 
const typedef char & reference
 

Static Public Attributes

static const size_type npos = size_type(-1)
 

Static Private Member Functions

static stringpiece_ssize_type CheckedSsizeTFromSizeT (size_t size)
 
static void LogFatalSizeTooBig (size_t size, const char *details)
 

Private Attributes

stringpiece_ssize_type length_
 
const char * ptr_
 

Detailed Description

Definition at line 180 of file stringpiece.h.

Member Typedef Documentation

◆ const_reverse_iterator

Definition at line 353 of file stringpiece.h.

◆ difference_type

Definition at line 349 of file stringpiece.h.

◆ reverse_iterator

Definition at line 354 of file stringpiece.h.

◆ size_type

Definition at line 348 of file stringpiece.h.

◆ value_type

Definition at line 344 of file stringpiece.h.

Constructor & Destructor Documentation

◆ StringPiece() [1/6]

google::protobuf::StringPiece::StringPiece ( )
inline

Definition at line 212 of file stringpiece.h.

◆ StringPiece() [2/6]

google::protobuf::StringPiece::StringPiece ( const char *  str)
inline

Definition at line 214 of file stringpiece.h.

◆ StringPiece() [3/6]

template<class Allocator >
google::protobuf::StringPiece::StringPiece ( const std::basic_string< char, std::char_traits< char >, Allocator > &  str)
inline

Definition at line 222 of file stringpiece.h.

◆ StringPiece() [4/6]

google::protobuf::StringPiece::StringPiece ( const char *  offset,
stringpiece_ssize_type  len 
)
inline

Definition at line 228 of file stringpiece.h.

◆ StringPiece() [5/6]

google::protobuf::StringPiece::StringPiece ( StringPiece  x,
stringpiece_ssize_type  pos 
)

Definition at line 52 of file stringpiece.cc.

◆ StringPiece() [6/6]

google::protobuf::StringPiece::StringPiece ( StringPiece  x,
stringpiece_ssize_type  pos,
stringpiece_ssize_type  len 
)

Definition at line 58 of file stringpiece.cc.

Member Function Documentation

◆ AppendToString()

void google::protobuf::StringPiece::AppendToString ( string target) const

Definition at line 71 of file stringpiece.cc.

◆ as_string()

string google::protobuf::StringPiece::as_string ( ) const
inline

Definition at line 305 of file stringpiece.h.

◆ begin()

iterator google::protobuf::StringPiece::begin ( ) const
inline

Definition at line 355 of file stringpiece.h.

◆ capacity()

stringpiece_ssize_type google::protobuf::StringPiece::capacity ( ) const
inline

Definition at line 364 of file stringpiece.h.

◆ CheckedSsizeTFromSizeT()

static stringpiece_ssize_type google::protobuf::StringPiece::CheckedSsizeTFromSizeT ( size_t  size)
inlinestaticprivate

Definition at line 187 of file stringpiece.h.

◆ clear()

void google::protobuf::StringPiece::clear ( )
inline

Definition at line 252 of file stringpiece.h.

◆ compare()

int google::protobuf::StringPiece::compare ( StringPiece  x) const
inline

Definition at line 294 of file stringpiece.h.

◆ Consume()

bool google::protobuf::StringPiece::Consume ( StringPiece  x)

Definition at line 75 of file stringpiece.cc.

◆ ConsumeFromEnd()

bool google::protobuf::StringPiece::ConsumeFromEnd ( StringPiece  x)

Definition at line 84 of file stringpiece.cc.

◆ contains()

bool google::protobuf::StringPiece::contains ( StringPiece  s) const

Definition at line 100 of file stringpiece.cc.

◆ copy()

stringpiece_ssize_type google::protobuf::StringPiece::copy ( char *  buf,
size_type  n,
size_type  pos = 0 
) const

Definition at line 92 of file stringpiece.cc.

◆ CopyToString()

void google::protobuf::StringPiece::CopyToString ( string target) const

Definition at line 67 of file stringpiece.cc.

◆ data()

const char* google::protobuf::StringPiece::data ( ) const
inline

Definition at line 247 of file stringpiece.h.

◆ empty()

bool google::protobuf::StringPiece::empty ( ) const
inline

Definition at line 250 of file stringpiece.h.

◆ end()

iterator google::protobuf::StringPiece::end ( ) const
inline

Definition at line 356 of file stringpiece.h.

◆ ends_with()

bool google::protobuf::StringPiece::ends_with ( StringPiece  x) const
inline

Definition at line 330 of file stringpiece.h.

◆ find() [1/2]

stringpiece_ssize_type google::protobuf::StringPiece::find ( char  c,
size_type  pos = 0 
) const

Definition at line 114 of file stringpiece.cc.

◆ find() [2/2]

stringpiece_ssize_type google::protobuf::StringPiece::find ( StringPiece  s,
size_type  pos = 0 
) const

Definition at line 104 of file stringpiece.cc.

◆ find_first_not_of() [1/2]

stringpiece_ssize_type google::protobuf::StringPiece::find_first_not_of ( char  c,
size_type  pos = 0 
) const

Definition at line 199 of file stringpiece.cc.

◆ find_first_not_of() [2/2]

stringpiece_ssize_type google::protobuf::StringPiece::find_first_not_of ( StringPiece  s,
size_type  pos = 0 
) const

Definition at line 182 of file stringpiece.cc.

◆ find_first_of() [1/2]

stringpiece_ssize_type google::protobuf::StringPiece::find_first_of ( char  c,
size_type  pos = 0 
) const
inline

Definition at line 377 of file stringpiece.h.

◆ find_first_of() [2/2]

stringpiece_ssize_type google::protobuf::StringPiece::find_first_of ( StringPiece  s,
size_type  pos = 0 
) const

Definition at line 164 of file stringpiece.cc.

◆ find_last_not_of() [1/2]

stringpiece_ssize_type google::protobuf::StringPiece::find_last_not_of ( char  c,
size_type  pos = npos 
) const

Definition at line 248 of file stringpiece.cc.

◆ find_last_not_of() [2/2]

stringpiece_ssize_type google::protobuf::StringPiece::find_last_not_of ( StringPiece  s,
size_type  pos = npos 
) const

Definition at line 228 of file stringpiece.cc.

◆ find_last_of() [1/2]

stringpiece_ssize_type google::protobuf::StringPiece::find_last_of ( char  c,
size_type  pos = npos 
) const
inline

Definition at line 385 of file stringpiece.h.

◆ find_last_of() [2/2]

stringpiece_ssize_type google::protobuf::StringPiece::find_last_of ( StringPiece  s,
size_type  pos = npos 
) const

Definition at line 211 of file stringpiece.cc.

◆ length()

stringpiece_ssize_type google::protobuf::StringPiece::length ( ) const
inline

Definition at line 249 of file stringpiece.h.

◆ LogFatalSizeTooBig()

void google::protobuf::StringPiece::LogFatalSizeTooBig ( size_t  size,
const char *  details 
)
staticprivate

Definition at line 48 of file stringpiece.cc.

◆ max_size()

stringpiece_ssize_type google::protobuf::StringPiece::max_size ( ) const
inline

Definition at line 363 of file stringpiece.h.

◆ operator string()

google::protobuf::StringPiece::operator string ( ) const
inline

Definition at line 318 of file stringpiece.h.

◆ operator[]()

char google::protobuf::StringPiece::operator[] ( stringpiece_ssize_type  i) const
inline

Definition at line 276 of file stringpiece.h.

◆ rbegin()

const_reverse_iterator google::protobuf::StringPiece::rbegin ( ) const
inline

Definition at line 357 of file stringpiece.h.

◆ remove_prefix()

void google::protobuf::StringPiece::remove_prefix ( stringpiece_ssize_type  n)
inline

Definition at line 282 of file stringpiece.h.

◆ remove_suffix()

void google::protobuf::StringPiece::remove_suffix ( stringpiece_ssize_type  n)
inline

Definition at line 288 of file stringpiece.h.

◆ rend()

const_reverse_iterator google::protobuf::StringPiece::rend ( ) const
inline

Definition at line 360 of file stringpiece.h.

◆ rfind() [1/2]

stringpiece_ssize_type google::protobuf::StringPiece::rfind ( char  c,
size_type  pos = npos 
) const

Definition at line 134 of file stringpiece.cc.

◆ rfind() [2/2]

stringpiece_ssize_type google::protobuf::StringPiece::rfind ( StringPiece  s,
size_type  pos = npos 
) const

Definition at line 123 of file stringpiece.cc.

◆ set() [1/3]

void google::protobuf::StringPiece::set ( const char *  data,
stringpiece_ssize_type  len 
)
inline

Definition at line 257 of file stringpiece.h.

◆ set() [2/3]

void google::protobuf::StringPiece::set ( const char *  str)
inline

Definition at line 263 of file stringpiece.h.

◆ set() [3/3]

void google::protobuf::StringPiece::set ( const void data,
stringpiece_ssize_type  len 
)
inline

Definition at line 271 of file stringpiece.h.

◆ size()

stringpiece_ssize_type google::protobuf::StringPiece::size ( ) const
inline

Definition at line 248 of file stringpiece.h.

◆ starts_with()

bool google::protobuf::StringPiece::starts_with ( StringPiece  x) const
inline

Definition at line 325 of file stringpiece.h.

◆ substr()

StringPiece google::protobuf::StringPiece::substr ( size_type  pos,
size_type  n = npos 
) const

Definition at line 261 of file stringpiece.cc.

◆ ToString()

string google::protobuf::StringPiece::ToString ( ) const
inline

Definition at line 313 of file stringpiece.h.

Member Data Documentation

◆ const_iterator

const typedef char* google::protobuf::StringPiece::const_iterator

Definition at line 351 of file stringpiece.h.

◆ const_reference

const typedef char& google::protobuf::StringPiece::const_reference

Definition at line 347 of file stringpiece.h.

◆ iterator

const typedef char* google::protobuf::StringPiece::iterator

Definition at line 352 of file stringpiece.h.

◆ length_

stringpiece_ssize_type google::protobuf::StringPiece::length_
private

Definition at line 183 of file stringpiece.h.

◆ npos

const StringPiece::size_type google::protobuf::StringPiece::npos = size_type(-1)
static

Definition at line 350 of file stringpiece.h.

◆ pointer

const typedef char* google::protobuf::StringPiece::pointer

Definition at line 345 of file stringpiece.h.

◆ ptr_

const char* google::protobuf::StringPiece::ptr_
private

Definition at line 182 of file stringpiece.h.

◆ reference

const typedef char& google::protobuf::StringPiece::reference

Definition at line 346 of file stringpiece.h.


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


libaditof
Author(s):
autogenerated on Wed May 21 2025 02:07:09