emit.h 958 B

1234567891011121314151617181920212223242526272829303132
  1. #ifndef NODE_EMIT_H_62B23520_7C8E_11DE_8A39_0800200C9A66
  2. #define NODE_EMIT_H_62B23520_7C8E_11DE_8A39_0800200C9A66
  3. #if defined(_MSC_VER) || \
  4. (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || \
  5. (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4
  6. #pragma once
  7. #endif
  8. #include <string>
  9. #include <iosfwd>
  10. #include "yaml-cpp/dll.h"
  11. namespace YAML {
  12. class Emitter;
  13. class Node;
  14. /**
  15. * Emits the node to the given {@link Emitter}. If there is an error in writing,
  16. * {@link Emitter#good} will return false.
  17. */
  18. YAML_CPP_API Emitter& operator<<(Emitter& out, const Node& node);
  19. /** Emits the node to the given output stream. */
  20. YAML_CPP_API std::ostream& operator<<(std::ostream& out, const Node& node);
  21. /** Converts the node to a YAML string. */
  22. YAML_CPP_API std::string Dump(const Node& node);
  23. } // namespace YAML
  24. #endif // NODE_EMIT_H_62B23520_7C8E_11DE_8A39_0800200C9A66