本文整理汇总了C++中rc::ConstHandle::getAllocSize方法的典型用法代码示例。如果您正苦于以下问题:C++ ConstHandle::getAllocSize方法的具体用法?C++ ConstHandle::getAllocSize怎么用?C++ ConstHandle::getAllocSize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类rc::ConstHandle
的用法示例。
在下文中一共展示了ConstHandle::getAllocSize方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ArrayImpl
SlicedArrayImpl::SlicedArrayImpl( std::string const &codeName, RC::ConstHandle<Impl> const &memberImpl )
: ArrayImpl( codeName, DT_SLICED_ARRAY, memberImpl )
, m_memberImpl( memberImpl )
, m_memberSize( memberImpl->getAllocSize() )
, m_variableArrayImpl( memberImpl->getVariableArrayImpl() )
{
setSize( sizeof(bits_t) );
}
示例2: sizeof
DictImpl::DictImpl(
std::string const &codeName,
RC::ConstHandle<ComparableImpl> const &keyImpl,
RC::ConstHandle<Impl> const &valueImpl
)
: m_keyImpl( keyImpl )
, m_keySize( keyImpl->getAllocSize() )
, m_valueImpl( valueImpl )
, m_valueSize( valueImpl->getAllocSize() )
, m_nodeSize( sizeof(node_t) + m_keySize + m_valueSize )
{
size_t flags = 0;
if ( keyImpl->isNoAliasUnsafe() || valueImpl->isNoAliasUnsafe() )
flags |= FlagNoAliasUnsafe;
if ( m_keyImpl->isExportable() && m_valueImpl->isExportable() )
flags |= FlagExportable;
initialize( codeName, DT_DICT, sizeof(bits_t *), flags );
}
示例3: alloca
void ArrayProducer::ComputeState::produceJSON( size_t index, JSON::Encoder &jg ) const
{
RC::ConstHandle<RT::Desc> elementDesc = m_arrayProducer->getElementDesc();
size_t allocSize = elementDesc->getAllocSize();
void *valueData = alloca( allocSize );
memset( valueData, 0, allocSize );
produce( index, valueData );
elementDesc->encodeJSON( valueData, jg );
elementDesc->disposeData( valueData );
}
示例4: isEquivalentTo
bool OpaqueImpl::isEquivalentTo( RC::ConstHandle<Impl> const &impl ) const
{
if ( !isOpaque( impl->getType() ) )
return false;
return getAllocSize() == impl->getAllocSize();
}