本文整理汇总了C++中IOOptions::ptr方法的典型用法代码示例。如果您正苦于以下问题:C++ IOOptions::ptr方法的具体用法?C++ IOOptions::ptr怎么用?C++ IOOptions::ptr使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IOOptions
的用法示例。
在下文中一共展示了IOOptions::ptr方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: input
Table::Table(std::string resource, const IOOptions& opt){
QString input (QString::fromStdString(resource));
input.replace('\\','/');
// if it is file:// (or http:// etc) leave it untouched; if not, append file:// and the working catalog path if it is missing
if (input.indexOf("://") < 0) {
int pos = input.indexOf('/');
if (pos > 0) {
if ((input.count('/') > 1) || QFileInfo(input).exists()) // full path starting with drive-letter (MS-DOS-style)
input = "file:///" + input;
else // container object without path, e.g. myfile.hdf/subdataset: look for it in workingCatalog()
input = "file:///" + Ilwis::context()->workingCatalog()->filesystemLocation().toLocalFile() + '/' + input;
} else if (pos == 0) // full path starting with path-separator (UNIX-style)
input = "file://" + input;
else { // pos < 0: file without path, or new object
QString file = Ilwis::context()->workingCatalog()->filesystemLocation().toLocalFile() + '/' + input;
if (QFileInfo (file).exists()) // file without path
input = "file:///" + file;
}
}
Ilwis::ITable t(input, itTABLE, opt.ptr());
if (t.isValid())
this->_ilwisObject = std::shared_ptr<Ilwis::IIlwisObject>(new Ilwis::IIlwisObject(t));
}