g3log/test_unit/tester_sharedlib.cpp
Kjell Hedström - seeking Senior Engineering roles as well as contract opportunities cf91227966
adding consistent and easy formatting (#508)
*  clang format configuration file replaces sublime Astyleformatter
* instructions added to pull request template
* code base re-formatted to be consistent throughout.
2023-11-30 16:17:45 -07:00

36 lines
1.1 KiB
C++

/** ==========================================================================
* 2014 by KjellKod.cc. This is PUBLIC DOMAIN to use at your own risk and comes
* with no warranties. This code is yours to share, use and modify with no
* strings attached and no restrictions or obligations.
*
* For more information see g3log/LICENSE or refer refer to http://unlicense.org
* ============================================================================*/
#include "tester_sharedlib.h"
#include <g3log/g3log.hpp>
#include <g3log/logworker.hpp>
struct RuntimeLoadedLib : public SomeLibrary {
RuntimeLoadedLib() {
LOG(INFO) << "Library was created";
LOGF(INFO, "Ready for testing");
}
~RuntimeLoadedLib() {
LOG(G3LOG_DEBUG) << "Library destroyed";
}
void action() {
LOG(WARNING) << "Action, action, action. Safe for LOG calls by runtime dynamically loaded libraries";
}
};
struct RealLibraryFactory : public LibraryFactory {
SomeLibrary* CreateLibrary() {
return new RuntimeLoadedLib;
}
};
RealLibraryFactory testRealFactory;