1797 |
} |
} |
1798 |
|
|
1799 |
// get the space for the data vector |
// get the space for the data vector |
1800 |
int len = DataTypes::noValues(tempShape); |
// int len = DataTypes::noValues(tempShape); |
1801 |
DataVector temp_data(len, 0.0, len); |
// DataVector temp_data(len, 0.0, len); |
1802 |
DataArrayView temp_dataView(temp_data, tempShape); |
// DataArrayView temp_dataView(temp_data, tempShape); |
1803 |
temp_dataView.copy(asNumArray); |
// temp_dataView.copy(asNumArray); |
1804 |
|
|
1805 |
// DataVector temp_data; |
DataVector temp_data2; |
1806 |
// temp_data.copyFromNumArray(asNumArray); |
temp_data2.copyFromNumArray(asNumArray); |
1807 |
|
|
1808 |
// |
// |
1809 |
// Call DataAbstract::setTaggedValue |
// Call DataAbstract::setTaggedValue |
1810 |
m_data->setTaggedValue(tagKey,temp_dataView); |
//m_data->setTaggedValue(tagKey,temp_dataView); |
1811 |
|
|
1812 |
// m_data->setTaggedValue(tagKey,tempShape, temp_data); |
m_data->setTaggedValue(tagKey,tempShape, temp_data2); |
1813 |
} |
} |
1814 |
|
|
1815 |
void |
// void |
1816 |
Data::setTaggedValueFromCPP(int tagKey, |
// Data::setTaggedValueFromCPP(int tagKey, |
1817 |
const DataArrayView& value) |
// const DataArrayView& value) |
1818 |
{ |
// { |
1819 |
if (isProtected()) { |
// if (isProtected()) { |
1820 |
throw DataException("Error - attempt to update protected Data object."); |
// throw DataException("Error - attempt to update protected Data object."); |
1821 |
} |
// } |
1822 |
// |
// // |
1823 |
// Ensure underlying data object is of type DataTagged |
// // Ensure underlying data object is of type DataTagged |
1824 |
if (isConstant()) tag(); |
// if (isConstant()) tag(); |
1825 |
|
// |
1826 |
// |
// // |
1827 |
// Call DataAbstract::setTaggedValue |
// // Call DataAbstract::setTaggedValue |
1828 |
m_data->setTaggedValue(tagKey,value); |
// m_data->setTaggedValue(tagKey,value); |
1829 |
} |
// } |
1830 |
|
|
1831 |
void |
void |
1832 |
Data::setTaggedValueFromCPP(int tagKey, |
Data::setTaggedValueFromCPP(int tagKey, |
1833 |
const DataTypes::ShapeType& pointshape, |
const DataTypes::ShapeType& pointshape, |
1834 |
const DataTypes::ValueType& value) |
const DataTypes::ValueType& value, |
1835 |
|
int dataOffset) |
1836 |
{ |
{ |
1837 |
if (isProtected()) { |
if (isProtected()) { |
1838 |
throw DataException("Error - attempt to update protected Data object."); |
throw DataException("Error - attempt to update protected Data object."); |
1843 |
|
|
1844 |
// |
// |
1845 |
// Call DataAbstract::setTaggedValue |
// Call DataAbstract::setTaggedValue |
1846 |
m_data->setTaggedValue(tagKey,pointshape, value); |
m_data->setTaggedValue(tagKey,pointshape, value, dataOffset); |
1847 |
} |
} |
1848 |
|
|
1849 |
int |
int |