File tree Expand file tree Collapse file tree 2 files changed +33
-2
lines changed Expand file tree Collapse file tree 2 files changed +33
-2
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,13 @@ namespace houio
3434 virtual void getPacking ( std::vector<int > &packing )const ;
3535 virtual int getNumElements ()const ;
3636 virtual std::string getString ( int index )const ;
37+ virtual std::string getUniqueString ( int index )const ;
38+ virtual int getStringIndex ( int index )const ;
39+ virtual std::vector<std::string> getUniqueStrings ()const ;
40+ virtual std::vector<int > getStringIndices ()const ;
41+
42+
43+
3744 virtual RawPointer::Ptr getRawPointer ();
3845
3946 // int addV4f(math::V4f value);
Original file line number Diff line number Diff line change @@ -285,14 +285,38 @@ namespace houio
285285 return numElements++;
286286 }
287287
288+ std::string HouGeo::HouAttribute::getUniqueString ( int index )const
289+ {
290+ if (strings.size () < index)
291+ throw std::runtime_error (" HouGeo::getString Index is out of strings range." );
292+ return strings[index];
293+ }
294+
288295 std::string HouGeo::HouAttribute::getString ( int index )const
289296 {
290297 if (stringsIdxs.size () < index)
291- throw std::runtime_error (" HouGeo::getString Index is out of stringsIdx range." );
292- int string_index = stringsIdxs[index];
298+ throw std::runtime_error (" HouGeo::getString Index is out of strings range." );
299+ const int string_index = stringsIdxs[index];
293300 return strings[string_index];
294301 }
295302
303+ int HouGeo::HouAttribute::getStringIndex ( int index )const
304+ {
305+ if (stringsIdxs.size () < index)
306+ throw std::runtime_error (" HouGeo::getStringIndex Index is out of stringsIdx range." );
307+ return stringsIdxs[index];
308+ }
309+
310+ std::vector<std::string> HouGeo::HouAttribute::getUniqueStrings ()const
311+ {
312+ return strings;
313+ }
314+
315+ std::vector<int > HouGeo::HouAttribute::getStringIndices ()const
316+ {
317+ return stringsIdxs;
318+ }
319+
296320
297321
298322
You can’t perform that action at this time.
0 commit comments