Go to the source code of this file.
◆ mCloneColVariable
| #define mCloneColVariable |
( |
|
type, |
|
|
|
variable, |
|
|
|
interpolfunc, |
|
|
|
udf |
|
) |
| |
Value:
for ( int idx=0; new##variable && idx<curnrrows; idx++ ) \
{ \
for ( int idy=0; idy<curnrcols+nrtoinsert; idy++ ) \
{ \
if ( idy>=colidx && idy<colidx+nrtoinsert ) \
{ \
if ( idy>=curnrcols || idy<nrtoinsert ) \
new##variable->
set(idx,idy, udf ); \
else \
{ \
const float relcol = origin_.col() + \
((float) idy-colidx)/(nrtoinsert+1)*
step_.
col(); \
new##variable->
set(idx,idy,(type) interpolfunc); \
} \
} \
else \
{ \
const int sourcecol = idy>colidx ? idy-nrtoinsert : idy; \
new##variable->
set(idx,idy,variable->
get(idx,sourcecol)); \
} \
} \
} \
mReplaceVariable( variable )
◆ mCloneRowVariable
| #define mCloneRowVariable |
( |
|
type, |
|
|
|
variable, |
|
|
|
interpolfunc, |
|
|
|
udf |
|
) |
| |
Value:
for ( int idx=0; new##variable && idx<curnrrows+nrtoinsert; idx++ ) \
{ \
for ( int idy=0; idy<curnrcols; idy++ ) \
{ \
if ( idx>=rowidx && idx<rowidx+nrtoinsert ) \
{ \
if ( idx>=curnrrows || idx<nrtoinsert ) \
new##variable->
set(idx,idy, udf ); \
else \
{ \
const float relrow = origin_.row() + \
((float) idx-rowidx)/(nrtoinsert+1)*
step_.
row(); \
new##variable->
set(idx,idy,(type) interpolfunc); \
} \
} \
else \
{ \
const int sourcerow = idx>rowidx ? idx-nrtoinsert : idx; \
new##variable->
set(idx,idy,variable->
get(sourcerow,idy)); \
} \
} \
} \
mReplaceVariable( variable )
◆ mInsertStart
| #define mInsertStart |
( |
|
idxvar, |
|
|
|
type, |
|
|
|
nrfunc |
|
) |
| |
Value:int idxvar = type##Index(type); \
if ( idxvar<-nrtoinsert || idxvar>nrfunc-1+nrtoinsert ) \
{ \
"Cannot insert row or column that is not connected to existing rows."); \
return false; \
} \
const bool addedinfront = idxvar<0; \
if ( addedinfront ) \
{ \
idxvar = 0; \
origin_.type() -=
step_.type()*nrtoinsert; \
}\
\
const int curnrrows = nrRows(); \
const int curnrcols = nrCols()
◆ mReplaceVariable
| #define mReplaceVariable |
( |
|
variable | ) |
|
Value:if ( new##variable ) \
{ \
delete variable; \
variable = new##variable; \
}