Exemplo n.º 1
0
//-------------------------------------------------------------------------------------
void ArrayDescription::addPersistentToStream(MemoryStream* mstream, PyObject* pyValue)
{
	// 允许使用默认值来创建一个流
	if(pyValue == NULL)
	{
		pyValue = newDefaultVal();
		static_cast<FixedArrayType*>(dataType_)->addToStreamEx(mstream, pyValue, true);
		Py_DECREF(pyValue);
		return;
	}

	static_cast<FixedArrayType*>(dataType_)->addToStreamEx(mstream, pyValue, true);
}
Exemplo n.º 2
0
//-------------------------------------------------------------------------------------
void ArrayDescription::addPersistentToStream(MemoryStream* mstream, PyObject* pyValue)
{
	// Allow default values are used to create a stream
	if(pyValue == NULL)
	{
		pyValue = newDefaultVal();
		static_cast<FixedArrayType*>(dataType_)->addToStreamEx(mstream, pyValue, true);
		Py_DECREF(pyValue);
		return;
	}

	static_cast<FixedArrayType*>(dataType_)->addToStreamEx(mstream, pyValue, true);
}
Exemplo n.º 3
0
//-------------------------------------------------------------------------------------
void PropertyDescription::addPersistentToStream(MemoryStream* mstream, PyObject* pyValue)
{
	// 允许使用默认值来创建一个流
	if(pyValue == NULL)
	{
		pyValue = newDefaultVal();
		dataType_->addToStream(mstream, pyValue);
		Py_DECREF(pyValue);
		return;
	}

	dataType_->addToStream(mstream, pyValue);
}
Exemplo n.º 4
0
//-------------------------------------------------------------------------------------
void PropertyDescription::addPersistentToStream(MemoryStream* mstream, PyObject* pyValue)
{
	// Allow default values are used to create a stream
	if(pyValue == NULL)
	{
		pyValue = newDefaultVal();
		dataType_->addToStream(mstream, pyValue);
		Py_DECREF(pyValue);
		return;
	}

	dataType_->addToStream(mstream, pyValue);
}