Source
// to any other element of the other casacore::Vector (<src>strict == false</src>).
//# AttVal.h: type-dependent interface for values of Attributes
//# Copyright (C) 1996,1997,1999,2000,2001,2002
//# Associated Universities, Inc. Washington DC, USA.
//#
//# This library is free software; you can redistribute it and/or modify it
//# under the terms of the GNU Library General Public License as published by
//# the Free Software Foundation; either version 2 of the License, or (at your
//# option) any later version.
//#
//# This library is distributed in the hope that it will be useful, but WITHOUT
//# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
//# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
//# License for more details.
//#
//# You should have received a copy of the GNU Library General Public License
//# along with this library; if not, write to the Free Software Foundation,
//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
//#
//# Correspondence concerning AIPS++ should be addressed as follows:
//# Internet email: aips2-request@nrao.edu.
//# Postal address: AIPS++ Project Office
//# National Radio Astronomy Observatory
//# 520 Edgemont Road
//# Charlottesville, VA 22903-2475 USA
//#
//# $Id$
namespace casa { //# NAMESPACE CASA - BEGIN
// <summary>
// Type-dependent interface for values of Attributes.
// </summary>
// <use visibility=export>
// <reviewed reviewer="" date="yyyy/mm/dd" tests="tAttribute" demos="">
// </reviewed>
// <prerequisite>
// <li> AttributeValueBase
// </prerequisite>
// <etymology>
// An <em>AttributeValue</em> stores the value of an Attribute
// </etymology>
// <synopsis>
// An Attribute in the Display Library has a name and a value. In
// order to facilite easy use of Attributes in user code, the value of
// an Attribute has to be wrapped in a templated class, the
// AttributeValue, which itself is derived from a non-templated base
// class, <linkto class=AttributeValueBase> AttributeValueBase
// </linkto>. What is stored in the AttributeValue is a value and the
// type of that value. Only some types are supported; see
// AttributeValueBase for a list. The value is always stored as a
// casacore::Vector, even if the value used in the constructor is a single
// value. The operation needed for the AttributeValue is to be able
// to check whether it matches another AttributeValue. For two
// AttributeValues to match they must have the same value and be of
// the same type (with some tolerance, see below). AttributeValues of
// different types (through the base class AttributeValueBase), never
// match.
//
// The parameter <src>strict</src> in some constructors defines
// whether matching has to be done for each element (<src> strict ==
// true </src>), or whether AttributeValues match if any one element
// of one casacore::Vector is equal to any other element of the other Vector.
// An AttributeValue created with a scalar type can match an
// AttributeValue created with a casacore::Vector of that scalar type.
// </synopsis>
//
// <example>
// A few simple examples of the use of the AttributeValue class follow.
// <srcblock>
// AttributeValue<casacore::Int> intAtt1(3, false);
// AttributeValue<casacore::Int> intAtt2(3, false);
// AttributeValue<casacore::Int> intAtt3(2, false);
// </srcblock>
//
// At this point, <src>intAtt1==intAtt2</src> will return
// <src>true</src>, and <src>intAtt1==intAtt3</src> will return
// <src>false</src>.
//
// <srcblock>