⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 zigletman_8h-source.html

📁 用来介绍ZIG Library游戏网络引擎的文档
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>zigletman.h Source File</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.2.18 --><center><a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; </center><hr><h1>zigletman.h</h1><div class="fragment"><pre>00001 <span class="comment">/*</span>00002 <span class="comment">    ZIG - An extendable, portable game engine focused on networking &amp; scripting</span>00003 <span class="comment">    Project Home: http://zige.sourceforge.net</span>00004 <span class="comment">    Copyright (C) 2002  F醔io Reis Cecin &lt;fcecin AT inf DOT ufrgs DOT br&gt;</span>00005 <span class="comment"></span>00006 <span class="comment">    This library is free software; you can redistribute it and/or</span>00007 <span class="comment">    modify it under the terms of the GNU Lesser General Public</span>00008 <span class="comment">    License as published by the Free Software Foundation; either</span>00009 <span class="comment">    version 2.1 of the License, or (at your option) any later version.</span>00010 <span class="comment"></span>00011 <span class="comment">    This library is distributed in the hope that it will be useful,</span>00012 <span class="comment">    but WITHOUT ANY WARRANTY; without even the implied warranty of</span>00013 <span class="comment">    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</span>00014 <span class="comment">    Lesser General Public License for more details.</span>00015 <span class="comment"></span>00016 <span class="comment">    You should have received a copy of the GNU Lesser General Public</span>00017 <span class="comment">    License along with this library; if not, write to the Free Software</span>00018 <span class="comment">    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA   </span>00019 <span class="comment">*/</span>00020 00021 <span class="preprocessor">#ifndef _ZIG_HEADER_ZIGLETMAN_H_</span>00022 <span class="preprocessor"></span><span class="preprocessor">#define _ZIG_HEADER_ZIGLETMAN_H_</span>00023 <span class="preprocessor"></span>00024 <span class="preprocessor">#include "<a class="code" href="zig_8h.html">zig.h</a>"</span>00025 <span class="preprocessor">#include "ziglet.h"</span>00026 <span class="preprocessor">#include "console.h"</span>00027 00028 <span class="preprocessor">#include &lt;string&gt;</span>00029 <span class="preprocessor">#include &lt;vector&gt;</span>00030 <span class="preprocessor">#include &lt;map&gt;</span>00031 <a name="l00033"></a><a class="code" href="classziglet__manager__c.html">00033</a> <span class="keyword">class </span><a class="code" href="classziglet__manager__c.html">ziglet_manager_c</a> {00034 <span class="keyword">public</span>:00035 00036         <span class="comment">//default ctor: send messages to the "default console"</span>00037   <a class="code" href="classziglet__manager__c.html">ziglet_manager_c</a>();00038 00039         <span class="comment">//change this ziglet manager's console</span>00040         <span class="keywordtype">void</span> set_console(<a class="code" href="classconsole__c.html">console_c</a> *conio);00041 00042         <span class="comment">//ctor</span>00043         <a class="code" href="classziglet__manager__c.html">ziglet_manager_c</a>(<a class="code" href="classconsole__c.html">console_c</a> *conio);00044 00045         <span class="comment">//dtor</span>00046         <span class="keyword">virtual</span> ~<a class="code" href="classziglet__manager__c.html">ziglet_manager_c</a>();00047 00049         <span class="keywordtype">void</span> <a class="code" href="classziglet__manager__c.html#a4">add_path</a>(std::string path);00050 00052         <span class="keywordtype">void</span> <a class="code" href="classziglet__manager__c.html#a5">remove_path</a>(std::string path);00053 <a name="l00055"></a><a class="code" href="classziglet__manager__c.html#a6">00055</a>         std::vector&lt;std::string&gt; <a class="code" href="classziglet__manager__c.html#a6">get_path</a>() { <span class="keywordflow">return</span> vpath; }00056 00059         <span class="keywordtype">void</span> <a class="code" href="classziglet__manager__c.html#a7">set_path</a>(std::string path);00060 00065         <span class="keywordtype">void</span> <a class="code" href="classziglet__manager__c.html#a8">scan</a>();00066 00071         <a class="code" href="classziglet__c.html">ziglet_c</a> *<a class="code" href="classziglet__manager__c.html#a9">get</a>(std::string name);00072 00073 <span class="keyword">protected</span>:00074 00075         <span class="comment">//list of paths</span>00076         std::vector&lt;std::string&gt; vpath;00077 00078         <span class="comment">//the list of scanned ziglets. (string)NAME (directory name only: the name of the ziglet)</span>00079         <span class="comment">//   ---&gt; ziglet_c&gt;. the ziglet_c instance is the one that has full path info.</span>00080         <span class="comment">//</span>00081         <span class="comment">// FIXED : was BROKEN</span>00082         <span class="comment">//   in the .cpp, returning pointer to object inside the map!</span>00083         <span class="comment">//</span>00084         <span class="comment">// changing ziglet_c to ziglet_c*</span>00085         <span class="comment">//</span>00086         std::map&lt;std::string, ziglet_c*&gt; ziglets;00087 00088         <a class="code" href="classconsole__c.html">console_c</a> *con;00089 00090 <span class="keyword">private</span>:00091 00092         <a class="code" href="classziglet__manager__c.html">ziglet_manager_c</a>(<span class="keyword">const</span> <a class="code" href="classziglet__manager__c.html">ziglet_manager_c</a>&amp;) {}00093         <a class="code" href="classziglet__manager__c.html">ziglet_manager_c</a>&amp; operator=(<span class="keyword">const</span> <a class="code" href="classziglet__manager__c.html">ziglet_manager_c</a>&amp;);00094 };00095 00096 <span class="preprocessor">#endif</span>00097 <span class="preprocessor"></span></pre></div><hr><address style="align: right;"><small>Generated on Mon Jan 24 21:14:23 2005 for ZIG by<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.18 </small></address></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -