2 action.h - MaLa action handler
4 Copyright (C) 2004, Christian Thaeter <chth@gmx.net>
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License version 2 as
8 published by the Free Software Foundation.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, contact me.
24 #include "mala_types.h"
28 mala_actioninit_struct
31 MalaParserFunc parser
;
32 mala_action_datatype type
;
37 #define MALA_ACTIONS_END {NULL,NULL,MALA_DATA_UNUSED,NULL,NULL}
39 struct mala_action_struct
42 MalaParserFunc parser
;
53 acogc_alloc_type data_alloc_type
;
66 mala_action_attach_child (MalaAction parent
, MalaAction child
)
69 llist_insert_tail (&parent
->childs
, &child
->cldnode
);
73 mala_action_new_actioninit (MalaActionInit init
, MalaEngine engine
);
76 mala_action_new (MalaString name
,
77 MalaParserFunc parser
,
79 acogc_alloc_type data_alloc
,
83 mala_action_acogc_initize (void*);
86 mala_action_acogc_finalize (void*);
89 mala_action_acogc_mark (void*);
92 mala_action_attach (MalaAction self
, MalaString name
);
94 static inline AcogcFactory
95 mala_action_data_type (MalaAction self
)
97 if (self
->data_alloc_type
>= ACOGC_STATIC
)
99 return acogc_object_type (self
->data
);
105 static inline MalaStringList
106 mala_action_stringlist (MalaAction self
)
111 static inline MalaString
112 mala_action_string (MalaAction self
)
118 mala_action_dataptr (MalaAction self
)
125 #endif /*MALA_ACTION_H*/
129 // c-file-style: "gnu"
131 // arch-tag: d8b425b7-18c1-4dc8-a19b-cdd095873e70