1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
#ifndef __OBJECTS_OBJECTS_BUFFER_HH__
#define __OBJECTS_OBJECTS_BUFFER_HH__
#include "objects_parser.hh"
#include "common/tools.hh"
namespace rtfl {
namespace objects {
class ObjectsBuffer: public ObjectsControllerBase
{
private:
enum CommandType {
MSG, MARK, MSG_START, MSG_END, ENTER, LEAVE, CREATE, IDENT, NOIDENT,
ASSOC, SET, CLASS_COLOR, OBJECT_COLOR, DELETE
};
class ObjectCommand: public lout::object::Object
{
friend class ObjectsBuffer;
private:
CommandType type;
tools::CommonLineInfo info;
int numArgs;
struct Arg {
char type;
union {
int d;
char *s;
};
} *args;
public:
ObjectCommand (CommandType type, tools::CommonLineInfo *info,
const char *fmt, ...);
~ObjectCommand ();
};
ObjectsController *successor;
lout::container::typed::Vector<ObjectCommand> *commandsQueue;
bool queued;
void process (ObjectCommand *command);
void queue (ObjectCommand *command);
void pass (ObjectCommand *command);
public:
ObjectsBuffer (ObjectsController *successor);
~ObjectsBuffer ();
void objMsg (tools::CommonLineInfo *info, const char *id,
const char *aspect, int prio, const char *message);
void objMark (tools::CommonLineInfo *info, const char *id,
const char *aspect, int prio, const char *message);
void objMsgStart (tools::CommonLineInfo *info, const char *id);
void objMsgEnd (tools::CommonLineInfo *info, const char *id);
void objEnter (tools::CommonLineInfo *info, const char *id,
const char *aspect, int prio, const char *funname,
const char *args);
void objLeave (tools::CommonLineInfo *info, const char *id,
const char *vals);
void objCreate (tools::CommonLineInfo *info, const char *id,
const char *klass);
void objIdent (tools::CommonLineInfo *info, const char *id1,
const char *id2);
void objNoIdent (tools::CommonLineInfo *info);
void objAssoc (tools::CommonLineInfo *info, const char *parent,
const char *child);
void objSet (tools::CommonLineInfo *info, const char *id, const char *var,
const char *val);
void objClassColor (tools::CommonLineInfo *info, const char *klass,
const char *color);
void objObjectColor (tools::CommonLineInfo *info, const char *id,
const char *color);
void objDelete (tools::CommonLineInfo *info, const char *id);
void queue ();
void pass ();
};
} // namespace objects
} // namespace rtfl
#endif // __OBJECTS_OBJECTS_BUFFER_HH__
|