网站公告列表

  没有公告

加入收藏
设为首页
联系站长
您现在的位置: 网络学院 >> 程序设计 >> VC编程 >> 文章正文
  chapter one            【字体:
chapter one
作者:佚名    文章来源:不详    点击数:    更新时间:2007-9-12    
正在装载数据……
A type, as manipulated by the Glib type system, is much more generic than what is usually understood as an Object type. It is best explained by looking at the structure and the functions used to register new types in the type system.

typedef struct _GTypeInfo               GTypeInfo;
struct _GTypeInfo
{
  
/* interface types, classed types, instantiated types */
  guint16                class_size;
  
  GBaseInitFunc          base_init;
  GBaseFinalizeFunc      base_finalize;
  
  
/* classed types, instantiated types */
  GClassInitFunc         class_init;
  GClassFinalizeFunc     class_finalize;
  gconstpointer          class_data;
  
  
/* instantiated types */
  guint16                instance_size;
  guint16                n_divallocs;
  GInstanceInitFunc      instance_init;
  
  
/* value handling */
  
const GTypeValueTable *value_table;
}
;
GType g_type_register_static (GType             parent_type,
                              
const gchar      *type_name,
                              
const GTypeInfo  *info,
                              GTypeFlags        flags);
GType g_type_register_fundamental (GType                       type_id,
                                   
const gchar                *type_name,
                                   
const GTypeInfo            *info,
                                   
const GTypeFundamentalInfo *finfo,
                                   GTypeFlags                  flags);

A  Glib dynamic type is define in structure GTypeInfo, which

class size: the class_size field in GTypeInfo.
class initialization functions (C++ constructor): the base_init and class_init fields in GTypeInfo.
class destruction functions (C++ destructor): the base_finalize and class_finalize fields in GTypeInfo.
instance size (C++ parameter to new): the instance_size field in GTypeInfo.
instanciation policy (C++ type of new operator): the n_divallocs field in GTypeInfo.
copy functions (C++ copy operators): the value_table field in GTypeInfo.
type characteristic flags: GTypeFlags.



本文来源:http://blog.csdn.net/overthere/archive/2007/08/23/1756167.aspx
站内文章搜索 高级搜索
文章录入:admin    责任编辑:admin 
  • 上一篇文章:

  • 下一篇文章:
  • 发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
    最新热点 最新推荐 相关文章
     directx 图形接口指南(…
     win2k下的api函数的拦截
     用crypto  api  实现公钥…
     根据别人的md5源码封装的…
     vc中使用gdi+合并jpg图片
     document/view的交互 --…
     windows下的函数hook技术
     windows api函数大全一
     用vc 6.0实现串行通信的…
     vc++技术内幕(第四版)…
  • page、request、session、ap…

  • HashTable和HashMap; Vecto…

  • 关于java Applet

  • Hashtable 排序

  • 浅析Spring框架下PropertyPl…

  • SPRING+STRUTS+HIBERNATE登录…

  • jmf摄像头applet

  • SIP简介,第2部分:SIP SERV…

  • 摘:主题:   using springmo…

  • JavaWeb中的Session、Sessio…

  •   网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)
    网络学院©2007 www.23book.net
    为您提供web编程,vb编程,vc编程,服务器架设管理,数据库设计等方面的知识 站长:David