OMNeT++ Simulation Library
5.6.1
|
#include <opp_string.h>
Lightweight string class, used internally in some parts of OMNeT++.
In simulation models it is better to use std::string or const char * instead.
opp_string has only one data member, a char* pointer. Allocation and deallocation of the contents takes place via opp_strdup() and operator delete.
Public Member Functions | |
opp_string () | |
opp_string (const char *s) | |
opp_string (const char *s, int n) | |
opp_string (const std::string &s) | |
opp_string (const opp_string &s) | |
~opp_string () | |
const char * | c_str () const |
std::string | str () const |
bool | empty () const |
char * | buffer () |
int | size () const |
char * | reserve (unsigned size) |
const char * | operator= (const char *s) |
opp_string & | operator= (const opp_string &s) |
opp_string & | operator= (const std::string &s) |
bool | operator< (const opp_string &s) const |
bool | operator== (const opp_string &s) const |
bool | operator!= (const opp_string &s) const |
opp_string & | operator+= (const char *s) |
opp_string & | operator+= (const opp_string &s) |
opp_string & | operator+= (const std::string &s) |
opp_string | operator+ (const char *s) |
opp_string | operator+ (const opp_string &s) |
opp_string | operator+ (const std::string &s) |
|
inline |
Constructor.
|
inline |
Constructor.
References omnetpp::opp_strdup().
|
inline |
Constructor.
|
inline |
Constructor.
References omnetpp::opp_strdup().
|
inline |
Copy constructor.
References omnetpp::opp_strdup().
|
inline |
Destructor.
|
inline |
Return pointer to the string.
Referenced by opp_string::operator+().
|
inline |
Convert to std::string.
|
inline |
Null (empty) string or not.
|
inline |
Returns pointer to the internal buffer where the string is stored. It is allowed to write into the string via this pointer, but the length of the string should not be exceeded.
|
inline |
Returns the length of the string.
|
inline |
Allocates a buffer of the given size.
|
inline |
Deletes the old value and opp_strdup()'s the new value to create the object's own copy.
References omnetpp::opp_strdup().
|
inline |
|
inline |
|
inline |
Comparison.
References omnetpp::opp_strcmp().
|
inline |
Comparison.
References omnetpp::opp_strcmp().
|
inline |
Comparison.
References omnetpp::opp_strcmp().
|
inline |
Concatenation
|
inline |
|
inline |
|
inline |
Concatenation
|
inline |
Concatenation
References opp_string::c_str(), and opp_string::operator+().
Referenced by opp_string::operator+().
|
inline |
Concatenation
References opp_string::c_str(), and opp_string::operator+().
Referenced by opp_string::operator+().