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

A datatype for having a set of Services. More...

#include <service.h>

Collaboration diagram for ServicesArray:
[legend]

Public Member Functions

void FreeServicesArray (ServicesArray *services_p)
 Free a ServicesArray and each of its Services. More...
 
ServicesArrayAllocateServicesArray (const uint32 num_services)
 Allocate an empty ServicesArray. More...
 
ServicesArrayGetReferenceServicesFromJSON (json_t *config_p, const char *plugin_name_s, Service *(*get_service_fn)(json_t *config_p, size_t i, GrassrootsServer *grassroots_p), GrassrootsServer *grassroots_p)
 Get the ServicesArray generated from a Services reference file. More...
 

Data Fields

Service ** sa_services_pp
 An array of pointers to Services. More...
 
uint32 sa_num_services
 The number of Services in the array. More...
 

Detailed Description

A datatype for having a set of Services.

Member Function Documentation

◆ FreeServicesArray()

void FreeServicesArray ( ServicesArray services_p)

Free a ServicesArray and each of its Services.

Parameters
services_pThe ServicesArray to free.

◆ AllocateServicesArray()

ServicesArray * AllocateServicesArray ( const uint32  num_services)

Allocate an empty ServicesArray.

Parameters
num_servicesThe number of potential Services that the ServicesArray will hold.
Returns
A newly-allocated ServicesArray with space for the given number of Services or NULL upon error.

◆ GetReferenceServicesFromJSON()

ServicesArray * GetReferenceServicesFromJSON ( json_t *  config_p,
const char *  plugin_name_s,
Service *(*)(json_t *config_p, size_t i, GrassrootsServer *grassroots_p)  get_service_fn,
GrassrootsServer grassroots_p 
)

Get the ServicesArray generated from a Services reference file.

Parameters
config_pThe JSON fragment loaded from a referemce file.
plugin_name_sThe name of the Plugin to use.
get_service_fnThe function used to generate each Service that will be placed in the resultant ServicesArray.
Returns
The ServicesArray containing the generated Services or NULL upon error.

Field Documentation

◆ sa_services_pp

Service** sa_services_pp

An array of pointers to Services.

◆ sa_num_services

uint32 sa_num_services

The number of Services in the array.


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