本文整理汇总了C++中PropertyNameList::insert方法的典型用法代码示例。如果您正苦于以下问题:C++ PropertyNameList::insert方法的具体用法?C++ PropertyNameList::insert怎么用?C++ PropertyNameList::insert使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PropertyNameList
的用法示例。
在下文中一共展示了PropertyNameList::insert方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetDefinedProperties
// Returns the list of properties this element definition defines for an element with the given set of pseudo-classes.
void ElementDefinition::GetDefinedProperties(PropertyNameList& property_names, const PseudoClassList& pseudo_classes) const
{
for (PropertyMap::const_iterator i = properties.GetProperties().begin(); i != properties.GetProperties().end(); ++i)
property_names.insert((*i).first);
for (PseudoClassPropertyDictionary::const_iterator i = pseudo_class_properties.begin(); i != pseudo_class_properties.end(); ++i)
{
// If this property is already in the default dictionary, don't bother checking for it here.
if (property_names.find((*i).first) != property_names.end())
continue;
const PseudoClassPropertyList& property_list = (*i).second;
// Search through all the pseudo-class combinations that have a definition for this property; if the calling
// element matches at least one of them, then add it to the list.
bool property_defined = false;
for (size_t j = 0; j < property_list.size(); ++j)
{
if (IsPseudoClassRuleApplicable(property_list[j].first, pseudo_classes))
{
property_defined = true;
break;
}
}
if (property_defined)
property_names.insert((*i).first);
}
}
示例2: DirtyProperty
// Sets a single property as dirty.
void ElementStyle::DirtyProperty(const String& property)
{
PropertyNameList properties;
properties.insert(String(property));
DirtyProperties(properties);
}