Sarafun Behavior Trees package
1
Behavior trees for the SARAFun project
Main Page
Data Structures
All
Data Structures
Namespaces
Functions
Variables
Enumerations
Enumerator
tree_generator
src
YamlCreator.cpp
1
#include <tree_generator/YamlCreator.hpp>
2
3
namespace
tree_generator{
4
5
YamlCreator::YamlCreator
(){}
6
YamlCreator::~YamlCreator
(){}
7
8
void
YamlCreator::addField
(std::string label, std::string field,
int
value)
9
{
10
YAML::Node label_node;
11
12
if
(
base_node_
[
"sarafun"
][label])
13
{
14
label_node =
base_node_
[
"sarafun"
][label];
15
}
16
17
label_node[field] = value;
18
base_node_
[
"sarafun"
][label] = label_node;
19
}
20
21
void
YamlCreator::writeFile
(std::string file_path)
22
{
23
std::ofstream file;
24
file.open(file_path);
25
file <<
base_node_
;
26
file.close();
27
}
28
}
tree_generator::YamlCreator::writeFile
void writeFile(std::string file_path)
Definition:
YamlCreator.cpp:21
tree_generator::YamlCreator::addField
void addField(std::string label, std::string field, int value)
Definition:
YamlCreator.cpp:8
tree_generator::YamlCreator::YamlCreator
YamlCreator()
Definition:
YamlCreator.cpp:5
tree_generator::YamlCreator::~YamlCreator
~YamlCreator()
Definition:
YamlCreator.cpp:6
tree_generator::YamlCreator::base_node_
YAML::Node base_node_
Definition:
YamlCreator.hpp:30
Generated on Fri Feb 17 2017 11:14:54 for Sarafun Behavior Trees package by
1.8.6