91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡介

谷歌開發的ctemplate模版引擎,用于解析HTML,開發語言為C++。 用法:下載之后解壓,編譯,使用其中的例子測試,最后寫自己的程序。

資源截圖

代碼片段和文件信息

/*?Copyright?(c)?2007?Google?Inc.
?*?All?rights?reserved.
?*
?*?Redistribution?and?use?in?source?and?binary?forms?with?or?without
?*?modification?are?permitted?provided?that?the?following?conditions?are
?*?met:
?*
?*?????*?Redistributions?of?source?code?must?retain?the?above?copyright
?*?notice?this?list?of?conditions?and?the?following?disclaimer.
?*?????*?Redistributions?in?binary?form?must?reproduce?the?above
?*?copyright?notice?this?list?of?conditions?and?the?following?disclaimer
?*?in?the?documentation?and/or?other?materials?provided?with?the
?*?distribution.
?*?????*?Neither?the?name?of?Google?Inc.?nor?the?names?of?its
?*?contributors?may?be?used?to?endorse?or?promote?products?derived?from
?*?this?software?without?specific?prior?written?permission.
?*
?*?THIS?SOFTWARE?IS?PROVIDED?BY?THE?COPYRIGHT?HOLDERS?AND?CONTRIBUTORS
?*?“AS?IS“?AND?ANY?EXPRESS?OR?IMPLIED?WARRANTIES?INCLUDING?BUT?NOT
?*?LIMITED?TO?THE?IMPLIED?WARRANTIES?OF?MERCHANTABILITY?AND?FITNESS?FOR
?*?A?PARTICULAR?PURPOSE?ARE?DISCLAIMED.?IN?NO?EVENT?SHALL?THE?COPYRIGHT
?*?OWNER?OR?CONTRIBUTORS?BE?LIABLE?FOR?ANY?DIRECT?INDIRECT?INCIDENTAL
?*?SPECIAL?EXEMPLARY?OR?CONSEQUENTIAL?DAMAGES?(INCLUDING?BUT?NOT
?*?LIMITED?TO?PROCUREMENT?OF?SUBSTITUTE?GOODS?OR?SERVICES;?LOSS?OF?USE
?*?DATA?OR?PROFITS;?OR?BUSINESS?INTERRUPTION)?HOWEVER?CAUSED?AND?ON?ANY
?*?THEORY?OF?LIABILITY?WHETHER?IN?CONTRACT?STRICT?LIABILITY?OR?TORT
?*?(INCLUDING?NEGLIGENCE?OR?OTHERWISE)?ARISING?IN?ANY?WAY?OUT?OF?THE?USE
?*?OF?THIS?SOFTWARE?EVEN?IF?ADVISED?OF?THE?POSSIBILITY?OF?SUCH?DAMAGE.
?*?---
?*
?*?Author:?falmeida@google.com?(Filipe?Almeida)
?*/

#include?
#include?
#include?
#include?

#include?“htmlparser/statemachine.h“

/*?So?we?can?support?both?C?and?C++?compilers?we?use?the?CAST()?macro?instead
?*?of?using?C?style?casts?or?static_cast<>()?directly.
?*/
#ifdef?__cplusplus
??#define?CAST(type?expression)?(static_cast(expression))
#else
??#define?CAST(type?expression)?((type)(expression))
#endif

#ifdef?__cplusplus
namespace?HTMLPARSER_NAMESPACE?{
#endif

#define?MAX_CHAR_8BIT?256

/*?Populates?the?statemachine?definition.
?*/
void?statemachine_definition_populate(statemachine_definition?*def
??????????????????????????????????????const?int*?const*?transition_table
??????????????????????????????????????const?char*?const*?state_names)
{
??assert(def?!=?NULL);
??assert(transition_table?!=?NULL);

??def->transition_table?=?transition_table;

??def->state_names?=?state_names;
}

/*?Add‘s?the?callback?for?the?event?in_state?that?is?called?when?the
?*?statemachine?is?in?state?st.
?*
?*?This?event?is?called?everytime?the?the?statemachine?is?in?the?specified
?*?state?forevery?character?in?the?input?stream?even?if?the?state?remains
?*?the?same.
?*
?*?This?is?event?is?the?last?event?to?be?called?and?is?fired?after?both?events
?*?exit_state?and?enter_state.
?*/
void?statemachine_in_state(statemachine_definition?*def?int?st
???????????????????????????state

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2012-04-18?21:52??ctemplate-2.2\
?????文件???????33387??2012-04-18?21:49??ctemplate-2.2\config.sub
?????目錄???????????0??2012-04-18?21:52??ctemplate-2.2\doc\
?????文件???????44644??2012-04-18?21:49??ctemplate-2.2\doc\guide.html
?????文件?????????801??2012-04-18?21:49??ctemplate-2.2\doc\howto.html
?????文件???????12144??2012-04-18?21:49??ctemplate-2.2\doc\example.html
?????文件????????1992??2012-04-18?21:49??ctemplate-2.2\doc\designstyle.css
?????文件???????15878??2012-04-18?21:49??ctemplate-2.2\doc\auto_escape.html
?????文件???????71418??2012-04-18?21:49??ctemplate-2.2\doc\reference.html
?????文件???????20286??2012-04-18?21:49??ctemplate-2.2\doc\tips.html
?????文件????????2375??2012-04-18?21:49??ctemplate-2.2\doc\xss_resources.html
?????文件????????3341??2012-04-18?21:49??ctemplate-2.2\doc\index.html
?????文件???????12016??2012-04-18?21:50??ctemplate-2.2\NEWS
?????文件???????17867??2012-04-18?21:49??ctemplate-2.2\depcomp
?????文件??????????35??2012-04-18?21:49??ctemplate-2.2\AUTHORS
?????文件?????????943??2012-04-18?21:49??ctemplate-2.2\autogen.sh
?????文件???????37675??2012-04-18?21:52??ctemplate-2.2\aclocal.m4
?????目錄???????????0??2012-04-18?21:52??ctemplate-2.2\vsprojects\
?????目錄???????????0??2012-04-18?21:52??ctemplate-2.2\vsprojects\template_dictionary_unittest\
?????文件????????5582??2012-04-18?21:49??ctemplate-2.2\vsprojects\template_dictionary_unittest\template_dictionary_unittest.vcproj
?????目錄???????????0??2012-04-18?21:52??ctemplate-2.2\vsprojects\template_test_util_test\
?????文件????????5840??2012-04-18?21:49??ctemplate-2.2\vsprojects\template_test_util_test\template_test_util_test.vcproj
?????目錄???????????0??2012-04-18?21:52??ctemplate-2.2\vsprojects\generate_fsm_c_test\
?????文件????????3992??2012-04-18?21:49??ctemplate-2.2\vsprojects\generate_fsm_c_test\generate_fsm_c_test.vcproj
?????目錄???????????0??2012-04-18?21:52??ctemplate-2.2\vsprojects\template_modifiers_unittest\
?????文件????????5651??2012-04-18?21:49??ctemplate-2.2\vsprojects\template_modifiers_unittest\template_modifiers_unittest.vcproj
?????目錄???????????0??2012-04-18?21:52??ctemplate-2.2\vsprojects\template_cache_test\
?????文件????????5537??2012-04-18?21:49??ctemplate-2.2\vsprojects\template_cache_test\template_cache_test.vcproj
?????目錄???????????0??2012-04-18?21:52??ctemplate-2.2\vsprojects\libctemplate\
?????文件???????12318??2012-04-18?21:49??ctemplate-2.2\vsprojects\libctemplate\libctemplate.vcproj
?????目錄???????????0??2012-04-18?21:52??ctemplate-2.2\vsprojects\make_tpl_varname_h\
............此處省略287個文件信息

評論

共有 條評論