TMtxInt::ReadValues Method

virtual int ReadValues(DewStream *SrcStream, TPrecision aPrecision = TPrecision::prInteger, TEndianness Endian = MtxSystemEndianness);

Read values content from stream to object.

#NameTypeDescription
1SrcStreamDewStream *
2aPrecision = TPrecision::prIntegerTPrecision
3Endian = MtxSystemEndiannessTEndianness
Remarks:

Reads values content from SrcStream stream to calling objct. No other values describing the data type or length are read from the DstStream. Number type is defined by the Precision parameter, which can be obtained from TMtxInt::ReadHeader method call.

Note
Use this method separately only, if you want user defined storage format.

Examples
#include "MtxVecInt.h"
#include "Units.MtxVecInt.h"
#include "DewStream.h"

using namespace Dew;
using namespace Dew::Math;
using namespace Dew::Math::Units::MtxVecInt;

void Example()
{
    TVecInt* b;
    FileStream* AStream;
    TPrecision Precision;

    CreateIt(b);
    b->SetIt(DewArray<int>{0,0,1,3,2});
    b->SaveToFile("test.bin");
    AStream = new FileStream("test.bin", FileMode::Open);
    Precision = b->ReadHeader(AStream); // Read info for b
    b->ReadValues(AStream, Precision); // Read values of b
    delete AStream;
    FreeIt(b);
}
See Also: TMtxInt::ReadHeader, TMtxInt::WriteValues, TMtxVecBase::LoadFromStream
Declared in Dew::Math::TMtxVecInt · Dew.Math/AbstractMtxVecInt.h · Cross-compiler