File: example-containers_params_by_name.md

package info (click to toggle)
mrpt 1%3A2.5.8%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 87,448 kB
  • sloc: cpp: 551,662; ansic: 38,702; xml: 3,914; python: 2,547; sh: 404; makefile: 237
file content (33 lines) | stat: -rw-r--r-- 621 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
\page containers_params_by_name Example: containers_params_by_name

This is another use of mrpt::containers::yaml for parameter passing.

Example output:

~~~~~~~~~~~~~
CALL #1 ================================
'threshold' is 3.05
Is 'altitude' set? 1
Is 'level' set? 0
Level is : 666
Dump of all params:
%YAML 1.2
---
altitude: 100
threshold: 3.05

CALL #2 ================================
'threshold' is 3.05
Is 'altitude' set? 1
Is 'level' set? 1
Level is : -1
Dump of all params:
%YAML 1.2
---
altitude: 100
level: -1
threshold: 3.05
~~~~~~~~~~~~~

C++ example source code:
\include containers_params_by_name/test.cpp