本文整理汇总了C++中gem::Properties::clear方法的典型用法代码示例。如果您正苦于以下问题:C++ Properties::clear方法的具体用法?C++ Properties::clear怎么用?C++ Properties::clear使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gem::Properties
的用法示例。
在下文中一共展示了Properties::clear方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: enumProperties
bool imageBase :: enumProperties(gem::Properties&readable,
gem::Properties&writeable)
{
readable.clear();
writeable.clear();
return false;
}
示例2: enumProperties
bool videoUNICAP :: enumProperties(gem::Properties&readable,
gem::Properties&writeable) {
readable.clear();
writeable.clear();
if(m_handle) {
int count=0;
unicap_status_t status= unicap_reenumerate_properties(m_handle, &count );
if(!SUCCESS(status))
return false;
int id=0;
for(id=0; id<count; id++) {
unicap_property_t prop;
gem::any typ;
status = unicap_enumerate_properties(m_handle, NULL, &prop, id);
if(!SUCCESS(status))
continue;
debugPost("id='%s'\tcat='%s'\tunit='%s'\tflags=%d",
prop.identifier,
prop.category,
prop.unit,
prop.flags);
switch(prop.type) {
case UNICAP_PROPERTY_TYPE_RANGE:
debugPost("range %f-%f", prop.range.min, prop.range.min);
typ=prop.range.max;
break;
case UNICAP_PROPERTY_TYPE_VALUE_LIST:
debugPost("value_list %d", prop.value_list.value_count);
typ=prop.value_list.value_count;
break;
case UNICAP_PROPERTY_TYPE_MENU:
debugPost("menu '%s' of %d", prop.menu_item, prop.menu.menu_item_count);
typ=std::string(prop.menu_item);//prop.menu.menu_item_count;
break;
case UNICAP_PROPERTY_TYPE_FLAGS:
debugPost("flags");
break;
default:
debugPost("unknown");
// ?
break;
}
readable.set(prop.identifier, typ);
if(!(prop.flags & UNICAP_FLAGS_READ_ONLY))
writeable.set(prop.identifier, typ);
#warning check UNICAP_FLAGS_ON_OFF & UNICAP_FLAGS_ONE_PUSH
}
}
return true;
}
示例3: enumProperties
bool videoVFW :: enumProperties(gem::Properties&readable, gem::Properties&writeable) {
readable.clear();
writeable.clear();
gem::any type=0;
writeable.set("width", type);
writeable.set("height", type);
return true;
}
示例4: enumProperties
bool videoVLC::enumProperties(gem::Properties&readable,
gem::Properties&writeable)
{
readable.clear();
writeable.clear();
writeable.set("width", m_pixBlock.image.xsize);
readable.set("width", m_pixBlock.image.xsize);
writeable.set("height", m_pixBlock.image.ysize);
readable.set("height", m_pixBlock.image.ysize);
return false;
}
示例5: enumProperties
bool videoTEST::enumProperties(gem::Properties&readable,
gem::Properties&writeable) {
readable.clear();
writeable.clear();
writeable.set("width", 64); readable.set("width", 64);
writeable.set("height", 64); readable.set("height", 64);
writeable.set("type", std::string("noise"));
return true;
}
示例6: enumProperties
bool filmTEST::enumProperties(gem::Properties&readprops, gem::Properties&writeprops) {
readprops.clear();
writeprops.clear();
double d=0;
readprops.set("width", d);
readprops.set("height", d);
readprops.set("fps", d);
readprops.set("frames", d);
return true;
}
示例7: enumProperties
///////////////////////////////
// Properties
bool filmAVIPLAY::enumProperties(gem::Properties&readable,
gem::Properties&writeable) {
readable.clear();
writeable.clear();
gem::any value;
value=0.;
readable.set("fps", value);
readable.set("frames", value);
readable.set("width", value);
readable.set("height", value);
return false;
}
示例8: enumProperties
virtual bool enumProperties(gem::Properties&readable,
gem::Properties&writeable) {
// LATER: shouldn't we merge properties of all handles?
#ifdef __GNUC__
# warning enumProperties stub
#endif
readable.clear();
writeable.clear();
if(m_handle)
return m_handle->enumProperties(readable, writeable);
return false;
}
示例9: initParameters_
bool initParameters_(void) {
m_parameterNames.clear();
m_parameter.clear();
unsigned int count=getNumParameters_();
unsigned int i;
m_parameterNames.push_back(""); // dummy parameter
for(i=0; i<count; i++) {
std::string name=getParameterName_(i);
FFUInt32 type = getParameterType_ (i);
FFMixed def = getParameterDefault_(i);
gem::any val;
switch(type) {
case FF_TYPE_EVENT:
//?
break;
case FF_TYPE_TEXT:
val = std::string(reinterpret_cast<const char*>(def.PointerValue));
break;
default:
val = def.FloatValue;
}
std::cout << "param#"<<i<<": "<<name<<std::endl;
m_parameterNames.push_back(name);
m_parameter.set(name, val);
}
return true;
}
示例10:
///////////////////////////////
// Properties
bool filmQT4L::enumProperties(gem::Properties&readable,
gem::Properties&writeable) {
readable.clear();
writeable.clear();
gem::any value;
value=0.;
readable.set("fps", value);
readable.set("frames", value);
readable.set("tracks", value);
readable.set("width", value);
readable.set("height", value);
writeable.set("colorspace", value);
return false;
}
示例11: enumProperties
bool videoDECKLINK::enumProperties(gem::Properties&readable,
gem::Properties&writeable)
{
std::string dummy_s;
int dummy_i=0;
readable.clear();
writeable.clear();
readable.set("width", m_pixBlock.image.xsize);
readable.set("height", m_pixBlock.image.ysize);
dummy_s="auto";
writeable.set("format", dummy_s);
writeable.set("connection", dummy_s);
return true;
}
示例12: getProperties
void videoOptiTrack::getProperties(gem::Properties&props)
{
std::vector<std::string>keys=props.keys();
double d;
std::string s;
props.clear();
if(!m_camera) {
return;
}
unsigned int i;
for(i=0; i<keys.size(); i++) {
const std::string key=keys[i];
if("width"==key) {
props.set(key, m_pixBlock.image.xsize);
continue;
}
if("height"==key) {
props.set(key, m_pixBlock.image.ysize);
continue;
}
if("fanspeed"==key && m_camera->IsCameraFanSpeedValid()) {
d=m_camera->CameraFanSpeed();
props.set(key, d);
continue;
}
if("temperature"==key && m_camera->IsCameraTempValid()) {
d=m_camera->CameraTemp();
props.set(key, d);
continue;
}
#define GETCAMERAPROP_BOOL(name) if(#name == key) {d=m_camera->##name(); props.set(key, d); continue; } else d=0
#define GETCAMERAPROP_INT(name) if(#name == key) {d=m_camera->##name(); props.set(key, d); continue; } else d=0
#define GETCAMERAPROP_STR(name) if(#name == key) {s=m_camera->##name(); props.set(key, s); continue; } else d=0
GETCAMERAPROP_BOOL(AEC);
GETCAMERAPROP_BOOL(AGC);
GETCAMERAPROP_BOOL(ContinuousIR);
GETCAMERAPROP_BOOL(HighPowerMode);
GETCAMERAPROP_BOOL(IRFilter);
GETCAMERAPROP_BOOL(MarkerOverlay);
GETCAMERAPROP_BOOL(TextOverlay);
GETCAMERAPROP_INT(Exposure);
GETCAMERAPROP_INT(FrameDecimation);
GETCAMERAPROP_INT(FrameRate);
GETCAMERAPROP_INT(GrayscaleDecimation);
GETCAMERAPROP_INT(Intensity);
GETCAMERAPROP_INT(PrecisionCap);
GETCAMERAPROP_INT(ShutterDelay);
GETCAMERAPROP_INT(Threshold);
GETCAMERAPROP_STR(Name);
#undef GETCAMERAPROP_BOOL
#undef GETCAMERAPROP_INT
#undef GETCAMERAPROP_STR
}
}
示例13: getWriteCapabilities
void imageMAGICK::getWriteCapabilities(std::vector<std::string>&mimetypes, gem::Properties&props) {
mimetypes.clear();
props.clear();
mimetypes = m_mimetypes;
gem::any value;
value=100.f;
props.set("quality", value);
}
示例14: getWriteCapabilities
void imageJPEG::getWriteCapabilities(std::vector<std::string>&mimetypes, gem::Properties&props) {
mimetypes.clear();
props.clear();
mimetypes.push_back("image/jpeg");
mimetypes.push_back("image/pjpeg");
gem::any value;
value=100.f;
props.set("quality", value);
}
示例15: getWriteCapabilities
void imageQT::getWriteCapabilities(std::vector<std::string>&mimetypes, gem::Properties&props) {
mimetypes.clear();
props.clear();
std::map<std::string, OSType>::iterator it;
for(it = s_mime2type.begin(); it!=s_mime2type.end(); ++it) {
mimetypes.push_back(it->first);
}
gem::any value;
value=100.f;
props.set("quality", value);
}