Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to set node style? #186

Closed
GoogleCodeExporter opened this issue Mar 30, 2015 · 1 comment
Closed

how to set node style? #186

GoogleCodeExporter opened this issue Mar 30, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

i have a vector3 class.
class vector3
{
    float x, y, z;
}

node["x"] = vector3.x;
node["y"] = vector3.y;
node["z"] = vector3.z;

the result is
    x: 0
    y: 0
    z: 0

i want the result to be:
   {x: 0, y: 0, z: 0}

if use the old api, i can use YAML::Flow to set the style:
YAML::Emitter emitter;
out << YAML::Flow  << YAML::BeginMap << YAML::Key << "x" << YAML::Value << x << 
YAML::EndMap

use the new api, how to set the style?

thanks.


Original issue reported on code.google.com by ChenA.Invalid@gmail.com on 22 Jan 2013 at 2:34

@GoogleCodeExporter
Copy link
Author

You can still use the emitter and set the flow style:

YAML::Emitter emitter;
emitter << YAML::Flow << node;

In the future, please ask questions like these on stackoverflow.com and tag 
them yaml-cpp. File an issue report if it is a bug or feature request.

Original comment by jbe...@gmail.com on 22 Jan 2013 at 2:39

  • Changed state: Invalid
  • Added labels: ****
  • Removed labels: ****

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant