diff options
Diffstat (limited to 'lldb/tools/lldb-mi/MIDriverBase.cpp')
-rw-r--r-- | lldb/tools/lldb-mi/MIDriverBase.cpp | 155 |
1 files changed, 77 insertions, 78 deletions
diff --git a/lldb/tools/lldb-mi/MIDriverBase.cpp b/lldb/tools/lldb-mi/MIDriverBase.cpp index 6738497..0620b61 100644 --- a/lldb/tools/lldb-mi/MIDriverBase.cpp +++ b/lldb/tools/lldb-mi/MIDriverBase.cpp @@ -8,13 +8,14 @@ //===----------------------------------------------------------------------===// // Third party headers: -#include "lldb/API/SBEvent.h" #include "lldb/API/SBBroadcaster.h" +#include "lldb/API/SBEvent.h" // In-house headers: #include "MIDriverBase.h" -//++ ------------------------------------------------------------------------------------ +//++ +//------------------------------------------------------------------------------------ // Details: CMIDriverBase constructor. // Type: Method. // Args: None. @@ -22,26 +23,22 @@ // Throws: None. //-- CMIDriverBase::CMIDriverBase() - : m_pDriverFallThru(nullptr) - , m_pDriverParent(nullptr) - , m_bExitApp(false) -{ -} + : m_pDriverFallThru(nullptr), m_pDriverParent(nullptr), m_bExitApp(false) {} -//++ ------------------------------------------------------------------------------------ +//++ +//------------------------------------------------------------------------------------ // Details: CMIDriverBase destructor. // Type: Overrideable. // Args: None. // Return: None. // Throws: None. //-- -CMIDriverBase::~CMIDriverBase() -{ - m_pDriverFallThru = NULL; -} +CMIDriverBase::~CMIDriverBase() { m_pDriverFallThru = NULL; } -//++ ------------------------------------------------------------------------------------ -// Details: This function allows *this driver to call on another driver to perform work +//++ +//------------------------------------------------------------------------------------ +// Details: This function allows *this driver to call on another driver to +// perform work // should this driver not be able to handle the client data input. // Type: Overrideable. // Check the error message if the function returns a failure. @@ -52,15 +49,16 @@ CMIDriverBase::~CMIDriverBase() // MIstatus::failure - Command failed. // Throws: None. //-- -bool -CMIDriverBase::DoFallThruToAnotherDriver(const CMIUtilString &vCmd, CMIUtilString &vwErrMsg) -{ - // Do nothing - override and implement. Use m_pDriverFallThru. - return MIstatus::success; +bool CMIDriverBase::DoFallThruToAnotherDriver(const CMIUtilString &vCmd, + CMIUtilString &vwErrMsg) { + // Do nothing - override and implement. Use m_pDriverFallThru. + return MIstatus::success; } -//++ ------------------------------------------------------------------------------------ -// Details: This function allows *this driver to call on another driver to perform work +//++ +//------------------------------------------------------------------------------------ +// Details: This function allows *this driver to call on another driver to +// perform work // should this driver not be able to handle the client data input. // Type: Overrideable. // Args: vrOtherDriver - (R) Reference to another driver object. @@ -68,18 +66,18 @@ CMIDriverBase::DoFallThruToAnotherDriver(const CMIUtilString &vCmd, CMIUtilStrin // MIstatus::failure - Functional failed. // Throws: None. //-- -bool -CMIDriverBase::SetDriverToFallThruTo(const CMIDriverBase &vrOtherDriver) -{ - MIunused(vrOtherDriver); +bool CMIDriverBase::SetDriverToFallThruTo(const CMIDriverBase &vrOtherDriver) { + MIunused(vrOtherDriver); - // Do nothing - override and implement. Set m_pDriverFallThru. + // Do nothing - override and implement. Set m_pDriverFallThru. - return MIstatus::success; + return MIstatus::success; } -//++ ------------------------------------------------------------------------------------ -// Details: This function allows *this driver to call functionality on the parent driver +//++ +//------------------------------------------------------------------------------------ +// Details: This function allows *this driver to call functionality on the +// parent driver // ask for information for example. // Type: Overrideable. // Args: vrOtherDriver - (R) Reference to another driver object. @@ -87,18 +85,18 @@ CMIDriverBase::SetDriverToFallThruTo(const CMIDriverBase &vrOtherDriver) // MIstatus::failure - Functional failed. // Throws: None. //-- -bool -CMIDriverBase::SetDriverParent(const CMIDriverBase &vrOtherDriver) -{ - MIunused(vrOtherDriver); +bool CMIDriverBase::SetDriverParent(const CMIDriverBase &vrOtherDriver) { + MIunused(vrOtherDriver); - // Do nothing - override and implement. Set m_pDriverParent. + // Do nothing - override and implement. Set m_pDriverParent. - return MIstatus::success; + return MIstatus::success; } -//++ ------------------------------------------------------------------------------------ -// Details: Retrieve the parent driver to *this driver if one assigned. If assigned *this +//++ +//------------------------------------------------------------------------------------ +// Details: Retrieve the parent driver to *this driver if one assigned. If +// assigned *this // is the pass through driver that the parent driver passes work to. // Type: Method. // Args: None. @@ -106,14 +104,14 @@ CMIDriverBase::SetDriverParent(const CMIDriverBase &vrOtherDriver) // - NULL = there is not parent to *this driver. // Throws: None. //-- -CMIDriverBase * -CMIDriverBase::GetDriversParent() const -{ - return m_pDriverParent; +CMIDriverBase *CMIDriverBase::GetDriversParent() const { + return m_pDriverParent; } -//++ ------------------------------------------------------------------------------------ -// Details: Retrieve the pointer to the other fall through driver *this driver is using +//++ +//------------------------------------------------------------------------------------ +// Details: Retrieve the pointer to the other fall through driver *this driver +// is using // (or not using). // Type: Method. // Args: None. @@ -121,72 +119,73 @@ CMIDriverBase::GetDriversParent() const // - NULL if no driver set. // Throws: None. //-- -CMIDriverBase * -CMIDriverBase::GetDriverToFallThruTo() const -{ - return m_pDriverFallThru; +CMIDriverBase *CMIDriverBase::GetDriverToFallThruTo() const { + return m_pDriverFallThru; } -//++ ------------------------------------------------------------------------------------ -// Details: *this driver provides a file stream to other drivers on which *this driver -// write's out to and they read as expected input. *this driver is passing +//++ +//------------------------------------------------------------------------------------ +// Details: *this driver provides a file stream to other drivers on which *this +// driver +// write's out to and they read as expected input. *this driver is +// passing // through commands to the (child) pass through assigned driver. // Type: Overrideable. // Args: None. // Return: FILE * - Pointer to stream. // Throws: None. //-- -FILE * -CMIDriverBase::GetStdin() const -{ - // Do nothing - override and implement - return nullptr; +FILE *CMIDriverBase::GetStdin() const { + // Do nothing - override and implement + return nullptr; } -//++ ------------------------------------------------------------------------------------ -// Details: *this driver provides a file stream to other pass through assigned drivers +//++ +//------------------------------------------------------------------------------------ +// Details: *this driver provides a file stream to other pass through assigned +// drivers // so they know what to write to. // Type: Overrideable. // Args: None. // Return: FILE * - Pointer to stream. // Throws: None. //-- -FILE * -CMIDriverBase::GetStdout() const -{ - // Do nothing - override and implement - return nullptr; +FILE *CMIDriverBase::GetStdout() const { + // Do nothing - override and implement + return nullptr; } -//++ ------------------------------------------------------------------------------------ -// Details: *this driver provides a error file stream to other pass through assigned drivers +//++ +//------------------------------------------------------------------------------------ +// Details: *this driver provides a error file stream to other pass through +// assigned drivers // so they know what to write to. // Type: Overrideable. // Args: None. // Return: FILE * - Pointer to stream. // Throws: None. //-- -FILE * -CMIDriverBase::GetStderr() const -{ - // Do nothing - override and implement - return nullptr; +FILE *CMIDriverBase::GetStderr() const { + // Do nothing - override and implement + return nullptr; } -//++ ------------------------------------------------------------------------------------ -// Details: Set the MI Driver's exit application flag. The application checks this flag +//++ +//------------------------------------------------------------------------------------ +// Details: Set the MI Driver's exit application flag. The application checks +// this flag // after every stdin line is read so the exit may not be instantaneous. -// If vbForceExit is false the MI Driver queries its state and determines if is +// If vbForceExit is false the MI Driver queries its state and +// determines if is // should exit or continue operating depending on that running state. // Type: Overrideable. -// Args: vbForceExit - (R) True = Do not query, set state to exit, false = query if can/should exit right now. +// Args: vbForceExit - (R) True = Do not query, set state to exit, false = +// query if can/should exit right now. // Return: None. // Throws: None. //-- -void -CMIDriverBase::SetExitApplicationFlag(const bool vbForceExit) -{ - MIunused(vbForceExit); +void CMIDriverBase::SetExitApplicationFlag(const bool vbForceExit) { + MIunused(vbForceExit); - // Do nothing - override and implement + // Do nothing - override and implement } |