コード例 #1
0
//--------------------------------------------------------------------------------------------------
/// 
//--------------------------------------------------------------------------------------------------
std::vector<std::string> RifEclipseSummaryTools::findSummaryDataFiles(const std::string& caseFile)
{
    std::vector<std::string> fileNames;

    std::string path;
    std::string base;

    findSummaryHeaderFileInfo(caseFile, NULL, &path, &base, NULL);
    if (path.empty() || base.empty()) return fileNames;

    char* header_file = NULL;
    stringlist_type* summary_file_list = stringlist_alloc_new();

    ecl_util_alloc_summary_files(path.data(), base.data(), NULL, &header_file, summary_file_list);
    if (stringlist_get_size( summary_file_list ) > 0)
    {
        for (int i = 0; i < stringlist_get_size(summary_file_list); i++)
        {
            fileNames.push_back(stringlist_iget(summary_file_list, i));
        }
    }

    util_safe_free(header_file);
    stringlist_free(summary_file_list);

    return fileNames;
}
コード例 #2
0
//--------------------------------------------------------------------------------------------------
/// 
//--------------------------------------------------------------------------------------------------
QStringList RifEclipseSummaryTools::findSummaryDataFiles(const QString& caseFile)
{
    QStringList fileNames;

    QString path;
    QString base;

    findSummaryHeaderFileInfo(caseFile, nullptr, &path, &base, nullptr);
    if (path.isEmpty() || base.isEmpty()) return fileNames;

    char* header_file = nullptr;
    stringlist_type* summary_file_list = stringlist_alloc_new();

    ecl_util_alloc_summary_files(RiaStringEncodingTools::toNativeEncoded(path).data(), RiaStringEncodingTools::toNativeEncoded(base).data(), nullptr, &header_file, summary_file_list);
    if (stringlist_get_size( summary_file_list ) > 0)
    {
        for (int i = 0; i < stringlist_get_size(summary_file_list); i++)
        {
            fileNames.push_back(RiaStringEncodingTools::fromNativeEncoded(stringlist_iget(summary_file_list, i)));
        }
    }

    util_safe_free(header_file);
    stringlist_free(summary_file_list);

    return fileNames;
}
コード例 #3
0
//--------------------------------------------------------------------------------------------------
/// 
//--------------------------------------------------------------------------------------------------
void RifEclipseSummaryTools::findSummaryHeaderFile(const std::string& inputFile, std::string* headerFile, bool* isFormatted)
{
    findSummaryHeaderFileInfo(inputFile, headerFile, NULL, NULL, isFormatted);
}
コード例 #4
0
//--------------------------------------------------------------------------------------------------
/// 
//--------------------------------------------------------------------------------------------------
void RifEclipseSummaryTools::findSummaryHeaderFile(const QString& inputFile, QString* headerFile, bool* isFormatted)
{
    findSummaryHeaderFileInfo(inputFile, headerFile, nullptr, nullptr, isFormatted);
}