当前位置: 首页>>代码示例>>C++>>正文


C++ FileInputStream::HasMeasureWithinEditoMarkup方法代码示例

本文整理汇总了C++中FileInputStream::HasMeasureWithinEditoMarkup方法的典型用法代码示例。如果您正苦于以下问题:C++ FileInputStream::HasMeasureWithinEditoMarkup方法的具体用法?C++ FileInputStream::HasMeasureWithinEditoMarkup怎么用?C++ FileInputStream::HasMeasureWithinEditoMarkup使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FileInputStream的用法示例。


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

示例1: LoadString

bool Toolkit::LoadString( const std::string &data )
{
    FileInputStream *input = NULL;
    if (m_format == pae_file) {
        input = new PaeInput( &m_doc, "" );
    } else if (m_format == darms_file) {
        input = new DarmsInput( &m_doc, "" );
    } else if (m_format == humdrum_file) {
        input = new HumdrumInput( &m_doc, "" );
    } else if (m_format == mei_file) {
        input = new MeiInput( &m_doc, "" );
    }
    else {
        LogError( "Unknown format" );
        return false;
    }

    // something went wrong
    if ( !input ) {
        LogError( "Unknown error" );
        return false;
    }

    // ignore layout?
    if ( m_ignoreLayout || m_noLayout ) {
        input->IgnoreLayoutInformation();
    }

    // rdg xpath query?
    if ( m_rdgXPathQuery.length() > 0 ) {
        input->SetRdgXPathQuery( m_rdgXPathQuery );
    }

    // load the file
    if ( !input->ImportString( data )) {
        LogError( "Error importing data" );
        delete input;
        return false;
    }

    m_doc.SetPageHeight( this->GetPageHeight() );
    m_doc.SetPageWidth( this->GetPageWidth() );
    m_doc.SetPageRightMar( this->GetBorder() );
    m_doc.SetPageLeftMar( this->GetBorder() );
    m_doc.SetPageTopMar( this->GetBorder() );
    m_doc.SetSpacingStaff( this->GetSpacingStaff() );
    m_doc.SetSpacingSystem( this->GetSpacingSystem() );

    m_doc.PrepareDrawing();

    if (input->HasMeasureWithinEditoMarkup() && !m_noLayout) {
        LogWarning( "Only continous layout is possible with <measure> within editorial markup, switching to --no-layout" );
        this->SetNoLayout( true );
    }

    // do the layout? this depends on the options and of the
    // file. PAE and DARMS of no layout information. MEI files
    // can have, but this might have been ignored because of the
    // --ignore-layout option. We won't do it if --no-layout option
    // was set, though.
    if (!input->HasLayoutInformation() && !m_noLayout) {
        //LogElapsedTimeStart();
        m_doc.CastOff();
        //LogElapsedTimeEnd("layout");
    }

    // disable justification if no layout or no justification
    if (m_noLayout || m_noJustification) {
        m_doc.SetJustificationX(false);
    }

    delete input;
    m_view.SetDoc( &m_doc );

    return true;
}
开发者ID:UIKit0,项目名称:verovio,代码行数:76,代码来源:toolkit.cpp


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