Graphviz  2.41.20170921.2350
Data Structures | Typedefs | Functions
vector.h File Reference
#include <stdlib.h>
Include dependency graph for vector.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  vector_struct
 

Typedefs

typedef struct vector_structVector
 
typedef Vector StringVector
 
typedef Vector IntegerVector
 

Functions

Vector Vector_new (int maxlen, size_t size_of_elem, void(*deallocator)(void *v))
 
Vector Vector_add (Vector v, void *stuff)
 
Vector Vector_reset (Vector v, void *stuff, int i)
 
void Vector_delete (Vector v)
 
void * Vector_get (Vector v, int i)
 
int Vector_get_length (Vector v)
 
Vector StringVector_new (int len, int delete_element_strings)
 
Vector StringVector_add (Vector v, char *i)
 
void StringVector_delete (Vector v)
 
char ** StringVector_get (Vector v, int i)
 
int StringVector_get_length (Vector v)
 
Vector StringVector_reset (Vector v, char *content, int pos)
 
void StringVector_fprint (FILE *fp, StringVector v)
 
void StringVector_fprint1 (FILE *fp, StringVector v)
 
StringVector StringVector_part (StringVector v, int n, int *selected_list)
 
Vector IntegerVector_new (int len)
 
Vector IntegerVector_add (Vector v, int i)
 
void IntegerVector_delete (Vector v)
 
intIntegerVector_get (Vector v, int i)
 
int IntegerVector_get_length (Vector v)
 
Vector IntegerVector_reset (Vector v, int content, int pos)
 

Typedef Documentation

Definition at line 56 of file vector.h.

Definition at line 43 of file vector.h.

typedef struct vector_struct* Vector

Definition at line 24 of file vector.h.

Function Documentation

Vector IntegerVector_add ( Vector  v,
int  i 
)

Definition at line 84 of file vector.c.

References Vector_add().

void IntegerVector_delete ( Vector  v)

Definition at line 88 of file vector.c.

References Vector_delete().

int* IntegerVector_get ( Vector  v,
int  i 
)

Definition at line 92 of file vector.c.

References NULL, and Vector_get().

int IntegerVector_get_length ( Vector  v)

Definition at line 99 of file vector.c.

References Vector_get_length().

Vector IntegerVector_new ( int  len)

Definition at line 80 of file vector.c.

References intdealloactor(), and Vector_new().

Vector IntegerVector_reset ( Vector  v,
int  content,
int  pos 
)

Definition at line 103 of file vector.c.

References Vector_reset().

Vector StringVector_add ( Vector  v,
char *  i 
)

Definition at line 130 of file vector.c.

References Vector_add().

Referenced by StringVector_part().

void StringVector_delete ( Vector  v)

Definition at line 134 of file vector.c.

References Vector_delete().

void StringVector_fprint ( FILE *  fp,
StringVector  v 
)

Definition at line 161 of file vector.c.

References StringVector_get(), and StringVector_get_length().

void StringVector_fprint1 ( FILE *  fp,
StringVector  v 
)

Definition at line 153 of file vector.c.

References StringVector_get(), and StringVector_get_length().

char** StringVector_get ( Vector  v,
int  i 
)

Definition at line 138 of file vector.c.

References NULL, and Vector_get().

Referenced by StringVector_fprint(), StringVector_fprint1(), and StringVector_part().

int StringVector_get_length ( Vector  v)

Definition at line 145 of file vector.c.

References Vector_get_length().

Referenced by StringVector_fprint(), and StringVector_fprint1().

Vector StringVector_new ( int  len,
int  delete_element_strings 
)

Definition at line 121 of file vector.c.

References nulldealloactor(), strdealloactor(), and Vector_new().

Referenced by StringVector_part().

StringVector StringVector_part ( StringVector  v,
int  n,
int selected_list 
)
Vector StringVector_reset ( Vector  v,
char *  content,
int  pos 
)

Definition at line 149 of file vector.c.

References Vector_reset().

Vector Vector_add ( Vector  v,
void *  stuff 
)
void Vector_delete ( Vector  v)
void* Vector_get ( Vector  v,
int  i 
)

Definition at line 64 of file vector.c.

References vector_struct::len, NULL, vector_struct::size_of_elem, and vector_struct::v.

Referenced by IntegerVector_get(), and StringVector_get().

int Vector_get_length ( Vector  v)

Definition at line 69 of file vector.c.

References vector_struct::len.

Referenced by IntegerVector_get_length(), and StringVector_get_length().

Vector Vector_new ( int  maxlen,
size_t  size_of_elem,
void(*)(void *v)  deallocator 
)
Vector Vector_reset ( Vector  v,
void *  stuff,
int  i 
)