|
ReUseX
0.0.5
3D Point Cloud Processing for Building Reuse
|
Classes | |
| struct | SectionDescriptor |
| Describes a section in the JSON export template. More... | |
Functions | |
| std::span< const SectionDescriptor > | section_descriptors () |
| Get the section descriptors in JSON template order. | |
| nlohmann::json | to_json (const MaterialPassport &passport) |
| Export a single MaterialPassport to JSON. | |
| nlohmann::json | to_json_with_defaults (const MaterialPassport &passport) |
| Export a single MaterialPassport to JSON with sensible defaults. | |
| nlohmann::json | generate_blank_template () |
| Generate a blank MaterialPassport template as JSON. | |
| nlohmann::json | to_json (const std::vector< MaterialPassport > &passports) |
| Export multiple MaterialPassports to a JSON array. | |
| std::string | to_json_string (const MaterialPassport &passport, int indent=4) |
| Export a single passport as a formatted JSON string. | |
| std::string | to_json_string (const std::vector< MaterialPassport > &passports, int indent=4) |
| Export multiple passports as a formatted JSON string. | |
|
nodiscard |
Generate a blank MaterialPassport template as JSON.
Creates a complete template with all 10 sections and all properties present, with empty values for user to fill in. Useful for creating new material passports from scratch.
Template characteristics:
| std::span< const SectionDescriptor > reusex::core::json_export::section_descriptors | ( | ) |
Get the section descriptors in JSON template order.
Returns 10 sections in the order defined by the Danish standard: Owner, ConstructionItemDescription, ProductInformation, Certifications, Dimensions, History, Condition, Pollution, EnvironmentalPotential, FireProperties
|
nodiscard |
Export a single MaterialPassport to JSON.
Produces a JSON object matching the Danish "Materialepas for genbrugte byggevarer" interchange format with sections, log, and metadata.
| passport | The passport to export |
|
nodiscard |
Export multiple MaterialPassports to a JSON array.
Each element in the array is a full passport JSON object.
| passports | Vector of passports to export |
|
nodiscard |
Export a single passport as a formatted JSON string.
| passport | The passport to export |
| indent | Number of spaces for indentation (default: 4) |
|
nodiscard |
Export multiple passports as a formatted JSON string.
| passports | Vector of passports to export |
| indent | Number of spaces for indentation (default: 4) |
|
nodiscard |
Export a single MaterialPassport to JSON with sensible defaults.
Similar to to_json(), but populates missing optional fields with sensible defaults to improve readability:
This is useful for exporting partial passports in a user-friendly format.
| passport | The passport to export |