Go to the documentation of this file.
   32 #include <yaml-cpp/emitter.h> 
   49     std::ofstream out(qPrintable(filename));
 
   57       message_ = 
"Failed to open " + filename + 
" for writing.";
 
   60   catch (
const std::exception& ex)
 
   72   std::stringstream out;
 
   76     return QString::fromStdString(out.str());
 
   90   YAML::Emitter emitter;
 
   94     out << emitter.c_str() << std::endl;
 
  115     emitter << YAML::BeginSeq;
 
  116     for (
int i = 0; i < 
config.listLength(); i++)
 
  120     emitter << YAML::EndSeq;
 
  125     emitter << YAML::BeginMap;
 
  131       emitter << YAML::Key;
 
  132       emitter << map_iter.
currentKey().toStdString();
 
  133       emitter << YAML::Value;
 
  138     emitter << YAML::EndMap;
 
  143     QString value = 
config.getValue().toString();
 
  144     if (value.size() == 0)
 
  146       emitter << YAML::DoubleQuoted << 
"";
 
  150       emitter << value.toStdString();
 
  158     emitter << YAML::Null;
 
  
bool isValid()
Return true if the iterator currently points to a valid entry, false if not.
YamlConfigWriter()
Constructor. Writer starts in a non-error state.
QString currentKey()
Return the name of the current map entry.
void writeStream(const Config &config, std::ostream &out, const QString &filename="data stream")
Write config data to a std::ostream. This potentially changes the return values of error() and status...
QString errorMessage()
Return an error message if the latest write call had an error, or the empty string if there was no er...
bool error()
Return true if the latest write operation had an error.
Config currentChild()
Return a Config reference to the current map entry.
void writeConfigNode(const Config &config, YAML::Emitter &emitter)
QString writeString(const Config &config, const QString &filename="data string")
Write config data to a string, and return it. This potentially changes the return values of error() a...
Iterator class for looping over all entries in a Map type Config Node.
void writeFile(const Config &config, const QString &filename)
Write config data to a file. This potentially changes the return values of error() and statusMessage(...
void advance()
Advance iterator to next entry.
Configuration data storage class.
rviz
Author(s): Dave Hershberger, David Gossow, Josh Faust, William Woodall 
autogenerated on Sun May 4 2025 02:31:27