TAbstractMtxVecInt::WriteHeader Method

virtual void WriteHeader(DewStream *DstStream, TPrecision aPrecision = TPrecision::prInteger, TEndianness Endian = MtxSystemEndianness);

Writes the header information for the calling vector to a stream.

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

Writes the header information for the calling object to a DstStream stream. The header information contains information about object (size, type of values in Values array, ...) which all define the state of the object. Number type is defined by the Precision parameter. Attempt to save single precision or double precision will raise an exception.

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;

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