GetSourceRange
gets the range inside the source data when the constructor vector(Column& cc, int nLowerIndex = -1, int nUpperIndex = -1, int nWriteback = WRITEBACK_NO) is used. Click here to see that constructor and the accompanying example for more details.
bool GetSourceRange( int & nLower, int & nUpper )
TRUE if nWriteback was not WRITEBACK_NO when calling the vector's constructor.
EX1
int vector_GetSourceRange_ex1() { // Have some data in the second column of the current worksheet before running this example. Worksheet wks=Project.ActiveLayer(); Column col(wks, 1); vector v(col, 2, 5, WRITEBACK_DELETE_ON_SHRINK | WRITEBACK_INSERT_ON_EXPAND); // Dump the source range int nSrcLowerIndex, nSrcUpperIndex; if (v.GetSourceRange(nSrcLowerIndex, nSrcUpperIndex)) printf("nSrcLowerIndex = %ld\tnSrcUpperIndex = %ld\n", nSrcLowerIndex, nSrcUpperIndex); // Modify the vector: int nNewVectorSize = 80; v.SetSize(nNewVectorSize); for (int ii = 0; ii < nNewVectorSize; ii++) { v[ii] = 100 * (ii + 1); } return 0; }
origin.h