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/Core/Application.h Source File
</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><a href=
"classes.html"><span>Classes
</span></a></li>
13 <li class=
"current"><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=
"files.html"><span>File
List
</span></a></li>
22 <h1>Sylph/Core/Application.h
</h1><div class=
"fragment"><pre class=
"fragment"><a name=
"l00001"></a>00001 <span class=
"comment">/*
</span>
23 <a name=
"l00002"></a>00002 <span class=
"comment"> * LibSylph Class Library
</span>
24 <a name=
"l00003"></a>00003 <span class=
"comment"> * Copyright (C)
2009 Frank
"SeySayux" Erens
<seysayux@gmail.com
></span>
25 <a name=
"l00004"></a>00004 <span class=
"comment"> *
</span>
26 <a name=
"l00005"></a>00005 <span class=
"comment"> * This library is free software; you can redistribute it and/or
</span>
27 <a name=
"l00006"></a>00006 <span class=
"comment"> * modify it under the terms of the LibSylph Pulbic License as published
</span>
28 <a name=
"l00007"></a>00007 <span class=
"comment"> * by the LibSylph Developers; either version
1.0 of the License, or
</span>
29 <a name=
"l00008"></a>00008 <span class=
"comment"> * (at your option) any later version.
</span>
30 <a name=
"l00009"></a>00009 <span class=
"comment"> *
</span>
31 <a name=
"l00010"></a>00010 <span class=
"comment"> * This library is distributed in the hope that it will be useful,
</span>
32 <a name=
"l00011"></a>00011 <span class=
"comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of
</span>
33 <a name=
"l00012"></a>00012 <span class=
"comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the LibSylph
</span>
34 <a name=
"l00013"></a>00013 <span class=
"comment"> * Public License for more details.
</span>
35 <a name=
"l00014"></a>00014 <span class=
"comment"> *
</span>
36 <a name=
"l00015"></a>00015 <span class=
"comment"> * You should have received a copy of the LibSylph Public License
</span>
37 <a name=
"l00016"></a>00016 <span class=
"comment"> * along with this Library, if not, contact the LibSylph Developers.
</span>
38 <a name=
"l00017"></a>00017 <span class=
"comment"> *
</span>
39 <a name=
"l00018"></a>00018 <span class=
"comment"> * Created on
9 november
2008,
11:
48</span>
40 <a name=
"l00019"></a>00019 <span class=
"comment"> */
</span>
41 <a name=
"l00020"></a>00020
42 <a name=
"l00021"></a>00021 <span class=
"preprocessor">#ifndef APPLICATION_H_
</span>
43 <a name=
"l00022"></a>00022 <span class=
"preprocessor"></span><span class=
"preprocessor">#define APPLICATION_H_
</span>
44 <a name=
"l00023"></a>00023 <span class=
"preprocessor"></span>
45 <a name=
"l00024"></a>00024 <span class=
"preprocessor">#include
"Object.h"</span>
46 <a name=
"l00025"></a>00025 <span class=
"preprocessor">#include
"Array.h"</span>
47 <a name=
"l00026"></a>00026 <span class=
"preprocessor">#include
"String.h"</span>
48 <a name=
"l00027"></a>00027
49 <a name=
"l00028"></a>00028 <span class=
"preprocessor">#include
"AppType.h"</span>
50 <a name=
"l00029"></a>00029
51 <a name=
"l00030"></a>00030 <span class=
"preprocessor">#include
"../OS/GuessOS.h"</span>
52 <a name=
"l00031"></a>00031
53 <a name=
"l00032"></a>00032
54 <a name=
"l00033"></a>00033 <span class=
"preprocessor">#define thisapp ::Sylph::Application::self_app
</span>
55 <a name=
"l00034"></a>00034 <span class=
"preprocessor"></span>
56 <a name=
"l00035"></a>00035 SYLPH_BEGIN_NAMESPACE
57 <a name=
"l00036"></a>00036
58 <a name=
"l00037"></a>00037 <span class=
"keyword">class
</span>ApplicationSelf;
59 <a name=
"l00038"></a>00038 <span class=
"keyword">class
</span>File;
60 <a name=
"l00039"></a>00039
61 <a name=
"l00040"></a>00040 <span class=
"keyword">template
</span><<span class=
"keyword">class
</span> T
> <span class=
"keyword">class
</span>Array;
62 <a name=
"l00041"></a>00041
63 <a name=
"l00042"></a>00042 SYLPH_PUBLIC
64 <a name=
"l00043"></a>00043
65 <a name=
"l00054"></a><a class=
"code" href=
"class_sylph_1_1_application.html">00054</a> <span class=
"keyword">class
</span><a class=
"code" href=
"class_sylph_1_1_application.html" title=
"Class representing an application.">Application
</a> :
<span class=
"keyword">public
</span> <a class=
"code" href=
"class_sylph_1_1_object.html" title=
"The root of all classes.">Object
</a> {
66 <a name=
"l00055"></a>00055 <span class=
"keyword">friend
</span> <span class=
"keyword">class
</span><a class=
"code" href=
"class_sylph_1_1_application_self.html" title=
"An Application representing the currently running application.">ApplicationSelf
</a>;
67 <a name=
"l00056"></a>00056 <span class=
"keyword">public
</span>:
68 <a name=
"l00057"></a>00057
69 <a name=
"l00068"></a><a class=
"code" href=
"class_sylph_1_1_application.html#86f3f28afa3682734789a12ae578c656">00068</a> <span class=
"keyword">const
</span> <a class=
"code" href=
"class_sylph_1_1_string.html" title=
"The String class represents character strings.">String
</a> <a class=
"code" href=
"class_sylph_1_1_application.html#86f3f28afa3682734789a12ae578c656" title=
"Returns the location of the file containing the object code of the application.">location
</a>() {
70 <a name=
"l00069"></a>00069 <span class=
"keywordflow">return
</span> _location;
71 <a name=
"l00070"></a>00070 }
72 <a name=
"l00071"></a>00071
73 <a name=
"l00072"></a>00072 <span class=
"keyword">static
</span> <a class=
"code" href=
"class_sylph_1_1_application_self.html" title=
"An Application representing the currently running application.">ApplicationSelf
</a> * self_app;
74 <a name=
"l00073"></a>00073
75 <a name=
"l00097"></a>00097 <span class=
"keyword">static
</span> <span class=
"keywordtype">void
</span> init(
<span class=
"keywordtype">int
</span> argc,
<span class=
"keywordtype">char
</span> * argv[],
<span class=
"keywordtype">char
</span> * apple[],
<a class=
"code" href=
"namespace_sylph.html#8e3a8cf0fd1c1cf417e7834d2a473dc4" title=
"This enumeration contains the possible Application Types.">AppType
</a> type);
76 <a name=
"l00098"></a>00098
77 <a name=
"l00099"></a>00099 <span class=
"keyword">protected
</span>:
78 <a name=
"l00100"></a>00100 <a class=
"code" href=
"class_sylph_1_1_string.html" title=
"The String class represents character strings.">String
</a> _location;
79 <a name=
"l00101"></a>00101
80 <a name=
"l00102"></a>00102 <span class=
"keyword">private
</span>:
81 <a name=
"l00103"></a>00103 <a class=
"code" href=
"class_sylph_1_1_application.html" title=
"Class representing an application.">Application
</a>();
82 <a name=
"l00104"></a>00104 <span class=
"keyword">virtual
</span> ~
<a class=
"code" href=
"class_sylph_1_1_application.html" title=
"Class representing an application.">Application
</a>();
83 <a name=
"l00105"></a>00105
84 <a name=
"l00106"></a>00106
85 <a name=
"l00107"></a>00107 };
86 <a name=
"l00108"></a>00108
87 <a name=
"l00116"></a><a class=
"code" href=
"class_sylph_1_1_application_self.html">00116</a> <span class=
"keyword">class
</span><a class=
"code" href=
"class_sylph_1_1_application_self.html" title=
"An Application representing the currently running application.">ApplicationSelf
</a> :
<span class=
"keyword">public
</span> <a class=
"code" href=
"class_sylph_1_1_application.html" title=
"Class representing an application.">Application
</a> {
88 <a name=
"l00117"></a>00117 <span class=
"keyword">friend
</span> <span class=
"keyword">class
</span><a class=
"code" href=
"class_sylph_1_1_application.html" title=
"Class representing an application.">Application
</a>;
89 <a name=
"l00118"></a>00118 <span class=
"keyword">public
</span>:
90 <a name=
"l00119"></a>00119 <span class=
"keyword">const
</span> <a class=
"code" href=
"class_sylph_1_1_string.html" title=
"The String class represents character strings.">String
</a> appName() {
91 <a name=
"l00120"></a>00120 <span class=
"keywordflow">return
</span> _appName;
92 <a name=
"l00121"></a>00121 }
93 <a name=
"l00122"></a>00122
94 <a name=
"l00129"></a>00129 <a class=
"code" href=
"namespace_sylph.html#8e3a8cf0fd1c1cf417e7834d2a473dc4" title=
"This enumeration contains the possible Application Types.">AppType
</a> appType();
95 <a name=
"l00130"></a>00130
96 <a name=
"l00131"></a>00131 <span class=
"keywordtype">void
</span> fail(
<span class=
"keyword">const
</span> <a class=
"code" href=
"class_sylph_1_1_string.html" title=
"The String class represents character strings.">String
</a> reason);
97 <a name=
"l00132"></a>00132 <span class=
"keywordtype">void
</span> fail(
<span class=
"keyword">const
</span> <a class=
"code" href=
"class_sylph_1_1_string.html" title=
"The String class represents character strings.">String
</a> reason,
<span class=
"keyword">const
</span> <a class=
"code" href=
"class_sylph_1_1_string.html" title=
"The String class represents character strings.">String
</a> file,
<span class=
"keywordtype">unsigned
</span> <span class=
"keywordtype">int
</span> line);
98 <a name=
"l00133"></a>00133
99 <a name=
"l00134"></a>00134
100 <a name=
"l00135"></a>00135 <span class=
"keyword">virtual
</span> <span class=
"keyword">const
</span> <a class=
"code" href=
"class_sylph_1_1_file.html">File
</a>& bundle() =
0;
101 <a name=
"l00136"></a>00136 <span class=
"keyword">virtual
</span> <span class=
"keyword">const
</span> <a class=
"code" href=
"class_sylph_1_1_file.html">File
</a>& resourceDir() =
0;
102 <a name=
"l00137"></a>00137 <span class=
"keyword">virtual
</span> <span class=
"keyword">const
</span> <a class=
"code" href=
"class_sylph_1_1_file.html">File
</a> resource(
<a class=
"code" href=
"class_sylph_1_1_string.html" title=
"The String class represents character strings.">String
</a> rsc) =
0;
103 <a name=
"l00138"></a>00138 <span class=
"keyword">virtual
</span> <span class=
"keyword">const
</span> <a class=
"code" href=
"class_sylph_1_1_file.html">File
</a>& libraryDir() =
0;
104 <a name=
"l00139"></a>00139 <span class=
"keyword">virtual
</span> <span class=
"keyword">const
</span> <a class=
"code" href=
"class_sylph_1_1_file.html">File
</a>& pluginDir() =
0;
105 <a name=
"l00140"></a>00140 <span class=
"keyword">virtual
</span> <span class=
"keyword">const
</span> <a class=
"code" href=
"class_sylph_1_1_file.html">File
</a>& plugindisabledDir() =
0;
106 <a name=
"l00141"></a>00141
107 <a name=
"l00142"></a>00142 <span class=
"keyword">virtual
</span> <span class=
"keyword">const
</span> <a class=
"code" href=
"class_sylph_1_1_file.html">File
</a>& systemLibraryDir() =
0;
108 <a name=
"l00143"></a>00143 <span class=
"keyword">virtual
</span> <span class=
"keyword">const
</span> <a class=
"code" href=
"class_sylph_1_1_file.html">File
</a>& systemSettings() =
0;
109 <a name=
"l00144"></a>00144 <span class=
"keyword">virtual
</span> <span class=
"keyword">const
</span> <a class=
"code" href=
"class_sylph_1_1_file.html">File
</a>& systemSettingsDir() =
0;
110 <a name=
"l00145"></a>00145 <span class=
"keyword">virtual
</span> <span class=
"keyword">const
</span> <a class=
"code" href=
"class_sylph_1_1_file.html">File
</a>& systemPluginDir() =
0;
111 <a name=
"l00146"></a>00146 <span class=
"keyword">virtual
</span> <span class=
"keyword">const
</span> <a class=
"code" href=
"class_sylph_1_1_file.html">File
</a>& systemPluginDisabledDir() =
0;
112 <a name=
"l00147"></a>00147 <span class=
"keyword">virtual
</span> <span class=
"keyword">const
</span> <a class=
"code" href=
"class_sylph_1_1_file.html">File
</a>& systemResourceDir() =
0;
113 <a name=
"l00148"></a>00148 <span class=
"keyword">virtual
</span> <span class=
"keyword">const
</span> <a class=
"code" href=
"class_sylph_1_1_file.html">File
</a> systemResource(
<a class=
"code" href=
"class_sylph_1_1_string.html" title=
"The String class represents character strings.">String
</a> rsc) =
0;
114 <a name=
"l00149"></a>00149
115 <a name=
"l00150"></a>00150 <span class=
"keyword">virtual
</span> <span class=
"keyword">const
</span> <a class=
"code" href=
"class_sylph_1_1_file.html">File
</a>& userHome() =
0;
116 <a name=
"l00151"></a>00151
117 <a name=
"l00152"></a>00152 <span class=
"keyword">virtual
</span> <span class=
"keyword">const
</span> <a class=
"code" href=
"class_sylph_1_1_file.html">File
</a>& userLibraryDir() =
0;
118 <a name=
"l00153"></a>00153 <span class=
"keyword">virtual
</span> <span class=
"keyword">const
</span> <a class=
"code" href=
"class_sylph_1_1_file.html">File
</a>& userSettings() =
0;
119 <a name=
"l00154"></a>00154 <span class=
"keyword">virtual
</span> <span class=
"keyword">const
</span> <a class=
"code" href=
"class_sylph_1_1_file.html">File
</a>& userSettingsDir() =
0;
120 <a name=
"l00155"></a>00155 <span class=
"keyword">virtual
</span> <span class=
"keyword">const
</span> <a class=
"code" href=
"class_sylph_1_1_file.html">File
</a>& userPluginDir() =
0;
121 <a name=
"l00156"></a>00156 <span class=
"keyword">virtual
</span> <span class=
"keyword">const
</span> <a class=
"code" href=
"class_sylph_1_1_file.html">File
</a>& userPluginDisabledDir() =
0;
122 <a name=
"l00157"></a>00157 <span class=
"keyword">virtual
</span> <span class=
"keyword">const
</span> <a class=
"code" href=
"class_sylph_1_1_file.html">File
</a>& userResourceDir() =
0;
123 <a name=
"l00158"></a>00158 <span class=
"keyword">virtual
</span> <span class=
"keyword">const
</span> <a class=
"code" href=
"class_sylph_1_1_file.html">File
</a> userResource(
<a class=
"code" href=
"class_sylph_1_1_string.html" title=
"The String class represents character strings.">String
</a> rsc) =
0;
124 <a name=
"l00159"></a>00159
125 <a name=
"l00160"></a>00160 <span class=
"keyword">virtual
</span> <span class=
"keyword">const
</span> <a class=
"code" href=
"class_sylph_1_1_file.html">File
</a>& prefix() =
0;
126 <a name=
"l00161"></a>00161
127 <a name=
"l00162"></a>00162 <span class=
"keyword">protected
</span>:
128 <a name=
"l00163"></a>00163 <a class=
"code" href=
"class_sylph_1_1_application_self.html" title=
"An Application representing the currently running application.">ApplicationSelf
</a>() {
129 <a name=
"l00164"></a>00164 _preconstruct();
130 <a name=
"l00165"></a>00165 }
131 <a name=
"l00166"></a>00166 <span class=
"keyword">virtual
</span> ~
<a class=
"code" href=
"class_sylph_1_1_application_self.html" title=
"An Application representing the currently running application.">ApplicationSelf
</a>();
132 <a name=
"l00167"></a>00167
133 <a name=
"l00168"></a>00168 <span class=
"keywordtype">void
</span> _fail(
<span class=
"keyword">const
</span> <a class=
"code" href=
"class_sylph_1_1_string.html" title=
"The String class represents character strings.">String
</a> appName,
<span class=
"keyword">const
</span> <a class=
"code" href=
"class_sylph_1_1_string.html" title=
"The String class represents character strings.">String
</a> reason);
134 <a name=
"l00169"></a>00169 <span class=
"keywordtype">void
</span> _fail(
<span class=
"keyword">const
</span> <a class=
"code" href=
"class_sylph_1_1_string.html" title=
"The String class represents character strings.">String
</a> appName,
<span class=
"keyword">const
</span> <a class=
"code" href=
"class_sylph_1_1_string.html" title=
"The String class represents character strings.">String
</a> reason,
135 <a name=
"l00170"></a>00170 <span class=
"keyword">const
</span> <a class=
"code" href=
"class_sylph_1_1_string.html" title=
"The String class represents character strings.">String
</a> file,
<span class=
"keywordtype">unsigned
</span> <span class=
"keywordtype">int
</span> line);
136 <a name=
"l00171"></a>00171
137 <a name=
"l00172"></a>00172 <span class=
"keyword">private
</span>:
138 <a name=
"l00173"></a>00173 <span class=
"keywordtype">void
</span> _preconstruct();
139 <a name=
"l00174"></a>00174 <a class=
"code" href=
"class_sylph_1_1_string.html" title=
"The String class represents character strings.">String
</a> _appName;
140 <a name=
"l00175"></a>00175 <a class=
"code" href=
"namespace_sylph.html#8e3a8cf0fd1c1cf417e7834d2a473dc4" title=
"This enumeration contains the possible Application Types.">AppType
</a> _appType;
141 <a name=
"l00176"></a>00176
142 <a name=
"l00177"></a>00177
143 <a name=
"l00178"></a>00178 };
144 <a name=
"l00179"></a>00179
145 <a name=
"l00180"></a>00180 SYLPH_END_NAMESPACE
146 <a name=
"l00181"></a>00181
147 <a name=
"l00182"></a>00182 <span class=
"preprocessor">#endif
</span><span class=
"comment">/* APPLICATION_H_ */
</span>
148 <a name=
"l00183"></a>00183
150 <hr size=
"1" class=
"unhidden"><address style=
"text-align: right;"><small>
151 Documentation for LibSylph by Doxygen