Grassroots Infrastructure
The Grassroots Infrastructure is a suite of computing tools to help users and developers use scientific data infrastructure that can easily be interconnected.
|
Go to the documentation of this file.
28 #ifndef STRING_INT_PAIR_H_
29 #define STRING_INT_PAIR_H_
void SortStringIntPairsByCountDescending(StringIntPairArray *pairs_p)
Sort the entries of a StringIntPairArray into descending order of their values.
MEM_FLAG
An enum specifying the particular status of a piece of dynamically allocated memory for a particular ...
Definition: memory_allocations.h:38
json_t * GetStringIntPairsAsResourceJSON(const StringIntPairArray *pairs_p, const char *const protocol_s)
Get the JSON fragment representing a StringIntPairArray.
StringIntPair * sipa_values_p
An array of StringIntPairs.
Definition: string_int_pair.h:65
A datatype for storing a set of StringIntPairs.
Definition: string_int_pair.h:62
bool SetStringIntPair(StringIntPair *pair_p, char *text_s, MEM_FLAG text_mem, const uint32 value)
Set the data for a StringIntPair.
json_t * GetStringIntPairAsResourceJSON(const StringIntPair *pair_p, const char *const protocol_s)
Get the JSON fragment representing a StringIntPair.
uint32 sipa_size
The number of StringIntPairs in the array.
Definition: string_int_pair.h:68
StringIntPairArray * AllocateStringIntPairArray(const uint32 size)
Allocate a StringIntPairArray of a given size.
MEM_FLAG sip_string_mem
The memory flag for the key.
Definition: string_int_pair.h:50
char * sip_string_s
The key.
Definition: string_int_pair.h:47
void SortStringIntPairsByCountAscending(StringIntPairArray *pairs_p)
Sort the entries of a StringIntPairArray into ascending order of their values.
void ClearStringIntPair(StringIntPair *pair_p)
Clear the entries for a StringIntPair and freeing any memory associated with its value if appropriate...
uint32 sip_value
The value.
Definition: string_int_pair.h:53
void FreeStringIntPairArray(StringIntPairArray *array_p)
Free a StringIntPairArray and any memory associated from its keys where appropriate.
A datatype for holding a key-value pair where the key is a c-style string and the value is an unsigne...
Definition: string_int_pair.h:44
#define GRASSROOTS_UTIL_API
Definition: grassroots_util_library.h:47