Removed some obsolete code for handling deprecated functions
This commit is contained in:
parent
24d7a3e091
commit
858f355054
4 changed files with 1 additions and 58 deletions
|
|
@ -178,32 +178,6 @@ private:
|
|||
size_t m_, mmax_;
|
||||
};
|
||||
|
||||
|
||||
//! Print a warning when a deprecated method is called.
|
||||
/*!
|
||||
* These methods are slated to go away in future releases of Cantera.
|
||||
* The developer should work towards eliminating the use of these
|
||||
* methods in the near future.
|
||||
*
|
||||
* @param classnm Class the method belongs to
|
||||
* @param oldnm Name of the deprecated method
|
||||
* @param newnm Name of the method users should use instead
|
||||
*
|
||||
* @ingroup errorhandling
|
||||
*/
|
||||
void deprecatedMethod(std::string classnm, std::string oldnm, std::string newnm);
|
||||
|
||||
//! Throw an error condition for a procedure that has been removed.
|
||||
/*!
|
||||
*
|
||||
* @param func String name for the function within which the error was
|
||||
* generated.
|
||||
* @param version Version of Cantera that first removed this function.
|
||||
*
|
||||
* @ingroup errorhandling
|
||||
*/
|
||||
void removeAtVersion(std::string func, std::string version);
|
||||
|
||||
//! Provides a line number
|
||||
#define XSTR_TRACE_LINE(s) STR_TRACE_LINE(s)
|
||||
|
||||
|
|
|
|||
|
|
@ -320,19 +320,6 @@ public:
|
|||
return n;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the starting index of the species in the nth phase
|
||||
* associated with the reaction mechanism.
|
||||
*
|
||||
* @param n Return the index of first species in the nth phase
|
||||
* associated with the reaction mechanism.
|
||||
*/
|
||||
size_t start(size_t n) {
|
||||
deprecatedMethod("Kinetics","start","kineticsSpeciesIndex(0,n)");
|
||||
return m_start[n];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* The location of species k of phase n in species arrays.
|
||||
* Kinetics manager classes return species production rates in
|
||||
|
|
|
|||
|
|
@ -75,22 +75,4 @@ std::string IndexError::getMessage() const
|
|||
return ss.str();
|
||||
}
|
||||
|
||||
// *** Warnings ***
|
||||
|
||||
void deprecatedMethod(std::string classnm, std::string oldnm, std::string newnm)
|
||||
{
|
||||
writelog(">>>> WARNING: method "+oldnm+" of class "+classnm
|
||||
+" is deprecated.\n");
|
||||
writelog(" Use method "+newnm+" instead.\n");
|
||||
writelog(" (If you want to rescue this method from deprecated\n");
|
||||
writelog(" status, see http://www.cantera.org/deprecated.html)");
|
||||
}
|
||||
|
||||
void removeAtVersion(std::string func, std::string version)
|
||||
{
|
||||
writelog("Removed procedure: "+func+"\n");
|
||||
writelog("Removed in version: "+version+"\n");
|
||||
throw CanteraError("removeAtVersion: "+ func,"procedure has been removed.");
|
||||
}
|
||||
|
||||
} // namespace Cantera
|
||||
|
|
|
|||
|
|
@ -693,7 +693,7 @@ extern "C" {
|
|||
integer kin_start_(const integer* n, integer* p)
|
||||
{
|
||||
try {
|
||||
return _fkin(n)->start(*p)+1;
|
||||
return _fkin(n)->kineticsSpeciesIndex(0, *p)+1;
|
||||
} catch (...) {
|
||||
return handleAllExceptions(-1, ERR);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue