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.
StringIntPair Struct Reference

A datatype for holding a key-value pair where the key is a c-style string and the value is an unsigned integer. More...

#include <string_int_pair.h>

Public Member Functions

bool SetStringIntPair (StringIntPair *pair_p, char *text_s, MEM_FLAG text_mem, const uint32 value)
 Set the data for a StringIntPair. More...
 
void ClearStringIntPair (StringIntPair *pair_p)
 Clear the entries for a StringIntPair and freeing any memory associated with its value if appropriate. More...
 

Data Fields

char * sip_string_s
 The key. More...
 
MEM_FLAG sip_string_mem
 The memory flag for the key. More...
 
uint32 sip_value
 The value. More...
 

Detailed Description

A datatype for holding a key-value pair where the key is a c-style string and the value is an unsigned integer.

Member Function Documentation

◆ SetStringIntPair()

bool SetStringIntPair ( StringIntPair pair_p,
char *  text_s,
MEM_FLAG  text_mem,
const uint32  value 
)

Set the data for a StringIntPair.

Parameters
pair_pThe StringIntPair to set the values for.
text_sThe new key value.
text_memThe MEM_FLAG determining how to store the key value.
valueThe new value.
Returns
Upon success this will free, if required, any memory associated with the old key and update the key and value as appropriate and return true. Upon failure, this will return false and the data of the StringIntPair will remain unaltered.

◆ ClearStringIntPair()

void ClearStringIntPair ( StringIntPair pair_p)

Clear the entries for a StringIntPair and freeing any memory associated with its value if appropriate.

Parameters
pair_pThe StringIntPair to clear.

Field Documentation

◆ sip_string_s

char* sip_string_s

The key.

◆ sip_string_mem

MEM_FLAG sip_string_mem

The memory flag for the key.

◆ sip_value

uint32 sip_value

The value.


The documentation for this struct was generated from the following file: