Apache Ignite C++
Public Member Functions | List of all members
ignite::binary::BinaryStringArrayWriter Class Reference

Binary string array writer. More...

#include <binary_containers.h>

Public Member Functions

 BinaryStringArrayWriter (impl::binary::BinaryWriterImpl *impl, int32_t id)
 Constructor. More...
 
void Write (const char *val)
 Write null-terminated string. More...
 
void Write (const char *val, int32_t len)
 Write string. More...
 
void Write (const std::string &val)
 Write string. More...
 
void Close ()
 Close the writer. More...
 

Detailed Description

Binary string array writer.

Can be used to write array of strings one by one.

Use Write() method to write array string by string, then finilize the writing by calling Close() method. Once the Close() method have been called, instance is not usable and will throw an IgniteError on any subsequent attempt to use it.

Constructor & Destructor Documentation

◆ BinaryStringArrayWriter()

ignite::binary::BinaryStringArrayWriter::BinaryStringArrayWriter ( impl::binary::BinaryWriterImpl *  impl,
int32_t  id 
)

Constructor.

Internal call. Should not be used by user.

Parameters
implWriter implementation.
idIdentifier.

Member Function Documentation

◆ Close()

void ignite::binary::BinaryStringArrayWriter::Close ( )

Close the writer.

This method should be called to finilize writing of the array.

Exceptions
IgniteErrorif the writer instance is closed already.

◆ Write() [1/3]

void ignite::binary::BinaryStringArrayWriter::Write ( const char *  val)

Write null-terminated string.

Parameters
valNull-terminated character sequence to write.
Exceptions
IgniteErrorif the writer instance is closed already.

◆ Write() [2/3]

void ignite::binary::BinaryStringArrayWriter::Write ( const char *  val,
int32_t  len 
)

Write string.

Parameters
valString to write.
lenString length in bytes.
Exceptions
IgniteErrorif the writer instance is closed already.

◆ Write() [3/3]

void ignite::binary::BinaryStringArrayWriter::Write ( const std::string &  val)
inline

Write string.

Parameters
valString to write.
Exceptions
IgniteErrorif the writer instance is closed already.

The documentation for this class was generated from the following files: