GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |
GeezerVison is showing puppetlabs.github.io — cpp-hocon: C++ HOCON Parser
C++ HOCON Parser This is a port of the TypesafeConfig library to C++. The library provides C++ support for the HOCON configuration file format. MMMMMMMMMMMMMMMMMMMM
.====================.
MMMMMMMMMMMMMMMMMMMMMM
.MMMMMMMMMMMMMMMMMMMMMM.
===.7MMMIN7NMMMMMMMMM7M=MMMM,===
MMM.7MM: DMMMMM7 :MMM=MMM
MMM.7MM, DMMMMM? ~MMM=MMM
MMM.7MMM~++~?MMMMMMM~++~MMMM=MMM
.MMMMMMMMMMMMMMMMMMMMMM.
MMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMM
MMM HOCON MMM
MMMMMMMMMMMMMMMMMMMMMM
.MMMMMMMMMMMMMMMMMM.
.MMMMMMMMMMMMMMMMMM.
.MMMMMMMMMMMMMMMMMMMMMMMM
. MMMMMMMMMMMMM88MMMMMMMMMM8MM .
7=MMMMMMMM++ A CONFIG FILE ++M8MMMMMM7=
M=MMMMMMMM+ FORMAT DESIGNED +M8MMMMMM7M
M=MMMMMMMM++ FOR HUMANS ++M8MMMMMM7M
=MMMMMMMMMMMMMMMMM88MMMMMMMMMM8MMMMMM7
7MM.88MMMMMMMMMMM88MMMMMMMMMMO88 MM8
7MM MMMMMMMMMMM88MMMMMMMMMM8 MM8
7MM MMMMMMMMMMM88MMMMMMMMMM8 MM8
7MM MMMDMMMM?MM88MM?MMMMOMM8 MM8
To get started, install it, then to parse a file: #include <hocon/parser/config_document_factory.hpp>
#include <leatherman/file_util/file.hpp>
using hocon::config_document_factory::parse_file;
using leatherman::file_util::write_to_file;
int main(int argc, char** argv) {
auto doc = parse_file("/path/to/file.conf");
doc.with_value_text("a.b", "42");
write_to_file(doc.render(), "/path/to/file.conf");
return 0;
}
You can use Note that file extensions matter. A See the docs for more. CaveatsThis is a mostly complete implementation of the HOCON format. It currently has some known limitations
InstallBuild Requirements
Pre-BuildPrepare the cmake release environment: $ mkdir release $ cd release $ cmake .. Optionally, also prepare the debug environment: $ mkdir debug $ cd debug $ cmake -DCMAKE_BUILD_TYPE=Debug .. Building
TestingRun tests with Generated on Fri Jun 12 2020 09:47:38 for cpp-hocon by
1.8.18
| |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |