1 //===-- SWIG Interface for SBCommandReturnObject ----------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
13 "Represents a container which holds the result from command execution.
14 It works with SBCommandInterpreter.HandleCommand() to encapsulate the result
17 See SBCommandInterpreter for example usage of SBCommandReturnObject."
18 ) SBCommandReturnObject;
19 class SBCommandReturnObject
23 SBCommandReturnObject ();
25 SBCommandReturnObject (const lldb::SBCommandReturnObject &rhs);
27 ~SBCommandReturnObject ();
45 GetOutput (bool only_if_no_immediate);
48 GetError (bool if_no_immediate);
60 SetStatus (lldb::ReturnStatus status);
63 SetError (lldb::SBError &error,
64 const char *fallback_error_cstr = NULL);
67 SetError (const char *error_cstr);
79 AppendMessage (const char *message);
82 AppendWarning (const char *message);
85 GetDescription (lldb::SBStream &description);
88 // wrapping here so that lldb takes ownership of the
89 // new FILE* created inside of the swig interface
91 void SetImmediateOutputFile(FILE *fh) {
92 self->SetImmediateOutputFile(fh, true);
94 void SetImmediateErrorFile(FILE *fh) {
95 self->SetImmediateErrorFile(fh, true);
100 PutCString(const char* string, int len);
102 // wrapping the variadic Printf() with a plain Print()
103 // because it is hard to support varargs in SWIG bridgings
105 void Print (const char* str)
107 self->Printf("%s", str);