摘要:
1、AddSectionDictionary(section_name) returns a sub-dictionary associated with the given section_name (for instance, dict.AddSectionDictionary("MYSECT") for a template like {{#MYSECT}}...{{/MYSECT}}... 阅读全文
posted @ 2011-09-07 18:33
浪里飞
阅读(649)
评论(0)
推荐(0)
摘要:
1、AddSectionDictionary(section_name) returns a sub-dictionary associated with the given section_name (for instance, dict.AddSectionDictionary("MYSECT") for a template like {{#MYSECT}}...{{/MYSECT}}... 阅读全文
posted @ 2011-09-07 11:49
浪里飞
阅读(456)
评论(0)
推荐(0)
摘要:
1、TemplateDictionary, 用来在主函数中扩展模板。(used to expand a template file. It is used by the main functions for expanding a template, found in template.h.)TemplateCache,模板对象的集合。TemplateNamelist provides various introspection routines on collections of Template objects.TemplateModifier and PerExpandData are 阅读全文
posted @ 2011-09-07 11:00
浪里飞
阅读(2081)
评论(0)
推荐(0)
摘要:
如下小程序,如果输入错误,不是整形,则输入的这个数会留在缓存区,没有被type取到,type输出默认值或初始值或上次取得到的值(视初始化int type = 0这一句的位置,及编译器优化时,把它放到了那里,在如下程序中,GCC有可能把其提到循环的外面)。因为缓存区中有数据,所以cin不会等待用户输入,直接去缓存中读取,发现缓存中的数据不是整形,便把这个数据流在缓存区中,如此反复。这有点类似epoll的ET模式,只要缓存中有数据,没有新的事件发生,则不会提示用户再去读,得用户把缓存中的数据全部读完才行。voidmain( void ){while(1){inttype = 0;cin >& 阅读全文
posted @ 2011-09-07 08:13
浪里飞
阅读(1010)
评论(0)
推荐(0)

浙公网安备 33010602011771号