From 0fbc3adfcede546b1547b2359c8ab2c705eb593f Mon Sep 17 00:00:00 2001 From: James Turk Date: Sun, 13 Feb 2005 22:12:02 +0000 Subject: [PATCH] .h->.hpp --- devcpp/photon.dev | 22 ++++---- include/{Application.h => Application.hpp} | 45 ++++++++++++++-- include/{Log.h => Log.hpp} | 15 +++--- include/{LogSink.h => LogSink.hpp} | 15 +++--- include/{entrypoint.h => entrypoint.hpp} | 15 +++--- include/{exceptions.h => exceptions.hpp} | 15 +++--- include/{types.h => types.hpp} | 13 +++-- include/util/{ConfigFile.h => ConfigFile.hpp} | 13 +++-- include/util/{FileBuffer.h => FileBuffer.hpp} | 15 +++--- include/util/{RandGen.h => RandGen.hpp} | 13 +++-- .../util/{VersionInfo.h => VersionInfo.hpp} | 30 ++++++----- .../util/filesys/{filesys.h => filesys.hpp} | 15 +++--- src/Application.cpp | 52 +++++++++++++++++-- src/Log.cpp | 9 ++-- src/LogSink.cpp | 7 ++- src/exceptions.cpp | 7 ++- src/util/ConfigFile.cpp | 9 ++-- src/util/FileBuffer.cpp | 9 ++-- src/util/RandGen.cpp | 7 ++- src/util/VersionInfo.cpp | 24 +++++---- src/util/filesys/filesys.cpp | 7 ++- 21 files changed, 248 insertions(+), 109 deletions(-) rename include/{Application.h => Application.hpp} (53%) rename include/{Log.h => Log.hpp} (93%) rename include/{LogSink.h => LogSink.hpp} (94%) rename include/{entrypoint.h => entrypoint.hpp} (82%) rename include/{exceptions.h => exceptions.hpp} (96%) rename include/{types.h => types.hpp} (83%) rename include/util/{ConfigFile.h => ConfigFile.hpp} (96%) rename include/util/{FileBuffer.h => FileBuffer.hpp} (89%) rename include/util/{RandGen.h => RandGen.hpp} (92%) rename include/util/{VersionInfo.h => VersionInfo.hpp} (79%) rename include/util/filesys/{filesys.h => filesys.hpp} (94%) diff --git a/devcpp/photon.dev b/devcpp/photon.dev index e431e25..61d6555 100644 --- a/devcpp/photon.dev +++ b/devcpp/photon.dev @@ -30,7 +30,7 @@ CompilerSet=0 CompilerSettings=0000001000000000000000 [Unit1] -FileName=..\include\types.h +FileName=..\include\types.hpp CompileCpp=1 Folder=include Compile=1 @@ -40,7 +40,7 @@ OverrideBuildCmd=0 BuildCmd= [Unit2] -FileName=..\include\Log.h +FileName=..\include\Log.hpp CompileCpp=1 Folder=include Compile=1 @@ -50,7 +50,7 @@ OverrideBuildCmd=0 BuildCmd= [Unit3] -FileName=..\include\LogSink.h +FileName=..\include\LogSink.hpp CompileCpp=1 Folder=include Compile=1 @@ -60,7 +60,7 @@ OverrideBuildCmd=0 BuildCmd= [Unit4] -FileName=..\include\util\ConfigFile.h +FileName=..\include\util\ConfigFile.hpp CompileCpp=1 Folder=include/util Compile=1 @@ -70,7 +70,7 @@ OverrideBuildCmd=0 BuildCmd= [Unit5] -FileName=..\include\util\RandGen.h +FileName=..\include\util\RandGen.hpp CompileCpp=1 Folder=include/util Compile=1 @@ -80,7 +80,7 @@ OverrideBuildCmd=0 BuildCmd= [Unit6] -FileName=..\include\util\VersionInfo.h +FileName=..\include\util\VersionInfo.hpp CompileCpp=1 Folder=include/util Compile=1 @@ -130,7 +130,7 @@ OverrideBuildCmd=0 BuildCmd= [Unit13] -FileName=..\include\exceptions.h +FileName=..\include\exceptions.hpp CompileCpp=1 Folder=include Compile=1 @@ -158,7 +158,7 @@ ProductVersion= AutoIncBuildNr=0 [Unit14] -FileName=..\include\util\FileBuffer.h +FileName=..\include\util\FileBuffer.hpp CompileCpp=1 Folder=include/util Compile=1 @@ -198,7 +198,7 @@ OverrideBuildCmd=0 BuildCmd= [Unit17] -FileName=..\include\util\filesys\filesys.h +FileName=..\include\util\filesys\filesys.hpp CompileCpp=1 Folder=include/util Compile=1 @@ -218,7 +218,7 @@ OverrideBuildCmd=0 BuildCmd= [Unit18] -FileName=..\include\Application.h +FileName=..\include\Application.hpp CompileCpp=1 Folder=include Compile=1 @@ -238,7 +238,7 @@ OverrideBuildCmd=0 BuildCmd= [Unit20] -FileName=..\include\entrypoint.h +FileName=..\include\entrypoint.hpp CompileCpp=1 Folder=include Compile=1 diff --git a/include/Application.h b/include/Application.hpp similarity index 53% rename from include/Application.h rename to include/Application.hpp index fb6a541..b738103 100644 --- a/include/Application.h +++ b/include/Application.hpp @@ -5,21 +5,27 @@ // James Turk (jpt2433@rit.edu) // // Version: -// $Id: Application.h,v 1.1 2005/02/07 02:00:48 cozman Exp $ +// $Id: Application.hpp,v 1.1 2005/02/13 22:12:03 cozman Exp $ // // Revisions: -// $Log: Application.h,v $ +// $Log: Application.hpp,v $ +// Revision 1.1 2005/02/13 22:12:03 cozman +// .h->.hpp +// // Revision 1.1 2005/02/07 02:00:48 cozman // Application re-integrated // // -#ifndef PHOTON_APPLICATION_H -#define PHOTON_APPLICATION_H +#ifndef PHOTON_APPLICATION_HPP +#define PHOTON_APPLICATION_HPP #include #include +#include "types.hpp" +#include "util/VersionInfo.hpp" + namespace photon { @@ -56,8 +62,37 @@ public: // See Also: // virtual int main(StrVec args)=0; + +// Group: API Initialization +private: + // Function: ensureVersion + // Checks a version of a library against the required version, throws + // an APIError if the version is not met. + // + // Parameters: + // library - Name of library being initialized. + // version - Version of library being used. + // required - Required version of library. + void ensureVersion(const std::string& library, + const util::VersionInfo& version, + const util::VersionInfo& required); + + // Function: initPhysFS + // Initialize PhysFS for use. + // + // Parameters: + // arg0 - Path to application (argv[0]) + util::VersionInfo initPhysFS(const char* arg0); + + // Function: initGLFW + // Initialize GLFW for use. + util::VersionInfo initGLFW(); + +// VersionInfos +private: + util::VersionInfo photonVer; }; } -#endif //PHOTON_APPLICATION_H +#endif //PHOTON_APPLICATION_HPP diff --git a/include/Log.h b/include/Log.hpp similarity index 93% rename from include/Log.h rename to include/Log.hpp index dbb61b3..4f277bc 100644 --- a/include/Log.h +++ b/include/Log.hpp @@ -5,10 +5,13 @@ // James Turk (jpt2433@rit.edu) // // Version: -// $Id: Log.h,v 1.3 2005/02/07 01:48:26 cozman Exp $ +// $Id: Log.hpp,v 1.1 2005/02/13 22:12:03 cozman Exp $ // // Revisions: -// $Log: Log.h,v $ +// $Log: Log.hpp,v $ +// Revision 1.1 2005/02/13 22:12:03 cozman +// .h->.hpp +// // Revision 1.3 2005/02/07 01:48:26 cozman // string references // @@ -20,14 +23,14 @@ // // -#ifndef PHOTON_LOG_H -#define PHOTON_LOG_H +#ifndef PHOTON_LOG_HPP +#define PHOTON_LOG_HPP #include #include #include -#include "LogSink.h" +#include "LogSink.hpp" namespace photon { @@ -134,4 +137,4 @@ extern Log log; } -#endif //PHOTON_LOG_H +#endif //PHOTON_LOG_HPP diff --git a/include/LogSink.h b/include/LogSink.hpp similarity index 94% rename from include/LogSink.h rename to include/LogSink.hpp index b8473f4..e02c725 100644 --- a/include/LogSink.h +++ b/include/LogSink.hpp @@ -5,10 +5,13 @@ // James Turk (jpt2433@rit.edu) // // Version: -// $Id: LogSink.h,v 1.5 2005/02/07 01:48:26 cozman Exp $ +// $Id: LogSink.hpp,v 1.1 2005/02/13 22:12:03 cozman Exp $ // // Revisions: -// $Log: LogSink.h,v $ +// $Log: LogSink.hpp,v $ +// Revision 1.1 2005/02/13 22:12:03 cozman +// .h->.hpp +// // Revision 1.5 2005/02/07 01:48:26 cozman // string references // @@ -26,13 +29,13 @@ // // -#ifndef PHOTON_LOGSINK_H -#define PHOTON_LOGSINK_H +#ifndef PHOTON_LOGSINK_HPP +#define PHOTON_LOGSINK_HPP #include #include -#include "types.h" +#include "types.hpp" namespace photon { @@ -178,4 +181,4 @@ private: } -#endif //PHOTON_LOGSINK_H +#endif //PHOTON_LOGSINK_HPP diff --git a/include/entrypoint.h b/include/entrypoint.hpp similarity index 82% rename from include/entrypoint.h rename to include/entrypoint.hpp index bcdb135..cb87e82 100644 --- a/include/entrypoint.h +++ b/include/entrypoint.hpp @@ -5,20 +5,23 @@ // James Turk (jpt2433@rit.edu) // // Version: -// $Id: entrypoint.h,v 1.1 2005/02/07 02:00:48 cozman Exp $ +// $Id: entrypoint.hpp,v 1.1 2005/02/13 22:12:03 cozman Exp $ // // Revisions: -// $Log: entrypoint.h,v $ +// $Log: entrypoint.hpp,v $ +// Revision 1.1 2005/02/13 22:12:03 cozman +// .h->.hpp +// // Revision 1.1 2005/02/07 02:00:48 cozman // Application re-integrated // // -#ifndef PHOTON_ENTRYPOINT_H -#define PHOTON_ENTRYPOINT_H +#ifndef PHOTON_ENTRYPOINT_HPP +#define PHOTON_ENTRYPOINT_HPP -#include "Log.h" +#include "Log.hpp" /* Title: Entrypoint */ @@ -61,4 +64,4 @@ int mainclass(int argc, char *argv[]) } -#endif //PHOTON_ENTRYPOINT_H +#endif //PHOTON_ENTRYPOINT_HPP diff --git a/include/exceptions.h b/include/exceptions.hpp similarity index 96% rename from include/exceptions.h rename to include/exceptions.hpp index a3f4ecd..ab52620 100644 --- a/include/exceptions.h +++ b/include/exceptions.hpp @@ -5,10 +5,13 @@ // James Turk (jpt2433@rit.edu) // // Version: -// $Id: exceptions.h,v 1.5 2005/02/07 01:48:26 cozman Exp $ +// $Id: exceptions.hpp,v 1.1 2005/02/13 22:12:03 cozman Exp $ // // Revisions: -// $Log: exceptions.h,v $ +// $Log: exceptions.hpp,v $ +// Revision 1.1 2005/02/13 22:12:03 cozman +// .h->.hpp +// // Revision 1.5 2005/02/07 01:48:26 cozman // string references // @@ -26,10 +29,10 @@ // // -#ifndef PHOTON_EXCEPTIONS_H -#define PHOTON_EXCEPTIONS_H +#ifndef PHOTON_EXCEPTIONS_HPP +#define PHOTON_EXCEPTIONS_HPP -#include "types.h" +#include "types.hpp" #include #include #include @@ -256,4 +259,4 @@ public: } -#endif //PHOTON_EXCEPTIONS_H +#endif //PHOTON_EXCEPTIONS_HPP diff --git a/include/types.h b/include/types.hpp similarity index 83% rename from include/types.h rename to include/types.hpp index 5bc2e18..13c646b 100644 --- a/include/types.h +++ b/include/types.hpp @@ -5,10 +5,13 @@ // James Turk (jpt2433@rit.edu) // // Version: -// $Id: types.h,v 1.3 2005/02/07 01:48:26 cozman Exp $ +// $Id: types.hpp,v 1.1 2005/02/13 22:12:03 cozman Exp $ // // Revisions: -// $Log: types.h,v $ +// $Log: types.hpp,v $ +// Revision 1.1 2005/02/13 22:12:03 cozman +// .h->.hpp +// // Revision 1.3 2005/02/07 01:48:26 cozman // string references // @@ -20,8 +23,8 @@ // // -#ifndef PHOTON_TYPES_H -#define PHOTON_TYPES_H +#ifndef PHOTON_TYPES_HPP +#define PHOTON_TYPES_HPP #include @@ -56,4 +59,4 @@ namespace photon { } -#endif //PHOTON_TYPES_H +#endif //PHOTON_TYPES_HPP diff --git a/include/util/ConfigFile.h b/include/util/ConfigFile.hpp similarity index 96% rename from include/util/ConfigFile.h rename to include/util/ConfigFile.hpp index a393788..f71c7e2 100644 --- a/include/util/ConfigFile.h +++ b/include/util/ConfigFile.hpp @@ -5,10 +5,13 @@ // James Turk (jpt2433@rit.edu) // // Version: -// $Id: ConfigFile.h,v 1.4 2005/02/05 03:00:41 cozman Exp $ +// $Id: ConfigFile.hpp,v 1.1 2005/02/13 22:12:04 cozman Exp $ // // Revisions: -// $Log: ConfigFile.h,v $ +// $Log: ConfigFile.hpp,v $ +// Revision 1.1 2005/02/13 22:12:04 cozman +// .h->.hpp +// // Revision 1.4 2005/02/05 03:00:41 cozman // fixed binary_function // @@ -23,8 +26,8 @@ // // -#ifndef PHOTON_UTIL_CONFIGFILE_H -#define PHOTON_UTIL_CONFIGFILE_H +#ifndef PHOTON_UTIL_CONFIGFILE_HPP +#define PHOTON_UTIL_CONFIGFILE_HPP #include #include @@ -247,4 +250,4 @@ ConfigFile::getVariable(const std::string& sec, } } -#endif //PHOTON_UTIL_CONFIGFILE_H +#endif //PHOTON_UTIL_CONFIGFILE_HPP diff --git a/include/util/FileBuffer.h b/include/util/FileBuffer.hpp similarity index 89% rename from include/util/FileBuffer.h rename to include/util/FileBuffer.hpp index 59696eb..551c001 100644 --- a/include/util/FileBuffer.h +++ b/include/util/FileBuffer.hpp @@ -5,10 +5,13 @@ // James Turk (jpt2433@rit.edu) // // Version: -// $Id: FileBuffer.h,v 1.2 2005/02/07 01:48:26 cozman Exp $ +// $Id: FileBuffer.hpp,v 1.1 2005/02/13 22:12:04 cozman Exp $ // // Revisions: -// $Log: FileBuffer.h,v $ +// $Log: FileBuffer.hpp,v $ +// Revision 1.1 2005/02/13 22:12:04 cozman +// .h->.hpp +// // Revision 1.2 2005/02/07 01:48:26 cozman // string references // @@ -17,10 +20,10 @@ // // -#ifndef PHOTON_UTIL_FILEBUFFER_H -#define PHOTON_UTIL_FILEBUFFER_H +#ifndef PHOTON_UTIL_FILEBUFFER_HPP +#define PHOTON_UTIL_FILEBUFFER_HPP -#include "types.h" +#include "types.hpp" #include "physfs.h" @@ -120,4 +123,4 @@ private: } } -#endif //PHOTON_UTIL_FILEBUFFER_H +#endif //PHOTON_UTIL_FILEBUFFER_HPP diff --git a/include/util/RandGen.h b/include/util/RandGen.hpp similarity index 92% rename from include/util/RandGen.h rename to include/util/RandGen.hpp index 55fdeb0..330c23d 100644 --- a/include/util/RandGen.h +++ b/include/util/RandGen.hpp @@ -5,10 +5,13 @@ // James Turk (jpt2433@rit.edu) // // Version: -// $Id: RandGen.h,v 1.2 2005/02/04 21:56:39 cozman Exp $ +// $Id: RandGen.hpp,v 1.1 2005/02/13 22:12:04 cozman Exp $ // // Revisions: -// $Log: RandGen.h,v $ +// $Log: RandGen.hpp,v $ +// Revision 1.1 2005/02/13 22:12:04 cozman +// .h->.hpp +// // Revision 1.2 2005/02/04 21:56:39 cozman // RandGen implemented/tested // @@ -17,8 +20,8 @@ // // -#ifndef PHOTON_UTIL_RANDGEN_H -#define PHOTON_UTIL_RANDGEN_H +#ifndef PHOTON_UTIL_RANDGEN_HPP +#define PHOTON_UTIL_RANDGEN_HPP namespace photon { namespace util { @@ -121,4 +124,4 @@ private: //state data } } -#endif //PHOTON_UTIL_RANDGEN_H +#endif //PHOTON_UTIL_RANDGEN_HPP diff --git a/include/util/VersionInfo.h b/include/util/VersionInfo.hpp similarity index 79% rename from include/util/VersionInfo.h rename to include/util/VersionInfo.hpp index b25c670..4b5307c 100644 --- a/include/util/VersionInfo.h +++ b/include/util/VersionInfo.hpp @@ -5,10 +5,13 @@ // James Turk (jpt2433@rit.edu) // // Version: -// $Id: VersionInfo.h,v 1.3 2005/02/07 01:48:26 cozman Exp $ +// $Id: VersionInfo.hpp,v 1.1 2005/02/13 22:12:04 cozman Exp $ // // Revisions: -// $Log: VersionInfo.h,v $ +// $Log: VersionInfo.hpp,v $ +// Revision 1.1 2005/02/13 22:12:04 cozman +// .h->.hpp +// // Revision 1.3 2005/02/07 01:48:26 cozman // string references // @@ -20,8 +23,8 @@ // // -#ifndef PHOTON_UTIL_VERSIONINFO_H -#define PHOTON_UTIL_VERSIONINFO_H +#ifndef PHOTON_UTIL_VERSIONINFO_HPP +#define PHOTON_UTIL_VERSIONINFO_HPP #include #include @@ -54,27 +57,30 @@ public: // added/removed/changed. unsigned int minor; - // Variable: release - // Release number, should be changed upon every release that isn't + // Variable: patch + // Patch number, should be changed upon every release that isn't // signifigant enough to reflect a change in the minor versioning number. - unsigned int release; + unsigned int patch; // Variable: extra // String for holding extra data, such as a release name or special tag. std::string extra; // Group: (Con/De)structors + + // Function: VersionInfo + // Default constructor. + VersionInfo(); // Function: VersionInfo - // Initializing constructor, VersionInfo must be initalized with this - // constructor. + // Initializing constructor. // // Parameters: // maj - Major version number. // min - Minor version number. - // rel - Release number. + // pat - Patch number. // ext - Extra info string. [default: ""] - VersionInfo(unsigned int maj, unsigned int min, unsigned int rel, + VersionInfo(unsigned int maj, unsigned int min, unsigned int pat, std::string ext=""); //operators @@ -91,4 +97,4 @@ public: } } -#endif //PHOTON_UTIL_VERSIONINFO_H +#endif //PHOTON_UTIL_VERSIONINFO_HPP diff --git a/include/util/filesys/filesys.h b/include/util/filesys/filesys.hpp similarity index 94% rename from include/util/filesys/filesys.h rename to include/util/filesys/filesys.hpp index c2360f2..16e1a94 100644 --- a/include/util/filesys/filesys.h +++ b/include/util/filesys/filesys.hpp @@ -5,10 +5,13 @@ // James Turk (jpt2433@rit.edu) // // Version: -// $Id: filesys.h,v 1.2 2005/02/07 01:48:50 cozman Exp $ +// $Id: filesys.hpp,v 1.1 2005/02/13 22:12:04 cozman Exp $ // // Revisions: -// $Log: filesys.h,v $ +// $Log: filesys.hpp,v $ +// Revision 1.1 2005/02/13 22:12:04 cozman +// .h->.hpp +// // Revision 1.2 2005/02/07 01:48:50 cozman // fixed several issues in testing // @@ -17,10 +20,10 @@ // // -#ifndef PHOTON_UTIL_FILESYS_FILESYS_H -#define PHOTON_UTIL_FILESYS_FILESYS_H +#ifndef PHOTON_UTIL_FILESYS_FILESYS_HPP +#define PHOTON_UTIL_FILESYS_FILESYS_HPP -#include "exceptions.h" +#include "exceptions.hpp" #include "physfs.h" @@ -213,4 +216,4 @@ PHYSFS_sint64 getModTime(const std::string& item); } } -#endif //PHOTON_UTIL_FILESYS_FILESYS_H +#endif //PHOTON_UTIL_FILESYS_FILESYS_HPP diff --git a/src/Application.cpp b/src/Application.cpp index 9611ec1..cbdd259 100644 --- a/src/Application.cpp +++ b/src/Application.cpp @@ -5,31 +5,75 @@ // James Turk (jpt2433@rit.edu) // // Version: -// $Id: Application.cpp,v 1.1 2005/02/07 02:00:49 cozman Exp $ +// $Id: Application.cpp,v 1.2 2005/02/13 22:12:03 cozman Exp $ // // Revisions: // $Log: Application.cpp,v $ +// Revision 1.2 2005/02/13 22:12:03 cozman +// .h->.hpp +// // Revision 1.1 2005/02/07 02:00:49 cozman // Application re-integrated // // -#include "Application.h" +#include "Application.hpp" +#include "exceptions.hpp" #include "physfs.h" +#include "glfw.h" + +#include namespace photon { -Application::Application(const char* arg0) +Application::Application(const char* arg0) : + photonVer(0,0,1) // this is the current version { - PHYSFS_init(arg0); //init PhysFS + util::VersionInfo physfsReq(1,0,0); // requires PhysFS 1.0.0 + util::VersionInfo glfwReq(2,4,2); // requires GLFW 2.4.2 + + ensureVersion("PhysFS", initPhysFS(arg0), physfsReq); + ensureVersion("GLFW", initGLFW(), glfwReq); } Application::~Application() { PHYSFS_deinit(); //shutdown PhysFS + glfwTerminate(); //shutdown GLFW +} + +void Application::ensureVersion(const std::string& library, + const util::VersionInfo& version, + const util::VersionInfo& required) +{ + std::stringstream ss; + + if(version < required) + { + ss << library << " version " << required << " required; " << + version << "used, please update."; + throw APIError(ss.str()); + } +} + +util::VersionInfo Application::initPhysFS(const char* arg0) +{ + PHYSFS_Version ver; + PHYSFS_init(arg0); + PHYSFS_addToSearchPath(arg0,0); + PHYSFS_getLinkedVersion(&ver); + return util::VersionInfo(ver.major, ver.minor, ver.patch); +} + +util::VersionInfo Application::initGLFW() +{ + int maj,min,patch; + glfwInit(); + glfwGetVersion(&maj,&min,&patch); + return util::VersionInfo(maj,min,patch); } } diff --git a/src/Log.cpp b/src/Log.cpp index f4533be..ec6855f 100644 --- a/src/Log.cpp +++ b/src/Log.cpp @@ -5,10 +5,13 @@ // James Turk (jpt2433@rit.edu) // // Version: -// $Id: Log.cpp,v 1.3 2005/02/07 01:48:27 cozman Exp $ +// $Id: Log.cpp,v 1.4 2005/02/13 22:12:03 cozman Exp $ // // Revisions: // $Log: Log.cpp,v $ +// Revision 1.4 2005/02/13 22:12:03 cozman +// .h->.hpp +// // Revision 1.3 2005/02/07 01:48:27 cozman // string references // @@ -20,10 +23,10 @@ // // -#include "Log.h" +#include "Log.hpp" #include -#include "exceptions.h" +#include "exceptions.hpp" namespace photon { diff --git a/src/LogSink.cpp b/src/LogSink.cpp index 2dbb462..ac1a814 100644 --- a/src/LogSink.cpp +++ b/src/LogSink.cpp @@ -5,10 +5,13 @@ // James Turk (jpt2433@rit.edu) // // Version: -// $Id: LogSink.cpp,v 1.5 2005/02/07 01:48:27 cozman Exp $ +// $Id: LogSink.cpp,v 1.6 2005/02/13 22:12:03 cozman Exp $ // // Revisions: // $Log: LogSink.cpp,v $ +// Revision 1.6 2005/02/13 22:12:03 cozman +// .h->.hpp +// // Revision 1.5 2005/02/07 01:48:27 cozman // string references // @@ -26,7 +29,7 @@ // // -#include "LogSink.h" +#include "LogSink.hpp" #include diff --git a/src/exceptions.cpp b/src/exceptions.cpp index ab47520..25969d6 100644 --- a/src/exceptions.cpp +++ b/src/exceptions.cpp @@ -5,10 +5,13 @@ // James Turk (jpt2433@rit.edu) // // Version: -// $Id: exceptions.cpp,v 1.3 2005/02/07 01:48:27 cozman Exp $ +// $Id: exceptions.cpp,v 1.4 2005/02/13 22:12:03 cozman Exp $ // // Revisions: // $Log: exceptions.cpp,v $ +// Revision 1.4 2005/02/13 22:12:03 cozman +// .h->.hpp +// // Revision 1.3 2005/02/07 01:48:27 cozman // string references // @@ -21,7 +24,7 @@ // -#include "exceptions.h" +#include "exceptions.hpp" namespace photon diff --git a/src/util/ConfigFile.cpp b/src/util/ConfigFile.cpp index 49df1f4..411ce24 100644 --- a/src/util/ConfigFile.cpp +++ b/src/util/ConfigFile.cpp @@ -5,10 +5,13 @@ // James Turk (jpt2433@rit.edu) // // Version: -// $Id: ConfigFile.cpp,v 1.2 2005/01/31 15:44:13 cozman Exp $ +// $Id: ConfigFile.cpp,v 1.3 2005/02/13 22:12:03 cozman Exp $ // // Revisions: // $Log: ConfigFile.cpp,v $ +// Revision 1.3 2005/02/13 22:12:03 cozman +// .h->.hpp +// // Revision 1.2 2005/01/31 15:44:13 cozman // ConfigFile rewrite // @@ -17,8 +20,8 @@ // // -#include "util/ConfigFile.h" -#include "exceptions.h" +#include "util/ConfigFile.hpp" +#include "exceptions.hpp" #include #include diff --git a/src/util/FileBuffer.cpp b/src/util/FileBuffer.cpp index bc3af09..8b2f50f 100644 --- a/src/util/FileBuffer.cpp +++ b/src/util/FileBuffer.cpp @@ -5,10 +5,13 @@ // James Turk (jpt2433@rit.edu) // // Version: -// $Id: FileBuffer.cpp,v 1.2 2005/02/07 01:48:27 cozman Exp $ +// $Id: FileBuffer.cpp,v 1.3 2005/02/13 22:12:03 cozman Exp $ // // Revisions: // $Log: FileBuffer.cpp,v $ +// Revision 1.3 2005/02/13 22:12:03 cozman +// .h->.hpp +// // Revision 1.2 2005/02/07 01:48:27 cozman // string references // @@ -17,9 +20,9 @@ // // -#include "util/FileBuffer.h" +#include "util/FileBuffer.hpp" -#include "exceptions.h" +#include "exceptions.hpp" namespace photon { diff --git a/src/util/RandGen.cpp b/src/util/RandGen.cpp index e03eb40..56a9821 100644 --- a/src/util/RandGen.cpp +++ b/src/util/RandGen.cpp @@ -5,10 +5,13 @@ // James Turk (jpt2433@rit.edu) // // Version: -// $Id: RandGen.cpp,v 1.2 2005/02/04 21:56:40 cozman Exp $ +// $Id: RandGen.cpp,v 1.3 2005/02/13 22:12:03 cozman Exp $ // // Revisions: // $Log: RandGen.cpp,v $ +// Revision 1.3 2005/02/13 22:12:03 cozman +// .h->.hpp +// // Revision 1.2 2005/02/04 21:56:40 cozman // RandGen implemented/tested // @@ -64,7 +67,7 @@ //http://www.math.keio.ac.jp/matumoto/emt.html //email: matumoto@math.keio.ac.jp -#include "util/RandGen.h" +#include "util/RandGen.hpp" #include namespace photon { diff --git a/src/util/VersionInfo.cpp b/src/util/VersionInfo.cpp index 263da85..ecb3293 100644 --- a/src/util/VersionInfo.cpp +++ b/src/util/VersionInfo.cpp @@ -5,10 +5,13 @@ // James Turk (jpt2433@rit.edu) // // Version: -// $Id: VersionInfo.cpp,v 1.2 2005/02/05 02:57:07 cozman Exp $ +// $Id: VersionInfo.cpp,v 1.3 2005/02/13 22:12:03 cozman Exp $ // // Revisions: // $Log: VersionInfo.cpp,v $ +// Revision 1.3 2005/02/13 22:12:03 cozman +// .h->.hpp +// // Revision 1.2 2005/02/05 02:57:07 cozman // *** empty log message *** // @@ -17,16 +20,19 @@ // // -#include "util/VersionInfo.h" +#include "util/VersionInfo.hpp" namespace photon { namespace util { -VersionInfo::VersionInfo(unsigned int maj, unsigned int min, unsigned int rel, +VersionInfo::VersionInfo(unsigned int maj, unsigned int min, unsigned int pat, std::string ext) : - major(maj), minor(min), release(rel), extra(ext) -{ -} + major(maj), minor(min), patch(pat), extra(ext) +{} + +VersionInfo::VersionInfo() : + major(0), minor(0), patch(0) +{} bool VersionInfo::operator<(const VersionInfo &rhs) const { @@ -39,7 +45,7 @@ bool VersionInfo::operator<(const VersionInfo &rhs) const return true; else if(this->minor == rhs.minor) { - if(this->release < rhs.release) + if(this->patch < rhs.patch) return true; } } @@ -53,7 +59,7 @@ bool VersionInfo::operator<=(const VersionInfo &rhs) const bool VersionInfo::operator==(const VersionInfo &rhs) const { - return this->extra == rhs.extra && this->release == rhs.release && + return this->extra == rhs.extra && this->patch == rhs.patch && this->minor == rhs.minor && this->major == rhs.major; } @@ -69,7 +75,7 @@ bool VersionInfo::operator>(const VersionInfo &rhs) const std::ostream& operator<<(std::ostream &o, const VersionInfo &rhs) { - return o << rhs.major << '.' << rhs.minor << '.' << rhs.release << + return o << rhs.major << '.' << rhs.minor << '.' << rhs.patch << " [" << rhs.extra << "]"; } diff --git a/src/util/filesys/filesys.cpp b/src/util/filesys/filesys.cpp index 5c26c35..e8d191b 100644 --- a/src/util/filesys/filesys.cpp +++ b/src/util/filesys/filesys.cpp @@ -5,10 +5,13 @@ // James Turk (jpt2433@rit.edu) // // Version: -// $Id: filesys.cpp,v 1.2 2005/02/07 01:48:51 cozman Exp $ +// $Id: filesys.cpp,v 1.3 2005/02/13 22:12:03 cozman Exp $ // // Revisions: // $Log: filesys.cpp,v $ +// Revision 1.3 2005/02/13 22:12:03 cozman +// .h->.hpp +// // Revision 1.2 2005/02/07 01:48:51 cozman // fixed several issues in testing // @@ -18,7 +21,7 @@ // -#include "util/filesys/filesys.h" +#include "util/filesys/filesys.hpp" namespace photon {