From 19c0866b050a022406867aa650302f4efbf8e010 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Sat, 29 Apr 2023 09:24:26 -0400 Subject: CommandOptions (#2856) * WIP CommandOptions * Fix some output issues. * Simplify word wrapping. * Add file extensions. * Change how lookup takes place. Add appendSplit functions to StringUtil. Make Categories hold the index range of their options. * Small improvement. * Lookup with partial option names. * Associate user values. * Encoding flags in the name. * Refactor setting up of command options. * Use CommandOptions in slang-options. * Remove old help text. * Cache the CommandOptions on the Session. * Range checking. Fix bug in the Options handling. * Extra checks for validity. * Get categories directly. * Slight improvements over output. * Added NameValue types. * Fix typo. Remove some now unused diagnostics. Fix diagnostic in testing, as output has changed. * Add minimal usage message. * Remove platform executable extension from diagnostics output. * Some improvements around getting names from NameValue types. * Improve some option descriptions. * Small fixes. --- source/slang/slang-capability.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source/slang/slang-capability.cpp') diff --git a/source/slang/slang-capability.cpp b/source/slang/slang-capability.cpp index 770685247..28dea8d23 100644 --- a/source/slang/slang-capability.cpp +++ b/source/slang/slang-capability.cpp @@ -117,6 +117,15 @@ static CapabilityAtomInfo const& _getInfo(CapabilityAtom atom) return kCapabilityAtoms[Int(atom)]; } +void getCapabilityAtomNames(List& ioNames) +{ + ioNames.setCount(Count(CapabilityAtom::Count)); + for (Index i = 0; i < Count(CapabilityAtom::Count); ++i) + { + ioNames[i] = UnownedStringSlice(_getInfo(CapabilityAtom(i)).name); + } +} + CapabilityAtom findCapabilityAtom(UnownedStringSlice const& name) { // For now we are implementing a linear search over the -- cgit v1.2.3