Changeset 211
- Timestamp:
- 02/07/08 15:19:33 (4 years ago)
- Files:
-
- branches/2.3.2beta3/src/include/project.h (modified) (2 diffs)
- branches/2.3.2beta3/src/project.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/2.3.2beta3/src/include/project.h
r38 r211 15 15 */ 16 16 17 /** 18 * \file project.h 19 * Project object. 20 * \author François Ingelrest 21 * \author Andrew Schofield 22 **/ 23 17 24 #ifndef _PROJECT_H 18 25 #define _PROJECT_H … … 24 31 #include "dataOutputStream.h" 25 32 26 33 /** 34 * The project class. 35 **/ 27 36 class Project 28 37 { 29 38 protected: 30 CoreId mCoreId; 31 WuCredit mCredit; 32 wxUint16 mPreferredDeadlineInDays; 33 wxUint16 mFinalDeadlineInDays; 34 wxUint16 mNbFrames; 35 ProjectId mProjectId; 39 CoreId mCoreId; /**< The project coreId */ 40 WuCredit mCredit; /**< The project credit value */ 41 wxUint16 mPreferredDeadlineInDays; /**< The project preferred deadline */ 42 wxUint16 mFinalDeadlineInDays; /**< The project final deadline */ 43 wxUint16 mNbFrames; /**< The number of frames in the current WU */ 44 ProjectId mProjectId; /**< The project projectId */ 36 45 37 46 38 47 public: 48 /** 49 * Contructor. 50 * Contructs the project object. 51 * @param projectId The Project number from the PRCG. 52 * @param preferredDeadlineInDays Project preferred deadline. 53 * @param finalDeadlineInDays Project final deadline. 54 * @param nbFrames Frame count. 55 * @param credit Project credit value. 56 * @param coreId Project core type. 57 **/ 39 58 Project(ProjectId projectId = 0, wxUint16 preferredDeadlineInDays = 0, wxUint16 finalDeadlineInDays = 0, wxUint16 nbFrames = 0, WuCredit credit = 0, CoreId coreId = Core::UNKNOWN); 40 59 60 /** 61 * Write this project to the disk. 62 * @param out The output stream. 63 **/ 41 64 void Write(DataOutputStream& out) const; 65 66 /** 67 * Read the project from the disk. 68 * @param in The input stream. 69 **/ 42 70 void Read(DataInputStream& in); 43 71 44 72 // --- Setters 73 /** 74 * Set the project number. 75 **/ 45 76 void SetProjectId(ProjectId projectId) {mProjectId = projectId;} 77 78 /** 79 * Set the preferred deadline. 80 **/ 46 81 void SetPreferredDeadlineInDays(wxUint16 deadline) {mPreferredDeadlineInDays = deadline;} 82 83 /** 84 * Set the final deadline. 85 **/ 47 86 void SetFinalDeadlineInDays(wxUint16 deadline) {mFinalDeadlineInDays = deadline;} 87 88 /** 89 * Set the frame count. 90 **/ 48 91 void SetNbFrames(wxUint16 nbFrames) {mNbFrames = nbFrames;} 92 93 /** 94 * Set the credit value. 95 **/ 49 96 void SetCredit(WuCredit credit) {mCredit = credit;} 97 98 /** 99 * Set the core type. 100 **/ 50 101 void SetCoreId(CoreId coreId) {mCoreId = coreId;} 51 102 52 103 // --- Getters 104 /** 105 * Get the core type. 106 **/ 53 107 CoreId GetCoreId(void) const {return mCoreId;} 108 109 /** 110 * Get the credit value. 111 **/ 54 112 WuCredit GetCredit(void) const {return mCredit;} 113 114 /** 115 * Get the preferred deadline. 116 **/ 55 117 wxUint16 GetPreferredDeadlineInDays(void) const {return mPreferredDeadlineInDays;} 118 119 /** 120 * Get the final deadline. 121 **/ 56 122 wxUint16 GetFinalDeadlineInDays(void) const {return mFinalDeadlineInDays;} 123 124 /** 125 * Get the frame number. 126 **/ 57 127 wxUint16 GetNbFrames(void) const {return mNbFrames;} 128 129 /** 130 * Get the project number. 131 **/ 58 132 ProjectId GetProjectId(void) const {return mProjectId;} 59 133 }; branches/2.3.2beta3/src/project.cpp
r38 r211 15 15 */ 16 16 17 /** 18 * \file project.cpp 19 * Project object. 20 * \author François Ingelrest 21 * \author Andrew Schofield 22 **/ 23 17 24 #include "fahmon.h" 18 25 #include "project.h" 19 26 20 27 21 /**22 * Constructor23 **/24 28 Project::Project(ProjectId projectId, wxUint16 preferredDeadlineInDays, wxUint16 finalDeadlineInDays, wxUint16 nbFrames, WuCredit credit, CoreId coreId) 25 29 { … … 33 37 34 38 35 /**36 * Write this project to the disk37 **/38 39 void Project::Write(DataOutputStream& out) const 39 40 { … … 47 48 48 49 49 /**50 * Read the project from the disk51 **/52 50 void Project::Read(DataInputStream& in) 53 51 {
