MCPcopy Create free account
hub / github.com/OpenKinect/libfreenect2 / string

Function string

include/internal/CL/cl.hpp:511–525  ·  view source on GitHub ↗

! \brief Constructs a string populated from an arbitrary value of * specified size. * * An extra '\0' is added, in case none was contained in str. * * \param str the initial value of the string instance. Note that '\0' * characters receive no special treatment. If NULL, * the string is left empty, with a size of 0. * *

Source from the content-addressed store, hash-verified

509 * \param size the number of characters to copy from str.
510 */
511 string(const char * str, ::size_t size) :
512 size_(size),
513 str_(NULL)
514 {
515 if( size > 0 ) {
516 str_ = new char[size_+1];
517 if (str_ != NULL) {
518 memcpy(str_, str, size_ * sizeof(char));
519 str_[size_] = '\0';
520 }
521 else {
522 size_ = 0;
523 }
524 }
525 }
526
527 /*! \brief Constructs a string populated from a null-terminated value.
528 *

Callers 8

enumerateDevicesMethod · 0.85
getDeviceSerialNumberMethod · 0.85
loadCLKdeSourceFunction · 0.85
loadShaderSourceFunction · 0.85
loadCLSourceFunction · 0.85
deviceOpenMethod · 0.85
deviceCloseMethod · 0.85
tryDeviceMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected