IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 4109


Ignore:
Timestamp:
Jun 3, 2005, 3:30:18 PM (21 years ago)
Author:
Paul Price
Message:

Added functions psMemCheckType

Location:
trunk/doc/pslib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/pslib/ChangeLogSDRS.tex

    r4090 r4109  
    1 %%% $Id: ChangeLogSDRS.tex,v 1.125 2005-06-02 21:13:29 jhoblitt Exp $
     1%%% $Id: ChangeLogSDRS.tex,v 1.126 2005-06-04 01:30:18 price Exp $
    22
    33\subsection{Changes from version 00 to version 01}
     
    669669\item add \code{PS_META_NULL}
    670670\item add \code{NULL} keyword to ``Configuration files''
    671 \end{itemize}
     671\item Added \code{psMemCheckTYPE} functions, for many values of \code{TYPE}.
     672\end{itemize}
  • trunk/doc/pslib/psLibSDRS.tex

    r4089 r4109  
    1 %%% $Id: psLibSDRS.tex,v 1.261 2005-06-02 21:10:42 jhoblitt Exp $
     1%%% $Id: psLibSDRS.tex,v 1.262 2005-06-04 01:30:18 price Exp $
    22\documentclass[panstarrs,spec]{panstarrs}
    33
     
    13181318We discuss the application of \code{psType} in more detail in
    13191319section~\ref{sec:arithmetic}. 
     1320
     1321\subsection{Type checking}
     1322
     1323Several of the collections contain data using a \code{void*} pointer.
     1324This makes it difficult to ensure that data coming off a collection is
     1325of a particular, desired type.  Nevertheless, there is a way of
     1326identifying the type of a pointer pulled off a collection --- the
     1327registered deallocator function stored in the \code{psMemBlock}.  We
     1328specify functions below, one for each of the major types in psLib,
     1329that check the type on a particular pointer, returning \code{true} if
     1330the \code{ptr} matches the desired type, as determined from the
     1331registered deallocator function.  These functions may be implemented
     1332as macros if that is deemed convenient.
     1333
     1334\begin{prototype}
     1335bool psMemCheckArray(psPtr ptr);
     1336bool psMemCheckBitSet(psPtr ptr);
     1337bool psMemCheckCell(psPtr ptr);
     1338bool psMemCheckChip(psPtr ptr);
     1339bool psMemCheckCube(psPtr ptr);
     1340bool psMemCheckFits(psPtr ptr);
     1341bool psMemCheckHash(psPtr ptr);
     1342bool psMemCheckHistogram(psPtr ptr);
     1343bool psMemCheckImage(psPtr ptr);
     1344bool psMemCheckKernel(psPtr ptr);
     1345bool psMemCheckList(psPtr ptr);
     1346bool psMemCheckLookupTable(psPtr ptr);
     1347bool psMemCheckMetadata(psPtr ptr);
     1348bool psMemCheckMetadataItem(psPtr ptr);
     1349bool psMemCheckMinimization(psPtr ptr);
     1350bool psMemCheckPixels(psPtr ptr);
     1351bool psMemCheckPlane(psPtr ptr);
     1352bool psMemCheckPlaneDistort(psPtr ptr);
     1353bool psMemCheckPlaneTransform(psPtr ptr);
     1354bool psMemCheckPolynomial1D(psPtr ptr);
     1355bool psMemCheckPolynomial2D(psPtr ptr);
     1356bool psMemCheckPolynomial3D(psPtr ptr);
     1357bool psMemCheckPolynomial4D(psPtr ptr);
     1358bool psMemCheckProjection(psPtr ptr);
     1359bool psMemCheckReadout(psPtr ptr);
     1360bool psMemCheckRegion(psPtr ptr);
     1361bool psMemCheckScalar(psPtr ptr);
     1362bool psMemCheckSphere(psPtr ptr);
     1363bool psMemCheckSphereTransform(psPtr ptr);
     1364bool psMemCheckSpline1D(psPtr ptr);
     1365bool psMemCheckStats(psPtr ptr);
     1366bool psMemCheckTime(psPtr ptr);
     1367bool psMemCheckVector(psPtr ptr);
     1368\end{prototype}
     1369
     1370For user convenience, we also specify a one-stop shop which simply
     1371executes the appropriate \code{psMemCheckWhatever} function according
     1372to the \code{type}:
     1373
     1374\begin{prototype}
     1375bool psMemCheckType(psType type, psPtr ptr);
     1376\end{prototype}
    13201377
    13211378\subsection{Simple Scalars}
Note: See TracChangeset for help on using the changeset viewer.