TrinityCore
google::protobuf::strings::internal::SubstituteArg Class Reference

#include <substitute.h>

Public Member Functions

 SubstituteArg (const char *value)
 
 SubstituteArg (const string &value)
 
 SubstituteArg ()
 
 SubstituteArg (char value)
 
 SubstituteArg (short value)
 
 SubstituteArg (unsigned short value)
 
 SubstituteArg (int value)
 
 SubstituteArg (unsigned int value)
 
 SubstituteArg (long value)
 
 SubstituteArg (unsigned long value)
 
 SubstituteArg (long long value)
 
 SubstituteArg (unsigned long long value)
 
 SubstituteArg (float value)
 
 SubstituteArg (double value)
 
 SubstituteArg (bool value)
 
const char * data () const
 
int size () const
 

Private Attributes

const char * text_
 
int size_
 
char scratch_ [kFastToBufferSize]
 

Constructor & Destructor Documentation

◆ SubstituteArg() [1/15]

google::protobuf::strings::internal::SubstituteArg::SubstituteArg ( const char *  value)
inline
90  : text_(value), size_(strlen(text_)) {}
const char * text_
Definition: substitute.h:133

◆ SubstituteArg() [2/15]

google::protobuf::strings::internal::SubstituteArg::SubstituteArg ( const string &  value)
inline
92  : text_(value.data()), size_(value.size()) {}
const char * text_
Definition: substitute.h:133

◆ SubstituteArg() [3/15]

google::protobuf::strings::internal::SubstituteArg::SubstituteArg ( )
inlineexplicit
96  : text_(NULL), size_(-1) {}
const char * text_
Definition: substitute.h:133

◆ SubstituteArg() [4/15]

google::protobuf::strings::internal::SubstituteArg::SubstituteArg ( char  value)
inline
105  : text_(scratch_), size_(1) { scratch_[0] = value; }
const char * text_
Definition: substitute.h:133
char scratch_[kFastToBufferSize]
Definition: substitute.h:135

◆ SubstituteArg() [5/15]

google::protobuf::strings::internal::SubstituteArg::SubstituteArg ( short  value)
inline
107  : text_(FastInt32ToBuffer(value, scratch_)), size_(strlen(text_)) {}
LIBPROTOBUF_EXPORT char * FastInt32ToBuffer(int32 i, char *buffer)
const char * text_
Definition: substitute.h:133
char scratch_[kFastToBufferSize]
Definition: substitute.h:135

◆ SubstituteArg() [6/15]

google::protobuf::strings::internal::SubstituteArg::SubstituteArg ( unsigned short  value)
inline
109  : text_(FastUInt32ToBuffer(value, scratch_)), size_(strlen(text_)) {}
const char * text_
Definition: substitute.h:133
char * FastUInt32ToBuffer(uint32 i, char *buffer)
Definition: strutil.h:434
char scratch_[kFastToBufferSize]
Definition: substitute.h:135

◆ SubstituteArg() [7/15]

google::protobuf::strings::internal::SubstituteArg::SubstituteArg ( int  value)
inline
111  : text_(FastInt32ToBuffer(value, scratch_)), size_(strlen(text_)) {}
LIBPROTOBUF_EXPORT char * FastInt32ToBuffer(int32 i, char *buffer)
const char * text_
Definition: substitute.h:133
char scratch_[kFastToBufferSize]
Definition: substitute.h:135

◆ SubstituteArg() [8/15]

google::protobuf::strings::internal::SubstituteArg::SubstituteArg ( unsigned int  value)
inline
113  : text_(FastUInt32ToBuffer(value, scratch_)), size_(strlen(text_)) {}
const char * text_
Definition: substitute.h:133
char * FastUInt32ToBuffer(uint32 i, char *buffer)
Definition: strutil.h:434
char scratch_[kFastToBufferSize]
Definition: substitute.h:135

◆ SubstituteArg() [9/15]

google::protobuf::strings::internal::SubstituteArg::SubstituteArg ( long  value)
inline
115  : text_(FastLongToBuffer(value, scratch_)), size_(strlen(text_)) {}
char * FastLongToBuffer(long i, char *buffer)
Definition: strutil.h:403
const char * text_
Definition: substitute.h:133
char scratch_[kFastToBufferSize]
Definition: substitute.h:135

◆ SubstituteArg() [10/15]

google::protobuf::strings::internal::SubstituteArg::SubstituteArg ( unsigned long  value)
inline
117  : text_(FastULongToBuffer(value, scratch_)), size_(strlen(text_)) {}
const char * text_
Definition: substitute.h:133
char * FastULongToBuffer(unsigned long i, char *buffer)
Definition: strutil.h:407
char scratch_[kFastToBufferSize]
Definition: substitute.h:135

◆ SubstituteArg() [11/15]

google::protobuf::strings::internal::SubstituteArg::SubstituteArg ( long long  value)
inline
119  : text_(FastInt64ToBuffer(value, scratch_)), size_(strlen(text_)) {}
const char * text_
Definition: substitute.h:133
LIBPROTOBUF_EXPORT char * FastInt64ToBuffer(int64 i, char *buffer)
char scratch_[kFastToBufferSize]
Definition: substitute.h:135

◆ SubstituteArg() [12/15]

google::protobuf::strings::internal::SubstituteArg::SubstituteArg ( unsigned long long  value)
inline
121  : text_(FastUInt64ToBuffer(value, scratch_)), size_(strlen(text_)) {}
char * FastUInt64ToBuffer(uint64 i, char *buffer)
Definition: strutil.h:438
const char * text_
Definition: substitute.h:133
char scratch_[kFastToBufferSize]
Definition: substitute.h:135

◆ SubstituteArg() [13/15]

google::protobuf::strings::internal::SubstituteArg::SubstituteArg ( float  value)
inline
123  : text_(FloatToBuffer(value, scratch_)), size_(strlen(text_)) {}
const char * text_
Definition: substitute.h:133
char scratch_[kFastToBufferSize]
Definition: substitute.h:135
LIBPROTOBUF_EXPORT char * FloatToBuffer(float i, char *buffer)

◆ SubstituteArg() [14/15]

google::protobuf::strings::internal::SubstituteArg::SubstituteArg ( double  value)
inline
125  : text_(DoubleToBuffer(value, scratch_)), size_(strlen(text_)) {}
LIBPROTOBUF_EXPORT char * DoubleToBuffer(double i, char *buffer)
const char * text_
Definition: substitute.h:133
char scratch_[kFastToBufferSize]
Definition: substitute.h:135

◆ SubstituteArg() [15/15]

google::protobuf::strings::internal::SubstituteArg::SubstituteArg ( bool  value)
inline
127  : text_(value ? "true" : "false"), size_(strlen(text_)) {}
const char * text_
Definition: substitute.h:133

Member Function Documentation

◆ data()

const char* google::protobuf::strings::internal::SubstituteArg::data ( ) const
inline
129 { return text_; }
const char * text_
Definition: substitute.h:133

◆ size()

int google::protobuf::strings::internal::SubstituteArg::size ( ) const
inline
130 { return size_; }

Member Data Documentation

◆ scratch_

char google::protobuf::strings::internal::SubstituteArg::scratch_[kFastToBufferSize]
private

◆ size_

int google::protobuf::strings::internal::SubstituteArg::size_
private

◆ text_

const char* google::protobuf::strings::internal::SubstituteArg::text_
private

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