Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenheader.h
Go to the documentation of this file.
00001 /* 00002 * IDL Compiler 00003 * 00004 * Copyright 2002 Ove Kaaven 00005 * 00006 * This library is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU Lesser General Public 00008 * License as published by the Free Software Foundation; either 00009 * version 2.1 of the License, or (at your option) any later version. 00010 * 00011 * This library is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 * Lesser General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU Lesser General Public 00017 * License along with this library; if not, write to the Free Software 00018 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA 00019 */ 00020 00021 #ifndef __WIDL_HEADER_H 00022 #define __WIDL_HEADER_H 00023 00024 #include "typetree.h" 00025 00026 extern int is_ptrchain_attr(const var_t *var, enum attr_type t); 00027 extern int is_aliaschain_attr(const type_t *var, enum attr_type t); 00028 extern int is_attr(const attr_list_t *list, enum attr_type t); 00029 extern void *get_attrp(const attr_list_t *list, enum attr_type t); 00030 extern unsigned int get_attrv(const attr_list_t *list, enum attr_type t); 00031 extern int is_void(const type_t *t); 00032 extern int is_conformant_array(const type_t *t); 00033 extern int is_declptr(const type_t *t); 00034 extern const char* get_name(const var_t *v); 00035 extern void write_type_left(FILE *h, type_t *t, int declonly); 00036 extern void write_type_right(FILE *h, type_t *t, int is_field); 00037 extern void write_type_decl(FILE *f, type_t *t, const char *name); 00038 extern void write_type_decl_left(FILE *f, type_t *t); 00039 extern unsigned int get_context_handle_offset( const type_t *type ); 00040 extern unsigned int get_generic_handle_offset( const type_t *type ); 00041 extern int needs_space_after(type_t *t); 00042 extern int is_object(const type_t *iface); 00043 extern int is_local(const attr_list_t *list); 00044 extern int count_methods(const type_t *iface); 00045 extern int need_stub(const type_t *iface); 00046 extern int need_proxy(const type_t *iface); 00047 extern int need_inline_stubs(const type_t *iface); 00048 extern int need_stub_files(const statement_list_t *stmts); 00049 extern int need_proxy_file(const statement_list_t *stmts); 00050 extern int need_inline_stubs_file(const statement_list_t *stmts); 00051 extern const var_t *is_callas(const attr_list_t *list); 00052 extern void write_args(FILE *h, const var_list_t *arg, const char *name, int obj, int do_indent); 00053 extern void write_array(FILE *h, array_dims_t *v, int field); 00054 extern const type_t* get_explicit_generic_handle_type(const var_t* var); 00055 extern const var_t *get_func_handle_var( const type_t *iface, const var_t *func, 00056 unsigned char *explicit_fc, unsigned char *implicit_fc ); 00057 extern int has_out_arg_or_return(const var_t *func); 00058 extern void write_guid(FILE *f, const char *guid_prefix, const char *name, 00059 const UUID *uuid); 00060 extern int is_const_decl(const var_t *var); 00061 00062 static inline int last_ptr(const type_t *type) 00063 { 00064 return is_ptr(type) && !is_declptr(type_pointer_get_ref(type)); 00065 } 00066 00067 static inline int last_array(const type_t *type) 00068 { 00069 return is_array(type) && !is_array(type_array_get_element(type)); 00070 } 00071 00072 static inline int is_string_type(const attr_list_t *attrs, const type_t *type) 00073 { 00074 return ((is_attr(attrs, ATTR_STRING) || is_aliaschain_attr(type, ATTR_STRING)) 00075 && (last_ptr(type) || last_array(type))); 00076 } 00077 00078 static inline int is_context_handle(const type_t *type) 00079 { 00080 const type_t *t; 00081 for (t = type; 00082 is_ptr(t) || type_is_alias(t); 00083 t = type_is_alias(t) ? type_alias_get_aliasee(t) : type_pointer_get_ref(t)) 00084 if (is_attr(t->attrs, ATTR_CONTEXTHANDLE)) 00085 return 1; 00086 return 0; 00087 } 00088 00089 #endif Generated on Mon May 28 2012 04:37:49 for ReactOS by
1.7.6.1
|