Skip to content

Commit

Permalink
[Func1] Return demangled C++ class name
Browse files Browse the repository at this point in the history
  • Loading branch information
ischoegl authored and speth committed Jul 1, 2023
1 parent 5dfbc6e commit c496697
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/cantera/numerics/Func1.h
Expand Up @@ -132,6 +132,10 @@ class Func1
return "functor";
}

//! Returns a string describing the type of the function
//! @since New in Cantera 3.0.
string type_name() const;

//! Calls method eval to evaluate the function
doublereal operator()(doublereal t) const;

Expand Down
5 changes: 5 additions & 0 deletions src/numerics/Func1.cpp
Expand Up @@ -46,6 +46,11 @@ int Func1::ID() const
return 0;
}

string Func1::type_name() const
{
return demangle(typeid(*this));
}

// Calls method eval to evaluate the function
doublereal Func1::operator()(doublereal t) const
{
Expand Down

0 comments on commit c496697

Please sign in to comment.