MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame^] | 1 | // MorgenGrauen MUDlib |
| 2 | // |
| 3 | // thing/properties.h -- contains property definitions and prototypes |
| 4 | // |
| 5 | // $Id: properties.h,v 3.5 2003/08/07 15:09:33 Rikus Exp $ |
| 6 | |
| 7 | #ifndef __THING_PROPERTIES_H__ |
| 8 | #define __THING_PROPERTIES_H__ |
| 9 | |
| 10 | // special defines |
| 11 | |
| 12 | #define F_VALUE 0 |
| 13 | #define F_MODE 1 |
| 14 | #define F_SET_METHOD 2 |
| 15 | #define F_QUERY_METHOD 3 |
| 16 | #define F_MODE_AS 4 |
| 17 | #define F_MODE_AD 5 |
| 18 | |
| 19 | #define SAVE 64 |
| 20 | #define PROTECTED 128 // only this_object() can change the values |
| 21 | #define SECURED 256 // like PROTECTED, but never resetable |
| 22 | #define NOSETMETHOD 512 // Keine Set-Methode => Nicht mofifizierbar |
| 23 | #define SETMNOTFOUND 1024 // Keine Set-Methode gefunden |
| 24 | #define QUERYMNOTFOUND 2048 // Keine Query-Methode gefunden |
| 25 | #define QUERYCACHED 4096 |
| 26 | #define SETCACHED 8192 |
| 27 | |
| 28 | #endif // __THING_PROPERTIES_H__ |
| 29 | |
| 30 | #ifdef NEED_PROTOTYPES |
| 31 | |
| 32 | #ifndef __THING_PROPERTIES_H_PROTO__ |
| 33 | #define __THING_PROPERTIES_H_PROTO__ |
| 34 | |
| 35 | // prototypes |
| 36 | |
| 37 | // (E)UID-Methods |
| 38 | //static mixed _query_uid(); |
| 39 | //static mixed _query_euid(); |
| 40 | |
| 41 | // Property-Initialisation |
| 42 | protected void InitializeProperties(); |
| 43 | |
| 44 | // direct property access |
| 45 | public varargs mixed Set(string name, mixed Value, int Type, int extern); |
| 46 | public varargs mixed Query(string name, int Type); |
| 47 | |
| 48 | // filtered property access |
| 49 | public mixed SetProp(string name, mixed Value); |
| 50 | public mixed QueryProp(string name); |
| 51 | |
| 52 | // global property handling |
| 53 | public void SetProperties(mapping props); |
| 54 | public mapping QueryProperties(); |
| 55 | |
| 56 | // misc/interna |
| 57 | public mixed *__query_properties(); |
| 58 | public void _set_save_data(mixed data); |
| 59 | public mixed _get_save_data(); |
| 60 | |
| 61 | #endif // __THING_PROPERTIES_H_PROTO__ |
| 62 | |
| 63 | #endif // NEED_PROTOTYPES |