00001 #ifdef WIN32
00002 #pragma warning (disable : 4786)
00003 #endif
00004
00005 #ifndef __ACTIONS_H_INCLUDED__
00006 #define __ACTIONS_H_INCLUDED__
00007
00008 #include "TranslationUnit.h"
00009
00010 #include <list>
00011 #include <map>
00012 #include <string>
00013
00014 using namespace std;
00015
00016 extern map<string,int> lexer_keys;
00017
00018
00019 enum CLASSTYPE {WSCLASS=1, BEANCLASS};
00020
00021
00022
00023 typedef list<int> token_list;
00024 typedef list<string*> string_list;
00025
00026 struct expression
00027 {
00028 union
00029 {
00030 int n;
00031 } expr;
00032 };
00033
00034 typedef list<expression*> expression_list;
00035
00036 struct param_declarator
00037 {
00038 token_list ptr_ops;
00039 string decl_id;
00040 expression_list arr_dim;
00041 };
00042
00043 struct param_decl
00044 {
00045 string_list* decl_specs;
00046 param_declarator* param;
00047 bool bdef;
00048 expression* defval;
00049 };
00050
00051 typedef list<param_decl*> param_decl_list;
00052
00053 struct base_specifier
00054 {
00055 int access;
00056 string* class_name;
00057 };
00058
00059 typedef list<base_specifier*> base_specifier_list;
00060
00061 struct class_head
00062 {
00063 string* class_name;
00064 base_specifier_list* baselist;
00065 };
00066
00067 struct member_declarator
00068 {
00069 string* declarator_id;
00070 param_decl_list* params;
00071 expression_list array_indexes;
00072 token_list ptr_ops;
00073 bool bpure;
00074 bool bdestructor;
00075 bool method;
00076 expression* expr;
00077 };
00078
00079 typedef list<member_declarator*> member_declarator_list;
00080
00081
00082 void translation_unit_start();
00083 bool is_defined_class(const char* identifier);
00084 bool is_webservice_class(const char* classname);
00085 void add_member_declaration(string_list* decl_specs, member_declarator_list* member_decl_list);
00086
00087
00088 extern TranslationUnit* g_pTranslationUnit;
00089 extern string g_classname;
00090 extern list<string> g_classesfound;
00091 extern int g_currentclasstype;
00092 extern WSClass* g_pCurrentWSClass;
00093 extern BeanClass* g_pCurrentBeanClass;
00094 extern int g_currentaccessspecifier;
00095 extern bool g_bdestructor_seen;
00096
00097 #endif //__ACTIONS_H_INCLUDED__