Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > bad97183153701b09df5fae1052b1c30 > files > 239

crystalspace-doc-1.2.1-5mdv2010.0.i586.rpm

<!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>Crystal Space 1.2.1: csApplicationFramework Class Reference (Crystal Space 1.2.1 Public API Reference)</title>
<link href="tabs.css" rel="stylesheet" type="text/css">
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<table border="0" cellpadding="0" cellspacing="0" width="100%" class="head">
 <tr height="59">
  <td class="head" width="202" valign="bottom" style="padding-left:0;"><a href="http://www.crystalspace3d.org/"><img src="csblur.png" width="236" height="59" alt="CrystalSpace" border="0"></a></td>
  <td class="head"><h2>Public API Reference</h2></td>
 </tr>
 <tr height="11">
  <td colspan="2" class="headshadow" valign="top" style="padding-left:0;"><img src="csblurb.png" width="236" height="11" alt="" border="0"></td>
 </tr>
</table>
<div class="content">
<!-- Generated by Doxygen 1.5.3 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="modules.html"><span>Modules</span></a></li>
    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
    <li class="current"><a href="classes.html"><span>Classes</span></a></li>
    <li><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
  </ul>
</div>
<div class="tabs">
  <ul>
    <li><a href="classes.html"><span>Alphabetical&nbsp;List</span></a></li>
    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
  </ul>
</div>
<h1>csApplicationFramework Class Reference<br>
<small>
[<a class="el" href="group__appframe.html">Application Framework</a>]</small>
</h1><!-- doxytag: class="csApplicationFramework" --><!-- doxytag: inherits="csInitializer" -->Application framework class.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="csapplicationframework_8h-source.html">cstool/csapplicationframework.h</a>&gt;</code>
<p>
<div class="dynheader">
Inheritance diagram for csApplicationFramework:</div>
<div class="dynsection">
<p><center><img src="classcsApplicationFramework__inherit__graph.png" border="0" usemap="#csApplicationFramework__inherit__map" alt="Inheritance graph"></center>
<map name="csApplicationFramework__inherit__map">
<area shape="rect" href="classcsInitializer.html" title="This class contains several static member functions that can help setup an application..." alt="" coords="48,7,139,33"></map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>

<p>
<a href="classcsApplicationFramework-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsApplicationFramework.html#f8da2559431cd694c891dfa70440a0cd">DoRestart</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Query whether the application is to be restarted instead of exited.  <a href="#f8da2559431cd694c891dfa70440a0cd"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsApplicationFramework.html#d407c48ad0714efaf5ffa741cdfdad26">Main</a> (int argc, char *argv[])</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Starts up the application framework, to be called from main().  <a href="#d407c48ad0714efaf5ffa741cdfdad26"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsApplicationFramework.html#fed0ce5ce751b24d32cf2f8b4352f4b4">Open</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Open plugins and open application window.  <a href="#fed0ce5ce751b24d32cf2f8b4352f4b4"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsApplicationFramework.html#21e37a84722b53b0813592612c55d5e2">operator iObjectRegistry *</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Allow a <a class="el" href="classcsApplicationFramework.html" title="Application framework class.">csApplicationFramework</a> object to be used as an iObjectRegistry*.  <a href="#21e37a84722b53b0813592612c55d5e2"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsApplicationFramework.html#d991757ed1c13036979031d427d0a4e0">Restart</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Restart application.  <a href="#d991757ed1c13036979031d427d0a4e0"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsApplicationFramework.html#93d67691824e79d782b622bc4258391f">~csApplicationFramework</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor.  <a href="#93d67691824e79d782b622bc4258391f"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static const char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsApplicationFramework.html#5c99be19270b1d7cd1a927da5c36475e">GetApplicationName</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the application name.  <a href="#5c99be19270b1d7cd1a927da5c36475e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="structiObjectRegistry.html">iObjectRegistry</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsApplicationFramework.html#eaf67d08b0f0a4ec074a8b97b06f792f">GetObjectRegistry</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns a pointer to the object registry.  <a href="#eaf67d08b0f0a4ec074a8b97b06f792f"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsApplicationFramework.html#515d12756c313e82e93110e8fe227b71">Quit</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Quit running the application.  <a href="#515d12756c313e82e93110e8fe227b71"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsApplicationFramework.html#cd34713bf43f64914c8b29d45eb922d9">ReportError</a> (const char *description,...)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Display an error notification.  <a href="#cd34713bf43f64914c8b29d45eb922d9"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsApplicationFramework.html#82bf5c04d79a4f87c7296ca0c55c2327">ReportInfo</a> (const char *description,...)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Display an information notification.  <a href="#82bf5c04d79a4f87c7296ca0c55c2327"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsApplicationFramework.html#0d4a1b45aed17de9c919f4230f1fc980">ReportWarning</a> (const char *description,...)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Display a warning notification.  <a href="#0d4a1b45aed17de9c919f4230f1fc980"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsApplicationFramework.html#72520e3195cce8d1058856b416600206">Run</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Start event queue.  <a href="#72520e3195cce8d1058856b416600206"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsApplicationFramework.html#c7c47b19df2243f6fc5c52f8489226f2">SetApplicationName</a> (char *name)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the application's string name identifier.  <a href="#c7c47b19df2243f6fc5c52f8489226f2"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsApplicationFramework.html#eb8d8367155993f5400754832dec6a77">Application</a> ()=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Perform application logic.  <a href="#eb8d8367155993f5400754832dec6a77"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsApplicationFramework.html#3f4ce5f2223f92b11e98a484313c412d">csApplicationFramework</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor.  <a href="#3f4ce5f2223f92b11e98a484313c412d"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsApplicationFramework.html#92400d642145ae76a9b9b7dfdb9d6f67">OnCommandLineHelp</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Print out command line help.  <a href="#92400d642145ae76a9b9b7dfdb9d6f67"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsApplicationFramework.html#8fe612efbeb9258146114a9851292c92">OnExit</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Perform any end of program processing.  <a href="#8fe612efbeb9258146114a9851292c92"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsApplicationFramework.html#23fbeb882689a031b267b27495361d61">OnInitialize</a> (int argc, char *argv[])=0</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Initialize the subclassed <a class="el" href="classcsApplicationFramework.html" title="Application framework class.">csApplicationFramework</a> object.  <a href="#23fbeb882689a031b267b27495361d61"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Static Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsApplicationFramework.html#21c8a30c114ef438ef083efb4c0add88">SetupConfigManager</a> (<a class="el" href="structiObjectRegistry.html">iObjectRegistry</a> *<a class="el" href="classcsApplicationFramework.html#4f3efd40b1342ee2df37cb4ea71719a1">object_reg</a>, const char *configName)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Setup the config manager.  <a href="#21c8a30c114ef438ef083efb4c0add88"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Static Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="structiObjectRegistry.html">iObjectRegistry</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcsApplicationFramework.html#4f3efd40b1342ee2df37cb4ea71719a1">object_reg</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Pointer to the application's object registry.  <a href="#4f3efd40b1342ee2df37cb4ea71719a1"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Application framework class. 
<p>
This class provides a handy object-oriented wrapper around the Crystal Space initialization and start-up functions. It encapsulates a callback paradigm which provides methods such as <a class="el" href="classcsApplicationFramework.html#23fbeb882689a031b267b27495361d61" title="Initialize the subclassed csApplicationFramework object.">OnInitialize()</a> and <a class="el" href="classcsApplicationFramework.html#8fe612efbeb9258146114a9851292c92" title="Perform any end of program processing.">OnExit()</a> which you can override to customize the framework's behavior. You should also consider using <a class="el" href="classcsBaseEventHandler.html" title="Base implementation of a generic event handler.">csBaseEventHandler</a> (<a class="el" href="csbaseeventh_8h.html" title="Base implementation of a generic event handler.">csutil/csbaseeventh.h</a>), which provides the same sort of object-oriented wrapper for the Crystal Space event mechanism; providing methods such as OnMouseClick(), OnKeyboard(), OnBroadcast(), etc.<p>
In order to properly use this class, you must derive your own class from it, providing a constructor and implementation for the <a class="el" href="classcsApplicationFramework.html#23fbeb882689a031b267b27495361d61" title="Initialize the subclassed csApplicationFramework object.">OnInitialize()</a> and <a class="el" href="classcsApplicationFramework.html#eb8d8367155993f5400754832dec6a77" title="Perform application logic.">Application()</a> methods. You may only have one <a class="el" href="classcsApplicationFramework.html" title="Application framework class.">csApplicationFramework</a> derived object in existence at any time (and generally, you will only have one such object in your application). In your source code create a global instance of the overridden object, as follows:<p>
<div class="fragment"><pre class="fragment"> <span class="comment">//--------------------------</span>
 <span class="comment">// Example.h</span>
 <span class="keyword">class </span>MyApp : <span class="keyword">public</span> <a class="code" href="classcsApplicationFramework.html" title="Application framework class.">csApplicationFramework</a>
 {
 <span class="keyword">public</span>:
   MyApp();
   <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classcsApplicationFramework.html#23fbeb882689a031b267b27495361d61" title="Initialize the subclassed csApplicationFramework object.">OnInitialize</a>(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span>* argv[]);
   <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classcsApplicationFramework.html#eb8d8367155993f5400754832dec6a77" title="Perform application logic.">Application</a>();
 };

 <span class="comment">//--------------------------</span>
 <span class="comment">// Example.cpp</span>
 <span class="comment">// File scope</span>

 MyApp::MyApp() : <a class="code" href="classcsApplicationFramework.html" title="Application framework class.">csApplicationFramework</a>()
 {
   SetApplicationName (<span class="stringliteral">"my.example.app"</span>);
 }

 <span class="keywordtype">bool</span> <a class="code" href="classcsApplicationFramework.html#23fbeb882689a031b267b27495361d61" title="Initialize the subclassed csApplicationFramework object.">MyApp::OnInitialize</a>(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span>* argv[])
 {
   <span class="comment">// Request plugins, initialize any global non-CS data and structures</span>
   <span class="keywordflow">return</span> <span class="keyword">true</span>;
 }
 
 <span class="keywordtype">bool</span> <a class="code" href="classcsApplicationFramework.html#eb8d8367155993f5400754832dec6a77" title="Perform application logic.">MyApp::Application</a>()
 {
   <span class="comment">// Perform initialization of CS data and structures, set event handler,</span>
   <span class="comment">// load world, etc.</span>

   <span class="keywordflow">if</span> (!Open())
     <span class="keywordflow">return</span> <span class="keyword">false</span>;

   Run();
   <span class="keywordflow">return</span> <span class="keyword">true</span>;
 }
 
 <span class="comment">//--------------------------</span>
 <span class="comment">// main.cpp</span>
 <a class="code" href="cssysdef_8h.html#891b81da1f8bd98065e99456203234f3" title="The CS_IMPLEMENT_APPLICATION macro should be placed at the global scope in exactly...">CS_IMPLEMENT_APPLICATION</a>
 
 <span class="keywordtype">int</span> main (<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span>* argv[]) 
 {
   <span class="keywordflow">return</span> <a class="code" href="classcsApplicationRunner.html#caa31a652915f6da5448b7cbb6e5152b" title="Run the application.">csApplicationRunner&lt;MyApp&gt;::Run</a> (argc, argv);
 }
</pre></div><p>
<a class="el" href="classcsApplicationFramework.html" title="Application framework class.">csApplicationFramework</a> itself is derived from <a class="el" href="classcsInitializer.html" title="This class contains several static member functions that can help setup an application...">csInitializer</a> for convenience, allowing overridden members to call <a class="el" href="classcsInitializer.html" title="This class contains several static member functions that can help setup an application...">csInitializer</a> methods without qualifying them with <code><a class="el" href="classcsInitializer.html" title="This class contains several static member functions that can help setup an application...">csInitializer</a>::</code>. 
<p>Definition at line <a class="el" href="csapplicationframework_8h-source.html#l00104">104</a> of file <a class="el" href="csapplicationframework_8h-source.html">csapplicationframework.h</a>.</p>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="3f4ce5f2223f92b11e98a484313c412d"></a><!-- doxytag: member="csApplicationFramework::csApplicationFramework" ref="3f4ce5f2223f92b11e98a484313c412d" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">csApplicationFramework::csApplicationFramework           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Constructor. 
<p>
<dl class="remark" compact><dt><b>Remarks:</b></dt><dd>The <a class="el" href="classcsApplicationFramework.html" title="Application framework class.">csApplicationFramework</a> constructor initializes framework application variables. You must call this constructor from your derived class' constructor. </dd></dl>
<dl class="user" compact><dt><b></b></dt><dd>This constructor is protected to force the derived class to provide its own constructor. </dd></dl>

</div>
</div><p>
<a class="anchor" name="93d67691824e79d782b622bc4258391f"></a><!-- doxytag: member="csApplicationFramework::~csApplicationFramework" ref="93d67691824e79d782b622bc4258391f" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual csApplicationFramework::~csApplicationFramework           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Destructor. 
<p>

</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="eb8d8367155993f5400754832dec6a77"></a><!-- doxytag: member="csApplicationFramework::Application" ref="eb8d8367155993f5400754832dec6a77" args="()=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool csApplicationFramework::Application           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [protected, pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Perform application logic. 
<p>
<dl class="remark" compact><dt><b>Remarks:</b></dt><dd>You must override this method in the derived class. It will be called after the <a class="el" href="classcsApplicationFramework.html#23fbeb882689a031b267b27495361d61" title="Initialize the subclassed csApplicationFramework object.">OnInitialize()</a> method is called and the framework has checked the commandline for the help argument. </dd></dl>
<dl class="user" compact><dt><b></b></dt><dd>This method is where the user application should perform all of its main program logic, including initializing any Crystal Space variables and states, starting the event queue loop, etc. </dd></dl>

</div>
</div><p>
<a class="anchor" name="f8da2559431cd694c891dfa70440a0cd"></a><!-- doxytag: member="csApplicationFramework::DoRestart" ref="f8da2559431cd694c891dfa70440a0cd" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool csApplicationFramework::DoRestart           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Query whether the application is to be restarted instead of exited. 
<p>

</div>
</div><p>
<a class="anchor" name="5c99be19270b1d7cd1a927da5c36475e"></a><!-- doxytag: member="csApplicationFramework::GetApplicationName" ref="5c99be19270b1d7cd1a927da5c36475e" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static const char* csApplicationFramework::GetApplicationName           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get the application name. 
<p>
<dl class="remark" compact><dt><b>Remarks:</b></dt><dd>This string is passed to the reporter to indicate message origins from within the derived user application class. It should be set in the derived class' constructor via SetApplicationName (). </dd></dl>

<p>Definition at line <a class="el" href="csapplicationframework_8h-source.html#l00317">317</a> of file <a class="el" href="csapplicationframework_8h-source.html">csapplicationframework.h</a>.</p>

<p>References <a class="el" href="classcsInitializer.html#80223ebc212454ae268702c2bf9ba740">csInitializer::GetDefaultAppID()</a>.</p>

</div>
</div><p>
<a class="anchor" name="eaf67d08b0f0a4ec074a8b97b06f792f"></a><!-- doxytag: member="csApplicationFramework::GetObjectRegistry" ref="eaf67d08b0f0a4ec074a8b97b06f792f" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="structiObjectRegistry.html">iObjectRegistry</a>* csApplicationFramework::GetObjectRegistry           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns a pointer to the object registry. 
<p>

<p>Definition at line <a class="el" href="csapplicationframework_8h-source.html#l00274">274</a> of file <a class="el" href="csapplicationframework_8h-source.html">csapplicationframework.h</a>.</p>

</div>
</div><p>
<a class="anchor" name="d407c48ad0714efaf5ffa741cdfdad26"></a><!-- doxytag: member="csApplicationFramework::Main" ref="d407c48ad0714efaf5ffa741cdfdad26" args="(int argc, char *argv[])" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int csApplicationFramework::Main           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>argc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&nbsp;</td>
          <td class="paramname"> <em>argv</em>[]</td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Starts up the application framework, to be called from main(). 
<p>
<dl class="remark" compact><dt><b>Remarks:</b></dt><dd>It is possible that upon return of this method the application did not quite but rather only requested a restart. Hence, a loop should be used that checks the return value of <a class="el" href="classcsApplicationFramework.html#f8da2559431cd694c891dfa70440a0cd" title="Query whether the application is to be restarted instead of exited.">DoRestart()</a> and, if requested, recreates the application object and runs <a class="el" href="classcsApplicationFramework.html#d407c48ad0714efaf5ffa741cdfdad26" title="Starts up the application framework, to be called from main().">Main()</a> again. The csApplicationRunner&lt;&gt; is a convenient way to implement this. </dd></dl>

</div>
</div><p>
<a class="anchor" name="92400d642145ae76a9b9b7dfdb9d6f67"></a><!-- doxytag: member="csApplicationFramework::OnCommandLineHelp" ref="92400d642145ae76a9b9b7dfdb9d6f67" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void csApplicationFramework::OnCommandLineHelp           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Print out command line help. 
<p>
This method is called in the event of the user requesting command line help via the '-help' argument. If the application supports command line options, it should override this method to print out a list of the supported options. 
</div>
</div><p>
<a class="anchor" name="8fe612efbeb9258146114a9851292c92"></a><!-- doxytag: member="csApplicationFramework::OnExit" ref="8fe612efbeb9258146114a9851292c92" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void csApplicationFramework::OnExit           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Perform any end of program processing. 
<p>
<dl class="remark" compact><dt><b>Remarks:</b></dt><dd>This method is called after the crystal space engine has been shut down, just before the framework is about to end the program. Unlike the other overridables of this class, you need not bother overriding this method. In general, this is provided to allow end of program debugging support. </dd></dl>

</div>
</div><p>
<a class="anchor" name="23fbeb882689a031b267b27495361d61"></a><!-- doxytag: member="csApplicationFramework::OnInitialize" ref="23fbeb882689a031b267b27495361d61" args="(int argc, char *argv[])=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool csApplicationFramework::OnInitialize           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>argc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&nbsp;</td>
          <td class="paramname"> <em>argv</em>[]</td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [protected, pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Initialize the subclassed <a class="el" href="classcsApplicationFramework.html" title="Application framework class.">csApplicationFramework</a> object. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>argc</em>&nbsp;</td><td>number of arguments passed on the command line. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>argv[]</em>&nbsp;</td><td>list of arguments passed on the command line. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>true if the initialization was successful, otherwise false. </dd></dl>
<dl class="remark" compact><dt><b>Remarks:</b></dt><dd>You must override this function in the derived class. It will be called after the framework has performed all necessary framework initialization. </dd></dl>
<dl class="user" compact><dt><b></b></dt><dd>This method is where the user application should load any plug-ins via <a class="el" href="classcsInitializer.html#c10c1d14d78a7bbbd4f6c12caa1d4320" title="Request a few widely used standard plugins and also read the standard configuration...">RequestPlugins()</a> and initialize any global application variables or class members. Do not attempt to set or initialize any other Crystal Space structures or objects in this method. </dd></dl>

</div>
</div><p>
<a class="anchor" name="fed0ce5ce751b24d32cf2f8b4352f4b4"></a><!-- doxytag: member="csApplicationFramework::Open" ref="fed0ce5ce751b24d32cf2f8b4352f4b4" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool csApplicationFramework::Open           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Open plugins and open application window. 
<p>

<p>Definition at line <a class="el" href="csapplicationframework_8h-source.html#l00289">289</a> of file <a class="el" href="csapplicationframework_8h-source.html">csapplicationframework.h</a>.</p>

<p>References <a class="el" href="classcsInitializer.html#62d7b06d7b0b8192496a8a743584c603">csInitializer::OpenApplication()</a>.</p>

</div>
</div><p>
<a class="anchor" name="21e37a84722b53b0813592612c55d5e2"></a><!-- doxytag: member="csApplicationFramework::operator iObjectRegistry *" ref="21e37a84722b53b0813592612c55d5e2" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">csApplicationFramework::operator <a class="el" href="structiObjectRegistry.html">iObjectRegistry</a> *           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Allow a <a class="el" href="classcsApplicationFramework.html" title="Application framework class.">csApplicationFramework</a> object to be used as an iObjectRegistry*. 
<p>
<dl class="remark" compact><dt><b>Remarks:</b></dt><dd>Using this implicit cast operator is a shorthand for calling <a class="el" href="classcsApplicationFramework.html#eaf67d08b0f0a4ec074a8b97b06f792f" title="Returns a pointer to the object registry.">GetObjectRegistry()</a>, and allows the developer to use his derived <a class="el" href="classcsApplicationFramework.html" title="Application framework class.">csApplicationFramework</a> object as a parameter to any function (and some macros) which require an <a class="el" href="structiObjectRegistry.html" title="This interface serves as a registry of other objects.">iObjectRegistry</a> reference. </dd></dl>

<p>Definition at line <a class="el" href="csapplicationframework_8h-source.html#l00284">284</a> of file <a class="el" href="csapplicationframework_8h-source.html">csapplicationframework.h</a>.</p>

</div>
</div><p>
<a class="anchor" name="515d12756c313e82e93110e8fe227b71"></a><!-- doxytag: member="csApplicationFramework::Quit" ref="515d12756c313e82e93110e8fe227b71" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void csApplicationFramework::Quit           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Quit running the application. 
<p>
<dl class="remark" compact><dt><b>Remarks:</b></dt><dd>This function will send a csevQuit event through the event queue. If no queue has been initialized, then it will terminate the program with an exit() call. </dd></dl>

</div>
</div><p>
<a class="anchor" name="cd34713bf43f64914c8b29d45eb922d9"></a><!-- doxytag: member="csApplicationFramework::ReportError" ref="cd34713bf43f64914c8b29d45eb922d9" args="(const char *description,...)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static bool csApplicationFramework::ReportError           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>description</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&nbsp;</td>
          <td class="paramname"> <em>...</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Display an error notification. 
<p>
<dl class="remark" compact><dt><b>Remarks:</b></dt><dd>The error displayed with this function will be identified with the application string name identifier set with <a class="el" href="classcsApplicationFramework.html#c7c47b19df2243f6fc5c52f8489226f2" title="Set the application&#39;s string name identifier.">SetApplicationName()</a>. </dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__util.html">Notes about string formatting in Crystal Space</a> </dd></dl>

<p>Definition at line <a class="el" href="csapplicationframework_8h-source.html#l00366">366</a> of file <a class="el" href="csapplicationframework_8h-source.html">csapplicationframework.h</a>.</p>

<p>References <a class="el" href="reporter_8h-source.html#l00050">CS_REPORTER_SEVERITY_ERROR</a>, and <a class="el" href="reporter_8h-source.html#l00387">csReportV</a>.</p>

</div>
</div><p>
<a class="anchor" name="82bf5c04d79a4f87c7296ca0c55c2327"></a><!-- doxytag: member="csApplicationFramework::ReportInfo" ref="82bf5c04d79a4f87c7296ca0c55c2327" args="(const char *description,...)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void csApplicationFramework::ReportInfo           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>description</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&nbsp;</td>
          <td class="paramname"> <em>...</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Display an information notification. 
<p>
<dl class="remark" compact><dt><b>Remarks:</b></dt><dd>The info displayed with this function will be identified with the application string name identifier set with <a class="el" href="classcsApplicationFramework.html#c7c47b19df2243f6fc5c52f8489226f2" title="Set the application&#39;s string name identifier.">SetApplicationName()</a>. </dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__util.html">Notes about string formatting in Crystal Space</a> </dd></dl>

<p>Definition at line <a class="el" href="csapplicationframework_8h-source.html#l00401">401</a> of file <a class="el" href="csapplicationframework_8h-source.html">csapplicationframework.h</a>.</p>

<p>References <a class="el" href="reporter_8h-source.html#l00062">CS_REPORTER_SEVERITY_NOTIFY</a>, and <a class="el" href="reporter_8h-source.html#l00387">csReportV</a>.</p>

</div>
</div><p>
<a class="anchor" name="0d4a1b45aed17de9c919f4230f1fc980"></a><!-- doxytag: member="csApplicationFramework::ReportWarning" ref="0d4a1b45aed17de9c919f4230f1fc980" args="(const char *description,...)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void csApplicationFramework::ReportWarning           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>description</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&nbsp;</td>
          <td class="paramname"> <em>...</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Display a warning notification. 
<p>
<dl class="remark" compact><dt><b>Remarks:</b></dt><dd>The warning displayed with this function will be identified with the application string name identifier set with <a class="el" href="classcsApplicationFramework.html#c7c47b19df2243f6fc5c52f8489226f2" title="Set the application&#39;s string name identifier.">SetApplicationName()</a>. </dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__util.html">Notes about string formatting in Crystal Space</a> </dd></dl>

<p>Definition at line <a class="el" href="csapplicationframework_8h-source.html#l00384">384</a> of file <a class="el" href="csapplicationframework_8h-source.html">csapplicationframework.h</a>.</p>

<p>References <a class="el" href="reporter_8h-source.html#l00056">CS_REPORTER_SEVERITY_WARNING</a>, and <a class="el" href="reporter_8h-source.html#l00387">csReportV</a>.</p>

</div>
</div><p>
<a class="anchor" name="d991757ed1c13036979031d427d0a4e0"></a><!-- doxytag: member="csApplicationFramework::Restart" ref="d991757ed1c13036979031d427d0a4e0" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void csApplicationFramework::Restart           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Restart application. 
<p>
<dl class="remark" compact><dt><b>Remarks:</b></dt><dd>This method internally uses <a class="el" href="classcsApplicationFramework.html#515d12756c313e82e93110e8fe227b71" title="Quit running the application.">Quit()</a>. </dd></dl>

</div>
</div><p>
<a class="anchor" name="72520e3195cce8d1058856b416600206"></a><!-- doxytag: member="csApplicationFramework::Run" ref="72520e3195cce8d1058856b416600206" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void csApplicationFramework::Run           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Start event queue. 
<p>
<dl class="remark" compact><dt><b>Remarks:</b></dt><dd>This is a shorthand method of calling <a class="el" href="group__util.html#g290c1c10f33ff2286589240d721a6052" title="Implements a default run-loop for stand-alone applications.">csDefaultRunLoop()</a>. </dd></dl>

<p>Definition at line <a class="el" href="csapplicationframework_8h-source.html#l00328">328</a> of file <a class="el" href="csapplicationframework_8h-source.html">csapplicationframework.h</a>.</p>

<p>References <a class="el" href="group__util.html#g290c1c10f33ff2286589240d721a6052">csDefaultRunLoop()</a>.</p>

</div>
</div><p>
<a class="anchor" name="c7c47b19df2243f6fc5c52f8489226f2"></a><!-- doxytag: member="csApplicationFramework::SetApplicationName" ref="c7c47b19df2243f6fc5c52f8489226f2" args="(char *name)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void csApplicationFramework::SetApplicationName           </td>
          <td>(</td>
          <td class="paramtype">char *&nbsp;</td>
          <td class="paramname"> <em>name</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Set the application's string name identifier. 
<p>
<dl class="remark" compact><dt><b>Remarks:</b></dt><dd>This string is used by DisplayError() and DisplayInfo() to identify the source of a message as generated by the user application (as opposed to one generated by code within the framework library or other code with the Crystal Space libraries and plugins). <p>
Generally, you will call this function once in the constructor for your derived <a class="el" href="classcsApplicationFramework.html" title="Application framework class.">csApplicationFramework</a> class, but it is safe to call it any number of times. <p>
The string should be in the form "vendor.application-name". Spaces should be avoided. </dd></dl>

<p>Definition at line <a class="el" href="csapplicationframework_8h-source.html#l00306">306</a> of file <a class="el" href="csapplicationframework_8h-source.html">csapplicationframework.h</a>.</p>

</div>
</div><p>
<a class="anchor" name="21c8a30c114ef438ef083efb4c0add88"></a><!-- doxytag: member="csApplicationFramework::SetupConfigManager" ref="21c8a30c114ef438ef083efb4c0add88" args="(iObjectRegistry *object_reg, const char *configName)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static bool csApplicationFramework::SetupConfigManager           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structiObjectRegistry.html">iObjectRegistry</a> *&nbsp;</td>
          <td class="paramname"> <em>object_reg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>configName</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [inline, static, protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Setup the config manager. 
<p>
This does exactly the same as <a class="el" href="classcsInitializer.html#da15289ee6d9e60d10291026ec73f84c" title="Setup the config manager.">csInitializer::SetupConfigManager()</a>, with the difference that the <em>ApplicationID</em> parameter defaults to the value returned by <a class="el" href="classcsApplicationFramework.html#5c99be19270b1d7cd1a927da5c36475e" title="Get the application name.">GetApplicationName()</a>. 
<p>Definition at line <a class="el" href="csapplicationframework_8h-source.html#l00263">263</a> of file <a class="el" href="csapplicationframework_8h-source.html">csapplicationframework.h</a>.</p>

<p>References <a class="el" href="classcsInitializer.html#da15289ee6d9e60d10291026ec73f84c">csInitializer::SetupConfigManager()</a>.</p>

</div>
</div><p>
<hr><h2>Member Data Documentation</h2>
<a class="anchor" name="4f3efd40b1342ee2df37cb4ea71719a1"></a><!-- doxytag: member="csApplicationFramework::object_reg" ref="4f3efd40b1342ee2df37cb4ea71719a1" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structiObjectRegistry.html">iObjectRegistry</a>* <a class="el" href="classcsApplicationFramework.html#4f3efd40b1342ee2df37cb4ea71719a1">csApplicationFramework::object_reg</a><code> [static, protected]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Pointer to the application's object registry. 
<p>

<p>Definition at line <a class="el" href="csapplicationframework_8h-source.html#l00207">207</a> of file <a class="el" href="csapplicationframework_8h-source.html">csapplicationframework.h</a>.</p>

</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li>cstool/<a class="el" href="csapplicationframework_8h-source.html">csapplicationframework.h</a></ul>
<hr size="1"><address><small>Generated for Crystal Space 1.2.1 by 
<a href="http://www.doxygen.org/index.html">doxygen</a> 1.5.3 
</small></address> </div></body> </html>