Root/
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>SFML - Simple and Fast Multimedia Library</title> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> <!--<link rel='stylesheet' type='text/css' href="http://fonts.googleapis.com/css?family=Ubuntu:400,700,400italic"/>--> <link rel="stylesheet" type="text/css" href="doxygen.css" title="default" media="screen,print" /> </head> <body> <div id="banner-container"> <div id="banner"> <span id="sfml">SFML</span> </div> </div> <div id="content"> <!-- Generated by Doxygen 1.8.2 --> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.htm"><span>Main Page</span></a></li> <li><a href="modules.htm"><span>Modules</span></a></li> <li class="current"><a href="annotated.htm"><span>Classes</span></a></li> <li><a href="files.htm"><span>Files</span></a></li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="annotated.htm"><span>Class List</span></a></li> <li><a href="classes.htm"><span>Class Index</span></a></li> <li><a href="hierarchy.htm"><span>Class Hierarchy</span></a></li> <li><a href="functions.htm"><span>Class Members</span></a></li> </ul> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><b>sf</b></li><li class="navelem"><a class="el" href="classsf_1_1NonCopyable.htm">NonCopyable</a></li> </ul> </div> </div><!-- top --> <div class="header"> <div class="summary"> <a href="#pro-methods">Protected Member Functions</a> | <a href="classsf_1_1NonCopyable-members.htm">List of all members</a> </div> <div class="headertitle"> <div class="title">sf::NonCopyable Class Reference<div class="ingroups"><a class="el" href="group__system.htm">System module</a></div></div> </div> </div><!--header--> <div class="contents"> <p>Utility class that makes any derived class non-copyable. <a href="classsf_1_1NonCopyable.htm#details">More...</a></p> <p><code>#include <<a class="el" href="NonCopyable_8hpp_source.htm">NonCopyable.hpp</a>></code></p> <div class="dynheader"> Inheritance diagram for sf::NonCopyable:</div> <div class="dyncontent"> <div class="center"> <img src="classsf_1_1NonCopyable.png" usemap="#sf::NonCopyable_map" alt=""/> <map id="sf::NonCopyable_map" name="sf::NonCopyable_map"> <area href="classsf_1_1Context.htm" title="Class holding a valid drawing context." alt="sf::Context" shape="rect" coords="115,56,220,80"/> <area href="classsf_1_1Ftp.htm" title="A FTP client." alt="sf::Ftp" shape="rect" coords="115,112,220,136"/> <area href="classsf_1_1Http.htm" title="A HTTP client." alt="sf::Http" shape="rect" coords="115,168,220,192"/> <area href="classsf_1_1Lock.htm" title="Automatic wrapper for locking and unlocking mutexes." alt="sf::Lock" shape="rect" coords="115,224,220,248"/> <area href="classsf_1_1Mutex.htm" title="Blocks concurrent access to shared resources from multiple threads." alt="sf::Mutex" shape="rect" coords="115,280,220,304"/> <area href="classsf_1_1RenderTarget.htm" title="Base class for all render targets (window, texture, ...)" alt="sf::RenderTarget" shape="rect" coords="115,336,220,360"/> <area href="classsf_1_1Shader.htm" title="Shader class (vertex and fragment)" alt="sf::Shader" shape="rect" coords="115,392,220,416"/> <area href="classsf_1_1Socket.htm" title="Base class for all the socket types." alt="sf::Socket" shape="rect" coords="115,448,220,472"/> <area href="classsf_1_1Thread.htm" title="Utility class to manipulate threads." alt="sf::Thread" shape="rect" coords="115,504,220,528"/> <area href="classsf_1_1ThreadLocal.htm" title="Defines variables with thread-local storage." alt="sf::ThreadLocal" shape="rect" coords="115,560,220,584"/> <area href="classsf_1_1Window.htm" title="Window that serves as a target for OpenGL rendering." alt="sf::Window" shape="rect" coords="115,616,220,640"/> </map> </div></div> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a> Protected Member Functions</h2></td></tr> <tr class="memitem:a2110add170580fdb946f887719da6860"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1NonCopyable.htm#a2110add170580fdb946f887719da6860">NonCopyable</a> ()</td></tr> <tr class="memdesc:a2110add170580fdb946f887719da6860"><td class="mdescLeft"> </td><td class="mdescRight">Default constructor. <a href="#a2110add170580fdb946f887719da6860"></a><br/></td></tr> <tr class="separator:a2110add170580fdb946f887719da6860"><td class="memSeparator" colspan="2"> </td></tr> </table> <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> <div class="textblock"><p>Utility class that makes any derived class non-copyable. </p> <p>This class makes its instances non-copyable, by explicitely disabling its copy constructor and its assignment operator.</p> <p>To create a non-copyable class, simply inherit from <a class="el" href="classsf_1_1NonCopyable.htm" title="Utility class that makes any derived class non-copyable.">sf::NonCopyable</a>.</p> <p>The type of inheritance (public or private) doesn't matter, the copy constructor and assignment operator are declared private in <a class="el" href="classsf_1_1NonCopyable.htm" title="Utility class that makes any derived class non-copyable.">sf::NonCopyable</a> so they will end up being inaccessible in both cases. Thus you can use a shorter syntax for inheriting from it (see below).</p> <p>Usage example: </p> <div class="fragment"><div class="line"><span class="keyword">class </span>MyNonCopyableClass : <a class="code" href="classsf_1_1NonCopyable.htm" title="Utility class that makes any derived class non-copyable.">sf::NonCopyable</a></div> <div class="line">{</div> <div class="line"> ...</div> <div class="line">};</div> </div><!-- fragment --><p>Deciding whether the instances of a class can be copied or not is a very important design choice. You are strongly encouraged to think about it before writing a class, and to use <a class="el" href="classsf_1_1NonCopyable.htm" title="Utility class that makes any derived class non-copyable.">sf::NonCopyable</a> when necessary to prevent many potential future errors when using it. This is also a very important indication to users of your class. </p> <p>Definition at line <a class="el" href="NonCopyable_8hpp_source.htm#l00041">41</a> of file <a class="el" href="NonCopyable_8hpp_source.htm">NonCopyable.hpp</a>.</p> </div><h2 class="groupheader">Constructor & Destructor Documentation</h2> <a class="anchor" id="a2110add170580fdb946f887719da6860"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">sf::NonCopyable::NonCopyable </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">protected</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Default constructor. </p> <p>Because this class has a copy constructor, the compiler will not automatically generate the default constructor. That's why we must define it explicitely. </p> <p>Definition at line <a class="el" href="NonCopyable_8hpp_source.htm#l00053">53</a> of file <a class="el" href="NonCopyable_8hpp_source.htm">NonCopyable.hpp</a>.</p> </div> </div> <hr/>The documentation for this class was generated from the following file:<ul> <li><a class="el" href="NonCopyable_8hpp_source.htm">NonCopyable.hpp</a></li> </ul> </div><!-- contents --> </div> <div id="footer-container"> <div id="footer"> Copyright � Laurent Gomila :: Documentation generated by <a href="http://www.doxygen.org/" title="doxygen website">doxygen</a> :: </div> </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-41898676-1', 'srchub.org'); ga('send', 'pageview'); |
Source at commit tip created 11 years 11 months ago. By Nathan Adams, Initial commit |
---|