diff --git a/binding.gyp b/binding.gyp index e7898f5..9b5c42a 100644 --- a/binding.gyp +++ b/binding.gyp @@ -8,7 +8,7 @@ 'conditions': [ ['OS=="win"', { 'include_dirs': [ - '<(module_root_dir)/deps/blpapi/include-3.7.9.1' + '<(module_root_dir)/deps/blpapi/include-3.8.8.1' ], 'msvs_settings': { 'VCCLCompilerTool': { @@ -19,18 +19,32 @@ ['target_arch=="ia32"', { 'libraries': [ '<(module_root_dir)/deps/blpapi/win/blpapi3_32.lib' - ] + ], + 'copies: [{ + 'destination': '<(PRODUCT_DIR)', + 'files': [ + '<(module_root_dir)/deps/blpapi/win/blpapi3_32.dll' + ] + }] }], ['target_arch=="x64"', { + 'msvs_configuration_platform': 'x64', + 'msbuild_toolset': 'v120_xp', 'libraries': [ '<(module_root_dir)/deps/blpapi/win/blpapi3_64.lib' - ] + ], + 'copies: [{ + 'destination': '<(PRODUCT_DIR)', + 'files': [ + '<(module_root_dir)/deps/blpapi/win/blpapi3_64.dll' + ] + }] }] ] }], ['OS=="linux"', { 'include_dirs': [ - '<(module_root_dir)/deps/blpapi/include-3.7.9.1' + '<(module_root_dir)/deps/blpapi/include-3.8.8.1' ], 'ldflags': [ '-Wl,-R<(module_root_dir)/deps/blpapi/linux', diff --git a/deps/blpapi/include-3.7.9.1/blpapi_versioninfo.h b/deps/blpapi/include-3.7.9.1/blpapi_versioninfo.h deleted file mode 100644 index ee45536..0000000 --- a/deps/blpapi/include-3.7.9.1/blpapi_versioninfo.h +++ /dev/null @@ -1,190 +0,0 @@ -/* Copyright 2012. Bloomberg Finance L.P. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: The above - * copyright notice and this permission notice shall be included in all copies - * or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - */ -// blpapi_versioninfo.h -*-C++-*- -#ifndef INCLUDED_BLPAPI_VERSIONINFO -#define INCLUDED_BLPAPI_VERSIONINFO - -//@PURPOSE: Provide BLPAPI SDK library version information. -// -//@CLASSES: -// blpapi::VersionInfo: basic BLPAPI SDK library version attribute class -// -//@DESCRIPTION: This component provides access the BLPAPI SDK library version -// information. -// -///Usage -///----- -///C++ usage -///- - - - - -// This example logs the BLPAPI version in order to make the logs analysis more -// productive: -//.. -// blpapi::VersionInfo blpapiVersion; -// // Client log the library version for reference and future debugging -// log("BLPAPI version: %d.%d.%d.%d", -// blpapiVersion.majorVersion(), -// blpapiVersion.minorVersion(), -// blpapiVersion.patchVersion(), -// blpapiVersion.buildVersion()); -//.. -// -///C usage -///- - - - -// This example logs the BLPAPI version in order to make the logs analysis more -// productive: -//.. -// int majorVersion, minorVersion, patchVersion, buildVersion; -// blpapi_getVersionInfo(&majorVersion, &minorVersion, &patchVersion, -// &buildVersion); -// // Client log the library version for reference and future debugging -// log("BLPAPI version: %d.%d.%d.%d", majorVersion, minorVersion, -// patchVersion, buildVersion); -//.. -// -// -// This example provide shows how to use the backward API signature -// compatibility macros BLPAPI_SDK_VERSION and BLPAPI_MAKE_VERSION (see -// blpapi_dispatchtbl.h): -//.. -// #if BLPAPI_SDK_VERSION >= BLPAPI_MAKE_VERSION(3, 3, 7) -// // Do version 3.3.7 specific stuff here (e.g. adding functions with old -// // signature to an array so a client code that was compiled with -// // version 3.3.7 will still be able to run using the new version. -// ... -// #elif BLPAPI_SDK_VERSION ... -//.. - -#ifndef INCLUDED_BLPAPI_DEFS -#include -#endif - -#define BLPAPI_VERSION_MAJOR 3 -#define BLPAPI_VERSION_MINOR 7 -#define BLPAPI_VERSION_PATCH 9 -#define BLPAPI_VERSION_BUILD 1 - -#define BLPAPI_MAKE_VERSION(MAJOR, MINOR, PATCH) ((MAJOR) * 10000 + \ - (MINOR) * 100 + \ - (PATCH)) - -#define BLPAPI_SDK_VERSION BLPAPI_MAKE_VERSION(BLPAPI_VERSION_MAJOR, \ - BLPAPI_VERSION_MINOR, \ - BLPAPI_VERSION_PATCH) - -#ifdef __cplusplus -extern "C" { -#endif // ifdef __cplusplus - - - -BLPAPI_EXPORT -void blpapi_getVersionInfo(int *majorVersion, - int *minorVersion, - int *patchVersion, - int *buildVersion); - // Initialize the 4 parameters with the current release version information - // which include the following version parts: Major, Minor, Patch, and - // Build. -#ifdef __cplusplus -} - -namespace BloombergLP { - -namespace blpapi { - // ================= - // class VersionInfo - // ================= -class VersionInfo { - // This class provides a basic primitive version information for the BLPAPI - // SDK library. It provides a simple way to access the following version - // information as 4 integers: Major, Minor, Patch, and Build. - - private: - // INSTANCE DATA - int d_major; // BLPAPI SDK library major version - int d_minor; // BLPAPI SDK library minor version - int d_patch; // BLPAPI SDK library patch version - int d_build; // BLPAPI SDK library build version - - public: - // CREATORS - VersionInfo(); - // Creates a version identifier object. - - // ACCESSORS - int majorVersion() const; - // Returns the BLPAPI SDK library version first identifier, *Major*, as - // integer. - int minorVersion() const; - // Returns the BLPAPI SDK library version second identifier, *Minor*, - // as integer. - int patchVersion() const; - // Returns the BLPAPI SDK library version third identifier, *Patch*, as - // integer. - int buildVersion() const; - // Returns the BLPAPI SDK library version fourth identifier, *Build*, - // as integer. -}; - -//============================================================================= -// INLINE FUNCTION DEFINITIONS -//============================================================================= - - // ----------------- - // class VersionInfo - // ----------------- -// CREATORS -inline -VersionInfo::VersionInfo() -{ - blpapi_getVersionInfo(&d_major, &d_minor, &d_patch, &d_build); -} - -// ACCESSORS -inline -int VersionInfo::majorVersion() const -{ - return d_major; -} - -inline -int VersionInfo::minorVersion() const -{ - return d_minor; -} - -inline -int VersionInfo::patchVersion() const -{ - return d_patch; -} - -inline -int VersionInfo::buildVersion() const -{ - return d_build; -} - -} // close namespace blpapi -} // close namespace BloombergLP - -#endif // ifdef __cplusplus - -#endif // INCLUDED_BLPAPI_VERSIONINFO diff --git a/deps/blpapi/include-3.7.9.1/blpapi_abstractsession.h b/deps/blpapi/include-3.8.8.1/blpapi_abstractsession.h similarity index 100% rename from deps/blpapi/include-3.7.9.1/blpapi_abstractsession.h rename to deps/blpapi/include-3.8.8.1/blpapi_abstractsession.h diff --git a/deps/blpapi/include-3.7.9.1/blpapi_call.h b/deps/blpapi/include-3.8.8.1/blpapi_call.h similarity index 87% rename from deps/blpapi/include-3.7.9.1/blpapi_call.h rename to deps/blpapi/include-3.8.8.1/blpapi_call.h index 0ce327d..46ca62f 100644 --- a/deps/blpapi/include-3.7.9.1/blpapi_call.h +++ b/deps/blpapi/include-3.8.8.1/blpapi_call.h @@ -46,6 +46,9 @@ ? (g_blpapiFunctionEntries.FUNCNAME) \ : BLPAPI_UNSUPPORTED_CALL(FUNCNAME)) +#define BLPAPI_CALL_AVAILABLE(FUNCNAME) BLPAPI_TABLE_CHECK(FUNCNAME) +#define BLPAPI_CALL(FUNCNAME) BLPAPI_TABLE_CALL(FUNCNAME) + #define BLPAPI_UNSUPPORTED_CALL(FUNCNAME) \ (throw UnsupportedOperationException(#FUNCNAME " not supported"), 0) @@ -58,23 +61,20 @@ blpapi_EventFormatter_appendRecapMessageSeq)(a1, a2, a3, a4, a5)) #define BLPAPI_CALL_MESSAGE_ADDREF(a1) \ - do { \ - if (BLPAPI_TABLE_CHECK(blpapi_Message_addRef)) \ - g_blpapiFunctionEntries.blpapi_Message_addRef(a1); \ - } while(0) + (BLPAPI_TABLE_CHECK(blpapi_Message_addRef) \ + ? g_blpapiFunctionEntries.blpapi_Message_addRef(a1) \ + : 0) #define BLPAPI_CALL_MESSAGE_RELEASE(a1) \ - do { \ - if (BLPAPI_TABLE_CHECK(blpapi_Message_release)) \ - g_blpapiFunctionEntries.blpapi_Message_release(a1); \ - } while(0) + (BLPAPI_TABLE_CHECK(blpapi_Message_release) \ + ? g_blpapiFunctionEntries.blpapi_Message_release(a1) \ + : 0) #define BLPAPI_CALL_SESSIONOPTIONS_SETMAXEVENTQUEUESIZE(a1, a2) \ - do { \ - if (BLPAPI_TABLE_CHECK(blpapi_SessionOptions_setMaxEventQueueSize)) \ - g_blpapiFunctionEntries. \ - blpapi_SessionOptions_setMaxEventQueueSize(a1, a2); \ - } while(0) + (BLPAPI_TABLE_CHECK(blpapi_SessionOptions_setMaxEventQueueSize) \ + ? g_blpapiFunctionEntries. \ + blpapi_SessionOptions_setMaxEventQueueSize(a1, a2) \ + : 0) #define BLPAPI_CALL_SESSIONOPTIONS_SETSLOWCONSUMERHIWATERMARK(a1, a2) \ (BLPAPI_TABLE_CHECK( \ @@ -268,7 +268,38 @@ blpapi_ServiceRegistrationOptions_removeAllActiveSubServiceCodeRanges)(\ a1)) +#define BLPAPI_CALL_MESSAGE_TIMERECEIVED(a1, a2) \ + (BLPAPI_TABLE_CALL(blpapi_Message_timeReceived)(a1, a2)) + +#define BLPAPI_CALL_SESSIONOPTION_SETRECORDSUBSCRIPTIONDATARECEIVETIMES(a1, \ + a2) \ + (BLPAPI_TABLE_CHECK( \ + blpapi_SessionOptions_setRecordSubscriptionDataReceiveTimes) \ + ? g_blpapiFunctionEntries \ + .blpapi_SessionOptions_setRecordSubscriptionDataReceiveTimes(a1, a2) \ + : 0) + +#define BLPAPI_CALL_SESSIONOPTION_RECORDSUBSCRIPTIONDATARECEIVETIMES(a1) \ + (BLPAPI_TABLE_CHECK( \ + blpapi_SessionOptions_recordSubscriptionDataReceiveTimes) \ + ? g_blpapiFunctionEntries \ + .blpapi_SessionOptions_recordSubscriptionDataReceiveTimes(a1) \ + : false) + +#define BLPAPI_CALL_TIMEPOINTUTIL_NANOSECONDSBETWEEN(a1, a2) \ + (BLPAPI_TABLE_CALL(blpapi_TimePointUtil_nanosecondsBetween)(a1, a2)) + +#define BLPAPI_CALL_HIGHRESOLUTIONCLOCK_NOW(a1) \ + (BLPAPI_TABLE_CALL(blpapi_HighResolutionClock_now)(a1)) + +#define BLPAPI_CALL_HIGHPRECISIONDATETIME_FROMTIMEPOINT(a1, a2, a3) \ + (BLPAPI_TABLE_CALL(blpapi_HighPrecisionDatetime_fromTimePoint)(a1, a2, a3)) + #else // if defined(_WIN32) || defined(__WIN32__) + +#define BLPAPI_CALL_AVAILABLE(FUNCNAME) true +#define BLPAPI_CALL(FUNCNAME) FUNCNAME + #define BLPAPI_CALL_EVENTFORMATTER_APPENDMESSAGESEQ(a1, a2, a3, a4, a5, a6) \ (blpapi_EventFormatter_appendMessageSeq)(a1, a2, a3, a4, a5, a6) #define BLPAPI_CALL_EVENTFORMATTER_APPENDRECAPMESSAGESEQ(a1, a2, a3, a4, a5) \ @@ -364,6 +395,21 @@ a1) \ (blpapi_ServiceRegistrationOptions_removeAllActiveSubServiceCodeRanges)(a1) +#define BLPAPI_CALL_MESSAGE_TIMERECEIVED(a1, a2) \ + (blpapi_Message_timeReceived)(a1, a2) +#define BLPAPI_CALL_SESSIONOPTION_SETRECORDSUBSCRIPTIONDATARECEIVETIMES(a1, \ + a2) \ + (blpapi_SessionOptions_setRecordSubscriptionDataReceiveTimes)(a1, a2) +#define BLPAPI_CALL_SESSIONOPTION_RECORDSUBSCRIPTIONDATARECEIVETIMES(a1) \ + (blpapi_SessionOptions_recordSubscriptionDataReceiveTimes)(a1) + +#define BLPAPI_CALL_TIMEPOINTUTIL_NANOSECONDSBETWEEN(a1,a2) \ + (blpapi_TimePointUtil_nanosecondsBetween)(a1, a2) +#define BLPAPI_CALL_HIGHRESOLUTIONCLOCK_NOW(a1) \ + (blpapi_HighResolutionClock_now)(a1) +#define BLPAPI_CALL_HIGHPRECISIONDATETIME_FROMTIMEPOINT(a1, a2, a3) \ + (blpapi_HighPrecisionDatetime_fromTimePoint)(a1, a2, a3) + #endif // if defined(_WIN32) || defined(__WIN32__) #endif // __cplusplus diff --git a/deps/blpapi/include-3.7.9.1/blpapi_constant.h b/deps/blpapi/include-3.8.8.1/blpapi_constant.h similarity index 98% rename from deps/blpapi/include-3.7.9.1/blpapi_constant.h rename to deps/blpapi/include-3.8.8.1/blpapi_constant.h index 8f08c85..59e103c 100644 --- a/deps/blpapi/include-3.7.9.1/blpapi_constant.h +++ b/deps/blpapi/include-3.8.8.1/blpapi_constant.h @@ -554,9 +554,9 @@ std::string Constant::getValueAsString() const } inline -void Constant::setUserData(void *userData) +void Constant::setUserData(void *newUserData) { - blpapi_Constant_setUserData(d_impl_p, userData); + blpapi_Constant_setUserData(d_impl_p, newUserData); } inline @@ -612,9 +612,9 @@ int ConstantList::numConstants() const } inline -Constant ConstantList::getConstant(const Name& name) const +Constant ConstantList::getConstant(const Name& constantName) const { - return blpapi_ConstantList_getConstant(d_impl_p, 0, name.impl()); + return blpapi_ConstantList_getConstant(d_impl_p, 0, constantName.impl()); } inline @@ -636,9 +636,9 @@ const blpapi_ConstantList_t *ConstantList::impl() const } inline -void ConstantList::setUserData(void *userData) +void ConstantList::setUserData(void *newUserData) { - blpapi_ConstantList_setUserData(d_impl_p, userData); + blpapi_ConstantList_setUserData(d_impl_p, newUserData); } inline diff --git a/deps/blpapi/include-3.7.9.1/blpapi_correlationid.h b/deps/blpapi/include-3.8.8.1/blpapi_correlationid.h similarity index 97% rename from deps/blpapi/include-3.7.9.1/blpapi_correlationid.h rename to deps/blpapi/include-3.8.8.1/blpapi_correlationid.h index ad8423b..f0c4185 100644 --- a/deps/blpapi/include-3.7.9.1/blpapi_correlationid.h +++ b/deps/blpapi/include-3.8.8.1/blpapi_correlationid.h @@ -329,31 +329,31 @@ CorrelationId::CorrelationId(const CorrelationId& original) } inline -CorrelationId::CorrelationId(long long intValue, int classId) +CorrelationId::CorrelationId(long long intValue, int newClassId) { std::memset(&d_impl, 0, sizeof(d_impl)); - d_impl.size = sizeof(d_impl); + d_impl.size = static_cast(sizeof(d_impl)); d_impl.valueType = INT_VALUE; d_impl.value.intValue = intValue; - d_impl.classId = classId; + d_impl.classId = newClassId; } inline -CorrelationId::CorrelationId(void *ptrValue, int classId) +CorrelationId::CorrelationId(void *ptrValue, int newClassId) { std::memset(&d_impl, 0, sizeof(d_impl)); - d_impl.size = sizeof(d_impl); + d_impl.size = static_cast(sizeof(d_impl)); d_impl.valueType = POINTER_VALUE; d_impl.value.ptrValue.pointer = ptrValue; - d_impl.classId = classId; + d_impl.classId = newClassId; } template inline CorrelationId::CorrelationId(const TYPE& smartPtr, void *ptrValue, - int classId) + int newClassId) { // If you get a compiler error here, the specified smart pointer does not // fit in the CorrelationId and cannot be used at this time. @@ -364,7 +364,7 @@ CorrelationId::CorrelationId(const TYPE& smartPtr, void *ptrValue, d_impl.size = sizeof(d_impl); d_impl.valueType = POINTER_VALUE; - d_impl.classId = classId; + d_impl.classId = newClassId; d_impl.value.ptrValue.pointer = ptrValue; d_impl.value.ptrValue.manager = &CorrelationId::managerFunc; @@ -488,7 +488,8 @@ void CorrelationId::assertSmartPtrFits() // not fit in the CorrelationId and cannot be used at this time. char errorIfSmartPtrDoesNotFit[ - sizeof(TYPE) <= (sizeof(void*)*4) ? 1 : 0] = {' '}; + sizeof(TYPE) <= (sizeof(void*)*4) ? 1 : -1]; + (void)errorIfSmartPtrDoesNotFit; } } diff --git a/deps/blpapi/include-3.7.9.1/blpapi_datetime.h b/deps/blpapi/include-3.8.8.1/blpapi_datetime.h similarity index 84% rename from deps/blpapi/include-3.7.9.1/blpapi_datetime.h rename to deps/blpapi/include-3.8.8.1/blpapi_datetime.h index 1fbe24d..ed3f9dc 100644 --- a/deps/blpapi/include-3.7.9.1/blpapi_datetime.h +++ b/deps/blpapi/include-3.8.8.1/blpapi_datetime.h @@ -23,10 +23,11 @@ //@PURPOSE: Represents a date and/or time. // //@CLASSES: -// blpapi_Datetime_tag: C struct for date and/or msec time. -// blpapi_HighPrecisionDatetime_tag: C struct for date and/or psec time. -// blpapi::Datetime: C++ class for date and/or psec time. -// blpapi::DatetimeParts: Identifiers for fields within date/time. +// blpapi_Datetime_tag: C struct for date and/or msec time +// blpapi_HighPrecisionDatetime_tag: C struct for date and/or psec time +// blpapi::Datetime: C++ class for date and/or psec time +// blpapi::DatetimeParts: Identifiers for fields within date/time +// blpapi::DatetimeUtil: 'Datetime' utility functions // //@DESCRIPTION: This file provides a C and C++ data type to represent a // date and/or time value. @@ -47,6 +48,10 @@ #include #endif +#ifndef INCLUDED_BLPAPI_TIMEPOINT +#include +#endif + #ifndef INCLUDED_BLPAPI_TYPES #include #endif @@ -104,6 +109,12 @@ int blpapi_HighPrecisionDatetime_print( int level, int spacesPerLevel); +BLPAPI_EXPORT +int blpapi_HighPrecisionDatetime_fromTimePoint( + blpapi_HighPrecisionDatetime_t *datetime, + const blpapi_TimePoint_t *timePoint, + short offset); + #ifdef __cplusplus } // extern "C" @@ -905,6 +916,22 @@ std::ostream& operator<<(std::ostream& stream, const Datetime& datetime); // print(stream, 0, -1); //.. + // =================== + // struct DatetimeUtil + // =================== + +struct DatetimeUtil { + // This provides a namespace for 'Datetime' utility functions. + + static Datetime fromTimePoint( + const TimePoint& timePoint, + Datetime::Offset offset = Datetime::Offset(0)); + // Create and return a 'Datetime' object having the value of the + // specified 'timePoint' and the optionally specified timezone + // 'offset', 0 by default. The resulting 'Datetime' object has the + // parts specified by 'DATE', 'TIMEFRACSECONDS', and 'OFFSET' set. +}; + // ============================================================================ // INLINE FUNCTION DEFINITIONS // ============================================================================ @@ -920,13 +947,13 @@ bool Datetime::isLeapYear(int y) } inline -Datetime::Datetime(unsigned hours, - unsigned minutes, - unsigned seconds, +Datetime::Datetime(unsigned newHours, + unsigned newMinutes, + unsigned newSeconds, TimeTag) { std::memset(&d_value, 0, sizeof(d_value)); - setTime(hours, minutes, seconds); + setTime(newHours, newMinutes, newSeconds); } inline @@ -1396,206 +1423,212 @@ Datetime::Datetime(const Datetime& original) } inline -Datetime::Datetime(const blpapi_Datetime_t& rawValue) +Datetime::Datetime(const blpapi_Datetime_t& newRawValue) { - d_value.datetime = rawValue; + d_value.datetime = newRawValue; d_value.picoseconds = 0; } inline -Datetime::Datetime(const blpapi_HighPrecisionDatetime_t& rawValue) -: d_value(rawValue) +Datetime::Datetime(const blpapi_HighPrecisionDatetime_t& newRawValue) +: d_value(newRawValue) { } inline -Datetime::Datetime(unsigned year, - unsigned month, - unsigned day, - unsigned hours, - unsigned minutes, - unsigned seconds) +Datetime::Datetime(unsigned newYear, + unsigned newMonth, + unsigned newDay, + unsigned newHours, + unsigned newMinutes, + unsigned newSeconds) { d_value.datetime.offset = 0; - d_value.datetime.year = year; - d_value.datetime.month = month; - d_value.datetime.day = day; - d_value.datetime.hours = hours; - d_value.datetime.minutes = minutes; - d_value.datetime.seconds = seconds; + d_value.datetime.year = static_cast(newYear); + d_value.datetime.month = static_cast(newMonth); + d_value.datetime.day = static_cast(newDay); + d_value.datetime.hours = static_cast(newHours); + d_value.datetime.minutes = static_cast(newMinutes); + d_value.datetime.seconds = static_cast(newSeconds); d_value.datetime.milliSeconds = 0; d_value.picoseconds = 0; d_value.datetime.parts = DatetimeParts::DATE | DatetimeParts::TIME; } inline -Datetime::Datetime(unsigned year, - unsigned month, - unsigned day, - unsigned hours, - unsigned minutes, - unsigned seconds, - unsigned milliSeconds) +Datetime::Datetime(unsigned newYear, + unsigned newMonth, + unsigned newDay, + unsigned newHours, + unsigned newMinutes, + unsigned newSeconds, + unsigned newMilliSeconds) { d_value.datetime.offset = 0; - d_value.datetime.year = year; - d_value.datetime.month = month; - d_value.datetime.day = day; - d_value.datetime.hours = hours; - d_value.datetime.minutes = minutes; - d_value.datetime.seconds = seconds; - d_value.datetime.milliSeconds = milliSeconds; + d_value.datetime.year = static_cast(newYear); + d_value.datetime.month = static_cast(newMonth); + d_value.datetime.day = static_cast(newDay); + d_value.datetime.hours = static_cast(newHours); + d_value.datetime.minutes = static_cast(newMinutes); + d_value.datetime.seconds = static_cast(newSeconds); + d_value.datetime.milliSeconds + = static_cast(newMilliSeconds); d_value.picoseconds = 0; d_value.datetime.parts = DatetimeParts::DATE | DatetimeParts::TIMEFRACSECONDS; } inline -Datetime::Datetime(unsigned year, - unsigned month, - unsigned day, - unsigned hours, - unsigned minutes, - unsigned seconds, +Datetime::Datetime(unsigned newYear, + unsigned newMonth, + unsigned newDay, + unsigned newHours, + unsigned newMinutes, + unsigned newSeconds, Milliseconds fractionOfSecond) { d_value.datetime.offset = 0; - d_value.datetime.year = year; - d_value.datetime.month = month; - d_value.datetime.day = day; - d_value.datetime.hours = hours; - d_value.datetime.minutes = minutes; - d_value.datetime.seconds = seconds; - d_value.datetime.milliSeconds = fractionOfSecond.d_msec; + d_value.datetime.year = static_cast(newYear); + d_value.datetime.month = static_cast(newMonth); + d_value.datetime.day = static_cast(newDay); + d_value.datetime.hours = static_cast(newHours); + d_value.datetime.minutes = static_cast(newMinutes); + d_value.datetime.seconds = static_cast(newSeconds); + d_value.datetime.milliSeconds + = static_cast(fractionOfSecond.d_msec); d_value.picoseconds = 0; d_value.datetime.parts = DatetimeParts::DATE | DatetimeParts::TIMEFRACSECONDS; } inline -Datetime::Datetime(unsigned year, - unsigned month, - unsigned day, - unsigned hours, - unsigned minutes, - unsigned seconds, +Datetime::Datetime(unsigned newYear, + unsigned newMonth, + unsigned newDay, + unsigned newHours, + unsigned newMinutes, + unsigned newSeconds, Microseconds fractionOfSecond) { d_value.datetime.offset = 0; - d_value.datetime.year = year; - d_value.datetime.month = month; - d_value.datetime.day = day; - d_value.datetime.hours = hours; - d_value.datetime.minutes = minutes; - d_value.datetime.seconds = seconds; - d_value.datetime.milliSeconds = fractionOfSecond.d_usec / 1000; + d_value.datetime.year = static_cast(newYear); + d_value.datetime.month = static_cast(newMonth); + d_value.datetime.day = static_cast(newDay); + d_value.datetime.hours = static_cast(newHours); + d_value.datetime.minutes = static_cast(newMinutes); + d_value.datetime.seconds = static_cast(newSeconds); + d_value.datetime.milliSeconds + = static_cast(fractionOfSecond.d_usec / 1000); d_value.picoseconds = (fractionOfSecond.d_usec % 1000) * 1000 * 1000; d_value.datetime.parts = DatetimeParts::DATE | DatetimeParts::TIMEFRACSECONDS; } inline -Datetime::Datetime(unsigned year, - unsigned month, - unsigned day, - unsigned hours, - unsigned minutes, - unsigned seconds, +Datetime::Datetime(unsigned newYear, + unsigned newMonth, + unsigned newDay, + unsigned newHours, + unsigned newMinutes, + unsigned newSeconds, Nanoseconds fractionOfSecond) { d_value.datetime.offset = 0; - d_value.datetime.year = year; - d_value.datetime.month = month; - d_value.datetime.day = day; - d_value.datetime.hours = hours; - d_value.datetime.minutes = minutes; - d_value.datetime.seconds = seconds; - d_value.datetime.milliSeconds = fractionOfSecond.d_nsec / 1000 / 1000; + d_value.datetime.year = static_cast(newYear); + d_value.datetime.month = static_cast(newMonth); + d_value.datetime.day = static_cast(newDay); + d_value.datetime.hours = static_cast(newHours); + d_value.datetime.minutes = static_cast(newMinutes); + d_value.datetime.seconds = static_cast(newSeconds); + d_value.datetime.milliSeconds + = static_cast(fractionOfSecond.d_nsec / 1000 / 1000); d_value.picoseconds = (fractionOfSecond.d_nsec % (1000 * 1000)) * 1000; d_value.datetime.parts = DatetimeParts::DATE | DatetimeParts::TIMEFRACSECONDS; } inline -Datetime::Datetime(unsigned year, - unsigned month, - unsigned day, - unsigned hours, - unsigned minutes, - unsigned seconds, +Datetime::Datetime(unsigned newYear, + unsigned newMonth, + unsigned newDay, + unsigned newHours, + unsigned newMinutes, + unsigned newSeconds, Picoseconds fractionOfSecond) { d_value.datetime.offset = 0; - d_value.datetime.year = year; - d_value.datetime.month = month; - d_value.datetime.day = day; - d_value.datetime.hours = hours; - d_value.datetime.minutes = minutes; - d_value.datetime.seconds = seconds; + d_value.datetime.year = static_cast(newYear); + d_value.datetime.month = static_cast(newMonth); + d_value.datetime.day = static_cast(newDay); + d_value.datetime.hours = static_cast(newHours); + d_value.datetime.minutes = static_cast(newMinutes); + d_value.datetime.seconds = static_cast(newSeconds); d_value.datetime.milliSeconds = static_cast( fractionOfSecond.d_psec / 1000 / 1000 / 1000); - d_value.picoseconds = fractionOfSecond.d_psec % (1000 * 1000 * 1000); + d_value.picoseconds + = static_cast( + fractionOfSecond.d_psec % (1000 * 1000 * 1000)); d_value.datetime.parts = DatetimeParts::DATE | DatetimeParts::TIMEFRACSECONDS; } inline -Datetime::Datetime(unsigned year, - unsigned month, - unsigned day) +Datetime::Datetime(unsigned newYear, + unsigned newMonth, + unsigned newDay) { std::memset(&d_value, 0, sizeof(d_value)); - setDate(year, month, day); + setDate(newYear, newMonth, newDay); } inline -Datetime::Datetime(unsigned hours, - unsigned minutes, - unsigned seconds, - unsigned milliSeconds) +Datetime::Datetime(unsigned newHours, + unsigned newMinutes, + unsigned newSeconds, + unsigned newMilliSeconds) { std::memset(&d_value, 0, sizeof(d_value)); - setTime(hours, minutes, seconds, milliSeconds); + setTime(newHours, newMinutes, newSeconds, newMilliSeconds); } inline -Datetime::Datetime(unsigned hours, - unsigned minutes, - unsigned seconds, +Datetime::Datetime(unsigned newHours, + unsigned newMinutes, + unsigned newSeconds, Milliseconds fractionOfSecond) { std::memset(&d_value, 0, sizeof(d_value)); - setTime(hours, minutes, seconds, fractionOfSecond); + setTime(newHours, newMinutes, newSeconds, fractionOfSecond); } inline -Datetime::Datetime(unsigned hours, - unsigned minutes, - unsigned seconds, +Datetime::Datetime(unsigned newHours, + unsigned newMinutes, + unsigned newSeconds, Microseconds fractionOfSecond) { std::memset(&d_value, 0, sizeof(d_value)); - setTime(hours, minutes, seconds, fractionOfSecond); + setTime(newHours, newMinutes, newSeconds, fractionOfSecond); } inline -Datetime::Datetime(unsigned hours, - unsigned minutes, - unsigned seconds, +Datetime::Datetime(unsigned newHours, + unsigned newMinutes, + unsigned newSeconds, Nanoseconds fractionOfSecond) { std::memset(&d_value, 0, sizeof(d_value)); - setTime(hours, minutes, seconds, fractionOfSecond); + setTime(newHours, newMinutes, newSeconds, fractionOfSecond); } inline -Datetime::Datetime(unsigned hours, - unsigned minutes, - unsigned seconds, +Datetime::Datetime(unsigned newHours, + unsigned newMinutes, + unsigned newSeconds, Picoseconds fractionOfSecond) { std::memset(&d_value, 0, sizeof(d_value)); - setTime(hours, minutes, seconds, fractionOfSecond); + setTime(newHours, newMinutes, newSeconds, fractionOfSecond); } inline @@ -1606,24 +1639,24 @@ Datetime& Datetime::operator=(const Datetime& rhs) } inline -void Datetime::setDate(unsigned year, - unsigned month, - unsigned day) +void Datetime::setDate(unsigned newYear, + unsigned newMonth, + unsigned newDay) { - d_value.datetime.day = day; - d_value.datetime.month = month; - d_value.datetime.year = year; + d_value.datetime.day = static_cast(newDay); + d_value.datetime.month = static_cast(newMonth); + d_value.datetime.year = static_cast(newYear); d_value.datetime.parts |= DatetimeParts::DATE; } inline -void Datetime::setTime(unsigned hours, - unsigned minutes, - unsigned seconds) +void Datetime::setTime(unsigned newHours, + unsigned newMinutes, + unsigned newSeconds) { - d_value.datetime.hours = hours; - d_value.datetime.minutes = minutes; - d_value.datetime.seconds = seconds; + d_value.datetime.hours = static_cast(newHours); + d_value.datetime.minutes = static_cast(newMinutes); + d_value.datetime.seconds = static_cast(newSeconds); d_value.datetime.milliSeconds = 0; d_value.picoseconds = 0; d_value.datetime.parts = (d_value.datetime.parts @@ -1633,45 +1666,48 @@ void Datetime::setTime(unsigned hours, inline -void Datetime::setTime(unsigned hours, - unsigned minutes, - unsigned seconds, - unsigned milliSeconds) +void Datetime::setTime(unsigned newHours, + unsigned newMinutes, + unsigned newSeconds, + unsigned newMilliSeconds) { - d_value.datetime.hours = hours; - d_value.datetime.minutes = minutes; - d_value.datetime.seconds = seconds; - d_value.datetime.milliSeconds = milliSeconds; + d_value.datetime.hours = static_cast(newHours); + d_value.datetime.minutes = static_cast(newMinutes); + d_value.datetime.seconds = static_cast(newSeconds); + d_value.datetime.milliSeconds + = static_cast(newMilliSeconds); d_value.picoseconds = 0; d_value.datetime.parts |= DatetimeParts::TIMEFRACSECONDS; } inline -void Datetime::setTime(unsigned hours, - unsigned minutes, - unsigned seconds, +void Datetime::setTime(unsigned newHours, + unsigned newMinutes, + unsigned newSeconds, Milliseconds fractionOfSecond) { - d_value.datetime.hours = hours; - d_value.datetime.minutes = minutes; - d_value.datetime.seconds = seconds; - d_value.datetime.milliSeconds = fractionOfSecond.d_msec; + d_value.datetime.hours = static_cast(newHours); + d_value.datetime.minutes = static_cast(newMinutes); + d_value.datetime.seconds = static_cast(newSeconds); + d_value.datetime.milliSeconds + = static_cast(fractionOfSecond.d_msec); d_value.picoseconds = 0; d_value.datetime.parts |= DatetimeParts::TIMEFRACSECONDS; } inline -void Datetime::setTime(unsigned hours, - unsigned minutes, - unsigned seconds, +void Datetime::setTime(unsigned newHours, + unsigned newMinutes, + unsigned newSeconds, Microseconds fractionOfSecond) { - d_value.datetime.hours = hours; - d_value.datetime.minutes = minutes; - d_value.datetime.seconds = seconds; - d_value.datetime.milliSeconds = fractionOfSecond.d_usec / 1000; + d_value.datetime.hours = static_cast(newHours); + d_value.datetime.minutes = static_cast(newMinutes); + d_value.datetime.seconds = static_cast(newSeconds); + d_value.datetime.milliSeconds + = static_cast(fractionOfSecond.d_usec / 1000); d_value.picoseconds = fractionOfSecond.d_usec % 1000 * 1000 * 1000; @@ -1680,15 +1716,16 @@ void Datetime::setTime(unsigned hours, inline -void Datetime::setTime(unsigned hours, - unsigned minutes, - unsigned seconds, +void Datetime::setTime(unsigned newHours, + unsigned newMinutes, + unsigned newSeconds, Nanoseconds fractionOfSecond) { - d_value.datetime.hours = hours; - d_value.datetime.minutes = minutes; - d_value.datetime.seconds = seconds; - d_value.datetime.milliSeconds = fractionOfSecond.d_nsec / 1000 / 1000; + d_value.datetime.hours = static_cast(newHours); + d_value.datetime.minutes = static_cast(newMinutes); + d_value.datetime.seconds = static_cast(newSeconds); + d_value.datetime.milliSeconds + = static_cast(fractionOfSecond.d_nsec / 1000 / 1000); d_value.picoseconds = fractionOfSecond.d_nsec % (1000 * 1000) * 1000; d_value.datetime.parts |= DatetimeParts::TIMEFRACSECONDS; @@ -1696,21 +1733,21 @@ void Datetime::setTime(unsigned hours, inline -void Datetime::setTime(unsigned hours, - unsigned minutes, - unsigned seconds, +void Datetime::setTime(unsigned newHours, + unsigned newMinutes, + unsigned newSeconds, Picoseconds fractionOfSecond) { - d_value.datetime.hours = hours; - d_value.datetime.minutes = minutes; - d_value.datetime.seconds = seconds; + d_value.datetime.hours = static_cast(newHours); + d_value.datetime.minutes = static_cast(newMinutes); + d_value.datetime.seconds = static_cast(newSeconds); d_value.datetime.milliSeconds = static_cast(fractionOfSecond.d_psec / 1000 / 1000 / 1000); - d_value.picoseconds = fractionOfSecond.d_psec % ( 1000 - * 1000 - * 1000); + d_value.picoseconds + = static_cast( + fractionOfSecond.d_psec % (1000 * 1000 * 1000)); d_value.datetime.parts |= DatetimeParts::TIMEFRACSECONDS; } @@ -1726,7 +1763,7 @@ void Datetime::setOffset(short value) inline void Datetime::setYear(unsigned value) { - d_value.datetime.year = value; + d_value.datetime.year = static_cast(value); d_value.datetime.parts |= DatetimeParts::YEAR; } @@ -1734,7 +1771,7 @@ void Datetime::setYear(unsigned value) inline void Datetime::setMonth(unsigned value) { - d_value.datetime.month = value; + d_value.datetime.month = static_cast(value); d_value.datetime.parts |= DatetimeParts::MONTH; } @@ -1742,7 +1779,7 @@ void Datetime::setMonth(unsigned value) inline void Datetime::setDay(unsigned value) { - d_value.datetime.day = value; + d_value.datetime.day = static_cast(value); d_value.datetime.parts |= DatetimeParts::DAY; } @@ -1750,7 +1787,7 @@ void Datetime::setDay(unsigned value) inline void Datetime::setHours(unsigned value) { - d_value.datetime.hours = value; + d_value.datetime.hours = static_cast(value); d_value.datetime.parts |= DatetimeParts::HOURS; } @@ -1758,7 +1795,7 @@ void Datetime::setHours(unsigned value) inline void Datetime::setMinutes(unsigned value) { - d_value.datetime.minutes = value; + d_value.datetime.minutes = static_cast(value); d_value.datetime.parts |= DatetimeParts::MINUTES; } @@ -1766,7 +1803,7 @@ void Datetime::setMinutes(unsigned value) inline void Datetime::setSeconds(unsigned value) { - d_value.datetime.seconds = value; + d_value.datetime.seconds = static_cast(value); d_value.datetime.parts |= DatetimeParts::SECONDS; } @@ -1774,7 +1811,7 @@ void Datetime::setSeconds(unsigned value) inline void Datetime::setMilliseconds(unsigned value) { - d_value.datetime.milliSeconds = value; + d_value.datetime.milliSeconds = static_cast(value); d_value.picoseconds = 0; d_value.datetime.parts |= DatetimeParts::FRACSECONDS; } @@ -1782,7 +1819,7 @@ void Datetime::setMilliseconds(unsigned value) inline void Datetime::setFractionOfSecond(Milliseconds value) { - d_value.datetime.milliSeconds = value.d_msec; + d_value.datetime.milliSeconds = static_cast(value.d_msec); d_value.picoseconds = 0; d_value.datetime.parts |= DatetimeParts::FRACSECONDS; } @@ -1790,7 +1827,8 @@ void Datetime::setFractionOfSecond(Milliseconds value) inline void Datetime::setFractionOfSecond(Microseconds value) { - d_value.datetime.milliSeconds = value.d_usec / 1000; + d_value.datetime.milliSeconds + = static_cast(value.d_usec / 1000); d_value.picoseconds = value.d_usec % 1000 * 1000 * 1000; d_value.datetime.parts |= DatetimeParts::FRACSECONDS; } @@ -1798,7 +1836,8 @@ void Datetime::setFractionOfSecond(Microseconds value) inline void Datetime::setFractionOfSecond(Nanoseconds value) { - d_value.datetime.milliSeconds = value.d_nsec / 1000 / 1000; + d_value.datetime.milliSeconds + = static_cast(value.d_nsec / 1000 / 1000); d_value.picoseconds = value.d_nsec % (1000 * 1000) * 1000; d_value.datetime.parts |= DatetimeParts::FRACSECONDS; } @@ -1808,7 +1847,8 @@ void Datetime::setFractionOfSecond(Picoseconds value) { d_value.datetime.milliSeconds = static_cast(value.d_psec / 1000 / 1000 / 1000); - d_value.picoseconds = value.d_psec % (1000 * 1000 * 1000); + d_value.picoseconds + = static_cast(value.d_psec % (1000 * 1000 * 1000)); d_value.datetime.parts |= DatetimeParts::FRACSECONDS; } @@ -1825,9 +1865,9 @@ blpapi_HighPrecisionDatetime_t& Datetime::rawHighPrecisionValue() } inline -bool Datetime::hasParts(unsigned parts) const +bool Datetime::hasParts(unsigned newParts) const { - return parts == (d_value.datetime.parts & parts); + return newParts == (d_value.datetime.parts & newParts); } inline @@ -1951,8 +1991,11 @@ std::ostream& Datetime::print(std::ostream& stream, int level, int spacesPerLevel) const { - BLPAPI_CALL_HIGHPRECISIONDATETIME_PRINT( - &d_value, OstreamWriter, &stream, level, spacesPerLevel); + BLPAPI_CALL_HIGHPRECISIONDATETIME_PRINT(&d_value, + StreamProxyOstream::writeToStream, + &stream, + level, + spacesPerLevel); return stream; } @@ -2008,6 +2051,22 @@ std::ostream& operator<<(std::ostream& stream, const Datetime& datetime) return datetime.print(stream, 0, -1); } + // ------------------ + // class DatetimeUtil + // ------------------ + +inline +Datetime DatetimeUtil::fromTimePoint(const TimePoint& timePoint, + Datetime::Offset offset) +{ + blpapi_HighPrecisionDatetime_t highPrecisionDatetime; + BLPAPI_CALL_HIGHPRECISIONDATETIME_FROMTIMEPOINT( + &highPrecisionDatetime, + &timePoint, + offset.d_minutesAheadOfUTC); + return Datetime(highPrecisionDatetime); +} + } // close namespace blpapi } // close namespace BloombergLP diff --git a/deps/blpapi/include-3.7.9.1/blpapi_defs.h b/deps/blpapi/include-3.8.8.1/blpapi_defs.h similarity index 100% rename from deps/blpapi/include-3.7.9.1/blpapi_defs.h rename to deps/blpapi/include-3.8.8.1/blpapi_defs.h diff --git a/deps/blpapi/include-3.7.9.1/blpapi_diagnosticsutil.h b/deps/blpapi/include-3.8.8.1/blpapi_diagnosticsutil.h similarity index 100% rename from deps/blpapi/include-3.7.9.1/blpapi_diagnosticsutil.h rename to deps/blpapi/include-3.8.8.1/blpapi_diagnosticsutil.h diff --git a/deps/blpapi/include-3.7.9.1/blpapi_dispatchtbl.h b/deps/blpapi/include-3.8.8.1/blpapi_dispatchtbl.h similarity index 88% rename from deps/blpapi/include-3.7.9.1/blpapi_dispatchtbl.h rename to deps/blpapi/include-3.8.8.1/blpapi_dispatchtbl.h index 756c973..2c5a708 100644 --- a/deps/blpapi/include-3.7.9.1/blpapi_dispatchtbl.h +++ b/deps/blpapi/include-3.8.8.1/blpapi_dispatchtbl.h @@ -34,7 +34,8 @@ #include #include #include -#include +#include +#include #include #ifdef __cplusplus @@ -69,6 +70,9 @@ typedef struct blpapi_Request blpapi_Request_t; struct blpapi_HighPrecisionDatetime_tag; typedef struct blpapi_HighPrecisionDatetime_tag blpapi_HighPrecisionDatetime_t; +struct blpapi_TimePoint; +typedef struct blpapi_TimePoint blpapi_TimePoint_t; + struct blpapi_SubscriptionList; typedef struct blpapi_SubscriptionList blpapi_SubscriptionList_t; @@ -206,6 +210,27 @@ typedef struct blpapi_FunctionEntries { void (*blpapi_ServiceRegistrationOptions_removeAllActiveSubServiceCodeRanges)( blpapi_ServiceRegistrationOptions_t *parameters); + void (*blpapi_Logging_logTestMessage)( + blpapi_Logging_Severity_t severity); + const char *(*blpapi_getVersionIdentifier)(); + int (*blpapi_Message_timeReceived)( + const blpapi_Message_t *message, + blpapi_TimePoint_t *timeReceived); + int (*blpapi_SessionOptions_recordSubscriptionDataReceiveTimes)( + blpapi_SessionOptions_t *parameters); + void (*blpapi_SessionOptions_setRecordSubscriptionDataReceiveTimes)( + blpapi_SessionOptions_t *parameters, + int shouldRecord); + long long (*blpapi_TimePointUtil_nanosecondsBetween)( + const blpapi_TimePoint_t *start, + const blpapi_TimePoint_t *end); + int (*blpapi_HighResolutionClock_now)( + blpapi_TimePoint_t *timePoint); + int (*blpapi_HighPrecisionDatetime_fromTimePoint)( + blpapi_HighPrecisionDatetime_t *datetime, + const blpapi_TimePoint_t *timePoint, + short offset); + } blpapi_FunctionEntries_t; BLPAPI_EXPORT extern size_t g_blpapiFunctionTableSize; diff --git a/deps/blpapi/include-3.7.9.1/blpapi_element.h b/deps/blpapi/include-3.8.8.1/blpapi_element.h similarity index 91% rename from deps/blpapi/include-3.7.9.1/blpapi_element.h rename to deps/blpapi/include-3.8.8.1/blpapi_element.h index 0810720..b331023 100644 --- a/deps/blpapi/include-3.7.9.1/blpapi_element.h +++ b/deps/blpapi/include-3.8.8.1/blpapi_element.h @@ -1176,8 +1176,8 @@ Element::Element() } inline -Element::Element(blpapi_Element_t *handle) -: d_handle_p(handle) +Element::Element(blpapi_Element_t *newHandle) +: d_handle_p(newHandle) { } @@ -1189,151 +1189,165 @@ void Element::rebind(blpapi_Element_t *element) inline -void Element::setElement(const char* name, bool value) +void Element::setElement(const char* elementName, bool value) { ExceptionUtil::throwOnError( - blpapi_Element_setElementBool(d_handle_p, name, 0 , value ? 1 : - 0)); + blpapi_Element_setElementBool(d_handle_p, + elementName, + 0, + value ? 1 : 0)); } inline -void Element::setElement(const char* name, char value) +void Element::setElement(const char* elementName, char value) { ExceptionUtil::throwOnError( - blpapi_Element_setElementChar(d_handle_p, name, 0 , value)); + blpapi_Element_setElementChar(d_handle_p, elementName, 0 , value)); } inline -void Element::setElement(const char* name, Int32 value) +void Element::setElement(const char* elementName, Int32 value) { ExceptionUtil::throwOnError( - blpapi_Element_setElementInt32(d_handle_p, name, 0 , value)); + blpapi_Element_setElementInt32(d_handle_p, elementName, 0 , value)); } inline -void Element::setElement(const char* name, Int64 value) +void Element::setElement(const char* elementName, Int64 value) { ExceptionUtil::throwOnError( - blpapi_Element_setElementInt64(d_handle_p, name, 0 , value)); + blpapi_Element_setElementInt64(d_handle_p, elementName, 0 , value)); } inline -void Element::setElement(const char* name, Float32 value) +void Element::setElement(const char* elementName, Float32 value) { ExceptionUtil::throwOnError( - blpapi_Element_setElementFloat32(d_handle_p, name, 0 , value)); + blpapi_Element_setElementFloat32(d_handle_p, elementName, 0 , value)); } inline -void Element::setElement(const char* name, Float64 value) +void Element::setElement(const char* elementName, Float64 value) { ExceptionUtil::throwOnError( - blpapi_Element_setElementFloat64(d_handle_p, name, 0 , value)); + blpapi_Element_setElementFloat64(d_handle_p, elementName, 0 , value)); } inline -void Element::setElement(const char* name, const Datetime& value) +void Element::setElement(const char* elementName, const Datetime& value) { ExceptionUtil::throwOnError( BLPAPI_CALL_ELEMENT_SETELEMENTHIGHPRECISIONDATETIME( d_handle_p, - name, + elementName, 0, &value.rawHighPrecisionValue()) ); } inline -void Element::setElement(const char* name, const char* value) +void Element::setElement(const char* elementName, const char* value) { ExceptionUtil::throwOnError( - blpapi_Element_setElementString(d_handle_p, name, 0 , value)); + blpapi_Element_setElementString(d_handle_p, elementName, 0 , value)); } inline -void Element::setElement(const char* name, const Name& value) +void Element::setElement(const char* elementName, const Name& value) { ExceptionUtil::throwOnError( blpapi_Element_setElementFromName(d_handle_p, - name, + elementName, 0, value.impl())); } inline -void Element::setElement(const Name& name, bool value) +void Element::setElement(const Name& elementName, bool value) { ExceptionUtil::throwOnError( blpapi_Element_setElementBool(d_handle_p, 0, - name.impl(), + elementName.impl(), value ? 1 : 0)); } inline -void Element::setElement(const Name& name, char value) +void Element::setElement(const Name& elementName, char value) { ExceptionUtil::throwOnError( - blpapi_Element_setElementChar(d_handle_p, 0, name.impl(), value)); + blpapi_Element_setElementChar(d_handle_p, 0, elementName.impl(), value)); } inline -void Element::setElement(const Name& name, Int32 value) +void Element::setElement(const Name& elementName, Int32 value) { ExceptionUtil::throwOnError( - blpapi_Element_setElementInt32(d_handle_p, 0, name.impl(), value)); + blpapi_Element_setElementInt32(d_handle_p, + 0, + elementName.impl(), + value)); } inline -void Element::setElement(const Name& name, Int64 value) +void Element::setElement(const Name& elementName, Int64 value) { ExceptionUtil::throwOnError( - blpapi_Element_setElementInt64(d_handle_p, 0, name.impl(), value)); + blpapi_Element_setElementInt64(d_handle_p, + 0, + elementName.impl(), + value)); } inline -void Element::setElement(const Name& name, Float32 value) +void Element::setElement(const Name& elementName, Float32 value) { ExceptionUtil::throwOnError( - blpapi_Element_setElementFloat32(d_handle_p, 0, name.impl(), value)); + blpapi_Element_setElementFloat32(d_handle_p, + 0, + elementName.impl(), + value)); } inline -void Element::setElement(const Name& name, Float64 value) +void Element::setElement(const Name& elementName, Float64 value) { ExceptionUtil::throwOnError( - blpapi_Element_setElementFloat64(d_handle_p, 0, name.impl(), value)); + blpapi_Element_setElementFloat64(d_handle_p, + 0, + elementName.impl(), + value)); } inline -void Element::setElement(const Name& name, const Datetime& value) +void Element::setElement(const Name& elementName, const Datetime& value) { ExceptionUtil::throwOnError( BLPAPI_CALL_ELEMENT_SETELEMENTHIGHPRECISIONDATETIME( d_handle_p, 0, - name.impl(), + elementName.impl(), &value.rawHighPrecisionValue()) ); } inline -void Element::setElement(const Name& name, const char* value) +void Element::setElement(const Name& elementName, const char* value) { ExceptionUtil::throwOnError( blpapi_Element_setElementString(d_handle_p, 0, - name.impl(), + elementName.impl(), value)); } inline -void Element::setElement(const Name& name, const Name& value) +void Element::setElement(const Name& elementName, const Name& value) { ExceptionUtil::throwOnError( blpapi_Element_setElementFromName(d_handle_p, 0, - name.impl(), + elementName.impl(), value.impl())); } @@ -1547,10 +1561,11 @@ int Element::getElement(Element* element, const char *nameString) const } inline -int Element::getElement(Element* element, const Name& name) const +int Element::getElement(Element* element, const Name& elementName) const { blpapi_Element_t *fldt; - int rc = blpapi_Element_getElement(d_handle_p, &fldt, 0, name.impl()); + int rc + = blpapi_Element_getElement(d_handle_p, &fldt, 0, elementName.impl()); if (!rc) { element->rebind(fldt); } @@ -1646,20 +1661,20 @@ bool Element::hasElement(const char* nameString, } inline -bool Element::hasElement(const Name& name, - bool excludeNullElements) const +bool Element::hasElement(const Name& elementName, + bool excludeNullElements) const { if (excludeNullElements) { return (blpapi_Element_hasElementEx(d_handle_p, 0, - name.impl(), excludeNullElements, 0) ? true : false); + elementName.impl(), excludeNullElements, 0) ? true : false); } - return blpapi_Element_hasElement(d_handle_p, 0, name.impl()) + return blpapi_Element_hasElement(d_handle_p, 0, elementName.impl()) ? true : false; } inline -Element Element::getElement(const Name& name) const +Element Element::getElement(const Name& elementName) const { blpapi_Element_t *fldt; ExceptionUtil::throwOnError( @@ -1667,19 +1682,19 @@ Element Element::getElement(const Name& name) const d_handle_p, &fldt, 0, - name.impl())); + elementName.impl())); return Element(fldt); } inline -Element Element::getElement(const char* name) const +Element Element::getElement(const char* elementName) const { blpapi_Element_t *fldt; ExceptionUtil::throwOnError( blpapi_Element_getElement( d_handle_p, &fldt, - name, + elementName, 0)); return Element(fldt); } @@ -1857,11 +1872,11 @@ Element Element::getValueAsElement(size_t index) const inline Name Element::getValueAsName(size_t index) const { - blpapi_Name_t *name; + blpapi_Name_t *nameValue; ExceptionUtil::throwOnError(blpapi_Element_getValueAsName(d_handle_p, - &name, + &nameValue, index)); - return name; + return nameValue; } inline @@ -1874,111 +1889,111 @@ Element Element::getChoice() const } inline -bool Element::getElementAsBool(const char* name) const +bool Element::getElementAsBool(const char* elementName) const { - return getElement(name).getValueAsBool(); + return getElement(elementName).getValueAsBool(); } inline -bool Element::getElementAsBool(const Name& name) const +bool Element::getElementAsBool(const Name& elementName) const { - return getElement(name).getValueAsBool(); + return getElement(elementName).getValueAsBool(); } inline -char Element::getElementAsChar(const char* name) const +char Element::getElementAsChar(const char* elementName) const { - return getElement(name).getValueAsChar(); + return getElement(elementName).getValueAsChar(); } inline -char Element::getElementAsChar(const Name& name) const +char Element::getElementAsChar(const Name& elementName) const { - return getElement(name).getValueAsChar(); + return getElement(elementName).getValueAsChar(); } inline -Int32 Element::getElementAsInt32(const char* name) const +Int32 Element::getElementAsInt32(const char* elementName) const { - return getElement(name).getValueAsInt32(); + return getElement(elementName).getValueAsInt32(); } inline -Int32 Element::getElementAsInt32(const Name& name) const +Int32 Element::getElementAsInt32(const Name& elementName) const { - return getElement(name).getValueAsInt32(); + return getElement(elementName).getValueAsInt32(); } inline -Int64 Element::getElementAsInt64(const char* name) const +Int64 Element::getElementAsInt64(const char* elementName) const { - return getElement(name).getValueAsInt64(); + return getElement(elementName).getValueAsInt64(); } inline -Int64 Element::getElementAsInt64(const Name& name) const +Int64 Element::getElementAsInt64(const Name& elementName) const { - return getElement(name).getValueAsInt64(); + return getElement(elementName).getValueAsInt64(); } inline -Float32 Element::getElementAsFloat32(const char* name) const +Float32 Element::getElementAsFloat32(const char* elementName) const { - return getElement(name).getValueAsFloat32(); + return getElement(elementName).getValueAsFloat32(); } inline -Float32 Element::getElementAsFloat32(const Name& name) const +Float32 Element::getElementAsFloat32(const Name& elementName) const { - return getElement(name).getValueAsFloat32(); + return getElement(elementName).getValueAsFloat32(); } inline -Float64 Element::getElementAsFloat64(const char* name) const +Float64 Element::getElementAsFloat64(const char* elementName) const { - return getElement(name).getValueAsFloat64(); + return getElement(elementName).getValueAsFloat64(); } inline -Float64 Element::getElementAsFloat64(const Name& name) const +Float64 Element::getElementAsFloat64(const Name& elementName) const { - return getElement(name).getValueAsFloat64(); + return getElement(elementName).getValueAsFloat64(); } inline -Datetime Element::getElementAsDatetime(const char* name) const +Datetime Element::getElementAsDatetime(const char* elementName) const { - return getElement(name).getValueAsDatetime(); + return getElement(elementName).getValueAsDatetime(); } inline -Datetime Element::getElementAsDatetime(const Name& name) const +Datetime Element::getElementAsDatetime(const Name& elementName) const { - return getElement(name).getValueAsDatetime(); + return getElement(elementName).getValueAsDatetime(); } inline -const char* Element::getElementAsString(const char* name) const +const char* Element::getElementAsString(const char* elementName) const { - return getElement(name).getValueAsString(); + return getElement(elementName).getValueAsString(); } inline -const char* Element::getElementAsString(const Name& name) const +const char* Element::getElementAsString(const Name& elementName) const { - return getElement(name).getValueAsString(); + return getElement(elementName).getValueAsString(); } inline -Name Element::getElementAsName(const char* name) const +Name Element::getElementAsName(const char* elementName) const { - return getElement(name).getValueAsName(); + return getElement(elementName).getValueAsName(); } inline -Name Element::getElementAsName(const Name& name) const +Name Element::getElementAsName(const Name& elementName) const { - return getElement(name).getValueAsName(); + return getElement(elementName).getValueAsName(); } inline @@ -1993,8 +2008,11 @@ std::ostream& Element::print( int level, int spacesPerLevel) const { - blpapi_Element_print( - d_handle_p, OstreamWriter, &stream, level, spacesPerLevel); + blpapi_Element_print(d_handle_p, + StreamProxyOstream::writeToStream, + &stream, + level, + spacesPerLevel); return stream; } diff --git a/deps/blpapi/include-3.7.9.1/blpapi_error.h b/deps/blpapi/include-3.8.8.1/blpapi_error.h similarity index 100% rename from deps/blpapi/include-3.7.9.1/blpapi_error.h rename to deps/blpapi/include-3.8.8.1/blpapi_error.h diff --git a/deps/blpapi/include-3.7.9.1/blpapi_event.h b/deps/blpapi/include-3.8.8.1/blpapi_event.h similarity index 99% rename from deps/blpapi/include-3.7.9.1/blpapi_event.h rename to deps/blpapi/include-3.8.8.1/blpapi_event.h index 4027ff6..91e7bed 100644 --- a/deps/blpapi/include-3.7.9.1/blpapi_event.h +++ b/deps/blpapi/include-3.8.8.1/blpapi_event.h @@ -80,7 +80,7 @@ int blpapi_Event_release( const blpapi_Event_t *event); BLPAPI_EXPORT -blpapi_EventQueue_t* blpapi_EventQueue_create(); +blpapi_EventQueue_t* blpapi_EventQueue_create(void); BLPAPI_EXPORT int blpapi_EventQueue_destroy(blpapi_EventQueue_t* eventQueue); diff --git a/deps/blpapi/include-3.7.9.1/blpapi_eventdispatcher.h b/deps/blpapi/include-3.8.8.1/blpapi_eventdispatcher.h similarity index 100% rename from deps/blpapi/include-3.7.9.1/blpapi_eventdispatcher.h rename to deps/blpapi/include-3.8.8.1/blpapi_eventdispatcher.h diff --git a/deps/blpapi/include-3.7.9.1/blpapi_eventformatter.h b/deps/blpapi/include-3.8.8.1/blpapi_eventformatter.h similarity index 100% rename from deps/blpapi/include-3.7.9.1/blpapi_eventformatter.h rename to deps/blpapi/include-3.8.8.1/blpapi_eventformatter.h diff --git a/deps/blpapi/include-3.7.9.1/blpapi_exception.h b/deps/blpapi/include-3.8.8.1/blpapi_exception.h similarity index 92% rename from deps/blpapi/include-3.7.9.1/blpapi_exception.h rename to deps/blpapi/include-3.8.8.1/blpapi_exception.h index 05704fb..10ef499 100644 --- a/deps/blpapi/include-3.7.9.1/blpapi_exception.h +++ b/deps/blpapi/include-3.8.8.1/blpapi_exception.h @@ -89,6 +89,10 @@ class Exception : public std::exception { // DATA const std::string d_description; + private: + // NOT IMPLEMENTED + Exception& operator=(const Exception&); // = delete + public: // CREATORS explicit Exception(const std::string& description); @@ -257,8 +261,8 @@ class ExceptionUtil { // --------------- inline -Exception::Exception(const std::string& description) -: d_description(description) +Exception::Exception(const std::string& newDescription) +: d_description(newDescription) { } @@ -285,8 +289,8 @@ const char* Exception::what() const throw() inline DuplicateCorrelationIdException::DuplicateCorrelationIdException( - const std::string& description) -: Exception(description) + const std::string& newDescription) +: Exception(newDescription) { } @@ -295,8 +299,8 @@ DuplicateCorrelationIdException::DuplicateCorrelationIdException( // --------------------------- inline -InvalidStateException::InvalidStateException(const std::string& description) -: Exception(description) +InvalidStateException::InvalidStateException(const std::string& newDescription) +: Exception(newDescription) { } @@ -306,8 +310,8 @@ InvalidStateException::InvalidStateException(const std::string& description) inline InvalidArgumentException::InvalidArgumentException( - const std::string& description) -: Exception(description) + const std::string& newDescription) +: Exception(newDescription) { } @@ -317,8 +321,8 @@ InvalidArgumentException::InvalidArgumentException( inline InvalidConversionException::InvalidConversionException( - const std::string& description) -: Exception(description) + const std::string& newDescription) +: Exception(newDescription) { } @@ -328,8 +332,8 @@ InvalidConversionException::InvalidConversionException( inline IndexOutOfRangeException::IndexOutOfRangeException( - const std::string& description) -: Exception(description) + const std::string& newDescription) +: Exception(newDescription) { } @@ -338,8 +342,9 @@ IndexOutOfRangeException::IndexOutOfRangeException( // ---------------------------- inline -FieldNotFoundException::FieldNotFoundException(const std::string& description) -: Exception(description) +FieldNotFoundException::FieldNotFoundException( + const std::string& newDescription) +: Exception(newDescription) { } @@ -348,8 +353,8 @@ FieldNotFoundException::FieldNotFoundException(const std::string& description) // --------------------------- inline -UnknownErrorException::UnknownErrorException(const std::string& description) -: Exception(description) +UnknownErrorException::UnknownErrorException(const std::string& newDescription) +: Exception(newDescription) { } @@ -359,8 +364,8 @@ UnknownErrorException::UnknownErrorException(const std::string& description) inline UnsupportedOperationException::UnsupportedOperationException( - const std::string& description) -: Exception(description) + const std::string& newDescription) +: Exception(newDescription) { } @@ -369,8 +374,8 @@ UnsupportedOperationException::UnsupportedOperationException( // ----------------------- inline -NotFoundException::NotFoundException(const std::string& description) -: Exception (description) +NotFoundException::NotFoundException(const std::string& newDescription) +: Exception (newDescription) { } diff --git a/deps/blpapi/include-3.8.8.1/blpapi_highresolutionclock.h b/deps/blpapi/include-3.8.8.1/blpapi_highresolutionclock.h new file mode 100644 index 0000000..0b80fb1 --- /dev/null +++ b/deps/blpapi/include-3.8.8.1/blpapi_highresolutionclock.h @@ -0,0 +1,94 @@ +/* Copyright 2012. Bloomberg Finance L.P. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: The above + * copyright notice and this permission notice shall be included in all copies + * or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ +// blpapi_clock.h -*-C++-*- +#ifndef INCLUDED_BLPAPI_HIGHRESOLUTIONCLOCK +#define INCLUDED_BLPAPI_HIGHRESOLUTIONCLOCK +//@PURPOSE: Provide a high resolution clock. +// +//@CLASSES: +// blpapi::HighResolutionClock: a high resolution clock +// +//@DESCRIPTION: This component provides a way to access the current time as a +// 'blpapi::TimePoint' value. + +#ifndef INCLUDED_BLPAPI_CALL +#include +#endif + +#ifndef INCLUDED_BLPAPI_DEFS +#include +#endif + +#ifndef INCLUDED_BLPAPI_TIMEPOINT +#include +#endif + +#ifndef INCLUDED_BLPAPI_TYPES +#include +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +BLPAPI_EXPORT +int blpapi_HighResolutionClock_now(blpapi_TimePoint_t *timePoint); + // Load the current time into the specified 'timePoint' and return zero, or + // leave timePoint unchanged and return a non-zero value. +#ifdef __cplusplus +} + +namespace BloombergLP { +namespace blpapi { + // ========================== + // struct HighResolutionClock + // ========================== + +struct HighResolutionClock { + // This utility struct provides a source for the current moment in time as + // a 'blpapi::TimePoint' object. This is currently intended for use + // primarily in conjunction with the 'blpapi::Message::timeReceived' + // interfaces, to allow measurement of the amount of time a message spends + // in the client event queue. + + static TimePoint now(); + // Return the current moment in time as a 'TimePoint' value. +}; + +// ============================================================================ +// INLINE AND TEMPLATE FUNCTION IMPLEMENTATIONS +// ============================================================================ + + // -------------------------- + // struct HighResolutionClock + // -------------------------- +inline +TimePoint HighResolutionClock::now() +{ + TimePoint tp; + BLPAPI_CALL_HIGHRESOLUTIONCLOCK_NOW(&tp); + return tp; +} + +} // close namespace blpapi +} // close namespace BloombergLP + +#endif // #ifdef __cplusplus +#endif // #ifndef INCLUDED_BLPAPI_HIGHRESOLUTIONCLOCK diff --git a/deps/blpapi/include-3.7.9.1/blpapi_identity.h b/deps/blpapi/include-3.8.8.1/blpapi_identity.h similarity index 99% rename from deps/blpapi/include-3.7.9.1/blpapi_identity.h rename to deps/blpapi/include-3.8.8.1/blpapi_identity.h index 69b9904..be515bd 100644 --- a/deps/blpapi/include-3.7.9.1/blpapi_identity.h +++ b/deps/blpapi/include-3.8.8.1/blpapi_identity.h @@ -210,8 +210,8 @@ Identity::Identity() } inline -Identity::Identity(blpapi_Identity_t *handle) - : d_handle_p(handle) +Identity::Identity(blpapi_Identity_t *newHandle) + : d_handle_p(newHandle) { } diff --git a/deps/blpapi/include-3.7.9.1/blpapi_logging.h b/deps/blpapi/include-3.8.8.1/blpapi_logging.h similarity index 54% rename from deps/blpapi/include-3.7.9.1/blpapi_logging.h rename to deps/blpapi/include-3.8.8.1/blpapi_logging.h index b2cf3c2..d074ed5 100644 --- a/deps/blpapi/include-3.7.9.1/blpapi_logging.h +++ b/deps/blpapi/include-3.8.8.1/blpapi_logging.h @@ -59,43 +59,102 @@ // } //.. +#ifndef INCLUDED_BLPAPI_CALL +#include +#endif #ifndef INCLUDED_BLPAPI_DATETIME #include #endif +#ifndef INCLUDED_BLPAPI_DEFS +#include +#endif + #ifdef __cplusplus extern "C" { #endif -typedef enum blpapi_Logging_Severity_t { - blpapi_Logging_SEVERITY_OFF = 0, - blpapi_Logging_SEVERITY_FATAL = 1, - blpapi_Logging_SEVERITY_ERROR = 2, - blpapi_Logging_SEVERITY_WARN = 3, - blpapi_Logging_SEVERITY_INFO = 4, - blpapi_Logging_SEVERITY_DEBUG = 5, - blpapi_Logging_SEVERITY_TRACE = 6 -} blpapi_Logging_Severity_t; - typedef void (*blpapi_Logging_Func_t)(blpapi_UInt64_t threadId, int severity, blpapi_Datetime_t timestamp, const char *category, const char *message); + // Provide a type definition for the callback that will be called when a + // message is logged. The specified 'threadId' is the id of the calling + // thread. The specified 'severity' is the severity of the log message + // whose value is defined by the type 'blpapi_Logging_Severity_t'. The + // specified 'timestamp' is the date and time the message is logged. The + // specified 'category' identifies the source of the logged message. The + // specified 'message' is the actual log message text. BLPAPI_EXPORT int blpapi_Logging_registerCallback( blpapi_Logging_Func_t callback, blpapi_Logging_Severity_t thresholdSeverity); - // Register the specified 'callback' at the specified 'thresholdSeverity'. - // The 'callback' will be called for all the log messages that have - // severity higher or equal to the 'thresholdSeverity'. + // Register the specified 'callback' that will be called for all log + // messages with severity greater than or equal to the specified + // 'thresholdSeverity'. The callback needs to be registered before the + // start of all sessions. If this function is called multiple times, only + // the last registered callback will take effect. // '0' is returned if callback is registered and a non-zero otherwise. - // The callback needs to be registered before the start of all sessions. + +BLPAPI_EXPORT +void blpapi_Logging_logTestMessage(blpapi_Logging_Severity_t severity); + // Log a test message at the specified 'severity'. Note that this + // function is intended for testing of the logging configuration only. + #ifdef __cplusplus } + +namespace BloombergLP { +namespace blpapi { + +struct Logging { + // This utility 'struct' provides a namespace for functions to test the + // logging configuration. + + struct Severity { + enum Type { + // Enumeration used to specify different logging severity levels. + + e_off = blpapi_Logging_SEVERITY_OFF, + e_fatal = blpapi_Logging_SEVERITY_FATAL, + e_error = blpapi_Logging_SEVERITY_ERROR, + e_warn = blpapi_Logging_SEVERITY_WARN, + e_info = blpapi_Logging_SEVERITY_INFO, + e_debug = blpapi_Logging_SEVERITY_DEBUG, + e_trace = blpapi_Logging_SEVERITY_TRACE + }; + }; + + // CLASS METHODS + static void logTestMessage(Severity::Type severity); + // Log a test message with the specified 'severity'. Note that this + // function is intended for testing of the logging configuration only. +}; + + +// ============================================================================ +// INLINE FUNCTION DEFINITIONS +// ============================================================================ + + // -------------- + // struct Logging + // -------------- + +// CLASS METHODS +inline +void Logging::logTestMessage(Severity::Type severity) +{ + BLPAPI_CALL(blpapi_Logging_logTestMessage)( + static_cast(severity)); +} + +} // close namespace blpapi +} // close namespace BloombergLP + #endif #endif diff --git a/deps/blpapi/include-3.7.9.1/blpapi_message.h b/deps/blpapi/include-3.8.8.1/blpapi_message.h similarity index 94% rename from deps/blpapi/include-3.7.9.1/blpapi_message.h rename to deps/blpapi/include-3.8.8.1/blpapi_message.h index 0538ff1..e1fd804 100644 --- a/deps/blpapi/include-3.7.9.1/blpapi_message.h +++ b/deps/blpapi/include-3.8.8.1/blpapi_message.h @@ -51,6 +51,10 @@ #include #endif +#ifndef INCLUDED_BLPAPI_TIMEPOINT +#include +#endif + struct blpapi_Message; typedef struct blpapi_Message blpapi_Message_t; @@ -100,7 +104,12 @@ BLPAPI_EXPORT int blpapi_Message_addRef(const blpapi_Message_t *message); BLPAPI_EXPORT -int blpapi_Message_release(const blpapi_Message_t *message); +int blpapi_Message_release(const blpapi_Message_t *message); + +BLPAPI_EXPORT +int blpapi_Message_timeReceived( + const blpapi_Message_t *message, + blpapi_TimePoint_t *timeReceived); #ifdef __cplusplus } @@ -264,6 +273,16 @@ class Message { // of enum Fragment to indicate whether it is a fragmented message of a // big message and its positions in fragmentation if it is. + int timeReceived(TimePoint *timestamp) const; + // Load into the specified 'timestamp', the time when the message was + // received by the sdk. This method will fail if there is no timestamp + // associated with Message. On failure, the 'timestamp' is not + // modified. Return 0 on success and a non-zero value otherwise. + // Note that by default the subscription data messages are not + // timestamped (but all the other messages are). To enable recording + // receive time for subscription data, set + // 'SessionOptions::recordSubscriptionDataReceiveTimes'. + std::ostream& print(std::ostream& stream, int level=0, int spacesPerLevel=4) const; @@ -537,6 +556,14 @@ Message::Fragment Message::fragmentType() const return (Message::Fragment) BLPAPI_CALL_MESSAGE_FRAGMENTTYPE(d_handle); } +inline +int Message::timeReceived(TimePoint *timestamp) const +{ + return BLPAPI_CALL_MESSAGE_TIMERECEIVED( + d_handle, + timestamp); +} + inline std::ostream& Message::print( std::ostream& stream, diff --git a/deps/blpapi/include-3.7.9.1/blpapi_name.h b/deps/blpapi/include-3.8.8.1/blpapi_name.h similarity index 100% rename from deps/blpapi/include-3.7.9.1/blpapi_name.h rename to deps/blpapi/include-3.8.8.1/blpapi_name.h diff --git a/deps/blpapi/include-3.7.9.1/blpapi_providersession.h b/deps/blpapi/include-3.8.8.1/blpapi_providersession.h similarity index 99% rename from deps/blpapi/include-3.7.9.1/blpapi_providersession.h rename to deps/blpapi/include-3.8.8.1/blpapi_providersession.h index c09ad9d..e5b7f91 100644 --- a/deps/blpapi/include-3.7.9.1/blpapi_providersession.h +++ b/deps/blpapi/include-3.8.8.1/blpapi_providersession.h @@ -302,7 +302,7 @@ blpapi_AbstractSession_t *blpapi_ProviderSession_getAbstractSession( BLPAPI_EXPORT blpapi_ServiceRegistrationOptions_t* -blpapi_ServiceRegistrationOptions_create(); +blpapi_ServiceRegistrationOptions_create(void); BLPAPI_EXPORT blpapi_ServiceRegistrationOptions_t* @@ -845,8 +845,8 @@ ProviderSession::ProviderSession(const SessionOptions& parameters, } inline -ProviderSession::ProviderSession(blpapi_ProviderSession_t *handle) - : d_handle_p(handle) +ProviderSession::ProviderSession(blpapi_ProviderSession_t *newHandle) + : d_handle_p(newHandle) { initAbstractSessionHandle( blpapi_ProviderSession_getAbstractSession(d_handle_p)); @@ -1233,7 +1233,7 @@ blpapi_ServiceRegistrationOptions_t* ServiceRegistrationOptions::handle() const // -------------------------- static void providerEventHandlerProxy(blpapi_Event_t *event, - blpapi_ProviderSession_t *session, + blpapi_ProviderSession_t *, void *userData) { reinterpret_cast(userData)->dispatchEvent(Event(event)); diff --git a/deps/blpapi/include-3.7.9.1/blpapi_request.h b/deps/blpapi/include-3.8.8.1/blpapi_request.h similarity index 90% rename from deps/blpapi/include-3.7.9.1/blpapi_request.h rename to deps/blpapi/include-3.8.8.1/blpapi_request.h index e9180e4..e5c0e08 100644 --- a/deps/blpapi/include-3.7.9.1/blpapi_request.h +++ b/deps/blpapi/include-3.8.8.1/blpapi_request.h @@ -309,11 +309,11 @@ class RequestRef { // ------------- inline -Request::Request(blpapi_Request_t *handle) +Request::Request(blpapi_Request_t *newHandle) { - d_handle = handle; - if (handle) { - d_elements.rebind(blpapi_Request_elements(handle)); + d_handle = newHandle; + if (newHandle) { + d_elements.rebind(blpapi_Request_elements(newHandle)); } } @@ -401,49 +401,57 @@ void Request::set(const char* element, const char* value) inline void Request::append(const char* element, bool value) { - d_elements.getElement(element).appendValue(value); + Element namedElement = d_elements.getElement(element); + namedElement.appendValue(value); } inline void Request::append(const char* element, char value) { - d_elements.getElement(element).appendValue(value); + Element namedElement = d_elements.getElement(element); + namedElement.appendValue(value); } inline void Request::append(const char* element, Int32 value) { - d_elements.getElement(element).appendValue(value); + Element namedElement = d_elements.getElement(element); + namedElement.appendValue(value); } inline void Request::append(const char* element, Int64 value) { - d_elements.getElement(element).appendValue(value); + Element namedElement = d_elements.getElement(element); + namedElement.appendValue(value); } inline void Request::append(const char* element, Float32 value) { - d_elements.getElement(element).appendValue(value); + Element namedElement = d_elements.getElement(element); + namedElement.appendValue(value); } inline void Request::append(const char* element, Float64 value) { - d_elements.getElement(element).appendValue(value); + Element namedElement = d_elements.getElement(element); + namedElement.appendValue(value); } inline void Request::append(const char* element, const Datetime& value) { - d_elements.getElement(element).appendValue(value); + Element namedElement = d_elements.getElement(element); + namedElement.appendValue(value); } inline void Request::append(const char* element, const char* value) { - d_elements.getElement(element).appendValue(value); + Element namedElement = d_elements.getElement(element); + namedElement.appendValue(value); } inline @@ -497,49 +505,57 @@ void Request::set(const Name& element, const char* value) inline void Request::append(const Name& element, bool value) { - d_elements.getElement(element).appendValue(value); + Element namedElement = d_elements.getElement(element); + namedElement.appendValue(value); } inline void Request::append(const Name& element, char value) { - d_elements.getElement(element).appendValue(value); + Element namedElement = d_elements.getElement(element); + namedElement.appendValue(value); } inline void Request::append(const Name& element, Int32 value) { - d_elements.getElement(element).appendValue(value); + Element namedElement = d_elements.getElement(element); + namedElement.appendValue(value); } inline void Request::append(const Name& element, Int64 value) { - d_elements.getElement(element).appendValue(value); + Element namedElement = d_elements.getElement(element); + namedElement.appendValue(value); } inline void Request::append(const Name& element, Float32 value) { - d_elements.getElement(element).appendValue(value); + Element namedElement = d_elements.getElement(element); + namedElement.appendValue(value); } inline void Request::append(const Name& element, Float64 value) { - d_elements.getElement(element).appendValue(value); + Element namedElement = d_elements.getElement(element); + namedElement.appendValue(value); } inline void Request::append(const Name& element, const Datetime& value) { - d_elements.getElement(element).appendValue(value); + Element namedElement = d_elements.getElement(element); + namedElement.appendValue(value); } inline void Request::append(const Name& element, const char* value) { - d_elements.getElement(element).appendValue(value); + Element namedElement = d_elements.getElement(element); + namedElement.appendValue(value); } diff --git a/deps/blpapi/include-3.7.9.1/blpapi_resolutionlist.h b/deps/blpapi/include-3.8.8.1/blpapi_resolutionlist.h similarity index 94% rename from deps/blpapi/include-3.7.9.1/blpapi_resolutionlist.h rename to deps/blpapi/include-3.8.8.1/blpapi_resolutionlist.h index 14ec74c..b8ecc57 100644 --- a/deps/blpapi/include-3.7.9.1/blpapi_resolutionlist.h +++ b/deps/blpapi/include-3.8.8.1/blpapi_resolutionlist.h @@ -369,9 +369,9 @@ int ResolutionList::add(Message const& subscriptionStartedMessage, } inline -int ResolutionList::addAttribute(const Name& attribute) +int ResolutionList::addAttribute(const Name& newAttribute) { - return blpapi_ResolutionList_addAttribute(d_handle_p, attribute.impl()); + return blpapi_ResolutionList_addAttribute(d_handle_p, newAttribute.impl()); } inline @@ -433,25 +433,27 @@ int ResolutionList::statusAt(size_t index) const inline Element const ResolutionList::attribute( - const Name& attribute, + const Name& attributeName, const CorrelationId& correlationId) const { blpapi_Element_t* element; ExceptionUtil::throwOnError( - blpapi_ResolutionList_attribute(d_handle_p, &element, attribute.impl(), + blpapi_ResolutionList_attribute(d_handle_p, + &element, + attributeName.impl(), &correlationId.impl())); return Element(element); } inline -Element const ResolutionList::attributeAt(const Name& attribute, +Element const ResolutionList::attributeAt(const Name& attributeName, size_t index) const { blpapi_Element_t* element; ExceptionUtil::throwOnError( blpapi_ResolutionList_attributeAt(d_handle_p, &element, - attribute.impl(), + attributeName.impl(), index)); return Element(element); } @@ -459,27 +461,27 @@ Element const ResolutionList::attributeAt(const Name& attribute, inline Message const ResolutionList::message(const CorrelationId& correlationId) const { - blpapi_Message_t* message; + blpapi_Message_t* messageByCid; ExceptionUtil::throwOnError( blpapi_ResolutionList_message(d_handle_p, - &message, + &messageByCid, &correlationId.impl())); bool makeMessageCopyable = true; - BLPAPI_CALL_MESSAGE_ADDREF(message); - return Message(message, makeMessageCopyable); + BLPAPI_CALL_MESSAGE_ADDREF(messageByCid); + return Message(messageByCid, makeMessageCopyable); } inline Message const ResolutionList::messageAt(size_t index) const { - blpapi_Message_t* message; + blpapi_Message_t* messageByIndex; ExceptionUtil::throwOnError( - blpapi_ResolutionList_messageAt(d_handle_p, &message, index)); + blpapi_ResolutionList_messageAt(d_handle_p, &messageByIndex, index)); bool makeMessageCopyable = true; - BLPAPI_CALL_MESSAGE_ADDREF(message); - return Message(message, makeMessageCopyable); + BLPAPI_CALL_MESSAGE_ADDREF(messageByIndex); + return Message(messageByIndex, makeMessageCopyable); } inline diff --git a/deps/blpapi/include-3.7.9.1/blpapi_schema.h b/deps/blpapi/include-3.8.8.1/blpapi_schema.h similarity index 95% rename from deps/blpapi/include-3.7.9.1/blpapi_schema.h rename to deps/blpapi/include-3.8.8.1/blpapi_schema.h index 6259b96..d1fcfb9 100644 --- a/deps/blpapi/include-3.7.9.1/blpapi_schema.h +++ b/deps/blpapi/include-3.8.8.1/blpapi_schema.h @@ -605,12 +605,12 @@ size_t SchemaElementDefinition::numAlternateNames() const inline Name SchemaElementDefinition::getAlternateName(size_t index) const { - blpapi_Name_t *name = + blpapi_Name_t *alternateName = blpapi_SchemaElementDefinition_getAlternateName(d_impl_p, index); - if (name == 0) { + if (alternateName == 0) { ExceptionUtil::throwOnError(BLPAPI_ERROR_INDEX_OUT_OF_RANGE); } - return name; + return alternateName; } inline @@ -619,8 +619,11 @@ std::ostream& SchemaElementDefinition::print( int level, int spacesPerLevel) const { - blpapi_SchemaElementDefinition_print( - d_impl_p, OstreamWriter, &stream, level, spacesPerLevel); + blpapi_SchemaElementDefinition_print(d_impl_p, + StreamProxyOstream::writeToStream, + &stream, + level, + spacesPerLevel); return stream; } @@ -634,9 +637,9 @@ std::ostream& operator<<( } inline -void SchemaElementDefinition::setUserData(void *userData) +void SchemaElementDefinition::setUserData(void *newUserData) { - blpapi_SchemaElementDefinition_setUserData(d_impl_p, userData); + blpapi_SchemaElementDefinition_setUserData(d_impl_p, newUserData); } inline @@ -697,10 +700,10 @@ size_t SchemaTypeDefinition::numElementDefinitions() const } inline -bool SchemaTypeDefinition::hasElementDefinition(const Name& name) const +bool SchemaTypeDefinition::hasElementDefinition(const Name& elementName) const { return blpapi_SchemaTypeDefinition_getElementDefinition( - d_impl_p, 0, name.impl()) ? true : false; + d_impl_p, 0, elementName.impl()) ? true : false; } inline @@ -713,12 +716,12 @@ SchemaTypeDefinition::hasElementDefinition(const char *nameString) const inline SchemaElementDefinition -SchemaTypeDefinition::getElementDefinition(const Name& name) const +SchemaTypeDefinition::getElementDefinition(const Name& elementName) const { blpapi_SchemaElementDefinition_t *def = blpapi_SchemaTypeDefinition_getElementDefinition(d_impl_p, 0, - name.impl()); + elementName.impl()); if (def == 0) { ExceptionUtil::throwOnError(BLPAPI_ERROR_ITEM_NOT_FOUND); } @@ -777,8 +780,11 @@ std::ostream& SchemaTypeDefinition::print( int level, int spacesPerLevel) const { - blpapi_SchemaTypeDefinition_print( - d_impl_p, OstreamWriter, &stream, level, spacesPerLevel); + blpapi_SchemaTypeDefinition_print(d_impl_p, + StreamProxyOstream::writeToStream, + &stream, + level, + spacesPerLevel); return stream; } @@ -792,9 +798,9 @@ std::ostream& operator<<( } inline -void SchemaTypeDefinition::setUserData(void *userData) +void SchemaTypeDefinition::setUserData(void *newUserData) { - blpapi_SchemaTypeDefinition_setUserData(d_impl_p, userData); + blpapi_SchemaTypeDefinition_setUserData(d_impl_p, newUserData); } inline diff --git a/deps/blpapi/include-3.7.9.1/blpapi_service.h b/deps/blpapi/include-3.8.8.1/blpapi_service.h similarity index 91% rename from deps/blpapi/include-3.7.9.1/blpapi_service.h rename to deps/blpapi/include-3.8.8.1/blpapi_service.h index 27b6b84..fed4655 100644 --- a/deps/blpapi/include-3.7.9.1/blpapi_service.h +++ b/deps/blpapi/include-3.8.8.1/blpapi_service.h @@ -423,8 +423,8 @@ std::ostream& operator<<(std::ostream& stream, const Service& service); // class Operation // --------------- inline -Operation::Operation(blpapi_Operation_t *handle) -: d_handle(handle) +Operation::Operation(blpapi_Operation_t *newHandle) +: d_handle(newHandle) { } @@ -500,8 +500,8 @@ Service::Service(const Service& original) } inline -Service::Service(blpapi_Service_t *handle) - : d_handle(handle) +Service::Service(blpapi_Service_t *newHandle) + : d_handle(newHandle) { addRef(); } @@ -634,20 +634,21 @@ size_t Service::numOperations() const } inline -bool Service::hasOperation(const char* name) const +bool Service::hasOperation(const char* operationName) const { blpapi_Operation_t *operation; - return blpapi_Service_getOperation(d_handle, &operation, name, 0) == 0; + return + blpapi_Service_getOperation(d_handle, &operation, operationName, 0) == 0; } inline -bool Service::hasOperation(const Name& name) const +bool Service::hasOperation(const Name& operationName) const { blpapi_Operation_t *operation; return blpapi_Service_getOperation(d_handle, &operation, 0, - name.impl()) == 0; + operationName.impl()) == 0; } inline @@ -660,20 +661,23 @@ Operation Service::getOperation(size_t index) const } inline -Operation Service::getOperation(const char* name) const +Operation Service::getOperation(const char* operationName) const { blpapi_Operation_t *operation; ExceptionUtil::throwOnError( - blpapi_Service_getOperation(d_handle, &operation, name, 0)); + blpapi_Service_getOperation(d_handle, &operation, operationName, 0)); return operation; } inline -Operation Service::getOperation(const Name& name) const +Operation Service::getOperation(const Name& operationName) const { blpapi_Operation_t *operation; ExceptionUtil::throwOnError( - blpapi_Service_getOperation(d_handle, &operation, 0, name.impl())); + blpapi_Service_getOperation(d_handle, + &operation, + 0, + operationName.impl())); return operation; } @@ -685,21 +689,24 @@ int Service::numEventDefinitions() const inline -bool Service::hasEventDefinition(const char* name) const +bool Service::hasEventDefinition(const char* definitionName) const { blpapi_SchemaElementDefinition_t *eventDefinition; return blpapi_Service_getEventDefinition( - d_handle, &eventDefinition, name, 0) == 0 ? true : false; + d_handle, &eventDefinition, definitionName, 0) == 0 ? true : false; } inline -bool Service::hasEventDefinition(const Name& name) const +bool Service::hasEventDefinition(const Name& definitionName) const { blpapi_SchemaElementDefinition_t *eventDefinition; - return blpapi_Service_getEventDefinition( - d_handle, &eventDefinition, 0, name.impl()) == 0 ? true : false; + return blpapi_Service_getEventDefinition(d_handle, + &eventDefinition, + 0, + definitionName.impl()) == 0 + ? true : false; } @@ -716,22 +723,30 @@ SchemaElementDefinition Service::getEventDefinition(size_t index) const inline -SchemaElementDefinition Service::getEventDefinition(const char* name) const +SchemaElementDefinition Service::getEventDefinition( + const char* definitionName) const { blpapi_SchemaElementDefinition_t *eventDefinition; ExceptionUtil::throwOnError( - blpapi_Service_getEventDefinition( - d_handle, &eventDefinition, name, 0)); + blpapi_Service_getEventDefinition( + d_handle, + &eventDefinition, + definitionName, + 0)); return SchemaElementDefinition(eventDefinition); } inline -SchemaElementDefinition Service::getEventDefinition(const Name& name) const +SchemaElementDefinition Service::getEventDefinition( + const Name& definitionName) const { blpapi_SchemaElementDefinition_t *eventDefinition; ExceptionUtil::throwOnError( - blpapi_Service_getEventDefinition( - d_handle, &eventDefinition, 0, name.impl())); + blpapi_Service_getEventDefinition( + d_handle, + &eventDefinition, + 0, + definitionName.impl())); return SchemaElementDefinition(eventDefinition); } @@ -747,8 +762,11 @@ std::ostream& Service::print( int level, int spacesPerLevel) const { - blpapi_Service_print( - d_handle, OstreamWriter, &stream, level, spacesPerLevel); + blpapi_Service_print(d_handle, + StreamProxyOstream::writeToStream, + &stream, + level, + spacesPerLevel); return stream; } diff --git a/deps/blpapi/include-3.7.9.1/blpapi_session.h b/deps/blpapi/include-3.8.8.1/blpapi_session.h similarity index 99% rename from deps/blpapi/include-3.7.9.1/blpapi_session.h rename to deps/blpapi/include-3.8.8.1/blpapi_session.h index b859333..af1fdb7 100644 --- a/deps/blpapi/include-3.7.9.1/blpapi_session.h +++ b/deps/blpapi/include-3.8.8.1/blpapi_session.h @@ -773,8 +773,8 @@ Session::Session(const SessionOptions& parameters, } inline -Session::Session(blpapi_Session_t *handle) - : d_handle_p(handle) +Session::Session(blpapi_Session_t *newHandle) + : d_handle_p(newHandle) { initAbstractSessionHandle(blpapi_Session_getAbstractSession(d_handle_p)); } @@ -986,8 +986,9 @@ void Session::dispatchEvent(const Event& event) d_eventHandler_p->processEvent(event, this); } -static void eventHandlerProxy(blpapi_Event_t* event, blpapi_Session_t *session, - void *userData) +static void eventHandlerProxy(blpapi_Event_t *event, + blpapi_Session_t *, + void *userData) { reinterpret_cast(userData)->dispatchEvent(Event(event)); } diff --git a/deps/blpapi/include-3.7.9.1/blpapi_sessionoptions.h b/deps/blpapi/include-3.8.8.1/blpapi_sessionoptions.h similarity index 90% rename from deps/blpapi/include-3.7.9.1/blpapi_sessionoptions.h rename to deps/blpapi/include-3.8.8.1/blpapi_sessionoptions.h index 38422cf..eb7778d 100644 --- a/deps/blpapi/include-3.7.9.1/blpapi_sessionoptions.h +++ b/deps/blpapi/include-3.8.8.1/blpapi_sessionoptions.h @@ -70,7 +70,7 @@ extern "C" { #endif BLPAPI_EXPORT -blpapi_SessionOptions_t *blpapi_SessionOptions_create(); +blpapi_SessionOptions_t *blpapi_SessionOptions_create(void); BLPAPI_EXPORT blpapi_SessionOptions_t *blpapi_SessionOptions_duplicate( @@ -186,6 +186,11 @@ int blpapi_SessionOptions_setKeepAliveEnabled( blpapi_SessionOptions_t *parameters, int isEnabled); +BLPAPI_EXPORT +void blpapi_SessionOptions_setRecordSubscriptionDataReceiveTimes( + blpapi_SessionOptions_t *parameters, + int shouldRecord); + BLPAPI_EXPORT const char *blpapi_SessionOptions_serverHost( blpapi_SessionOptions_t *parameters); @@ -273,6 +278,10 @@ BLPAPI_EXPORT int blpapi_SessionOptions_keepAliveEnabled( blpapi_SessionOptions_t *parameters); +BLPAPI_EXPORT +int blpapi_SessionOptions_recordSubscriptionDataReceiveTimes( + blpapi_SessionOptions_t *parameters); + #ifdef __cplusplus } @@ -461,6 +470,12 @@ class SessionOptions { // ping-based keep-alives), and from the server to the client as // specified by the server configuration. + void setRecordSubscriptionDataReceiveTimes(bool shouldRecord); + // Set whether the receipt time (accessed via + // blpapi::Message::timeReceived) should be recorded for subscription + // data messages. By default, the receipt time for these messages is + // not recorded. + // ACCESSORS const char *serverHost() const; // Return a pointer to the value of the server host option in this @@ -549,6 +564,11 @@ class SessionOptions { bool keepAliveEnabled() const; // Return 'true' if the keep-alive mechanism is enabled; otherwise // return 'false'. + + bool recordSubscriptionDataReceiveTimes() const; + // Return whether the receipt time (accessed via + // blpapi::Message::timeReceived) should be recorded for subscription + // data messages. }; // ============================================================================ @@ -589,24 +609,26 @@ SessionOptions& SessionOptions::operator=(const SessionOptions& rhs) } inline -void SessionOptions::setServerHost(const char *serverHost) +void SessionOptions::setServerHost(const char *newServerHost) { - blpapi_SessionOptions_setServerHost(d_handle_p, serverHost); + blpapi_SessionOptions_setServerHost(d_handle_p, newServerHost); } inline -void SessionOptions::setServerPort(unsigned short serverPort) +void SessionOptions::setServerPort(unsigned short newServerPort) { - blpapi_SessionOptions_setServerPort(d_handle_p, serverPort); + blpapi_SessionOptions_setServerPort(d_handle_p, newServerPort); } inline -int SessionOptions::setServerAddress(const char *serverHost, - unsigned short serverPort, +int SessionOptions::setServerAddress(const char *newServerHost, + unsigned short newServerPort, size_t index) { - return blpapi_SessionOptions_setServerAddress( - d_handle_p, serverHost, serverPort, index); + return blpapi_SessionOptions_setServerAddress(d_handle_p, + newServerHost, + newServerPort, + index); } inline @@ -624,9 +646,9 @@ void SessionOptions::setConnectTimeout(unsigned int timeoutMilliSeconds) } inline -void SessionOptions::setDefaultServices(const char *defaultServices) +void SessionOptions::setDefaultServices(const char *newDefaultServices) { - blpapi_SessionOptions_setDefaultServices(d_handle_p, defaultServices); + blpapi_SessionOptions_setDefaultServices(d_handle_p, newDefaultServices); } inline @@ -648,31 +670,31 @@ void SessionOptions::setDefaultTopicPrefix(const char *prefix) inline void SessionOptions::setAllowMultipleCorrelatorsPerMsg( - bool allowMultipleCorrelatorsPerMsg) + bool newAllowMultipleCorrelatorsPerMsg) { blpapi_SessionOptions_setAllowMultipleCorrelatorsPerMsg( d_handle_p, - allowMultipleCorrelatorsPerMsg); + newAllowMultipleCorrelatorsPerMsg); } inline -void SessionOptions::setClientMode(int clientMode) +void SessionOptions::setClientMode(int newClientMode) { #if BLPAPI_COMPAT_33X - clientMode |= BLPAPI_CLIENTMODE_COMPAT_33X; + newClientMode |= BLPAPI_CLIENTMODE_COMPAT_33X; #endif blpapi_SessionOptions_setClientMode( d_handle_p, - clientMode); + newClientMode); } inline -void SessionOptions::setMaxPendingRequests(int maxPendingRequests) +void SessionOptions::setMaxPendingRequests(int newMaxPendingRequests) { blpapi_SessionOptions_setMaxPendingRequests( d_handle_p, - maxPendingRequests); + newMaxPendingRequests); } inline @@ -691,10 +713,10 @@ void SessionOptions::setAuthenticationOptions(const char *authOptions) } inline -void SessionOptions::setNumStartAttempts(int numStartAttempts) +void SessionOptions::setNumStartAttempts(int newNumStartAttempts) { blpapi_SessionOptions_setNumStartAttempts( - d_handle_p, numStartAttempts); + d_handle_p, newNumStartAttempts); } inline @@ -748,6 +770,14 @@ void SessionOptions::setKeepAliveEnabled(bool isEnabled) BLPAPI_CALL_SESSIONOPTIONS_SETKEEPALIVEENABLED(d_handle_p, isEnabled)); } +inline +void SessionOptions::setRecordSubscriptionDataReceiveTimes(bool shouldRecrod) +{ + BLPAPI_CALL_SESSIONOPTION_SETRECORDSUBSCRIPTIONDATARECEIVETIMES( + d_handle_p, + shouldRecrod); +} + inline const char *SessionOptions::serverHost() const { @@ -757,7 +787,8 @@ const char *SessionOptions::serverHost() const inline unsigned short SessionOptions::serverPort() const { - return blpapi_SessionOptions_serverPort(d_handle_p); + return static_cast( + blpapi_SessionOptions_serverPort(d_handle_p)); } inline @@ -768,12 +799,14 @@ size_t SessionOptions::numServerAddresses() const inline int SessionOptions::getServerAddress( - const char **serverHost, - unsigned short *serverPort, + const char **serverHostOut, + unsigned short *serverPortOut, size_t index) const { - return blpapi_SessionOptions_getServerAddress( - d_handle_p, serverHost, serverPort, index); + return blpapi_SessionOptions_getServerAddress(d_handle_p, + serverHostOut, + serverPortOut, + index); } inline @@ -872,7 +905,19 @@ int SessionOptions::defaultKeepAliveResponseTimeout() const inline bool SessionOptions::keepAliveEnabled() const { - return BLPAPI_CALL_SESSIONOPTIONS_KEEPALIVEENABLED(d_handle_p) != 0; + return BLPAPI_CALL_SESSIONOPTIONS_KEEPALIVEENABLED(d_handle_p) != 0 + ? true + : false; +} + +inline +bool SessionOptions::recordSubscriptionDataReceiveTimes() const +{ + return + BLPAPI_CALL_SESSIONOPTION_RECORDSUBSCRIPTIONDATARECEIVETIMES( + d_handle_p) + ? true + : false; } inline diff --git a/deps/blpapi/include-3.7.9.1/blpapi_streamproxy.h b/deps/blpapi/include-3.8.8.1/blpapi_streamproxy.h similarity index 67% rename from deps/blpapi/include-3.7.9.1/blpapi_streamproxy.h rename to deps/blpapi/include-3.8.8.1/blpapi_streamproxy.h index b7d897e..57c9fde 100644 --- a/deps/blpapi/include-3.7.9.1/blpapi_streamproxy.h +++ b/deps/blpapi/include-3.8.8.1/blpapi_streamproxy.h @@ -41,12 +41,40 @@ typedef int(*blpapi_StreamWriter_t)(const char* data, namespace BloombergLP { namespace blpapi { -static int OstreamWriter(const char* data, int length, void *stream) +inline int OstreamWriter(const char *data, int length, void *stream); + // DEPRECATED + + // ================== + // struct StreamProxy + // ================== + +struct StreamProxyOstream { + +static int writeToStream(const char* data, int length, void *stream); + // Format, to the specified 'stream', which must be a pointer to a + // 'std::ostream', the specified 'length' bytes of the specified 'data'. + +}; + +//============================================================================= +// INLINE FUNCTION DEFINITIONS +//============================================================================= + +inline +int StreamProxyOstream::writeToStream(const char *data, + int length, + void *stream) { reinterpret_cast(stream)->write(data, length); return 0; } +inline +int OstreamWriter(const char *data, int length, void *stream) +{ + return StreamProxyOstream::writeToStream(data, length, stream); +} + } // close namespace blpapi } // close namespace BloombergLP diff --git a/deps/blpapi/include-3.7.9.1/blpapi_subscriptionlist.h b/deps/blpapi/include-3.8.8.1/blpapi_subscriptionlist.h similarity index 99% rename from deps/blpapi/include-3.7.9.1/blpapi_subscriptionlist.h rename to deps/blpapi/include-3.8.8.1/blpapi_subscriptionlist.h index 27ad114..f1ebaff 100644 --- a/deps/blpapi/include-3.7.9.1/blpapi_subscriptionlist.h +++ b/deps/blpapi/include-3.8.8.1/blpapi_subscriptionlist.h @@ -133,7 +133,7 @@ extern "C" { #endif BLPAPI_EXPORT -blpapi_SubscriptionList_t *blpapi_SubscriptionList_create(); +blpapi_SubscriptionList_t *blpapi_SubscriptionList_create(void); BLPAPI_EXPORT void blpapi_SubscriptionList_destroy(blpapi_SubscriptionList_t *list); diff --git a/deps/blpapi/include-3.8.8.1/blpapi_timepoint.h b/deps/blpapi/include-3.8.8.1/blpapi_timepoint.h new file mode 100644 index 0000000..edfb4c4 --- /dev/null +++ b/deps/blpapi/include-3.8.8.1/blpapi_timepoint.h @@ -0,0 +1,124 @@ +/* Copyright 2012. Bloomberg Finance L.P. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: The above + * copyright notice and this permission notice shall be included in all copies + * or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ +// blpapi_timepoint.h -*-C++-*- +#ifndef INCLUDED_BLPAPI_TIMEPOINT +#define INCLUDED_BLPAPI_TIMEPOINT +//@PURPOSE: Provide a time point with respect to an epoch +// +//@CLASSES: +// blpapi::TimePoint: a fixed moment in a linear model of time +// blpapi::TimePointUtil: namespace for 'TimePoint' Utility functions +// +//@SEE_ALSO: blpapi_highresolutionclock, blpapi_datetime +// +//@DESCRIPTION: This component provides a representation of a fixed moment in +// a strict linear model of time. A function to measure the distance between +// two such moments is provided. Note that such a moment is not associated +// with any particular calendar or wall-clock conventions---see +// 'blpapi_datetime' for such representations (and for functions to apply such +// conventions to an existing time point). + +#ifndef INCLUDED_BLPAPI_CALL +#include +#endif + +#ifndef INCLUDED_BLPAPI_DEFS +#include +#endif + +#ifndef INCLUDED_BLPAPI_TYPES +#include +#endif + +struct blpapi_TimePoint { + // This struct provides an *in-core* *value* *semantic* type for + // representing a single moment in time, assuming a simple linear model of + // time. The precision of such representations is guaranteed to be at + // least at the granularity of nanoseconds, but only times relatively near + // (within a few years of) the current moment are guaranteed to be + // representable. The actual implementation of a time point is + // implementation-defined and opaque to client code; in particular, time + // points can *not* be transferred between processes. (The SDK reserves + // the right to alter the epoch used as a base from run to run.) Clients + // wishing to persist time points should use the + // 'TimePointUtil::nanosecondsBetween' function to measure distance from a + // known epoch value, or convert the time point to some standard calendar + // and wall-clock convention (e.g. 'blpapi::Datetime'). + + blpapi_Int64_t d_value; +}; + +typedef struct blpapi_TimePoint blpapi_TimePoint_t; + +#ifdef __cplusplus +extern "C" { +#endif + +BLPAPI_EXPORT +long long blpapi_TimePointUtil_nanosecondsBetween( + const blpapi_TimePoint_t *start, + const blpapi_TimePoint_t *end); + // Return the difference between 'start' and 'end' 'TimePoint' objects. The + // returned value is in nanoseconds representing 'end - start'. + +#ifdef __cplusplus +} + +namespace BloombergLP { +namespace blpapi { + // ================ + // struct TimePoint + // ================ + +typedef blpapi_TimePoint_t TimePoint; + + // ==================== + // struct TimePointUtil + // ==================== +struct TimePointUtil { + // This provides a namespace for 'TimePoint' utility functions. + + static long long nanosecondsBetween(const TimePoint& start, + const TimePoint& end); + // Return the difference between 'start' and 'end' 'TimePoint' + // objects. The returned value is in nanoseconds representing + // 'end - start'. +}; + +// ============================================================================ +// INLINE AND TEMPLATE FUNCTION IMPLEMENTATIONS +// ============================================================================ + + // -------------------- + // struct TimePointUtil + // -------------------- + +inline +long long TimePointUtil::nanosecondsBetween(const TimePoint& start, + const TimePoint& end) +{ + return BLPAPI_CALL_TIMEPOINTUTIL_NANOSECONDSBETWEEN(&start, &end); +} + +} // close namespace blpapi +} // close namespace BloombergLP + +#endif // #ifdef __cplusplus +#endif // #ifndef INCLUDED_BLPAPI_TIMEPOINT diff --git a/deps/blpapi/include-3.7.9.1/blpapi_topic.h b/deps/blpapi/include-3.8.8.1/blpapi_topic.h similarity index 100% rename from deps/blpapi/include-3.7.9.1/blpapi_topic.h rename to deps/blpapi/include-3.8.8.1/blpapi_topic.h diff --git a/deps/blpapi/include-3.7.9.1/blpapi_topiclist.h b/deps/blpapi/include-3.8.8.1/blpapi_topiclist.h similarity index 93% rename from deps/blpapi/include-3.7.9.1/blpapi_topiclist.h rename to deps/blpapi/include-3.8.8.1/blpapi_topiclist.h index a9dbf70..857c267 100644 --- a/deps/blpapi/include-3.7.9.1/blpapi_topiclist.h +++ b/deps/blpapi/include-3.8.8.1/blpapi_topiclist.h @@ -294,11 +294,12 @@ int TopicList::add(const char* topic, } inline -int TopicList::add(Message const& message, - const CorrelationId& correlationId) +int TopicList::add(const Message& newMessage, + const CorrelationId& correlationId) { - return blpapi_TopicList_addFromMessage( - d_handle_p, message.impl(), &correlationId.impl()); + return blpapi_TopicList_addFromMessage(d_handle_p, + newMessage.impl(), + &correlationId.impl()); } inline @@ -356,23 +357,24 @@ int TopicList::statusAt(size_t index) const inline Message const TopicList::message(const CorrelationId& correlationId) const { - blpapi_Message_t* message; + blpapi_Message_t* messageByCid; ExceptionUtil::throwOnError( - blpapi_TopicList_message(d_handle_p, &message, &correlationId.impl())); - - BLPAPI_CALL_MESSAGE_ADDREF(message); - return Message(message, true); + blpapi_TopicList_message(d_handle_p, + &messageByCid, + &correlationId.impl())); + BLPAPI_CALL_MESSAGE_ADDREF(messageByCid); + return Message(messageByCid, true); } inline Message const TopicList::messageAt(size_t index) const { - blpapi_Message_t* message; + blpapi_Message_t* messageByIndex; ExceptionUtil::throwOnError( - blpapi_TopicList_messageAt(d_handle_p, &message, index)); + blpapi_TopicList_messageAt(d_handle_p, &messageByIndex, index)); - BLPAPI_CALL_MESSAGE_ADDREF(message); - return Message(message, true); + BLPAPI_CALL_MESSAGE_ADDREF(messageByIndex); + return Message(messageByIndex, true); } inline diff --git a/deps/blpapi/include-3.7.9.1/blpapi_types.h b/deps/blpapi/include-3.8.8.1/blpapi_types.h similarity index 95% rename from deps/blpapi/include-3.7.9.1/blpapi_types.h rename to deps/blpapi/include-3.8.8.1/blpapi_types.h index d82cb08..13fb2ee 100644 --- a/deps/blpapi/include-3.7.9.1/blpapi_types.h +++ b/deps/blpapi/include-3.8.8.1/blpapi_types.h @@ -62,6 +62,16 @@ enum blpapi_DataType_t { // messages }; +typedef enum blpapi_Logging_Severity_t { + blpapi_Logging_SEVERITY_OFF = 0, + blpapi_Logging_SEVERITY_FATAL = 1, + blpapi_Logging_SEVERITY_ERROR = 2, + blpapi_Logging_SEVERITY_WARN = 3, + blpapi_Logging_SEVERITY_INFO = 4, + blpapi_Logging_SEVERITY_DEBUG = 5, + blpapi_Logging_SEVERITY_TRACE = 6 +} blpapi_Logging_Severity_t; + struct blpapi_AbstractSession; typedef struct blpapi_AbstractSession blpapi_AbstractSession_t; diff --git a/deps/blpapi/include-3.8.8.1/blpapi_versioninfo.h b/deps/blpapi/include-3.8.8.1/blpapi_versioninfo.h new file mode 100644 index 0000000..aa4660e --- /dev/null +++ b/deps/blpapi/include-3.8.8.1/blpapi_versioninfo.h @@ -0,0 +1,294 @@ +/* Copyright 2012. Bloomberg Finance L.P. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: The above + * copyright notice and this permission notice shall be included in all copies + * or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ +// blpapi_versioninfo.h -*-C++-*- +#ifndef INCLUDED_BLPAPI_VERSIONINFO +#define INCLUDED_BLPAPI_VERSIONINFO + +//@PURPOSE: Provide BLPAPI SDK library version information. +// +//@CLASSES: +// blpapi::VersionInfo: basic BLPAPI SDK library version attribute class +// +//@DESCRIPTION: This component provides access the BLPAPI SDK library version +// information. Each version of the BLPAPI library is identified by four +// integers: major, minor, patch, and build. +// +// The current major version is 3; there is no guarantee of compatibility +// between different major versions. +// +// Differences in minor version numbers indicate significant feature additions. +// Standard distributions of the BLPAPI have minor version numbers below 128, +// and higher minor numbers are expected to provide APIs that are a superset of +// the APIs provided by lower minor version numbers; i.e. all functionality and +// interfaces supported by BLPAPI 3.7 is also provided by BLPAPI 3.8, while the +// inverse is not typically true. (Bloomberg occasionally distributes library +// versions with version numbers above 127; consult the release information +// distributed with these libraries to determine interoperability with other +// minor versions.) +// +// Increments to patch numbers indicate performance or stability enhancements +// to the library. +// +// Build numbers typically do not carry any information about the library +// version's functionality, but can be used along with the other parts of the +// build number to uniquely identity a precise library binary version (e.g. for +// the purpose of code signing and auditing). +// +///Usage +///----- +///C++ usage +///- - - - - +// This example logs the BLPAPI version in order to make the logs analysis more +// productive: +//.. +// blpapi::VersionInfo blpapiVersion; +// // Client log the library version for reference and future debugging +// log("BLPAPI version: %d.%d.%d.%d", +// blpapiVersion.majorVersion(), +// blpapiVersion.minorVersion(), +// blpapiVersion.patchVersion(), +// blpapiVersion.buildVersion()); +//.. +// +///C usage +///- - - - +// This example logs the BLPAPI version in order to make the logs analysis more +// productive: +//.. +// int majorVersion, minorVersion, patchVersion, buildVersion; +// blpapi_getVersionInfo(&majorVersion, &minorVersion, &patchVersion, +// &buildVersion); +// // Client log the library version for reference and future debugging +// log("BLPAPI version: %d.%d.%d.%d", majorVersion, minorVersion, +// patchVersion, buildVersion); +//.. +// +// +// This example provide shows how to use the backward API signature +// compatibility macros BLPAPI_SDK_VERSION and BLPAPI_MAKE_VERSION (see +// blpapi_dispatchtbl.h): +//.. +// #if BLPAPI_SDK_VERSION >= BLPAPI_MAKE_VERSION(3, 3, 7) +// // Do version 3.3.7 specific stuff here (e.g. adding functions with old +// // signature to an array so a client code that was compiled with +// // version 3.3.7 will still be able to run using the new version. +// ... +// #elif BLPAPI_SDK_VERSION ... +//.. + +#ifndef INCLUDED_BLPAPI_CALL +#include +#endif + +#ifndef INCLUDED_BLPAPI_DEFS +#include +#endif + +#ifndef INCLUDED_BLPAPI_VERSIONMACROS +#include +#endif + +#ifdef __cplusplus +extern "C" { +#endif // ifdef __cplusplus + +BLPAPI_EXPORT +void blpapi_getVersionInfo(int *majorVersion, + int *minorVersion, + int *patchVersion, + int *buildVersion); + // Initialize the 4 parameters with the current release version information + // which include the following version parts: Major, Minor, Patch, and + // Build. + +BLPAPI_EXPORT +const char *blpapi_getVersionIdentifier(void); + // Return a null-terminated sequence of printable ascii characters (with + // values from 0x20 to 0x7e, inclusive) identifying the version of the + // blpapi runtime library. The lifetime of the returned string is + // guaranteed until the end of `main()` (but is *not* necessarily usable + // during the C++ static destruction phase). + +#ifdef __cplusplus +} + +#include +#include +#include + +namespace BloombergLP { +namespace blpapi { + // ================= + // class VersionInfo + // ================= +class VersionInfo { + // This attribute class holds the four integer components of a BLPAPI + // version number, provides factory methods to obtain such version numbers + // for both the headers used at compile time and the library loaded at run + // time, and provides a static function to obtain an opaque version + // identifer string for use by Bloomberg support. + + private: + // INSTANCE DATA + int d_major; // BLPAPI SDK library major version + int d_minor; // BLPAPI SDK library minor version + int d_patch; // BLPAPI SDK library patch version + int d_build; // BLPAPI SDK library build version + + VersionInfo(int major, int minor, int patch, int build); + // Create a 'VersionInfo' object containing the specified 'major', + // 'minor', 'patch', and 'build' numbers. + + public: + // CREATORS + static VersionInfo headerVersion(); + // Return a 'VersionInfo' object containing the version of the BLPAPI + // headers against which the client application was compiled. Note + // that the version of the BLPAPI library loaded at runtime may be + // different than the version of the headers against which the code was + // compiled. + + static VersionInfo runtimeVersion(); + // Return a 'VersionInfo' object containing the version of the BLPAPI + // runtime library that is currently running. Note that the version of + // the BLPAPI library loaded at runtime may be different than the + // version of the headers against which the code was compiled. + + VersionInfo(); + // This function is a synonym for 'VersionInfo::runtimeVersion()'. + // DEPRECATED + + // ACCESSORS + int majorVersion() const; + // Return the major version number. + int minorVersion() const; + // Return the minor version number. + int patchVersion() const; + // Return the patch version number. + int buildVersion() const; + // Return the build version number. + + static std::string versionIdentifier(); + // Return a string containing a sequence of printable ascii characters + // (with values from 0x20 to 0x7e, inclusive) identifying the version + // of the blpapi runtime library. The format of this string is + // unspecified. + +}; + +std::ostream& operator<<(std::ostream& stream, const VersionInfo& rhs); + // Output the specified 'rhs' to the specified 'stream' in a human-readable + // format. Note that the exact details of this format are not specified + // and may be differ between different library versions. + +//============================================================================= +// INLINE FUNCTION DEFINITIONS +//============================================================================= + + // ----------------- + // class VersionInfo + // ----------------- +// CREATORS +inline +VersionInfo::VersionInfo(int major, int minor, int patch, int build) +: d_major(major) +, d_minor(minor) +, d_patch(patch) +, d_build(build) +{ +} + +inline +VersionInfo VersionInfo::headerVersion() +{ + return VersionInfo(BLPAPI_VERSION_MAJOR, + BLPAPI_VERSION_MINOR, + BLPAPI_VERSION_PATCH, + BLPAPI_VERSION_BUILD); +} + +inline +VersionInfo VersionInfo::runtimeVersion() +{ + int major, minor, patch, build; + blpapi_getVersionInfo(&major, &minor, &patch, &build); + return VersionInfo(major, minor, patch, build); +} + +inline +VersionInfo::VersionInfo() +{ + blpapi_getVersionInfo(&d_major, &d_minor, &d_patch, &d_build); +} + +// ACCESSORS +inline +int VersionInfo::majorVersion() const +{ + return d_major; +} + +inline +int VersionInfo::minorVersion() const +{ + return d_minor; +} + +inline +int VersionInfo::patchVersion() const +{ + return d_patch; +} + +inline +int VersionInfo::buildVersion() const +{ + return d_build; +} + +inline +std::string VersionInfo::versionIdentifier() +{ + std::ostringstream oss; + oss << "blpapi-cpp; headers " + << headerVersion() + << "; runtime " + << runtimeVersion(); + if (BLPAPI_CALL_AVAILABLE(blpapi_getVersionIdentifier)) { + oss << '-' << BLPAPI_CALL(blpapi_getVersionIdentifier)(); + } + return oss.str(); +} + +inline +std::ostream& operator<<(std::ostream& stream, const VersionInfo& rhs) +{ + return stream << rhs.majorVersion() << '.' + << rhs.minorVersion() << '.' + << rhs.patchVersion() << '.' + << rhs.buildVersion(); +} + +} // close namespace blpapi +} // close namespace BloombergLP + +#endif // ifdef __cplusplus + +#endif // INCLUDED_BLPAPI_VERSIONINFO diff --git a/deps/blpapi/include-3.8.8.1/blpapi_versionmacros.h b/deps/blpapi/include-3.8.8.1/blpapi_versionmacros.h new file mode 100644 index 0000000..08cd2e8 --- /dev/null +++ b/deps/blpapi/include-3.8.8.1/blpapi_versionmacros.h @@ -0,0 +1,47 @@ +/* Copyright 2012. Bloomberg Finance L.P. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: The above + * copyright notice and this permission notice shall be included in all copies + * or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ +// blpapi_versionmacros.h -*-C++-*- +#ifndef INCLUDED_BLPAPI_VERSIONMACROS +#define INCLUDED_BLPAPI_VERSIONMACROS + +//@PURPOSE: Provide preprocessor macros for BLPAPI library version information. +// +//@DESCRIPTION: This file is not meant to be included directly; see +// 'blpapi_versioninfo.h' for library version interfaces. + +#define BLPAPI_VERSION_MAJOR 3 +#define BLPAPI_VERSION_MINOR 8 +#define BLPAPI_VERSION_PATCH 8 +#define BLPAPI_VERSION_BUILD 1 + +#define BLPAPI_MAKE_VERSION(MAJOR, MINOR, PATCH) ((MAJOR) * 65536 + \ + (MINOR) * 256 + \ + (PATCH)) + // Combine the specified 'MAJOR', 'MINOR', and 'PATCH' values to form + // a single integer that can be used for comparisons at compile time. + +#define BLPAPI_SDK_VERSION BLPAPI_MAKE_VERSION(BLPAPI_VERSION_MAJOR, \ + BLPAPI_VERSION_MINOR, \ + BLPAPI_VERSION_PATCH) + // Form a single integer representing the version of the BLPAPI headers + // that can be compared with values formed by 'BLPAPI_MAKE_VERSION' at + // compile time. + +#endif // INCLUDED_BLPAPI_VERSIONMACROS diff --git a/deps/blpapi/linux/libblpapi3_32.so b/deps/blpapi/linux/libblpapi3_32.so index cc91f7b..2e8b7e5 100755 Binary files a/deps/blpapi/linux/libblpapi3_32.so and b/deps/blpapi/linux/libblpapi3_32.so differ diff --git a/deps/blpapi/linux/libblpapi3_64.so b/deps/blpapi/linux/libblpapi3_64.so index b3f6cf7..c434f87 100755 Binary files a/deps/blpapi/linux/libblpapi3_64.so and b/deps/blpapi/linux/libblpapi3_64.so differ diff --git a/deps/blpapi/win/blpapi3_32.dll b/deps/blpapi/win/blpapi3_32.dll new file mode 100644 index 0000000..8f08b9b Binary files /dev/null and b/deps/blpapi/win/blpapi3_32.dll differ diff --git a/deps/blpapi/win/blpapi3_32.lib b/deps/blpapi/win/blpapi3_32.lib old mode 100755 new mode 100644 index 9166f72..b1c07a3 Binary files a/deps/blpapi/win/blpapi3_32.lib and b/deps/blpapi/win/blpapi3_32.lib differ diff --git a/deps/blpapi/win/blpapi3_64.dll b/deps/blpapi/win/blpapi3_64.dll new file mode 100644 index 0000000..ec5d2ea Binary files /dev/null and b/deps/blpapi/win/blpapi3_64.dll differ diff --git a/deps/blpapi/win/blpapi3_64.lib b/deps/blpapi/win/blpapi3_64.lib old mode 100755 new mode 100644 index a7b7807..0bed933 Binary files a/deps/blpapi/win/blpapi3_64.lib and b/deps/blpapi/win/blpapi3_64.lib differ