/* $Date: 9/10/03 15:44 $ $Revision: 14 $ Copyright © 2000-2003, FSL Technologies Limited. Contact "http://fost3.fsltech.com". */ #include "stdafx.h" using namespace std; using namespace FSLib; namespace { Revision c_revision( L"$Archive: /FOST.3/F3Util/revision.cpp $", __DATE__, L"$Revision: 14 $", L"$Date: 9/10/03 15:44 $" ); typedef map< FSLib::wstring, Revision * > t_library; ExclusiveWrite &g_exw() { static ExclusiveWrite exw; return exw; } t_library &g_library() { static map< FSLib::wstring, Revision * > library; return library; } } /* Revision */ inline Revision::Revision() { } inline Revision::Revision( const FSLib::wstring &ssFile, const FSLib::string &compileDate, const FSLib::wstring &revision, const FSLib::wstring &revDate ) : m_ssFile(), m_compileDate( widen( compileDate ) ), m_revision(), m_revDate() { m_ssFile = ssFile.substr( 10, ssFile.length() - 12 ); m_revision = revision.substr( 11, revision.length() - 13 ); m_revDate = revDate.substr( 7, revDate.length() - 9 ); ExclusiveWrite::WriteLock lock( g_exw() ); g_library()[ m_ssFile ] = this; } inline const FSLib::wstring &Revision::file() const { return m_ssFile; } inline const FSLib::wstring &Revision::compileDate() const { return m_compileDate; } inline long Revision::revision() const { return _wtoi( m_revision.c_str() ); } inline const FSLib::wstring &Revision::revisionDate() const { return m_revDate; } inline wostream &Revision::printOn( wostream &o ) const { return o << L"revision" << L"," << m_compileDate << L"," << m_revDate << L"," << m_revision << L"," << m_ssFile << endl; } wostream &Revision::printAllOn( wostream &o ) { ExclusiveWrite::ReadLock lock( g_exw() ); for ( t_library::const_iterator i( g_library().begin() ); i != g_library().end(); ++i ) { (*i).second->printOn( o ); } return o; } Revision::t_revisions Revision::current() { ExclusiveWrite::ReadLock lock( g_exw() ); t_revisions ret; for ( t_library::const_iterator i( g_library().begin() ); i != g_library().end(); ++i ) { ret.push_back( *(*i).second ); } return ret; } /* $History: revision.cpp $ * * ***************** Version 14 ***************** * User: Kirit Date: 9/10/03 Time: 15:44 * Updated in $/FOST.3/F3Util * Headers re-arranged to give a proper SDK feel and to make determination * of required headers simpler. * * ***************** Version 12 ***************** * User: Kirit Date: 3/10/03 Time: 16:09 * Updated in $/FOST/Cpp/FSCppUtil * Added stdafx.h and stdafx.cpp pre-compiled header support. * * ***************** Version 11 ***************** * User: Kirit Date: 4/06/02 Time: 21:07 * Updated in $/FOST/Cpp/FSCppUtil * First version of Content library items. * * ***************** Version 10 ***************** * User: Kirit Date: 7/05/02 Time: 12:01 * Updated in $/FOST/Cpp/FSCppUtil * Wrapped std::basic_string<> in order to change the copy semantics to * stop the problems with using C++ in the COM layer for IIS. * * ***************** Version 9 ***************** * User: Kirit Date: 19/03/02 Time: 20:54 * Updated in $/FOST/Cpp/FSCppUtil * Corrected history from last check-in. * Updated TestAX.IDL to remove registry entries from removed classes. * * ***************** Version 8 ***************** * User: Kirit Date: 19/03/02 Time: 19:48 * Updated in $/FOST/Cpp/FSCppUtil * Debug compiles now all end in '_d'. * The C++ implementation names (Type.cppName) have been changed to also * include the DLL that the implementation is in as per the documentation. * In all source files the following have been done: * * Ensured that every header file has a revision object. * * Ensured that every translation unit has a revision object. * * Ensured that every source file (which understands comments) * has a history section. * * Changed all copyright notices to be for Obsideon Ltd. * * Changed copyright notices to use the longest possible timeframe. * * ***************** Version 7 ***************** * User: Kirit Date: 20/02/02 Time: 0:36 * Updated in $/FOST/Cpp/FSCppUtil * Removed the Revision destructor. * Added revision information to revision.hpp. * * ***************** Version 6 ***************** * User: Kirit Date: 2/12/01 Time: 15:56 * Updated in $/FOST/Cpp/FSCppUtil * Enabled accessors to read current revision information. * Made the loading and reading of revision information thread-safe (for * dynamic loading of extension DLLs). * * ***************** Version 5 ***************** * User: Kirit Date: 5/07/01 Time: 17:41 * Updated in $/FOST/FSCppUtil * First Unicode only version of FOST. * * ***************** Version 4 ***************** * User: Kirit Date: 27/06/01 Time: 15:16 * Updated in $/FOST/FSCppUtil * FSES now allows objects to be read and cached effectively. * * ***************** Version 3 ***************** * User: Kirit Date: 26/06/01 Time: 16:02 * Updated in $/FOST/FSCppUtil * Exceptions now part of std::exception */