Virtual U.org
Get Personal Training on VU Today
    
Top shadow
 
 register/help
User Name:

Password:

TaskArray class Reference
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

TaskArray Class Reference

#include <OTASK.H>

Inheritance diagram for TaskArray:

DynArray List of all members.

Public Methods

 TaskArray ()
void init ()
void deinit ()
int write_file (File *filePtr)
int read_file (File *filePtr)
void enable ()
void disable ()
void reset ()
void default_setting ()
void clear_task_disp ()
void next_day ()
Taskadd_task (int taskId)
void remove (int index)
bool can_add_more_task ()
void rise_performance_rating (int deptRecno, int ratingType, int target, int src, int month, int year, int bonus)
void rise_educational_quality (int deptRecno, int ratingType, int target, int src, int month, int year, int bonus)
void rise_student_morale (int deptRecno, int ratingType, int target, int src, int month, int year, int bonus)
void rise_department_morale (int deptRecno, int ratingType, int target, int src, int month, int year, int bonus)
void rise_faculty_research_Per (int deptRecno, int ratingType, int target, int src, int month, int year, int bonus)
void rise_faculty_diversity_index (int deptRecno, int ratingType, int target, int src, int month, int year, int bonus)
void rise_use_of_IT (int deptRecno, int ratingType, int target, int src, int month, int year, int bonus)
void rise_staff_morale (int deptRecno, int ratingType, int target, int src, int month, int year, int bonus)
Taskoperator[] (int recNo)

Public Attributes

char task_who_option
char task_add_flag
int total_bonus_pt
float rand_init

Detailed Description

Array containing the history of the tasks assigned during this game. Responds to init, next_day, and read/write.

Definition at line 80 of file OTASK.H.


Constructor & Destructor Documentation

TaskArray::TaskArray  
 

Definition at line 14 of file OTASK.CPP.


Member Function Documentation

Task * TaskArray::add_task int    taskId
 

Called by news processing function to set news parameters

<int> taskId = the id. of the task <int> newsType = news type

return : <Task*> return the pointer of the News NULL - the nation of the news does not have contact with the player

Definition at line 255 of file OTASKADD.CPP.

References TASK_STARTED.

bool TaskArray::can_add_more_task  
 

Definition at line 294 of file OTASKADD.CPP.

References TASK_COMPLETED.

void TaskArray::clear_task_disp  
 

void TaskArray::default_setting  
 

Reset all news display options

Definition at line 56 of file OTASK.CPP.

References TASK_DISP_ALL.

void TaskArray::deinit  
 

Reimplemented from DynArray.

Definition at line 31 of file OTASK.CPP.

void TaskArray::disable   [inline]
 

Definition at line 100 of file OTASK.H.

References task_add_flag.

void TaskArray::enable   [inline]
 

Definition at line 99 of file OTASK.H.

References task_add_flag.

void TaskArray::init  
 

Definition at line 21 of file OTASK.CPP.

void TaskArray::next_day  
 

Definition at line 47 of file Otaskend.cpp.

References News::id, INFO_DATE_DEFAULT, INFO_DATE_NO_DAY, INFO_DATE_SHORT_MONTH, News::msg(), News::news_date, operator[](), remove(), Task::set_completed(), DynArray::size(), TASK_COMPLETED, TASK_EXPIRED, and News::task_msg_subtype.

Task * TaskArray::operator[] int    recNo
 

Definition at line 81 of file OTASK.CPP.

References err_if, err_now, DynArray::get(), News::news_date, and NULL.

Referenced by next_day().

int TaskArray::read_file File   filePtr
 

Read a saved dynamic array from file, it must be saved with write_file()

<File*> readFile = the pointer to the writing file

Return : 1 - read successfully 0 - writing error

Reimplemented from DynArray.

Definition at line 363 of file OGFILE3.CPP.

References File::file_read(), and DynArray::read_file().

void TaskArray::remove int    recNo
 

Remove a specific news from the task_array.

<int> newsId = id. of the news

Definition at line 70 of file OTASK.CPP.

Referenced by next_day().

void TaskArray::reset  
 

Reset all news display options and clear all news in the log

Definition at line 41 of file OTASK.CPP.

void TaskArray::rise_department_morale int    deptRecno,
int    ratingType,
int    target,
int    src,
int    month,
int    year,
int    bonus
 

short_para1 = the recno of department info

Definition at line 104 of file OTASKADD.CPP.

References err_when, RISE_DEPARTMENT_MORALE, News::short_para1, News::short_para2, News::short_para3, News::short_para4, News::short_para5, News::short_para6, and News::short_para7.

void TaskArray::rise_educational_quality int    deptRecno,
int    ratingType,
int    target,
int    src,
int    month,
int    year,
int    bonus
 

short_para1 = the recno of department info

Definition at line 45 of file OTASKADD.CPP.

References err_when, RISE_EDUCATIONAL_QUALITY, News::short_para1, News::short_para2, News::short_para3, News::short_para4, News::short_para5, News::short_para6, and News::short_para7.

void TaskArray::rise_faculty_diversity_index int    deptRecno,
int    ratingType,
int    target,
int    src,
int    month,
int    year,
int    bonus
 

short_para1 = the recno of department info

Definition at line 162 of file OTASKADD.CPP.

References err_when, RISE_FACULTY_DIVERSITY_INDEX, News::short_para1, News::short_para2, News::short_para3, News::short_para4, News::short_para5, News::short_para6, and News::short_para7.

void TaskArray::rise_faculty_research_Per int    deptRecno,
int    ratingType,
int    target,
int    src,
int    month,
int    year,
int    bonus
 

short_para1 = the recno of department info

Definition at line 133 of file OTASKADD.CPP.

References err_when, RISE_FACULTY_RESEARCH, News::short_para1, News::short_para2, News::short_para3, News::short_para4, News::short_para5, News::short_para6, and News::short_para7.

void TaskArray::rise_performance_rating int    deptRecno,
int    ratingType,
int    target,
int    src,
int    month,
int    year,
int    bonus
 

short_para1 = the recno of department info

Definition at line 15 of file OTASKADD.CPP.

References err_when, News::short_para1, News::short_para2, News::short_para3, News::short_para4, News::short_para5, News::short_para6, News::short_para7, and TASK_RISE_PERFORMANCE_RATING.

void TaskArray::rise_staff_morale int    deptRecno,
int    ratingType,
int    target,
int    src,
int    month,
int    year,
int    bonus
 

short_para1 = the recno of department info

Definition at line 220 of file OTASKADD.CPP.

References err_when, RISE_STAFF_MORALE, News::short_para1, News::short_para2, News::short_para3, News::short_para4, News::short_para5, News::short_para6, and News::short_para7.

void TaskArray::rise_student_morale int    deptRecno,
int    ratingType,
int    target,
int    src,
int    month,
int    year,
int    bonus
 

short_para1 = the recno of department info

Definition at line 75 of file OTASKADD.CPP.

References err_when, RISE_STUDENT_MORALE, News::short_para1, News::short_para2, News::short_para3, News::short_para4, News::short_para5, News::short_para6, and News::short_para7.

void TaskArray::rise_use_of_IT int    deptRecno,
int    ratingType,
int    target,
int    src,
int    month,
int    year,
int    bonus
 

short_para1 = the recno of department info

Definition at line 191 of file OTASKADD.CPP.

References err_when, RISE_USE_OF_IT, News::short_para1, News::short_para2, News::short_para3, News::short_para4, News::short_para5, News::short_para6, and News::short_para7.

int TaskArray::write_file File   filePtr
 

Write current dynamic array into file, read_file() can be used to retrieve it.

<File*> writeFile = the pointer to the writing file

Return : 1 - write successfully 0 - writing error

Reimplemented from DynArray.

Definition at line 356 of file OGFILE3.CPP.

References File::file_write(), and DynArray::write_file().


Member Data Documentation

float TaskArray::rand_init
 

Definition at line 88 of file OTASK.H.

char TaskArray::task_add_flag
 

Definition at line 85 of file OTASK.H.

Referenced by disable(), and enable().

char TaskArray::task_who_option
 

Definition at line 84 of file OTASK.H.

int TaskArray::total_bonus_pt
 

Definition at line 86 of file OTASK.H.


The documentation for this class was generated from the following files:
Generated on Fri Aug 23 01:39:40 2002 for VirtualU by doxygen1.2.17