Skip to content

C API new class to handle non-army related functions #667

@masonwillman

Description

@masonwillman

In #582, we decided to add an additional class alongside ninjaArmy to make API development easier. For design details, please see this comment.

Example code of this new class being used with the API:

// Using the function
NinjaArmoryH ninjaArmory:
char** options;
ninjaArmory = NinjaMakeArmory(options);
int NinjaErr = NinjaFetchData(ninjaArmory, options)
// Function definition
// This would include more parameters depending on use case
NinjaFetchData(NinjaArmoryH ninjaArmory, char** options) {
    if (ninjaArmory != NULL) {
        // Fetch data defined in new class, similar to ninjaArmy function calls.
        reinterpret_cast<ninjaArmory*> ninjaArmory->fetchData() 
    }
}

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions