1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html><head><meta http-equiv=
"Content-Type" content=
"text/html;charset=UTF-8">
3 <title>LibSylph: Sylph::Application Class Reference
</title>
4 <link href=
"doxygen.css" rel=
"stylesheet" type=
"text/css">
6 <!-- Generated by Doxygen 1.5.8 -->
7 <div class=
"navigation" id=
"top">
10 <li><a href=
"index.html"><span>Main
Page
</span></a></li>
11 <li><a href=
"namespaces.html"><span>Namespaces
</span></a></li>
12 <li class=
"current"><a href=
"classes.html"><span>Classes
</span></a></li>
13 <li><a href=
"files.html"><span>Files
</span></a></li>
14 <li><a href=
"pages.html"><span>Related
Pages
</span></a></li>
19 <li><a href=
"classes.html"><span>Class
Index
</span></a></li>
20 <li><a href=
"hierarchy.html"><span>Class
Hierarchy
</span></a></li>
21 <li><a href=
"functions.html"><span>Class
Members
</span></a></li>
24 <div class=
"navpath"><a class=
"el" href=
"namespace_sylph.html">Sylph
</a>::
<a class=
"el" href=
"class_sylph_1_1_application.html">Application
</a>
27 <div class=
"contents">
28 <h1>Sylph::Application Class Reference
</h1><!-- doxytag: class="Sylph::Application" --><!-- doxytag: inherits="Sylph::Object" -->Class representing an application.
29 <a href=
"#_details">More...
</a>
31 <code>#include
<<a class=
"el" href=
"_application_8h-source.html">Sylph/Core/Application.h
</a>></code>
33 <div class=
"dynheader">
34 Inheritance diagram for Sylph::Application:
</div>
35 <div class=
"dynsection">
36 <p><center><img src=
"class_sylph_1_1_application__inherit__graph.png" border=
"0" usemap=
"#_sylph_1_1_application__inherit__map" alt=
"Inheritance graph"></center>
37 <map name=
"_sylph_1_1_application__inherit__map">
38 <area shape=
"rect" id=
"node5" href=
"class_sylph_1_1_application_self.html" title=
"An Application representing the currently running application." alt=
"" coords=
"5,160,168,189"><area shape=
"rect" id=
"node2" href=
"class_sylph_1_1_object.html" title=
"The root of all classes." alt=
"" coords=
"31,5,143,35"></map>
39 <center><font size=
"2">[
<a href=
"graph_legend.html">legend
</a>]
</font></center></div>
42 <a href=
"class_sylph_1_1_application-members.html">List of all members.
</a><table border=
"0" cellpadding=
"0" cellspacing=
"0">
44 <tr><td colspan=
"2"><br><h2>Public Member Functions
</h2></td></tr>
45 <tr><td class=
"memItemLeft" nowrap
align=
"right" valign=
"top">const
<a class=
"el" href=
"class_sylph_1_1_string.html">String
</a> </td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"class_sylph_1_1_application.html#86f3f28afa3682734789a12ae578c656">location
</a> ()
</td></tr>
47 <tr><td class=
"mdescLeft"> </td><td class=
"mdescRight">Returns the location of the file containing the object code of the application.
<a href=
"#86f3f28afa3682734789a12ae578c656"></a><br></td></tr>
48 <tr><td colspan=
"2"><br><h2>Static Public Member Functions
</h2></td></tr>
49 <tr><td class=
"memItemLeft" nowrap
align=
"right" valign=
"top">static void
</td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"class_sylph_1_1_application.html#81f7feb7bbcfc9277f4a714ef91dcfea">init
</a> (int argc, char *argv[], char *apple[],
<a class=
"el" href=
"namespace_sylph.html#8e3a8cf0fd1c1cf417e7834d2a473dc4">AppType
</a> type)
</td></tr>
51 <tr><td class=
"mdescLeft"> </td><td class=
"mdescRight">Initialize the current application.
<a href=
"#81f7feb7bbcfc9277f4a714ef91dcfea"></a><br></td></tr>
53 <hr><a name=
"_details"></a><h2>Detailed Description
</h2>
54 Class representing an application.
56 An application is any file containing executable object code that can be directly invoked by the operating system through a well-defined entry point. Probably the most famous example is the
<code>thisapp
</code> instance of this class, a pointer to an
<a class=
"el" href=
"class_sylph_1_1_application.html" title=
"Class representing an application.">Application
</a> object representing the application accessing the pointer.
<p>
57 It is not possible to directly instantiate an
<a class=
"el" href=
"class_sylph_1_1_application.html" title=
"Class representing an application.">Application
</a> object. Future releases may contain functions to create
<a class=
"el" href=
"class_sylph_1_1_application.html" title=
"Class representing an application.">Application
</a> objects and run the accompanying object code.
<hr><h2>Member Function Documentation
</h2>
58 <a class=
"anchor" name=
"81f7feb7bbcfc9277f4a714ef91dcfea"></a><!-- doxytag: member="Sylph::Application::init" ref="81f7feb7bbcfc9277f4a714ef91dcfea" args="(int argc, char *argv[], char *apple[], AppType type)" -->
60 <div class=
"memproto">
61 <table class=
"memname">
63 <td class=
"memname">void Sylph::Application::init
</td>
65 <td class=
"paramtype">int
</td>
66 <td class=
"paramname"> <em>argc
</em>,
</td>
69 <td class=
"paramkey"></td>
71 <td class=
"paramtype">char *
</td>
72 <td class=
"paramname"> <em>argv
</em>[],
</td>
75 <td class=
"paramkey"></td>
77 <td class=
"paramtype">char *
</td>
78 <td class=
"paramname"> <em>apple
</em>[],
</td>
81 <td class=
"paramkey"></td>
83 <td class=
"paramtype"><a class=
"el" href=
"namespace_sylph.html#8e3a8cf0fd1c1cf417e7834d2a473dc4">AppType
</a> </td>
84 <td class=
"paramname"> <em>type
</em></td><td> </td>
89 <td></td><td></td><td><code> [static]
</code></td>
96 Initialize the current application.
98 This function will give the correct value to
<code>thisapp
</code>. Note that if you use int SylphMain(Array
<String
>) as the entry point for your application (the default), you do not need to call this function explicitly. Instead, it will be called for you before the SylphMain function. Depending on the implementation, this function may or may not set up other important resources.
<dl compact
><dt><b>Parameters:
</b></dt><dd>
99 <table border=
"0" cellspacing=
"2" cellpadding=
"0">
100 <tr><td valign=
"top"></td><td valign=
"top"><em>argc
</em> </td><td>The number of arguments passed to the entry point designated by the platform.
</td></tr>
101 <tr><td valign=
"top"></td><td valign=
"top"><em>argv
</em> </td><td>An array of C strings containing the arguments passed to the entry point designated by the platform. This array is expected to have a length of argc or more. If argc is larger than the actual length of argv, undefined behaviour may occur.
</td></tr>
102 <tr><td valign=
"top"></td><td valign=
"top"><em>apple
</em> </td><td>The so-called 'apple-vector', an array of chars unique to the Mac OS X-platform. This array is used to determine the location of the binary solely on the Mac platform and is the fourth argument to the
<code>main
</code> entry function. On other platforms, this array may be substituted by a
<code>NULL
</code> pointer. Substituting this array on the Mac platform for anything else than the actual apple vector passed to the
<code>main
</code> function may lead to undefined behaviour.
</td></tr>
103 <tr><td valign=
"top"></td><td valign=
"top"><em>type
</em> </td><td>An enumerated type representing the implementation to use for resource retrieval.
</td></tr>
109 <a class=
"anchor" name=
"86f3f28afa3682734789a12ae578c656"></a><!-- doxytag: member="Sylph::Application::location" ref="86f3f28afa3682734789a12ae578c656" args="()" -->
110 <div class=
"memitem">
111 <div class=
"memproto">
112 <table class=
"memname">
114 <td class=
"memname">const
<a class=
"el" href=
"class_sylph_1_1_string.html">String
</a> Sylph::Application::location
</td>
116 <td class=
"paramname"> </td>
117 <td> )
</td>
118 <td><code> [inline]
</code></td>
125 Returns the location of the file containing the object code of the application.
127 In case the application for which the location is requested is
<code>thisapp
</code>, he exact method used to determine the location is platform-dependant and may fail. In this case, the value is either set to an empty string or a garbage value. Depending on the implementation, an error may be raised as well during initialisation.
<dl class=
"return" compact
><dt><b>Returns:
</b></dt><dd>the application's location.
</dd></dl>
132 <hr size=
"1" class=
"unhidden"><address style=
"text-align: right;"><small>
133 Documentation for LibSylph by Doxygen