2010-09-01 10:37:10 +00:00
|
|
|
#ifndef Entity_h
|
|
|
|
#define Entity_h
|
2003-03-18 19:48:24 +00:00
|
|
|
|
2010-09-09 11:46:38 +00:00
|
|
|
#include <AppKit/AppKit.h>
|
|
|
|
|
|
|
|
#include "QF/mathlib.h"
|
|
|
|
|
|
|
|
typedef struct epair_s {
|
|
|
|
struct epair_s *next;
|
|
|
|
char *key;
|
|
|
|
char *value;
|
2003-03-18 19:48:24 +00:00
|
|
|
} epair_t;
|
|
|
|
|
|
|
|
// an Entity is a list of brush objects, with additional key / value info
|
|
|
|
|
2010-09-09 11:46:38 +00:00
|
|
|
@interface Entity : NSMutableArray
|
2003-03-18 19:48:24 +00:00
|
|
|
{
|
|
|
|
epair_t *epairs;
|
|
|
|
BOOL modifiable;
|
|
|
|
}
|
|
|
|
|
|
|
|
- initClass: (char *)classname;
|
2010-09-09 11:46:38 +00:00
|
|
|
- initFromScript: (struct script_s *) script;
|
2003-03-18 19:48:24 +00:00
|
|
|
|
2010-09-09 11:46:38 +00:00
|
|
|
- (void)dealloc;
|
2003-03-18 19:48:24 +00:00
|
|
|
|
|
|
|
- (BOOL)modifiable;
|
|
|
|
- setModifiable: (BOOL)m;
|
|
|
|
|
|
|
|
- (char *)targetname;
|
|
|
|
|
|
|
|
- writeToFILE: (FILE *)f region:(BOOL)reg;
|
|
|
|
|
|
|
|
- (char *)valueForQKey: (char *)k;
|
|
|
|
- getVector: (vec3_t)v forKey: (char *)k;
|
2010-09-09 11:46:38 +00:00
|
|
|
- setKey:(const char *)k toValue:(const char *)v;
|
2003-03-18 19:48:24 +00:00
|
|
|
- (int)numPairs;
|
|
|
|
- (epair_t *)epairs;
|
|
|
|
- removeKeyPair: (char *)key;
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
2010-09-01 10:37:10 +00:00
|
|
|
#endif//Entity_h
|