#include <coherence/io/pof/PofHelper.hpp>
Inherits PofConstants.
Inherited by PofBufferReader, PofBufferWriter, and WritingPofHandler.
Public Types | |
typedef spec::Handle | Handle |
PofHelper Handle definition. | |
typedef spec::View | View |
PofHelper View definition. | |
typedef spec::Holder | Holder |
PofHelper Holder definition. | |
Static Public Member Functions | |
static int32_t | getClassTypeId (Object::View v, PofContext::View vCtx) |
Return an identifier that represents the C++ type of the specified object. | |
static int32_t | getPofTypeId (Class::View vClass, PofContext::View vCtx) |
Return an indentifier that represents the POF type of the specified class. | |
static int32_t | encodeTinyInt32 (int32_t n) |
Encode an int32_t value into one of the reserved single-byte combined type and value indicators. | |
static int32_t | decodeTinyInt32 (int32_t n) |
Decode an int32_t value from one of the reserved single-byte combined type and value indicators. | |
static wchar16_t | readAsChar16 (ReadBuffer::BufferInput::Handle hIn, int32_t nType) |
Read a value of the specified encoding from the POF stream and convert it to a wchar16_t. | |
static wchar16_t | readAsChar16 (FinalHandle< ReadBuffer::BufferInput > &hIn, int32_t nType) |
Read a value of the specified encoding from the POF stream and convert it to a wchar16_t. | |
static int32_t | readAsInt32 (ReadBuffer::BufferInput::Handle hIn, int32_t nType) |
Read a value of the specified encoding from the POF stream and convert it to an int32_t. | |
static int32_t | readAsInt32 (FinalHandle< ReadBuffer::BufferInput > &hIn, int32_t nType) |
Read a value of the specified encoding from the POF stream and convert it to an int32_t. | |
static int64_t | readAsInt64 (ReadBuffer::BufferInput::Handle hIn, int32_t nType) |
Read a value of the specified encoding from the POF stream and convert it to an int64_t. | |
static int64_t | readAsInt64 (FinalHandle< ReadBuffer::BufferInput > &hIn, int32_t nType) |
Read a value of the specified encoding from the POF stream and convert it to an int64_t. | |
static float32_t | readAsFloat32 (ReadBuffer::BufferInput::Handle hIn, int32_t nType) |
Read a value of the specified encoding from the POF stream and convert it to a float32_t. | |
static float32_t | readAsFloat32 (FinalHandle< ReadBuffer::BufferInput > &hIn, int32_t nType) |
Read a value of the specified encoding from the POF stream and convert it to a float32_t. | |
static float64_t | readAsFloat64 (ReadBuffer::BufferInput::Handle hIn, int32_t nType) |
Read a value of the specified encoding from the POF stream and convert it to a float64_t. | |
static float64_t | readAsFloat64 (FinalHandle< ReadBuffer::BufferInput > &hIn, int32_t nType) |
Read a value of the specified encoding from the POF stream and convert it to a float64_t. | |
static RawDate::View | readRawDate (ReadBuffer::BufferInput::Handle hIn) |
Read a RawDate value from the passed BufferInput. | |
static RawDate::View | readRawDate (FinalHandle< ReadBuffer::BufferInput > &hIn) |
Read a RawDate value from the passed BufferInput. | |
static RawTime::View | readRawTime (ReadBuffer::BufferInput::Handle hIn) |
Read a RawTime value from the passed BufferInput. | |
static RawTime::View | readRawTime (FinalHandle< ReadBuffer::BufferInput > &hIn) |
Read a RawTime value from the passed BufferInput. | |
static void | skipValue (ReadBuffer::BufferInput::Handle hIn) |
Within the POF stream, skip the next POF value. | |
static void | skipUniformValue (ReadBuffer::BufferInput::Handle hIn, int32_t nType) |
Within the POF stream, skip the next POF value of the specified type. | |
static void | skipInts (ReadBuffer::BufferInput::Handle hIn, int32_t c) |
Skip the specified number of integers in the passed POF stream. | |
static size32_t | validateIncomingSize (int32_t cElements) |
Validate that the specified POF collection size as read from a POF stream is smaller than the largest value of the size32_t type, and if so, return the given size as a size32_t. | |
static int32_t | validateOutgoingSize (size32_t cElements) |
Validate that the specified Collection size is smaller than the largest value of the int32_t type, and if so, return the given size as an in32_t. | |
static void | checkDate (int32_t nYear, int32_t nMonth, int32_t nDay) |
Validate date information. | |
static void | checkTime (int32_t nHour, int32_t nMinute, int32_t nSecond, int32_t nNano) |
Validate time information. | |
static void | checkTimeZone (int32_t nHourOffset, int32_t nMinuteOffset) |
Check the specified timezone offset. | |
static void | checkTimeInterval (int32_t cHours, int32_t cMinutes, int32_t cSeconds, int32_t cNanos) |
Validate a time interval. | |
static void | checkDayTimeInterval (int32_t cDays, int32_t cHours, int32_t cMinutes, int32_t cSeconds, int32_t cNanos) |
Validate a day-time interval. | |
static void | checkYearMonthInterval (int32_t cYears, int32_t cMonths) |
Validate a year-month interval. | |
static String::View | formatDate (int32_t nYear, int32_t nMonth, int32_t nDay) |
Format a date in the form YYYY-MM-DD. | |
static String::View | formatTime (int32_t nHour, int32_t nMinute, int32_t nSecond, int32_t nNano, bool fUTC) |
Format a time using the simplest applicable of the following formats:. | |
static String::View | formatTime (int32_t nHour, int32_t nMinute, int32_t nSecond, int32_t nNano, int32_t nHourOffset, int32_t nMinuteOffset) |
Format a time using the simplest applicable of the following formats:. | |
static void | writeDate (WriteBuffer::BufferOutput::Handle hOut, int32_t nYear, int32_t nMonth, int32_t nDay) |
Write a date value to a BufferOutput object. | |
static void | writeTime (WriteBuffer::BufferOutput::Handle hOut, int32_t nHour, int32_t nMinute, int32_t nSecond, int32_t nNano, int32_t nTimeZoneType, int32_t nHourOffset, int32_t nMinuteOffset) |
Write a time value to a BufferOutput object. | |
static ObjectArray::Handle | resizeArray (ObjectArray::Handle haOld, size32_t cNew) |
Expand the passed array to contain the specified number of elements. | |
static Array< bool > ::Handle | getEmptyBooleanArray () |
| |
static Array < octet_t >::Handle | getEmptyOctetArray () |
| |
static Array < wchar16_t > ::Handle | getEmptyChar16Array () |
| |
static Array < int16_t >::Handle | getEmptyInt16Array () |
| |
static Array < int32_t >::Handle | getEmptyInt32Array () |
| |
static Array < int64_t >::Handle | getEmptyInt64Array () |
| |
static Array < float32_t > ::Handle | getEmptyFloat32Array () |
| |
static Array < float64_t > ::Handle | getEmptyFloat64Array () |
| |
static ObjectArray::Handle | getEmptyObjectArray () |
| |
static Binary::Handle | getEmptyBinary () |
A zero-length Binary. | |
static Collection::View | getEmptyCollection () |
| |
Classes | |
class | ReadableEntrySetMap |
Map implementation backed by a List of Map.Entry objects. More... | |
class | WriteableEntrySetMap |
Immutable Map implementation backed by a Set of Map::Entry objects. More... |
static int32_t getClassTypeId | ( | Object::View | v, | |
PofContext::View | vCtx | |||
) | [static] |
Return an identifier that represents the C++ type of the specified object.
v | an object to determine the type of | |
vCtx | the PofContext used to determine if the object is an instance of a valid user type; must not be NULL |
C_*
constants static int32_t getPofTypeId | ( | Class::View | vClass, | |
PofContext::View | vCtx | |||
) | [static] |
Return an indentifier that represents the POF type of the specified class.
vClass | the class; must not be NULL | |
vCtx | the PofContext used to determine the type identifier of a user type; must not be NULL |
T_*
constantsIllegalArgumentException | if the user type associated with the given object is unknown to the specified PofContext |
static int32_t encodeTinyInt32 | ( | int32_t | n | ) | [static] |
Encode an int32_t value into one of the reserved single-byte combined type and value indicators.
n | an int32_t between -1 and 22 inclusive |
static int32_t decodeTinyInt32 | ( | int32_t | n | ) | [static] |
Decode an int32_t value from one of the reserved single-byte combined type and value indicators.
n | the int32_t value that the int32_t is encoded as |
static wchar16_t readAsChar16 | ( | ReadBuffer::BufferInput::Handle | hIn, | |
int32_t | nType | |||
) | [static] |
Read a value of the specified encoding from the POF stream and convert it to a wchar16_t.
hIn | the POF stream containing the value | |
nType | the POF type of the value |
IOException | if an I/O error occurs reading the POF stream, or the POF value cannot be coerced to a char value |
static wchar16_t readAsChar16 | ( | FinalHandle< ReadBuffer::BufferInput > & | hIn, | |
int32_t | nType | |||
) | [static] |
Read a value of the specified encoding from the POF stream and convert it to a wchar16_t.
hIn | the POF stream containing the value | |
nType | the POF type of the value |
IOException | if an I/O error occurs reading the POF stream, or the POF value cannot be coerced to a char value |
static int32_t readAsInt32 | ( | ReadBuffer::BufferInput::Handle | hIn, | |
int32_t | nType | |||
) | [static] |
Read a value of the specified encoding from the POF stream and convert it to an int32_t.
hIn | the POF stream containing the value | |
nType | the POF type of the value |
IOException | if an I/O error occurs reading the POF stream, or the POF value cannot be coerced to an int32_t value |
static int32_t readAsInt32 | ( | FinalHandle< ReadBuffer::BufferInput > & | hIn, | |
int32_t | nType | |||
) | [static] |
Read a value of the specified encoding from the POF stream and convert it to an int32_t.
hIn | the POF stream containing the value | |
nType | the POF type of the value |
IOException | if an I/O error occurs reading the POF stream, or the POF value cannot be coerced to an int32_t value |
static int64_t readAsInt64 | ( | ReadBuffer::BufferInput::Handle | hIn, | |
int32_t | nType | |||
) | [static] |
Read a value of the specified encoding from the POF stream and convert it to an int64_t.
hIn | the POF stream containing the value | |
nType | the POF type of the value |
IOException | if an I/O error occurs reading the POF stream, or the POF value cannot be coerced to an int64_t value |
static int64_t readAsInt64 | ( | FinalHandle< ReadBuffer::BufferInput > & | hIn, | |
int32_t | nType | |||
) | [static] |
Read a value of the specified encoding from the POF stream and convert it to an int64_t.
hIn | the POF stream containing the value | |
nType | the POF type of the value |
IOException | if an I/O error occurs reading the POF stream, or the POF value cannot be coerced to an int64_t value |
static float32_t readAsFloat32 | ( | ReadBuffer::BufferInput::Handle | hIn, | |
int32_t | nType | |||
) | [static] |
Read a value of the specified encoding from the POF stream and convert it to a float32_t.
hIn | the POF stream containing the value | |
nType | the POF type of the value |
IOException | if an I/O error occurs reading the POF stream, or the POF value cannot be coerced to a float32_t value |
static float32_t readAsFloat32 | ( | FinalHandle< ReadBuffer::BufferInput > & | hIn, | |
int32_t | nType | |||
) | [static] |
Read a value of the specified encoding from the POF stream and convert it to a float32_t.
hIn | the POF stream containing the value | |
nType | the POF type of the value |
IOException | if an I/O error occurs reading the POF stream, or the POF value cannot be coerced to a float32_t value |
static float64_t readAsFloat64 | ( | ReadBuffer::BufferInput::Handle | hIn, | |
int32_t | nType | |||
) | [static] |
Read a value of the specified encoding from the POF stream and convert it to a float64_t.
hIn | the POF stream containing the value | |
nType | the POF type of the value |
IOException | if an I/O error occurs reading the POF stream, or the POF value cannot be coerced to a float64_t value |
static float64_t readAsFloat64 | ( | FinalHandle< ReadBuffer::BufferInput > & | hIn, | |
int32_t | nType | |||
) | [static] |
Read a value of the specified encoding from the POF stream and convert it to a float64_t.
hIn | the POF stream containing the value | |
nType | the POF type of the value |
IOException | if an I/O error occurs reading the POF stream, or the POF value cannot be coerced to a float64_t value |
static RawDate::View readRawDate | ( | ReadBuffer::BufferInput::Handle | hIn | ) | [static] |
static RawDate::View readRawDate | ( | FinalHandle< ReadBuffer::BufferInput > & | hIn | ) | [static] |
static RawTime::View readRawTime | ( | ReadBuffer::BufferInput::Handle | hIn | ) | [static] |
static RawTime::View readRawTime | ( | FinalHandle< ReadBuffer::BufferInput > & | hIn | ) | [static] |
static void skipValue | ( | ReadBuffer::BufferInput::Handle | hIn | ) | [static] |
Within the POF stream, skip the next POF value.
hIn | the BufferInput containing the POF stream |
static void skipUniformValue | ( | ReadBuffer::BufferInput::Handle | hIn, | |
int32_t | nType | |||
) | [static] |
Within the POF stream, skip the next POF value of the specified type.
hIn | the BufferInput containing the POF stream | |
nType | the type of the value to skip |
static void skipInts | ( | ReadBuffer::BufferInput::Handle | hIn, | |
int32_t | c | |||
) | [static] |
Skip the specified number of integers in the passed POF stream.
hIn | the BufferInput containing the POF stream | |
c | the number of integers to skip over |
static size32_t validateIncomingSize | ( | int32_t | cElements | ) | [inline, static] |
Validate that the specified POF collection size as read from a POF stream is smaller than the largest value of the size32_t type, and if so, return the given size as a size32_t.
cElements | the POF collection size |
Exception | if the given POF collection size is greater than the largest value of the size32_t type |
static int32_t validateOutgoingSize | ( | size32_t | cElements | ) | [inline, static] |
Validate that the specified Collection size is smaller than the largest value of the int32_t type, and if so, return the given size as an in32_t.
cElements | the Collection size |
Exception | if the given Collection size is greater than the largest value of the int32_t type |
static void checkDate | ( | int32_t | nYear, | |
int32_t | nMonth, | |||
int32_t | nDay | |||
) | [static] |
Validate date information.
nYear | the year number | |
nMonth | the month number | |
nDay | the day number |
static void checkTime | ( | int32_t | nHour, | |
int32_t | nMinute, | |||
int32_t | nSecond, | |||
int32_t | nNano | |||
) | [static] |
Validate time information.
nHour | the hour number | |
nMinute | the minute number | |
nSecond | the second number | |
nNano | the nanosecond number |
static void checkTimeZone | ( | int32_t | nHourOffset, | |
int32_t | nMinuteOffset | |||
) | [static] |
Check the specified timezone offset.
nHourOffset | the hour offset | |
nMinuteOffset | the minute offset |
static void checkTimeInterval | ( | int32_t | cHours, | |
int32_t | cMinutes, | |||
int32_t | cSeconds, | |||
int32_t | cNanos | |||
) | [static] |
Validate a time interval.
cHours | the number of hours | |
cMinutes | the number of minutes | |
cSeconds | the number of seconds | |
cNanos | the number of nanoseconds |
static void checkDayTimeInterval | ( | int32_t | cDays, | |
int32_t | cHours, | |||
int32_t | cMinutes, | |||
int32_t | cSeconds, | |||
int32_t | cNanos | |||
) | [static] |
Validate a day-time interval.
See http://www.oracle.com/pls/topic/lookup?ctx=db121&id=NLSPG004
cDays | the number of days | |
cHours | the number of hours | |
cMinutes | the number of minutes | |
cSeconds | the number of seconds | |
cNanos | the number of nanoseconds |
static void checkYearMonthInterval | ( | int32_t | cYears, | |
int32_t | cMonths | |||
) | [static] |
Validate a year-month interval.
cYears | the number of years | |
cMonths | the number of months |
static String::View formatDate | ( | int32_t | nYear, | |
int32_t | nMonth, | |||
int32_t | nDay | |||
) | [static] |
Format a date in the form YYYY-MM-DD.
nYear | the year number | |
nMonth | the month number | |
nDay | the day number |
static String::View formatTime | ( | int32_t | nHour, | |
int32_t | nMinute, | |||
int32_t | nSecond, | |||
int32_t | nNano, | |||
bool | fUTC | |||
) | [static] |
Format a time using the simplest applicable of the following formats:.
HH:MM
HH:MM:SS
HH:MM:SS.MMM
HH:MM:SS.NNNNNNNNN
nHour | the hour number | |
nMinute | the minute number | |
nSecond | the second number | |
nNano | the nanosecond number | |
fUTC | true for UTC, false for no time zone |
static String::View formatTime | ( | int32_t | nHour, | |
int32_t | nMinute, | |||
int32_t | nSecond, | |||
int32_t | nNano, | |||
int32_t | nHourOffset, | |||
int32_t | nMinuteOffset | |||
) | [static] |
Format a time using the simplest applicable of the following formats:.
HH:MM�HH:MM
HH:MM:SS�HH:MM
HH:MM:SS.MMM�HH:MM
HH:MM:SS.NNNNNNNNN�HH:MM
nHour | the hour number | |
nMinute | the minute number | |
nSecond | the second number | |
nNano | the nanosecond number | |
nHourOffset | the timezone offset in hours | |
nMinuteOffset | the timezone offset in minutes |
static void writeDate | ( | WriteBuffer::BufferOutput::Handle | hOut, | |
int32_t | nYear, | |||
int32_t | nMonth, | |||
int32_t | nDay | |||
) | [static] |
Write a date value to a BufferOutput object.
hOut | the BufferOutput to write to | |
nYear | the year number as defined by ISO8601 | |
nMonth | the month number between 1 and 12 inclusive as defined by ISO8601 | |
nDay | the day number between 1 and 31 inclusive as defined by ISO8601 |
IOException | thrown if the passed BufferOutput object throws an IOException while the value is being written to it |
static void writeTime | ( | WriteBuffer::BufferOutput::Handle | hOut, | |
int32_t | nHour, | |||
int32_t | nMinute, | |||
int32_t | nSecond, | |||
int32_t | nNano, | |||
int32_t | nTimeZoneType, | |||
int32_t | nHourOffset, | |||
int32_t | nMinuteOffset | |||
) | [static] |
Write a time value to a BufferOutput object.
hOut | the BufferOutput to write to | |
nHour | the hour between 0 and 23 inclusive | |
nMinute | the minute value between 0 and 59 inclusive | |
nSecond | the second value between 0 and 59 inclusive (and theoretically 60 for a leap-second) | |
nNano | the nanosecond value between 0 and 999999999 inclusive | |
nTimeZoneType | 0 if the time value does not have an explicit time zone, 1 if the time value is UTC and 2 if the time zone has an explicit hour and minute offset | |
nHourOffset | the timezone offset in hours from UTC, for example 0 for BST, -5 for EST and 1 for CET | |
nMinuteOffset | the timezone offset in minutes, for example 0 (in most cases) or 30 |
IOException | thrown if the passed BufferOutput object throws an IOException while the value is being written to it |
static ObjectArray::Handle resizeArray | ( | ObjectArray::Handle | haOld, | |
size32_t | cNew | |||
) | [static] |
Expand the passed array to contain the specified number of elements.
haOld | the "template" array or null | |
cNew | the number of desired elements in the new array |