diff options
| author | Ellie Hermaszewska <ellieh@nvidia.com> | 2024-10-29 14:49:26 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-29 14:49:26 +0800 |
| commit | f65d756bff8d4c5cbc15bd0322a2ae8e6b896a21 (patch) | |
| tree | ea1d61342cd29368e19135000ec2948813096205 /source/core/slang-command-options-writer.h | |
| parent | a729c15e9dce9f5116a38afc66329ab2ca4cea54 (diff) | |
format
* format
* Minor test fixes
* enable checking cpp format in ci
Diffstat (limited to 'source/core/slang-command-options-writer.h')
| -rw-r--r-- | source/core/slang-command-options-writer.h | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/source/core/slang-command-options-writer.h b/source/core/slang-command-options-writer.h index eb9a2795f..5452d7617 100644 --- a/source/core/slang-command-options-writer.h +++ b/source/core/slang-command-options-writer.h @@ -19,51 +19,54 @@ public: Markdown, ///< Markdown NoLinkMarkdown, ///< Markdown without links }; - + static ConstArrayView<NamesDescriptionValue> getStyleInfos(); struct Options { - Style style = Style::Text; ///< The style - Index lineLength = 120; ///< The maximum amount of characters on a line - UnownedStringSlice indent = toSlice(" ");; + Style style = Style::Text; ///< The style + Index lineLength = 120; ///< The maximum amount of characters on a line + UnownedStringSlice indent = toSlice(" "); + ; }; - /// Append descirption for a category + /// Append descirption for a category void appendDescriptionForCategory(CommandOptions* options, Index categoryIndex); - /// Appends a description of all of the options + /// Appends a description of all of the options void appendDescription(CommandOptions* options); - /// Get the builder that string is being written to + /// Get the builder that string is being written to StringBuilder& getBuilder() { return m_builder; } static RefPtr<CommandOptionsWriter> create(const Options& options); - -protected: - /// Append descirption for a category +protected: + /// Append descirption for a category virtual void appendDescriptionForCategoryImpl(Index categoryIndex) = 0; - /// Appends a description of all of the options + /// Appends a description of all of the options virtual void appendDescriptionImpl() = 0; // Ctor, use create to create a writer CommandOptionsWriter(const Options& options); - /// Get the length of the current line in ascii chars/bytes + /// Get the length of the current line in ascii chars/bytes Count _getCurrentLineLength(); - /// Indentation/wrapping + /// Indentation/wrapping void _requireIndent(Count indentCount); - void _appendWrappedIndented(Count indentCount, List<UnownedStringSlice>& slices, const UnownedStringSlice& delimit); - + void _appendWrappedIndented( + Count indentCount, + List<UnownedStringSlice>& slices, + const UnownedStringSlice& delimit); + CommandOptions* m_commandOptions = nullptr; - StringSlicePool m_pool; + StringSlicePool m_pool; StringBuilder m_builder; Options m_options; }; } // namespace Slang -#endif +#endif |
