' This function retrieves the version of Bloomberg API run-time. ' ' @title Get Bloomberg library run-time version ' @return A string with four dot-separated values for major, minor, ' pathch and build version of the run-time library. ' @author Dirk Eddelbuettel ' @seealso \code{getHeaderVersion} ' @examples ' \dontrun{ ' getRuntimeVersion() ' } [[Rcpp::export]]
| 91 | //' } |
| 92 | // [[Rcpp::export]] |
| 93 | std::string getRuntimeVersion() { |
| 94 | // VersionInfo vi = VersionInfo::runtimeVersion(); |
| 95 | // //Rcpp::Rcout << vi << std::endl; |
| 96 | // char txt[128]; |
| 97 | // snprintf(txt, 127, "%d.%d.%d.%d", |
| 98 | // vi.majorVersion(), |
| 99 | // vi.minorVersion(), |
| 100 | // vi.patchVersion(), |
| 101 | // vi.buildVersion()); |
| 102 | |
| 103 | int major, minor, patch, build; |
| 104 | blpapi_getVersionInfo(&major, &minor, &patch, &build); |
| 105 | char txt[128]; |
| 106 | snprintf(txt, 127, "%d.%d.%d.%d", |
| 107 | major, minor, patch, build); |
| 108 | return std::string(txt); |
| 109 | } |
no outgoing calls
no test coverage detected