
boost
leeboy_wang
致力于大数据和信息安全发展
展开
-
boost库shared_ptr实现桥接模式
shared_ptr原创 2014-10-11 10:58:35 · 1342 阅读 · 0 评论 -
boost库安装与测试
在网上找了半天都不好用,这个真好用!!!开始编译,全部编译耗时太多,所以我仅选择我需要的库:先用下面的命令查看有多少库可以编译:./bootstrap.sh --show-librariesBuilding Boost.Build engine with toolset gcc... tools/build/v2/engine/bin.linuxx86_64/b2The fol原创 2014-09-23 10:40:14 · 1818 阅读 · 0 评论 -
boost库之bind(与function配合使用)
// FirstTest.cpp : 定义控制台应用程序的入口点。//bind(&mem,&obj, _1):类成员方法地址,对象地址,_1是占位符//同一个类的不同对象可以delegate给不同的实现,从而实现不同的行为(myan语)#include "stdafx.h"#include #include #include #include using namespace s原创 2015-02-28 14:26:26 · 857 阅读 · 0 评论 -
boost库之function
// FirstTest.cpp : 定义控制台应用程序的入口点。//function 存放方法的地址,函数的包装器(function wrapper)//*iterator1 内容为参数传入function#include "stdafx.h"#include #include #include using namespace std;using namespace boos原创 2015-02-28 13:52:56 · 841 阅读 · 0 评论 -
boost库之ptree解析xml
// FirstTest.cpp : 定义控制台应用程序的入口点。//ptree解析xml#include "stdafx.h"#include #include #include #include using namespace boost::property_tree; using namespace std; void ReadConfig()转载 2015-02-28 17:40:35 · 5117 阅读 · 0 评论 -
boost库之ptree的ini配置文件解析
// FirstTest.cpp : 定义控制台应用程序的入口点。//ptree解析ini文件,get(treename, translator) :translator类型实例#include "stdafx.h"#include #include #include using namespace std; int main(){ boost::property原创 2015-03-02 10:15:50 · 4802 阅读 · 0 评论 -
boost库之uuid
// FirstTest.cpp : 定义控制台应用程序的入口点。//UUID是University Unique Identifier的缩写,它是一个128位的数字(16字节),不需要有一个中央认证机构就可以创建全国唯一的标示符。别名:GUID#include "stdafx.h"#include #include #include #include #include #inc原创 2015-03-02 15:09:06 · 6253 阅读 · 0 评论 -
boost库之aiso通信
#include "stdafx.h"#include #include #include #include #include using boost::asio::ip::tcp;#define max_len 1024class clientSession :public boost::enable_shared_from_this{public: clientS原创 2015-03-03 19:32:51 · 1099 阅读 · 0 评论 -
boost库timed_wait、notify_one配合使用
// scoped_lock使用 //timed_wait、notify_one配合使用,阻塞等到,接收到消息自动运行相当于消息锁//// #include "stdafx.h" #include #include #include #include #include #includeusing namespace std;using namespace boost;原创 2015-03-10 10:33:44 · 7999 阅读 · 0 评论