summaryrefslogtreecommitdiffstats
path: root/lldb/tools/lldb-mi/MICmdArgValBase.h
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2014-11-17 18:06:21 +0000
committerZachary Turner <zturner@google.com>2014-11-17 18:06:21 +0000
commit1d6af02e2d6b2c403c7ae78fa07c8cce8fdab7fb (patch)
treed0969e2305fa9603a900a2718edb5636e37bf392 /lldb/tools/lldb-mi/MICmdArgValBase.h
parenteaa3dccfafec4b7fadc1fe994ce1225c27f66082 (diff)
downloadbcm5719-llvm-1d6af02e2d6b2c403c7ae78fa07c8cce8fdab7fb.tar.gz
bcm5719-llvm-1d6af02e2d6b2c403c7ae78fa07c8cce8fdab7fb.zip
Reformat lldb-mi using clang-format.
Courtesy of dawn@burble.org. llvm-svn: 222150
Diffstat (limited to 'lldb/tools/lldb-mi/MICmdArgValBase.h')
-rw-r--r--lldb/tools/lldb-mi/MICmdArgValBase.h202
1 files changed, 100 insertions, 102 deletions
diff --git a/lldb/tools/lldb-mi/MICmdArgValBase.h b/lldb/tools/lldb-mi/MICmdArgValBase.h
index b367cb88ce2..0afe8d9bab6 100644
--- a/lldb/tools/lldb-mi/MICmdArgValBase.h
+++ b/lldb/tools/lldb-mi/MICmdArgValBase.h
@@ -8,15 +8,15 @@
//===----------------------------------------------------------------------===//
//++
-// File: MICmdArgValBase.h
+// File: MICmdArgValBase.h
//
-// Overview: CMICmdArgValBase interface.
+// Overview: CMICmdArgValBase interface.
//
-// Environment: Compilers: Visual C++ 12.
-// gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
-// Libraries: See MIReadmetxt.
+// Environment: Compilers: Visual C++ 12.
+// gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
+// Libraries: See MIReadmetxt.
//
-// Copyright: None.
+// Copyright: None.
//--
#pragma once
@@ -26,132 +26,130 @@
#include "MICmdArgSet.h"
//++ ============================================================================
-// Details: MI common code class. Command argument base class. Arguments objects
-// needing specialization derived from *this class. An argument knows
-// what type of argument it is and how it is to interpret the options
-// (context) string to find and validate a matching argument and so
-// extract a value from it.
-// Argument objects are added to the CMICmdArgSet container object.
-// Once added the container they belong to that contain and will be
-// deleted when the container goes out of scope. Allocate argument
-// objects on the heap and pass in to the Add().
-// Note the code is written such that a command will produce an error
-// should it be presented with arguments or options it does not understand.
-// A command can recognise an option or argument then ignore if it
-// wishes (a warning is sent to the MI's Log file). This is so it is
-// hardwired to fail and catch arguments or options that presented by
-// different driver clients.
-// Based on the Interpreter pattern.
-// Gotchas: None.
-// Authors: Illya Rudkin 14/04/2014.
-// Changes: None.
+// Details: MI common code class. Command argument base class. Arguments objects
+// needing specialization derived from *this class. An argument knows
+// what type of argument it is and how it is to interpret the options
+// (context) string to find and validate a matching argument and so
+// extract a value from it.
+// Argument objects are added to the CMICmdArgSet container object.
+// Once added the container they belong to that contain and will be
+// deleted when the container goes out of scope. Allocate argument
+// objects on the heap and pass in to the Add().
+// Note the code is written such that a command will produce an error
+// should it be presented with arguments or options it does not understand.
+// A command can recognise an option or argument then ignore if it
+// wishes (a warning is sent to the MI's Log file). This is so it is
+// hardwired to fail and catch arguments or options that presented by
+// different driver clients.
+// Based on the Interpreter pattern.
+// Gotchas: None.
+// Authors: Illya Rudkin 14/04/2014.
+// Changes: None.
//--
class CMICmdArgValBase : public CMICmdArgSet::IArg
{
-// Methods:
-public:
- /* ctor */ CMICmdArgValBase( void );
- /* ctor */ CMICmdArgValBase( const CMIUtilString & vrArgName, const bool vbMandatory, const bool vbHandleByCmd );
-
-// Overrideable:
-public:
- /* dtor */ virtual ~CMICmdArgValBase( void );
+ // Methods:
+ public:
+ /* ctor */ CMICmdArgValBase(void);
+ /* ctor */ CMICmdArgValBase(const CMIUtilString &vrArgName, const bool vbMandatory, const bool vbHandleByCmd);
-// Overridden:
-public:
- // From CMICmdArgSet::IArg
- virtual bool GetFound( void ) const;
- virtual bool GetIsHandledByCmd( void ) const;
- virtual bool GetIsMandatory( void ) const;
- virtual bool GetIsMissingOptions( void ) const;
- virtual const CMIUtilString & GetName( void ) const;
- virtual bool GetValid( void ) const;
- virtual bool Validate( CMICmdArgContext & vwArgContext );
+ // Overrideable:
+ public:
+ /* dtor */ virtual ~CMICmdArgValBase(void);
-// Attributes:
-protected:
- bool m_bFound; // True = yes found in arguments options text, false = not found
- bool m_bValid; // True = yes argument parsed and valid, false = not valid
- bool m_bMandatory; // True = yes arg must be present, false = optional argument
- CMIUtilString m_strArgName;
- bool m_bHandled; // True = Command processes *this option, false = not handled
- bool m_bIsMissingOptions; // True = Command needs more information, false = ok
+ // Overridden:
+ public:
+ // From CMICmdArgSet::IArg
+ virtual bool GetFound(void) const;
+ virtual bool GetIsHandledByCmd(void) const;
+ virtual bool GetIsMandatory(void) const;
+ virtual bool GetIsMissingOptions(void) const;
+ virtual const CMIUtilString &GetName(void) const;
+ virtual bool GetValid(void) const;
+ virtual bool Validate(CMICmdArgContext &vwArgContext);
+
+ // Attributes:
+ protected:
+ bool m_bFound; // True = yes found in arguments options text, false = not found
+ bool m_bValid; // True = yes argument parsed and valid, false = not valid
+ bool m_bMandatory; // True = yes arg must be present, false = optional argument
+ CMIUtilString m_strArgName;
+ bool m_bHandled; // True = Command processes *this option, false = not handled
+ bool m_bIsMissingOptions; // True = Command needs more information, false = ok
};
//++ ============================================================================
-// Details: MI common code class. Templated command argument base class.
-// Gotchas: None.
-// Authors: Illya Rudkin 14/04/2014.
-// Changes: None.
+// Details: MI common code class. Templated command argument base class.
+// Gotchas: None.
+// Authors: Illya Rudkin 14/04/2014.
+// Changes: None.
//--
-template< class T >
-class CMICmdArgValBaseTemplate : public CMICmdArgValBase
+template <class T> class CMICmdArgValBaseTemplate : public CMICmdArgValBase
{
-// Methods:
-public:
- /* ctor */ CMICmdArgValBaseTemplate( void );
- /* ctor */ CMICmdArgValBaseTemplate( const CMIUtilString & vrArgName, const bool vbMandatory, const bool vbHandleByCmd );
- //
- const T & GetValue( void ) const;
+ // Methods:
+ public:
+ /* ctor */ CMICmdArgValBaseTemplate(void);
+ /* ctor */ CMICmdArgValBaseTemplate(const CMIUtilString &vrArgName, const bool vbMandatory, const bool vbHandleByCmd);
+ //
+ const T &GetValue(void) const;
-// Overrideable:
-public:
- /* dtor */ virtual ~CMICmdArgValBaseTemplate( void );
+ // Overrideable:
+ public:
+ /* dtor */ virtual ~CMICmdArgValBaseTemplate(void);
-// Attributes:
-protected:
- T m_argValue;
+ // Attributes:
+ protected:
+ T m_argValue;
};
//++ ------------------------------------------------------------------------------------
-// Details: CMICmdArgValBaseTemplate constructor.
-// Type: Method.
-// Args: None.
-// Return: None.
-// Throws: None.
+// Details: CMICmdArgValBaseTemplate constructor.
+// Type: Method.
+// Args: None.
+// Return: None.
+// Throws: None.
//--
-template< class T >
-CMICmdArgValBaseTemplate< T >::CMICmdArgValBaseTemplate( void )
+template <class T> CMICmdArgValBaseTemplate<T>::CMICmdArgValBaseTemplate(void)
{
}
//++ ------------------------------------------------------------------------------------
-// Details: CMICmdArgValBaseTemplate constructor.
-// Type: Method.
-// Args: vrArgName - (R) Argument's name to search by.
-// vbMandatory - (R) True = Yes must be present, false = optional argument.
-// vbHandleByCmd - (R) True = Command processes *this option, false = not handled.
-// Return: None.
-// Throws: None.
+// Details: CMICmdArgValBaseTemplate constructor.
+// Type: Method.
+// Args: vrArgName - (R) Argument's name to search by.
+// vbMandatory - (R) True = Yes must be present, false = optional argument.
+// vbHandleByCmd - (R) True = Command processes *this option, false = not handled.
+// Return: None.
+// Throws: None.
//--
-template< class T >
-CMICmdArgValBaseTemplate< T >::CMICmdArgValBaseTemplate( const CMIUtilString & vrArgName, const bool vbMandatory, const bool vbHandleByCmd )
-: CMICmdArgValBase( vrArgName, vbMandatory, vbHandleByCmd )
+template <class T>
+CMICmdArgValBaseTemplate<T>::CMICmdArgValBaseTemplate(const CMIUtilString &vrArgName, const bool vbMandatory, const bool vbHandleByCmd)
+ : CMICmdArgValBase(vrArgName, vbMandatory, vbHandleByCmd)
{
}
//++ ------------------------------------------------------------------------------------
-// Details: CMICmdArgValBaseTemplate destructor.
-// Type: Overrideable.
-// Args: None.
-// Return: None.
-// Throws: None.
+// Details: CMICmdArgValBaseTemplate destructor.
+// Type: Overrideable.
+// Args: None.
+// Return: None.
+// Throws: None.
//--
-template< class T >
-CMICmdArgValBaseTemplate< T >::~CMICmdArgValBaseTemplate( void )
+template <class T> CMICmdArgValBaseTemplate<T>::~CMICmdArgValBaseTemplate(void)
{
}
//++ ------------------------------------------------------------------------------------
-// Details: Retrieve the value the argument parsed from the command's argument / options
-// text string.
-// Type: Method.
-// Args: None.
-// Return: Template type & - The arg value of *this object.
-// Throws: None.
+// Details: Retrieve the value the argument parsed from the command's argument / options
+// text string.
+// Type: Method.
+// Args: None.
+// Return: Template type & - The arg value of *this object.
+// Throws: None.
//--
-template< class T >
-const T & CMICmdArgValBaseTemplate< T >::GetValue( void ) const
+template <class T>
+const T &
+CMICmdArgValBaseTemplate<T>::GetValue(void) const
{
- return m_argValue;
+ return m_argValue;
}
OpenPOWER on IntegriCloud