16 #ifndef __OMNETPP_OPP_POOLEDSTRING_H
17 #define __OMNETPP_OPP_POOLEDSTRING_H
21 #include "simkerneldefs.h"
41 bool empty()
const {
return !p || !*p;}
42 std::string str()
const {
return p;}
43 const char *c_str()
const {
return p;}
44 static const char *get(
const char *s);
47 bool operator==(
const char *s)
const {
return strcmp(p,s) == 0;}
48 bool operator!=(
const char *s)
const {
return strcmp(p,s) != 0;}
49 bool operator==(
const std::string& s)
const {
return strcmp(p,s.c_str()) == 0;}
50 bool operator!=(
const std::string& s)
const {
return strcmp(p,s.c_str()) != 0;}
54 inline bool operator!=(
const char *s,
const opp_staticpooledstring& ps) {
return ps != s;}
55 inline bool operator==(
const std::string& s,
const opp_staticpooledstring& ps) {
return ps == s;}
56 inline bool operator!=(
const std::string& s,
const opp_staticpooledstring& ps) {
return ps != s;}
76 bool empty()
const {
return !p || !*p;}
77 std::string str()
const {
return p;}
78 const char *c_str()
const {
return p;}
81 bool operator==(
const char *s)
const {
return strcmp(p,s) == 0;}
82 bool operator!=(
const char *s)
const {
return strcmp(p,s) != 0;}
83 bool operator==(
const std::string& s)
const {
return strcmp(p,s.c_str()) == 0;}
84 bool operator!=(
const std::string& s)
const {
return strcmp(p,s.c_str()) != 0;}
87 inline bool operator==(
const char *s,
const opp_pooledstring& ps) {
return ps == s;}
88 inline bool operator!=(
const char *s,
const opp_pooledstring& ps) {
return ps != s;}
89 inline bool operator==(
const std::string& s,
const opp_pooledstring& ps) {
return ps == s;}
90 inline bool operator!=(
const std::string& s,
const opp_pooledstring& ps) {
return ps != s;}