本文整理汇总了C++中Package::getFileNameWithSuffix方法的典型用法代码示例。如果您正苦于以下问题:C++ Package::getFileNameWithSuffix方法的具体用法?C++ Package::getFileNameWithSuffix怎么用?C++ Package::getFileNameWithSuffix使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Package
的用法示例。
在下文中一共展示了Package::getFileNameWithSuffix方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CreateFailure
void
ComponentImplementation::install()
throw(Components::CreateFailure)
{
//
// if already installed increment counter only
//
if (installation_count_)
{
installation_count_++;
DEBUG_OUT3( "..... already installed (", installation_count_, ")" );
return;
}
//
// if without package increment counter only
//
if (package_.empty())
{
installation_count_++;
return;
}
//
// create directories for the component implementation
//
makeDir(data_.installation_dir);
makeDir(build_dir_);
//
// package may be component or composition
//
Package archive = Package( package_ );
std::string xmlfile_name = archive.getFileNameWithSuffix( ".cad" );
if ( xmlfile_name != std::string( "" ) )
{
//
// get info from the assembly package
//
CADReader reader;
try
{
reader.readCAD( package_, &(data_.assembly), build_path_ );
}
catch( CADReadException )
{
std::cerr << "!!!!! Error during reading .cad" << std::endl;
removeFileOrDirectory(data_.installation_dir);
removeFileOrDirectory(build_dir_);
throw Components::CreateFailure();
}
data_.assembly.cad = getFileName( xmlfile_name );
}
else
{
xmlfile_name = archive.getFileNameWithSuffix( ".csd" );
//
// get info from the software package
//
CSDReader reader;
try
{
reader.readCSD( package_, &data_, build_path_ );
}
catch( CSDReadException )
{
std::cerr << "!!!!! Error during reading .csd" << std::endl;
removeFileOrDirectory(data_.installation_dir);
removeFileOrDirectory(build_dir_);
throw Components::CreateFailure();
}
data_.csd = getFileName( xmlfile_name );
}
//
// install any code
//
try
{
installCode();
}
catch( Components::CreateFailure )
{
removeFileOrDirectory(data_.installation_dir);
removeFileOrDirectory(build_dir_);
throw Components::CreateFailure();
}
// increment installation counter ( to 1 )
installation_count_++;
}