Changeset 514 for trunk/doc/design/specs.tex
- Timestamp:
- Apr 23, 2004, 11:57:43 AM (22 years ago)
- File:
-
- 1 edited
-
trunk/doc/design/specs.tex (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/design/specs.tex
r424 r514 1 %%% $Id: specs.tex,v 1. 5 2004-04-15 01:38:47eugene Exp $1 %%% $Id: specs.tex,v 1.6 2004-04-23 21:57:43 eugene Exp $ 2 2 \documentclass[panstarrs]{panstarrs} 3 3 … … 172 172 \subsubsection{Software Coding Requirements} 173 173 174 \paragraph{CSCI Deliverable}175 176 All final source code generated for the IPP is to be delivered via177 CVS, including the test code. CVS revision history shall be included178 and made available via CVS.179 180 174 \paragraph{Languages} 181 175 … … 205 199 defined in the document TBD}. 206 200 201 \paragraph{Naming Conventions} 202 203 Header files must have names starting \code{ps} or \code{p_ps} for 204 private interface definitions. The latter must appear in a 205 subdirectory \code{private} of whichever directory is being searched 206 for the public header files. 207 208 Functions visible at global scope which are part of the public API 209 must have names begining with \code{ps}, and follow the naming 210 conventions in the coding standard. Functions that are visible at 211 global scope but which are not part of the public interface must have 212 names begining with \code{p_ps}. Functions that are local to a file 213 must \textit{not} start \code{ps} (or \code{p_ps}). 214 215 Variables visible at global scope which are part of the public API 216 must have names begining with \code{ps}, and follow the naming 217 conventions in the coding standard. Variables that are visible at 218 global scope but which are not part of the public interface must have 219 names begining with \code{p_ps}. Variables that are local to a file 220 must \textit{not} start \code{ps} (or \code{p_ps}). 221 222 The names of all enumerated types and C-preprocessor symbols (but not 223 variables declared \code{const}) must start with \code{PS_}, in the 224 case of public symbols, or \code{P_PS_}, for private symbols. The 225 rest of the name must be uppercase with words separated by underscores 226 (\code{_}). An exception is the case of system utilities implemented 227 as macros, in which case the names must conform to the convention for 228 function names. 229 230 When defining a function to convert from one type to another, the name 231 should be of the form \code{psOldToAlloc}, e.g.\hfil\break 232 \code{psEquatorialToEcliptic} (\emph{not} 233 \code{psEquatorial2Ecliptic}). 234 235 \paragraph{C Programming Guidelines} 236 237 Functions that assign to a variable should list that argument 238 \textit{first}, following the pattern of \code{strcpy}; e.g. 239 \begin{verbatim} 240 void psAddToVector(restrict psVec *outVec, const restrict psVec *inVec, 241 int val); 242 \end{verbatim} 243 244 Type definitions should always be accompanied by prototypes for their 245 constructors and destructors, following these guidelines: 246 247 \begin{itemize} 248 \item The constructor name should consist of the type name followed by 249 \code{Alloc}; e.g. a type \code{psImage} would be created by a 250 function 251 \begin{verbatim} 252 psImage *psImageAlloc(int nrow, int ncol); 253 \end{verbatim} 254 255 \item The type should be freed with a destructor named \code{typeFree}, e.g. 256 \begin{verbatim} 257 void psImageFree(psImage *img); 258 \end{verbatim} 259 260 \item The constructor must never return \code{NULL}, and no code calling the 261 constructor should ever check the return value. 262 263 \item The destructor must not return a value. 264 265 \item The destructor must handle being passed \code{NULL} by simply 266 returning immediately. This should not be treated as an error 267 condition. 268 269 \item Constructors and Destructors should use the memory reference 270 counter facilities of the PSLib memory management system. 271 272 \end{itemize} 273 207 274 \paragraph{Commenting and Documentation} 208 275 … … 223 290 Source code version control shall be implemented with CVS. 224 291 292 \paragraph{CSCI Deliverable} 293 294 All final source code generated for the IPP is to be delivered via 295 CVS, including the test code. CVS revision history shall be included 296 and made available via CVS. 297 225 298 \paragraph{Platform architectures and operating systems} 226 299 … … 238 311 such as those caused by lex-generated code. 239 312 240 Although the code must compile successfully under all threelisted313 Although the code must compile successfully under both listed 241 314 operating systems, unit testing should only be performed for the 242 315 x86/Linux combination. … … 244 317 \paragraph{Software Configuration} 245 318 246 \tbd{ Makefiles, directory structures, UPS, etc}319 \tbd{deferred} 247 320 248 321 \subsubsection{Architectural Components}
Note:
See TracChangeset
for help on using the changeset viewer.
