Added the ability to create a SBCommandReturnObject object from a pointer
and also to later release the ownership of the pointer object. This was needed for SWIG interaction. llvm-svn: 138133
This commit is contained in:
parent
419fd4f315
commit
7d47a66379
|
@ -25,8 +25,15 @@ public:
|
|||
SBCommandReturnObject (const lldb::SBCommandReturnObject &rhs);
|
||||
|
||||
#ifndef SWIG
|
||||
|
||||
const lldb::SBCommandReturnObject &
|
||||
operator = (const lldb::SBCommandReturnObject &rhs);
|
||||
|
||||
|
||||
SBCommandReturnObject (lldb_private::CommandReturnObject *ptr);
|
||||
|
||||
lldb_private::CommandReturnObject *
|
||||
Release ();
|
||||
#endif
|
||||
|
||||
~SBCommandReturnObject ();
|
||||
|
|
|
@ -28,6 +28,17 @@ SBCommandReturnObject::SBCommandReturnObject (const SBCommandReturnObject &rhs):
|
|||
m_opaque_ap.reset (new CommandReturnObject (*rhs.m_opaque_ap));
|
||||
}
|
||||
|
||||
SBCommandReturnObject::SBCommandReturnObject (CommandReturnObject *ptr) :
|
||||
m_opaque_ap (ptr)
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturnObject *
|
||||
SBCommandReturnObject::Release ()
|
||||
{
|
||||
return m_opaque_ap.release();
|
||||
}
|
||||
|
||||
const SBCommandReturnObject &
|
||||
SBCommandReturnObject::operator = (const SBCommandReturnObject &rhs)
|
||||
{
|
||||
|
@ -57,7 +68,7 @@ SBCommandReturnObject::IsValid() const
|
|||
const char *
|
||||
SBCommandReturnObject::GetOutput ()
|
||||
{
|
||||
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
|
||||
LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
|
||||
|
||||
if (m_opaque_ap.get())
|
||||
{
|
||||
|
@ -77,7 +88,7 @@ SBCommandReturnObject::GetOutput ()
|
|||
const char *
|
||||
SBCommandReturnObject::GetError ()
|
||||
{
|
||||
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
|
||||
LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
|
||||
|
||||
if (m_opaque_ap.get())
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue