
boost
dreamcs
lnsjc321@126.com
展开
-
boost正则表达式入门
简洁 的 boost正则表达式 入门 文章原创 2011-07-29 10:13:17 · 1329 阅读 · 0 评论 -
boost之Tokenizer
boost Tokenizer 包提供了灵活和易用的方法来将一个字符串或其它字符序列分解成一系列单词。下面是一个简单的例子,将一个短语分解为单词。// simple_example_1.cpp#include#include#includeint main(){ using namespace std; using namespace boost; string s = "T转载 2012-01-09 09:08:36 · 810 阅读 · 0 评论 -
Boost之Variant
"The variant class template is a safe, generic, stack-based discriminated union container, offering a simple solution for manipulating an object from a heterogeneous set of types in a uniform manner.原创 2012-01-09 09:15:31 · 6185 阅读 · 0 评论 -
Boost之function
function是Boost的函数指针。//回调函数对象#include #include #include "boost/function.hpp"class notifier { typedef boost::function function_type; std::vector vec_; int value_;public: template void a转载 2012-01-09 09:25:08 · 982 阅读 · 0 评论 -
Boost学习笔记之any
any是任意对象。配合使用STL容器点,可向此容器添加任意类型的对象。#include #include #include #include #include "boost/any.hpp"using namespace std;class A{public: void some_function(){ cout << "A::some_functi原创 2012-01-04 16:03:36 · 593 阅读 · 0 评论 -
Boost学习笔记之bind
bind绑定某个类的方法,以函数的方法使用某个类的方法。一 Boost::bind 在STL中,我们经常需要使用bind1st,bind2st函数绑定器和fun_ptr,mem_fun等函数适配器,这些函数绑定器和函数适配器使用 起来比较麻烦,需要根据是全局函数还是类的成员函数,是一个参数还是多个参数等做出不同的选择,而且有些情况使用STL提供的不能满足要求,所以如果可以转载 2012-01-04 16:16:28 · 727 阅读 · 0 评论