string-output-visitor.h 979 B

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * String printing Visitor
  3. *
  4. * Copyright Red Hat, Inc. 2012
  5. *
  6. * Author: Paolo Bonzini <pbonzini@redhat.com>
  7. *
  8. * This work is licensed under the terms of the GNU LGPL, version 2.1 or later.
  9. * See the COPYING.LIB file in the top-level directory.
  10. *
  11. */
  12. #ifndef STRING_OUTPUT_VISITOR_H
  13. #define STRING_OUTPUT_VISITOR_H
  14. #include "qapi/visitor.h"
  15. typedef struct StringOutputVisitor StringOutputVisitor;
  16. /*
  17. * Create a new string output visitor.
  18. *
  19. * Using @human creates output that is a bit easier for humans to read
  20. * (for example, showing integer values in both decimal and hex).
  21. *
  22. * If everything else succeeds, pass @result to visit_complete() to
  23. * collect the result of the visit.
  24. *
  25. * The string output visitor does not implement support for alternates, null,
  26. * or arbitrary QTypes. Struct fields are not shown. It also requires a
  27. * non-null list argument to visit_start_list().
  28. */
  29. Visitor *string_output_visitor_new(bool human, char **result);
  30. #endif