diff options
author | Kate Stone <katherine.stone@apple.com> | 2016-09-06 20:57:50 +0000 |
---|---|---|
committer | Kate Stone <katherine.stone@apple.com> | 2016-09-06 20:57:50 +0000 |
commit | b9c1b51e45b845debb76d8658edabca70ca56079 (patch) | |
tree | dfcb5a13ef2b014202340f47036da383eaee74aa /lldb/tools/lldb-mi/MICmdArgSet.h | |
parent | d5aa73376966339caad04013510626ec2e42c760 (diff) | |
download | bcm5719-llvm-b9c1b51e45b845debb76d8658edabca70ca56079.tar.gz bcm5719-llvm-b9c1b51e45b845debb76d8658edabca70ca56079.zip |
*** This commit represents a complete reformatting of the LLDB source code
*** to conform to clang-format’s LLVM style. This kind of mass change has
*** two obvious implications:
Firstly, merging this particular commit into a downstream fork may be a huge
effort. Alternatively, it may be worth merging all changes up to this commit,
performing the same reformatting operation locally, and then discarding the
merge for this particular commit. The commands used to accomplish this
reformatting were as follows (with current working directory as the root of
the repository):
find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} +
find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ;
The version of clang-format used was 3.9.0, and autopep8 was 1.2.4.
Secondly, “blame” style tools will generally point to this commit instead of
a meaningful prior commit. There are alternatives available that will attempt
to look through this change and find the appropriate prior commit. YMMV.
llvm-svn: 280751
Diffstat (limited to 'lldb/tools/lldb-mi/MICmdArgSet.h')
-rw-r--r-- | lldb/tools/lldb-mi/MICmdArgSet.h | 135 |
1 files changed, 76 insertions, 59 deletions
diff --git a/lldb/tools/lldb-mi/MICmdArgSet.h b/lldb/tools/lldb-mi/MICmdArgSet.h index 2b4392565e0..cb321f0204d 100644 --- a/lldb/tools/lldb-mi/MICmdArgSet.h +++ b/lldb/tools/lldb-mi/MICmdArgSet.h @@ -15,81 +15,98 @@ // Other libraries and framework includes // Project includes -#include "MICmnBase.h" #include "MICmdArgContext.h" +#include "MICmnBase.h" // Declarations: class CMICmdArgValBase; -//++ ============================================================================ +//++ +//============================================================================ // Details: MI common code class. Command arguments container class. -// A command may have one or more arguments of which some may be optional. +// A command may have one or more arguments of which some may be +// optional. // *this class contains a list of the command's arguments which are -// validates against the commands argument options string (context string). +// validates against the commands argument options string (context +// string). // Each argument tries to extract the value it is looking for. -// Argument objects added to *this container are owned by this container -// and are deleted when this container goes out of scope. Allocate argument +// Argument objects added to *this container are owned by this +// container +// and are deleted when this container goes out of scope. Allocate +// argument // objects on the heap. -// It is assumed the arguments to be parsed are read from left to right in -// order. The order added to *this container is the order they will parsed. +// It is assumed the arguments to be parsed are read from left to right +// in +// order. The order added to *this container is the order they will +// parsed. //-- -class CMICmdArgSet : public CMICmnBase -{ - // Classes: +class CMICmdArgSet : public CMICmnBase { + // Classes: +public: + //++ + // Description: ArgSet's interface for command arguments to implement. + //-- + class IArg { public: - //++ - // Description: ArgSet's interface for command arguments to implement. - //-- - class IArg - { - public: - virtual bool GetFound() const = 0; - virtual bool GetIsHandledByCmd() const = 0; - virtual bool GetIsMandatory() const = 0; - virtual bool GetIsMissingOptions() const = 0; - virtual const CMIUtilString &GetName() const = 0; - virtual bool GetValid() const = 0; - virtual bool Validate(CMICmdArgContext &vwArgContext) = 0; + virtual bool GetFound() const = 0; + virtual bool GetIsHandledByCmd() const = 0; + virtual bool GetIsMandatory() const = 0; + virtual bool GetIsMissingOptions() const = 0; + virtual const CMIUtilString &GetName() const = 0; + virtual bool GetValid() const = 0; + virtual bool Validate(CMICmdArgContext &vwArgContext) = 0; - virtual ~IArg() = default; - }; + virtual ~IArg() = default; + }; - // Typedefs: - typedef std::vector<CMICmdArgValBase *> SetCmdArgs_t; + // Typedefs: + typedef std::vector<CMICmdArgValBase *> SetCmdArgs_t; - // Methods: - CMICmdArgSet(); + // Methods: + CMICmdArgSet(); - void Add(CMICmdArgValBase *vArg); - bool GetArg(const CMIUtilString &vArgName, CMICmdArgValBase *&vpArg) const; - const SetCmdArgs_t &GetArgsThatAreMissing() const; - const SetCmdArgs_t &GetArgsThatInvalid() const; - size_t GetCount() const; - bool IsArgContextEmpty() const; - bool IsArgsPresentButNotHandledByCmd() const; - void WarningArgsNotHandledbyCmdLogFile(const CMIUtilString &vrCmdName); - bool Validate(const CMIUtilString &vStrMiCmd, CMICmdArgContext &vwCmdArgsText); + void Add(CMICmdArgValBase *vArg); + bool GetArg(const CMIUtilString &vArgName, CMICmdArgValBase *&vpArg) const; + const SetCmdArgs_t &GetArgsThatAreMissing() const; + const SetCmdArgs_t &GetArgsThatInvalid() const; + size_t GetCount() const; + bool IsArgContextEmpty() const; + bool IsArgsPresentButNotHandledByCmd() const; + void WarningArgsNotHandledbyCmdLogFile(const CMIUtilString &vrCmdName); + bool Validate(const CMIUtilString &vStrMiCmd, + CMICmdArgContext &vwCmdArgsText); - // Overrideable: - ~CMICmdArgSet() override; + // Overrideable: + ~CMICmdArgSet() override; - // Methods: - private: - const SetCmdArgs_t &GetArgsNotHandledByCmd() const; - void - Destroy(); // Release resources used by *this object - bool ValidationFormErrorMessages(const CMICmdArgContext &vwCmdArgsText); + // Methods: +private: + const SetCmdArgs_t &GetArgsNotHandledByCmd() const; + void Destroy(); // Release resources used by *this object + bool ValidationFormErrorMessages(const CMICmdArgContext &vwCmdArgsText); - // Attributes: - bool m_bIsArgsPresentButNotHandledByCmd; // True = The driver's client presented the command with options recognised but not handled by - // a command, false = all args handled - SetCmdArgs_t m_setCmdArgs; // The set of arguments that are that the command is expecting to find in the options string - SetCmdArgs_t m_setCmdArgsThatAreMissing; // The set of arguments that are required by the command but are missing - SetCmdArgs_t m_setCmdArgsThatNotValid; // The set of arguments found in the text but for some reason unable to extract a value - SetCmdArgs_t - m_setCmdArgsNotHandledByCmd; // The set of arguments specified by the command which were present to the command but not handled - SetCmdArgs_t m_setCmdArgsMissingInfo; // The set of arguments that were present but were found to be missing additional information i.e. - // --thread 3 but 3 is missing - CMICmdArgContext m_cmdArgContext; // Copy of the command's argument options text before validate takes place (empties it of content) - const CMIUtilString m_constStrCommaSpc; + // Attributes: + bool m_bIsArgsPresentButNotHandledByCmd; // True = The driver's client + // presented the command with options + // recognised but not handled by + // a command, false = all args handled + SetCmdArgs_t m_setCmdArgs; // The set of arguments that are that the command + // is expecting to find in the options string + SetCmdArgs_t m_setCmdArgsThatAreMissing; // The set of arguments that are + // required by the command but are + // missing + SetCmdArgs_t m_setCmdArgsThatNotValid; // The set of arguments found in the + // text but for some reason unable to + // extract a value + SetCmdArgs_t m_setCmdArgsNotHandledByCmd; // The set of arguments specified by + // the command which were present to + // the command but not handled + SetCmdArgs_t m_setCmdArgsMissingInfo; // The set of arguments that were + // present but were found to be missing + // additional information i.e. + // --thread 3 but 3 is missing + CMICmdArgContext m_cmdArgContext; // Copy of the command's argument options + // text before validate takes place (empties + // it of content) + const CMIUtilString m_constStrCommaSpc; }; |