本文整理汇总了C++中StyleBaseImpl::refCount方法的典型用法代码示例。如果您正苦于以下问题:C++ StyleBaseImpl::refCount方法的具体用法?C++ StyleBaseImpl::refCount怎么用?C++ StyleBaseImpl::refCount使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StyleBaseImpl
的用法示例。
在下文中一共展示了StyleBaseImpl::refCount方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: deleteRule
void CSSStyleSheetImpl::deleteRule(unsigned long index, int &exceptioncode)
{
exceptioncode = 0;
if (index + 1 > (unsigned) m_lstChildren->count()) {
exceptioncode = DOMException::INDEX_SIZE_ERR;
return;
}
StyleBaseImpl *b = m_lstChildren->takeAt(index);
if (b->isRule() && static_cast<CSSRuleImpl *>(b)->type() == DOM::CSSRule::NAMESPACE_RULE) {
dirtyNamespaceInfo();
if (static_cast<CSSNamespaceRuleImpl *>(b)->isDefault()) {
recomputeNamespaceInfo(); // default may have changed
}
// ### too late for some rules?
}
// TreeShared requires delete not deref when removed from tree
b->setParent(0);
if (!b->refCount()) {
delete b;
}
if (m_doc) {
m_doc->updateStyleSelector(true /*shallow*/);
}
}
示例2:
StyleListImpl::~StyleListImpl()
{
StyleBaseImpl *n;
if(!m_lstChildren) return;
for( n = m_lstChildren->first(); n != 0; n = m_lstChildren->next() )
{
n->setParent(0);
if( !n->refCount() ) delete n;
}
delete m_lstChildren;
}
示例3: it
StyleListImpl::~StyleListImpl()
{
StyleBaseImpl *n;
if(!m_lstChildren) return;
QListIterator<StyleBaseImpl*> it( *m_lstChildren );
while ( it.hasNext() )
{
n = it.next();
n->setParent(0);
if( !n->refCount() ) delete n;
}
delete m_lstChildren;
}