Skip to content

Commit

Permalink
Simplify the Class interface in the next ABI
Browse files Browse the repository at this point in the history
  • Loading branch information
stephen-webb committed Oct 25, 2024
1 parent 0ff3c8a commit b90ae4a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/main/cpp/class.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,12 @@ Class::~Class()
{
}

#if LOG4CXX_ABI_VERSION <= 15
LogString Class::toString() const
{
return getName();
}
#endif

Object* Class::newInstance() const
{
Expand Down
2 changes: 1 addition & 1 deletion src/main/cpp/optionconverter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ void OptionConverter::selectAndConfigure(const File& configFileName,
filename.substr(filename.length() - 4),
LOG4CXX_STR(".XML"), LOG4CXX_STR(".xml")))
{
clazz = LOG4CXX_NS::xml::DOMConfigurator::getStaticClass().toString();
clazz = LOG4CXX_NS::xml::DOMConfigurator::getStaticClass().getName();
}
#endif

Expand Down
2 changes: 2 additions & 0 deletions src/main/include/log4cxx/helpers/class.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ class LOG4CXX_EXPORT Class
public:
virtual ~Class();
virtual Object* newInstance() const;
#if LOG4CXX_ABI_VERSION <= 15
LogString toString() const;
#endif
virtual LogString getName() const = 0;
static const Class& forName(const LogString& className);
static bool registerClass(const Class& newClass);
Expand Down

0 comments on commit b90ae4a

Please sign in to comment.