您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ warn_deprecated函数代码示例

51自学网 2021-06-03 09:52:01
  C++
这篇教程C++ warn_deprecated函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中warn_deprecated函数的典型用法代码示例。如果您正苦于以下问题:C++ warn_deprecated函数的具体用法?C++ warn_deprecated怎么用?C++ warn_deprecated使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了warn_deprecated函数的24个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: speciesIndex

size_t IdealGasReactor::componentIndex(const string& nm) const{    size_t k = speciesIndex(nm);    if (k != npos) {        return k + 3;    } else if (nm == "m" || nm == "mass") {        if (nm == "m") {            warn_deprecated("IdealGasReactor::componentIndex(/"m/")",                "Using the name 'm' for mass is deprecated, and will be "                "disabled after Cantera 2.3. Use 'mass' instead.");        }        return 0;    } else if (nm == "V" || nm == "volume") {        if (nm == "V") {            warn_deprecated("IdealGasReactor::componentIndex(/"V/")",                "Using the name 'V' for volume is deprecated, and will be "                "disabled after Cantera 2.3. Use 'volume' instead.");        }        return 1;    } else if (nm == "T" || nm == "temperature") {        if (nm == "T") {            warn_deprecated("IdealGasReactor::componentIndex(/"T/")",                "Using the name 'T' for temperature is deprecated, and will be "                "disabled after Cantera 2.3. Use 'temperature' instead.");        }        return 2;    } else {        return npos;    }}
开发者ID:goldmanm,项目名称:cantera,代码行数:30,


示例2: speciesIndex

size_t Reactor::componentIndex(const string& nm) const{    size_t k = speciesIndex(nm);    if (k != npos) {        return k + 3;    } else if (nm == "m" || nm == "mass") {        if (nm == "m") {            warn_deprecated("Reactor::componentIndex(/"m/")",                "Using the name 'm' for mass is deprecated, and will be "                "disabled after Cantera 2.3. Use 'mass' instead.");        }        return 0;    } else if (nm == "V" || nm == "volume") {        if (nm == "V") {            warn_deprecated("Reactor::componentIndex(/"V/")",                "Using the name 'V' for volume is deprecated, and will be "                "disabled after Cantera 2.3. Use 'volume' instead.");        }        return 1;    } else if (nm == "U" || nm == "int_energy") {        if (nm == "U") {            warn_deprecated("Reactor::componentIndex(/"U/")",                "Using the name 'U' for internal energy is deprecated, and "                "will be disabled after Cantera 2.3. Use 'int_energy' instead.");        }        return 2;    } else {        return npos;    }}
开发者ID:thomasfiala,项目名称:cantera,代码行数:30,


示例3: warn_deprecated

void ImplicitSurfChem::getInitialConditions(doublereal t0, size_t lenc,        doublereal* c){    warn_deprecated("ImplicitSurfChem::getInitialConditions",        "Use getState instead. To be removed after Cantera 2.3.");    getState(c);}
开发者ID:MrKingKong,项目名称:cantera,代码行数:7,


示例4: logfileName

//=====================================================================================================================std::string logfileName(const std::string& infile){    warn_deprecated("logfileName", "To be removed after Cantera 2.2.");    std::string logfile = getBaseName(infile);    logfile += ".log";    return logfile;}
开发者ID:eburke90,项目名称:Turbulent-Cantera,代码行数:8,


示例5: warn_deprecated

void MetalSHEelectrons::getParameters(int& n, doublereal* const c) const{    warn_deprecated("MetalSHEelectrons::getParameters");    doublereal rho = density();    n = 1;    c[0] = rho;}
开发者ID:anujg1991,项目名称:cantera,代码行数:7,


示例6: warn_deprecated

void Phase::addElement(const XML_Node& e){    warn_deprecated("Phase::addElement(XML_Node&)",                    "To be removed after Cantera 2.2.");    doublereal weight = 0.0;    if (e.hasAttrib("atomicWt")) {        weight = fpValue(stripws(e["atomicWt"]));    }    int anum = 0;    if (e.hasAttrib("atomicNumber")) {        anum = atoi(stripws(e["atomicNumber"]).c_str());    }    string symbol = e["name"];    doublereal entropy298 = ENTROPY298_UNKNOWN;    if (e.hasChild("entropy298")) {        XML_Node& e298Node = e.child("entropy298");        if (e298Node.hasAttrib("value")) {            entropy298 = fpValueCheck(stripws(e298Node["value"]));        }    }    if (weight != 0.0) {        addElement(symbol, weight, anum, entropy298);    } else {        addElement(symbol);    }}
开发者ID:anujg1991,项目名称:cantera,代码行数:26,


示例7: warn_deprecated

void ConstPressureReactor::getInitialConditions(double t0, size_t leny,        double* y){    warn_deprecated("ConstPressureReactor::getInitialConditions",                    "Use getState instead. To be removed after Cantera 2.3.");    getState(y);}
开发者ID:parkerclayton,项目名称:python,代码行数:7,


示例8: warn_deprecated

void PDSS_IonsFromNeutral::constructPDSSFile(VPStandardStateTP* tp, size_t spindex,        const std::string& inputFile, const std::string& id){    warn_deprecated("PDSS_IonsFromNeutral::constructPDSSFile",                    "To be removed after Cantera 2.3.");    if (inputFile.size() == 0) {        throw CanteraError("PDSS_IonsFromNeutral::constructPDSSFile",                           "input file is null");    }    std::string path = findInputFile(inputFile);    ifstream fin(path);    if (!fin) {        throw CanteraError("PDSS_IonsFromNeutral::constructPDSSFile","could not open "                           +path+" for reading.");    }    // The phase object automatically constructs an XML object. Use this object    // to store information.    XML_Node fxml;    fxml.build(fin);    XML_Node* fxml_phase = findXMLPhase(&fxml, id);    if (!fxml_phase) {        throw CanteraError("PDSS_IonsFromNeutral::constructPDSSFile",                           "ERROR: Can not find phase named " +                           id + " in file named " + inputFile);    }    XML_Node& speciesList = fxml_phase->child("speciesArray");    XML_Node* speciesDB = get_XML_NameID("speciesData", speciesList["datasrc"],                                         &fxml_phase->root());    const XML_Node* s = speciesDB->findByAttr("name", tp->speciesName(spindex));    constructPDSSXML(tp, spindex, *s, *fxml_phase, id);}
开发者ID:MrKingKong,项目名称:cantera,代码行数:33,


示例9: string16_EOSType

std::string string16_EOSType(int EOSType){    warn_deprecated("string16_EOSType", "Use vcs_VolPhase::eos_name instead."        " To be removed after Cantera 2.3.");    char st[32];    st[16] = '/0';    switch (EOSType) {    case VCS_EOS_CONSTANT:        sprintf(st,"Constant        ");        break;    case VCS_EOS_IDEAL_GAS:        sprintf(st,"Ideal Gas       ");        break;    case VCS_EOS_STOICH_SUB:        sprintf(st,"Stoich Sub      ");        break;    case VCS_EOS_IDEAL_SOLN:        sprintf(st,"Ideal Soln      ");        break;    case VCS_EOS_DEBEYE_HUCKEL:        sprintf(st,"Debeye Huckel   ");        break;    case VCS_EOS_REDLICK_KWONG:        sprintf(st,"Redlick_Kwong   ");        break;    case VCS_EOS_REGULAR_SOLN:        sprintf(st,"Regular Soln    ");        break;    default:        sprintf(st,"UnkType: %-7d", EOSType);        break;    }    st[16] = '/0';    return st;}
开发者ID:MrKingKong,项目名称:cantera,代码行数:35,


示例10: warn_deprecated

void StoichSubstanceSSTP::getParameters(int& n, doublereal* const c) const{    warn_deprecated("StoichSubstanceSSTP::getParameters");    doublereal rho = density();    n = 1;    c[0] = rho;}
开发者ID:anujg1991,项目名称:cantera,代码行数:7,


示例11: warn_deprecated

MultiSpeciesThermo&MultiSpeciesThermo::operator=(const MultiSpeciesThermo& b){    warn_deprecated("MultiSpeciesThermo assignment operator",        "To be removed after Cantera 2.3");    if (&b == this) {        return *this;    }    m_sp.clear();    // Copy SpeciesThermoInterpType objects from 'b'    for (const auto& sp : b.m_sp) {        for (size_t k = 0; k < sp.second.size(); k++) {            size_t i = sp.second[k].first;            shared_ptr<SpeciesThermoInterpType> spec(                sp.second[k].second->duplMyselfAsSpeciesThermoInterpType());            m_sp[sp.first].emplace_back(i, spec);        }    }    m_tpoly = b.m_tpoly;    m_speciesLoc = b.m_speciesLoc;    m_tlow_max = b.m_tlow_max;    m_thigh_min = b.m_thigh_min;    m_p0 = b.m_p0;    return *this;}
开发者ID:Niemeyer-Research-Group,项目名称:cantera,代码行数:27,


示例12: TransportParams

GasTransportParams::GasTransportParams() :    TransportParams(),    visccoeffs(0),    condcoeffs(0),    diffcoeffs(0),    poly(0),    omega22_poly(0),    astar_poly(0),    bstar_poly(0),    cstar_poly(0),    zrot(0),    crot(0),    polar(0),    alpha(0),    fitlist(0),    eps(0),    sigma(0),    reducedMass(0, 0),    diam(0, 0),    epsilon(0, 0),    dipole(0, 0),    delta(0, 0){    warn_deprecated("class GasTransportParams",                    "To be removed after Cantera 2.2.");}
开发者ID:Cantera,项目名称:cantera-svn,代码行数:26,


示例13: warn_deprecated

SpeciesThermo* SpeciesThermoFactory::newSpeciesThermoManager(const std::string& stype) const{    warn_deprecated("SpeciesThermoFactory::newSpeciesThermo",        "To be removed after Cantera 2.2. Use class GeneralSpeciesThermo directly.");    std::string ltype = lowercase(stype);    if (ltype == "nasa") {        return new NasaThermo;    } else if (ltype == "shomate") {        return new ShomateThermo;    } else if (ltype ==  "simple" || ltype == "constant_cp") {        return new SimpleThermo;    } else if (ltype ==  "nasa_shomate_duo") {        return new SpeciesThermoDuo<NasaThermo, ShomateThermo>;    } else if (ltype ==  "nasa_simple_duo") {        return new SpeciesThermoDuo<NasaThermo, SimpleThermo>;    } else if (ltype ==  "shomate_simple_duo") {        return new SpeciesThermoDuo<ShomateThermo, SimpleThermo>;    } else if (ltype ==   "general") {        return new GeneralSpeciesThermo();    } else if (ltype ==  "") {        return (SpeciesThermo*) 0;    } else {        throw UnknownSpeciesThermo("SpeciesThermoFactory::newSpeciesThermoManager",                                   stype);    }    return (SpeciesThermo*) 0;}
开发者ID:Cantera,项目名称:cantera-svn,代码行数:27,


示例14: warn_deprecated

void PDSS_IdealGas::constructPDSSFile(VPStandardStateTP* tp, size_t spindex,                                      const std::string& inputFile,                                      const std::string& id){    warn_deprecated("PDSS_IdealGas::constructPDSSFile",                    "To be removed after Cantera 2.3.");    if (inputFile.size() == 0) {        throw CanteraError("PDSS_IdealGas::constructPDSSFile",                           "input file is null");    }    std::string path = findInputFile(inputFile);    ifstream fin(path);    if (!fin) {        throw CanteraError("PDSS_IdealGas::constructPDSSFile","could not open "                           +path+" for reading.");    }    /*     * The phase object automatically constructs an XML object.     * Use this object to store information.     */    XML_Node fxml;    fxml.build(fin);    XML_Node* fxml_phase = findXMLPhase(&fxml, id);    if (!fxml_phase) {        throw CanteraError("PDSS_IdealGas::constructPDSSFile",                           "ERROR: Can not find phase named " +                           id + " in file named " + inputFile);    }    constructPDSSXML(tp, spindex, *fxml_phase, id);}
开发者ID:thomasfiala,项目名称:cantera,代码行数:31,


示例15: warn_deprecated

void BandMatrix::copyData(const GeneralMatrix& y){    warn_deprecated("BandMatrix::copyData", "To be removed after Cantera 2.2.");    m_factored = false;    size_t n = sizeof(doublereal) * m_n * (2 *m_kl + m_ku + 1);    GeneralMatrix* yyPtr = const_cast<GeneralMatrix*>(&y);    (void) memcpy(DATA_PTR(data), yyPtr->ptrColumn(0), n);}
开发者ID:Cantera,项目名称:cantera-svn,代码行数:8,


示例16: warn_deprecated

void StoichSubstance::getUnitsStandardConc(double* uA, int k, int sizeUA) const{    warn_deprecated("StoichSubstance::getUnitsStandardConc",                "To be removed after Cantera 2.2.");    for (int i = 0; i < sizeUA; i++) {        uA[i] = 0.0;    }}
开发者ID:anilkunwar,项目名称:cantera,代码行数:8,


示例17: warn_deprecated

void TransportFactory::initTransport(Transport* tr, thermo_t* thermo,                                     int mode, int log_level){    warn_deprecated("TransportFactory::initTransport",                    "To be removed after Cantera 2.2. This initialization is "                    "now handled directly by GasTransport::init");    tr->init(thermo);}
开发者ID:Cantera,项目名称:cantera-svn,代码行数:8,


示例18: PDSS

PDSS_IdealGas::PDSS_IdealGas(VPStandardStateTP* tp, int spindex,                             const std::string& inputFile, const std::string& id) :    PDSS(tp, spindex){    warn_deprecated("PDSS_IdealGas constructor from XML input file",                    "To be removed after Cantera 2.3.");    m_pdssType = cPDSS_IDEALGAS;    constructPDSSFile(tp, spindex, inputFile, id);}
开发者ID:thomasfiala,项目名称:cantera,代码行数:9,


示例19: newSpeciesThermoMgr

SpeciesThermo* newSpeciesThermoMgr(int type, SpeciesThermoFactory* f){    warn_deprecated("newSpeciesThermoMgr", "To be removed after Cantera 2.2. "        "Use class GeneralSpeciesThermo directly.");    if (f == 0) {        f = SpeciesThermoFactory::factory();    }    return f->newSpeciesThermo(type);}
开发者ID:Cantera,项目名称:cantera-svn,代码行数:9,


示例20: warn_deprecated

void ReactorNet::addReactor(Reactor* r, bool iown){    warn_deprecated("ReactorNet::addReactor(Reactor*)",        "To be removed after Cantera 2.2. Use 'addReactor(Reactor&) instead'.");    if (iown) {        warn_deprecated("ReactorNet::addReactor",            "Ownership of Reactors by ReactorNet is deprecated.");    }    r->setNetwork(this);    if (r->type() >= ReactorType) {        m_reactors.push_back(r);        m_iown.push_back(iown);        writelog("Adding reactor "+r->name()+"/n", m_verbose);    } else {        writelog("Not adding reactor "+r->name()+                 ", since type = "+int2str(r->type())+"/n", m_verbose);    }}
开发者ID:anujg1991,项目名称:cantera,代码行数:18,


示例21: warn_deprecated

double vcs_VolPhase::AC_calc_one(size_t kspec) const{    warn_deprecated("vcs_VolPhase::AC_calc_one",                    "Unused. To be removed after Cantera 2.3.");    if (! m_UpToDate_AC) {        _updateActCoeff();    }    return ActCoeff[kspec];}
开发者ID:MrKingKong,项目名称:cantera,代码行数:9,


示例22: warn_deprecated

void SurfPhase::setParameters(int n, doublereal* const c){    warn_deprecated("SurfPhase::setParameters");    if (n != 1) {        throw CanteraError("SurfPhase::setParameters",                           "Bad value for number of parameter");    }    setSiteDensity(c[0]);}
开发者ID:anujg1991,项目名称:cantera,代码行数:9,


示例23: PDSS

PDSS_ConstVol::PDSS_ConstVol(VPStandardStateTP* tp, size_t spindex,                             const std::string& inputFile, const std::string& id) :    PDSS(tp, spindex){    warn_deprecated("PDSS_ConstVol constructor from XML input file",                    "To be removed after Cantera 2.3.");    m_pdssType = cPDSS_CONSTVOL;    constructPDSSFile(tp, spindex, inputFile, id);}
开发者ID:hgossler,项目名称:cantera,代码行数:9,


示例24: warn_deprecated

Transport::Transport(const Transport& right){    warn_deprecated("Transport copy constructor", "To be removed after"        " Cantera 2.3 for all classes derived from Transport.");    m_thermo = right.m_thermo;    m_ready = right.m_ready;    m_nsp = right.m_nsp;    m_nDim = right.m_nDim;    m_velocityBasis = right.m_velocityBasis;}
开发者ID:Niemeyer-Research-Group,项目名称:cantera,代码行数:10,



注:本文中的warn_deprecated函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ warn_print函数代码示例
C++ warn函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。