2008年12月21日

Boost::Asio::Basic

摘要: Your program will have at least one io_service object. The io_service represents your program's link to the operating system's I/O services.boost::asio::io_service io_service;To perform I/O operations... 阅读全文

posted @ 2008-12-21 22:33 壶中仙 阅读(1303) 评论(1) 推荐(0)

Gtkmm::View[2]

摘要: More than one Model Column per View ColumnTo render more than one model column in a view column, you need to create the TreeView::Column widget manually, and usepack_start()to add the model columns to... 阅读全文

posted @ 2008-12-21 01:47 壶中仙 阅读(228) 评论(0) 推荐(0)

2008年12月20日

GTkmm::The View[1]

摘要: 鉴于要赶紧的能作出点成果来,container这部分就直接跳过了。。。看View了, TreeView The View is the actual widget (Gtk::TreeView) that displays the model (Gtk::TreeModel) data and allows the user to interact with it. The View can sh... 阅读全文

posted @ 2008-12-20 23:44 壶中仙 阅读(438) 评论(0) 推荐(0)

Gtkmm:: Basics Signals&Handler Widgets Adjustments

摘要: Widgets: gtkmm applications consist of windows containing widgets, such as buttons and text boxes. In some other systems, widgets are called "controls". For each widget in your application's windows... 阅读全文

posted @ 2008-12-20 01:40 壶中仙 阅读(935) 评论(1) 推荐(0)

2008年12月18日

Boost::Filesystem

摘要: ZZ:http://www.ibm.com/developerworks/cn/aix/library/au-boostfs/#resources 对于 I/O 操作较多的程序,这样的不一致就意味着需要进行大量的工程工作才能在平台间移植代码。正是因为这个原因,我们才引入了 Boost Filesystem Library。这个广泛使用的库提供了安全、可移植且易用的 C++ 接口,用于执行文件系... 阅读全文

posted @ 2008-12-18 13:20 壶中仙 阅读(6344) 评论(0) 推荐(0)

ZZ:深入理解new

摘要: new的过程 当我们使用关键字new在堆上动态创建一个对象时,它实际上做了三件事:获得一块内存空间、调用构造函数、返回正确的指针。当然,如果我们创建的是简单类型的变量,那么第二步会被省略。假如我们定义了如下一个类A: class A { int i; public: A(int _i) :i(_i*_i) {} void Say() { printf("i=%dn", i); ... 阅读全文

posted @ 2008-12-18 13:11 壶中仙 阅读(199) 评论(0) 推荐(0)

2008年12月17日

ZZ:Virtual Function

摘要: C++中的虚函数(virtual function) 1.简介 虚函数是C++中用于实现多态(polymorphism)的机制。核心理念就是通过基类访问派生类定义的函数。假设我们有下面的类层次: class A { public: virtual void foo() { cout foo(); // 在这里,a虽然是指向A的指针,但是被调用的函数(foo)却是B的! ... 阅读全文

posted @ 2008-12-17 22:32 壶中仙 阅读(443) 评论(0) 推荐(0)

2008年12月15日

ZZ:C++::Class Friend

摘要: 友元函数与友元类。 C++中以关键字friend声明友元关系。友元可以访问与其有friend关系的类中的私有成员。友元包括友元函数和友元类。 1.友元函数 如果在本类以外的其它地方定义了一个函数(这个函数可以是不属于任何类的非成员函数,也可以是其它类的成员函数),在类体中用friend对该函数进行声明,此函数就称为本类的友元函数。一个类的友元函数可以访问这个类中的private成员。 1.... 阅读全文

posted @ 2008-12-15 22:26 壶中仙 阅读(1007) 评论(0) 推荐(0)

导航