quakeforge/tools/Forge/Bundles/MapEdit/Dict.h

56 lines
1.1 KiB
C
Raw Normal View History

#ifndef Dict_h
#define Dict_h
#include <AppKit/AppKit.h>
#include "Storage.h"
2010-09-11 10:06:04 +00:00
typedef struct {
char *key;
char *value;
} dict_t;
2010-09-11 16:41:18 +00:00
@interface Dict:Storage
{
}
2010-09-11 10:06:04 +00:00
-initFromFile:(FILE *) fp;
2010-09-11 10:06:04 +00:00
-(id) parseMultipleFrom:(char *) value;
-(int) getValueUnits:(char *) key;
2010-09-11 16:41:18 +00:00
-delString:(char *)string fromValue:(char *) key;
2010-09-11 16:41:18 +00:00
-addString:(char *)string toValue:(char *) key;
2010-09-11 10:06:04 +00:00
-(char *) convertListToString:(id) list;
-(char *) getStringFor:(char *) name;
-removeKeyword:(char *) key;
-(unsigned int) getValueFor:(char *) name;
2010-09-11 16:41:18 +00:00
-changeStringFor:(char *)key to:(char *) value;
2010-09-11 10:06:04 +00:00
-(dict_t *) findKeyword:(char *) key;
2010-09-11 10:06:04 +00:00
-writeBlockTo:(FILE *) fp;
-writeFile:(char *) path;
// INTERNAL
-init;
-(id) parseBraceBlock:(FILE *) fp;
-setupMultiple:(char *) value;
-(char *) getNextParameter;
2010-09-11 16:41:18 +00:00
@end
2010-09-11 16:41:18 +00:00
int GetNextChar (FILE * fp);
void CopyUntilWhitespc (FILE * fp, char *buffer);
void CopyUntilQuote (FILE * fp, char *buffer);
int FindBrace (FILE * fp);
int FindQuote (FILE * fp);
int FindWhitespc (FILE * fp);
int FindNonwhitespc (FILE * fp);
char *FindWhitespcInBuffer (char *buffer);
char *FindNonwhitespcInBuffer (char *buffer);
2010-09-11 10:06:04 +00:00
#endif // Dict_h