00001 //--------------------------------------------------------------------------- 00002 /// \file CATPlatform_Win32.cpp 00003 /// \brief Platform-specific object creation (Win32) 00004 /// \ingroup CAT 00005 /// 00006 /// Copyright (c) 2003-2008 by Michael Ellison. 00007 /// See COPYING.txt for the \ref gaslicense License (MIT License). 00008 /// 00009 // $Author: mikeellison $ 00010 // $Date: 2008-01-21 08:33:12 -0600 (Mon, 21 Jan 2008) $ 00011 // $Revision: $ 00012 // $NoKeywords: $ 00013 // 00014 //--------------------------------------------------------------------------- 00015 #include "CATPlatform.h" 00016 00017 #include "CATFileSystem.h" 00018 #include "CATFileSystem_Win32.h" 00019 #include "CATMutex.h" 00020 00021 CATPlatform* gPlatform = 0; 00022 00023 //--------------------------------------------------------------------------- 00024 CATPlatform::CATPlatform() 00025 { 00026 } 00027 00028 CATPlatform::~CATPlatform() 00029 { 00030 } 00031 //--------------------------------------------------------------------------- 00032 CATFileSystem* CATPlatform::GetFileSystem( const CATString& basePath ) 00033 { 00034 CATFileSystem* fileSystem = new CATFileSystem_Win32(basePath); 00035 CATASSERT(fileSystem != 0, "Failed to create filesystem!"); 00036 return fileSystem; 00037 } 00038 00039 //--------------------------------------------------------------------------- 00040 void CATPlatform::Release(CATFileSystem*& fileSystem) 00041 { 00042 // Filesystems are reference counted for their child objects. Only 00043 // delete if count hits zero. 00044 if (fileSystem != 0) 00045 { 00046 delete fileSystem; 00047 fileSystem = 0; 00048 } 00049 } 00050