HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
UT_StringArray Class Reference

#include <UT_StringArray.h>

+ Inheritance diagram for UT_StringArray:

Classes

class  IndexedCompare
 

Public Types

typedef UT_StringHolder value_type
 
typedef int(* Comparator )(const UT_StringHolder *, const UT_StringHolder *s2)
 
typedef UT_Array
< UT_StringHolder >
::const_iterator 
const_iterator
 
typedef UT_Array
< UT_StringHolder >::iterator 
iterator
 

Public Member Functions

 UT_StringArray ()
 
 UT_StringArray (const char **src)
 
 UT_StringArray (const UT_StringArray &src)
 
 UT_StringArray (std::initializer_list< UT_StringHolder > il)
 
 UT_StringArray (UT_StringArray &&src) SYS_NOEXCEPT=default
 
 ~UT_StringArray ()
 
void swap (UT_StringArray &other)
 
int64 getMemoryUsage (bool inclusive) const
 
void merge (UT_StringArray &other)
 this merges two string arrays into this and leaving other empty More...
 
exint concat (const UT_StringArray &other)
 Append 'other' to the end of this array. More...
 
void clear ()
 
exint append (const UT_StringHolder &str)
 Append a new string and return its index in the string array. More...
 
exint insert (const UT_StringHolder &str, exint idx)
 
void appendMultiple (const UT_StringHolder &str, exint count)
 
exint remove (exint idx)
 
void removeLast ()
 
void resize (exint nsize)
 
exint entries () const
 
void setSize (exint n)
 
exint size () const
 
exint capacity () const
 
void setCapacity (exint newcapacity)
 
void bumpCapacity (exint mincapacity)
 
void fromStdVectorOfStrings (const std::vector< std::string > &vec)
 
void toStdVectorOfStrings (std::vector< std::string > &vec) const
 
UT_StringArrayoperator= (const UT_StringArray &src)=default
 
UT_StringArrayoperator= (UT_StringArray &&src)=default
 
UT_StringArrayoperator+= (const UT_StringArray &src)
 
UT_StringHolderoperator() (exint idx)
 
const UT_StringHolderoperator() (exint idx) const
 
UT_StringHolderoperator[] (exint idx)
 
const UT_StringHolderoperator[] (exint idx) const
 
UT_StringHolderlast ()
 
const UT_StringHolderlast () const
 
bool operator== (const UT_StringArray &src) const
 
bool operator!= (const UT_StringArray &src) const
 
void reverse ()
 
exint find (const UT_StringRef &str, exint s=0) const
 
void sort (bool forward, bool numbered)
 
void sort ()
 
void sort (Comparator compare)
 
template<typename Compare >
void sort (Compare is_less)
 
exint sortedInsert (const char *str, bool forward=true, bool numbered=true)
 
template<typename Compare >
void sortedInsert (const char *str, Compare is_less)
 
exint sortedFind (const char *str, bool forward=true, bool numbered=true) const
 
void sortedRemoveDuplicates ()
 
exint getLongestPrefixLength () const
 
template<typename IsEqual >
exint removeIf (IsEqual is_equal)
 
void join (const char *sep, UT_String &result) const
 
void join (const char *sep, const char *sep_last, UT_String &result) const
 
unsigned hash () const
 
const UT_StringHolderarray () const
 
UT_StringHolderarray ()
 
const_iterator begin () const
 
iterator begin ()
 
const_iterator end () const
 
iterator end ()
 
template<typename I >
void stableSortIndices (UT_Array< I > &indices) const
 

Friends

template<typename OS >
OS & operator<< (OS &os, const UT_StringArray &d)
 

Detailed Description

Member Typedef Documentation

typedef int(* UT_StringArray::Comparator)(const UT_StringHolder *, const UT_StringHolder *s2)

Definition at line 33 of file UT_StringArray.h.

Definition at line 32 of file UT_StringArray.h.

Constructor & Destructor Documentation

UT_StringArray::UT_StringArray ( )
UT_StringArray::UT_StringArray ( const char **  src)
explicit
UT_StringArray::UT_StringArray ( const UT_StringArray src)
UT_StringArray::UT_StringArray ( std::initializer_list< UT_StringHolder il)
UT_StringArray::UT_StringArray ( UT_StringArray &&  src)
default
UT_StringArray::~UT_StringArray ( )

Member Function Documentation

exint UT_StringArray::append ( const UT_StringHolder str)

Append a new string and return its index in the string array.

Examples:
RAY/RAY_DemoVolumeSphere.C, and SOP/SOP_BouncyAgent.C.
void UT_StringArray::appendMultiple ( const UT_StringHolder str,
exint  count 
)
const UT_StringHolder* UT_StringArray::array ( ) const
inline

Definition at line 168 of file UT_StringArray.h.

UT_StringHolder* UT_StringArray::array ( )
inline

Definition at line 169 of file UT_StringArray.h.

const_iterator UT_StringArray::begin ( void  ) const
inline

Definition at line 174 of file UT_StringArray.h.

iterator UT_StringArray::begin ( void  )
inline

Definition at line 175 of file UT_StringArray.h.

void UT_StringArray::bumpCapacity ( exint  mincapacity)
inline

Definition at line 83 of file UT_StringArray.h.

exint UT_StringArray::capacity ( ) const
inline

Definition at line 80 of file UT_StringArray.h.

void UT_StringArray::clear ( )
exint UT_StringArray::concat ( const UT_StringArray other)
inline

Append 'other' to the end of this array.

Definition at line 58 of file UT_StringArray.h.

const_iterator UT_StringArray::end ( void  ) const
inline

Definition at line 176 of file UT_StringArray.h.

iterator UT_StringArray::end ( void  )
inline

Definition at line 177 of file UT_StringArray.h.

exint UT_StringArray::entries ( void  ) const
inline
Examples:
FS/FS_HomeHelper.C.

Definition at line 75 of file UT_StringArray.h.

exint UT_StringArray::find ( const UT_StringRef str,
exint  s = 0 
) const
inline

Definition at line 109 of file UT_StringArray.h.

void UT_StringArray::fromStdVectorOfStrings ( const std::vector< std::string > &  vec)
exint UT_StringArray::getLongestPrefixLength ( ) const
int64 UT_StringArray::getMemoryUsage ( bool  inclusive) const
inline

Definition at line 46 of file UT_StringArray.h.

unsigned UT_StringArray::hash ( ) const
exint UT_StringArray::insert ( const UT_StringHolder str,
exint  idx 
)
Examples:
FS/FS_HomeHelper.C.
void UT_StringArray::join ( const char *  sep,
UT_String result 
) const
void UT_StringArray::join ( const char *  sep,
const char *  sep_last,
UT_String result 
) const
UT_StringHolder& UT_StringArray::last ( )
const UT_StringHolder& UT_StringArray::last ( ) const
void UT_StringArray::merge ( UT_StringArray other)

this merges two string arrays into this and leaving other empty

bool UT_StringArray::operator!= ( const UT_StringArray src) const
UT_StringHolder& UT_StringArray::operator() ( exint  idx)
const UT_StringHolder& UT_StringArray::operator() ( exint  idx) const
UT_StringArray& UT_StringArray::operator+= ( const UT_StringArray src)
UT_StringArray& UT_StringArray::operator= ( const UT_StringArray src)
default
UT_StringArray& UT_StringArray::operator= ( UT_StringArray &&  src)
default
bool UT_StringArray::operator== ( const UT_StringArray src) const
UT_StringHolder& UT_StringArray::operator[] ( exint  idx)
inline

Definition at line 97 of file UT_StringArray.h.

const UT_StringHolder& UT_StringArray::operator[] ( exint  idx) const
inline

Definition at line 99 of file UT_StringArray.h.

exint UT_StringArray::remove ( exint  idx)
template<typename IsEqual >
exint UT_StringArray::removeIf ( IsEqual  is_equal)
inline

Removes all matching elements from the list, shuffling down and changing the size appropriately. Returns the number of elements left.

Definition at line 149 of file UT_StringArray.h.

void UT_StringArray::removeLast ( )
void UT_StringArray::resize ( exint  nsize)
void UT_StringArray::reverse ( void  )
inline

Definition at line 106 of file UT_StringArray.h.

void UT_StringArray::setCapacity ( exint  newcapacity)
void UT_StringArray::setSize ( exint  n)
exint UT_StringArray::size ( void  ) const
inline

Definition at line 78 of file UT_StringArray.h.

void UT_StringArray::sort ( bool  forward,
bool  numbered 
)
void UT_StringArray::sort ( void  )
inline

Definition at line 118 of file UT_StringArray.h.

void UT_StringArray::sort ( Comparator  compare)
template<typename Compare >
void UT_StringArray::sort ( Compare  is_less)
inline

Definition at line 124 of file UT_StringArray.h.

exint UT_StringArray::sortedFind ( const char *  str,
bool  forward = true,
bool  numbered = true 
) const
exint UT_StringArray::sortedInsert ( const char *  str,
bool  forward = true,
bool  numbered = true 
)
template<typename Compare >
void UT_StringArray::sortedInsert ( const char *  str,
Compare  is_less 
)
inline

Definition at line 131 of file UT_StringArray.h.

void UT_StringArray::sortedRemoveDuplicates ( )
template<typename I >
void UT_StringArray::stableSortIndices ( UT_Array< I > &  indices) const
inline

Definition at line 193 of file UT_StringArray.h.

void UT_StringArray::swap ( UT_StringArray other)
inline

Definition at line 43 of file UT_StringArray.h.

void UT_StringArray::toStdVectorOfStrings ( std::vector< std::string > &  vec) const

Friends And Related Function Documentation

template<typename OS >
OS& operator<< ( OS &  os,
const UT_StringArray d 
)
friend

Definition at line 212 of file UT_StringArray.h.


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