本文整理汇总了C++中FileInputStream::SetRdgXPathQuery方法的典型用法代码示例。如果您正苦于以下问题:C++ FileInputStream::SetRdgXPathQuery方法的具体用法?C++ FileInputStream::SetRdgXPathQuery怎么用?C++ FileInputStream::SetRdgXPathQuery使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FileInputStream
的用法示例。
在下文中一共展示了FileInputStream::SetRdgXPathQuery方法的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;
}