예제 #1
0
ConstArray::ConstArray(
    RC::ConstHandle<RT::Manager> const &rtManager,
    RC::ConstHandle<RT::ArrayDesc> const &arrayDesc,
    void const *data
)
{

    RC::ConstHandle<RT::Desc> elementDesc = arrayDesc->getMemberDesc();
    size_t count = arrayDesc->getNumMembers( data );

    m_fixedArrayDesc = rtManager->getFixedArrayOf( elementDesc, count );
    m_data.resize( m_fixedArrayDesc->getAllocSize(), 0 );
    for ( size_t i=0; i<count; ++i )
        elementDesc->setData( arrayDesc->getImmutableMemberData( data, i ), m_fixedArrayDesc->getMutableMemberData( &m_data[0], i ) );
}
예제 #2
0
 ArrayAdapter::ArrayAdapter( RC::ConstHandle<Manager> const &manager, RC::ConstHandle<RT::ArrayDesc> const &arrayDesc, Flags flags )
   : Adapter( manager, arrayDesc, flags )
   , m_arrayDesc( arrayDesc )
   , m_memberAdapter( manager->getAdapter( arrayDesc->getMemberDesc() ) )
 {
 }