casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MirTypeAssert.h
Go to the documentation of this file.
1 //# <MirTypeAssert.h>: a base class for auto-checking of primitive type sizes
2 //# Copyright (C) 2000,2001,2002,2003
3 //# Associated Universities, Inc. Washington DC, USA.
4 //#
5 //# This library is free software; you can redistribute it and/or modify it
6 //# under the terms of the GNU Library General Public License as published by
7 //# the Free Software Foundation; either version 2 of the License, or (at your
8 //# option) any later version.
9 //#
10 //# This library is distributed in the hope that it will be useful, but WITHOUT
11 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13 //# License for more details.
14 //#
15 //# You should have received a copy of the GNU Library General Public License
16 //# along with this library; if not, write to the Free Software Foundation,
17 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18 //#
19 //# Correspondence concerning AIPS++ should be addressed as follows:
20 //# Internet email: aips2-request@nrao.edu.
21 //# Postal address: AIPS++ Project Office
22 //# National Radio Astronomy Observatory
23 //# 520 Edgemont Road
24 //# Charlottesville, VA 22903-2475 USA
25 //#
26 //#
27 //# $Id: MirTypeAssert.h,v 1.1 2009/09/03 18:54:47 pteuben Exp $
28 
29 #ifndef BIMA_MIRTYPEASSERT_H
30 #define BIMA_MIRTYPEASSERT_H
31 
32 #include <casa/Exceptions/Error.h>
33 
34 #include <casa/namespace.h>
35 // <summary>
36 // an exception indicating that assumptions about the size of primitive
37 // types are not satisfied.
38 // </summary>
39 
40 // <use visibility=export>
41 
42 // <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos="">
43 // </reviewed>
44 
45 // <etymology>
46 // Current support of Miriad uv-IO is based on certain assumptions about use
47 // of memory, specifically the size of primitive types.
48 // </etymology>
49 //
50 // <synopsis>
51 // This exception is used to indicate that certain assumptions about the size
52 // of primitive types do not hold. Miriad IO in aips++ assumes that the sizes
53 // of casacore::Int, casacore::Float, and casacore::Double are equal to the corresponding sizes of int, float,
54 // and casacore::Double; this exception is thrown when these conditions are not met.
55 //
56 // Normally, applications do not create and throw this exception directly as
57 // it has been integrated into the MirTypeAssert class which
58 // automatically checks the memory assumptions upon construction. Any class
59 // that depends on this assumption can inherit from MirTypeAssert.
60 // </synopsis>
61 //
62 // <motivation>
63 // See summary above.
64 // </motivation>
65 //
67 public:
68 
69  // An exception with a message indicating the unsupported feature
71 
72  virtual ~MiriadMemoryAssumptionError() throw();
73 
74 protected:
75  // Message-less exceptions should not be created excepted possibly by
76  // subclasses
78 };
79 
80 // <summary>
81 // a base for classes that rely on assumptions regarding privitive type sizes.
82 // </summary>
83 
84 // <use visibility=export>
85 
86 // <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos="">
87 // </reviewed>
88 
89 // <etymology>
90 // Current support of Miriad uv-IO is based on certain assumptions about use
91 // of memory, specifically the size of primitive types.
92 // </etymology>
93 //
94 // <synopsis>
95 // This exception is used to indicate that certain assumptions about the size
96 // of primitive types do not hold. Miriad IO in aips++ assumes that the sizes
97 // of casacore::Int, casacore::Float, and casacore::Double are equal to the corresponding sizes of int, float,
98 // and casacore::Double; this exception is thrown when these conditions are not met.
99 //
100 // Normally, applications do not create and throw this exception directly as
101 // it has been integrated into the MirTypeAssert class which
102 // automatically checks the memory assumptions upon construction. Any class
103 // that depends on this assumption can inherit from MirTypeAssert.
104 // </synopsis>
105 //
106 // <motivation>
107 // See summary above.
108 // </motivation>
109 //
111 public:
112  MirTypeAssert();
113 
114 protected:
116 };
117 
118 #endif
virtual ~MiriadMemoryAssumptionError()
static casacore::Bool ok
an exception indicating that assumptions about the size of primitive types are not satisfied...
Definition: MirTypeAssert.h:66
a base for classes that rely on assumptions regarding privitive type sizes.
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
Base class for all Casacore library errors.
Definition: Error.h:134
String: the storage and methods of handling collections of characters.
Definition: String.h:223
MiriadMemoryAssumptionError()
Message-less exceptions should not be created excepted possibly by subclasses.