These have no state and only static methods. Make them namespaces.

This commit is contained in:
Steve Checkoway
2006-09-13 08:35:50 +00:00
parent 09663989be
commit 1dec26279a
2 changed files with 17 additions and 19 deletions
+9 -10
View File
@@ -1,21 +1,20 @@
/* CourseLoaderCRS - Reads a Course from an .CRS file. */
#ifndef CourseLoaderCRS_H
#define CourseLoaderCRS_H
#ifndef COURSE_LOADER_CRS_H
#define COURSE_LOADER_CRS_H
#include "GameConstantsAndTypes.h"
class Course;
class MsdFile;
class CourseLoaderCRS
namespace CourseLoaderCRS
{
public:
static bool LoadFromCRSFile( const RString &sPath, Course &out );
static bool LoadFromMsd( const RString &sPath, const MsdFile &msd, Course &out, bool bFromCache );
static bool LoadFromBuffer( const RString &sPath, const RString &sBuffer, Course &out );
static bool LoadEditFromFile( const RString &sEditFilePath, ProfileSlot slot );
static bool LoadEditFromBuffer( const RString &sBuffer, const RString &sPath, ProfileSlot slot );
};
bool LoadFromCRSFile( const RString &sPath, Course &out );
bool LoadFromMsd( const RString &sPath, const MsdFile &msd, Course &out, bool bFromCache );
bool LoadFromBuffer( const RString &sPath, const RString &sBuffer, Course &out );
bool LoadEditFromFile( const RString &sEditFilePath, ProfileSlot slot );
bool LoadEditFromBuffer( const RString &sBuffer, const RString &sPath, ProfileSlot slot );
}
#endif
+8 -9
View File
@@ -1,19 +1,18 @@
/* CourseWriterCRS - Writes a Course to an .CRS file. */
#ifndef CourseWriterCRS_H
#define CourseWriterCRS_H
#ifndef COURSE_WRITER_CRS_H
#define COURSE_WRITER_CRS_H
class Course;
class RageFileBasic;
class CourseWriterCRS
namespace CourseWriterCRS
{
public:
static bool Write( const Course &course, RageFileBasic &f, bool bSavingCache );
static bool Write( const Course &course, const RString &sPath, bool bSavingCache );
static void GetEditFileContents( const Course *pCourse, RString &sOut );
static void WriteEditFileToMachine( const Course *pCourse );
};
bool Write( const Course &course, RageFileBasic &f, bool bSavingCache );
bool Write( const Course &course, const RString &sPath, bool bSavingCache );
void GetEditFileContents( const Course *pCourse, RString &sOut );
void WriteEditFileToMachine( const Course *pCourse );
}
#endif