Graphviz  2.41.20170921.2350
Functions
vector.c File Reference
#include "general.h"
#include "vector.h"
Include dependency graph for vector.c:

Go to the source code of this file.

Functions

Vector Vector_new (int maxlen, size_t size_of_elem, void(*deallocator)(void *v))
 
Vector Vector_assign (Vector v, void *stuff, int i)
 
Vector Vector_reset (Vector v, void *stuff, int i)
 
Vector Vector_add (Vector v, void *stuff)
 
void Vector_delete (Vector v)
 
void * Vector_get (Vector v, int i)
 
int Vector_get_length (Vector v)
 
void intdealloactor (void *v)
 
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)
 
void nulldealloactor (void *v)
 
void strdealloactor (void *v)
 
Vector StringVector_new (int len, int delete_element_strings)
 
Vector StringVector_add (Vector v, char *s)
 
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_fprint1 (FILE *fp, StringVector v)
 
void StringVector_fprint (FILE *fp, StringVector v)
 
StringVector StringVector_part (StringVector v, int n, int *selected_list)
 

Function Documentation

void intdealloactor ( void *  v)

Definition at line 77 of file vector.c.

Referenced by IntegerVector_new().

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().

void nulldealloactor ( void *  v)

Definition at line 112 of file vector.c.

Referenced by StringVector_new().

void strdealloactor ( void *  v)

Definition at line 115 of file vector.c.

Referenced by StringVector_new().

Vector StringVector_add ( Vector  v,
char *  s 
)

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 
)
Vector Vector_assign ( Vector  v,
void *  stuff,
int  i 
)

Definition at line 31 of file vector.c.

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

Referenced by Vector_add(), and Vector_reset().

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 
)