Files
tqma6-yocto-mirror/sources/poky/meta-selftest/recipes-test/cpp/files/cpp-example-lib.cpp
Siggi (OpenClaw Agent) 16accb6b24 Complete Yocto mirror with license table for TQMa6UL (2038-compliance)
- 264 license table entries with exact download URLs (224/264 resolved)
- Complete sources/ directory with all BitBake recipes
- Build configuration: tqma6ul-multi-mba6ulx, spaetzle (musl)
- Full traceability for Softwarefreigabeantrag
- GCC 13.4.0, Linux 6.6.102, U-Boot 2023.04, musl 1.2.4
- License distribution: GPL-2.0 (24), MIT (23), GPL-2.0+ (18), BSD-3 (16)
2026-03-01 21:14:11 +00:00

34 lines
726 B
C++

/*
* Copyright OpenEmbedded Contributors
*
* SPDX-License-Identifier: MIT
*/
#include <iostream>
#include <string>
#include <json-c/json.h>
#include "cpp-example-lib.hpp"
const std::string &CppExample::get_string()
{
return test_string;
}
const char *CppExample::get_json_c_version()
{
return json_c_version();
}
void CppExample::print_json()
{
struct json_object *jobj;
const int flag = JSON_C_TO_STRING_SPACED | JSON_C_TO_STRING_PRETTY;
jobj = json_object_new_object();
json_object_object_add(jobj, "test_string", json_object_new_string(test_string.c_str()));
std::cout << json_object_to_json_string_ext(jobj, flag) << std::endl;
json_object_put(jobj); // Delete the json object
}