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-11 16:41:18 +00:00
|
|
|
@interface Entity:NSMutableArray
|
|
|
|
{
|
2010-09-12 07:25:25 +00:00
|
|
|
NSMutableArray *array;
|
2010-09-11 10:06:04 +00:00
|
|
|
epair_t *epairs;
|
|
|
|
BOOL modifiable;
|
2003-03-18 19:48:24 +00:00
|
|
|
}
|
|
|
|
|
2010-09-28 09:41:38 +00:00
|
|
|
-initClass:(const char *) classname;
|
2010-09-11 10:06:04 +00:00
|
|
|
-initFromScript:(struct script_s *) script;
|
2003-03-18 19:48:24 +00:00
|
|
|
|
2010-09-11 10:06:04 +00:00
|
|
|
-(void) dealloc;
|
2003-03-18 19:48:24 +00:00
|
|
|
|
2010-09-11 10:06:04 +00:00
|
|
|
-(BOOL) modifiable;
|
|
|
|
-setModifiable:(BOOL) m;
|
2003-03-18 19:48:24 +00:00
|
|
|
|
2010-09-27 15:29:16 +00:00
|
|
|
-(const char *) targetname;
|
2003-03-18 19:48:24 +00:00
|
|
|
|
2010-09-11 16:41:18 +00:00
|
|
|
-writeToFILE:(FILE *)f region:(BOOL) reg;
|
2003-03-18 19:48:24 +00:00
|
|
|
|
2010-09-27 15:29:16 +00:00
|
|
|
-(const char *) valueForQKey:(const char *) k;
|
2010-09-28 09:41:38 +00:00
|
|
|
-getVector:(vec3_t)v forKey:(const char *) k;
|
2003-03-18 19:48:24 +00:00
|
|
|
|
2010-09-28 09:41:38 +00:00
|
|
|
-setKey:(const char *) k toValue:(const char *) v;
|
2010-09-11 10:06:04 +00:00
|
|
|
|
|
|
|
-(int) numPairs;
|
|
|
|
-(epair_t *) epairs;
|
2010-09-28 09:41:38 +00:00
|
|
|
-removeKeyPair:(const char *) key;
|
2003-03-18 19:48:24 +00:00
|
|
|
|
2010-09-11 10:06:04 +00:00
|
|
|
@end
|
|
|
|
#endif // Entity_h
|