long long ReadValues(DewStream *SrcStream, const TPrecision aPrecision = TPrecision::prInteger) const;
Read values content from stream to object.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | SrcStream | DewStream * | |
| 2 | aPrecision = TPrecision::prInteger | const TPrecision |
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 VectorInt::ReadHeader method call. The function returns the number of bytes read.
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);
}
Declared in Dew::Math::VectorInt · Dew.Math/MtxExprInt.h · Cross-compiler