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

#include <OP_GroupList.h>

+ Inheritance diagram for OP_GroupList:

Public Types

typedef UT_ValArray< OP_Group * > Base
 
- Public Types inherited from UT_ValArray< OP_Group * >
typedef int(* Comparator )(const OP_Group **, const OP_Group **)
 
- Public Types inherited from UT_Array< OP_Group * >
typedef OP_Groupvalue_type
 
typedef int(* Comparator )(const OP_Group **, const OP_Group **)
 
typedef base_iterator
< OP_Group *, true > 
iterator
 
typedef base_iterator< const
OP_Group *, true > 
const_iterator
 
typedef base_iterator
< OP_Group *, false > 
reverse_iterator
 
typedef base_iterator< const
OP_Group *, false > 
const_reverse_iterator
 
typedef const_iterator traverser
 

Public Member Functions

 OP_GroupList (OP_Network *owner)
 
 ~OP_GroupList ()
 
void clearAndDestroy ()
 
OP_GroupcreateGroup (const char *name, fpreal x=.0F, fpreal y=.0F)
 
OP_GroupfindGroup (const char *name) const
 
int deleteGroup (const char *name)
 
int deleteGroup (OP_Group *group)
 
int getMembers (UT_ValArray< OP_Group * > &list, int internal=0) const
 
int getMemberships (const OP_Node *node, UT_ValArray< OP_Group * > &list, int internal=0) const
 
int saveCount () const
 
void saveToClipboard (std::ostream &os, int all=0, int list=0) const
 
bool loadFromClipboard (UT_IStream &is, const char *path) const
 
OP_ERROR save (std::ostream &os, int binary=0)
 
bool load (UT_IStream &is, int merge=0)
 
void clearUndoFlags ()
 
int64 getMemoryUsage (bool inclusive) const
 Return the amount of memory owned by this OP_GroupList. More...
 
- Public Member Functions inherited from UT_ValArray< OP_Group * >
 UT_ValArray (const UT_ValArray< OP_Group * > &src)
 
 UT_ValArray (UT_ValArray< OP_Group * > &&src) SYS_NOEXCEPT
 
 UT_ValArray (const UT_Array< OP_Group * > &src)
 
 UT_ValArray (exint capacity=0)
 
 UT_ValArray (exint capacity, exint entries)
 
UT_ValArrayoperator= (const UT_ValArray< OP_Group * > &src)
 
UT_ValArrayoperator= (const UT_Array< OP_Group * > &src)
 
UT_ValArrayoperator= (UT_ValArray< OP_Group * > &&src)
 
UT_ValArrayoperator= (UT_Array< OP_Group * > &&src)
 
exint sortAndRemoveDuplicates ()
 
void sort (Comparator compare)
 
void sort ()
 
void stdsort (ComparatorBool is_less)
 
void sortAscending ()
 
void stableSort (ComparatorBool is_less)
 
void stableSort ()
 
OP_GroupselectNthLargest (int idx, ComparatorBool is_less)
 
OP_GroupselectNthLargest (int idx)
 
exint uniqueSortedFind (const OP_Group *&item, Comparator compare) const
 
exint uniqueSortedFind (const OP_Group *&item, ComparatorBool is_less) const
 
exint uniqueSortedFind (const OP_Group *&item) const
 
exint uniqueSortedFindAscending (const OP_Group *&item) const
 
exint sortedInsert (const OP_Group *&t, Comparator compare)
 
exint sortedInsert (const OP_Group *&t, ComparatorBool is_less)
 
exint sortedInsert (const OP_Group *&t)
 
exint uniqueSortedInsert (const OP_Group *&t, Comparator compare)
 
exint uniqueSortedInsert (const OP_Group *&t, ComparatorBool is_less)
 
exint uniqueSortedInsert (const OP_Group *&t)
 
exint uniqueSortedInsertAscending (const OP_Group *&t)
 
void merge (const UT_Array< OP_Group * > &other, int direction, bool allow_dups, ComparatorBool is_less)
 
void merge (const UT_ValArray< OP_Group * > &other, int direction, bool allow_dups)
 
bool hasSortedSubset (const UT_ValArray< OP_Group * > &other, Comparator compare=compareElements) const
 
void sortedUnion (const UT_ValArray< OP_Group * > &other, Comparator compare=compareElements)
 
void sortedUnion (const UT_ValArray< OP_Group * > &other, UT_ValArray< OP_Group * > &result, Comparator compare=compareElements) const
 
void sortedIntersection (const UT_ValArray< OP_Group * > &other, Comparator compare=compareElements)
 
void sortedIntersection (const UT_ValArray< OP_Group * > &other, UT_ValArray< OP_Group * > &result, Comparator compare=compareElements) const
 
void sortedSetDifference (const UT_ValArray< OP_Group * > &other, Comparator compare=compareElements)
 
void sortedSetDifference (const UT_ValArray< OP_Group * > &other, UT_ValArray< OP_Group * > &result, Comparator compare=compareElements) const
 
exint heapPush (const OP_Group *&t, Comparator compare)
 
OP_GroupheapPop (Comparator compare)
 
int removeZeros ()
 
void collapse ()
 
OP_Groupsum () const
 Functions which are only specialized for int{32,64}, fpreal{32,64}. More...
 
void display () const
 Prints the constents of the array. More...
 
- Public Member Functions inherited from UT_Array< OP_Group * >
 UT_Array (const UT_Array< OP_Group * > &a)
 
 UT_Array (UT_Array< OP_Group * > &&a) SYS_NOEXCEPT
 Move constructor. Steals the working data from the original. More...
 
 UT_Array (exint capacity, exint size)
 Construct based on given capacity and size. More...
 
 UT_Array (exint capacity=0)
 Construct based on given capacity with a size of 0. More...
 
 UT_Array (std::initializer_list< OP_Group * > init)
 Construct with the contents of an initializer list. More...
 
 ~UT_Array ()
 
void swap (UT_Array< OP_Group * > &other)
 
exint append (void)
 
exint append (const OP_Group *&t)
 
exint append (OP_Group *&&t)
 
exint append (const OP_Group *&t, bool check_dup)
 
void append (const OP_Group **pt, exint count)
 
void appendMultiple (const OP_Group *&t, exint count)
 
exint insert (exint index)
 
exint insert (const OP_Group *&t, exint i)
 
exint insert (OP_Group *&&t, exint i)
 
exint emplace_back (S &&...s)
 
exint uniqueSortedInsert (const OP_Group *&t, Comparator compare)
 
exint uniqueSortedInsert (const OP_Group *&t, ComparatorBool is_less)
 
exint uniqueSortedFind (const OP_Group *&item, Comparator compare) const
 
exint uniqueSortedFind (const OP_Group *&item, ComparatorBool is_less) const
 
void merge (const UT_Array< OP_Group * > &other, int direction, bool allow_dups, ComparatorBool is_less)
 
bool hasSortedSubset (const UT_Array< OP_Group * > &other, Comparator compare) const
 
void sortedUnion (const UT_Array< OP_Group * > &other, Comparator compare)
 
void sortedUnion (const UT_Array< OP_Group * > &other, UT_Array< OP_Group * > &result, Comparator compare) const
 
void sortedIntersection (const UT_Array< OP_Group * > &other, Comparator compare)
 
void sortedIntersection (const UT_Array< OP_Group * > &other, UT_Array< OP_Group * > &result, Comparator compare) const
 
void sortedSetDifference (const UT_Array< OP_Group * > &other, Comparator compare)
 
void sortedSetDifference (const UT_Array< OP_Group * > &other, UT_Array< OP_Group * > &result, Comparator compare) const
 
void fromStdVector (const std::vector< OP_Group * > &vec)
 Convert from an std::vector. More...
 
void toStdVector (std::vector< OP_Group * > &vec) const
 Convert to an std::vector. More...
 
exint heapPush (const OP_Group *&t, Comparator compare)
 
OP_GroupheapPop (Comparator compare)
 
const OP_Group *& heapMax () const
 
exint concat (const UT_Array< OP_Group * > &a)
 Takes another T array and concatenate it onto my end. More...
 
exint multipleInsert (exint index, exint count)
 Insert an element "count" times at the given index. Return the index. More...
 
exint insertAt (const OP_Group *&t, exint index)
 
bool isValidIndex (exint index) const
 Return true if given index is valid. More...
 
exint findAndRemove (const OP_Group *&t)
 
exint removeIndex (exint index)
 
void removeLast ()
 
void removeRange (exint begin_i, exint end_i)
 Remove the range [begin_i,end_i) of elements from the array. More...
 
void extractRange (exint begin_i, exint end_i, UT_Array< OP_Group * > &dest)
 
exint removeIf (IsEqual is_equal)
 
void collapseIf (IsEqual is_equal)
 Remove all matching elements. Also sets the capacity of the array. More...
 
void move (exint srcIdx, exint destIdx, exint howMany)
 
void cycle (exint howMany)
 Cyclically shifts the entire array by howMany. More...
 
void constant (const OP_Group *&v)
 Quickly set the array to a single value. More...
 
void zero ()
 Zeros the array if a POD type, else trivial constructs if a class type. More...
 
exint find (const OP_Group *&t, exint s=0) const
 
exint find (const OP_Group *&t, Comparator compare) const
 
void reverse ()
 Reverses the array by swapping elements in mirrored locations. More...
 
exint index (const OP_Group *&t) const
 
exint safeIndex (const OP_Group *&t) const
 
void sort (Comparator compare)
 
void stdsort (ComparatorBool is_less)
 Sort using std::sort. The ComparatorBool uses the less-than semantics. More...
 
void stableSort (ComparatorBool is_less)
 
void stableSortIndices (UT_Array< I > &indices, ComparatorBool is_less) const
 
void stableArgSort (UT_Array< I > &indices, ComparatorBool is_less) const
 
void stableSortByKey (const UT_Array< K > &keys, ComparatorBool is_less)
 
exint sortedRemoveDuplicates ()
 
exint sortedRemoveDuplicatesIf (CompareEqual compare_equal)
 
OP_GroupselectNthLargest (exint idx, ComparatorBool is_less)
 
void setCapacity (exint newcapacity)
 
void setCapacityIfNeeded (exint mincapacity)
 
void bumpCapacity (exint mincapacity)
 
void bumpSize (exint newsize)
 
void bumpEntries (exint newsize)
 
exint capacity () const
 
exint size () const
 
exint entries () const
 Alias of size(). size() is preferred. More...
 
void entries (exint newsize)
 Alias of setSize(). setSize() is preferred. More...
 
bool isEmpty () const
 Returns true iff there are no occupied elements in the array. More...
 
int64 getMemoryUsage (bool inclusive=false) const
 
void setSize (exint newsize)
 
void setSizeNoInit (exint newsize)
 
void truncate (exint maxsize)
 Decreases, but never expands, to the given maxsize. More...
 
void clear ()
 Resets list to an empty list. More...
 
UT_Array< OP_Group * > & operator= (const UT_Array< OP_Group * > &a)
 
UT_Array< OP_Group * > & operator= (std::initializer_list< OP_Group * > ilist)
 Replace the contents with those from the initializer_list ilist. More...
 
UT_Array< OP_Group * > & operator= (UT_Array< OP_Group * > &&a)
 Move the contents of array a to this array. More...
 
bool operator== (const UT_Array< OP_Group * > &a) const
 
bool operator!= (const UT_Array< OP_Group * > &a) const
 
int isEqual (const UT_Array< OP_Group * > &a, Comparator compare) const
 
OP_Group *& operator() (exint i)
 
const OP_Group *& operator() (exint i) const
 
OP_Group *& operator[] (exint i)
 
const OP_Group *& operator[] (exint i) const
 
OP_Group *& forcedRef (exint i)
 
OP_GroupforcedGet (exint i) const
 
OP_Group *& last ()
 
const OP_Group *& last () const
 
exint apply (int(*applyFct)(OP_Group *&t, void *d), void *d)
 
OP_Groupaccumulate (const OP_Group *&init_value, BinaryOp add) const
 
OP_Group ** getArray () const
 
const OP_Group ** getRawArray () const
 
OP_Group ** array ()
 
const OP_Group ** array () const
 
OP_Group ** data ()
 
const OP_Group ** data () const
 
OP_Group ** aliasArray (OP_Group **newdata)
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 End iterator. More...
 
const_iterator end () const
 End const iterator. Consider using it.atEnd() instead. More...
 
reverse_iterator rbegin ()
 Begin iterating over the array in reverse. More...
 
const_reverse_iterator rbegin () const
 Begin iterating over the array in reverse. More...
 
reverse_iterator rend ()
 End reverse iterator. More...
 
const_reverse_iterator rend () const
 End reverse iterator. Consider using it.atEnd() instead. More...
 
UT_IteratorRange< iteratorrange ()
 
UT_IteratorRange< const_iteratorrange () const
 
UT_IteratorRange
< reverse_iterator
rrange ()
 
UT_IteratorRange
< const_reverse_iterator
rrange () const
 
void removeItem (const reverse_iterator &it)
 Remove item specified by the reverse_iterator. More...
 
void unsafeShareData (UT_Array< OP_Group * > &src)
 
void unsafeShareData (OP_Group **src, exint srcsize)
 
void unsafeShareData (OP_Group **src, exint size, exint capacity)
 
void unsafeClearData ()
 
bool isHeapBuffer () const
 Returns true if the data used by the array was allocated on the heap. More...
 
bool isHeapBuffer (OP_Group **data) const
 
exint sortedInsert (const OP_Group *&t, Comparator compare)
 
exint sortedInsert (const OP_Group *&t, ComparatorBool is_less)
 

Additional Inherited Members

- Static Public Member Functions inherited from UT_ValArray< OP_Group * >
static bool compareElementsBool (const OP_Group *&a, const OP_Group *&b)
 
static int compareElements (const OP_Group **a, const OP_Group **b)
 
static bool isElementZero (const OP_Group *&a)
 
- Protected Member Functions inherited from UT_Array< OP_Group * >
exint appendImpl (S &&s)
 
exint insertImpl (S &&s, exint index)
 Similar to appendImpl() but for insertion. More...
 
void validateEmplaceArgs (First &&first, Rest &&...rest) const
 
void validateEmplaceArgs () const
 Base case for validateEmplaceArgs(). More...
 
- Static Protected Member Functions inherited from UT_Array< OP_Group * >
static constexpr
SYS_FORCE_INLINE bool 
isPOD ()
 
static void construct (OP_Group *&dst, S &&...s)
 
static void copyConstruct (OP_Group *&dst, const OP_Group *&src)
 
static void copyConstructRange (OP_Group **dst, const OP_Group **src, exint n)
 
static void trivialConstruct (OP_Group *&dst)
 Element Constructor. More...
 
static void trivialConstructRange (OP_Group **dst, exint n)
 
static void trivialDestruct (OP_Group *&dst)
 Element Destructor. More...
 
static void trivialDestructRange (OP_Group **dst, exint n)
 

Detailed Description

Definition at line 27 of file OP_GroupList.h.

Member Typedef Documentation

Definition at line 30 of file OP_GroupList.h.

Constructor & Destructor Documentation

OP_GroupList::OP_GroupList ( OP_Network owner)
OP_GroupList::~OP_GroupList ( )

Member Function Documentation

void OP_GroupList::clearAndDestroy ( )
void OP_GroupList::clearUndoFlags ( )
OP_Group* OP_GroupList::createGroup ( const char *  name,
fpreal  x = .0F,
fpreal  y = .0F 
)
int OP_GroupList::deleteGroup ( const char *  name)
int OP_GroupList::deleteGroup ( OP_Group group)
OP_Group* OP_GroupList::findGroup ( const char *  name) const
int OP_GroupList::getMembers ( UT_ValArray< OP_Group * > &  list,
int  internal = 0 
) const
int OP_GroupList::getMemberships ( const OP_Node node,
UT_ValArray< OP_Group * > &  list,
int  internal = 0 
) const
int64 OP_GroupList::getMemoryUsage ( bool  inclusive) const

Return the amount of memory owned by this OP_GroupList.

bool OP_GroupList::load ( UT_IStream is,
int  merge = 0 
)
bool OP_GroupList::loadFromClipboard ( UT_IStream is,
const char *  path 
) const
OP_ERROR OP_GroupList::save ( std::ostream &  os,
int  binary = 0 
)
int OP_GroupList::saveCount ( ) const
void OP_GroupList::saveToClipboard ( std::ostream &  os,
int  all = 0,
int  list = 0 
) const

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