Pogosim
Loading...
Searching...
No Matches
configuration.h File Reference
#include "pogosim.h"
#include "geometry.h"
#include <yaml-cpp/yaml.h>
#include <string>
#include <stdexcept>
#include <sstream>
#include <vector>
#include <utility>
#include <type_traits>

Go to the source code of this file.

Classes

class  Configuration
 Class for managing hierarchical configuration parameters. More...

Namespaces

namespace  detail

Functions

std::string polygons_to_yaml (const arena_polygons_t &polygons)
 Convert an arena_polygons_t structure into a compact YAML string.
template<typename T>
std::enable_if< std::is_arithmetic< T >::value, T >::type detail::numeric_fallback (const YAML::Node &n, const T &default_value)
 compile-time branch for arithmetic targets
template<typename T>
std::enable_if<!std::is_arithmetic< T >::value, T >::type detail::numeric_fallback (const YAML::Node &, const T &default_value)
 branch for non-arithmetic targets – just forward the default

Function Documentation

◆ polygons_to_yaml()

std::string polygons_to_yaml ( const arena_polygons_t & polygons)
inline

Convert an arena_polygons_t structure into a compact YAML string.

Parameters
polygonsPolygons to serialise (outer vector = polygons, inner vector = ordered vertices).
Returns
A UTF-8 YAML document (no trailing newline) suitable for Arrow metadata.
Note
The generated YAML uses a two-level nested sequence:
- - x: 0.0
y: 0.0
- x: 1.0
y: 0.0
- x: 1.0
y: 1.0
- x: 0.0
y: 1.0
- - x: 2.0
y: 2.0
...