@@ -121,25 +121,27 @@ class OIIO_API ColorConfig {
121121 int getColorSpaceIndex (string_view name) const ;
122122
123123 // / Get the name of the color space representing the named role,
124- // / or NULL if none could be identified.
124+ // / or nullptr if none could be identified.
125125 const char * getColorSpaceNameByRole (string_view role) const ;
126126
127127 // / Get the data type that OCIO thinks this color space is. The name
128- // / may be either a color space name or a role.
128+ // / may be either a color space name or a role. For an unknown space or
129+ // / any error, return TypeUnknown.
129130 OIIO::TypeDesc getColorSpaceDataType (string_view name, int * bits) const ;
130131
131132 // / Retrieve the full list of known color space names, as a vector
132133 // / of strings.
133134 std::vector<std::string> getColorSpaceNames () const ;
134135
135136 // / Get the name of the color space family of the named color space,
136- // / or NULL if none could be identified.
137+ // / or nullptr if none could be identified.
137138 const char * getColorSpaceFamilyByName (string_view name) const ;
138139
139140 // Get the number of Roles defined in this configuration
140141 int getNumRoles () const ;
141142
142- // / Query the name of the specified Role.
143+ // / Query the name of the specified Role, or return nullptr if there is no
144+ // / role with that index.
143145 const char * getRoleByIndex (int index) const ;
144146
145147 // / Retrieve the full list of known Roles, as a vector of strings.
@@ -148,7 +150,8 @@ class OIIO_API ColorConfig {
148150 // / Get the number of Looks defined in this configuration
149151 int getNumLooks () const ;
150152
151- // / Query the name of the specified Look.
153+ // / Query the name of the specified Look, or return nullptr if there is no
154+ // / look with that index.
152155 const char * getLookNameByIndex (int index) const ;
153156
154157 // / Retrieve the full list of known look names, as a vector of strings.
@@ -157,7 +160,8 @@ class OIIO_API ColorConfig {
157160 // / Get the number of NamedTransforms defined in this configuration
158161 int getNumNamedTransforms () const ;
159162
160- // / Query the name of the specified NamedTransform.
163+ // / Query the name of the specified NamedTransform, or nullptr if there is
164+ // / no NamedTransform with that index.
161165 const char * getNamedTransformNameByIndex (int index) const ;
162166
163167 // / Retrieve the full list of known NamedTransforms, as a vector of strings
@@ -221,7 +225,8 @@ class OIIO_API ColorConfig {
221225 // / Get the number of displays defined in this configuration
222226 int getNumDisplays () const ;
223227
224- // / Query the name of the specified display.
228+ // / Query the name of the specified display, or nullptr if there is no
229+ // / display with that index.
225230 const char * getDisplayNameByIndex (int index) const ;
226231
227232 // / Retrieve the full list of known display names, as a vector of
@@ -236,7 +241,9 @@ class OIIO_API ColorConfig {
236241 // / display will be used.
237242 int getNumViews (string_view display = " " ) const ;
238243
239- // / Query the name of the specified view for the specified display
244+ // / Query the name of the specified view for the specified display, or
245+ // / nullptr if there is no view with that index or if the display is not
246+ // / found.
240247 const char * getViewNameByIndex (string_view display, int index) const ;
241248
242249 // / Retrieve the full list of known view names for the display, as a
@@ -247,12 +254,14 @@ class OIIO_API ColorConfig {
247254 // / Query the name of the default view for the specified display. If the
248255 // / display is empty or not specified, the default display will be used.
249256 // / This version does not consider the input color space.
257+ // / Returns nullptr for failure.
250258 const char * getDefaultViewName (string_view display = " " ) const ;
251259
252260 // / Query the name of the default view for the specified display, given
253261 // / the input color space. If `display` is "default" or an empty string,
254262 // / the default display will be used. The input color space is used to
255263 // / determine the most appropriate default view for the given display.
264+ // / Returns nullptr for failure.
256265 const char * getDefaultViewName (string_view display,
257266 string_view inputColorSpace) const ;
258267
0 commit comments