示例#1
0
// function to mark the output dirty once one of the dynamic attributes changes
MStatus puttyNode::setDependentsDirty( const MPlug &plugBeingDirtied,	MPlugArray &affectedPlugs )
{
	if ( plugBeingDirtied.isDynamic()) 
    {
		MStatus	status;
		MObject thisNode = thisMObject();

		// there is a dynamic attribute that is is dirty, so mark 
        // the outputGeometry dirty

		if ( MStatus::kSuccess == status ) 
		{
//			cerr << "\n###" << plugBeingDirtied.name() <<" "<<output.name();

//			MPlug pB( thisNode, puttyNode::outputGeom );
//           affectedPlugs.append( pB );

			MPlug pD( thisNode, puttyNode::aDynDirty );
			pD.setValue(true);
    
//			affectedPlugs.append( output );

		}

	}
	return( MS::kSuccess );
}
示例#2
0
int main()
{
	{
	cout<<"---------------------"<<endl;
	my_shared_ptr<Base> p(new Base(5));
	my_shared_ptr<Base> p1(p);
	my_shared_ptr<Base> p2 = p1;
	}

	{
	cout<<"---------------------"<<endl;
	my_shared_ptr<Derived> pD(new Derived(5));
	(*pD).func();
	my_shared_ptr<Base> pB = pD;
	pB->func();
	my_shared_ptr<Derived> pD1 = dynamic_ptr_cast<Derived>(pB);
	pD1->func();
	}

	{
	cout<<"---------------------"<<endl;
	my_shared_ptr<Base> pB;
	if(!pB)
		cout<<"pB is nullptr"<<endl;
	//int i = pB;	//cannot
	BOOL_SUBST b = pB;	//虽然这样可以通过编译,但也造不成什么伤害了
	//cout<<i<<endl;
	}
}
示例#3
0
void PropertyTable::addProperty(const QString &name,
                                const QVariant &value,
                                const QVariant &defaultValue)
{
    Property pD(name, value, defaultValue);
    m_properties[name] = pD;
}