Archeus 0.0.0
A C library and game engine that focuses on documentation
Loading...
Searching...
No Matches
chemical.h File Reference
#include <stdint.h>
#include "arc/std/parser.h"

Go to the source code of this file.

Typedefs

typedef void(* ARC_ChemicalData_CopyToTypeFn) (void **data, ARC_ParserTagToken *parsedData)
 TODO: write this.
 
typedef void(* ARC_ParserCSV_DestroyTypeFn) (void *data)
 TODO: write this.
 
typedef struct ARC_Chemical ARC_Chemical
 a function to read a key from string to a ARC_ConfigTypeTemplate
 

Functions

void ARC_Chemical_Create (ARC_Chemical **chemical)
 TODO: write this.
 
void ARC_Chemical_Destroy (ARC_Chemical *chemical)
 TODO: write this.
 
void ARC_Chemical_RegisterType (ARC_Chemical *chemical, ARC_String *typeName, ARC_ChemicalData_CopyToTypeFn *copyToTypeFn, ARC_ParserCSV_DestroyTypeFn destroyTypeFn)
 TODO: write this.
 
void ARC_Chemical_SetGroup (ARC_Chemical *chemical, ARC_String *groupName)
 sets current group in config
 
void * ARC_Chemical_Get (ARC_Chemical *chemical, ARC_String *element)
 get a value from a given keyname
 
void ARC_Chemical_LoadFromString (ARC_String *path)
 TODO: write this.
 
void ARC_Chemical_LoadFromFile (ARC_String *path)
 TODO: write this.
 
void ARC_Chemical_UnloadFromString (ARC_String *data)
 TODO: write this.
 
void ARC_Chemical_UnloadFromFile (ARC_String *data)
 TODO: write this.
 

Typedef Documentation

◆ ARC_Chemical

typedef struct ARC_Chemical ARC_Chemical

a function to read a key from string to a ARC_ConfigTypeTemplate

Parameters
configARC_Config to store data to
stringARC_String of data that is being read in
valuevalue that is read in
Note
use ARC_Config_StoreValue(ARC_Config *config, ARC_String *name, void *value); to store a value to the config if there is an error, set arc_errno
Returns
0 if value not a reference, 1 if value is a reference

a function to delete a value from a key in ARC_Config

Parameters
configARC_Config that can be used to check for references in data
valuepointer of data to be deleted
Note
this function can be NULL if memory does not need to be cleaned for this type if there is an error, set arc_errno

TODO: write this

Definition at line 73 of file chemical.h.

◆ ARC_ChemicalData_CopyToTypeFn

typedef void(* ARC_ChemicalData_CopyToTypeFn) (void **data, ARC_ParserTagToken *parsedData)

TODO: write this.

Definition at line 38 of file chemical.h.

◆ ARC_ParserCSV_DestroyTypeFn

typedef void(* ARC_ParserCSV_DestroyTypeFn) (void *data)

TODO: write this.

Definition at line 43 of file chemical.h.

Function Documentation

◆ ARC_Chemical_Create()

void ARC_Chemical_Create ( ARC_Chemical ** chemical)

TODO: write this.

◆ ARC_Chemical_Destroy()

void ARC_Chemical_Destroy ( ARC_Chemical * chemical)

TODO: write this.

◆ ARC_Chemical_Get()

void * ARC_Chemical_Get ( ARC_Chemical * chemical,
ARC_String * element )

get a value from a given keyname

Note
name may be prefaced with <group>:: to specify group
Parameters
[in]chemicalARC_Chemical to get value from
[in]elementname of a variable that has been read in
Returns
the stored element on success, or NULL on failure

◆ ARC_Chemical_LoadFromFile()

void ARC_Chemical_LoadFromFile ( ARC_String * path)

TODO: write this.

◆ ARC_Chemical_LoadFromString()

void ARC_Chemical_LoadFromString ( ARC_String * path)

TODO: write this.

◆ ARC_Chemical_RegisterType()

void ARC_Chemical_RegisterType ( ARC_Chemical * chemical,
ARC_String * typeName,
ARC_ChemicalData_CopyToTypeFn * copyToTypeFn,
ARC_ParserCSV_DestroyTypeFn destroyTypeFn )

TODO: write this.

◆ ARC_Chemical_SetGroup()

void ARC_Chemical_SetGroup ( ARC_Chemical * chemical,
ARC_String * groupName )

sets current group in config

Note
ARC_Chemical_Get will use this set group
Parameters
[in]chemicalARC_Config we are setting current group in
[in]groupnamename of group that will be set

◆ ARC_Chemical_UnloadFromFile()

void ARC_Chemical_UnloadFromFile ( ARC_String * data)

TODO: write this.

◆ ARC_Chemical_UnloadFromString()

void ARC_Chemical_UnloadFromString ( ARC_String * data)

TODO: write this.