19 #ifndef HAZELCAST_PortableWriter
20 #define HAZELCAST_PortableWriter
22 #include "hazelcast/client/serialization/pimpl/DefaultPortableWriter.h"
23 #include "hazelcast/client/serialization/pimpl/ClassDefinitionWriter.h"
25 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
27 #pragma warning(disable: 4251) //for dll export
32 namespace serialization {
43 PortableWriter(pimpl::DefaultPortableWriter *defaultPortableWriter);
48 PortableWriter(pimpl::ClassDefinitionWriter *classDefinitionWriter);
55 void writeInt(
const char *fieldName, int32_t value);
62 void writeLong(
const char *fieldName, int64_t value);
69 void writeBoolean(
const char *fieldName,
bool value);
76 void writeByte(
const char *fieldName, byte value);
83 void writeChar(
const char *fieldName, int32_t value);
90 void writeDouble(
const char *fieldName,
double value);
97 void writeFloat(
const char *fieldName,
float value);
104 void writeShort(
const char *fieldName, int16_t value);
111 void writeUTF(
const char *fieldName,
const std::string *value);
118 void writeByteArray(
const char *fieldName,
const std::vector<byte> *values);
125 void writeBooleanArray(
const char *fieldName,
const std::vector<bool> *values);
132 void writeCharArray(
const char *fieldName,
const std::vector<char> *values);
139 void writeShortArray(
const char *fieldName,
const std::vector<int16_t> *values);
146 void writeIntArray(
const char *fieldName,
const std::vector<int32_t> *values);
153 void writeLongArray(
const char *fieldName,
const std::vector<int64_t> *values);
160 void writeFloatArray(
const char *fieldName,
const std::vector<float> *values);
167 void writeDoubleArray(
const char *fieldName,
const std::vector<double> *values);
185 return defaultPortableWriter->writeNullPortable<T>(fieldName);
186 return classDefinitionWriter->writeNullPortable<T>(fieldName);
198 return defaultPortableWriter->writePortable(fieldName, portable);
199 return classDefinitionWriter->writePortable(fieldName, portable);
212 return defaultPortableWriter->writePortableArray(fieldName, values);
213 return classDefinitionWriter->writePortableArray(fieldName, values);
227 pimpl::DefaultPortableWriter *defaultPortableWriter;
228 pimpl::ClassDefinitionWriter *classDefinitionWriter;
229 bool isDefaultWriter;
235 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
239 #endif //HAZELCAST_PortableWriter
void writePortableArray(const char *fieldName, const std::vector< T > *values)
Definition: PortableWriter.h:210
void writePortable(const char *fieldName, const T *portable)
Definition: PortableWriter.h:196
Provides serialization methods for primitive types,a arrays of primitive types, Portable, IdentifiedDataSerializable and custom serializables.
Definition: ObjectDataOutput.h:54
void writeNullPortable(const char *fieldName)
To write a null portable value.
Definition: PortableWriter.h:183
Definition: MapEntryView.h:32
Provides a mean of writing portable fields to a binary in form of java primitives arrays of java prim...
Definition: PortableWriter.h:38