⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 idl.h

📁 CORBA上的libIDL源代码
💻 H
📖 第 1 页 / 共 2 页
字号:
	IDL_tree definition_list;};#define IDL_MODULE(a)			IDL_CHECK_CAST(a, IDLN_MODULE, idl_module)extern IDL_tree		IDL_module_new			(IDL_tree ident,							 IDL_tree definition_list);enum IDL_binop {	IDL_BINOP_OR,	IDL_BINOP_XOR,	IDL_BINOP_AND,	IDL_BINOP_SHR,	IDL_BINOP_SHL,	IDL_BINOP_ADD,	IDL_BINOP_SUB,	IDL_BINOP_MULT,	IDL_BINOP_DIV,	IDL_BINOP_MOD};struct _IDL_BINOP {	enum IDL_binop op;	IDL_tree left, right;};#define IDL_BINOP(a)			IDL_CHECK_CAST(a, IDLN_BINOP, idl_binop)extern IDL_tree		IDL_binop_new			(enum IDL_binop op,							 IDL_tree left,							 IDL_tree right);enum IDL_unaryop {	IDL_UNARYOP_PLUS,	IDL_UNARYOP_MINUS,	IDL_UNARYOP_COMPLEMENT};struct _IDL_UNARYOP {	enum IDL_unaryop op;	IDL_tree operand;};#define IDL_UNARYOP(a)			IDL_CHECK_CAST(a, IDLN_UNARYOP, idl_unaryop)extern IDL_tree		IDL_unaryop_new			(enum IDL_unaryop op,							 IDL_tree operand);/* XPIDL code fragments extension. */struct _IDL_CODEFRAG {	char *desc;	GSList *lines;};#define IDL_CODEFRAG(a)			IDL_CHECK_CAST(a, IDLN_CODEFRAG, idl_codefrag)extern IDL_tree		IDL_codefrag_new		(char *desc,							 GSList *lines);/* * IDL_tree_type - Enumerations of node types * * Note this enumerator list is subject to change in the future. A program should not need * more than a recompilation to adjust for a change in this list, so instead of using a * statically initialized jumptable, allocate an array of size IDLN_LAST and assign the * elements manually. */typedef enum {	IDLN_NONE,	IDLN_ANY,	IDLN_LIST,	IDLN_GENTREE,	IDLN_INTEGER,	IDLN_STRING,	IDLN_WIDE_STRING,	IDLN_CHAR,	IDLN_WIDE_CHAR,	IDLN_FIXED,	IDLN_FLOAT,	IDLN_BOOLEAN,	IDLN_IDENT,	IDLN_TYPE_DCL,	IDLN_CONST_DCL,	IDLN_EXCEPT_DCL,	IDLN_ATTR_DCL,	IDLN_OP_DCL,	IDLN_PARAM_DCL,	IDLN_FORWARD_DCL,	IDLN_TYPE_INTEGER,	IDLN_TYPE_FLOAT,	IDLN_TYPE_FIXED,	IDLN_TYPE_CHAR,	IDLN_TYPE_WIDE_CHAR,	IDLN_TYPE_STRING,	IDLN_TYPE_WIDE_STRING,	IDLN_TYPE_BOOLEAN,	IDLN_TYPE_OCTET,	IDLN_TYPE_ANY,	IDLN_TYPE_OBJECT,	IDLN_TYPE_TYPECODE,	IDLN_TYPE_ENUM,	IDLN_TYPE_SEQUENCE,	IDLN_TYPE_ARRAY,	IDLN_TYPE_STRUCT,	IDLN_TYPE_UNION,	IDLN_MEMBER,	IDLN_NATIVE,	IDLN_CASE_STMT,	IDLN_INTERFACE,	IDLN_MODULE,	IDLN_BINOP,	IDLN_UNARYOP,	IDLN_CODEFRAG,	IDLN_LAST} IDL_tree_type;IDL_IMPORT const char *			IDL_tree_type_names[];struct _IDL_tree_node {	IDL_tree_type _type;	IDL_tree up;			/* Do not recurse */	IDL_declspec_t declspec;	GHashTable *properties;	int refs;	char *_file;			/* Internal use */	int _line;			/* Internal use */	union {		struct _IDL_LIST idl_list;		struct _IDL_GENTREE idl_gentree;		struct _IDL_INTEGER idl_integer;		struct _IDL_STRING idl_string;		struct _IDL_WIDE_STRING idl_wide_string;		struct _IDL_CHAR idl_char;		struct _IDL_WIDE_CHAR idl_wide_char;		struct _IDL_FIXED idl_fixed;		struct _IDL_FLOAT idl_float;		struct _IDL_BOOLEAN idl_boolean;		struct _IDL_IDENT idl_ident;		struct _IDL_TYPE_DCL idl_type_dcl;		struct _IDL_CONST_DCL idl_const_dcl;		struct _IDL_EXCEPT_DCL idl_except_dcl;		struct _IDL_ATTR_DCL idl_attr_dcl;		struct _IDL_OP_DCL idl_op_dcl;		struct _IDL_PARAM_DCL idl_param_dcl;		struct _IDL_FORWARD_DCL idl_forward_dcl;		struct _IDL_TYPE_FLOAT idl_type_float;		struct _IDL_TYPE_FIXED idl_type_fixed;		struct _IDL_TYPE_INTEGER idl_type_integer;		struct _IDL_TYPE_ENUM idl_type_enum;		struct _IDL_TYPE_STRING idl_type_string;		struct _IDL_TYPE_WIDE_STRING idl_type_wide_string;		struct _IDL_TYPE_SEQUENCE idl_type_sequence;		struct _IDL_TYPE_ARRAY idl_type_array;		struct _IDL_TYPE_STRUCT idl_type_struct;		struct _IDL_TYPE_UNION idl_type_union;		struct _IDL_MEMBER idl_member;		struct _IDL_NATIVE idl_native;		struct _IDL_CASE_STMT idl_case_stmt;		struct _IDL_INTERFACE idl_interface;		struct _IDL_MODULE idl_module;		struct _IDL_BINOP idl_binop;		struct _IDL_UNARYOP idl_unaryop;		struct _IDL_CODEFRAG idl_codefrag;	} u;	/* Fields for application use */	guint32 flags;	gpointer data;};#define IDL_NODE_TYPE(a)		((a)->_type)#define IDL_NODE_TYPE_NAME(a)		((a)?IDL_tree_type_names[IDL_NODE_TYPE(a)]:"NULL")#define IDL_NODE_UP(a)			((a)->up)#define IDL_NODE_PROPERTIES(a)		((a)->properties)#define IDL_NODE_DECLSPEC(a)		((a)->declspec)#define IDL_NODE_REFS(a)		((a)->refs)#define IDL_NODE_IS_LITERAL(a)				\	(IDL_NODE_TYPE(a) == IDLN_INTEGER ||		\	 IDL_NODE_TYPE(a) == IDLN_STRING ||		\	 IDL_NODE_TYPE(a) == IDLN_WIDE_STRING ||	\	 IDL_NODE_TYPE(a) == IDLN_CHAR ||		\	 IDL_NODE_TYPE(a) == IDLN_WIDE_CHAR ||		\	 IDL_NODE_TYPE(a) == IDLN_FIXED ||		\	 IDL_NODE_TYPE(a) == IDLN_FLOAT ||		\	 IDL_NODE_TYPE(a) == IDLN_BOOLEAN)#define IDL_NODE_IS_TYPE(a)				\	(IDL_NODE_TYPE(a) == IDLN_TYPE_INTEGER ||	\	 IDL_NODE_TYPE(a) == IDLN_TYPE_STRING ||	\	 IDL_NODE_TYPE(a) == IDLN_TYPE_WIDE_STRING ||	\	 IDL_NODE_TYPE(a) == IDLN_TYPE_CHAR ||		\	 IDL_NODE_TYPE(a) == IDLN_TYPE_WIDE_CHAR ||	\	 IDL_NODE_TYPE(a) == IDLN_TYPE_FIXED ||		\	 IDL_NODE_TYPE(a) == IDLN_TYPE_FLOAT ||		\	 IDL_NODE_TYPE(a) == IDLN_TYPE_BOOLEAN ||	\	 IDL_NODE_TYPE(a) == IDLN_TYPE_OCTET ||		\	 IDL_NODE_TYPE(a) == IDLN_TYPE_ANY ||		\	 IDL_NODE_TYPE(a) == IDLN_TYPE_OBJECT ||	\	 IDL_NODE_TYPE(a) == IDLN_TYPE_TYPECODE ||	\	 IDL_NODE_TYPE(a) == IDLN_TYPE_ENUM ||		\	 IDL_NODE_TYPE(a) == IDLN_TYPE_ARRAY ||		\	 IDL_NODE_TYPE(a) == IDLN_TYPE_SEQUENCE ||	\	 IDL_NODE_TYPE(a) == IDLN_TYPE_STRUCT ||	\	 IDL_NODE_TYPE(a) == IDLN_TYPE_UNION)#define IDL_NODE_IS_SCOPED(a)				\	(IDL_NODE_TYPE(a) == IDLN_IDENT ||		\	 IDL_NODE_TYPE(a) == IDLN_INTERFACE ||		\	 IDL_NODE_TYPE(a) == IDLN_MODULE ||		\	 IDL_NODE_TYPE(a) == IDLN_EXCEPT_DCL ||		\	 IDL_NODE_TYPE(a) == IDLN_OP_DCL ||		\	 IDL_NODE_TYPE(a) == IDLN_TYPE_ENUM ||		\	 IDL_NODE_TYPE(a) == IDLN_TYPE_STRUCT ||	\	 IDL_NODE_TYPE(a) == IDLN_TYPE_UNION)typedef struct _IDL_ns *		IDL_ns;struct _IDL_ns {	IDL_tree global;	IDL_tree file;	IDL_tree current;	GHashTable *inhibits;	GHashTable *filename_hash;};#define IDL_NS(a)			(*(a))typedef enum {	IDL_INPUT_REASON_INIT,	IDL_INPUT_REASON_FILL,	IDL_INPUT_REASON_ABORT,	IDL_INPUT_REASON_FINISH} IDL_input_reason;union IDL_input_data {	struct {		const char *filename;	} init;	struct {		char *buffer;		size_t max_size;	} fill;};typedef int		(*IDL_input_callback)		(IDL_input_reason reason,							 union IDL_input_data *data,							 gpointer user_data);typedef int		(*IDL_msg_callback)		(int level,							 int num,							 int line,							 const char *filename,							 const char *message);typedef struct _IDL_tree_func_state	IDL_tree_func_state;typedef struct _IDL_tree_func_data	IDL_tree_func_data;/* Traversal state data.  Recursive walks chain states. */struct _IDL_tree_func_state {	IDL_tree_func_state *up;	IDL_tree start;	IDL_tree_func_data *bottom;};/* This holds a list of the up hierarchy traversed, beginning from traversal.  This is * useful since nodes referenced after initial definition will have a different traversal * path than the actual up path. */struct _IDL_tree_func_data {	IDL_tree_func_state *state;	IDL_tree_func_data *up;	IDL_tree tree;	gint step;	gpointer data;		/* Application data */};typedef gboolean	(*IDL_tree_func)		(IDL_tree_func_data *tnfd,							 gpointer user_data);extern IDL_tree		IDL_check_type_cast		(const IDL_tree var,							 IDL_tree_type type,							 const char *file,							 int line,							 const char *function);extern const char *	IDL_get_libver_string		(void);extern const char *	IDL_get_IDLver_string		(void);extern int		IDL_parse_filename		(const char *filename,							 const char *cpp_args,							 IDL_msg_callback msg_cb,							 IDL_tree *tree, IDL_ns *ns,							 unsigned long parse_flags,							 int max_msg_level);extern int		IDL_parse_filename_with_input	(const char *filename,							 IDL_input_callback input_cb,							 gpointer input_cb_user_data,							 IDL_msg_callback msg_cb,							 IDL_tree *tree, IDL_ns *ns,							 unsigned long parse_flags,							 int max_msg_level);extern int		IDL_ns_prefix			(IDL_ns ns,							 const char *s);extern void		IDL_ns_ID			(IDL_ns ns,							 const char *s);extern void		IDL_ns_version			(IDL_ns ns,							 const char *s);extern int		IDL_inhibit_get			(void);extern void		IDL_inhibit_push		(void);extern void		IDL_inhibit_pop			(void);extern void		IDL_file_set			(const char *filename,							 int line);extern void		IDL_file_get			(const char **filename,							 int *line);extern IDL_tree		IDL_get_parent_node		(IDL_tree p,							 IDL_tree_type type,							 int *scope_levels);extern IDL_tree		IDL_tree_get_scope		(IDL_tree p);extern int		IDL_tree_get_node_info		(IDL_tree tree,							 char **who,							 char **what);extern void		IDL_tree_error			(IDL_tree p,							 const char *fmt,							 ...)							G_GNUC_PRINTF (2, 3);extern void		IDL_tree_warning		(IDL_tree p,							 int level,							 const char *fmt,							 ...)							G_GNUC_PRINTF (3, 4);extern const char *	IDL_tree_property_get		(IDL_tree tree,							 const char *key);extern void		IDL_tree_property_set		(IDL_tree tree,							 const char *key,							 const char *value);extern gboolean		IDL_tree_property_remove	(IDL_tree tree,							 const char *key);extern void		IDL_tree_properties_copy	(IDL_tree from_tree,							 IDL_tree to_tree);extern void		IDL_tree_remove_inhibits	(IDL_tree *tree,							 IDL_ns ns);extern void		IDL_tree_walk			(IDL_tree p,							 IDL_tree_func_data *current,							 IDL_tree_func pre_tree_func,							 IDL_tree_func post_tree_func,							 gpointer user_data);extern void		IDL_tree_walk_in_order		(IDL_tree p,							 IDL_tree_func tree_func,							 gpointer user_data);extern void		IDL_tree_free			(IDL_tree root);extern void		IDL_tree_to_IDL			(IDL_tree p,							 IDL_ns ns,							 FILE *output,							 unsigned long output_flags);extern GString *	IDL_tree_to_IDL_string		(IDL_tree p,							 IDL_ns ns,							 unsigned long output_flags);extern gchar *		IDL_do_escapes			(const char *s);extern IDL_tree		IDL_resolve_const_exp		(IDL_tree p,							 IDL_tree_type type);extern IDL_ns		IDL_ns_new			(void);extern void		IDL_ns_free			(IDL_ns ns);extern IDL_tree		IDL_ns_resolve_this_scope_ident	(IDL_ns ns,							 IDL_tree scope,							 IDL_tree ident);extern IDL_tree		IDL_ns_resolve_ident		(IDL_ns ns,							 IDL_tree ident);extern IDL_tree		IDL_ns_lookup_this_scope	(IDL_ns ns,							 IDL_tree scope,							 IDL_tree ident,							 gboolean *conflict);extern IDL_tree		IDL_ns_lookup_cur_scope		(IDL_ns ns,							 IDL_tree ident,							 gboolean *conflict);extern IDL_tree		IDL_ns_place_new		(IDL_ns ns,							 IDL_tree ident);extern void		IDL_ns_push_scope		(IDL_ns ns,							 IDL_tree ident);extern void		IDL_ns_pop_scope		(IDL_ns ns);extern IDL_tree		IDL_ns_qualified_ident_new	(IDL_tree nsid);extern gchar *		IDL_ns_ident_to_qstring		(IDL_tree ns_ident,							 const char *join,							 int scope_levels);extern int		IDL_ns_scope_levels_from_here	(IDL_ns ns,							 IDL_tree ident,							 IDL_tree parent);extern gchar *		IDL_ns_ident_make_repo_id	(IDL_ns ns,							 IDL_tree p,							 const char *p_prefix,							 int *major,							 int *minor);#ifdef __cplusplus}#endif#endif /* __IDL_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -