summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2015-05-06 13:50:11 +0200
committerWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2015-05-06 15:18:04 +0200
commitfff7470f1d74b0085355130350fa834ea8d37069 (patch)
tree941846f5ad9a07cc6e1e8b1b17a6fcb858d40e77 /include
parentc6f6d6fbc3537cedefc0cef8e71819436a0a60c1 (diff)
downloadastra-fff7470f1d74b0085355130350fa834ea8d37069.tar.gz
astra-fff7470f1d74b0085355130350fa834ea8d37069.tar.bz2
astra-fff7470f1d74b0085355130350fa834ea8d37069.tar.xz
astra-fff7470f1d74b0085355130350fa834ea8d37069.zip
Make XML array handling consistent
setContent and getContent were using different XML formats previously.
Diffstat (limited to 'include')
-rw-r--r--include/astra/XMLNode.h35
1 files changed, 27 insertions, 8 deletions
diff --git a/include/astra/XMLNode.h b/include/astra/XMLNode.h
index f79c1a8..4d29d5c 100644
--- a/include/astra/XMLNode.h
+++ b/include/astra/XMLNode.h
@@ -119,14 +119,8 @@ public:
*/
vector<string> getContentArray() const;
- /** Get the content of the XML node as a c-array of float32 data.
- *
- * @param _pfData data array, shouldn't be initialized already.
- * @param _iSize number of elements stored in _pfData
- */
- void getContentNumericalArray(float32*& _pfData, int& _iSize) const;
-
/** Get the content of the XML node as a stl container of float32 data.
+ * NB: A 2D matrix is returned as a linear list
*
* @return node content
*/
@@ -259,13 +253,38 @@ public:
*/
void setContent(float32 _fValue);
- /** Add a list of numerical data to the node: &lt;...&gt;_sText&lt;/...&gt;
+ /** Add a list of numerical data to the node
*
* @param _pfList data
* @param _iSize number of elements in the list
*/
void setContent(float32* _pfList, int _iSize);
+ /** Add a list of numerical data to the node
+ *
+ * @param _pfList data
+ * @param _iSize number of elements in the list
+ */
+ void setContent(double* _pfList, int _iSize);
+
+ /** Add a (2D) matrix of numerical data to the node
+ *
+ * @param _pfMatrix data
+ * @param _iWidth width of the matrix
+ * @param _iHeight height of the matrix
+ * @param transposed true is C order, false is Fortran order
+ */
+ void setContent(float32* _pfMatrix, int _iWidth, int _iHeight, bool transposed);
+
+ /** Add a (2D) matrix of numerical data to the node
+ *
+ * @param _pfMatrix data
+ * @param _iWidth width of the matrix
+ * @param _iHeight height of the matrix
+ * @param transposed true is C order, false is Fortran order
+ */
+ void setContent(double* _pfMatrix, int _iWidth, int _iHeight, bool transposed);
+
/** Add an attribute to this node: &lt;... _sName="_sValue"&gt;
*
* @param _sName name of the attribute