2 * Copyright 1995, 1996 Perforce Software. All rights reserved.
4 * This file is part of Perforce - the FAST SCM System.
8 * strtable.h - a string table, using StrDict interface
12 * StrPtrDict - a dictionary whose values we don't own
13 * StrBufDict - a dictionary whose values we do own
17 * Clear() - reset table, making all variables unset
18 * GetVar() - look up variable, return value (or 0 if not set)
19 * SetVar() - set variable/value pair
21 * XXX Total dumb duplication of StrPtrDict into StrBufDict.
28 class StrPtrDict
: public StrDict
{
39 // virtuals of StrDict
41 StrPtr
* VGetVar( const StrPtr
&var
);
42 void VSetVar( const StrPtr
&var
, const StrPtr
&val
);
43 void VRemoveVar( const StrPtr
&var
);
44 int VGetVarX( int x
, StrRef
&var
, StrRef
&val
);
54 class StrBufDict
: public StrDict
{
58 StrBufDict( StrDict
& dict
);
59 StrBufDict
& operator =( StrDict
& dict
);
72 // virtuals of StrDict
74 StrPtr
* VGetVar( const StrPtr
&var
);
75 void VSetVar( const StrPtr
&var
, const StrPtr
&val
);
76 void VRemoveVar( const StrPtr
&var
);
77 int VGetVarX( int x
, StrRef
&var
, StrRef
&val
);
81 void Set( StrDict
& dict
);