#include <QUB_Tree.h>
name | the new node's name. |
text | the comment's text |
path | path to an existing file | |
readOnly | whether to open the file read-only |
path | path to an existing file |
treeString | a qub tree in plain-text format |
deep | true: copy the subtree rooted here. false: copy just this node and its data. |
To avoid copying a large file into memory when you're done with it, make sure you hold no references except the root node (make sure any QUB_Tree variables pointing into the tree go out of scope, or set them to QUB_Tree()), then set rootNode to QUB_Tree() or let it go out of scope. The file is closed automatically when there are no references to its root node.
timeoutMS | how long to wait for the mutex before giving up | |
returns | true if we got the mutex |
autoload | true: if no data is loaded, load it all first |
type | e.g. QTR_TYPE_INT, QTR_TYPE_DOUBLE (numeric types only) | |
rows | the number of rows | |
cols | the number of columns | |
initVals | stuff to memcpy() into the newly allocated data, unless NULL |
type | e.g. QTR_TYPE_INT, QTR_TYPE_FLOAT, QTR_TYPE_STRING | |
rowSize | how many bytes one row takes up | |
rowCount | how many rows | |
initVals | stuff to memcpy() into the newly allocated data, unless NULL |
type | e.g. QTR_TYPE_INT, QTR_TYPE_FLOAT, QTR_TYPE_STRING | |
initVal | a value to copy into data |
data | the desired contents of the data |
newRowCount | how many rows you want the data to have | |
returns | true if successful |
Nodes on disk can keep the data on disk and load portions into RAM as needed. See also: isPreload()
doWrite | true: write the loaded region to disk false: just free its RAM. | |
returns | true if successful |
buf | some memory to fill with the requested data | |
firstRow | the first row index in the range you're requesting | |
lastRow | the row index in the range you're requesting (inclusive) | |
returns | the number of rows read |
buf | some memory containing the data you wish to write | |
firstRow | the first row index in the range you're overwriting | |
lastRow | the last row index in the range you're overwriting (inclusive) | |
returns | the number of rows written |
i | the index of an element between loadedFirstItem() and loadedLastItem(). | |
dummy | lets the compiler know what type T is (value doesn't matter). |
r | the index of a row between loadedFirst() and loadedLast(). | |
r | the index of a column | |
dummy | lets the compiler know what type T is (value doesn't matter). |
out | a stream to write on | |
indent | a string to preface each line with | |
forFile | Whether to intersperse line comments and the multi-line string indicator ('\'). |
convert |
true: represent non-string data as in the text representation false: treat the raw bytes as a character array |
default | If data is empty or not convertible, return this value | |
r, c | Which matrix element to read |
default | If data is empty or not convertible, return this value | |
r, c | Which matrix element to read |
buf | some memory to fill with converted data | |
firstRow | the first row index in the requested range | |
lastRow | the last row index (inclusive) in the requested range | |
returns | the number of rows read |
buf | some memory to fill with converted data | |
firstRow | the first row index in the requested range | |
lastRow | the last row index (inclusive) in the requested range | |
returns | the number of rows read |
buf | some memory to fill with converted data | |
firstRow | the first row index in the requested range | |
lastRow | the last row index (inclusive) in the requested range | |
returns | the number of rows read |