MCPcopy Create free account
hub / github.com/apache/trafficserver / write

Method write

lib/yamlcpp/src/ostream_wrapper.cpp:26–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24ostream_wrapper::~ostream_wrapper() = default;
25
26void ostream_wrapper::write(const std::string& str) {
27 if (m_pStream) {
28 m_pStream->write(str.c_str(), str.size());
29 } else {
30 m_buffer.resize(std::max(m_buffer.size(), m_pos + str.size() + 1));
31 std::copy(str.begin(), str.end(), m_buffer.begin() + m_pos);
32 }
33
34 for (char ch : str) {
35 update_pos(ch);
36 }
37}
38
39void ostream_wrapper::write(const char* str, std::size_t size) {
40 if (m_pStream) {

Callers 15

TESTFunction · 0.45
writelnMethod · 0.45
ostream_wrapper.hFile · 0.45
operator <<Function · 0.45
Errata.ccFile · 0.45
Adjust_AlignmentFunction · 0.45
Write_AlignedFunction · 0.45
bw_format.ccFile · 0.45
Format_As_HexFunction · 0.45
bw_ip_format.ccFile · 0.45
twiceFunction · 0.45

Calls 6

copyFunction · 0.50
c_strMethod · 0.45
sizeMethod · 0.45
resizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by 3

TESTFunction · 0.36
writelnMethod · 0.36
twiceFunction · 0.36