100511 boost&tips 최성기

Download 100511 boost&tips 최성기

Post on 11-Jul-2015

1.623 views

Category:

Technology

5 download

Embed Size (px)

TRANSCRIPT

1

Boost & Tips2010-05-11agendaboost::assignboost::timerboost::formatenum ( vc++ 8.0 )assign to std::vector

boost::assignsince boost 1.32operator, / operator()

std::map

assign to std::map

queue, list, stack

http://www.boost.org/doc/libs/1_43_0/libs/assign/doc/index.html , interface design

GetTickCount()

boost::timer

timer.hppboost::format

printf() . , %s. . %s .%s, .%s %s . %d blah..strNickname.c_str() / strJobName.c_str() / strNickname.c_str() / strNickname.c_str() / strJobName.c_str() / nCharLevel / 77

1 - .($nick) ,($job) ,($lv) . . , ($nick). . ($job) .($nick), .($nick) ($job) . ($lv) blah.. 1 - boost::replace_all( strDesc, ($nick), strNick.c_str() );boost::replace_all( strDesc, ($job), strJob.c_str() );boost::replace_all( strDesc, ($lv), nCharLv ); // errorwhile( token = _strtok( szCopy ) ){ if( strcmp( token, ($nick) ) == 0 ) { // } else

2 CString::FormatMessage

CString::FormatCString::FormatVCString::FormatMessage%1!d! , . 3 boost::format , %1%. . %2% .%1%, .%1% %2% . %3% blah..strNickname / strJobName / nCharLevel / 77

boost::format, excel, lua

enum + macroMajorCode.h

#define _ENUM( id, desc ) id,

enum SomeType{#include SomeType.enum.h}

SomeType.enum.h

_ENUM( ST_ABC, )_ENUM( ST_DEF, )_ENUM( ST_GHI, )

-> -> Demofunction-try block in vc++ 7.0

for each in vc++ 8.0 ()

keyword __super in vc++ 8.0 ()

__VA_ARGS__ in vc++ 8.0

, boost:assignboost::formatboost::timerboost:threadboost::smart_ptrboost::bindfunctor boost:rambda, C++0x rambdastd::ostream class data dump systemenum : dump analysis system, bugtrap : symbol server settingDaily build & Release Tag(version) RTTI code from Gamebryo : state pattern, message pattern , and more