锘??xml version="1.0" encoding="utf-8" standalone="yes"?>日韩视频一区二区,亚洲综合三区,欧美日韩二区三区http://www.shnenglu.com/wc250en007/category/17338.html鍓嶈繘鐨勮礬涓?/description>zh-cnMon, 18 Jul 2011 14:00:33 GMTMon, 18 Jul 2011 14:00:33 GMT60luaplus鑴氭湰涓嬌鐢ㄦ垚鍛樺嚱鏁?/title><link>http://www.shnenglu.com/wc250en007/archive/2011/07/18/151300.html</link><dc:creator>Let me see see</dc:creator><author>Let me see see</author><pubDate>Mon, 18 Jul 2011 05:27:00 GMT</pubDate><guid>http://www.shnenglu.com/wc250en007/archive/2011/07/18/151300.html</guid><wfw:comment>http://www.shnenglu.com/wc250en007/comments/151300.html</wfw:comment><comments>http://www.shnenglu.com/wc250en007/archive/2011/07/18/151300.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/wc250en007/comments/commentRss/151300.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/wc250en007/services/trackbacks/151300.html</trackback:ping><description><![CDATA[<div>鍦ㄨ剼鏈腑浣跨敤綾葷殑鎴愬憳鍑芥暟 <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" alt="" /><span style="color: #000000">#include </span><span style="color: #000000">"</span><span style="color: #000000">luaplus.h</span><span style="color: #000000">"</span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff">using</span><span style="color: #000000"> </span><span style="color: #0000ff">namespace</span><span style="color: #000000"> LuaPlus;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" alt="" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" alt="" />template</span><span style="color: #000000"><</span><span style="color: #000000"> </span><span style="color: #0000ff">class</span><span style="color: #000000"> T </span><span style="color: #000000">></span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff">class</span><span style="color: #000000"> LuaExport<br /><img id="Codehighlighter1_83_1148_Open_Image" onclick="this.style.display='none'; Codehighlighter1_83_1148_Open_Text.style.display='none'; Codehighlighter1_83_1148_Closed_Image.style.display='inline'; Codehighlighter1_83_1148_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top"><img id="Codehighlighter1_83_1148_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_83_1148_Closed_Text.style.display='none'; Codehighlighter1_83_1148_Open_Image.style.display='inline'; Codehighlighter1_83_1148_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif" align="top"></span><span id="Codehighlighter1_83_1148_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_83_1148_Open_Text"><span style="color: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /></span><span style="color: #0000ff">public</span><span style="color: #000000">:<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />    LuaExport(</span><span style="color: #0000ff">const</span><span style="color: #000000"> </span><span style="color: #0000ff">char</span><span style="color: #000000">*</span><span style="color: #000000"> pszName, LuaPlus::LuaState</span><span style="color: #000000">*</span><span style="color: #000000"> pState </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">0</span><span style="color: #000000">)<br /><img id="Codehighlighter1_157_598_Open_Image" onclick="this.style.display='none'; Codehighlighter1_157_598_Open_Text.style.display='none'; Codehighlighter1_157_598_Closed_Image.style.display='inline'; Codehighlighter1_157_598_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top"><img id="Codehighlighter1_157_598_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_157_598_Closed_Text.style.display='none'; Codehighlighter1_157_598_Open_Image.style.display='inline'; Codehighlighter1_157_598_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top">    </span><span id="Codehighlighter1_157_598_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_157_598_Open_Text"><span style="color: #000000">{ <br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        </span><span style="color: #008000">//</span><span style="color: #008000">TDAssert(s_pMe == 0);</span><span style="color: #008000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /></span><span style="color: #000000">        s_pMe </span><span style="color: #000000">=</span><span style="color: #000000"> static_cast</span><span style="color: #000000"><</span><span style="color: #000000"> T</span><span style="color: #000000">*</span><span style="color: #000000"> </span><span style="color: #000000">></span><span style="color: #000000">(</span><span style="color: #0000ff">this</span><span style="color: #000000">);<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        LuaPlus::LuaState</span><span style="color: #000000">*</span><span style="color: #000000"> theState </span><span style="color: #000000">=</span><span style="color: #000000"> pState; </span><span style="color: #008000">//</span><span style="color: #008000">? pState : CScriptSystem::_GetLuaState();</span><span style="color: #008000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /></span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        s_pMetaTable </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> LuaPlus::LuaObject;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        </span><span style="color: #000000">*</span><span style="color: #000000">s_pMetaTable </span><span style="color: #000000">=</span><span style="color: #000000"> theState</span><span style="color: #000000">-></span><span style="color: #000000">GetGlobals().CreateTable(pszName);<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        s_pMetaTable</span><span style="color: #000000">-></span><span style="color: #000000">SetObject(</span><span style="color: #000000">"</span><span style="color: #000000">__index</span><span style="color: #000000">"</span><span style="color: #000000">, </span><span style="color: #000000">*</span><span style="color: #000000">s_pMetaTable);<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        LuaObject obj </span><span style="color: #000000">=</span><span style="color: #000000"> theState</span><span style="color: #000000">-></span><span style="color: #000000">BoxPointer(s_pMe);<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        obj.SetMetaTable(</span><span style="color: #000000">*</span><span style="color: #000000">s_pMetaTable);<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        theState</span><span style="color: #000000">-></span><span style="color: #000000">GetGlobals().SetObject(pszName, obj);<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />    }</span></span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />    </span><span style="color: #0000ff">virtual</span><span style="color: #000000"> </span><span style="color: #000000">~</span><span style="color: #000000">LuaExport()<br /><img id="Codehighlighter1_624_681_Open_Image" onclick="this.style.display='none'; Codehighlighter1_624_681_Open_Text.style.display='none'; Codehighlighter1_624_681_Closed_Image.style.display='inline'; Codehighlighter1_624_681_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top"><img id="Codehighlighter1_624_681_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_624_681_Closed_Text.style.display='none'; Codehighlighter1_624_681_Open_Image.style.display='inline'; Codehighlighter1_624_681_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top">    </span><span id="Codehighlighter1_624_681_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_624_681_Open_Text"><span style="color: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        delete s_pMetaTable; s_pMetaTable </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">0</span><span style="color: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        s_pMe </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">0</span><span style="color: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />    }</span></span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />    template </span><span style="color: #000000"><</span><span style="color: #0000ff">class</span><span style="color: #000000"> Callee</span><span style="color: #000000">></span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />    </span><span style="color: #0000ff">void</span><span style="color: #000000"> RegisterFunction(</span><span style="color: #0000ff">const</span><span style="color: #000000"> </span><span style="color: #0000ff">char</span><span style="color: #000000">*</span><span style="color: #000000"> pszFuncName, </span><span style="color: #0000ff">int</span><span style="color: #000000"> (Callee::</span><span style="color: #000000">*</span><span style="color: #000000">func)(LuaPlus::LuaState</span><span style="color: #000000">*</span><span style="color: #000000">))<br /><img id="Codehighlighter1_799_860_Open_Image" onclick="this.style.display='none'; Codehighlighter1_799_860_Open_Text.style.display='none'; Codehighlighter1_799_860_Closed_Image.style.display='inline'; Codehighlighter1_799_860_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top"><img id="Codehighlighter1_799_860_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_799_860_Closed_Text.style.display='none'; Codehighlighter1_799_860_Open_Image.style.display='inline'; Codehighlighter1_799_860_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top">    </span><span id="Codehighlighter1_799_860_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_799_860_Open_Text"><span style="color: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        s_pMetaTable</span><span style="color: #000000">-></span><span style="color: #000000">RegisterObjectFunctor(pszFuncName, func);<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />    }</span></span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />    </span><span style="color: #008000">//</span><span style="color: #008000">鍙栧緱鑷繁</span><span style="color: #008000"><br /><img id="Codehighlighter1_895_911_Open_Image" onclick="this.style.display='none'; Codehighlighter1_895_911_Open_Text.style.display='none'; Codehighlighter1_895_911_Closed_Image.style.display='inline'; Codehighlighter1_895_911_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top"><img id="Codehighlighter1_895_911_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_895_911_Closed_Text.style.display='none'; Codehighlighter1_895_911_Open_Image.style.display='inline'; Codehighlighter1_895_911_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top"></span><span style="color: #000000">    </span><span style="color: #0000ff">static</span><span style="color: #000000"> T</span><span style="color: #000000">*</span><span style="color: #000000"> GetMe(</span><span style="color: #0000ff">void</span><span style="color: #000000">)  </span><span id="Codehighlighter1_895_911_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_895_911_Open_Text"><span style="color: #000000">{ </span><span style="color: #0000ff">return</span><span style="color: #000000"> s_pMe; }</span></span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /></span><span style="color: #0000ff">protected</span><span style="color: #000000">:<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />    </span><span style="color: #0000ff">static</span><span style="color: #000000"> T</span><span style="color: #000000">*</span><span style="color: #000000">                    s_pMe;            </span><span style="color: #008000">//</span><span style="color: #008000">鑷韓瀹炰緥錛屽叏灞鍙橀噺</span><span style="color: #008000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /></span><span style="color: #000000">    </span><span style="color: #0000ff">static</span><span style="color: #000000"> LuaPlus::LuaObject</span><span style="color: #000000">*</span><span style="color: #000000">    s_pMetaTable;    </span><span style="color: #008000">//</span><span style="color: #008000">MetaTable</span><span style="color: #008000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /></span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /></span><span style="color: #0000ff">private</span><span style="color: #000000">:<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />    </span><span style="color: #008000">//</span><span style="color: #008000"> unimplemented constructors / assignment</span><span style="color: #008000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /></span><span style="color: #000000">    LuaExport(</span><span style="color: #0000ff">const</span><span style="color: #000000"> LuaExport</span><span style="color: #000000">&</span><span style="color: #000000"> obj);<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />    LuaExport</span><span style="color: #000000">&</span><span style="color: #000000"> </span><span style="color: #0000ff">operator</span><span style="color: #000000">=</span><span style="color: #000000">(</span><span style="color: #0000ff">const</span><span style="color: #000000"> LuaExport</span><span style="color: #000000">&</span><span style="color: #000000"> obj);<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" alt="" />}</span></span><span style="color: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" alt="" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff">extern</span><span style="color: #000000"> LuaPlus::LuaState</span><span style="color: #000000">*</span><span style="color: #000000"> GetLuaState();</span></div><br />// 嫻嬭瘯main.cpp<br /><br /> <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" alt="" /><span style="color: #0000ff">class</span><span style="color: #000000"> player : </span><span style="color: #0000ff">public</span><span style="color: #000000"> LuaExport</span><span style="color: #000000"><</span><span style="color: #000000"> player </span><span style="color: #000000">></span><span style="color: #000000"><br /><img id="Codehighlighter1_42_652_Open_Image" onclick="this.style.display='none'; Codehighlighter1_42_652_Open_Text.style.display='none'; Codehighlighter1_42_652_Closed_Image.style.display='inline'; Codehighlighter1_42_652_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top"><img id="Codehighlighter1_42_652_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_42_652_Closed_Text.style.display='none'; Codehighlighter1_42_652_Open_Image.style.display='inline'; Codehighlighter1_42_652_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif" align="top"></span><span id="Codehighlighter1_42_652_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_42_652_Open_Text"><span style="color: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /></span><span style="color: #0000ff">public</span><span style="color: #000000">:<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />    player():<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />      LuaExport</span><span style="color: #000000"><</span><span style="color: #000000"> player </span><span style="color: #000000">></span><span style="color: #000000">( </span><span style="color: #000000">"</span><span style="color: #000000">pp</span><span style="color: #000000">"</span><span style="color: #000000">, GetLuaState() )<br /><img id="Codehighlighter1_112_118_Open_Image" onclick="this.style.display='none'; Codehighlighter1_112_118_Open_Text.style.display='none'; Codehighlighter1_112_118_Closed_Image.style.display='inline'; Codehighlighter1_112_118_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top"><img id="Codehighlighter1_112_118_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_112_118_Closed_Text.style.display='none'; Codehighlighter1_112_118_Open_Image.style.display='inline'; Codehighlighter1_112_118_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top">      </span><span id="Codehighlighter1_112_118_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_112_118_Open_Text"><span style="color: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />      }</span></span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />      </span><span style="color: #0000ff">int</span><span style="color: #000000"> LS_PrintNumber(LuaState</span><span style="color: #000000">*</span><span style="color: #000000"> state)<br /><img id="Codehighlighter1_163_379_Open_Image" onclick="this.style.display='none'; Codehighlighter1_163_379_Open_Text.style.display='none'; Codehighlighter1_163_379_Closed_Image.style.display='inline'; Codehighlighter1_163_379_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top"><img id="Codehighlighter1_163_379_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_163_379_Closed_Text.style.display='none'; Codehighlighter1_163_379_Open_Image.style.display='inline'; Codehighlighter1_163_379_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top">      </span><span id="Codehighlighter1_163_379_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_163_379_Open_Text"><span style="color: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />          LuaStack args(state);<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /><br /><img id="Codehighlighter1_220_269_Open_Image" onclick="this.style.display='none'; Codehighlighter1_220_269_Open_Text.style.display='none'; Codehighlighter1_220_269_Closed_Image.style.display='inline'; Codehighlighter1_220_269_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top"><img id="Codehighlighter1_220_269_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_220_269_Closed_Text.style.display='none'; Codehighlighter1_220_269_Open_Image.style.display='inline'; Codehighlighter1_220_269_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top">          </span><span style="color: #0000ff">if</span><span style="color: #000000"> (args[</span><span style="color: #000000">2</span><span style="color: #000000">].IsNumber()) </span><span id="Codehighlighter1_220_269_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_220_269_Open_Text"><span style="color: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />              printf(</span><span style="color: #000000">"</span><span style="color: #000000">%f\n</span><span style="color: #000000">"</span><span style="color: #000000">, args[</span><span style="color: #000000">2</span><span style="color: #000000">].GetNumber());<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />          }</span></span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />          </span><span style="color: #0000ff">else</span><span style="color: #000000"> </span><span style="color: #0000ff">if</span><span style="color: #000000"> ( args[</span><span style="color: #000000">2</span><span style="color: #000000">].IsString() )<br /><img id="Codehighlighter1_310_360_Open_Image" onclick="this.style.display='none'; Codehighlighter1_310_360_Open_Text.style.display='none'; Codehighlighter1_310_360_Closed_Image.style.display='inline'; Codehighlighter1_310_360_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top"><img id="Codehighlighter1_310_360_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_310_360_Closed_Text.style.display='none'; Codehighlighter1_310_360_Open_Image.style.display='inline'; Codehighlighter1_310_360_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top">          </span><span id="Codehighlighter1_310_360_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_310_360_Open_Text"><span style="color: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />              printf(</span><span style="color: #000000">"</span><span style="color: #000000">%s\n</span><span style="color: #000000">"</span><span style="color: #000000">, args[</span><span style="color: #000000">2</span><span style="color: #000000">].GetString() );<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />          }</span></span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />          </span><span style="color: #0000ff">return</span><span style="color: #000000"> </span><span style="color: #000000">0</span><span style="color: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />      }</span></span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />      </span><span style="color: #0000ff">int</span><span style="color: #000000"> UI_SetTipText( lua_State </span><span style="color: #000000">*</span><span style="color: #000000">state )<br /><img id="Codehighlighter1_425_649_Open_Image" onclick="this.style.display='none'; Codehighlighter1_425_649_Open_Text.style.display='none'; Codehighlighter1_425_649_Closed_Image.style.display='inline'; Codehighlighter1_425_649_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top"><img id="Codehighlighter1_425_649_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_425_649_Closed_Text.style.display='none'; Codehighlighter1_425_649_Open_Image.style.display='inline'; Codehighlighter1_425_649_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top">      </span><span id="Codehighlighter1_425_649_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_425_649_Open_Text"><span style="color: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />          LuaStack args(state);<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />          </span><span style="color: #0000ff">if</span><span style="color: #000000"> ( args[</span><span style="color: #000000">2</span><span style="color: #000000">].IsString() )<br /><img id="Codehighlighter1_487_629_Open_Image" onclick="this.style.display='none'; Codehighlighter1_487_629_Open_Text.style.display='none'; Codehighlighter1_487_629_Closed_Image.style.display='inline'; Codehighlighter1_487_629_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top"><img id="Codehighlighter1_487_629_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_487_629_Closed_Text.style.display='none'; Codehighlighter1_487_629_Open_Image.style.display='inline'; Codehighlighter1_487_629_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top">          </span><span id="Codehighlighter1_487_629_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_487_629_Open_Text"><span style="color: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />              </span><span style="color: #0000ff">const</span><span style="color: #000000"> </span><span style="color: #0000ff">char</span><span style="color: #000000"> </span><span style="color: #000000">*</span><span style="color: #000000">szData </span><span style="color: #000000">=</span><span style="color: #000000"> args[</span><span style="color: #000000">2</span><span style="color: #000000">].GetString();</span><span style="color: #008000">//</span><span style="color: #008000">lua_tostring(state, 1);</span><span style="color: #008000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /></span><span style="color: #000000">              </span><span style="color: #0000ff">if</span><span style="color: #000000">( szData )<br /><img id="Codehighlighter1_584_623_Open_Image" onclick="this.style.display='none'; Codehighlighter1_584_623_Open_Text.style.display='none'; Codehighlighter1_584_623_Closed_Image.style.display='inline'; Codehighlighter1_584_623_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top"><img id="Codehighlighter1_584_623_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_584_623_Closed_Text.style.display='none'; Codehighlighter1_584_623_Open_Image.style.display='inline'; Codehighlighter1_584_623_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top">              </span><span id="Codehighlighter1_584_623_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_584_623_Open_Text"><span style="color: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />                  printf(</span><span style="color: #000000">"</span><span style="color: #000000">%s\n</span><span style="color: #000000">"</span><span style="color: #000000">, szData );<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />              }</span></span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />          }</span></span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />          </span><span style="color: #0000ff">return</span><span style="color: #000000"> </span><span style="color: #000000">0</span><span style="color: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />      }</span></span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" alt="" />}</span></span><span style="color: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" alt="" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" alt="" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" alt="" />player</span><span style="color: #000000">*</span><span style="color: #000000">    LuaExport</span><span style="color: #000000"><</span><span style="color: #000000"> player </span><span style="color: #000000">></span><span style="color: #000000">::s_pMe </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">0</span><span style="color: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" alt="" />LuaPlus::LuaObject</span><span style="color: #000000">*</span><span style="color: #000000"> LuaExport</span><span style="color: #000000"><</span><span style="color: #000000"> player </span><span style="color: #000000">></span><span style="color: #000000">::s_pMetaTable </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">0</span><span style="color: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" alt="" /><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff">int</span><span style="color: #000000"> _tmain(</span><span style="color: #0000ff">int</span><span style="color: #000000"> argc, _TCHAR</span><span style="color: #000000">*</span><span style="color: #000000"> argv[])<br /><img id="Codehighlighter1_794_1147_Open_Image" onclick="this.style.display='none'; Codehighlighter1_794_1147_Open_Text.style.display='none'; Codehighlighter1_794_1147_Closed_Image.style.display='inline'; Codehighlighter1_794_1147_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top"><img id="Codehighlighter1_794_1147_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_794_1147_Closed_Text.style.display='none'; Codehighlighter1_794_1147_Open_Image.style.display='inline'; Codehighlighter1_794_1147_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif" align="top"></span><span id="Codehighlighter1_794_1147_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_794_1147_Open_Text"><span style="color: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />    player</span><span style="color: #000000">*</span><span style="color: #000000"> pPlayer </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> player();<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />    pPlayer</span><span style="color: #000000">-></span><span style="color: #000000">RegisterFunction( </span><span style="color: #000000">"</span><span style="color: #000000">PrintNumber</span><span style="color: #000000">"</span><span style="color: #000000">, </span><span style="color: #000000">&</span><span style="color: #000000">player::LS_PrintNumber );<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />    pPlayer</span><span style="color: #000000">-></span><span style="color: #000000">RegisterFunction( </span><span style="color: #000000">"</span><span style="color: #000000">SetTips</span><span style="color: #000000">"</span><span style="color: #000000">, </span><span style="color: #000000">&</span><span style="color: #000000">player::LS_PrintNumber );<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />    </span><span style="color: #008000">//</span><span style="color: #008000"> Register your functions.</span><span style="color: #008000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /></span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />    </span><span style="color: #0000ff">int</span><span style="color: #000000"> nRet </span><span style="color: #000000">=</span><span style="color: #000000"> GetLuaState()</span><span style="color: #000000">-></span><span style="color: #000000">DoFile( </span><span style="color: #000000">"</span><span style="color: #000000">main.lua</span><span style="color: #000000">"</span><span style="color: #000000"> );<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />    </span><span style="color: #0000ff">if</span><span style="color: #000000"> (  nRet )<br /><img id="Codehighlighter1_1058_1122_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1058_1122_Open_Text.style.display='none'; Codehighlighter1_1058_1122_Closed_Image.style.display='inline'; Codehighlighter1_1058_1122_Closed_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top"><img id="Codehighlighter1_1058_1122_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_1058_1122_Closed_Text.style.display='none'; Codehighlighter1_1058_1122_Open_Image.style.display='inline'; Codehighlighter1_1058_1122_Open_Text.style.display='inline';" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top">    </span><span id="Codehighlighter1_1058_1122_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://www.shnenglu.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_1058_1122_Open_Text"><span style="color: #000000">{<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        printf(</span><span style="color: #000000">"</span><span style="color: #000000">閿欒淇℃伅: %s</span><span style="color: #000000">"</span><span style="color: #000000">, GetLuaState()</span><span style="color: #000000">-></span><span style="color: #000000">StackTop().GetString());<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />    }</span></span><span style="color: #000000"><br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />    getchar();<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />    </span><span style="color: #0000ff">return</span><span style="color: #000000"> </span><span style="color: #000000">0</span><span style="color: #000000">;<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" alt="" />}</span></span></div><br />// main.lua<br />    <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" alt="" /><span style="color: #000000">pp.PrintNumber(</span><span style="color: #000000">1000</span><span style="color: #000000">)<br /><img src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span></div><br /><br />1.闇瑕佹敞鎰忕殑鏄紝綾葷殑鎴愬憳鍑芥暟涓殑鍙傛暟  榛樿絎竴涓負(fù)this<br />鎵浠?瑕佹椿寰楀弬鏁扮殑鏃跺?涓嬫爣榛樿鍔?<br /> if (args[2].IsNumber()) <br />{<br />     printf("%f\n", args[2].GetNumber());<br /> }<br /><br /><br /><br /></div><img src ="http://www.shnenglu.com/wc250en007/aggbug/151300.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/wc250en007/" target="_blank">Let me see see</a> 2011-07-18 13:27 <a href="http://www.shnenglu.com/wc250en007/archive/2011/07/18/151300.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>luaplus涓婃墜 (杞?http://www.shnenglu.com/wc250en007/archive/2011/07/18/151284.htmlLet me see seeLet me see seeMon, 18 Jul 2011 02:10:00 GMThttp://www.shnenglu.com/wc250en007/archive/2011/07/18/151284.htmlhttp://www.shnenglu.com/wc250en007/comments/151284.htmlhttp://www.shnenglu.com/wc250en007/archive/2011/07/18/151284.html#Feedback0http://www.shnenglu.com/wc250en007/comments/commentRss/151284.htmlhttp://www.shnenglu.com/wc250en007/services/trackbacks/151284.html

浣滆?    澶у疂澶╁ぉ瑙?/span>

http://www.shnenglu.com/singohgod

 

 

鐨勮祫鏂欏疄鍦ㄦ槸澶皯,鐨?/span>C++鐪熸槸濡傚悓澶ф搗鎹為拡.鍦ㄩ夋嫨涓婇鏈夎鍒虹殑鍛抽亾,LuaBind鍔犱笂緗戝弸棰囨湁寰瘝,鏈潵鏈夋湅鍙嬫帹鑽?/span>,瀹樼綉灝辨槸鎵撲笉寮,灝卞彧鏈?/span>LuaPlus鐪嬪埌涓浜涗漢鐨勮瘎浠瘋繕琛?/span>,LuaPlus榪炴庝箞閰嶇疆鎬庝箞璋冭瘯絳変粈涔堥兘娌℃湁,鍟婂摕,闅鵑亾鍙堝彧鏈夌‖鐫澶寸毊涓婁簡(jiǎn)?(浣嗗嚒鏉板嚭鐨勪簨閮芥槸紜潃澶寸毊騫插嚭鏉ユ淮)

璦褰掓浼?/span>,濡備綍緙栬瘧

1.       棣栧厛鍒板畼鏂圭綉绔欎笅杞?/span>: http://www.luaplus.org/

http://luaplus.org/LuaPlus51_Build1100.zip (褰撶劧瓚婃柊瓚婂ソ)

 

2.       瑙e紑涓嬭澆鍖?/span>,閲岄潰鏄叏閮ㄦ簮鏂囦歡,src鐨勬簮鏂囦歡.婧愭枃浠朵腑甯︿簡(jiǎn)涓浜涗笉闇瑕佺殑鏂囦歡,鍩烘湰涓婇渶瑕佷互涓嬭繖浜涙枃浠?/span>:

1)      Lua

lapi.c

lapi.h

lauxlib.c

lauxlib.h

lbaselib.c

lcode.c

lcode.h

ldblib.c

ldebug.c

ldebug.h

ldo.c

ldo.h

ldump.c

lfunc.c

lfunc.h

lgc.c

lgc.h

linit.c

liolib.c

llex.c

llex.h

llimits.h

lmathlib.c

lmem.c

lmem.h

loadlib.c

lobject.c

lobject.h

lopcodes.c

lopcodes.h

loslib.c

lparser.c

lparser.h

lstate.c

lstate.h

lstring.c

lstring.h

lstrlib.c

ltable.c

ltable.h

ltablib.c

ltm.c

ltm.h

lua.h

luaconf.h

lualib.h

lundump.c

lundump.h

lvm.c

lvm.h

lzio.c

lzio.h

print.c

 

2)      LuaPlus

auxiliar.h

LuaAutoBlock.h

LuaCall.h

LuaFunction.h

LuaHelper.h

LuaHelper_Object.h

LuaHelper_StackObject.h

LuaLink.h

LuaObject.h

LuaObject.inl

LuaPlus.h

LuaPlusCD.h

LuaPlusFunctions.h

LuaPlusInternal.h

LuaStackObject.h

LuaStackObject.inl

LuaStackTableIterator.h

LuaState.h

LuaState.inl

LuaStateOutFile.h

LuaTableIterator.h

luathread.h

pt.h

srm.h

 

3)      LuaPlus

LuaCall.cpp

LuaObject.cpp

LuaPlus.cpp

LuaPlusAddons.c

LuaPlusFunctions.cpp

LuaPlus_Libs.cpp

LuaStackObject.cpp

LuaStackTableIterator.cpp

LuaState.cpp

LuaStateOutFile.cpp

LuaState_DumpObject.cpp

LuaTableIterator.cpp

lwstrlib.c

 

 

3.       鐒跺悗浣犲氨鍙互鍦?/span>VS闈?rùn)鎬侀摼鎺ュ簱鐨?/span>:

涔嬪悗緙栬瘧,濡備綍浣跨敤

1.浣犵殑欏圭洰鍙兘鏄繖鏍風(fēng)殑:

鐨勪緷璧栭」鏄?/span>LuaPlusLib

#include "LuaPlus.h"

using namespace LuaPlus;

2.LuaStateOwner state;

 

3.int iret = state->DoFile("test.lua");

琛ㄧず鎴愬姛, 

4.C++Lua鍋囪浣犵殑test.lua閫氳繃涓嬪垪鏂規(guī)硶灝卞彲浠ュ湪C++int mytest = state->GetGlobal("health").GetInteger();

 

5.C++Lua鍋囪浣犵殑test.luafunction Add(x, y)

       return x+y;

end

涓渶瑕佸厛澹版槑榪欎釜鍑芥暟:

LuaFunction<float> Add =  state->GetGlobal("Add");

榪欎釜鍑芥暟,float myret = Add(3.14f,5.25f);

 

6.LuaC++鍦ㄨ鍙?/span>test.lua鍑芥暟娉ㄥ唽鍒?/span>Lua榪欐牱鍦ㄦ墽琛?/span>lua鎵嶇煡閬撴墽琛屽摢涓涓嚱鏁?/span>:

int LS_PrintNumber(LuaState* state)

{

LuaStack args(state);

 

       if (args[1].IsNumber()) {

              printf("%f\n", args[1].GetNumber());

       }

       return 0;

}

state->GetGlobals().Register("PrintNumber", LS_PrintNumber);

鏄犲皠涓?/span>Lua鑴氭湰涓坊鍔犺皟鐢ㄨ鍙?/span>:

PrintNumber(30);

state->DoFile("test.lua");灝辨墽琛屼簡(jiǎn)C++鎬葷粨

鐨勫熀鏈厤緗柟娉曞拰浣跨敤,涓嬩竴綃囧皢浠嬬粛涓浜涢珮綰х壒鎬?/span>,涓皟璇?/span>LuaPlus浠ュ強(qiáng)瀵圭被鐨勬搷浣滅瓑.

濡傛灉榪樻湁浠諱綍鐤戦棶鍙互鐪嬬湅涓嬮潰榪欎釜綆鍗曠殑渚嬪瓙:
 /Files/singohgod/LuaPlus_Test.rar



]]>
luaplus瀛︿範(fàn)(浜? 杞?/title><link>http://www.shnenglu.com/wc250en007/archive/2011/07/18/151283.html</link><dc:creator>Let me see see</dc:creator><author>Let me see see</author><pubDate>Mon, 18 Jul 2011 02:08:00 GMT</pubDate><guid>http://www.shnenglu.com/wc250en007/archive/2011/07/18/151283.html</guid><wfw:comment>http://www.shnenglu.com/wc250en007/comments/151283.html</wfw:comment><comments>http://www.shnenglu.com/wc250en007/archive/2011/07/18/151283.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/wc250en007/comments/commentRss/151283.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/wc250en007/services/trackbacks/151283.html</trackback:ping><description><![CDATA[<span id="seisgyc" class="Apple-style-span" style="word-spacing: 0px; font: 14px/26px Arial; text-transform: none; color: rgb(51,51,51); text-indent: 0px; white-space: normal; letter-spacing: normal; background-color: rgb(255,255,255); text-align: left; orphans: 2; widows: 2; webkit-text-decorations-in-effect: none; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"> <h1 style="padding-right: 0px; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">鐢╨ua鍋氶厤緗枃浠?/h1>    鍙互鐢╨ua鍋氱▼搴忕殑閰嶇疆鏂囦歡銆?br />    LuaPlus鎻愪緵浜?jiǎn)璇诲啓lua鑴氭湰鏂囦歡鐨勫姛鑳斤紝鎴戜滑鍙互灝嗛厤緗俊鎭互Table鐨勫艦寮忓瓨鍌ㄥ湪lua鑴氭湰涓紝鐒跺悗鍒╃敤LuaPlus榪涜璇誨彇鍜屾洿鏀廣?br /> <h2 style="padding-right: 0px; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">    涓銆佸垱寤洪厤緗枃浠?/h2>    閰嶇疆鏂囦歡鍙互鐢ㄦ枃瀛楃紪杈戝櫒鍒涘緩錛屼篃鍙互鍦–++浠g爜涓垱寤恒傛垜浠厛鍦–++涓垱寤恒傚埄鐢–reateTable鍒涘緩涓涓悕涓?Window"鐨勮〃鏍鹼紝鍒╃敤LuaObject鐨凷et*鍑芥暟璁劇疆琛ㄦ牸鍐呭錛屾渶鍚庣敤DumpObject鍑芥暟淇濆瓨鍒版枃浠躲備唬鐮佸涓嬶細(xì)<br /> <div style="border-right: windowtext 0.5pt solid; padding-right: 5.4pt; background-position: 0% 50%; border-top: windowtext 0.5pt solid; padding-left: 5.4pt; background-attachment: scroll;background-image: none; padding-bottom: 4px; border-left: windowtext 0.5pt solid; width: 659px; padding-top: 4px; border-bottom: windowtext 0.5pt solid; background-color: rgb(230,230,230); background-origin: initial; background-clip: initial"> <div><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /><span style="color: rgb(0,0,255)">void</span><span style="color: rgb(0,0,0)"> SaveTable()<br /><img id="_17_431_Open_Image" style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" onclick="this.style.display='none'; document.getElementById('_17_431_Open_Text').style.display='none'; document.getElementById('_17_431_Closed_Image').style.display='inline'; document.getElementById('_17_431_Closed_Text').style.display='inline';" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" align="top"></span><span id="_17_431_Open_Text"><span style="color: rgb(0,0,0)">{<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    LuaStateOwner state;<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    LuaObject myTable </span><span style="color: rgb(0,0,0)">=</span><span style="color: rgb(0,0,0)">  state</span><span style="color: rgb(0,0,0)">-></span><span style="color: rgb(0,0,0)">GetGlobals().CreateTable(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">Window</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">);<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    myTable.SetInteger(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">width</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">, </span><span style="color: rgb(0,0,0)">640</span><span style="color: rgb(0,0,0)">);<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    myTable.SetInteger(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">height</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">, </span><span style="color: rgb(0,0,0)">480</span><span style="color: rgb(0,0,0)">);<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    myTable.SetString(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">title</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">, </span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">My First Window</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">);<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    myTable.SetBoolean(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">enabled</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">, </span><span style="color: rgb(0,0,255)">true</span><span style="color: rgb(0,0,0)">);<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    myTable.SetInteger(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">alpha</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">, </span><span style="color: rgb(0,0,0)">128</span><span style="color: rgb(0,0,0)">);<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    myTable.SetString(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">backgroundimage</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">, </span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">bg.jpg</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">);<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" /><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    state</span><span style="color: rgb(0,0,0)">-></span><span style="color: rgb(0,0,0)">DumpObject(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">FirstWindow.lua</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">, </span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">Window</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">, state</span><span style="color: rgb(0,0,0)">-></span><span style="color: rgb(0,0,0)">GetGlobals()[</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">Window</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">], </span><span style="color: rgb(0,0,0)">0</span><span style="color: rgb(0,0,0)">);<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span></span></div></div>    鐩稿叧鍑芥暟鐨勮鏄庡弬瑙佹枃妗c?br /> <h2 style="padding-right: 0px; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">    浜屻佽鍙栭厤緗枃浠?/h2>    Lua閰嶇疆鏂囦歡鐨勫姞杞藉拰鍏跺畠鑴氭湰鏂囦歡涓鏍鳳紝鍙互鐢―oFile鍑芥暟錛岀劧鍚庡彲浠ョ敤GetGlobals鍔犵儲(chǔ)寮曠殑褰㈠紡鑾峰彇琛ㄦ牸LuaObject瀵硅薄錛屾渶鍚庣敤[ ]璁塊棶琛ㄦ牸鐨勫厓绱犮備唬鐮佸涓嬶細(xì)<br /> <div style="border-right: windowtext 0.5pt solid; padding-right: 5.4pt; background-position: 0% 50%; border-top: windowtext 0.5pt solid; padding-left: 5.4pt; background-attachment: scroll;background-image: none; padding-bottom: 4px; border-left: windowtext 0.5pt solid; width: 659px; padding-top: 4px; border-bottom: windowtext 0.5pt solid; background-color: rgb(230,230,230); background-origin: initial; background-clip: initial"> <div><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /><span style="color: rgb(0,0,255)">void</span><span style="color: rgb(0,0,0)"> ReadShowTable()<br /><img id="_21_603_Open_Image" style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" onclick="this.style.display='none'; document.getElementById('_21_603_Open_Text').style.display='none'; document.getElementById('_21_603_Closed_Image').style.display='inline'; document.getElementById('_21_603_Closed_Text').style.display='inline';" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" align="top"></span><span id="_21_603_Open_Text"><span style="color: rgb(0,0,0)">{<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    LuaStateOwner state;<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    state</span><span style="color: rgb(0,0,0)">-></span><span style="color: rgb(0,0,0)">DoFile(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">FirstWindow.lua</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">);<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    LuaObject myTable </span><span style="color: rgb(0,0,0)">=</span><span style="color: rgb(0,0,0)"> state</span><span style="color: rgb(0,0,0)">-></span><span style="color: rgb(0,0,0)">GetGlobals()[</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">Window</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">];<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" /><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    </span><span style="color: rgb(0,128,0)">//</span><span style="color: rgb(0,128,0)">get Window Table's item</span><span style="color: rgb(0,128,0)"><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" /></span><span style="color: rgb(0,0,0)">    printf(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">Window Table in FirstWindow.lua:<span id="myeayyo" class="Apple-converted-space"> </span></span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">);<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    printf(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)"> width = %d<span id="scieyww" class="Apple-converted-space"> </span></span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">, myTable[</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">width</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">].GetInteger() );<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    printf(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)"> height = %d<span id="uewyqoo" class="Apple-converted-space"> </span></span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">, myTable[</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">height</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">].GetInteger() );<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    printf(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)"> title = %s<span id="oqkaeee" class="Apple-converted-space"> </span></span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">, myTable[</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">title</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">].GetString() );<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    printf(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)"> enabled = %s<span id="yoiccsi" class="Apple-converted-space"> </span></span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">, myTable[</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">enabled</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">].GetBoolean() </span><span style="color: rgb(0,0,0)">?</span><span style="color: rgb(0,0,0)"> </span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">true</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)"> : </span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">false</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)"> );<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    printf(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)"> alpha = %d<span id="cmgauay" class="Apple-converted-space"> </span></span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">, myTable[</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">alpha</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">].GetInteger());<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    printf(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)"> backgroundimage = %s<span id="aimoyqe" class="Apple-converted-space"> </span></span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">, myTable[</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">backgroundimage</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">].GetString() );<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span></span></div></div><br /> <h2 style="padding-right: 0px; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">    涓夈佹洿鏀歸厤緗枃浠?/h2>    璇誨彇閰嶇疆鏂囦歡鐨勮繃紼嬪拰涓婁竴鑺傜被浼鹼紝鏇存敼涓庝繚瀛樺拰絎竴鑺傜被浼箋備唬鐮佸涓嬶細(xì)<br /> <div style="border-right: windowtext 0.5pt solid; padding-right: 5.4pt; background-position: 0% 50%; border-top: windowtext 0.5pt solid; padding-left: 5.4pt; background-attachment: scroll;background-image: none; padding-bottom: 4px; border-left: windowtext 0.5pt solid; width: 659px; padding-top: 4px; border-bottom: windowtext 0.5pt solid; background-color: rgb(230,230,230); background-origin: initial; background-clip: initial"> <div><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /><span style="color: rgb(0,0,255)">void</span><span style="color: rgb(0,0,0)"> RewriteTableContents()<br /><img id="_28_392_Open_Image" style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" onclick="this.style.display='none'; document.getElementById('_28_392_Open_Text').style.display='none'; document.getElementById('_28_392_Closed_Image').style.display='inline'; document.getElementById('_28_392_Closed_Text').style.display='inline';" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" align="top"></span><span id="_28_392_Open_Text"><span style="color: rgb(0,0,0)">{<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" /><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    LuaStateOwner state;<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    state</span><span style="color: rgb(0,0,0)">-></span><span style="color: rgb(0,0,0)">DoFile(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">FirstWindow.lua</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">);<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    LuaObject myTable </span><span style="color: rgb(0,0,0)">=</span><span style="color: rgb(0,0,0)"> state</span><span style="color: rgb(0,0,0)">-></span><span style="color: rgb(0,0,0)">GetGlobals()[</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">Window</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">];<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    myTable.SetInteger(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">width</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">, </span><span style="color: rgb(0,0,0)">800</span><span style="color: rgb(0,0,0)">);<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    myTable.SetInteger(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">height</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">, </span><span style="color: rgb(0,0,0)">600</span><span style="color: rgb(0,0,0)">);<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    printf(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">new width=%d, height=%d<span id="scgikie" class="Apple-converted-space"> </span></span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">,myTable[</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">width</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">].GetInteger(), myTable[</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">height</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">].GetInteger());<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    state</span><span style="color: rgb(0,0,0)">-></span><span style="color: rgb(0,0,0)">DumpObject(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">FirstWindow.lua</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">, </span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">Window</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">, state</span><span style="color: rgb(0,0,0)">-></span><span style="color: rgb(0,0,0)">GetGlobals()[</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">Window</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">]);<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" /><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span></span></div></div>    鍊煎緱娉ㄦ剰鐨勬槸錛屾洿鏂伴厤緗枃浠舵椂錛屼笉鑳藉崟鐙洿鏂拌〃鏍肩殑鏌愪竴涓厓绱犮傛垜璇曢獙浜?jiǎn)涓嬪Q屽嚭閿欍備篃璁告槸鎴戠殑鏂規(guī)硶涓嶅銆傛墍浠ユ垜鐜板湪涓嬈℃洿鏂版暣涓〃鏍箋?br /><br />    涓嬮潰鏄痬ain鍑芥暟錛?br />    <div style="border-right: windowtext 0.5pt solid; padding-right: 5.4pt; background-position: 0% 50%; border-top: windowtext 0.5pt solid; padding-left: 5.4pt; background-attachment: scroll;background-image: none; padding-bottom: 4px; border-left: windowtext 0.5pt solid; width: 659px; padding-top: 4px; border-bottom: windowtext 0.5pt solid; background-color: rgb(230,230,230); background-origin: initial; background-clip: initial"> <div><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /><span style="color: rgb(0,0,255)">int</span><span style="color: rgb(0,0,0)"> _tmain(</span><span style="color: rgb(0,0,255)">int</span><span style="color: rgb(0,0,0)"> argc, _TCHAR</span><span style="color: rgb(0,0,0)">*</span><span style="color: rgb(0,0,0)"> argv[])<br /><img id="_37_381_Open_Image" style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" onclick="this.style.display='none'; document.getElementById('_37_381_Open_Text').style.display='none'; document.getElementById('_37_381_Closed_Image').style.display='inline'; document.getElementById('_37_381_Closed_Text').style.display='inline';" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" align="top"></span><span id="_37_381_Open_Text"><span style="color: rgb(0,0,0)">{<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    printf(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">now create table and save in FirstWindow.lua:<span id="eyceemk" class="Apple-converted-space"> </span></span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">);<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    SaveTable();<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" /><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    printf(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">now read table from FirstWindow.lua:<span id="goamoes" class="Apple-converted-space"> </span></span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">);<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    ReadShowTable();<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" /><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    printf(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">now retrieve the table, change the "width" and "height" value, then save:<span id="qqsuwmc" class="Apple-converted-space"> </span></span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">);<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    RewriteTableContents();<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" /><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    printf(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">now, re-read from FirstWindow.lua:<span id="skuoqyw" class="Apple-converted-space"> </span></span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">);<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    ReadShowTable();<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" /><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    </span><span style="color: rgb(0,0,255)">return</span><span style="color: rgb(0,0,0)"> </span><span style="color: rgb(0,0,0)">0</span><span style="color: rgb(0,0,0)">;<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span></span></div></div><br />    宸ョ▼鐨勮緗拰涓婁竴綃囨枃绔犱竴鏍楓?br />    F7緙栬瘧鍚嶤TRL+F5鍗沖彲鐪嬪埌榪愯緇撴灉銆?br /><br />    鍊煎緱娉ㄦ剰鐨勬槸錛宼able鍙互宓屽table銆傝繖鏍鋒垜浠究鍙互瀹炵幇澶嶆潅鐨勯厤緗枃浠躲?/span><img src ="http://www.shnenglu.com/wc250en007/aggbug/151283.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/wc250en007/" target="_blank">Let me see see</a> 2011-07-18 10:08 <a href="http://www.shnenglu.com/wc250en007/archive/2011/07/18/151283.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>luaplus瀛︿範(fàn)錛堜竴錛?杞?/title><link>http://www.shnenglu.com/wc250en007/archive/2011/07/18/151282.html</link><dc:creator>Let me see see</dc:creator><author>Let me see see</author><pubDate>Mon, 18 Jul 2011 02:07:00 GMT</pubDate><guid>http://www.shnenglu.com/wc250en007/archive/2011/07/18/151282.html</guid><wfw:comment>http://www.shnenglu.com/wc250en007/comments/151282.html</wfw:comment><comments>http://www.shnenglu.com/wc250en007/archive/2011/07/18/151282.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/wc250en007/comments/commentRss/151282.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/wc250en007/services/trackbacks/151282.html</trackback:ping><description><![CDATA[<span id="wykwyye" class="Apple-style-span" style="word-spacing: 0px; font: 14px/26px Arial; text-transform: none; color: rgb(51,51,51); text-indent: 0px; white-space: normal; letter-spacing: normal; background-color: rgb(255,255,255); text-align: left; orphans: 2; widows: 2; webkit-text-decorations-in-effect: none; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px">    鎯沖湪鎴戠殑欏圭洰涓嬌鐢↙ua鑴氭湰璇█銆傛渶鍒濈煡閬揕ua鏄氳繃CEGUI錛屽悗鏉ュ洜涓轟竴浜涘師鍥犱笉鎵撶畻浣跨敤CEGUI浜?jiǎn)锛屽彧濂藉崟鐙娇鐢↙ua銆傚湪緗戜笂鐪嬪埌LuaPlus錛岃矊浼兼瘮杈冪畝鍗曘傚湪姝よ褰曞涔?fàn)杩嚱E嬨?br />    鍙互鍒拌繖閲宧ttp://luaplus.org/tiki-index.php?page=LuaPlus+Home+Page涓嬭澆LuaPlus鐨剋in32浜岃繘鍒舵枃浠跺拰婧愮爜鍖呫備粠婧愮爜鍖呮彁鍙栧ご鏂囦歡錛屼粠浜岃繘鍒跺寘鎻愬彇DLL鏂囦歡銆?br />    LuaPlus瀵筁ua鍋氫簡(jiǎn)淇敼鍜屽皝瑁咃紝浣垮緱Lua鍜孋++鐨勪氦浜掓洿涓虹畝鍗曘傚彲浠ヤ粠涓婇潰鐨勯摼鎺ユ壘鍒板畠鐨勪粙緇嶃?br /><br />    鍏堢畝鍗曠殑鍋氫袱涓祴璇曪細(xì)錛?錛変粠C++涓皟鐢↙ua鑴氭湰涓殑鍑芥暟錛涳紙2錛変粠Lua鑴氭湰涓皟鐢–++閲岀殑鍑芥暟銆?br /><br /> <h2 style="padding-right: 0px; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">    涓銆佸伐紼嬮厤緗?/h2>    VC7.1涓柊寤簑in32鎺у埗鍙板伐紼婽estLuaPlusLib銆?br /><br />    瑙e喅鏂規(guī)瑙嗗浘涓彸閿偣鍑籘estLuaPlusLib錛岄夊睘鎬э紱閰嶇疆緇勫悎妗嗛?#8220;鎵鏈夐厤緗?#8221;錛涗緷嬈$偣鍑?#8220;閰嶇疆灞炴?#8221;銆?#8220;C/C++”銆?#8220;甯歌”錛屽湪闄勫姞鍖呭惈鐩綍閲屾坊鍔犳簮鐮佽В鍘嬪悗鎵鍦ㄧ殑璺緞錛堟垜鐨勶細(xì)E:/sources/LuaPlus/LuaPlus51_Build1100/Src/LuaPlus錛夛紱渚濇鐐瑰嚮“榪炴帴鍣?#8221;銆?#8220;甯歌”錛屽湪闄勫姞搴撶洰褰曚腑娣誨姞浜岃繘鍒跺寘瑙e帇鍚庢墍鍦ㄧ殑璺緞錛堟垜鐨勶細(xì)E:/sources/LuaPlus/LuaPlus51_Build1100_Win32/Lib/win32錛夈?br /><br />    鍦═estLuaPlusLib.cpp涓姞鍏ュ涓嬪嚑琛屼唬鐮侊紝灝嗗ご鏂囦歡鍜屽簱鏂囦歡鍔犲叆榪涙潵銆?br /><br /> <div> <div style="border-right: windowtext 0.5pt solid; padding-right: 5.4pt; background-position: 0% 50%; border-top: windowtext 0.5pt solid; padding-left: 5.4pt; background-attachment: scroll;background-image: none; padding-bottom: 4px; border-left: windowtext 0.5pt solid; width: 659px; padding-top: 4px; border-bottom: windowtext 0.5pt solid; background-color: rgb(230,230,230); background-origin: initial; background-clip: initial"> <div><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /><span style="color: rgb(0,0,0)">    #include </span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">luaplus.h</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)"><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />    </span><span style="color: rgb(0,0,255)">#if</span><span style="color: rgb(0,0,0)"> defined(DEBUG) || defined(_DEBUG)</span><span style="color: rgb(0,0,0)"><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />    </span><span style="color: rgb(0,0,255)">#pragma</span><span style="color: rgb(0,0,0)"> comment(lib, "LuaPlusD_1100.lib")</span><span style="color: rgb(0,0,0)"><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />    </span><span style="color: rgb(0,0,255)">#else</span><span style="color: rgb(0,0,0)"><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />    </span><span style="color: rgb(0,0,255)">#pragma</span><span style="color: rgb(0,0,0)"> comment(lib, "LuaPlus_1100.lib")</span><span style="color: rgb(0,0,0)"><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />    </span><span style="color: rgb(0,0,255)">#endif</span><span style="color: rgb(0,0,0)"><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />    </span><span style="color: rgb(0,0,255)">using</span><span style="color: rgb(0,0,0)"> </span><span style="color: rgb(0,0,255)">namespace</span><span style="color: rgb(0,0,0)"> LuaPlus;<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /></span></div></div><br />    宸ョ▼閰嶇疆鍩烘湰涓婂畬鎴愪簡(jiǎn)銆?/div>   <span id="qaugyye" class="Apple-converted-space"> </span><br /> <h2 style="padding-right: 0px; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">   浜屻佹祴璇曠敤Lua鑴氭湰</h2>    濡備笅寤虹珛嫻嬭瘯鐢ㄧ殑Lua鑴氭湰騫朵繚瀛樺湪浣犲嵆灝嗙敓鎴愮殑鍙墽琛屾枃浠舵墍鍦ㄧ殑鐩綍涓嬨傚悓鏃墮渶瑕佹妸浜岃繘鍒跺寘涓殑LuaPlusD_1100.dll鍜孡uaPlus_1100.dll鎷瘋礉鍒拌鐩綍涓嬨?br /> <div style="border-right: windowtext 0.5pt solid; padding-right: 5.4pt; background-position: 0% 50%; border-top: windowtext 0.5pt solid; padding-left: 5.4pt; background-attachment: scroll;background-image: none; padding-bottom: 4px; border-left: windowtext 0.5pt solid; width: 659px; padding-top: 4px; border-bottom: windowtext 0.5pt solid; background-color: rgb(230,230,230); background-origin: initial; background-clip: initial"> <div><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /><span style="color: rgb(0,0,0)">    health </span><span style="color: rgb(0,0,0)">=</span><span style="color: rgb(0,0,0)"> </span><span style="color: rgb(0,0,0)">100</span><span style="color: rgb(0,0,0)">;<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />    PrintNumber(</span><span style="color: rgb(0,0,0)">30</span><span style="color: rgb(0,0,0)">);<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /> <br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />    function Add(x, y)<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />        </span><span style="color: rgb(0,0,255)">return</span><span style="color: rgb(0,0,0)"> x </span><span style="color: rgb(0,0,0)">+</span><span style="color: rgb(0,0,0)"> y;<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" />    end<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /></span></div></div><br /> <div>    health = 100;Lua鑴氭湰涓殑鍏ㄥ眬鍙橀噺錛屽彲浠ヨC++鏂囦歡璁塊棶銆?br />    PrintNumber(30);璇ヨ鍙ヨ皟鐢–++鏂囦歡涓殑鍑芥暟錛屾墦鍗版暟瀛楀埌鎺у埗鍙扮獥鍙c?br />    function Add(x,y)澹版槑涓涓嚱鏁幫紝C++鏂囦歡浼?xì)鎵惧埌迤堣皟鐢ㄦ鍑芥暟銆?br /><br /> <h2 style="padding-right: 0px; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">    涓夈丆++瀹炵幇</h2>    鍦═estLuaPlusLib.cpp涓姞鍏ヤ笅闈袱涓嚱鏁般?br /> <div style="border-right: windowtext 0.5pt solid; padding-right: 5.4pt; background-position: 0% 50%; border-top: windowtext 0.5pt solid; padding-left: 5.4pt; background-attachment: scroll;background-image: none; padding-bottom: 4px; border-left: windowtext 0.5pt solid; width: 659px; padding-top: 4px; border-bottom: windowtext 0.5pt solid; background-color: rgb(230,230,230); background-origin: initial; background-clip: initial"> <div><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /><span style="color: rgb(0,0,255)">static</span><span style="color: rgb(0,0,0)"> </span><span style="color: rgb(0,0,255)">int</span><span style="color: rgb(0,0,0)"> PrintLSNumber(LuaState</span><span style="color: rgb(0,0,0)">*</span><span style="color: rgb(0,0,0)"> state)<br /><img id="_42_210_Open_Image" style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" onclick="this.style.display='none'; document.getElementById('_42_210_Open_Text').style.display='none'; document.getElementById('_42_210_Closed_Image').style.display='inline'; document.getElementById('_42_210_Closed_Text').style.display='inline';" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" align="top"></span><span id="_42_210_Open_Text"><span style="color: rgb(0,0,0)">{<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    LuaStack args(state);<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" /><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    </span><span style="color: rgb(0,128,0)">//</span><span style="color: rgb(0,128,0)"> Verify it is a number and print it.</span><span style="color: rgb(0,128,0)"><br /><img id="_133_175_Open_Image" style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" onclick="this.style.display='none'; document.getElementById('_133_175_Open_Text').style.display='none'; document.getElementById('_133_175_Closed_Image').style.display='inline'; document.getElementById('_133_175_Closed_Text').style.display='inline';" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif" align="top"></span><span style="color: rgb(0,0,0)">    </span><span style="color: rgb(0,0,255)">if</span><span style="color: rgb(0,0,0)"> (args[</span><span style="color: rgb(0,0,0)">1</span><span style="color: rgb(0,0,0)">].IsNumber()) </span><span id="_133_175_Open_Text"><span style="color: rgb(0,0,0)">{<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />        printf(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">%f<span id="wgqkkkq" class="Apple-converted-space"> </span></span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">, args[</span><span style="color: rgb(0,0,0)">1</span><span style="color: rgb(0,0,0)">].GetNumber());<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />    }</span></span><span style="color: rgb(0,0,0)"><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    </span><span style="color: rgb(0,128,0)">//</span><span style="color: rgb(0,128,0)"> No return values.</span><span style="color: rgb(0,128,0)"><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" /></span><span style="color: rgb(0,0,0)">    </span><span style="color: rgb(0,0,255)">return</span><span style="color: rgb(0,0,0)"> </span><span style="color: rgb(0,0,0)">0</span><span style="color: rgb(0,0,0)">;<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span></span><span style="color: rgb(0,0,0)"><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /></span><span style="color: rgb(0,0,255)">void</span><span style="color: rgb(0,0,0)"> test() <br /><img id="_227_906_Open_Image" style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" onclick="this.style.display='none'; document.getElementById('_227_906_Open_Text').style.display='none'; document.getElementById('_227_906_Closed_Image').style.display='inline'; document.getElementById('_227_906_Closed_Text').style.display='inline';" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" align="top"></span><span id="_227_906_Open_Text"><span style="color: rgb(0,0,0)">{<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    </span><span style="color: rgb(0,128,0)">//</span><span style="color: rgb(0,128,0)">Create state</span><span style="color: rgb(0,128,0)"><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" /></span><span style="color: rgb(0,0,0)">    LuaStateOwner state;<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" /><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    </span><span style="color: rgb(0,128,0)">//</span><span style="color: rgb(0,128,0)">With this the script can access our own C++ functions:</span><span style="color: rgb(0,128,0)"><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" /></span><span style="color: rgb(0,0,0)">    state</span><span style="color: rgb(0,0,0)">-></span><span style="color: rgb(0,0,0)">GetGlobals().Register(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">PrintNumber</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">, PrintLSNumber);<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" /><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    </span><span style="color: rgb(0,128,0)">//</span><span style="color: rgb(0,128,0)">Open test file:</span><span style="color: rgb(0,128,0)"><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" /></span><span style="color: rgb(0,0,0)">    </span><span style="color: rgb(0,0,255)">int</span><span style="color: rgb(0,0,0)"> iret </span><span style="color: rgb(0,0,0)">=</span><span style="color: rgb(0,0,0)"> state</span><span style="color: rgb(0,0,0)">-></span><span style="color: rgb(0,0,0)">DoFile(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">test.lua</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">);<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" /><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />     </span><span style="color: rgb(0,128,0)">//</span><span style="color: rgb(0,128,0)">Get a global variable:</span><span style="color: rgb(0,128,0)"><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" /></span><span style="color: rgb(0,0,0)">    LuaObject sObj </span><span style="color: rgb(0,0,0)">=</span><span style="color: rgb(0,0,0)"> state</span><span style="color: rgb(0,0,0)">-></span><span style="color: rgb(0,0,0)">GetGlobal(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">health</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">);<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    </span><span style="color: rgb(0,0,255)">int</span><span style="color: rgb(0,0,0)"> mytest </span><span style="color: rgb(0,0,0)">=</span><span style="color: rgb(0,0,0)"> sObj.GetInteger();<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    printf(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">init value in luascript:%d<span id="ckoqagg" class="Apple-converted-space"> </span></span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">, mytest);<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" /><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    </span><span style="color: rgb(0,128,0)">//</span><span style="color: rgb(0,128,0)">Update the value:</span><span style="color: rgb(0,128,0)"><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" /></span><span style="color: rgb(0,0,0)">    sObj.AssignInteger(state, </span><span style="color: rgb(0,0,0)">50</span><span style="color: rgb(0,0,0)">);<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    </span><span style="color: rgb(0,128,0)">//</span><span style="color: rgb(0,128,0)">Get value again:</span><span style="color: rgb(0,128,0)"><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" /></span><span style="color: rgb(0,0,0)">    mytest </span><span style="color: rgb(0,0,0)">=</span><span style="color: rgb(0,0,0)"> sObj.GetInteger();<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    printf(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">after changed by c++:%d<span id="qgqceay" class="Apple-converted-space"> </span></span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">, mytest);<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" /><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    </span><span style="color: rgb(0,128,0)">//</span><span style="color: rgb(0,128,0)">Call a function in lua:</span><span style="color: rgb(0,128,0)"><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" /></span><span style="color: rgb(0,0,0)">    LuaFunction</span><span style="color: rgb(0,0,0)"><</span><span style="color: rgb(0,0,255)">int</span><span style="color: rgb(0,0,0)">></span><span style="color: rgb(0,0,0)"> Add </span><span style="color: rgb(0,0,0)">=</span><span style="color: rgb(0,0,0)">  state</span><span style="color: rgb(0,0,0)">-></span><span style="color: rgb(0,0,0)">GetGlobal(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">Add</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">);<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    </span><span style="color: rgb(0,0,255)">int</span><span style="color: rgb(0,0,0)"> myret </span><span style="color: rgb(0,0,0)">=</span><span style="color: rgb(0,0,0)"> Add(</span><span style="color: rgb(0,0,0)">3</span><span style="color: rgb(0,0,0)">, </span><span style="color: rgb(0,0,0)">4</span><span style="color: rgb(0,0,0)">);<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    printf(</span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">Call add() in luascript,ret=%d<span id="uiewqom" class="Apple-converted-space"> </span></span><span style="color: rgb(0,0,0)">"</span><span style="color: rgb(0,0,0)">, myret);<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" /><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span></span><span style="color: rgb(0,0,0)"><br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /></span></div></div><br />    main鍑芥暟錛?br /> <div style="border-right: windowtext 0.5pt solid; padding-right: 5.4pt; background-position: 0% 50%; border-top: windowtext 0.5pt solid; padding-left: 5.4pt; background-attachment: scroll;background-image: none; padding-bottom: 4px; border-left: windowtext 0.5pt solid; width: 659px; padding-top: 4px; border-bottom: windowtext 0.5pt solid; background-color: rgb(230,230,230); background-origin: initial; background-clip: initial"> <div><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif" align="top" /><span style="color: rgb(0,0,255)">int</span><span style="color: rgb(0,0,0)"> _tmain(</span><span style="color: rgb(0,0,255)">int</span><span style="color: rgb(0,0,0)"> argc, _TCHAR</span><span style="color: rgb(0,0,0)">*</span><span style="color: rgb(0,0,0)"> argv[])<br /><img id="_37_59_Open_Image" style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" onclick="this.style.display='none'; document.getElementById('_37_59_Open_Text').style.display='none'; document.getElementById('_37_59_Closed_Image').style.display='inline'; document.getElementById('_37_59_Closed_Text').style.display='inline';" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif" align="top"></span><span id="_37_59_Open_Text"><span style="color: rgb(0,0,0)">{<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    test();<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif" align="top" />    </span><span style="color: rgb(0,0,255)">return</span><span style="color: rgb(0,0,0)"> </span><span style="color: rgb(0,0,0)">0</span><span style="color: rgb(0,0,0)">;<br /><img style="border-top-style: none; border-right-style: none; border-left-style: none; border-bottom-style: none" alt="" src="http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span></span></div></div></div> <div> <br />    鐜板湪鍙互緙栬瘧浜?jiǎn)锛尵~栬瘧瀹屾垚涔嬪悗榪愯錛屽彲浠ュ湪鎺у埗鍙扮獥鍙d腑鐪嬪埌緇撴灉銆?br />    闇瑕佹敞鎰忕殑鏄墽琛岃剼鏈鍦ㄦ敞鍐孋++鍑芥暟鍒癓ua妯″潡涔嬪悗榪涜銆?br />    鍩烘湰涓婃槸鎸夌収http://gpwiki.org/index.php/Scripting_with_LuaPlus_and_Cpp鏉ュ仛鐨勶紝鍔犲叆浜?jiǎn)宸ソE嬭緗儴鍒嗐傝閾炬帴鐨勪唬鐮侊紙test鍑芥暟錛変細(xì)鎶ラ敊錛堣皟鐢ㄤ簡(jiǎn)math搴撲腑鐨刢os鍑芥暟錛屼絾鏄病鏈夎皟鐢∣penLibs()鍑芥暟錛夛紝鎴戜慨鏀逛簡(jiǎn)涓涓嬶紝鍘繪帀浜?jiǎn)瀵筸ath搴撶殑寮曠敤銆?br /><br /> <h3 style="padding-right: 0px; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">   鐩稿叧璧勬簮閾炬帴錛?/h3>    1>LuaPlus鐨勬枃妗o細(xì)http://www.gamedev.net/reference/programming/features/lua/<br />    2>LuaPlus鍒濈駭鏁欑▼錛歨ttp://wwhiz.com/LuaPlus/LuaPlus.html</div></span><img src ="http://www.shnenglu.com/wc250en007/aggbug/151282.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/wc250en007/" target="_blank">Let me see see</a> 2011-07-18 10:07 <a href="http://www.shnenglu.com/wc250en007/archive/2011/07/18/151282.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <p>感谢您访问我们的网站,您可能还对以下资源感兴趣:</p> <a href="http://www.shnenglu.com/" title="精品视频久久久久">精品视频久久久久</a> <div class="friend-links"> </div> </div> </footer> <a href="http://www.jswlgs.cn" target="_blank">亚洲精品无码久久久久sm</a>| <a href="http://www.hbxasn.cn" target="_blank">久久99精品久久久久久久不卡</a>| <a href="http://www.6wx.com.cn" target="_blank">69久久夜色精品国产69</a>| <a href="http://www.z5u5.cn" target="_blank">亚洲国产精久久久久久久</a>| <a href="http://www.shouyoujie.cn" target="_blank">国产精品成人久久久久久久</a>| <a href="http://www.j8hq8.cn" target="_blank">亚洲精品无码久久久</a>| <a href="http://www.zjjunyao.cn" target="_blank">无码人妻精品一区二区三区久久久</a>| <a href="http://www.wdcqc.cn" target="_blank">精品蜜臀久久久久99网站</a>| <a href="http://www.fzlqb.cn" target="_blank">国产成人精品久久亚洲</a>| <a href="http://www.buksk.cn" target="_blank">久久九九兔免费精品6</a>| <a href="http://www.kunow.cn" target="_blank">91精品婷婷国产综合久久</a>| <a href="http://www.jkwovf.cn" target="_blank">色老头网站久久网</a>| <a href="http://www.peizis.cn" target="_blank">久久久久久久尹人综合网亚洲 </a>| <a href="http://www.hgflt.cn" target="_blank">久久99精品久久久久久秒播</a>| <a href="http://www.drqv.cn" target="_blank">国产精品99久久久精品无码</a>| <a href="http://www.vzts.cn" target="_blank">欧美777精品久久久久网</a>| <a href="http://www.bwab.cn" target="_blank">东方aⅴ免费观看久久av</a>| <a href="http://www.bxxlsl.cn" target="_blank">久久乐国产精品亚洲综合</a>| <a href="http://www.51uhq.cn" target="_blank">91精品国产色综合久久</a>| <a href="http://www.silkwormcup.cn" target="_blank">久久精品国产亚洲αv忘忧草 </a>| <a href="http://www.symedia.com.cn" target="_blank">久久免费视频网站</a>| <a href="http://www.szhtdkj88.cn" target="_blank">久久久久久久久久久久久久</a>| <a href="http://www.jrbjh.cn" target="_blank">国内精品伊人久久久久影院对白</a>| <a href="http://www.ldg8.cn" target="_blank">一本久久a久久精品vr综合</a>| <a href="http://www.padshow.cn" target="_blank">亚洲国产精品一区二区三区久久</a>| <a href="http://www.bestorgazm.cn" target="_blank">99久久99久久</a>| <a href="http://www.hesiyu.cn" target="_blank">国产精品久久久久久久久鸭</a>| <a href="http://www.lphbca.org.cn" target="_blank">日本WV一本一道久久香蕉</a>| <a href="http://www.cdz8.cn" target="_blank">久久久久这里只有精品 </a>| <a href="http://www.gkcv.cn" target="_blank">少妇人妻综合久久中文字幕</a>| <a href="http://www.yf-plastic.com.cn" target="_blank">曰曰摸天天摸人人看久久久</a>| <a href="http://www.135gkr4.cn" target="_blank">69久久精品无码一区二区</a>| <a href="http://www.sdhaomai.cn" target="_blank">久久久老熟女一区二区三区</a>| <a href="http://www.jj171.cn" target="_blank">久久天天躁狠狠躁夜夜不卡</a>| <a href="http://www.90xueyuan.cn" target="_blank">热久久最新网站获取</a>| <a href="http://www.1dis.cn" target="_blank">色偷偷91久久综合噜噜噜噜</a>| <a href="http://www.debtee.cn" target="_blank">热RE99久久精品国产66热</a>| <a href="http://www.legal911.cn" target="_blank">亚洲国产精品久久66</a>| <a href="http://www.yz10.cn" target="_blank">久久精品国产只有精品66</a>| <a href="http://www.abovefq.cn" target="_blank">国产香蕉97碰碰久久人人</a>| <a href="http://www.kmkiddieedu.cn" target="_blank">国产午夜精品久久久久九九电影 </a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>