aGrUM 2.3.2
a C++ library for (probabilistic) graphical models
tinystr.cpp File Reference
#include "tinystr.h"
Include dependency graph for tinystr.cpp:

Go to the source code of this file.

Functions

TiXmlString operator+ (const TiXmlString &a, const TiXmlString &b)
TiXmlString operator+ (const TiXmlString &a, const char *b)
TiXmlString operator+ (const char *a, const TiXmlString &b)

Function Documentation

◆ operator+() [1/3]

TiXmlString operator+ ( const char * a,
const TiXmlString & b )

Definition at line 94 of file tinystr.cpp.

94 {
95 TiXmlString tmp;
96 TiXmlString::size_type a_len = static_cast< TiXmlString::size_type >(strlen(a));
97 tmp.reserve(a_len + b.length());
98 tmp.append(a, a_len);
99 tmp += b;
100 return tmp;
101}
size_type length() const
Definition tinystr.h:137
void reserve(size_type cap)
Definition tinystr.cpp:40
size_t size_type
Definition tinystr.h:74
TiXmlString & append(const char *str, size_type len)
Definition tinystr.cpp:65

References TiXmlString::append(), TiXmlString::length(), and TiXmlString::reserve().

Here is the call graph for this function:

◆ operator+() [2/3]

TiXmlString operator+ ( const TiXmlString & a,
const char * b )

Definition at line 85 of file tinystr.cpp.

85 {
86 TiXmlString tmp;
87 TiXmlString::size_type b_len = static_cast< TiXmlString::size_type >(strlen(b));
88 tmp.reserve(a.length() + b_len);
89 tmp += a;
90 tmp.append(b, b_len);
91 return tmp;
92}

References TiXmlString::append(), TiXmlString::length(), and TiXmlString::reserve().

Here is the call graph for this function:

◆ operator+() [3/3]

TiXmlString operator+ ( const TiXmlString & a,
const TiXmlString & b )

Definition at line 77 of file tinystr.cpp.

77 {
78 TiXmlString tmp;
79 tmp.reserve(a.length() + b.length());
80 tmp += a;
81 tmp += b;
82 return tmp;
83}

References TiXmlString::length(), and TiXmlString::reserve().

Here is the call graph for this function: