MCPcopy Create free account
hub / github.com/OSVR/OSVR-Core / osvrClientGetStringParameterLength

Function osvrClientGetStringParameterLength

src/osvr/ClientKit/ParametersC.cpp:35–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33// - none
34
35OSVR_ReturnCode osvrClientGetStringParameterLength(OSVR_ClientContext ctx,
36 const char path[],
37 size_t *len) {
38 if (ctx == nullptr) {
39 return OSVR_RETURN_FAILURE;
40 }
41 if (len == nullptr) {
42 return OSVR_RETURN_FAILURE;
43 }
44 std::string val = ctx->getStringParameter(path);
45 *len = val.empty() ? 0 : (val.size() + 1);
46 return OSVR_RETURN_SUCCESS;
47}
48
49OSVR_ReturnCode osvrClientGetStringParameter(OSVR_ClientContext ctx,
50 const char path[], char *buf,

Callers 3

mainFunction · 0.85
getStringParameterFunction · 0.85
getStringParameterMethod · 0.85

Calls 3

getStringParameterMethod · 0.45
emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected