Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

mrprj::Task Class Reference

for managing the content of the class task More...

#include <mrprjContent.h>

Collaboration diagram for mrprj::Task:

Collaboration graph
[legend]
List of all members.

Public Methods

 Task (krmuo::LoggingUnit &pLoggingUnit, const string &spTaskId, const string &pTaskTitle="???", const string &pTaskDescription="???", const string &pTaskStartDate="19700101T000000", const string &pTaskEndDate="21001231T240000", const int pFullFilledPercent=0, const bool pIsEmptyTopTask=false)
 < class-constructor

 ~Task ()
 class-destructor

const string & getTaskId () const
 returns the task-id as long-value

const string & getTaskTitle () const
 returns the task-title (name) as string

const string & getTaskDescription () const
 returns the task-description (note) as string

const string getTaskDescriptionAsOneLine () const
 returns the task-description (note) as string without any lf,cr,tabs etc.

const string getPredecessorString () const
 makes comma seperated string of all predecessor ids

const string getTaskDescriptionAsFormattedString (const string &pIndent, const int pLineLength) const
 returns the task-description (note) as formatted string

const string getClearTaskDescriptionAsOneLine () const
 returns the task-description (note) as online formatted without ",

const string & getStartDate () const
 returns the iso-8601 encoded start-date

const string & getEndDate () const
 returns the iso-8601 encoded end-date

const int getFullFilledPercent () const
 returns degree of fullfillness

const bool isEmptyTopTask () const
const bool isActive () const
 returns the state of the task after an extraction

const bool isAllocated () const
 returns true if any resource handles this task

const bool isAnyDaughterIsActive () const
 returns true if any daughter is active

const long numberOfDaughters () const
 returns the number of daughters

const bool isLeafNode () const
 returns true if the number of daughters is zero

const bool isOpenTask () const
 returns true if any part of the task still must be done

const string getDoneDescription () const
 returns clear-text version of the done-State

void setPassive ()
 sets the task onto the state ignorable

void setActive ()
 sets the task onto the state un-ignorable

void setAllocated ()
 notes that any resource handles this task

void setAnyDaughterIsActive ()
 notes that any resource handles this task

void setPassiveIfAllDaughtersPassive ()
 sets the task onto the state ignorable if all daughters can be ignored

void setStartDate (const string &pStartDate)
 updates the start-date of the task

void setEndDate (const string &pEndDate)
 updates the end-date of the task

bool fillTaskSubStructureByMrPrjXmlTaskNodes (xmlDocPtr xmlDoc, const xmlNodePtr pFirstTaskSubnode, map< string, Task * > &mGlobalTaskMap)
 for (recursively) transposing a task-xmlNode into the internal representation

bool limitToTimeSlot (const string &pTimeSlotStart, const string &pTimeSlotEnd)
 for making a task ignorable if it doesn't belong to the given timeslot

bool limitToOpenTasks ()
 for recursively making a task ignorable if it is already fullfiled

int insertXYposition (const int pEmbeddedLevel, int &pMaxEmbeddedLevel)
 for recursively determining the array position of the task

bool printTaskAsMrPrjXmlFileMember (int pBlankIndents) const
 for rewriting the internal representation as mrproject-xml-file-member

bool printTaskAsLeafMemoListMember (const string &pTaskPrefix, const string &pLevelOrderString, const map< string, Resource * > &pResourceMap, const list< Allocation * > &pAllocationList, const bool iso8601) const
 for rewriting the internal representation as leaf-memo-list-member

bool printTaskAsTreeMemoMember (const string &pLevelOrderString, int pTreeDepth, const map< string, Resource * > &pResourceMap, const list< Allocation * > &pAllocationList, const bool iso8601) const
 for rewriting the internal representation as tree-memo-member

bool printTaskAsLeafVTodoMember (const map< string, Resource * > &pResourceMap, const list< Allocation * > &pAllocationList, const string &pConnectedProjectName) const
 for rewriting the internal representation as leaf-vtodo-member

bool printTaskAsTreeVTodoMember (const map< string, Resource * > &pResourceMap, const list< Allocation * > &pAllocationList, const string &pConnectedProjectName) const
 for rewriting the internal representation as tree-vtodo-member

bool printTaskAsPilotLeafTodoMember (const string &pLevelOrderString, const map< string, Resource * > &pResourceMap, const list< Allocation * > &pAllocationList) const
 for rewriting the internal representation as leaf-todo-member

bool printTaskAsPilotTreeTodoMember (const string &pLevelOrderString, const map< string, Resource * > &pResourceMap, const list< Allocation * > &pAllocationList) const
 for rewriting the internal representation as tree-todo-member

bool printTaskAsLeafYankTodoMember (const map< string, Resource * > &pResourceMap, const list< Allocation * > &pAllocationList) const
 for rewriting the internal representation as leaf-yank-todo-member

bool printTaskAsTreeYankTodoMember (const map< string, Resource * > &pResourceMap, const list< Allocation * > &pAllocationList, const int pBlankIndents) const
 for rewriting the internal representation as tree-yank-todo-member

bool printTaskAsLeafCslTodoMember (const string &pLevelOrderString, const map< string, Resource * > &pResourceMap, const list< Allocation * > &pAllocationList) const
 for rewriting the internal representation as leaf-cls-todo-member

bool printTaskAsTreeCslTodoMember (const string &pLevelOrderString, const map< string, Resource * > &pResourceMap, const list< Allocation * > &pAllocationList) const
 for rewriting the internal representation as tree-csl-todo-member

bool printTaskAsHtmlSurveyMember (const map< string, Resource * > &pResourceMap, const list< Allocation * > &pAllocationList, const int maxPathLength, const string &pSurveyReferenceDayString)
 for rewriting the internal representation as set of html-table-rows


Detailed Description

for managing the content of the class task

instances of the class Task have the task to hold and change the content of those entries of the mrProject-Xml-File, by which the tasks of the project are described

Note:

(1) each task is represented as a tree consting of the task itself and a (possibly empty) list of its subtasks.

(2) the main / top task is a virtual task containing the id -1 and is not(!!!) a member of the original mrproject-xml-file

(3) each subtask will be created by the new-operator and must therefore explicitely be deleted the destructor of the (mother) task

Definition at line 1036 of file mrprjContent.h.


Constructor & Destructor Documentation

mrprj::Task::Task krmuo::LoggingUnit   pLoggingUnit,
const string &    pTaskId,
const string &    pTaskTitle = "???",
const string &    pTaskDescription = "???",
const string &    pTaskStartDate = "19700101T000000",
const string &    pTaskEndDate = "21001231T240000",
const int    pFullFilledPercent = 0,
const bool    pIsEmptyTopTask = false
 

< class-constructor

Parameters:
pLoggingUnit  :- reference to the use fault-message-writer
pTaskId  :- nescessary uniq task-id
pTaskTitle  :- the task-name (default: "???"),
pTaskDescription  :- a task description (default: "???"),
pTaskStartDate  :- iso-8601 encoded start-date (default: "19700101T000000"),
pTaskEndDate  :- iso-8601 encoded end-date (default: "21001231T240000"),
pFullFilledPercent  :- value of the fullfilling degree

Definition at line 577 of file mrprjContent.cc.

References HM.

mrprj::Task::~Task  
 

class-destructor

class-destructor which destroys all subtask too

Definition at line 615 of file mrprjContent.cc.

References HM, and krmuo::LoggingUnit::makeEntry().


Member Function Documentation

bool mrprj::Task::fillTaskSubStructureByMrPrjXmlTaskNodes xmlDocPtr    xmlDoc,
const xmlNodePtr    pFirstTaskSubnode,
map< string, Task * > &    pGlobalTaskMap
 

for (recursively) transposing a task-xmlNode into the internal representation

Parameters:
xmlDoc  :- dom-model of the document (nescessary for some special libxml-functions)
pFirstTaskSubnode  :- the first xmlNode of a list of subnodes of the xmlNode denoted by this-> \pGlobalTaskMap :- a reference to a global flat map of pointers to tasks
Returns :
true in case of existing subnodes otherwise false
Note: pGlobalTaskMap contains pointer to allocated task too. but they mustn't be deleted (there) because they are deleted by the destructor of each task itself

Definition at line 694 of file mrprjContent.cc.

References mrprj::XmlNodeReader::getIntProperty(), mrprj::XmlNodeReader::getStringProperty(), and mTaskId.

const string mrprj::Task::getTaskDescriptionAsFormattedString const string &    pIndent,
const int    pLineLength
const
 

returns the task-description (note) as formatted string

Parameters:
pIndent  :- prefix string for each computed line
pLineLength  :- minimal length of a line including the prefix

Definition at line 2057 of file mrprjContent.cc.

int mrprj::Task::insertXYposition const int    pEmbeddedLevel,
int &    pMaxEmbeddedLevel
 

for recursively determining the array position of the task

Parameters:
pEmbeddedLevel  :- number of "indents"
pMaxEmbeddedLevel  :- at most idents
Returns :
number of all spanned rows
(each node spans all rows of all his daughhters)

Definition at line 826 of file mrprjContent.cc.

Referenced by mrprj::TaskField::printTaskHtmlSurvey().

const bool mrprj::Task::isEmptyTopTask   const [inline]
 

Returns :
true if this is the empty top-taks otherwise false

Definition at line 1143 of file mrprjContent.h.

Referenced by limitToOpenTasks().

bool mrprj::Task::limitToOpenTasks  
 

for recursively making a task ignorable if it is already fullfiled

Returns :
true

Definition at line 795 of file mrprjContent.cc.

References getFullFilledPercent(), isEmptyTopTask(), and setPassive().

Referenced by mrprj::TaskField::limitToOpenTasks().

bool mrprj::Task::limitToTimeSlot const string &    pTimeSlotStart,
const string &    pTimeSlotEnd
 

for making a task ignorable if it doesn't belong to the given timeslot

Parameters:
pTimeSlotStart  :- iso-8601 encoded timeslot-start-date
pTimeSlotEnd  :- iso-8601 encoded timeslot-end-date
Returns :
true

Definition at line 756 of file mrprjContent.cc.

Referenced by mrprj::TaskField::limitToTimeSlot().

bool mrprj::Task::printTaskAsHtmlSurveyMember const map< string, Resource * > &    pResourceMap,
const list< Allocation * > &    pAllocationList,
const int    maxPathLength,
const string &    pSurveyReferenceDayString
 

for rewriting the internal representation as set of html-table-rows

while recursively traversing the task tree this method prints each (active) task as member of a yank-todo-file

Parameters:
pResourceMap  :- reference to the resource infos
pAllocationList  :- reference to the task-resource-mappings
pBlankIndents  ;- number of indeting blanks
Returns :
true

Definition at line 1762 of file mrprjContent.cc.

References krmuo::Converter::encode(), and mrprj::DateStringConverter::formGermanDateString().

Referenced by mrprj::TaskField::printTaskHtmlSurvey().

bool mrprj::Task::printTaskAsLeafCslTodoMember const string &    pLevelOrderString,
const map< string, Resource * > &    pResourceMap,
const list< Allocation * > &    pAllocationList
const
 

for rewriting the internal representation as leaf-cls-todo-member

while recursively traversing the task tree this method prints leaf-task as member of a comma-seperated-todo-file

Parameters:
pResourceMap  :- reference to the resource infos
pAllocationList  :- reference to the task-resource-mappings
Returns :
true

Definition at line 1615 of file mrprjContent.cc.

References mrprj::DateStringConverter::formGermanDateString().

Referenced by mrprj::TaskField::printTaskFieldAsLeafCslTodo().

bool mrprj::Task::printTaskAsLeafMemoListMember const string &    pTaskPrefix,
const string &    pLevelOrderString,
const map< string, Resource * > &    pResourceMap,
const list< Allocation * > &    pAllocationList,
const bool    pIso8601
const
 

for rewriting the internal representation as leaf-memo-list-member

while recursively traversing the task tree this methode collects all names / titles of those tasks which have subtasks and prints those which haven't any subtask while showing their mother-tasks as a prefix-string

Parameters:
pTaskPrefix  :-slash separated path of all mother-tasks
pLevelOrderString  :- sorting numberstring ala 1.2.3.4
pResourceMap  :- reference to the resource infos
pAllocationList  :- reference to the task-resource-mappings
iso8601  : print datestring in iso-format otherwise european/german format
Returns :
true

Definition at line 987 of file mrprjContent.cc.

References mrprj::DateStringConverter::formGermanDateString().

Referenced by mrprj::TaskField::printTaskFieldAsLeafListMemo().

bool mrprj::Task::printTaskAsLeafVTodoMember const map< string, Resource * > &    pResourceMap,
const list< Allocation * > &    pAllocationList,
const string &    pConnectedProjectName
const
 

for rewriting the internal representation as leaf-vtodo-member

while recursively traversing the task tree this method prints one line for each (active) leaf-task (usable for pilot install-todos)

Parameters:
pResourceMap  :- reference to the resource infos
pAllocationList  :- reference to the task-resource-mappings
Returns :
true

Definition at line 1182 of file mrprjContent.cc.

Referenced by mrprj::TaskField::printTaskFieldAsLeafVTodo().

bool mrprj::Task::printTaskAsLeafYankTodoMember const map< string, Resource * > &    pResourceMap,
const list< Allocation * > &    pAllocationList
const
 

for rewriting the internal representation as leaf-yank-todo-member

while recursively traversing the task tree this method prints leaf-task as member of a yank-todo-file

Parameters:
pResourceMap  :- reference to the resource infos
pAllocationList  :- reference to the task-resource-mappings
Returns :
true

Definition at line 1466 of file mrprjContent.cc.

References krmuo::Converter::encode(), and mrprj::DateStringConverter::formYankDateString().

Referenced by mrprj::TaskField::printTaskFieldAsLeafYankTodo().

bool mrprj::Task::printTaskAsMrPrjXmlFileMember int    pBlankIndents const
 

for rewriting the internal representation as mrproject-xml-file-member

prints recursively the task and its subtasks to stdout

Parameters:
pBlankIndents  :- number of indents = level of embedded structure
Returns :
true in case of existing subnodes otherwise false

Definition at line 893 of file mrprjContent.cc.

References krmuo::Converter::encode().

bool mrprj::Task::printTaskAsPilotLeafTodoMember const string &    pLevelOrderString,
const map< string, Resource * > &    pResourceMap,
const list< Allocation * > &    pAllocationList
const
 

for rewriting the internal representation as leaf-todo-member

while recursively traversing the task tree this method prints one line for each (active) task (usable for pilot install-todos)

Parameters:
pLevelOrderString  :- sorting numberstring ala 1.2.3.4
pResourceMap  :- reference to the resource infos
pAllocationList  :- reference to the task-resource-mappings
Returns :
true

Definition at line 1399 of file mrprjContent.cc.

Referenced by mrprj::TaskField::printTaskFieldAsPilotLeafTodo().

bool mrprj::Task::printTaskAsPilotTreeTodoMember const string &    pLevelOrderString,
const map< string, Resource * > &    pResourceMap,
const list< Allocation * > &    pAllocationList
const
 

for rewriting the internal representation as tree-todo-member

while recursively traversing the task tree this method prints one line for each (active) task (usable for pilot install-todos)

Parameters:
pLevelOrderString  :- sorting numberstring ala 1.2.3.4
pResourceMap  :- reference to the resource infos
pAllocationList  :- reference to the task-resource-mappings
Returns :
true

Definition at line 1331 of file mrprjContent.cc.

Referenced by mrprj::TaskField::printTaskFieldAsPilotTreeTodo().

bool mrprj::Task::printTaskAsTreeCslTodoMember const string &    pLevelOrderString,
const map< string, Resource * > &    pResourceMap,
const list< Allocation * > &    pAllocationList
const
 

for rewriting the internal representation as tree-csl-todo-member

while recursively traversing the task tree this method prints each (active) task as member of a comma-seperated-todo-file

Parameters:
pResourceMap  :- reference to the resource infos
pAllocationList  :- reference to the task-resource-mappings
Returns :
true

Definition at line 1688 of file mrprjContent.cc.

References mrprj::DateStringConverter::formGermanDateString().

Referenced by mrprj::TaskField::printTaskFieldAsTreeCslTodo().

bool mrprj::Task::printTaskAsTreeMemoMember const string &    pLevelOrderString,
int    pTreeDepth,
const map< string, Resource * > &    pResourceMap,
const list< Allocation * > &    pAllocationList,
const bool    pIso8601
const
 

for rewriting the internal representation as tree-memo-member

while recursively traversing the task tree this method prints one line for each (active) task

Parameters:
pLevelOrderString  :- sorting numberstring ala 1.2.3.4
pTreeDepth  ;- number of mother-nodes
pResourceMap  :- reference to the resource infos
pAllocationList  :- reference to the task-resource-mappings
iso8601  : print datestring in iso-format otherwise european/german format
Returns :
true

Definition at line 1089 of file mrprjContent.cc.

References mrprj::DateStringConverter::formGermanDateString().

Referenced by mrprj::TaskField::printTaskFieldAsTreeMemo().

bool mrprj::Task::printTaskAsTreeVTodoMember const map< string, Resource * > &    pResourceMap,
const list< Allocation * > &    pAllocationList,
const string &    pConnectedProjectName
const
 

for rewriting the internal representation as tree-vtodo-member

while recursively traversing the task tree this method prints one line for each (active) task (usable for pilot install-todos)

Parameters:
pResourceMap  :- reference to the resource infos
pAllocationList  :- reference to the task-resource-mappings
Returns :
true

Definition at line 1256 of file mrprjContent.cc.

Referenced by mrprj::TaskField::printTaskFieldAsTreeVTodo().

bool mrprj::Task::printTaskAsTreeYankTodoMember const map< string, Resource * > &    pResourceMap,
const list< Allocation * > &    pAllocationList,
const int    pBlankIndents
const
 

for rewriting the internal representation as tree-yank-todo-member

while recursively traversing the task tree this method prints each (active) task as member of a yank-todo-file

Parameters:
pResourceMap  :- reference to the resource infos
pAllocationList  :- reference to the task-resource-mappings
pBlankIndents  ;- number of indeting blanks
Returns :
true

Definition at line 1535 of file mrprjContent.cc.

References krmuo::Converter::encode(), and mrprj::DateStringConverter::formYankDateString().

Referenced by mrprj::TaskField::printTaskFieldAsTreeYankTodo().

void mrprj::Task::setEndDate const string &    pEndDate [inline]
 

updates the end-date of the task

Parameters:
pEndDate  :- new iso-8601 encoded end-date

Definition at line 1239 of file mrprjContent.h.

void mrprj::Task::setPassiveIfAllDaughtersPassive  
 

sets the task onto the state ignorable if all daughters can be ignored

(1) tries to set each daughter onto passive if all of their daughters are passive (2) tests wether any daughter is still active after that action (3) makes this task passive if all daughter tasks are passive

Returns :
true if this task has been made passive otherwise false

Definition at line 651 of file mrprjContent.cc.

References setAnyDaughterIsActive(), and setPassive().

Referenced by mrprj::TaskField::limitToThoseWithActiveDaughters().

void mrprj::Task::setStartDate const string &    pStartDate [inline]
 

updates the start-date of the task

Parameters:
pStartDate  :- new iso-8601 encoded start-date

Definition at line 1231 of file mrprjContent.h.


The documentation for this class was generated from the following files:
Generated on Sun Mar 16 10:58:39 2003 for MRPROJEXT by doxygen1.2.17