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
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html >
<head><title>Naming conventions</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="generator" content="TeX4ht (http://www.tug.org/tex4ht/)">
<meta name="originator" content="TeX4ht (http://www.tug.org/tex4ht/)">
<!-- 3,html -->
<meta name="src" content="nipguide.tex">
<link rel="stylesheet" type="text/css" href="nipguide.css">
</head><body
>
<!--l. 239--><div class="crosslinks"><p class="noindent">[<a
href="nipguidese26.html" >next</a>] [<a
href="nipguidese24.html" >prev</a>] [<a
href="nipguidese24.html#tailnipguidese24.html" >prev-tail</a>] [<a
href="#tailnipguidese25.html">tail</a>] [<a
href="nipguidech6.html#nipguidese25.html" >up</a>] </p></div>
<h3 class="sectionHead"><span class="titlemark">6.4 </span> <a
id="x35-610006.4"></a>Naming conventions</h3>
<!--l. 241--><p class="noindent" >You can name things in any way you like, but we’ve used
the following conventions.
<ul class="itemize1">
<li class="itemize">Classes start with a capital letter, words are
separated with underscores, subsequent words are
not capitalised (eg. <span
class="phvr7t-x-x-80">Image</span><span
class="phvr7t-x-x-80">_file</span>)
</li>
<li class="itemize">Private names are prefixed with underscores (and
are hidden by most of the user interface)
</li>
<li class="itemize">Functions from the VIPS library are prefixed with
<span
class="phvr7t-x-x-80">im</span><span
class="phvr7t-x-x-80">_</span>
</li>
<li class="itemize">Global utility functions (eg. <span
class="phvr7t-x-x-80">map</span>), public members
(eg. <span
class="phvr7t-x-x-80">Colour.colour</span><span
class="phvr7t-x-x-80">_space</span>) are all lower case, words
are separated with underscores, subsequent words
are not capitalised
</li>
<li class="itemize">Constants are capitalised (eg.
<span
class="phvr7t-x-x-80">Operator</span><span
class="phvr7t-x-x-80">_type.COMPOUND</span><span
class="phvr7t-x-x-80">_REWRAP</span>)
</li></ul>
<!--l. 267--><div class="crosslinks"><p class="noindent">[<a
href="nipguidese26.html" >next</a>] [<a
href="nipguidese24.html" >prev</a>] [<a
href="nipguidese24.html#tailnipguidese24.html" >prev-tail</a>] [<a
href="nipguidese25.html" >front</a>] [<a
href="nipguidech6.html#nipguidese25.html" >up</a>] </p></div>
<!--l. 267--><p class="indent" > <a
id="tailnipguidese25.html"></a>
</body></html>
|