TPrecision ReadHeader(DewStream *SrcStream) const;
Reads the header information from a stream to object.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | SrcStream | DewStream * |
Remarks:
Reads the header information from a DstStream stream to calling object. The header information contains all necessary information defining the object. The function returns the precision in which the data was stored. This information is required for the MatrixInt::ReadValues method.
Examples
#include "MtxExprInt.h"
#include "DewStream.h"
using namespace Dew;
using namespace Dew::Math;
void Example()
{
MatrixInt b;
FileStream* AStream;
TPrecision Precision;
b = {{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;
}
Declared in Dew::Math::MatrixInt · Dew.Math/MtxExprInt.h · Cross-compiler