Noise Modeler Library  0.1
Library for procedurally generating noise-based terrains and other content
 All Classes Files Functions Variables Enumerations Enumerator Groups Pages
nm::Parser Class Reference

Converts json strings to TypeManagers. More...

#include <parser.hpp>

Public Member Functions

optional< std::unique_ptr
< TypeManager > > 
parseDocument (std::string json)
 

Detailed Description

Converts json strings to TypeManagers.

A parser is typically used like this:

//replace readfile with your file reading function
std::string json = readFile("terrain.nm.json");
Parser parser;
auto maybeTypeManager = parser.parseDocument(json);
if(!maybeTypeManager){
//error handling
}
TypeManager& typeManager = **maybeTypeManager;
//use the type manager

The documentation for this class was generated from the following files: