SDDSlib
|
This file contains the functions related to copying SDDS data. More...
Go to the source code of this file.
Functions | |
int32_t | SDDS_InitializeCopy (SDDS_DATASET *SDDS_target, SDDS_DATASET *SDDS_source, char *filename, char *filemode) |
int32_t | SDDS_AppendLayout (SDDS_DATASET *SDDS_target, SDDS_DATASET *SDDS_source, uint32_t mode) |
int32_t | SDDS_CopyLayout (SDDS_DATASET *SDDS_target, SDDS_DATASET *SDDS_source) |
int32_t | SDDS_CopyParameters (SDDS_DATASET *SDDS_target, SDDS_DATASET *SDDS_source) |
int32_t | SDDS_CopyArrays (SDDS_DATASET *SDDS_target, SDDS_DATASET *SDDS_source) |
int32_t | SDDS_CopyColumns (SDDS_DATASET *SDDS_target, SDDS_DATASET *SDDS_source) |
int32_t | SDDS_CopyRowsOfInterest (SDDS_DATASET *SDDS_target, SDDS_DATASET *SDDS_source) |
int32_t | SDDS_CopyAdditionalRows (SDDS_DATASET *SDDS_target, SDDS_DATASET *SDDS_source) |
int32_t | SDDS_CopyPage (SDDS_DATASET *SDDS_target, SDDS_DATASET *SDDS_source) |
void | SDDS_DeferSavingLayout (SDDS_DATASET *SDDS_dataset, int32_t mode) |
int32_t | SDDS_SaveLayout (SDDS_DATASET *SDDS_dataset) |
int32_t | SDDS_RestoreLayout (SDDS_DATASET *SDDS_dataset) |
int32_t | SDDS_CopyRow (SDDS_DATASET *SDDS_target, int64_t target_row, SDDS_DATASET *SDDS_source, int64_t source_srow) |
int32_t | SDDS_CopyRowDirect (SDDS_DATASET *SDDS_target, int64_t target_row, SDDS_DATASET *SDDS_source, int64_t source_row) |
int32_t | SDDS_CopyRows (SDDS_DATASET *SDDS_target, SDDS_DATASET *SDDS_source, int64_t firstRow, int64_t lastRow) |
This file contains the functions related to copying SDDS data.
The SDDS_copy.c file provides functions for copying data from SDDS files.
Definition in file SDDS_copy.c.
int32_t SDDS_AppendLayout | ( | SDDS_DATASET * | SDDS_target, |
SDDS_DATASET * | SDDS_source, | ||
uint32_t | mode ) |
Appends layout definitions (columns, parameters, associates, arrays) from one SDDS_DATASET to another. Only definitions that do not already exist in the target dataset are added.
SDDS_target | Address of the SDDS_DATASET structure to which layout definitions will be appended. |
SDDS_source | Address of the SDDS_DATASET structure from which layout definitions will be taken. |
mode | Mode flag (currently unused; can be set to 0). |
Definition at line 158 of file SDDS_copy.c.
int32_t SDDS_CopyAdditionalRows | ( | SDDS_DATASET * | SDDS_target, |
SDDS_DATASET * | SDDS_source ) |
Copies additional rows from one SDDS_DATASET to another. The rows from SDDS_source are appended to the existing rows in SDDS_target.
SDDS_target | Pointer to the SDDS_DATASET structure where rows will be appended. |
SDDS_source | Pointer to the SDDS_DATASET structure from which rows will be copied. |
Definition at line 519 of file SDDS_copy.c.
int32_t SDDS_CopyArrays | ( | SDDS_DATASET * | SDDS_target, |
SDDS_DATASET * | SDDS_source ) |
Copies array data from one SDDS_DATASET structure into another for arrays with matching names.
SDDS_target | Address of the SDDS_DATASET structure into which array data will be copied. |
SDDS_source | Address of the SDDS_DATASET structure from which array data will be copied. |
Definition at line 334 of file SDDS_copy.c.
int32_t SDDS_CopyColumns | ( | SDDS_DATASET * | SDDS_target, |
SDDS_DATASET * | SDDS_source ) |
Copies column data from one SDDS_DATASET structure into another for columns with matching names.
SDDS_target | Address of the SDDS_DATASET structure into which column data will be copied. |
SDDS_source | Address of the SDDS_DATASET structure from which column data will be copied. |
Definition at line 387 of file SDDS_copy.c.
int32_t SDDS_CopyLayout | ( | SDDS_DATASET * | SDDS_target, |
SDDS_DATASET * | SDDS_source ) |
Copies the entire layout (including version, data mode, description, contents, columns, parameters, associates, and arrays) from one SDDS_DATASET to another. The target dataset's existing layout will be replaced.
SDDS_target | Address of the SDDS_DATASET structure into which the layout will be copied. |
SDDS_source | Address of the SDDS_DATASET structure from which the layout will be copied. |
Definition at line 222 of file SDDS_copy.c.
int32_t SDDS_CopyPage | ( | SDDS_DATASET * | SDDS_target, |
SDDS_DATASET * | SDDS_source ) |
Copies the data from one SDDS_DATASET structure to another. This includes parameters, arrays, and columns.
SDDS_target | Pointer to the SDDS_DATASET structure where data will be copied to. |
SDDS_source | Pointer to the SDDS_DATASET structure from which data will be copied. |
Definition at line 578 of file SDDS_copy.c.
int32_t SDDS_CopyParameters | ( | SDDS_DATASET * | SDDS_target, |
SDDS_DATASET * | SDDS_source ) |
Copies parameter values from one SDDS_DATASET structure into another for parameters with matching names.
SDDS_target | Address of the SDDS_DATASET structure into which parameter values will be copied. |
SDDS_source | Address of the SDDS_DATASET structure from which parameter values will be copied. |
Definition at line 286 of file SDDS_copy.c.
int32_t SDDS_CopyRow | ( | SDDS_DATASET * | SDDS_target, |
int64_t | target_row, | ||
SDDS_DATASET * | SDDS_source, | ||
int64_t | source_srow ) |
Copies a row from the source SDDS_DATASET to the target SDDS_DATASET. Only columns that exist in both datasets are copied. The source row is determined by its position among the selected rows.
SDDS_target | Pointer to the SDDS_DATASET structure where the row will be copied to. |
target_row | Index of the row in the target dataset where data will be placed. |
SDDS_source | Pointer to the SDDS_DATASET structure from which the row will be copied. |
source_srow | Index of the selected row (among rows of interest) in the source dataset. |
Definition at line 778 of file SDDS_copy.c.
int32_t SDDS_CopyRowDirect | ( | SDDS_DATASET * | SDDS_target, |
int64_t | target_row, | ||
SDDS_DATASET * | SDDS_source, | ||
int64_t | source_row ) |
Copies a specific row from the source SDDS_DATASET to the target SDDS_DATASET. Only columns that exist in both datasets are copied.
SDDS_target | Pointer to the SDDS_DATASET structure where the row will be copied to. |
target_row | Index of the row in the target dataset where data will be placed. |
SDDS_source | Pointer to the SDDS_DATASET structure from which the row will be copied. |
source_row | Index of the row in the source dataset to be copied. |
Definition at line 834 of file SDDS_copy.c.
int32_t SDDS_CopyRows | ( | SDDS_DATASET * | SDDS_target, |
SDDS_DATASET * | SDDS_source, | ||
int64_t | firstRow, | ||
int64_t | lastRow ) |
Copies a range of rows from the source SDDS_DATASET to the target SDDS_DATASET. Only columns that exist in both datasets are copied.
SDDS_target | Pointer to the SDDS_DATASET structure where rows will be copied to. |
SDDS_source | Pointer to the SDDS_DATASET structure from which rows will be copied. |
firstRow | Index of the first row to copy from the source dataset. |
lastRow | Index of the last row to copy from the source dataset. |
Definition at line 882 of file SDDS_copy.c.
int32_t SDDS_CopyRowsOfInterest | ( | SDDS_DATASET * | SDDS_target, |
SDDS_DATASET * | SDDS_source ) |
Copies rows of interest from the source SDDS_DATASET to the target SDDS_DATASET for columns with matching names. Rows of interest are those that have their row flags set in the source dataset.
SDDS_target | Address of the SDDS_DATASET structure into which rows will be copied. |
SDDS_source | Address of the SDDS_DATASET structure from which rows will be copied. |
Definition at line 439 of file SDDS_copy.c.
void SDDS_DeferSavingLayout | ( | SDDS_DATASET * | SDDS_dataset, |
int32_t | mode ) |
Sets the flag to defer or resume saving the layout of an SDDS_DATASET.
SDDS_dataset | Pointer to the SDDS_DATASET structure. |
mode | Non-zero value to defer saving the layout; zero to resume saving. |
Definition at line 603 of file SDDS_copy.c.
int32_t SDDS_InitializeCopy | ( | SDDS_DATASET * | SDDS_target, |
SDDS_DATASET * | SDDS_source, | ||
char * | filename, | ||
char * | filemode ) |
Initializes an SDDS_DATASET structure in preparation for copying a data table from another SDDS_DATASET structure.
SDDS_target | Address of SDDS_DATASET structure into which to copy data. |
SDDS_source | Address of SDDS_DATASET structure from which to copy data. |
filename | A NULL-terminated character string giving a filename to be associated with the new SDDS_DATASET. Typically, the name of a file to which the copied data will be written after modification. Ignored if NULL. |
filemode | A NULL-terminated character string giving the fopen file mode to be used to open the file named by filename. Ignored if filename is NULL. |
Definition at line 40 of file SDDS_copy.c.
int32_t SDDS_RestoreLayout | ( | SDDS_DATASET * | SDDS_dataset | ) |
Restores a previously saved layout of the SDDS_DATASET.
SDDS_dataset | Pointer to the SDDS_DATASET structure whose layout is to be restored. |
Definition at line 697 of file SDDS_copy.c.
int32_t SDDS_SaveLayout | ( | SDDS_DATASET * | SDDS_dataset | ) |
Saves the current layout of the SDDS_DATASET. The layout is stored internally for future restoration if needed.
SDDS_dataset | Pointer to the SDDS_DATASET structure whose layout is to be saved. |
Definition at line 615 of file SDDS_copy.c.