本文整理汇总了C++中AutoPtr函数的典型用法代码示例。如果您正苦于以下问题:C++ AutoPtr函数的具体用法?C++ AutoPtr怎么用?C++ AutoPtr使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了AutoPtr函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AutoPtr
LangAltValue::AutoPtr LangAltValue::clone() const
{
return AutoPtr(clone_());
}
示例2: switch
Value::AutoPtr Value::create(TypeId typeId)
{
AutoPtr value;
switch (typeId) {
case invalidTypeId:
case signedByte:
case unsignedByte:
value = AutoPtr(new DataValue(typeId));
break;
case asciiString:
value = AutoPtr(new AsciiValue);
break;
case unsignedShort:
value = AutoPtr(new ValueType<uint16_t>);
break;
case unsignedLong:
case tiffIfd:
value = AutoPtr(new ValueType<uint32_t>(typeId));
break;
case unsignedRational:
value = AutoPtr(new ValueType<URational>);
break;
case undefined:
value = AutoPtr(new DataValue);
break;
case signedShort:
value = AutoPtr(new ValueType<int16_t>);
break;
case signedLong:
value = AutoPtr(new ValueType<int32_t>);
break;
case signedRational:
value = AutoPtr(new ValueType<Rational>);
break;
case tiffFloat:
value = AutoPtr(new ValueType<float>);
break;
case tiffDouble:
value = AutoPtr(new ValueType<double>);
break;
case string:
value = AutoPtr(new StringValue);
break;
case date:
value = AutoPtr(new DateValue);
break;
case time:
value = AutoPtr(new TimeValue);
break;
case comment:
value = AutoPtr(new CommentValue);
break;
case xmpText:
value = AutoPtr(new XmpTextValue);
break;
case xmpBag:
case xmpSeq:
case xmpAlt:
value = AutoPtr(new XmpArrayValue(typeId));
break;
case langAlt:
value = AutoPtr(new LangAltValue);
break;
default:
value = AutoPtr(new DataValue(typeId));
break;
}
return value;
} // Value::create
示例3: AutoPtr
Key::AutoPtr Key::clone() const
{
return AutoPtr(clone_());
}
示例4: AutoPtr
FujiMakerNote::AutoPtr FujiMakerNote::clone() const
{
return AutoPtr(clone_());
}
示例5: AutoPtr
FujiMakerNote::AutoPtr FujiMakerNote::clone(bool alloc) const
{
return AutoPtr(clone_(alloc));
}