TVecInt::Copy Method

Overload List

#SignatureDescription
1TMtxVecInt *Copy(TMtxVecInt *Src);Copy object values.
2TMtxVecInt *Copy(TMtxVecInt *Src, int SrcIndex, int Index, int Len);Copy Src elements [SrcIndex]..[SrcIndex+Len-1] in the calling object elements [Index]..[Index+Len-1].

Overload 1: TMtxVecInt *Copy(TMtxVecInt *Src);

Copy object values.

#NameTypeDescription
1SrcTMtxVecInt *
Remarks:

Copy each of Vec elements to the calling object. The Size property of the calling object is set implicitly to match Vec object.

Examples
#include "MtxVecInt.h"

using namespace Dew;
using namespace Dew::Math;

void Example()
{
    TVecInt *a, *b, *c;
    a = new TVecInt();
    b = new TVecInt();
    a->SetIt(DewArray<int>{1,2,3,4});  // a = [1,2,3,4]
    b->Copy(a);                // b = [1,2,3,4]
    delete a;
    delete b;
}
Declared in Dew::Math::TMtxVecInt · Dew.Math/AbstractMtxVecInt.h · Cross-compiler

Overload 2: TMtxVecInt *Copy(TMtxVecInt *Src, int SrcIndex, int Index, int Len);

Copy Src elements [SrcIndex]..[SrcIndex+Len-1] in the calling object elements [Index]..[Index+Len-1].

#NameTypeDescription
1SrcTMtxVecInt *
2SrcIndexint
3Indexint
4Lenint
Remarks:

Calling vector TVecInt::Size must be set explicitly. An exception is raised if array borders are overrun or underrun.

Declared in Dew::Math::TMtxVecInt · Dew.Math/AbstractMtxVecInt.h · Cross-compiler