- Timestamp:
- 10/04/16 18:20:50 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/external-alma/components/SpectralComponents/SpectralList.h
r2980 r3106 18 18 //# 19 19 //# Correspondence concerning AIPS++ should be addressed as follows: 20 //# Internet email: aips2-request@nrao.edu.20 //# casacore::Internet email: aips2-request@nrao.edu. 21 21 //# Postal address: AIPS++ Project Office 22 22 //# National Radio Astronomy Observatory … … 34 34 #include <casa/Containers/Block.h> 35 35 36 namespace casacore { 37 38 class RecordInterface; 39 class String; 40 template <class T> class Vector; 41 } 42 36 43 namespace casa { //# NAMESPACE CASA - BEGIN 37 44 38 45 //# Forward Declarations 39 46 class SpectralElement; 40 class RecordInterface;41 class String;42 template <class T> class Vector;43 47 44 48 // <summary> … … 86 90 SpectralList(); 87 91 // Construct a list with a maximum length of n (0: unlimited length) 88 explicit SpectralList( uInt nmax);92 explicit SpectralList(casacore::uInt nmax); 89 93 // Construct with an initial element 90 94 explicit SpectralList(const SpectralElement &in); … … 100 104 SpectralList &operator=(const SpectralList &other); 101 105 // Evaluate the value of the sum of the elements at x 102 Double operator()(constDouble x) const;106 casacore::Double operator()(const casacore::Double x) const; 103 107 // Get element n 104 108 // <thrown> … … 106 110 // </thrown> 107 111 // <group> 108 const SpectralElement* operator[](const uInt n) const;109 SpectralElement* operator[](const uInt n);112 const SpectralElement* operator[](const casacore::uInt n) const; 113 SpectralElement* operator[](const casacore::uInt n); 110 114 // </group> 111 115 112 116 //# Member functions 113 117 // Get the number of elements in list 114 uInt nelements() const { return list_p.nelements(); };118 casacore::uInt nelements() const { return list_p.nelements(); }; 115 119 116 120 // Get the profile values for all elements in list. The evaluation … … 138 142 // Add elements to list (False if list has max length and full) 139 143 // <group> 140 Bool add(const SpectralElement &in);141 Bool add(const SpectralList &in);144 casacore::Bool add(const SpectralElement &in); 145 casacore::Bool add(const SpectralList &in); 142 146 // </group> 143 147 // Insert in sort order in the list … … 148 152 // Set an element in the list. Return False if more than one place beyond 149 153 // end of list; or if beyond max size. 150 Bool set(const SpectralElement &in, constuInt which);154 casacore::Bool set(const SpectralElement &in, const casacore::uInt which); 151 155 152 156 // Clear the list … … 154 158 155 159 // Set a maximum size of the list 156 void set(const uInt nmax);160 void set(const casacore::uInt nmax); 157 161 158 162 // Sort the list on the first parameter (i.e. peak value for Gaussian) … … 161 165 // Convert to and from a Record (see details in SpectralElement) 162 166 // <group> 163 Bool fromRecord (String& errMsg, constRecordInterface& container);164 Bool toRecord(RecordInterface& container) const;167 casacore::Bool fromRecord (casacore::String& errMsg, const casacore::RecordInterface& container); 168 casacore::Bool toRecord(casacore::RecordInterface& container) const; 165 169 //</group> 166 170 … … 168 172 //#Data 169 173 // Max length allowed of list 170 uInt nmax_p;174 casacore::uInt nmax_p; 171 175 // List of elements 172 PtrBlock<SpectralElement *> list_p;176 casacore::PtrBlock<SpectralElement *> list_p; 173 177 174 178 //# Member functions 175 179 // Compare two elements 176 Int compar(const SpectralElement &p1, const SpectralElement &p2) const;180 casacore::Int compar(const SpectralElement &p1, const SpectralElement &p2) const; 177 181 178 182 };
Note: See TracChangeset
for help on using the changeset viewer.