218 lines
4.0 KiB
C
218 lines
4.0 KiB
C
#ifndef _vector
|
|
|
|
#define _vector
|
|
|
|
|
|
// Macros
|
|
|
|
|
|
|
|
#include "stdlib.h"
|
|
|
|
extern char * __ClassNames[];
|
|
|
|
|
|
// Includes
|
|
|
|
#include "../int.h"
|
|
|
|
#include "../vector2.h"
|
|
|
|
#include "quadMesh.h"
|
|
|
|
#include "element.h"
|
|
|
|
|
|
typedef struct vector_char_pointer{
|
|
|
|
int capacity;
|
|
|
|
int total;
|
|
|
|
char * * items;
|
|
|
|
|
|
} vector_char_pointer;
|
|
|
|
int vector_char_pointer_length( vector_char_pointer * this );
|
|
|
|
char * vector_char_pointer_get( vector_char_pointer * this, int index );
|
|
|
|
void vector_char_pointer_set( vector_char_pointer * this, int index, char * item );
|
|
|
|
void vector_char_pointer_resize( vector_char_pointer * this, int capacity );
|
|
|
|
void vector_char_pointer_add( vector_char_pointer * this, char * item );
|
|
|
|
void vector_char_pointer_delete( vector_char_pointer * this, int index );
|
|
|
|
int vector_char_pointer_array_push( vector_char_pointer * this, char * item );
|
|
|
|
void vector_char_pointer_unshift( vector_char_pointer * this, char * item );
|
|
|
|
typedef struct vector_quadMesh{
|
|
|
|
int capacity;
|
|
|
|
int total;
|
|
|
|
quadMesh * items;
|
|
|
|
|
|
} vector_quadMesh;
|
|
|
|
int vector_quadMesh_length( vector_quadMesh * this );
|
|
|
|
quadMesh vector_quadMesh_get( vector_quadMesh * this, int index );
|
|
|
|
void vector_quadMesh_set( vector_quadMesh * this, int index, quadMesh item );
|
|
|
|
void vector_quadMesh_resize( vector_quadMesh * this, int capacity );
|
|
|
|
void vector_quadMesh_add( vector_quadMesh * this, quadMesh item );
|
|
|
|
void vector_quadMesh_delete( vector_quadMesh * this, int index );
|
|
|
|
int vector_quadMesh_array_push( vector_quadMesh * this, quadMesh item );
|
|
|
|
void vector_quadMesh_unshift( vector_quadMesh * this, quadMesh item );
|
|
|
|
typedef struct vector_element{
|
|
|
|
int capacity;
|
|
|
|
int total;
|
|
|
|
element * items;
|
|
|
|
|
|
} vector_element;
|
|
|
|
int vector_element_length( vector_element * this );
|
|
|
|
element vector_element_get( vector_element * this, int index );
|
|
|
|
void vector_element_set( vector_element * this, int index, element item );
|
|
|
|
void vector_element_resize( vector_element * this, int capacity );
|
|
|
|
void vector_element_add( vector_element * this, element item );
|
|
|
|
void vector_element_delete( vector_element * this, int index );
|
|
|
|
int vector_element_array_push( vector_element * this, element item );
|
|
|
|
void vector_element_unshift( vector_element * this, element item );
|
|
|
|
typedef struct vector_int{
|
|
|
|
int capacity;
|
|
|
|
int total;
|
|
|
|
int * items;
|
|
|
|
|
|
} vector_int;
|
|
|
|
int vector_int_length( vector_int * this );
|
|
|
|
int vector_int_get( vector_int * this, int index );
|
|
|
|
void vector_int_set( vector_int * this, int index, int item );
|
|
|
|
void vector_int_resize( vector_int * this, int capacity );
|
|
|
|
void vector_int_add( vector_int * this, int item );
|
|
|
|
void vector_int_delete( vector_int * this, int index );
|
|
|
|
int vector_int_array_push( vector_int * this, int item );
|
|
|
|
void vector_int_unshift( vector_int * this, int item );
|
|
|
|
typedef struct vector_vector2{
|
|
|
|
int capacity;
|
|
|
|
int total;
|
|
|
|
vector2 * items;
|
|
|
|
|
|
} vector_vector2;
|
|
|
|
int vector_vector2_length( vector_vector2 * this );
|
|
|
|
vector2 vector_vector2_get( vector_vector2 * this, int index );
|
|
|
|
void vector_vector2_set( vector_vector2 * this, int index, vector2 item );
|
|
|
|
void vector_vector2_resize( vector_vector2 * this, int capacity );
|
|
|
|
void vector_vector2_add( vector_vector2 * this, vector2 item );
|
|
|
|
void vector_vector2_delete( vector_vector2 * this, int index );
|
|
|
|
int vector_vector2_array_push( vector_vector2 * this, vector2 item );
|
|
|
|
void vector_vector2_unshift( vector_vector2 * this, vector2 item );
|
|
|
|
vector_char_pointer vector_char_pointer_new( );
|
|
|
|
vector_char_pointer * vector_char_pointer_newPointer( );
|
|
|
|
vector_quadMesh vector_quadMesh_new( );
|
|
|
|
vector_quadMesh * vector_quadMesh_newPointer( );
|
|
|
|
vector_element vector_element_new( );
|
|
|
|
vector_element * vector_element_newPointer( );
|
|
|
|
vector_int vector_int_new( );
|
|
|
|
vector_int * vector_int_newPointer( );
|
|
|
|
vector_vector2 vector_vector2_new( );
|
|
|
|
vector_vector2 * vector_vector2_newPointer( );
|
|
|
|
#endif
|
|
|
|
|
|
typedef struct vector vector;
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct vector_char_pointer vector_char_pointer;
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct vector_quadMesh vector_quadMesh;
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct vector_element vector_element;
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct vector_int vector_int;
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct vector_vector2 vector_vector2;
|
|
|
|
|
|
|