- ... (OMT)1.1
- Object-Oriented
Modeling and Design; Rumbaugh, Blaha, Premerlani, Eddy, and Lorensen
(Prentice-Hall:1991).
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... chapter2.1
- Originally written by R.T. Duquet and updated by W.K. Young.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... it.3.1
- Please consult
with Mark Calabretta, mcalabre@atnf.csiro.au, first.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... normally3.2
- Some systems which support precompiled headers can avoid
this under some circumstances.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... hold:4.1
- Plum, Saks; C++ Programming Guidelines; Plum Hall, 1991. (p. 208)
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... file,6.1
- See
code/install/codedevl/template-class-h
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... file,6.2
- See code/install/codedevl/template-class-cc. Neither totally inlined
classes, nor abstract base classes may need an implementation file.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...
program6.3
- See code/install/codedevl/template-main-cc
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... classes6.4
- A
good example is a read-only class, and a read-write class derived from it.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...
files.6.5
- If you do this, make sure that the documentation sections -
synopsis, etymology, motivation, etc. - are completed for every
class contained in the file.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... file.6.6
- Special language tools can measure coverage. See AIPS++ Note 170,
``The AIPS++ Code Review Process'' for suggestions on writing test programs.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... declarations6.7
- Explicitly or implicitly like in
iosfwd or Complexfwd
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... types6.8
- Char, uChar, Int, uInt, Float, Double, lDouble, Complex, DComplex,
String. In special circumstances the use of Long and uLong is allowed.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... directory.6.9
- See code/install/codedevl/template-module-h. The Tables module,
code/aips/implement/Tables is a good example to study.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...
used.6.10
- As a rule, it is advisable for application programmers to
include in their code the include files for the individual classes being
used.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... file6.11
- See
code/install/codedevl/template-module-h
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...
management.6.12
- reident, unused, duplicates programs
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... updated.6.13
- See, for instance, the
documentation tags reviewed and todo in template-class-h.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... suffice.6.14
- This may sometimes
involve the use of special forwarding include files like iosfwd.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... it.6.15
- Or
declare the references and pointers const - but be aware of threading
problems in that case
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...
constructor6.16
- Note that this is only created when
no user constructor at all present
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...
destructor6.17
- always supply a virtual destructor in a base class
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... last.6.18
- This order may seem unnatural, but it is a
direct consequence of the C++ rule that default parameters appear
last in the parameter list.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... argument.6.19
- But also consider strcpy from the
standard C library, which both modifies an argument, and returns
that same value as the function return value.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...
definition.6.20
- In the case of a
``placeholder'' parameter that is not yet used in the definition, omit the
name in the definition to stop warnings.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... types.6.21
- A good example can
be found in the MeasConvert class
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... core7.1
- aips, dish, synthesis
and vlbi packages
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... complete7.2
- Tools like ``Purify'' and ``TestCenter''
should be used if they are available.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...trial.7.3
- (your-workspace)/code/trial - at the same logical level as
aips, dish, vlbi, synthesis and all of the site-specific packages
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...tNewClass.cc7.4
- If there is more than one
test, exec, output or demo program, name subsequent files,
for example tNewClass1.cc, tNewClass2.cc -
the first program is implicitly number zero.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...aips2-cop@nrao.edu7.5
- If the class source code
amounts to many thousands of lines of text, explain this to the cop -
it may be possible for the reviewer to examine the code ``in place'',
on your machine, or checked in to the trial directory.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... code.7.6
- A handy
way to construct a test program for a new class is to copy the class
header file into a new file - which will become the test program -
and edit the member function declarations into member function calls.
This simple approach guarantees that all of the member functions are
called. The next step would be to intentionally call all of the
member functions in such a way that all the exceptions are thrown:
if you trigger and catch all of the exceptions, then you have gone
a long way towards exercising all of the code. ``Domain'' coverage should
be attempted too: exercise the member functions by calling them with a
range of inputs, paying particular attention to the boundaries of the domain.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...
differences7.7
- We hope that, in time, the AIPS++ project will
find or develop a ``diff'' tool that is smart enough to compare
numbers, and distinguish between allowable differences (due to
word-length round-off) and unacceptable numerical error.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... attributes8.1
- Single or double quotes can be used to distinguish literal
values in SGML. If an attribute value is a single word, quotes are
not required.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... templates.9.1
- Although it
is often not thought of as polymorphism, template polymorphism is in
many respects more flexible than inheritance polymorphism, one merely
requires that an interface have certain features. The disadvantages
are code bloat and some loss of semantics enforcement.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... meaningful9.2
- Every package is happy to
interoperate with packages which adopt its conventions.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... all9.3
- Or
almost all; there are bound to be some things which reside in flat
text files, e.g., CLI initialization files
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... addressed.9.4
- It would be ideal if the GNU C++ compiler,
g++, was sufficiently reliable. Unfortunately that is not yet the case.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... interferometer9.5
- More precisely, an earth rotation
aperture synthesis array.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...
normally9.6
- However, one can imagine that for, say, geodesy, the
values in a telescope component that describe the displacement of a
telescope from a normative position might be the desired result.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...
MeasurementSets.9.7
- While such concatenations will be physical
in the first instance, a Table class which presents a single table
interface to multiple underlying tables will be available at some
point.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...
simulated.9.8
- Or partially simulated; a pure east-west array
might have a zero column of W's which are returned from a (trivial)
virtual column.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... spectra.9.9
- It
seems likely that these classes will at least have a common base
class, and possibly that VisSet will be derived from SpectrumSet.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...
process.9.10
- Incidentally, earlier versions of this scheme had
calibration being applied in the data view ( e.g., VisSet). I
believe that the requirement that we allow for partially calibrated
data requires that calibration results in a MeasurementSet, not a
VisSet. In other words, we need to produce calibration chains of
indeterminate length --
f (g(h(...(data)))) -- if we want to be
able to change and replace functions in the calibration chain, it is
required that the domain and range of those functions be the same,
i.e., the MeasurementSet.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...
clarification.9.11
- However this is not a large point; we merely
have to decide what values we want the TelescopeModel to have and
export them -- normally it would fill its internal tables from the
MeasurementSet.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... row9.12
- For these purposes, all
indirect arrays and tables are identical; think of them as
pointers. This rule ensures that all rows have the same size.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... row.9.13
-
Actually the dimensionality may be fixed in the table description if
desired.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... added.9.14
-
A description can also be incompletely specified, for example:
- A column named ``Data'' containing complex arrays must exist;
- A column named ``Data'' containing 1-D complex arrays must exist;
- A column named ``Data'' containing 1-D complex arrays of length
512 must exist.
In practice, the second (or possibly first) alternative would be
likely be the right level of detail. One wouldn't want to forbid the
number of channels of the detector from changing, on the other hand
the user of the table shouldn't have to engage in a lot of run-time
detection of the table structure.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...
table.9.15
- Presently iterator tables are actually implemented
with reference tables.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... disk9.16
- In principle storage managers could be written
for tape drives or other devices.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... Karma9.17
- Karma is a programmers toolkit for scientific
computing with communications support, event management,
data structure manipulation, graphics display and user interface
support. Information on Karma may be found at
http://www.atnf.csiro.au/karma. Karma was developed by R. Gooch.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... requirements.9.18
- For example, it is expensive to
change a value in the middle of a Miriad-like dataset, however it is
quite cheap to extend it. On the other hand, a Karma data set cannot
be extended at all once it is created (short of a copy).
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...
it9.19
- Actually element iterators like these are of wider
utility than for only traversing lattice regions; they are of wide
utility for containers in general. In C++, the best example of this is
the ``Standard Template Library'' (STL) which is being adopted by the
ISO/ANSI C++ standardization committee. The AIPS++ element
iterators should be STL compatible to enable their use with third
party libraries and functions.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... mask.9.20
- Actually, the mask is an implementation
detail. The same result could be had by storing a list of valid (or
invalid) positions. However, the use of a mask results in a more
predictable cost. Our implementation of a MaskedLattice contains two
lattices: one for the data and the other for the mask.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... indexing.9.21
- In C++,
we should probably also make a distinction between arithmetic arrays
and general arrays. We might also want array classes that, for
example, wrap around Karma library arrays.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... rule9.22
- First formulated by Mark Calabretta.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...
languages9.23
- APL, IDL, Mathematica, Fortran 90, S+ etc.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... data.9.24
- Actually, it is possible to get reasonable
performance without tiling if you assume that you can hold an entire
XZ slice of the cube (in this example) in memory at once.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... process9.25
- Almost certainly a thin layer on top of a
WWW browser like Mosaic.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... hub.9.26
- Perhaps
``sender blocks until reception would be a better policy?''
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...
values9.27
- Writing the values contained in an object out in some
way that its values can be reconstituted into a similar object. This
is essentially ``copy'' semantics: some object is overwritten with
values that came out of some previous object. (AipsIO behaves like
this.) persist >> object is a reasonable way to think of this.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... objects9.28
- A PARTICULAR object
whose lifetime can exceed that of the process in which it was
created. persist >> object is a bad way to think of this, you
are not changing some (possibly empty) existing object, you are
``activating'' an already existing object.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... data9.29
- If the class is designed
properly.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ... whole-array9.30
- Glish
originally only had 1-D arrays; it has recently been augmented to
handle multidimensional arrays by Darrell Schiebel of the NRAO AIPS++ group.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...
distribution.9.31
- Available via anonymous ftp from
ee.lbl.gov in the glish subdirectory. The principal author of
Glish is Vern Paxson ( vern@ee.lbl.gov).
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
- ...
editing9.32
- Also recently added by the AIPS++ group.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.