TaskIdList.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include "TaskIdList.h"
#include "constants.h"
#include "cser.h"

Include dependency graph for TaskIdList.c:

Go to the source code of this file.

Functions

int taskIdListGetMinCpacity (int size)
 Retorna a capacidade m?nima (de acordo com a pol?tica de realoca??o exponencial) necess?ria para armazenar um vetor de tamanho size.
TaskIdListtaskIdListCreate (int cap_inicial)
 Cria um vetor de documentos.
int taskIdListAdd (TaskIdList *vet, int doc)
 Adiciona um documento ao vetor.
int taskIdListGetSize (TaskIdList *vet)
 Retorna o tamanho de um vetor de documentos.
int taskIdListGet (TaskIdList *vet, int pos)
 Retorna um ponteiro para a posi??o pos do vetor de documentos vet.
int taskIdListGetLast (TaskIdList *vet)
 Retorna um ponteiro para a ?ltima posi??o do vetor de documentos vet.
int * taskIdListToArray (TaskIdList *list, int *listSize)
int taskIdListCompare (TaskIdList *list1, TaskIdList *list2)
 Compares two TaskIdList.
void taskIdListDestroy (TaskIdList *vet)
 Destroy a taskId list.
TaskIdListtaskIdListCopy (TaskIdList *list)
TaskIdListtaskIdListIntersection (TaskIdList *a, TaskIdList *b)
 This function assume that.
void taskIdListSortAscendig (TaskIdList *list)
 Sort the list ids in ascending order.
int writeTaskIdList (FILE *outputFile, void *list)
void * readTaskIdList (FILE *inputFile)


Function Documentation

void* readTaskIdList FILE *  inputFile  ) 
 

Definition at line 270 of file TaskIdList.c.

References READ_BEGIN, READ_NUM, taskIdListAdd(), and taskIdListCreate().

Referenced by readChildTask(), and readTask().

Here is the call graph for this function:

int taskIdListAdd TaskIdList vet,
int  doc
 

Adiciona um documento ao vetor.

Caso o vetor n?o tenha a capacidade necess?ria, sua capacidade ser? dobrada (de acordo com a pol?tica de realoca??o exponencial).

Parameters:
vet Vetor onde o documento ser? acrescentado.
doc Documento a ser acrescentado.
freq Freq??ncia do documento.
Returns:
Posi??o do documento no vetor.

Definition at line 65 of file TaskIdList.c.

References TaskIdList::capacity, TaskIdList::size, and TaskIdList::vetor.

Referenced by addTaskToDependsOnMe(), cacheEndTask(), cacheRecoverTasks(), getFinishedTasks(), readTaskIdList(), and taskIdListCopy().

int taskIdListCompare TaskIdList list1,
TaskIdList list2
 

Compares two TaskIdList.

Returns -1, 0 or +1 if the list "list1" is found, respectivelly, to be less than, to match, or be greater than "list2". Comparison semantics is the same of strcmp().

Definition at line 133 of file TaskIdList.c.

References TaskIdList::size, and TaskIdList::vetor.

Referenced by compareTasks().

TaskIdList* taskIdListCopy TaskIdList list  ) 
 

Definition at line 182 of file TaskIdList.c.

References taskIdListAdd(), taskIdListCreate(), taskIdListGet(), and taskIdListGetSize().

Referenced by setTaskDependsOnMe(), and setTaskMyDeps().

Here is the call graph for this function:

TaskIdList* taskIdListCreate int  cap_inicial  ) 
 

Cria um vetor de documentos.

Definition at line 45 of file TaskIdList.c.

References TaskIdList::capacity, TaskIdList::size, taskIdListGetMinCpacity(), and TaskIdList::vetor.

Referenced by addTaskToDependsOnMe(), getFinishedTasks(), initCacheStruct(), readTaskIdList(), taskIdListCopy(), and taskIdListIntersection().

Here is the call graph for this function:

void taskIdListDestroy TaskIdList vet  ) 
 

Destroy a taskId list.

Definition at line 172 of file TaskIdList.c.

References TaskIdList::vetor.

Referenced by destroyCache(), destroyTask(), readChildTask(), readTask(), and taskMove().

int taskIdListGet TaskIdList vet,
int  pos
 

Retorna um ponteiro para a posi??o pos do vetor de documentos vet.

Definition at line 95 of file TaskIdList.c.

References TaskIdList::vetor.

Referenced by cacheEndTask(), cacheGetTaskDeps(), cacheRecoverTasks(), taskIdListCopy(), and writeTaskIdList().

int taskIdListGetLast TaskIdList vet  ) 
 

Retorna um ponteiro para a ?ltima posi??o do vetor de documentos vet.

Definition at line 102 of file TaskIdList.c.

References TaskIdList::size, and TaskIdList::vetor.

int taskIdListGetMinCpacity int  size  ) 
 

Retorna a capacidade m?nima (de acordo com a pol?tica de realoca??o exponencial) necess?ria para armazenar um vetor de tamanho size.

Definition at line 34 of file TaskIdList.c.

Referenced by taskIdListCreate().

int taskIdListGetSize TaskIdList vet  ) 
 

Retorna o tamanho de um vetor de documentos.

Definition at line 85 of file TaskIdList.c.

References TaskIdList::size.

Referenced by cacheEndTask(), cacheGetTaskDeps(), cacheRecoverTasks(), compareTasks(), taskIdListCopy(), and writeTaskIdList().

TaskIdList* taskIdListIntersection TaskIdList a,
TaskIdList b
 

This function assume that.

Definition at line 199 of file TaskIdList.c.

References TaskIdList::size, taskIdListCreate(), and TaskIdList::vetor.

Here is the call graph for this function:

void taskIdListSortAscendig TaskIdList list  ) 
 

Sort the list ids in ascending order.

Definition at line 245 of file TaskIdList.c.

References TaskIdList::size, and TaskIdList::vetor.

Referenced by cacheRecoverTasks().

int* taskIdListToArray TaskIdList list,
int *  listSize
 

Definition at line 110 of file TaskIdList.c.

References TaskIdList::size, and TaskIdList::vetor.

Referenced by cacheGetFinishedTasks().

int writeTaskIdList FILE *  outputFile,
void *  list
 

Definition at line 256 of file TaskIdList.c.

References taskIdListGet(), taskIdListGetSize(), and WRITE_NUM.

Referenced by writeChildTask(), and writeTask().

Here is the call graph for this function:


Generated on Tue Jan 17 19:27:32 2006 for Void by  doxygen 1.4.6