Skip to content
Authors

File prod_range.h

FileList > prod_range > src > prod_range.h

Go to the source code of this file

Defines the functionality of a range production, yielding an integer in a given range. More...

  • #include <stddef.h>

Classes

Type Name
struct prod_range_config_t
Configuration type for a Janet production.

Public Functions

Type Name
const char * prod_range_resolve (const void * config)
The resolve function for the range production type.
const char * prod_range_terminate (const void * config)
The resolve function for the range production type.

Macros

Type Name
define PROD_RANGE_NAME ("range")
The type identifier for the range production type.

Detailed Description

Author:

Joe Starr

Public Functions Documentation

function prod_range_resolve

The resolve function for the range production type.

const char * prod_range_resolve (
    const void * config
) 

Randomly select an integer between a lower and upper bound. Convert to a string stored in an output buffer for the configured production.

Parameters:

  • config A configuration of a production.

Returns:

A pointer to the output of the resolution.


function prod_range_terminate

The resolve function for the range production type.

const char * prod_range_terminate (
    const void * config
) 

Calls the resolve function.

Parameters:

  • config A configuration of a production.

Returns:

A pointer to the output of the resolution.


Macro Definition Documentation

define PROD_RANGE_NAME

The type identifier for the range production type.

#define PROD_RANGE_NAME `("range")`



The documentation for this class was generated from the following file source/prod_range/src/prod_range.h