NVIDIA NvNeural SDK  2022.2
GPU inference framework for NVIDIA Nsight Deep Learning Designer
nvneural::StringList Class Reference

Standard implementation of IStringList that can represent a vector<string> type. More...

#include <StringList.h>

Inheritance diagram for nvneural::StringList:
nvneural::refobj::RefObjectBase< refobj::Implements< IStringList > >

Public Member Functions

const char * getStringByIndex (size_t stringIndex) const noexcept
 Returns the Nth string in the collection. More...
 
size_t getStringSizeByIndex (size_t stringIndex) const noexcept
 Returns the Nth string's size in the collection. More...
 
size_t stringCount () const noexcept
 
 StringList (const std::vector< std::string > &stringList)
 Creates a StringList from a const reference. More...
 
 StringList (std::vector< std::string > &&stringList)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Creates a StringList from an rvalue reference. More...
 
- Public Member Functions inherited from nvneural::refobj::RefObjectBase< refobj::Implements< IStringList > >
IRefObject::RefCount addRef () const noexcept
 Increment the object's reference count. More...
 
const void * queryInterface (IRefObject::TypeId interfaceId) const noexcept
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void * queryInterface (IRefObject::TypeId interfaceId) noexcept
 Retrieves a new object interface pointer. More...
 
 RefObjectBase ()
 Default constructor. Logs object creation.
 
IRefObject::RefCount release () const noexcept
 Decrements the object's reference count and destroys the object if the reference count reaches zero. More...
 

Detailed Description

Standard implementation of IStringList that can represent a vector<string> type.

Constructor & Destructor Documentation

◆ StringList() [1/2]

nvneural::StringList::StringList ( const std::vector< std::string > &  stringList)
inlineexplicit

Creates a StringList from a const reference.

Parameters
stringListVector of strings to copy

◆ StringList() [2/2]

nvneural::StringList::StringList ( std::vector< std::string > &&  stringList)
inlineexplicit

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Creates a StringList from an rvalue reference.

Parameters
stringListVector of strings to move

Member Function Documentation

◆ getStringByIndex()

const char* nvneural::StringList::getStringByIndex ( size_t  stringIndex) const
inlinenoexcept

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
stringIndexIndex of the string to retrieve
Returns
The requested string, or nullptr if stringIndex is out of range.

◆ getStringSizeByIndex()

size_t nvneural::StringList::getStringSizeByIndex ( size_t  stringIndex) const
inlinenoexcept

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
stringIndexIndex of the string's size to retrieve
Returns
The requested string size, or 0 if stringIndex is out of range.

◆ stringCount()

size_t nvneural::StringList::stringCount ( ) const
inlinenoexcept

Returns
The number of strings in this collection.

The documentation for this class was generated from the following file: