您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ ABCA_ASSERT函数代码示例

51自学网 2021-06-01 19:31:48
  C++
这篇教程C++ ABCA_ASSERT函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中ABCA_ASSERT函数的典型用法代码示例。如果您正苦于以下问题:C++ ABCA_ASSERT函数的具体用法?C++ ABCA_ASSERT怎么用?C++ ABCA_ASSERT使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了ABCA_ASSERT函数的21个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: ABCA_ASSERT

//-*****************************************************************************std::size_t XformSample::addOp( const XformOp &iOp ){    if ( ! m_hasBeenRead )    {        ABCA_ASSERT( m_setWithOpStack == 0 || m_setWithOpStack == 1,                     "Cannot mix addOp() and set<Foo>() methods." );        m_setWithOpStack = 1;        m_ops.push_back( iOp );        return m_ops.size() - 1;    }    else    {        std::size_t ret = m_opIndex;        ABCA_ASSERT( iOp.getType() == m_ops[ret].getType(),                     "Cannot update mismatched op-type in already-setted "                     << "XformSample!" );        ABCA_ASSERT( m_setWithOpStack == 1,                     "Cannot mix addOp() and set<Foo>() methods." );        m_ops[ret] = iOp;        m_opIndex = ++m_opIndex % m_ops.size();        return ret;    }}
开发者ID:EgoIncarnate,项目名称:appleseed,代码行数:31,


示例2: m_parent

//-*****************************************************************************CprImpl::CprImpl( AbcA::CompoundPropertyReaderPtr iParent,                  Ogawa::IGroupPtr iGroup,                  PropertyHeaderPtr iHeader,                  std::size_t iThreadId,                  const std::vector< AbcA::MetaData > & iIndexedMetaData )    : m_parent( iParent )    , m_header( iHeader ){    ABCA_ASSERT( m_parent, "Invalid parent in CprImpl(Compound)" );    ABCA_ASSERT( m_header, "invalid header in CprImpl(Compound)" );    AbcA::PropertyType pType = m_header->header.getPropertyType();    if ( pType != AbcA::kCompoundProperty )    {        ABCA_THROW( "Tried to create compound property with the wrong "                    "property type: " << pType );    }    // Set object.    AbcA::ObjectReaderPtr optr = m_parent->getObject();    ABCA_ASSERT( optr, "Invalid object in CprImpl::CprImpl(Compound)" );    m_object = optr;    m_data.reset( new CprData( iGroup, iThreadId, *( m_object->getArchive() ),                               iIndexedMetaData ) );}
开发者ID:AWhetter,项目名称:alembic,代码行数:27,


示例3: op

//-*****************************************************************************void XformSample::setZRotation( const double iAngleInDegrees ){    XformOp op( kRotateZOperation, kRotateHint );    op.setChannelValue( 0, iAngleInDegrees );    if ( ! m_hasBeenRead )    {        ABCA_ASSERT( m_setWithOpStack == 0 || m_setWithOpStack == 2,                     "Cannot mix addOp() and set<Foo>() methods." );        m_setWithOpStack = 2;        m_ops.push_back( op );    }    else    {        std::size_t ret = m_opIndex;        ABCA_ASSERT( m_setWithOpStack == 2,                     "Cannot mix addOp() and set<Foo>() methods." );        ABCA_ASSERT( op.getType() == m_ops[ret].getType(),                     "Cannot update mismatched op-type in already-setted "                     << "XformSample!" );        m_ops[ret] = op;        m_opIndex = ++m_opIndex % m_ops.size();    }}
开发者ID:EgoIncarnate,项目名称:appleseed,代码行数:31,


示例4: CopyWrittenArray

//-*****************************************************************************voidCopyWrittenArray( hid_t iGroup,                  const std::string &iName,                  WrittenArraySampleIDPtr iRef ){    ABCA_ASSERT( ( bool )iRef,                  "CopyWrittenArray() passed a bogus ref" );    hid_t fid = H5Iget_file_id(iGroup);    ABCA_ASSERT( fid >= 0,                "CopyWrittenArray() Could not get file ID from iGroup" );    hid_t did = H5Dopen( fid,        iRef->getObjectLocation().c_str(), H5P_DEFAULT );    DsetCloser dcloser(did);    // We have a reference. Create a link to it.    // We are manually getting the source dataset instead of using    // fid and iName because of a bug in HDF5 1.8.5 and earlier.    // Files written using that approach would sometimes be corrupted.    herr_t status = H5Lcreate_hard( did,                                    ".",                                    iGroup,                                    iName.c_str(),                                    H5P_DEFAULT,                                    H5P_DEFAULT );    H5Fclose( fid );    ABCA_ASSERT( status >= 0,                 "H5Lcreate_hard failed!" << std::endl                  << "Dset obj id: " << did << std::endl                  << "Link loc id: " << iGroup << std::endl                  << "Link name: " << iName );}
开发者ID:AWhetter,项目名称:alembic,代码行数:35,


示例5: ReadDataSetDimensions

//-*****************************************************************************// Get the dimensions directly off of the dataspace on the dataset// This isn't suitable for string and wstringvoidReadDataSetDimensions( hid_t iParent,                       const std::string &iName,                       hsize_t iExtent,                       Dimensions &oDims ){    // Open the data set.    hid_t dsetId = H5Dopen( iParent, iName.c_str(), H5P_DEFAULT );    ABCA_ASSERT( dsetId >= 0, "Cannot open dataset: " << iName );    DsetCloser dsetCloser( dsetId );    // Read the data space.    hid_t dspaceId = H5Dget_space( dsetId );    ABCA_ASSERT( dspaceId >= 0, "Could not get dataspace for dataSet: "                 << iName );    DspaceCloser dspaceCloser( dspaceId );    H5S_class_t dspaceClass = H5Sget_simple_extent_type( dspaceId );    if ( dspaceClass == H5S_SIMPLE )    {        // Get the dimensions        int rank = H5Sget_simple_extent_ndims( dspaceId );        ABCA_ASSERT( rank == 1, "H5Sget_simple_extent_ndims() must be 1." );        hsize_t hdim = 0;        rank = H5Sget_simple_extent_dims( dspaceId, &hdim, NULL );        oDims.setRank(1);        oDims[0] = hdim / iExtent;    }    else    {        oDims.setRank(1);        oDims[0] = 0;    }}
开发者ID:AWhetter,项目名称:alembic,代码行数:38,


示例6: WriteStringsT

voidWriteStringsT( hid_t iParent,               const std::string &iAttrName,               size_t iNumStrings,               const StringT *iStrings ){    // Validate    ABCA_ASSERT( iNumStrings > 0, "Degenerate num strings in WriteStringsT" );    ABCA_ASSERT( iStrings, "Degenerate strings buffer in WriteStringsT" );    // Compact the strings.    std::vector<CharT> charBuffer;    CompactStrings( iStrings, iNumStrings, charBuffer );    // Create the dataspace.    size_t len = charBuffer.size();    assert( len >= iNumStrings );    Dimensions dims( len );    HDimensions hdims( dims );    hid_t dspaceId = H5Screate_simple( hdims.rank(), hdims.rootPtr(), NULL );    DspaceCloser dspaceCloser( dspaceId );    ABCA_ASSERT( dspaceId >= 0,                 "WriteStringsT() Failed in dataspace constructor" );    // Create the attribute.    WriteDataToAttr( iParent, dspaceId, iAttrName,                     GetFileDtype<CharT>(), GetNativeDtype<CharT>(),                     ( const void * )&charBuffer.front() );    // That's it!}
开发者ID:AndyHuang7601,项目名称:EpicGames-UnrealEngine,代码行数:32,


示例7: BaseCpwImpl

//-*****************************************************************************// With the compound property writer as an input.CpwImpl::CpwImpl( AbcA::CompoundPropertyWriterPtr iParent,                  hid_t iParentGroup,                  const std::string & iName,                  const AbcA::MetaData & iMeta )  : BaseCpwImpl( iParentGroup )  , m_parent( iParent )  , m_header( new AbcA::PropertyHeader(iName, iMeta) ){    // Check the validity of all inputs.    ABCA_ASSERT( m_parent, "Invalid parent" );    ABCA_ASSERT( m_header, "Invalid property header" );    if ( m_header->getPropertyType() != AbcA::kCompoundProperty )    {        ABCA_THROW( "Tried to create compound property with the wrong "                     "property type: " << m_header->getPropertyType() );    }    // Set the object.    AbcA::ObjectWriterPtr optr = m_parent->getObject();    ABCA_ASSERT( optr, "Invalid object" );    m_object = optr;    // Write the property header.    WritePropertyInfo( iParentGroup, m_header->getName(),        m_header->getPropertyType(), m_header->getDataType(),        false, 0, 0, 0, 0 );    WriteMetaData( iParentGroup, m_header->getName() + ".meta",        m_header->getMetaData() );}
开发者ID:EgoIncarnate,项目名称:appleseed,代码行数:33,


示例8: BaseCpwImpl

//-*****************************************************************************// With the compound property writer as an input.CpwImpl::CpwImpl( AbcA::CompoundPropertyWriterPtr iParent,                  hid_t iParentGroup,                  PropertyHeaderPtr iHeader )  : BaseCpwImpl( iParentGroup )  , m_parent( iParent )  , m_header( iHeader ){    // Check the validity of all inputs.    ABCA_ASSERT( m_parent, "Invalid parent" );    ABCA_ASSERT( m_header, "Invalid property header" );    if ( m_header->getPropertyType() != AbcA::kCompoundProperty )    {        ABCA_THROW( "Tried to create compound property with the wrong "                     "property type: " << m_header->getPropertyType() );    }    // Set the object.    AbcA::ObjectWriterPtr optr = m_parent->getObject();    ABCA_ASSERT( optr, "Invalid object" );    m_object = optr;    // Write the property header.    WritePropertyHeaderExceptTime( iParentGroup,                                   m_header->getName(),                                   *m_header );}
开发者ID:ryutaro765,项目名称:Alembic,代码行数:29,


示例9: m_object

//-*****************************************************************************CprImpl::CprImpl( AbcA::ObjectReaderPtr iObject,                  CprDataPtr iData )    : m_object( iObject )    , m_data( iData ){    ABCA_ASSERT( m_object, "Invalid object in CprImpl(Object)" );    ABCA_ASSERT( m_data, "Invalid data in CprImpl(Object)" );    m_header.reset( new AbcA::PropertyHeader( "",  m_object->getMetaData() ) );}
开发者ID:AWhetter,项目名称:alembic,代码行数:11,


示例10: m_fileName

//-*****************************************************************************// SCENE CLASS//-*****************************************************************************Scene::Scene( const std::string &fileName, bool verbose )  : m_fileName( fileName )  , m_minTime( ( chrono_t )FLT_MAX )  , m_maxTime( ( chrono_t )-FLT_MAX ){    Timer playbackTimer;    Alembic::AbcCoreFactory::IFactory factory;    m_archive = factory.getArchive( fileName );    m_topObject = IObject( m_archive, kTop );    if ( verbose )        std::cout << "Opened archive and top object, creating drawables."                  << std::endl;    m_drawable.reset( new IObjectDrw( m_topObject, false ) );    ABCA_ASSERT( m_drawable->valid(),                 "Invalid drawable for archive: " << fileName );    if ( verbose )        std::cout << "Created drawables, getting time range." << std::endl;        m_minTime = m_drawable->getMinTime();    m_maxTime = m_drawable->getMaxTime();    if ( m_minTime <= m_maxTime ) {        if ( verbose )            std::cout << "/nMin Time: " << m_minTime << " seconds " << std::endl                      << "Max Time: " << m_maxTime << " seconds " << std::endl                      << "/nLoading min time." << std::endl;        m_drawable->setTime( m_minTime );    }    else {        if ( verbose )            std::cout << "/nConstant Time." << std::endl                      << "/nLoading constant sample." << std::endl;        m_minTime = m_maxTime = 0.0;        m_drawable->setTime( 0.0 );    }    ABCA_ASSERT( m_drawable->valid(),                 "Invalid drawable after reading start time" );    if ( verbose )        std::cout << "Done opening archive. Elapsed CPU time: "                  << ((float)playbackTimer.elapsed()) / CLOCKS_PER_SEC << " seconds." << std::endl;    // Bounds have been formed!    m_bounds = m_drawable->getBounds();        if ( verbose )        std::cout << "Bounds at min time: " << m_bounds.min << " to "                  << m_bounds.max << std::endl;}
开发者ID:hallLong,项目名称:bb_alembic,代码行数:58,


示例11: m_archive

OwImpl::OwImpl( AbcA::ArchiveWriterPtr iArchive,                OwDataPtr iData,                const AbcA::MetaData & iMetaData )    : m_archive( iArchive )    , m_header( new AbcA::ObjectHeader( "ABC", "/", iMetaData ) )    , m_data( iData )    , m_index( 0 ){    ABCA_ASSERT( m_archive, "Invalid archive" );    ABCA_ASSERT( m_data, "Invalid data" );}
开发者ID:AWhetter,项目名称:alembic,代码行数:11,


示例12: m_children

//-*****************************************************************************OrData::OrData( ObjectHeaderPtr iHeader,                H5Node & iParentGroup,                int32_t iArchiveVersion )    : m_children( NULL ){    ABCA_ASSERT( iHeader, "Invalid header" );    ABCA_ASSERT( iParentGroup.isValidObject(), "Invalid group" );    m_group = OpenGroup( iParentGroup, iHeader->getName().c_str() );    ABCA_ASSERT( m_group.isValidObject(),        "Could not open object group: "        << iHeader->getFullName() );    std::vector<std::string> objNames;    herr_t status = H5Literate( m_group.getObject(),                                H5_INDEX_CRT_ORDER,                                H5_ITER_INC,                                NULL,                                VisitAllLinksCB,                                ( void * )&objNames );    ABCA_ASSERT( status >= 0,                 "OrData::OrData: H5Literate failed" );    std::vector < std::string >::iterator namesIt;    uint32_t i = 0;    if ( !objNames.empty() )    {        m_children = new Child[ objNames.size() ];    }    std::string parentFullName = iHeader->getFullName();    if ( parentFullName != "/" )    {        parentFullName += "/";    }    for ( namesIt = objNames.begin(); namesIt != objNames.end();          ++namesIt, ++i )    {        m_childrenMap[ *namesIt ] = i;        m_children[i].header.reset( new AbcA::ObjectHeader( *namesIt,            parentFullName + *namesIt, AbcA::MetaData() ) );        m_children[i].loadedMetaData = false;    }    m_oldGroup = m_group;    m_data = Alembic::Util::shared_ptr<CprData>(        new CprData( m_group, iArchiveVersion, ".prop" ) );}
开发者ID:AWhetter,项目名称:alembic,代码行数:55,


示例13: m_archive

//-*****************************************************************************ArImpl::ArImpl( const std::vector< std::istream * > & iStreams )  : m_archive( iStreams )  , m_header( new AbcA::ObjectHeader() )  , m_manager( iStreams.size() ){    ABCA_ASSERT( m_archive.isValid(),                 "Could not open as Ogawa file from provided streams." );    ABCA_ASSERT( m_archive.isFrozen(),        "Ogawa streams not cleanly closed while being written. " );    init();}
开发者ID:alembic,项目名称:alembic,代码行数:14,


示例14: m_fileName

//-*****************************************************************************ArImpl::ArImpl( const std::string &iFileName,                std::size_t iNumStreams )  : m_fileName( iFileName )  , m_archive( iFileName, iNumStreams )  , m_header( new AbcA::ObjectHeader() )  , m_manager( iNumStreams ){    ABCA_ASSERT( m_archive.isValid(),                 "Could not open as Ogawa file: " << m_fileName );    ABCA_ASSERT( m_archive.isFrozen(),        "Ogawa file not cleanly closed while being written: " << m_fileName );    init();}
开发者ID:BlackGinger,项目名称:ExocortexCrate,代码行数:16,


示例15: ReadTimeSamples

//-*****************************************************************************voidReadTimeSamples( hid_t iParent,                 std::vector <  AbcA::TimeSamplingPtr > & oTimeSamples ){    oTimeSamples.clear();    // add the intrinsic default sampling    AbcA::TimeSamplingPtr ts( new AbcA::TimeSampling() );    oTimeSamples.push_back( ts );    uint32_t i = 1;    AbcA::TimeSamplingType tst;    std::string tstname = "1";    // keep trying to read till we can't find anymore    while ( ReadTimeSamplingType( iParent, tstname, tst ) )    {        // try to open the time samples attribute        std::string timeName = tstname + ".time";        hid_t aid = H5Aopen( iParent, timeName.c_str(), H5P_DEFAULT );        ABCA_ASSERT( aid >= 0,                     "Couldn't open time samples named: " << timeName );        AttrCloser attrCloser( aid );        // figure out how big it is        hid_t sid = H5Aget_space( aid );        ABCA_ASSERT( sid >= 0,                     "Couldn't get dataspace for time samples: " << timeName );        DspaceCloser dspaceCloser( sid );        hssize_t numPoints = H5Sget_simple_extent_npoints( sid );        ABCA_ASSERT( numPoints > 0, "No time samples data: " << timeName );        std::vector < chrono_t > times(numPoints);        // do the read        herr_t status = H5Aread( aid, H5T_NATIVE_DOUBLE, &(times.front()) );        ABCA_ASSERT( status >= 0, "Can't read time samples: " << timeName );        // create the TimeSampling and add it to our vector        ts.reset( new AbcA::TimeSampling(tst, times) );        oTimeSamples.push_back( ts );        // increment to try and read the next one        i++;        std::stringstream strm;        strm << i;        tstname = strm.str();    }}
开发者ID:AWhetter,项目名称:alembic,代码行数:49,


示例16: ABCA_ASSERT

//-*****************************************************************************AbcA::TimeSamplingPtr ArImpl::getTimeSampling( Util::uint32_t iIndex ){    ABCA_ASSERT( iIndex < m_timeSamples.size(),        "Invalid index provided to getTimeSampling." );    return m_timeSamples[iIndex];}
开发者ID:alembic,项目名称:alembic,代码行数:8,


示例17: getDatatypeArrayDims

//-*****************************************************************************static void getDatatypeArrayDims( hid_t iDtype, Dimensions &dims ){    ABCA_ASSERT( iDtype >= 0, "Invalid datatype in getDatatypeArrayDims" );        int ndims = H5Tget_array_ndims( iDtype );    ABCA_ASSERT( ndims > 0,                  "getDatatypeArrayDims() H5Tget_array_ndims failed" );    HDimensions hdims( ( size_t )ndims );    ndims = H5Tget_array_dims2( iDtype, hdims.rootPtr() );    ABCA_ASSERT( ndims > 0,                  "getDatatypeArrayDims() H5Tget_array_dims failed" );    ABCA_ASSERT( ndims == hdims.rank(),                  "getDatatypeArrayDims() inconsistent ranks" );    dims = hdims;}
开发者ID:ryutaro765,项目名称:Alembic,代码行数:17,


示例18: GetWrittenArraySampleMap

//-*****************************************************************************WrittenArraySampleMap &GetWrittenArraySampleMap( AbcA::ArchiveWriterPtr iVal ){    AwImpl *ptr = dynamic_cast<AwImpl*>( iVal.get() );    ABCA_ASSERT( ptr, "NULL Impl Ptr" );    return ptr->getWrittenArraySampleMap();}
开发者ID:AWhetter,项目名称:alembic,代码行数:8,


示例19: ALEMBIC_ABC_SAFE_CALL_BEGIN

//-*****************************************************************************IFaceSetIPolyMeshSchema::getFaceSet ( const std::string &iFaceSetName ){    ALEMBIC_ABC_SAFE_CALL_BEGIN( "IPolyMeshSchema::getFaceSet()" );    boost::mutex::scoped_lock l(m_faceSetsMutex);    if (!m_faceSetsLoaded)    {        loadFaceSetNames();    }    ABCA_ASSERT( m_faceSets.find (iFaceSetName) != m_faceSets.end (),        "The requested FaceSet name can't be found in PolyMesh.");    if (!m_faceSets [iFaceSetName])    {        // We haven't yet loaded the faceSet, so create/load it        m_faceSets [iFaceSetName] = IFaceSet ( this->getParent().getObject(),                                               iFaceSetName );    }    return m_faceSets [iFaceSetName];    ALEMBIC_ABC_SAFE_CALL_END();    IFaceSet emptyFaceSet;    return emptyFaceSet;}
开发者ID:EgoIncarnate,项目名称:appleseed,代码行数:28,


示例20: ALEMBIC_ABC_SAFE_CALL_BEGIN

//-*****************************************************************************IFaceSetISubDSchema::getFaceSet( const std::string &iFaceSetName ){    ALEMBIC_ABC_SAFE_CALL_BEGIN( "ISubDSchema::getFaceSet()" );    Alembic::Util::scoped_lock l(m_faceSetsMutex);    if (!m_faceSetsLoaded)    {        loadFaceSetNames();    }    ABCA_ASSERT( m_faceSets.find (iFaceSetName) != m_faceSets.end (),        "The requested FaceSet name can't be found in SubD.");    if (!m_faceSets [iFaceSetName])    {        // We haven't yet loaded the faceSet, so create/load it        m_faceSets [iFaceSetName] = IFaceSet ( getObject(), iFaceSetName );    }    return m_faceSets [iFaceSetName];    ALEMBIC_ABC_SAFE_CALL_END();    IFaceSet empty;    return empty;}
开发者ID:jonntd,项目名称:ExocortexCrate,代码行数:27,


示例21: ABCA_ASSERT

//-*****************************************************************************void XformOp::setTranslate( const Abc::V3d &iTrans ){    ABCA_ASSERT( m_type == kTranslateOperation,                 "Meaningless to set translate on non-translate op." );    this->setVector( iTrans );}
开发者ID:Vertexwahn,项目名称:appleseed-deps,代码行数:8,



注:本文中的ABCA_ASSERT函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ ABC_CHECK函数代码示例
C++ AB函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。