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.
|
This is a datatype to store the versioning details for the Grassroots JSON schema that is being used. More...
#include <schema_version.h>
Public Member Functions | |
SchemaVersion * | AllocateSchemaVersion (const int major, const int minor) |
Create a new SchemaVersion. More... | |
bool | SetSchemaVersionDetails (SchemaVersion *sv_p, const int major, const int minor) |
Set the details for a given SchemaVersion. More... | |
void | FreeSchemaVersion (SchemaVersion *sv_p) |
Free the memory and resources for a given SchemaVersion. More... | |
void | ClearSchemaVersion (SchemaVersion *sv_p) |
Clear the memory and resources for a given SchemaVersion. More... | |
json_t * | GetSchemaVersionAsJSON (const SchemaVersion *const sv_p) |
Get the JSON representation for a SchemaVersion. More... | |
SchemaVersion * | GetSchemaVersionFromJSON (const json_t *const json_p) |
Create a SchemaVersion from a JSON representation. More... | |
Data Fields | |
uint32 | sv_major |
The major revision of the schema. More... | |
uint32 | sv_minor |
The minor revision of the schema. More... | |
char * | sv_version_s |
The version as a string this will be of the form. More... | |
This is a datatype to store the versioning details for the Grassroots JSON schema that is being used.
This allows backward compatibility code to be used as the schema is upgraded.
SchemaVersion * AllocateSchemaVersion | ( | const int | major, |
const int | minor | ||
) |
Create a new SchemaVersion.
major | The major revision of the SchemaVersion. |
minor | The minor revision of the SchemaVersion. |
NULL
upon error. bool SetSchemaVersionDetails | ( | SchemaVersion * | sv_p, |
const int | major, | ||
const int | minor | ||
) |
Set the details for a given SchemaVersion.
major | The major revision to set the SchemaVersion to. |
minor | The minor revision to set the SchemaVersion to. |
sv_p | The SchemaVersion to amend. |
true
if the SchemaVersion was amended successfully, false
otherwise. void FreeSchemaVersion | ( | SchemaVersion * | sv_p | ) |
Free the memory and resources for a given SchemaVersion.
sv_p | The SchemaVersion to free. |
void ClearSchemaVersion | ( | SchemaVersion * | sv_p | ) |
Clear the memory and resources for a given SchemaVersion.
sv_p | The SchemaVersion to clear. |
json_t * GetSchemaVersionAsJSON | ( | const SchemaVersion *const | sv_p | ) |
Get the JSON representation for a SchemaVersion.
sv_p | The SchemaVersion to get the JSON representation of. |
NULL
upon error. SchemaVersion * GetSchemaVersionFromJSON | ( | const json_t *const | json_p | ) |
Create a SchemaVersion from a JSON representation.
json_p | The JSON representation to create a SchemaVersion from. |
NULL
upon error. uint32 sv_major |
The major revision of the schema.
uint32 sv_minor |
The minor revision of the schema.
char* sv_version_s |
The version as a string this will be of the form.
sv_major.sv_minor