CASA Viewer

Reference Documents

Code and Coding


There are three sets of container class libraries (including 3 different string classes) at play within the viewer:

  1. The C++ STL
  2. Qt Containers
  3. CASA Containers

All other things being equal, the order of preference for selecting containers is shown above. If a section of code, interacts with the rest of CASA, select CASA containers. If it interacts with Qt, pick Qt Containers. Otherwise, rely on the STL. Often, of course, the choice will be obvious since key functions will require a particular container and selecting that container will minimize copying. Sometimes the cost of copying is outweighed by other concerns.

Over time, the viewer's dependency on CASA's containers, i.e. list, map, string, and sometimes vector, will be shifted to the corresponding STL containers where such a shift is reasonable.

The CASA Viewer does not depend on Boost. Please do not introduce a dependency on Boost.


When originally created, the viewer had a non-GUI specific kernel and a GUI specific interface. While this dichotomy is an important design feature, it predates platform independent GUI libraries, and it predates pervasive Qt dependence across CASA. When reasonable in terms of time and effort, it is useful to maintain this distinction. However, one should assume that the CASA Viewer is a Qt application and that Qt tools will be used where it makes life easier.


When significant new code is added to the viewer, it should be put into the casa::viewer namespace. "Significant new code" means something like a subsystem addition. An example is the new regions change which which altered the viewer from having one region of each type drawn to allowing multiple regions of each type to be managed and manipulated. This distinction between viewer code and the casa namespace and viewer code in the casa::viewer namespace allows for weeding out dead wood from the casa namespace. In time, however, all useful viewer code will be migrated to casa::viewer.


Qt Issues

The CASA Viewer should build and work properly with Qt version 4.7.1 or later.

-- DarrellSchiebel - 2010-08-19
Topic revision: r4 - 2012-04-04, DarrellSchiebel
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding NRAO Public Wiki? Send feedback