This commit is contained in:
Glenn Maynard
2006-10-17 08:58:58 +00:00
parent 0ade73be87
commit b30163e157
2 changed files with 6 additions and 5 deletions
+5 -4
View File
@@ -37,15 +37,12 @@ namespace CourseUtil
class CourseID class CourseID
{ {
public:
RString sPath;
RString sFullTitle;
public: public:
CourseID() { Unset(); } CourseID() { Unset(); }
void Unset() { FromCourse(NULL); } void Unset() { FromCourse(NULL); }
void FromCourse( const Course *p ); void FromCourse( const Course *p );
Course *ToCourse() const; Course *ToCourse() const;
const RString &GetPath() const { return sPath; }
bool operator<( const CourseID &other ) const bool operator<( const CourseID &other ) const
{ {
return sPath < other.sPath || sFullTitle < other.sFullTitle; return sPath < other.sPath || sFullTitle < other.sFullTitle;
@@ -55,6 +52,10 @@ public:
void LoadFromNode( const XNode* pNode ); void LoadFromNode( const XNode* pNode );
RString ToString() const; RString ToString() const;
bool IsValid() const; bool IsValid() const;
private:
RString sPath;
RString sFullTitle;
}; };
#endif #endif
+1 -1
View File
@@ -1427,7 +1427,7 @@ void Profile::LoadCourseScoresFromNode( const XNode* pCourseScores )
if( pC == NULL ) if( pC == NULL )
{ {
RString sDir, sFName, sExt; RString sDir, sFName, sExt;
splitpath( courseID.sPath, sDir, sFName, sExt ); splitpath( courseID.GetPath(), sDir, sFName, sExt );
RString sFullFileName = sFName + sExt; RString sFullFileName = sFName + sExt;
FOREACH_CONST( Course*, vpAllCourses, c ) FOREACH_CONST( Course*, vpAllCourses, c )