summaryrefslogtreecommitdiff
path: root/tools/slang-cpp-extractor/options.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/slang-cpp-extractor/options.h')
-rw-r--r--tools/slang-cpp-extractor/options.h42
1 files changed, 23 insertions, 19 deletions
diff --git a/tools/slang-cpp-extractor/options.h b/tools/slang-cpp-extractor/options.h
index e660bc376..8231d5e3b 100644
--- a/tools/slang-cpp-extractor/options.h
+++ b/tools/slang-cpp-extractor/options.h
@@ -3,7 +3,8 @@
#include "../../source/slang/slang-diagnostics.h"
-namespace CppExtract {
+namespace CppExtract
+{
using namespace Slang;
@@ -11,10 +12,7 @@ using namespace Slang;
struct Options
{
- void reset()
- {
- *this = Options();
- }
+ void reset() { *this = Options(); }
Options()
{
@@ -22,28 +20,34 @@ struct Options
m_markSuffix = "_CLASS";
}
- bool m_defs = false; ///< If set will output a '-defs.h' file for each of the input files, that corresponds to previous defs files (although doesn't have fields/RAW)
- bool m_dump = false; ///< If true will dump to stderr the types/fields and hierarchy it extracted
- bool m_runUnitTests = false; ///< If true will run internal unit tests
- bool m_extractDoc = true; ///< If set will try to extract documentation associated with nodes
+ bool m_defs = false; ///< If set will output a '-defs.h' file for each of the input files, that
+ ///< corresponds to previous defs files (although doesn't have fields/RAW)
+ bool m_dump =
+ false; ///< If true will dump to stderr the types/fields and hierarchy it extracted
+ bool m_runUnitTests = false; ///< If true will run internal unit tests
+ bool m_extractDoc = true; ///< If set will try to extract documentation associated with nodes
- bool m_outputFields = false; ///< When dumping macros also dump field definitions
+ bool m_outputFields = false; ///< When dumping macros also dump field definitions
bool m_requireMark = true;
- List<String> m_inputPaths; ///< The input paths to the files to be processed
+ List<String> m_inputPaths; ///< The input paths to the files to be processed
- String m_outputPath; ///< The output path. Note that the extractor can generate multiple output files, and this will actually be the 'stem' of several files
+ String m_outputPath; ///< The output path. Note that the extractor can generate multiple output
+ ///< files, and this will actually be the 'stem' of several files
- String m_inputDirectory; ///< The input directory that is by default used for reading m_inputPaths from.
- String m_markPrefix; ///< The prefix of the 'marker' used to identify a reflected type
- String m_markSuffix; ///< The postfix of the 'marker' used to identify a reflected type
- String m_stripFilePrefix; ///< Used for the 'origin' information, this is stripped from the source filename, and the remainder of the filename (without extension) is 'macroized'
+ String m_inputDirectory; ///< The input directory that is by default used for reading
+ ///< m_inputPaths from.
+ String m_markPrefix; ///< The prefix of the 'marker' used to identify a reflected type
+ String m_markSuffix; ///< The postfix of the 'marker' used to identify a reflected type
+ String m_stripFilePrefix; ///< Used for the 'origin' information, this is stripped from the
+ ///< source filename, and the remainder of the filename (without
+ ///< extension) is 'macroized'
};
struct OptionsParser
{
/// Parse the parameters. NOTE! Must have the program path removed
- SlangResult parse(int argc, const char*const* argv, DiagnosticSink* sink, Options& outOptions);
+ SlangResult parse(int argc, const char* const* argv, DiagnosticSink* sink, Options& outOptions);
SlangResult _parseArgWithValue(const char* option, String& outValue);
SlangResult _parseArgReplaceValue(const char* option, String& outValue);
@@ -53,11 +57,11 @@ struct OptionsParser
Index m_index;
Int m_argCount;
- const char*const* m_args;
+ const char* const* m_args;
DiagnosticSink* m_sink;
};
-} // CppExtract
+} // namespace CppExtract
#endif