diff options
Diffstat (limited to 'lldb/include/lldb/API/SBCommandReturnObject.h')
-rw-r--r-- | lldb/include/lldb/API/SBCommandReturnObject.h | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/lldb/include/lldb/API/SBCommandReturnObject.h b/lldb/include/lldb/API/SBCommandReturnObject.h new file mode 100644 index 00000000000..65ddc70c124 --- /dev/null +++ b/lldb/include/lldb/API/SBCommandReturnObject.h @@ -0,0 +1,80 @@ +//===-- SBCommandReturnObject.h ---------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLDB_SBCommandReturnObject_h_ +#define LLDB_SBCommandReturnObject_h_ + +#include <LLDB/SBDefines.h> + +namespace lldb { + +class SBCommandReturnObject +{ +public: + + SBCommandReturnObject (); + + ~SBCommandReturnObject (); + + bool + IsValid() const; + + const char * + GetOutput (); + + const char * + GetError (); + + size_t + PutOutput (FILE *fh); + + size_t + GetOutputSize (); + + size_t + GetErrorSize (); + + size_t + PutError (FILE *fh); + + void + Clear(); + + lldb::ReturnStatus + GetStatus(); + + bool + Succeeded (); + + bool + HasResult (); + + void + AppendMessage (const char *message); + +protected: + friend class SBCommandInterpreter; + friend class SBOptions; + + lldb_private::CommandReturnObject * + GetLLDBObjectPtr(); + + lldb_private::CommandReturnObject & + GetLLDBObjectRef(); + + void + SetLLDBObjectPtr (lldb_private::CommandReturnObject *ptr); + + private: + std::auto_ptr<lldb_private::CommandReturnObject> m_return_object_ap; +}; + +} // namespace lldb + +#endif // LLDB_SBCommandReturnObject_h_ |