ewol/faq.html
2014-10-18 09:23:18 +02:00

115 lines
5.3 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<title>ewol Library</title>
<link rel="stylesheet" href="base.css">
<link rel="stylesheet" href="menu.css">
</head>
<body>
<div class="navbar navbar-fixed-top">
<div class="container">
<h1><a href="index.html">ewol library</a></h1>
<h4><a href="http://github.com/heeroyui/ewol/">&nbsp;&nbsp;&nbsp;[ sources ]</a></h4>
<h3>API:</h3> <div id="menu">
<ul class="niveau1">
<li class="sousmenu"><a href="namespace_ewol.html">ewol</a>
<ul class="niveau2">
<li><a href="namespace_ewol__translate.html">translate</a>
</li>
<li><a href="namespace_ewol__key.html">key</a>
</li>
<li><a href="namespace_ewol__widget.html">widget</a>
</li>
<li><a href="namespace_ewol__openGL.html">openGL</a>
</li>
<li class="sousmenu"><a href="namespace_ewol__context.html">context</a>
<ul class="niveau3">
<li><a href="namespace_ewol__context__clipBoard.html">clipBoard</a>
</li>
</ul>
</li>
<li><a href="namespace_ewol__compositing.html">compositing</a>
</li>
<li><a href="namespace_ewol__object.html">object</a>
</li>
<li><a href="namespace_ewol__resource.html">resource</a>
</li>
<li><a href="namespace_ewol__font.html">font</a>
</li>
<li><a href="namespace_ewol__event.html">event</a>
</li>
</ul>
</li>
<li><a href="namespace_MacOs.html">MacOs</a>
</li>
<li><a href="namespace_IOs.html">IOs</a>
</li>
</ul>
</div>
<h3>Documentation:</h3><div id="menu">
<ul class="niveau1"><li><a href="001_bases.html">Bases</a></li>
</ul><ul class="niveau1"><li><a href="faq.html">Faq</a></li>
</ul></div>
<h3>Tutorials:</h3><div id="menu">
<ul class="niveau1"><li><a href="tutorial_000_Build.html">Build</a></li>
</ul><ul class="niveau1"><li><a href="tutorial_001_HelloWord.html">Hello word</a></li>
</ul><ul class="niveau1"><li><a href="tutorial_010_ObjectModel.html">Object model</a></li>
</ul><ul class="niveau1"><li><a href="tutorial_011_ObjectConfig.html">Object config</a></li>
</ul><ul class="niveau1"><li><a href="tutorial_012_ObjectMessage.html">Object message</a></li>
</ul><ul class="niveau1"><li><a href="tutorial_020_FileAccess.html">File access</a></li>
</ul><ul class="niveau1"><li><a href="tutorial_021_Resources.html">Resources</a></li>
</ul><ul class="niveau1"><li><a href="tutorial_030_ConplexeXmlGui.html">Conplexe xml gui</a></li>
</ul><ul class="niveau1"><li><a href="tutorial_050_CreateCustomWidget.html">Create custom widget</a></li>
</ul><ul class="niveau1"><li><a href="tutorial_051_AddWidgetCustumInXML.html">Add widget custum in x m l</a></li>
</ul></div>
<br/><h3>Associate libraries:</h3><div id="menu">
<ul class="niveau1"><li><a href="../ejson/index.html">ejson</a></li>
</ul><ul class="niveau1"><li><a href="../egami/index.html">egami</a></li>
</ul><ul class="niveau1"><li><a href="../ege/index.html">ege</a></li>
</ul><ul class="niveau1"><li><a href="../esvg/index.html">esvg</a></li>
</ul><ul class="niveau1"><li><a href="../etk/index.html">etk</a></li>
</ul><ul class="niveau1"><li><a href="../exml/index.html">exml</a></li>
</ul></div>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
</div>
</div>
<div class="container" id="content">
<h1><center> FAQ </center></h1><br/>
<h1> What is ewol licence </h1><br/>
This is really simple : APACHE-2 :<br/>
Copyright ewol Edouard DUPIN<br/>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at<br/>
<a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a><br/>
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.<br/>
<br/>
<h1> Why we use "DECLARE_FACTORY" Macro ? </h1><br/>
For some reason!!! But everything might be clear:
<ul><li> In ewol we masively use std::shared_ptr&lt;xxx&gt; (I have create my own but it is not "standard" (I like when we use genecic system)).</li><li> The main class : <a href="class_ewol__Object.html">ewol::Object</a> herited from <span style="font-style: italic;">std::enable_shared_from_this&lt;Object&gt;</span> to permit to access at his own <span style="font-style: italic;">std::shared_ptr</span>.</li><li> Acces At his own <span style="font-style: italic;">std::shared_ptr</span> is not allowed in the class contructor/destructor.</li><li> Many time for meta-widget we need to propagate our <span style="font-style: italic;">std::shared_ptr</span> in child.</li></ul>
Then for all these reasons, I have create a simple MACRO that create a static template funtion that create the object and just after
creation call the init(...) function to permit to create a complex widget or others with some writing convinience.<br/>
<br/>
</div>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-46753803-1', 'heeroyui.github.io');
ga('send', 'pageview');
</script>
</body>
</html>