Sophie

Sophie

distrib > Fedora > 18 > i386 > by-pkgid > 10941174a3f0743ac497348990268016 > files > 94

travelccm-doc-1.00.1-2.fc18.noarch.rpm

<!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>
	<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
	<meta name="robots" content="index,follow"/>
	<title>Coding Rules</title>
	<link rel="shortcut icon" href="favicon.ico">
	<link href="tabs.css" rel="stylesheet" type="text/css"/>
	<link href="travelccm.css" rel="stylesheet" type="text/css"/>
	<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
	<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
	<script type="text/javascript">
	  var _gaq = _gaq || [];
	  _gaq.push(['_setAccount', 'UA-25250378-1']);
	  _gaq.push(['_setDomainName', 'none']);
	  _gaq.push(['_setAllowLinker', true]);
	  _gaq.push(['_trackPageview']);
	  (function() {
      var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
      ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
      var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
	  })();
	</script>
	<script type="text/javascript"
			src="https://apis.google.com/js/plusone.js"></script>
  </head>
  <body>
	<div id="top"><!-- do not remove this div! -->
	  <div id="titlearea">
		<table width="100%">
		  <tbody>
			<tr style="height: 56px;">
			  <td style="padding-left: 0.5em;">
				<div id="projectname"><a href="http://travel-ccm.sourceforge.net"><img height="45px" alt="TravelCCM Logo" src="travelccm_logo.png"></a>
				  &#160;<span id="projectnumber">1.00.1</span>
				</div>
				<div id="projectbrief">C++ Travel Customer Choice Model Library</div>
			  </td>
			  <!-- begin SOURCEFORGE_CUSTOM-->
			  <td>
				<div id="sflogo"><a href="http://travel-ccm.sourceforge.net"><img height="45px" alt="SourceForge Logo" src="sfx_logo.png"></a></div>
			  </td>
			  <!-- end SOURCEFORGE_CUSTOM-->
			</tr>
		  </tbody>
		</table>
	  </div>
<!-- Generated by Doxygen 1.8.3.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('codingrules.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">Coding Rules </div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p>In the following sections we describe the naming conventions which are used for files, classes, structures, local variables, and global variables.</p>
<h1><a class="anchor" id="cr_variables"></a>
Default Naming Rules for Variables</h1>
<p>Variables are named using lower-case letters and words are separated using under-score. Abbreviations, when used in variable names, are also written with lower-case letters. Examples:</p>
<ul>
<li>
<code>`fft_size'</code>  </li>
<li>
<code>`nrof_paths'</code>  </li>
<li>
<code>`my_variable_name'</code>  </li>
</ul>
<p>Some variable names or parts of variable names are commonly used in several different functions and files to denote the same thing. For instance the following common names and prefixes should be used:</p>
<ul>
<li>
<code>`rows'</code> - number of rows in a matrix  </li>
<li>
<code>`cols'</code> - number of columns in a matrix  </li>
<li>
<code>`nrof_'</code> - number of ...  </li>
</ul>
<h1><a class="anchor" id="cr_files"></a>
Default Naming Rules for Files</h1>
<p>Files are named using lower-case letters and words are separated using under-score. Abbreviations, when used in file names, are also written with lower-case letters.</p>
<p>Source files are named using <code>`.cpp'</code> suffix, whereas header files end with <code>`.h'</code> extension. Examples:</p>
<ul>
<li>
<code>`my_file.h'</code>  </li>
<li>
<code>`my_file.cpp'</code>  </li>
</ul>
<h1><a class="anchor" id="cr_functions"></a>
Default Naming Rules for Functions</h1>
<p>Function names are named using lower-case letters and words are separated using under-score. Abbreviations, when used in function names, are also written with lower-case letters. This rule applies both to stand-alone functions as well as to member functions of classes. Example:</p>
<ul>
<li>
<code>int my_function_name(int a, int b)</code>  </li>
</ul>
<h1><a class="anchor" id="cr_classes"></a>
Default Naming Rules for Classes and Structures</h1>
<p>Each new word in a class or structure name should always start with a capital letter and the words should be separated with an under-score. Abbreviations are written with capital letters. Examples:</p>
<ul>
<li>
<code>`My_Class_Name'</code>  </li>
<li>
<code>`My_Struct_Name'</code>  </li>
<li>
<code>`OFDM'</code>  </li>
</ul>
<h1><a class="anchor" id="cr_classes_functionality"></a>
Default Functionality of Classes</h1>
<p>All classes that are configured by input parameters should include:</p>
<ul>
<li>
default empty constructor  </li>
<li>
one or more additional constructor(s) that takes input parameters and initializes the class instance  </li>
<li>
setup function, preferably named <code>`setup'</code> or <code>`set_parameters'</code>  </li>
</ul>
<p>Explicit destructor functions are not required, unless they are needed. It shall not be possible to use any of the other member functions unless the class has been properly initiated with the input parameters. </p>
</div></div><!-- contents -->
</div><!-- doc-content -->
		
		<li class="footer">Generated on Wed May 22 2013 21:19:39 for TravelCCM by
		  <a href="http://www.doxygen.org/index.html">
			<img class="footer" src="doxygen.png" alt="doxygen"/></a> 
		  1.8.3.1
		</li>
		<li class="footer">
		  <a href="http://sourceforge.net/projects/travel-ccm"><img class="footer" src="http://sflogo.sourceforge.net/sflogo.php?group_id=261639&type=12&format=.png" alt="SourceForge Logo"></a>
		</li>
	  </ul>
	</div>
  </body>
</html>