stub_SBuf.cc
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2019 The Squid Software Foundation and contributors
3  *
4  * Squid software is distributed under GPLv2+ license and includes
5  * contributions from numerous individuals and organizations.
6  * Please see the COPYING and CONTRIBUTORS files for details.
7  */
8 
9 #include "squid.h"
10 
11 #define STUB_API "SBuf.cc"
12 #include "tests/STUB.h"
13 
14 #include "sbuf/SBuf.h"
15 
16 InstanceIdDefinitions(SBuf, "SBuf");
17 
21 
22 std::ostream& SBufStats::dump(std::ostream &os) const STUB_RETVAL(os)
24 
25 SBuf::SBuf() {}
26 SBuf::SBuf(const SBuf &) {}
27 SBuf::SBuf(const char *, size_type) {}
28 SBuf::SBuf(const char *) {}
29 SBuf::SBuf(const std::string &) {}
30 SBuf::~SBuf() {}
31 SBuf& SBuf::assign(const SBuf &) STUB_RETVAL(*this)
32 SBuf& SBuf::assign(const char *, size_type) STUB_RETVAL(*this)
33 void SBuf::clear() STUB
34 SBuf& SBuf::append(const SBuf &) STUB_RETVAL(*this)
35 SBuf& SBuf::append(const char *, size_type) STUB_RETVAL(*this)
36 SBuf& SBuf::append(const char) STUB_RETVAL(*this)
37 SBuf& SBuf::Printf(const char *, ...) STUB_RETVAL(*this)
38 SBuf& SBuf::appendf(const char *, ...) STUB_RETVAL(*this)
39 SBuf& SBuf::vappendf(const char *, va_list) STUB_RETVAL(*this)
40 std::ostream& SBuf::print(std::ostream &os) const STUB_RETVAL(os)
41 std::ostream& SBuf::dump(std::ostream &os) const STUB_RETVAL(os)
42 void SBuf::setAt(size_type, char) STUB
43 int SBuf::compare(const SBuf &, const SBufCaseSensitive, const size_type) const STUB_RETVAL(-1)
44 int SBuf::compare(const char *, const SBufCaseSensitive, const size_type) const STUB_RETVAL(-1)
45 bool SBuf::startsWith(const SBuf &, const SBufCaseSensitive) const STUB_RETVAL(false)
46 bool SBuf::operator ==(const SBuf &) const STUB_RETVAL(false)
47 bool SBuf::operator !=(const SBuf &) const STUB_RETVAL(false)
48 SBuf SBuf::consume(size_type) STUB_RETVAL(*this)
49 const SBufStats& SBuf::GetStats() STUB_RETVAL(SBuf::stats)
50 SBuf::size_type SBuf::copy(char *, size_type) const STUB_RETVAL(0)
51 const char* SBuf::rawContent() const STUB_RETVAL(NULL)
52 char *SBuf::rawAppendStart(size_type) STUB_RETVAL(NULL)
53 void SBuf::rawAppendFinish(const char *, size_type) STUB
54 const char* SBuf::c_str() STUB_RETVAL("")
55 void SBuf::reserveCapacity(size_type) STUB
56 SBuf::size_type SBuf::reserve(const SBufReservationRequirements &) STUB_RETVAL(0)
57 SBuf& SBuf::chop(size_type, size_type) STUB_RETVAL(*this)
58 SBuf& SBuf::trim(const SBuf &, bool, bool) STUB_RETVAL(*this)
59 SBuf SBuf::substr(size_type, size_type) const STUB_RETVAL(*this)
60 SBuf::size_type SBuf::find(char, size_type) const STUB_RETVAL(SBuf::npos)
61 SBuf::size_type SBuf::find(const SBuf &, size_type) const STUB_RETVAL(SBuf::npos)
62 SBuf::size_type SBuf::rfind(char, size_type) const STUB_RETVAL(SBuf::npos)
63 SBuf::size_type SBuf::rfind(const SBuf &, size_type) const STUB_RETVAL(SBuf::npos)
64 SBuf::size_type SBuf::findFirstOf(const CharacterSet &, size_type) const STUB_RETVAL(SBuf::npos)
65 SBuf::size_type SBuf::findLastOf(const CharacterSet &, size_type) const STUB_RETVAL(SBuf::npos)
66 SBuf::size_type SBuf::findFirstNotOf(const CharacterSet &, size_type) const STUB_RETVAL(SBuf::npos)
67 SBuf::size_type SBuf::findLastNotOf(const CharacterSet &, size_type) const STUB_RETVAL(SBuf::npos)
68 void SBuf::toLower() STUB
69 void SBuf::toUpper() STUB
70 
size_type findFirstOf(const CharacterSet &set, size_type startPos=0) const
Definition: SBuf.cc:733
~SBuf()
Definition: SBuf.cc:68
SBuf & appendf(const char *fmt,...)
Definition: SBuf.cc:239
SBuf & assign(const SBuf &S)
Definition: SBuf.cc:83
size_type findFirstNotOf(const CharacterSet &set, size_type startPos=0) const
Definition: SBuf.cc:756
int compare(const SBuf &S, const SBufCaseSensitive isCaseSensitive, const size_type n) const
Definition: SBuf.cc:362
SBuf & append(const SBuf &S)
Definition: SBuf.cc:195
static const SBufStats & GetStats()
gets global statistic informations
Definition: SBuf.cc:504
SBuf & chop(size_type pos, size_type n=npos)
Definition: SBuf.cc:540
void clear()
Definition: SBuf.cc:178
InstanceIdDefinitions(SBuf, "SBuf")
void toUpper()
converts all characters to upper case;
Definition: SBuf.cc:834
bool startsWith(const SBuf &S, const SBufCaseSensitive isCaseSensitive=caseSensitive) const
Definition: SBuf.cc:452
size_type findLastNotOf(const CharacterSet &set, size_type endPos=npos) const
Definition: SBuf.cc:800
static const size_type maxSize
Maximum size of a SBuf. By design it MUST be < MAX(size_type)/2. Currently 256Mb. ...
Definition: SBuf.h:95
std::ostream & dump(std::ostream &os) const
Definition: SBuf.cc:313
void setAt(size_type pos, char toset)
Definition: SBuf.cc:338
void rawAppendFinish(const char *start, size_type actualSize)
Definition: SBuf.cc:144
void toLower()
converts all characters to lower case;
Definition: SBuf.cc:821
Named SBuf::reserve() parameters. Defaults ask for and restrict nothing.
Definition: SBuf.h:685
#define STUB_RETVAL(x)
Definition: STUB.h:41
char * rawAppendStart(size_type anticipatedSize)
Definition: SBuf.cc:136
SBuf & Printf(const char *fmt,...)
Definition: SBuf.cc:224
#define STUB
macro to stub a void function.
Definition: STUB.h:33
std::ostream & print(std::ostream &os) const
print the SBuf contents to the supplied ostream
Definition: SBuf.cc:305
const char * c_str()
Definition: SBuf.cc:526
size_type findLastOf(const CharacterSet &set, size_type endPos=npos) const
Definition: SBuf.cc:779
SBuf consume(size_type n=npos)
Definition: SBuf.cc:491
SBuf substr(size_type pos, size_type n=npos) const
Definition: SBuf.cc:586
SBuf & trim(const SBuf &toRemove, bool atBeginning=true, bool atEnd=true)
Definition: SBuf.cc:561
size_type find(char c, size_type startPos=0) const
Definition: SBuf.cc:594
static const size_type npos
Definition: SBuf.h:92
size_type copy(char *dest, size_type n) const
Definition: SBuf.cc:510
static SBufStats stats
class-wide statistics
Definition: SBuf.h:621
SBufStats & operator+=(const SBufStats &)
Definition: Stats.cc:17
void reserveCapacity(size_type minCapacity)
Definition: SBuf.cc:105
SBuf & vappendf(const char *fmt, va_list vargs)
Definition: SBuf.cc:249
MemBlob::size_type size_type
Definition: SBuf.h:89
size_type reserve(const SBufReservationRequirements &requirements)
Definition: SBuf.cc:112
std::ostream & dump(std::ostream &os) const
Dump statistics to an ostream.
Definition: Stats.cc:46
STL namespace.
#define NULL
Definition: types.h:166
SBuf()
create an empty (zero-size) SBuf
Definition: SBuf.cc:28
const char * rawContent() const
Definition: SBuf.cc:519
#define false
Definition: GnuRegex.c:233
size_type rfind(char c, size_type endPos=npos) const
Definition: SBuf.cc:702

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors