class cls :
public PAbstractDictionary { \
PCLASSINFO(cls,
PAbstractDictionary) \
protected: \
inline cls(
int dummy,
const cls * c) \
:
PAbstractDictionary(dummy, c) { } \
public: \
inline cls() \
:
PAbstractDictionary() { } \
inline PObject * Clone() const \
{
return PNEW cls(0,
this); } \
inline PString & operator[](
const K & key)
const \
{
return (
PString &)GetRefAt(key); } \
inline PString operator()(
const K & key,
const char * dflt =
"")
const \
{
if (Contains(key))
return (
PString &)GetRefAt(key);
return dflt; } \
virtual BOOL Contains(
const K & key)
const \
{
return AbstractContains(key); } \
virtual PString * RemoveAt(
const K & key) \
{
PString * s = GetAt(key); AbstractSetAt(key, NULL);
return s; } \
virtual PString * GetAt(
const K & key)
const \
{
return (
PString *)AbstractGetAt(key); } \
virtual BOOL SetDataAt(PINDEX index,
const PString & str) \
{
return PAbstractDictionary::SetDataAt(index,PNEW
PString(str));} \
virtual BOOL SetAt(
const K & key,
const PString & str) \
{
return AbstractSetAt(key, PNEW
PString(str)); } \
inline const K & GetKeyAt(PINDEX index)
const \
{
return (
const K &)AbstractGetKeyAt(index); } \
inline PString & GetDataAt(PINDEX index)
const \
{
return (
PString &)AbstractGetDataAt(index); } \
}