本文整理汇总了C++中VALIDATE_ENUM函数的典型用法代码示例。如果您正苦于以下问题:C++ VALIDATE_ENUM函数的具体用法?C++ VALIDATE_ENUM怎么用?C++ VALIDATE_ENUM使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了VALIDATE_ENUM函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: rs_get_device_extrinsics
void rs_get_device_extrinsics(const rs_device * device, rs_stream from, rs_stream to, rs_extrinsics * extrin, rs_error ** error) try
{
VALIDATE_NOT_NULL(device);
VALIDATE_ENUM(from);
VALIDATE_ENUM(to);
VALIDATE_NOT_NULL(extrin);
*extrin = device->get_stream_interface(from).get_extrinsics_to(device->get_stream_interface(to));
}
示例2: rs_enable_stream_ex
void rs_enable_stream_ex(rs_device * device, rs_stream stream, int width, int height, rs_format format, int framerate, rs_output_buffer_format output, rs_error ** error) try
{
VALIDATE_NOT_NULL(device);
VALIDATE_NATIVE_STREAM(stream);
VALIDATE_RANGE(width, 0, INT_MAX);
VALIDATE_RANGE(height, 0, INT_MAX);
VALIDATE_ENUM(format);
VALIDATE_ENUM(output);
VALIDATE_RANGE(framerate, 0, INT_MAX);
device->enable_stream(stream, width, height, format, framerate, output);
}
示例3: rs_get_motion_extrinsics_from
void rs_get_motion_extrinsics_from(const rs_device * device, rs_stream from, rs_extrinsics * extrin, rs_error ** error) try
{
VALIDATE_NOT_NULL(device);
VALIDATE_ENUM(from);
VALIDATE_NOT_NULL(extrin);
*extrin = device->get_motion_extrinsics_from(from);
}
示例4: rs_enable_stream_preset
void rs_enable_stream_preset(rs_device * device, rs_stream stream, rs_preset preset, rs_error ** error) try
{
VALIDATE_NOT_NULL(device);
VALIDATE_NATIVE_STREAM(stream);
VALIDATE_ENUM(preset);
device->enable_stream_preset(stream, preset);
}
示例5: rs_get_stream_intrinsics
void rs_get_stream_intrinsics(const rs_device * device, rs_stream stream, rs_intrinsics * intrin, rs_error ** error) try
{
VALIDATE_NOT_NULL(device);
VALIDATE_ENUM(stream);
VALIDATE_NOT_NULL(intrin);
*intrin = device->get_stream_interface(stream).get_intrinsics();
}
示例6: rs_get_device_option_range
void rs_get_device_option_range(rs_device * device, rs_option option, double * min, double * max, double * step, rs_error ** error) try
{
VALIDATE_NOT_NULL(device);
VALIDATE_ENUM(option);
double x; // Prevent internal code from having to worry about whether nulls are passed in for min/max/step by giving it somewhere to write to
device->get_option_range(option, min ? *min : x, max ? *max : x, step ? *step : x);
}
示例7: rs_get_stream_mode
void rs_get_stream_mode(const rs_device * device, rs_stream stream, int index, int * width, int * height, rs_format * format, int * framerate, rs_error ** error) try
{
VALIDATE_NOT_NULL(device);
VALIDATE_ENUM(stream);
VALIDATE_RANGE(index, 0, device->get_stream_interface(stream).get_mode_count()-1);
device->get_stream_interface(stream).get_mode(index, width, height, format, framerate);
}
示例8: rs_get_device_option
double rs_get_device_option(rs_device * device, rs_option option, rs_error ** error) try
{
VALIDATE_NOT_NULL(device);
VALIDATE_ENUM(option);
double value;
device->get_options(&option, 1, &value);
return value;
}
示例9: rs_get_device_options
void rs_get_device_options(rs_device * device, const rs_option options[], unsigned int count, double values[], rs_error ** error) try
{
VALIDATE_NOT_NULL(device);
VALIDATE_LE(count, INT_MAX);
VALIDATE_NOT_NULL(options);
for(size_t i=0; i<count; ++i) VALIDATE_ENUM(options[i]);
VALIDATE_NOT_NULL(values);
device->get_options(options, count, values);
}
示例10: rs_set_device_options
void rs_set_device_options(rs_device * device, const rs_option options[], int count, const double values[], rs_error ** error) try
{
VALIDATE_NOT_NULL(device);
VALIDATE_RANGE(count, 0, INT_MAX);
VALIDATE_NOT_NULL(options);
for(int i=0; i<count; ++i) VALIDATE_ENUM(options[i]);
VALIDATE_NOT_NULL(values);
device->set_options(options, count, values);
}
示例11: rs_enable_stream
void rs_enable_stream(rs_device * device, rs_stream stream, int width, int height, rs_format format, int framerate, rs_error ** error) try
{
VALIDATE_NOT_NULL(device);
VALIDATE_NATIVE_STREAM(stream);
VALIDATE_RANGE(width, 0, INT_MAX);
VALIDATE_RANGE(height, 0, INT_MAX);
VALIDATE_ENUM(format);
VALIDATE_RANGE(framerate, 0, INT_MAX);
device->enable_stream(stream, width, height, format, framerate, RS_OUTPUT_BUFFER_FORMAT_CONTINUOUS);
}
示例12: rs_reset_device_options_to_default
void rs_reset_device_options_to_default(rs_device * device, const rs_option* options, int count, rs_error ** error) try
{
VALIDATE_NOT_NULL(device);
VALIDATE_RANGE(count, 0, INT_MAX);
VALIDATE_NOT_NULL(options);
for (int i = 0; i<count; ++i) VALIDATE_ENUM(options[i]);
std::vector<double> values;
for (int i = 0; i < count; ++i)
{
double def;
rs_get_device_option_range_ex(device, options[i], NULL, NULL, NULL, &def, 0);
values.push_back(def);
}
device->set_options(options, count, values.data());
}
示例13: rs_get_capabilities_name
const char * rs_get_capabilities_name(rs_capabilities capability, rs_error ** error) try
{
VALIDATE_ENUM(capability);
return rsimpl::get_string(capability);
}
示例14: rs_get_option_name
const char * rs_get_option_name(rs_option option, rs_error ** error) try
{
VALIDATE_ENUM(option);
return rsimpl::get_string(option);
}
示例15: rs_get_distortion_name
const char * rs_get_distortion_name(rs_distortion distortion, rs_error ** error) try
{
VALIDATE_ENUM(distortion);
return rsimpl::get_string(distortion);
}