Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
fhiclcpp
fhiclcpp
test
seq_of_seq_t.cc
Go to the documentation of this file.
1
#include "
fhiclcpp/ParameterSet.h
"
2
3
#include <cassert>
4
#include <string>
5
#include <vector>
6
7
using
fhicl::ParameterSet
;
8
using
std::string
;
9
using
std::vector
;
10
11
int
12
main
()
13
{
14
string
const
doc
=
"v1: [[ ],[ 1],[-1, 2,3]]"
;
15
auto
const
p
=
ParameterSet::make
(doc);
16
assert(
p
.get_names() == vector<string>({
"v1"
}));
17
auto
vvi =
p
.get<vector<vector<int>>>(
"v1"
);
18
assert(vvi.size() == 3);
19
assert(vvi[0] ==
vector<int>
());
20
assert(vvi[1] ==
vector<int>
({1}));
21
assert(vvi[2] ==
vector<int>
({-1, 2, 3}));
22
}
vector< int >
string
std::string string
Definition:
nybbler.cc:12
vector
struct vector vector
main
int main()
Definition:
seq_of_seq_t.cc:12
ParameterSet.h
test.p
p
Definition:
test.py:223
art::InputSourceFactory::make
unique_ptr< InputSource > make(ParameterSet const &conf, InputSourceDescription &desc)
Definition:
InputSourceFactory.cc:23
doc
QCString doc
Definition:
vhdljjparser.cpp:77
fhicl::ParameterSet
Definition:
ParameterSet.h:36
Generated by
1.8.11