Commits
Darrell Schiebel authored and Ville Suoranta committed c98f40d0e15 Merge
20 20 | //# Internet email: aips2-request@nrao.edu. |
21 21 | //# Postal address: AIPS++ Project Office |
22 22 | //# National Radio Astronomy Observatory |
23 23 | //# 520 Edgemont Road |
24 24 | //# Charlottesville, VA 22903-2475 USA |
25 25 | //# |
26 26 | //# $Id$ |
27 27 | |
28 28 | #include <casa/Exceptions/Error.h> |
29 29 | #include <casa/Arrays/Vector.h> |
30 - | #include <casa/Utilities/DataType.h> |
30 + | |
31 31 | #include <display/Display/Attribute.h> |
32 32 | #include <display/Display/AttVal.h> |
33 33 | #include <display/Display/AttributeBuffer.h> |
34 34 | |
35 35 | namespace casa { //# NAMESPACE CASA - BEGIN |
36 36 | |
37 37 | template <class T> |
38 38 | casacore::Bool AttributeBuffer::getValue(const casacore::String &name, T &value) const { |
39 39 | casacore::Vector<T> tmp; |
40 40 | if (getValue(name, tmp)) { |
41 41 | value = tmp(0); |
42 42 | return true; |
43 43 | } else { |
44 44 | return false; |
45 45 | } |
46 46 | } |
47 47 | |
48 48 | template <class T> |
49 49 | casacore::Bool AttributeBuffer::getValue(const casacore::String &name, casacore::Vector<T> &value) const { |
50 - | casacore::Vector<T>* tmp = NULL; |
51 - | casacore::DataType dtype = whatType(tmp); |
50 + | //casacore::Vector<T> tmp; |
51 + | casacore::DataType value_type = casacore::whatType<T>(); |
52 + | casacore::DataType dtype = asArray(value_type); |
52 53 | /*AttValue::ValueType valType; |
53 54 | switch(dtype) { |
54 55 | case TpArrayUInt: |
55 56 | valType = AttValue::AtuInt; |
56 57 | break; |
57 58 | case TpArrayInt: |
58 59 | valType = AttValue::AtInt; |
59 60 | break; |
60 61 | case TpArrayBool: |
61 62 | valType = AttValue::AtBool; |