GenericContainer
GenericContaine a tool for C++ programming
Loading...
Searching...
No Matches
GenericContainerCinterface.h File Reference

Go to the source code of this file.

Classes

struct  c_complex_type
 A structure representing a complex number, with real and imaginary components. More...
 

Enumerations

enum  {
  GENERIC_CONTAINER_OK = 0 , GENERIC_CONTAINER_BAD_TYPE , GENERIC_CONTAINER_NO_DATA , GENERIC_CONTAINER_NOT_EMPTY ,
  GENERIC_CONTAINER_BAD_HEAD
}
 

Functions

int GC_new (char const id[])
 Create a new GenericContainer object.
 
int GC_select (char const id[])
 Select an existing GenericContainer object.
 
int GC_delete (char const id[])
 Delete a GenericContainer object.
 
int GC_fill_for_test (char const id[])
 Fill a GenericContainer with test data.
 
int GC_pop_head ()
 Move the head pointer up one level in the GenericContainer.
 
int GC_reset_head ()
 Reset the head pointer to the first level in the GenericContainer.
 
int GC_dump ()
 Dump the contents of the current GenericContainer.
 
int GC_print_content_types ()
 Print the content types of the current GenericContainer.
 
int GC_get_type ()
 Retrieve the type of the current element pointed by the head in the GenericContainer.
 
char const * GC_get_type_name ()
 Retrieve the name of the type of the current element in the GenericContainer.
 
void * GC_mem_ptr (char const id[])
 Get a pointer to the internal memory of the GenericContainer object.
 
int GC_set_bool (int a)
 
int GC_set_int (int a)
 Set the current element of the GenericContainer to an integer value.
 
int GC_set_real (double a)
 Set the current element of the GenericContainer to a real number.
 
int GC_set_complex (c_complex_type const *a)
 Set the current element of the GenericContainer to a complex number.
 
int GC_set_complex2 (double re, double im)
 Set the current element of the GenericContainer to a complex number using real and imaginary parts.
 
int GC_set_string (char const a[])
 Set the current element of the GenericContainer to a string.
 
int GC_get_bool ()
 Retrieve the boolean value from the current element of the GenericContainer.
 
int GC_get_int ()
 Retrieve the integer value from the current element of the GenericContainer.
 
long GC_get_long ()
 Retrieve the long integer value from the current element of the GenericContainer.
 
double GC_get_real ()
 Retrieve the real number value from the current element of the GenericContainer.
 
c_complex_type GC_get_complex ()
 Retrieve the complex number from the current element of the GenericContainer.
 
double GC_get_complex_re ()
 Retrieve the real part of a complex number from the current element of the GenericContainer.
 
double GC_get_complex_im ()
 Retrieve the imaginary part of a complex number from the current element of the GenericContainer.
 
char const * GC_get_string ()
 Retrieve the string from the current element of the GenericContainer.
 
int GC_push_bool (int a)
 Append a boolean value to the currently selected vector of booleans in the GenericContainer.
 
int GC_push_int (int a)
 Append an integer value to the currently selected vector of integers in the GenericContainer.
 
int GC_push_real (double a)
 Append a floating-point value to the currently selected vector of real numbers in the GenericContainer.
 
int GC_push_complex (c_complex_type const *a)
 Append a complex number to the currently selected vector of complex numbers in the GenericContainer.
 
int GC_push_complex2 (double re, double im)
 Append a complex number to the currently selected vector using real and imaginary parts.
 
int GC_push_string (char const a[])
 Append a string to the currently selected vector of strings in the GenericContainer.
 
int GC_get_bool_at_pos (int pos)
 Retrieve a boolean value at a specified position from a vector of booleans in the GenericContainer.
 
int GC_get_int_at_pos (int pos)
 Retrieve an integer value at a specified position from a vector of integers in the GenericContainer.
 
double GC_get_real_at_pos (int pos)
 Retrieve a real number at a specified position from a vector of real numbers in the GenericContainer.
 
c_complex_type GC_get_complex_at_pos (int pos)
 Retrieve a complex number at a specified position from a vector of complex numbers in the GenericContainer.
 
double GC_get_complex_real_at_pos (int pos)
 Retrieve the real part of a complex number at a specified position from a vector of complex numbers.
 
double GC_get_complex_imag_at_pos (int pos)
 Retrieve the imaginary part of a complex number at a specified position from a vector of complex numbers.
 
char const * GC_get_string_at_pos (int pos)
 Retrieve a string at a specified position from a vector of strings in the GenericContainer.
 
double GC_get_real_at_coor (int i, int j)
 Retrieve a real number at the specified row and column from a matrix of real numbers in the GenericContainer.
 
c_complex_type GC_get_complex_at_coor (int i, int j)
 Retrieve a complex number at the specified row and column from a matrix of complex numbers.
 
double GC_get_complex_real_at_coor (int i, int j)
 Retrieve the real part of a complex number at the specified row and column from a matrix.
 
double GC_get_complex_imag_at_coor (int i, int j)
 Retrieve the imaginary part of a complex number at the specified row and column from a matrix.
 
int GC_set_empty_vector_of_bool ()
 Initialize the current element of the GenericContainer to an empty vector of booleans.
 
int GC_set_empty_vector_of_int ()
 Initialize the current element of the GenericContainer to an empty vector of integers.
 
int GC_set_empty_vector_of_real ()
 Initialize the current element of the GenericContainer to an empty vector of real numbers.
 
int GC_set_empty_vector_of_complex ()
 Initialize the current element of the GenericContainer to an empty vector of complex numbers.
 
int GC_set_empty_vector_of_string ()
 Initialize the current element of the GenericContainer to an empty vector of strings.
 
int GC_set_vector_of_bool (int const *a, int nelem)
 Set the current element of the GenericContainer to a vector of booleans, and copy the provided values.
 
int GC_set_vector_of_int (int const *a, int nelem)
 Set the current element of the GenericContainer to a vector of integers, and copy the provided values.
 
int GC_set_vector_of_real (double const *a, int nelem)
 Set the current element of the GenericContainer to a vector of real numbers, and copy the provided values.
 
int GC_set_vector_of_complex (double const *re, double const *im, int nelem)
 Set the current element of the GenericContainer to a vector of complex numbers, and copy the provided values.
 
int GC_set_vector_of_string (char const **a, int nelem)
 Set the current element of the GenericContainer to a vector of strings, and copy the provided values.
 
int GC_set_vector (int nelem)
 Set the current element of the GenericContainer to a vector of GenericContainer elements with the specified size.
 
int GC_set_empty_vector ()
 Set the current element of the GenericContainer to an empty vector of GenericContainer elements.
 
int GC_get_vector_size ()
 Retrieve the number of elements in the current vector of the GenericContainer.
 
int GC_get_matrix_num_rows ()
 Retrieve the number of rows in the current matrix of the GenericContainer.
 
int GC_get_matrix_num_cols ()
 Retrieve the number of columns in the current matrix of the GenericContainer.
 
int GC_push_vector_position (int pos)
 Set the insertion point in the current vector of the GenericContainer.
 
int GC_set_map ()
 Initialize the current element of the GenericContainer to a map.
 
int GC_init_map_key ()
 Initialize the current element as a map key in the GenericContainer.
 
char const * GC_get_next_key (void)
 Retrieve the key of the next element in a map from the GenericContainer.
 
int GC_push_map_position (char const pos[])
 Set the insertion point to the specified key in the current map of the GenericContainer.