本文整理汇总了C++中Transformer::Archive方法的典型用法代码示例。如果您正苦于以下问题:C++ Transformer::Archive方法的具体用法?C++ Transformer::Archive怎么用?C++ Transformer::Archive使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Transformer
的用法示例。
在下文中一共展示了Transformer::Archive方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CountTransformers
// Archive
status_t
Shape::Archive(BMessage* into, bool deep) const
{
status_t ret = IconObject::Archive(into, deep);
// transformers
if (ret == B_OK) {
int32 count = CountTransformers();
for (int32 i = 0; i < count; i++) {
Transformer* transformer = TransformerAtFast(i);
BMessage transformerArchive;
ret = transformer->Archive(&transformerArchive);
if (ret == B_OK)
ret = into->AddMessage("transformer", &transformerArchive);
if (ret < B_OK)
break;
}
}
// transformation
if (ret == B_OK) {
int32 size = Transformable::matrix_size;
double matrix[size];
StoreTo(matrix);
ret = into->AddData("transformation", B_DOUBLE_TYPE,
matrix, size * sizeof(double));
}
// hinting
if (ret ==B_OK)
ret = into->AddBool("hinting", fHinting);
// min visibility scale
if (ret ==B_OK)
ret = into->AddFloat("min visibility scale",
fMinVisibilityScale);
// max visibility scale
if (ret ==B_OK)
ret = into->AddFloat("max visibility scale",
fMaxVisibilityScale);
return ret;
}