Debian Codegraph @

signpost.h

raw symbols SCIP
1 /*
2 * PROPRIETARY INFORMATION. This software is proprietary to POWDER
3 * Development, and is not to be reproduced, transmitted, or disclosed
4 * in any way without written permission.
5 *
6 * Produced by: Jeff Lait
7 *
8 * POWDER Development
9 *
10 * NAME: signpost.h ( POWDER Library, C++ )
11 *
12 * COMMENTS:
13 * Tracks signposts and their values. Creates a heap of signposts
14 * which can be queried to get a sign at a position. O(N) to
15 * access so be wary!
16 */
17
18 #ifndef __signpost_h__
19 #define __signpost_h__
20
21 #include "glbdef.h"
22 #include "itemstack.h"
23
24 class SRAMSTREAM;
25
26 class SIGNPOSTDATA
27 {
28 public:
29 SIGNPOSTDATA() {}
30 SIGNPOSTDATA(int zero) {}
31
32 void init(SIGNPOST_NAMES sign, int x, int y);
33
34 bool isPos(int x, int y) const;
35 void getPos(int &x, int &y) const;
36 SIGNPOST_NAMES getSign() const;
37
38 void save(SRAMSTREAM &os) const;
39 void load(SRAMSTREAM &is);
40
41 protected:
42 unsigned int myPos:10;
43 unsigned int mySign:6;
44 };
45
46
47 class SIGNLIST
48 {
49 public:
50 SIGNLIST();
51 ~SIGNLIST();
52
53 SIGNPOST_NAMES find(int x, int y) const;
54 void append(SIGNPOST_NAMES sign, int x, int y);
55 int entries() const { return myPosts.entries(); }
56
57 void save(SRAMSTREAM &os) const;
58 void load(SRAMSTREAM &is);
59
60 protected:
61 PTRSTACK<SIGNPOSTDATA> myPosts;
62 };
63
64 #endif
65