diff --git a/include/loki/OrderedStatic.h b/include/loki/OrderedStatic.h index f0c6656..f488555 100755 --- a/include/loki/OrderedStatic.h +++ b/include/loki/OrderedStatic.h @@ -21,7 +21,7 @@ #include #include "loki/Singleton.h" -#include "loki/TypeList.h" +#include "loki/Typelist.h" namespace Loki diff --git a/test/Longevity/main2.cpp b/test/Longevity/main2.cpp index 249f4d0..f313e2c 100755 --- a/test/Longevity/main2.cpp +++ b/test/Longevity/main2.cpp @@ -12,14 +12,14 @@ // singletons and globally and locally defined dynamically allocated // objects. // -// The program defines three classes: Example, Keyboard and Log. +// The program defines three classes: Example, Keyboard and LogClass. // // The purpose of the Example class is to send a message to cout // when an Example object is being destroyed. // // The Keyboard class is a singleton. // -// The Log class is also a singleton. +// The LogClass class is also a singleton. // // The pGlobal object is deleted using an adapter functor to // customize Example's destruction (see destGlobal()). @@ -41,7 +41,7 @@ // 1) The global object // 2) The local object // 3) The Keyboard singleton -// 4) The Log singleton +// 4) The LogClass singleton // // Examples: // longevity 1 2 3 4 @@ -104,23 +104,23 @@ inline unsigned int GetLongevity(Keyboard *) typedef SingletonHolder keyboard; -// A singleton Log object derived from the Example class. +// A singleton LogClass object derived from the Example class. // Its longevity is set by the user on the command line. // -class Log : public Example +class LogClass : public Example { public: - Log() : Example("Destroying Log") + LogClass() : Example("Destroying LogClass") { } } ; -inline unsigned int GetLongevity(Log *) +inline unsigned int GetLongevity(LogClass *) { return logPriority; } -typedef SingletonHolder log; +typedef SingletonHolder LogBook; // Instantiate a global Example object. It's not a singleton @@ -146,7 +146,7 @@ void help(const char *s) cout << " par1: global object\n"; cout << " par2: local object\n"; cout << " par3: keyboard singleton\n"; - cout << " par4: log singleton\n"; + cout << " par4: LogBook singleton\n"; cout << "Example: " << s << " 1 2 3 4" << endl; } @@ -179,7 +179,7 @@ int main(int argc, char *argv[]) pLocal->echo("pLocal created after main() started."); // Instantiate both singletons by calling them... - log::Instance().echo("Log singleton instantiated"); + LogBook::Instance().echo("LogClass singleton instantiated"); keyboard::Instance().echo("Keyboard singleton instantiated"); return 0; diff --git a/test/Singleton/DeletableSingleton.cpp b/test/Singleton/DeletableSingleton.cpp index 2ce1260..f6a22be 100755 --- a/test/Singleton/DeletableSingleton.cpp +++ b/test/Singleton/DeletableSingleton.cpp @@ -12,14 +12,14 @@ // // Expected output: // -// Log::Log() -// Log singleton instantiated -// Going to manually delete log. -// Log::~Log() -// Log::Log() -// Log reinstantiated. +// LogClass::LogClass() +// LogClass singleton instantiated +// Going to manually delete LogBook. +// LogClass::~LogClass() +// LogClass::LogClass() +// LogClass reinstantiated. // Going to terminate program now. -// Log::~Log() +// LogClass::~LogClass() // #include @@ -28,19 +28,19 @@ using namespace std; // okay for small programs using namespace Loki; // okay for small programs -// A singleton Log object derived from the Example class. +// A singleton LogClass object derived from the Example class. // Its longevity is set by the user on the command line. // -class Log +class LogClass { public: - Log() + LogClass() { - print("Log::Log()"); + print("LogClass::LogClass()"); }; - ~Log() + ~LogClass() { - print("Log::~Log()"); + print("LogClass::~LogClass()"); } void print(const char *s) { @@ -48,7 +48,7 @@ public: } }; -typedef SingletonHolder log; +typedef SingletonHolder LogBook; class Example { @@ -63,13 +63,13 @@ public: int main(int argc, char *argv[]) { // Instantiate both singletons by calling them... - log::Instance().print("Log singleton instantiated"); - log::Instance().print("Going to manually delete log."); + LogBook::Instance().print("LogClass singleton instantiated"); + LogBook::Instance().print("Going to manually delete LogBook."); - DeletableSingleton::GracefulDelete(); + DeletableSingleton::GracefulDelete(); - log::Instance().print("Log reinstantiated."); - log::Instance().print("Going to terminate program now."); + LogBook::Instance().print("LogClass reinstantiated."); + LogBook::Instance().print("Going to terminate program now."); #if defined(__BORLANDC__) || defined(__GNUC__) || defined(_MSC_VER) system("pause"); // Stop console window from closing if run from IDE. diff --git a/test/Singleton/Phoenix.cpp b/test/Singleton/Phoenix.cpp index acc579c..41b0952 100755 --- a/test/Singleton/Phoenix.cpp +++ b/test/Singleton/Phoenix.cpp @@ -8,19 +8,19 @@ // for any purpose. It is provided "as is" without express or implied warranty. //////////////////////////////////////////////////////////////////////////////// -// A singleton Log object that resurrects itself after +// A singleton LogClass object that resurrects itself after // it has been automatically destroyed during program -// termination. When a dead-reference to the Log +// termination. When a dead-reference to the LogClass // singleton is detected, it is resurrected automatically. // // Expected output: // Example c'tor -// Log c'tor -// Log now instantiated. -// Log d'tor +// LogClass c'tor +// LogClass now instantiated. +// LogClass d'tor // Example d'tor starting -// Log c'tor -// Log: inside Example d'tor +// LogClass c'tor +// LogClass: inside Example d'tor // Example d'tor finished // // The last line of the output only appears when this @@ -34,16 +34,16 @@ using namespace std; // okay for small programs using namespace Loki; // okay for small programs -class Log +class LogClass { public: - Log() + LogClass() { - echo("Log c'tor"); + echo("LogClass c'tor"); } - ~Log() + ~LogClass() { - echo("Log d'tor"); + echo("LogClass d'tor"); } void echo(const char *s) { @@ -51,7 +51,7 @@ public: } }; -typedef SingletonHolder log; +typedef SingletonHolder LogBook; // A generic example class that stores and echoes a const char. @@ -66,7 +66,7 @@ public: ~Example() { echo("Example d'tor starting"); - log::Instance().echo("Log: inside Example d'tor"); + LogBook::Instance().echo("LogClass: inside Example d'tor"); echo("Example d'tor finished"); } void echo(const char *s) @@ -80,7 +80,7 @@ int main(int argc, char* argv[]) { Example *example = new Example(); SetLongevity(example, 1, &Loki::Private::Deleter::Delete); - log::Instance().echo("Log now instantiated."); + LogBook::Instance().echo("LogClass now instantiated."); #if defined(__BORLANDC__) || defined(__GNUC__) || defined(_MSC_VER) system("pause"); // Stop console window from closing if run from IDE.