????C++??????????????
???????????? ???????[ 2015/3/18 11:42:44 ] ????????C++ ???? ???? ???????
??????????????????? ??????????#include
????????????? 5???????? ????ζ????5????????????????????????????????? ?????? ?????????5 ??????????2???????????
????1.??????????#include??????? ?????????? (forward declared )
????1.1??????? iostream?? ???????c++ ??????c++ primer?? ??????????????????????? iostream ????????? ????????? ???????????????????? ??????????????????? ??????ostream ????
????1.2.ostream?????????? ?滻? iosfwd ?? ????? ?????? ?????????????????????????????????? ??iosfwd ????? 678?У?????????vs2013????????????????λ??????????????????????????? ????????
????typedef basic_ostream<char?? char_traits<char> > ostream;
????inline std::ostream& operator<<( std::ostream& os??const old& old_val )
????{ return old_val.print(os); }
?????????????????????????????ostream ???? ????????#include <ostream> ?? ??????????? ????? ????????????ostream ???? ?????????????????
??????????ж?????????? std::ostream os?? ?????????????????????????????????????? ????#include ??????????? ????????????????????????????????????? class XXX; ?????????????????????????????
???????????? old.h??????????????????
// old.h: ????????????
//
#include <iosfwd> //???滻??????
#include <list>
// 5 ?? ?????file ?? db?? cx?? deduce or error ?? ??????????????
// ??? file and cx ???麯??.
#include "file.h" // class file ?? ??????????????????????????????????old ????????????????
#include "db.h" // class db?? ?????????????????
#include "cx.h" // class cx
#include "deduce.h" // class deduce
// error ?????????????????????? ??????????滻#include "error.h"
class error??
class old : public file?? private db {
public:
old( const cx& );
db get_db( int?? char* );
cx get_cx( int?? cx );
cx& fun1( db );
error fun2( error );
virtual std::ostream& print( std::ostream& ) const;
private:
std::list<cx> cx_list_; // cx ????????????????????????????????????????????????cx.h ???????????
deduce deduce_d_; // deduce ????????壬??????????????
};
inline std::ostream& operator<<( std::ostream& os??const old& old_val )
{ return old_val.print(os); }
???????????? ??????Щ???? ???????????????????????????????ж??? ???????д?????????????????д????????
??????????C++ ????и????????????? ????????????????????????????????? ????????????辶??
????2. ????????????????г?????????????? "impl" ????
????2.1.??? "impl" ?????д???????????????????????
????impl ???????????? ?????г???????????????impl ?? ????????????г??????????????impl* ???????????
????// file old.h
????class old {
????//???к???????
????// public and protected members
????private:
????//??г???? ????????????????????仯??????????????????????????old.h????????????±???
????// private members; whenever these change??
????// all client code must be recompiled
????};
??????д????????
// file old.h
class old {
//???к???????
// public and protected members
private:
class oldImpl* pimpl_;
// ?滻???????????г??????????impl?????????????????????????????????д??????????????????????????? ????????
//????????????д
// a pointer to a forward-declared class
};
// file old.cpp
struct oldImpl {
//?????????????????????? ????仯?? ?????????????????±???
// private members; fully hidden?? can be
// changed at will without recompiling clients
};
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
??C++????????????C++ lvalue??rvalueC++11????????C++???????????????C++?е?????????????????C++?????????C++???Windows????λ??C/C++???????????????????JAVA??C??C++??????????c++??python???????????????????????????????C++???????C++?е????????C++????????????????C++ ???????????????C++?????????????????????C++????????????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????