#include <awStringShared.h>
Public Member Functions |
|
| DynamicIString () | |
| DynamicIString (const wchar_t *str) | |
| DynamicIString (const awString::IString &str) | |
| DynamicIString (const DynamicIString &rhs) | |
| ~DynamicIString () | |
| void | operator= (const DynamicIString &rhs) |
| bool | isValid () const |
| int | refs () const |
| const awString::IString * | operator-> () const |
| const awString::IString & | operator* () const |
| bool | operator== (const DynamicIString &rhs) const |
| bool | operator!= (const DynamicIString &rhs) const |
| bool | operator< (const DynamicIString &rhs) const |
| bool | operator== (const ConstantIString &rhs) const |
| bool | operator!= (const ConstantIString &rhs) const |
Friends |
|
| class | ConstantIString |
| AWSTRING_DECL DynamicIString | intern_dynamic (const awString::IString &) |
| DynamicIString | ( | ) | [inline] |
: m_value (0)
{
}
| DynamicIString | ( | const wchar_t * | str | ) | [inline] |
: m_value (0)
{
*this = intern_dynamic (str);
}
| DynamicIString | ( | const awString::IString & | str | ) | [inline] |
: m_value (0)
{
*this = intern_dynamic (str);
}
| DynamicIString | ( | const DynamicIString & | rhs | ) | [inline] |
: m_value (rhs.m_value)
{
if (m_value)
increaseStringRef (m_value);
}
| ~DynamicIString | ( | ) | [inline] |
{
if (m_value)
decreaseStringRef (m_value);
}
| void operator= | ( | const DynamicIString & | rhs | ) | [inline] |
{
// This order allows self assignment
if (rhs.m_value)
increaseStringRef (rhs.m_value);
if (m_value)
decreaseStringRef (m_value);
m_value = rhs.m_value;
}
| bool isValid | ( | ) | const [inline] |
{
return m_value != 0;
}
| int refs | ( | ) | const [inline] |
{
return m_value ? m_value->m_refs : 0;
}
| const awString::IString* operator-> | ( | ) | const [inline] |
{
assert (m_value);
return &(m_value->m_string);
}
| const awString::IString& operator* | ( | ) | const [inline] |
{
assert (m_value);
return m_value->m_string;
}
| bool operator== | ( | const DynamicIString & | rhs | ) | const [inline] |
{
// A pointer comparison
return m_value == rhs.m_value;
}
| bool operator!= | ( | const DynamicIString & | rhs | ) | const [inline] |
{
// A pointer comparison
return m_value != rhs.m_value;
}
| bool operator< | ( | const DynamicIString & | rhs | ) | const [inline] |
{
// A pointer comparison
return m_value < rhs.m_value;
}
| bool operator== | ( | const ConstantIString & | rhs | ) | const [inline] |
{
// A pointer comparison
return m_value == rhs.m_value;
}
| bool operator!= | ( | const ConstantIString & | rhs | ) | const [inline] |
{
// A pointer comparison
return m_value != rhs.m_value;
}
friend class ConstantIString
[friend] |
| AWSTRING_DECL DynamicIString intern_dynamic | ( | const awString::IString & | ) | [friend] |