}
// -------------------------------------------------------------------------
-std::string cpPluginsIO::MeshReader::
+void cpPluginsIO::MeshReader::
_GenerateData( )
{
- auto dim = this->m_Parameters.GetUint( "Dimension" );
- if ( dim == 2 ) return( this->_GD0< 2 >( ) );
- else if( dim == 3 ) return( this->_GD0< 3 >( ) );
- else return( "MeshReader: Mesh dimension not supported." );
+ auto d = this->m_Parameters.GetUint( "Dimension" );
+ if ( d == 2 ) this->_GD0< 2 >( );
+ else if( d == 3 ) this->_GD0< 3 >( );
+ else this->_Error( "Mesh dimension not supported." );
}
// -------------------------------------------------------------------------
template< unsigned int _Dim >
-std::string cpPluginsIO::MeshReader::
+void cpPluginsIO::MeshReader::
_GD0( )
{
- auto st = this->m_Parameters.GetSelectedChoice( "ScalarType" );
- if ( st == "float" ) return( this->_GD1< float, _Dim >( ) );
- else if( st == "double" ) return( this->_GD1< double, _Dim >( ) );
- else return( "MeshReader: Mesh type not supported." );
+ auto s = this->m_Parameters.GetSelectedChoice( "ScalarType" );
+ if ( s == "float" ) this->_GD1< float, _Dim >( );
+ else if( s == "double" ) this->_GD1< double, _Dim >( );
+ else this->_Error( "Mesh type not supported." );
}
// -------------------------------------------------------------------------
template< class _TScalar, unsigned int _Dim >
-std::string cpPluginsIO::MeshReader::
+void cpPluginsIO::MeshReader::
_GD1( )
{
auto fname = this->m_Parameters.GetOpenFileName( "FileName" );
stlr->Update( );
this->GetOutputData( "Output" )->SetVTK( stlr->GetOutput( ) );
- return( "" );
}
else if( ext == "obj" )
{
objr->Update( );
this->GetOutputData( "Output" )->SetVTK( objr->GetOutput( ) );
- return( "" );
}
else if( ext == "vtk" )
{
pdr->Update( );
this->GetOutputData( "Output" )->SetVTK( pdr->GetOutput( ) );
- return( "" );
}
else
- return( "MeshReader: Input file format not recognized." );
+ this->_Error( "Input file format not recognized." );
}
// eof - $RCSfile$