From 6a9f3ea892d33f879d953dd41ef1d3f7560d44fe Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Thu, 1 Mar 2012 00:44:31 +0000 Subject: [PATCH] Marked some unused functions as deprecated --- doc/doxygen/Doxyfile | 3 ++- include/cantera/base/ctml.h | 18 +++++++++--------- include/cantera/base/xml.h | 8 ++++---- include/cantera/thermo/SpeciesThermoFactory.h | 4 ++-- include/cantera/thermo/VPSSMgr_types.h | 4 ++-- include/cantera/thermo/speciesThermoTypes.h | 7 ++++--- include/cantera/transport/MultiTransport.h | 16 ++++++++++------ src/base/ctml.cpp | 9 +++------ src/equil/ChemEquil.cpp | 1 - 9 files changed, 36 insertions(+), 34 deletions(-) diff --git a/doc/doxygen/Doxyfile b/doc/doxygen/Doxyfile index 26dfaeaa2..d2f7d8c78 100644 --- a/doc/doxygen/Doxyfile +++ b/doc/doxygen/Doxyfile @@ -1332,7 +1332,8 @@ PREDEFINED = WITH_HTML_LOGS \ WITH_PURE_FLUIDS \ THREAD_SAFE_CANTERA \ WITH_LATTICE_SOLID \ - HAVE_CONFIG_H + HAVE_CONFIG_H \ + DEPRECATED(x)=x # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then # this tag can be used to specify a list of macro names that should be expanded. diff --git a/include/cantera/base/ctml.h b/include/cantera/base/ctml.h index 1280dfc02..258eae53a 100644 --- a/include/cantera/base/ctml.h +++ b/include/cantera/base/ctml.h @@ -62,11 +62,10 @@ extern std::string INT_Format; * @param titleString String name of the title attribute * @param value Value - single bool * - * @todo I don't think this is used. Figure out what is used for writing bools, - * and codify that. + * @deprecated never used */ -void addBool(Cantera::XML_Node& node, const std::string& titleString, - const bool value); +DEPRECATED(void addBool(Cantera::XML_Node& node, const std::string& titleString, + const bool value)); //! This function adds a child node with the name, "integer", with a value //! consisting of a single integer @@ -213,15 +212,16 @@ void addFloat(Cantera::XML_Node& node, const std::string& titleString, * special double, Cantera::Undef, which means to ignore the * entry. * - * @todo I don't think this is used. Figure out what is used for writing integers, - * and codify that. unitsString shouldn't be here, since it's an int. - * typeString should be codified as to its usage. + * @todo unitsString shouldn't be here, since it's an int. typeString should + * be codified as to its usage. + * + * @deprecated Not currently used. */ -void addIntegerArray(Cantera::XML_Node& node, const std::string& titleString, +DEPRECATED(void addIntegerArray(Cantera::XML_Node& node, const std::string& titleString, const size_t n, const int* const values, const std::string unitsString="", const std::string typeString="", const doublereal minval=Cantera::Undef, - const doublereal maxval=Cantera::Undef); + const doublereal maxval=Cantera::Undef)); //! This function adds a child node with the name, "floatArray", with a value //! consisting of a comma separated list of floats diff --git a/include/cantera/base/xml.h b/include/cantera/base/xml.h index 55fa13f9f..7d19d985d 100644 --- a/include/cantera/base/xml.h +++ b/include/cantera/base/xml.h @@ -60,9 +60,9 @@ public: * @return Returns a string stripped of leading and trailing white * space. * - * @todo why is this a class method? + * @deprecated Use stripws (in stringUtils.h) */ - std::string strip(const std::string& aline) const; + DEPRECATED(std::string strip(const std::string& aline) const); //! Looks for a substring within 'aline' enclosed in double //! quotes, and returns this substring (without the quotes) if @@ -71,9 +71,9 @@ public: * * @param aline This is the input string to be searched * - * @todo why is this a class method? + * @deprecated why is this a class method? */ - std::string inquotes(const std::string& aline) const; + DEPRECATED(std::string inquotes(const std::string& aline) const); //! Searches a string for the first occurrence of a valid //! quoted string. diff --git a/include/cantera/thermo/SpeciesThermoFactory.h b/include/cantera/thermo/SpeciesThermoFactory.h index bff9eeea6..6582725bb 100644 --- a/include/cantera/thermo/SpeciesThermoFactory.h +++ b/include/cantera/thermo/SpeciesThermoFactory.h @@ -159,9 +159,9 @@ public: * * @return Returns the pointer to the newly malloced * species property manager for the reference state - * @todo is this used? + * @deprecated Essentially never used */ - SpeciesThermo* newSpeciesThermoOpt(std::vector & spDataNodeList) const; + DEPRECATED(SpeciesThermo* newSpeciesThermoOpt(std::vector & spDataNodeList) const); //! Install a species thermodynamic property parameterization //! for the reference state for one species into a species thermo manager. diff --git a/include/cantera/thermo/VPSSMgr_types.h b/include/cantera/thermo/VPSSMgr_types.h index 4c48a048f..66e341dd4 100644 --- a/include/cantera/thermo/VPSSMgr_types.h +++ b/include/cantera/thermo/VPSSMgr_types.h @@ -50,9 +50,9 @@ public: * @param func String function id * @param thermotype Integer specifying the thermo parameterization * - * @todo is this used + * deprecated This class is unused */ - UnknownVPSSMgr(std::string func, int thermotype) { + DEPRECATED(UnknownVPSSMgr(std::string func, int thermotype)) { CanteraError(func, std::string("\n ### ERROR ### \n") + "Unknown species thermo parameterization (" + int2str(thermotype) + ")\n\n"); diff --git a/include/cantera/thermo/speciesThermoTypes.h b/include/cantera/thermo/speciesThermoTypes.h index aad23f8e2..92d10006a 100644 --- a/include/cantera/thermo/speciesThermoTypes.h +++ b/include/cantera/thermo/speciesThermoTypes.h @@ -82,9 +82,9 @@ struct UnknownThermoParam { /*! * @param thermotype Integer specifying the thermo parameterization * - * @todo Is this used? + * @deprecated This class is unused? */ - UnknownThermoParam(int thermotype) { + DEPRECATED(UnknownThermoParam(int thermotype)) { writelog(std::string("\n ### ERROR ### \n") + "Unknown species thermo parameterization (" + int2str(thermotype) + ")\n\n"); @@ -95,9 +95,10 @@ struct UnknownThermoParam { //! holds parameterization-dependent index information /*! * These are all integers. - * @todo Is this used? + * @deprecated This struct is unused. */ struct ThermoIndexData { + DEPRECATED(ThermoIndexData()) {} //! param int param; //! number of coefficients diff --git a/include/cantera/transport/MultiTransport.h b/include/cantera/transport/MultiTransport.h index b4fcae14d..61640d3f5 100644 --- a/include/cantera/transport/MultiTransport.h +++ b/include/cantera/transport/MultiTransport.h @@ -21,6 +21,7 @@ namespace Cantera //==================================================================================================================== //! Transport solve options +//! @deprecated GMRES option is unimplemented. enum TRANSOLVE_TYPE { //! Solve the dense matrix via a gmres iteration TRANSOLVE_GMRES = 1, @@ -59,8 +60,9 @@ public: * * @param b * @param prod + * @deprecated GMRES method is not implemented */ - virtual void mult(const doublereal* b, doublereal* prod) const; + DEPRECATED(virtual void mult(const doublereal* b, doublereal* prod) const); }; @@ -197,15 +199,17 @@ public: //! Set the solution method for inverting the L matrix /*! * @param method enum TRANSOLVE_TYPE Either use direct or TRANSOLVE_GMRES + * @deprecated GMRES option is unimplemented. */ - virtual void setSolutionMethod(TRANSOLVE_TYPE method); + DEPRECATED(virtual void setSolutionMethod(TRANSOLVE_TYPE method)); //! Set the options for the GMRES solution /*! * @param m set the mgmres param * @param eps Set the eps parameter + * @deprecated GMRES option is unimplemented. */ - virtual void setOptions_GMRES(int m, doublereal eps); + DEPRECATED(virtual void setOptions_GMRES(int m, doublereal eps)); /** * @internal @@ -326,9 +330,9 @@ private: vector_fp m_a; vector_fp m_b; - bool m_gmres; - int m_mgmres; - doublereal m_eps_gmres; + bool m_gmres; //!< @deprecated + int m_mgmres; //!< @deprecated + doublereal m_eps_gmres; //!< @deprecated // work space vector_fp m_spwork, m_spwork1, m_spwork2, m_spwork3; diff --git a/src/base/ctml.cpp b/src/base/ctml.cpp index 28f2d8031..3cc3d8f52 100644 --- a/src/base/ctml.cpp +++ b/src/base/ctml.cpp @@ -263,9 +263,8 @@ void addIntegerArray(Cantera::XML_Node& node, const std::string& title, const si * @param typeString String type. This is an optional parameter. The default * is to have an empty string. * - * @todo I don't think this is used. Figure out what is used for writing floats, - * and codify that. minval and maxval should be codified. - * typeString should be codified as to its usage. + * @todo minval and maxval should be codified. typeString should be codified + * as to its usage. */ void addFloat(Cantera::XML_Node& node, const std::string& title, const doublereal val, const std::string units, @@ -341,9 +340,7 @@ void addFloat(Cantera::XML_Node& node, const std::string& title, * special double, Cantera::Undef, which means to ignore the * entry. * - * @todo I don't think this is used. Figure out what is used for writing integers, - * and codify that. unitsString shouldn't be here, since it's an int. - * typeString should be codified as to its usage. + * @todo typeString should be codified as to its usage. */ void addFloatArray(Cantera::XML_Node& node, const std::string& title, const size_t n, const doublereal* const vals, const std::string units, diff --git a/src/equil/ChemEquil.cpp b/src/equil/ChemEquil.cpp index 283cf0d75..3b035c402 100644 --- a/src/equil/ChemEquil.cpp +++ b/src/equil/ChemEquil.cpp @@ -215,7 +215,6 @@ void ChemEquil::setToEquilState(thermo_t& s, /** * update internally stored state information. - * @todo argument not used. */ void ChemEquil::update(const thermo_t& s) {