WPILibC++  2019.1.1-beta-4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages

Functions

char * NT_AllocateCharArray (size_t size)
 Allocates an array of chars. More...
 
NT_BoolNT_AllocateBooleanArray (size_t size)
 Allocates an array of booleans. More...
 
double * NT_AllocateDoubleArray (size_t size)
 Allocates an array of doubles. More...
 
struct NT_StringNT_AllocateStringArray (size_t size)
 Allocates an array of NT_Strings. More...
 
void NT_FreeCharArray (char *v_char)
 Frees an array of chars. More...
 
void NT_FreeDoubleArray (double *v_double)
 Frees an array of doubles. More...
 
void NT_FreeBooleanArray (NT_Bool *v_boolean)
 Frees an array of booleans. More...
 
void NT_FreeStringArray (struct NT_String *v_string, size_t arr_size)
 Frees an array of NT_Strings. More...
 

Detailed Description

Function Documentation

NT_Bool* NT_AllocateBooleanArray ( size_t  size)

Allocates an array of booleans.

Note that the size is the number of elements, and not the specific number of bytes to allocate. That is calculated internally.

Parameters
sizethe number of elements the array will contain
Returns
the allocated boolean array

After use, the array should be freed using the NT_FreeBooleanArray() function.

char* NT_AllocateCharArray ( size_t  size)

Allocates an array of chars.

Note that the size is the number of elements, and not the specific number of bytes to allocate. That is calculated internally.

Parameters
sizethe number of elements the array will contain
Returns
the allocated char array

After use, the array should be freed using the NT_FreeCharArray() function.

double* NT_AllocateDoubleArray ( size_t  size)

Allocates an array of doubles.

Note that the size is the number of elements, and not the specific number of bytes to allocate. That is calculated internally.

Parameters
sizethe number of elements the array will contain
Returns
the allocated double array

After use, the array should be freed using the NT_FreeDoubleArray() function.

struct NT_String* NT_AllocateStringArray ( size_t  size)

Allocates an array of NT_Strings.

Note that the size is the number of elements, and not the specific number of bytes to allocate. That is calculated internally.

Parameters
sizethe number of elements the array will contain
Returns
the allocated NT_String array

After use, the array should be freed using the NT_FreeStringArray() function.

void NT_FreeBooleanArray ( NT_Bool v_boolean)

Frees an array of booleans.

Parameters
v_booleanpointer to the boolean array to free
void NT_FreeCharArray ( char *  v_char)

Frees an array of chars.

Parameters
v_booleanpointer to the char array to free
void NT_FreeDoubleArray ( double *  v_double)

Frees an array of doubles.

Parameters
v_booleanpointer to the double array to free
void NT_FreeStringArray ( struct NT_String v_string,
size_t  arr_size 
)

Frees an array of NT_Strings.

Parameters
v_stringpointer to the string array to free
arr_sizesize of the string array to free

Note that the individual NT_Strings in the array should NOT be freed before calling this. This function will free all the strings individually.