Create
Create an internal Origin data set (may or may not be temporary).
BOOL Create( int Size, UINT Option = 0, LPCSTR lpcszNamePrefix = NULL )
Returns TRUE on successful exit and FALSE on error.
EX1
void Dataset_Create_ex1() { int ii; { LT_execute("list s;"); Dataset ds0; ds0.Create(3); // Size=3 & Option=0 by default (create and attach to temporary data set) for(ii = 0; ii < 3; ii++) ds0[ii] = ii; LT_execute("list s;"); // Note new ds0 TEMP_ data set } LT_execute("list s;"); // Out of ds0's scope, note new ds0 TEMP_ data set is destroyed Dataset ds1; ds1.Create(3,1); // Size=3 & Option=1 (create and attach to a second data set that is not temporary) for(ii = 0; ii < 3; ii++) ds1[ii] = ii; LT_execute("list s;"); // Note new ds1 TEMP_ data set ds1.Destroy(); // Destroy ds1 TEMP_ data set (comment out this line and TEMP_ data set does not get deleted) LT_execute("list s;"); // Note new ds1 TEMP_ data set is destroyed (or not if above line is commented out) }
Create a temporary (or permanent) Origin data set and attach the Dataset object to it. If Option=1 is specified and data set is not destroyed by calling the Dataset::Destroy method the data set will remain in Origin after the Origin C function completes execution.
Dataset::Destroy, Dataset::Detach, Dataset::Dataset, Dataset::Attach
origin.h