MCPcopy Create free account
hub / github.com/Rblp/Rblpapi / checkExternalPointer

Function checkExternalPointer

src/blpapi_utils.cpp:51–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49using BloombergLP::blpapi::MessageIterator;
50
51void* checkExternalPointer(SEXP xp_, const char* valid_tag) {
52 if(xp_ == R_NilValue) {
53 throw std::logic_error("External pointer is NULL.");
54 }
55 if(TYPEOF(xp_) != EXTPTRSXP) {
56 throw std::logic_error("Not an external pointer.");
57 }
58
59 if(R_ExternalPtrTag(xp_)==R_NilValue) {
60 throw std::logic_error("External pointer tag is NULL.");
61 }
62 const char* xp_tag = CHAR(PRINTNAME(R_ExternalPtrTag(xp_)));
63 if(!xp_tag) {
64 throw std::logic_error("External pointer tag is blank.");
65 }
66 if(std::strcmp(xp_tag,valid_tag) != 0) {
67 throw std::logic_error("External pointer tag does not match.");
68 }
69 if(R_ExternalPtrAddr(xp_)==NULL) {
70 throw std::logic_error("External pointer address is null.");
71 }
72 return R_ExternalPtrAddr(xp_);
73}
74
75const int bbgDateToRDate(const Datetime& bbg_date) {
76 if(bbg_date.hasParts(DatetimeParts::TIME)) {

Callers 15

sendRequestWithIdentityFunction · 0.85
bds_ImplFunction · 0.85
getPortfolio_ImplFunction · 0.85
lookup_ImplFunction · 0.85
getTicks_ImplFunction · 0.85
fieldInfo_ImplFunction · 0.85
bdp_ImplFunction · 0.85
subscribe_ImplFunction · 0.85
beqs_ImplFunction · 0.85
getBars_ImplFunction · 0.85
bdh_ImplFunction · 0.85
bsrch_ImplFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected