IStringList represents an immutable collection of strings.
More...
#include <nvneural/CoreTypes.h>
|
virtual const char * | getStringByIndex (size_t stringIndex) const noexcept=0 |
| Returns the Nth string in the collection. More...
|
|
virtual size_t | getStringSizeByIndex (size_t stringIndex) const noexcept=0 |
| Returns the Nth string's size in the collection. More...
|
|
virtual size_t | stringCount () const noexcept=0 |
|
virtual RefCount | addRef () const noexcept=0 |
| Increments the object's reference count. More...
|
|
virtual const void * | queryInterface (TypeId interface) const noexcept=0 |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
|
virtual void * | queryInterface (TypeId interface) noexcept=0 |
| Retrieves a new object interface pointer. More...
|
|
virtual RefCount | release () const noexcept=0 |
| Decrements the object's reference count and destroy the object if the reference count reaches zero. More...
|
|
|
using | RefCount = std::uint32_t |
| Typedef used to track the number of active references to an object.
|
|
using | TypeId = std::uint64_t |
| Every interface must define a unique TypeId. This should be randomized.
|
|
virtual | ~IRefObject ()=default |
| A protected destructor prevents accidental stack-allocation of IRefObjects or use with other smart pointer classes like std::unique_ptr.
|
|
IStringList represents an immutable collection of strings.
Strings managed by the collection are valid UTF-8 strings.
◆ getStringByIndex()
virtual const char* nvneural::IStringList::getStringByIndex |
( |
size_t |
stringIndex | ) |
const |
|
pure virtualnoexcept |
Returns the Nth string in the collection.
Pointers returned by this method are guaranteed to be valid until the IStringList is freed. If the string index is within the half-open range [0, stringIndex) the return value will not be a null pointer.
- Parameters
-
stringIndex | Index of the string to retrieve |
- Returns
- The requested string, or nullptr if stringIndex is out of range.
◆ getStringSizeByIndex()
virtual size_t nvneural::IStringList::getStringSizeByIndex |
( |
size_t |
stringIndex | ) |
const |
|
pure virtualnoexcept |
Returns the Nth string's size in the collection.
If the string index is not within the half-open range [0, stringIndex) the return value will be 0.
- Parameters
-
stringIndex | Index of the string's size to retrieve |
- Returns
- The requested string size, or 0 if stringIndex is out of range.
◆ stringCount()
virtual size_t nvneural::IStringList::stringCount |
( |
| ) |
const |
|
pure virtualnoexcept |
- Returns
- The number of strings in this collection.
The documentation for this class was generated from the following file: