emergent 8.2.2 taBase_PtrList Class Reference
emergent 8.2.2   Home · Wiki Docs For: taBase_PtrList · Emergent Help Browser 

taBase_PtrList Class Reference

a primitive taBase list type, used for global lists that manage taBase objects

See for more info: Wiki Docs For: taBase_PtrList

 #include <taBase_PtrList>

defined at: /mnt/ssd/grey/local/include/Emergent/taBase_PtrList.h :30-41

Inherits From: taPtrList, taPtrList_impl

Inherited By: taBase_PtrList*, taBase_PtrList&, const taBase_PtrList

Index: SubTypes, Members, Methods, Static Members, Static Methods, Expert Members, Expert Methods

Sub Types


SubType Documentation


Regular (preferred) Member and Method Documentation

Members

Member Category: taList

Methods

Method Category: Access

Method Category: Copy

Method Category: Display

Method Category: Modify

Method Category: Order

Method Category: _NoCategory


Member Documentation

Member Category: taList

taPtrList_impl::size : int

number of elements in the list


Method Documentation

Method Category: Access

taBase* taPtrList_taBase_::Edit_El ( taBase* item )

Edit given list item

Show Source Code

taBase* taPtrList_taBase_::FastEl ( int i )

fast element (no range checking)

Show Source Code

int taPtrList_taBase_::FindEl ( taBase* item )

find element in list (-1 if not there)

Show Source Code

taBase* taPtrList_taBase_::FindName ( taString& item_nm )

find given named element (NULL = not here), sets idx

Show Source Code

int taPtrList_impl::FindNameIdx ( taString& it )

return the index of the item with given name on the list

Show Source Code

bool taPtrList_impl::IsEmpty ( )

is the list empty of elements (i.e., size == 0)

Show Source Code

taBase* taPtrList_taBase_::Peek ( )

peek at the last element on the stack

Show Source Code

Method Category: Copy

void taPtrList_impl::Borrow ( taPtrList_impl& cp )

borrow (link) elements of given list into this one

Show Source Code

void taPtrList_impl::BorrowUniqNameNew ( taPtrList_impl& cp )

borrow so result is unique names, replacing with new ones where dupl

Show Source Code

void taPtrList_impl::BorrowUniqNameOld ( taPtrList_impl& cp )

borrow so result is unique names, using old ones where dupl

Show Source Code

void taPtrList_impl::BorrowUniqNameOldFirst ( taPtrList_impl& cp )

borrow so result is unique names, using old ones where dupl, inserting new ones first (in order) on the list

Show Source Code

void taPtrList_impl::BorrowUnique ( taPtrList_impl& cp )

borrow so result is unique list

Show Source Code

void taPtrList_impl::Copy_Borrow ( taPtrList_impl& cp )

apply copy operator to items, use borrow to add new ones from cp (if necc)

Show Source Code

void taPtrList_impl::Copy_Common ( taPtrList_impl& cp )

apply copy operator to only those items in common between the two lists

Show Source Code

void taPtrList_impl::Copy_Duplicate ( taPtrList_impl& cp )

apply copy operator to items, use duplicate to add new ones from cp (if necc)

Show Source Code

void taPtrList_impl::Copy_Exact ( taPtrList_impl& cp )

makes us basically identical to cp, in number, and type

Show Source Code

void taPtrList_impl::DupeUniqNameNew ( taPtrList_impl& cp )

duplicate so result is unique names, replacing with new ones where dupl

Show Source Code

void taPtrList_impl::DupeUniqNameOld ( taPtrList_impl& cp )

duplicate so result is unique names, using old ones where dupl

Show Source Code

void taPtrList_impl::Duplicate ( taPtrList_impl& cp )

duplicate (clone & add) elements of given list into this one

Show Source Code

void taPtrList_impl::Stealth_Borrow ( taPtrList_impl& cp )

borrow without referencing the borrowed elements (i.e. use AddEl_())

Show Source Code

Method Category: Display

taString& taPtrList_impl::Print ( taString& strm, int indent = 0 )

print the items on the list

Show Source Code

Method Category: Modify

void taPtrList_taBase_::Add ( taBase* item )

add element to the list and 'own' item

Show Source Code

taBase* taPtrList_taBase_::AddUniqNameOld ( taBase* item )

add so that name is unique, old used if dupl, returns one used

Show Source Code

bool taPtrList_taBase_::AddUnique ( taBase* item )

add so that object is unique, true if unique

Show Source Code

void taPtrList_impl::BuildHashTable ( int n_buckets, taPtrList_impl::KeyType key_typ = KT_NAME )

build a hash table with given number of buckets and key type (not dynamic, so make it big)

Show Source Code

taBase* taPtrList_taBase_::DuplicateEl ( taBase* item )

Duplicate given list item and Add to list; returns item added, or NULL if failed

Show Source Code

taBase* taPtrList_taBase_::First ( )

return first element, or NULL if list empty

Show Source Code

bool taPtrList_taBase_::Insert ( taBase* item, int idx )

Add or insert element at idx (-1 for end)

Show Source Code

bool taPtrList_taBase_::InsertLink ( taBase* item, int idx = -1 )

Insert a link at index (-1 for end)

Show Source Code

void taPtrList_taBase_::Link ( taBase* item )

Link an item to list without owning it

Show Source Code

taBase* taPtrList_taBase_::LinkUniqNameOld ( taBase* item )

link so that name is unique, old used if dupl, returns one used

Show Source Code

bool taPtrList_taBase_::LinkUnique ( taBase* item )

link so that object is unique, true if unique

Show Source Code

bool taPtrList_taBase_::MoveAfter ( taBase* trg, taBase* item )

move item so that it appears just after the target item trg in the list

Show Source Code

bool taPtrList_taBase_::MoveBefore ( taBase* trg, taBase* item )

move item so that it appears just before the target item trg in the list

Show Source Code

bool taPtrList_impl::MoveBeforeIdx ( int from, int to )

Move element from index (from) to just before position (to) in list; for end, use to=-1 or size

Show Source Code

bool taPtrList_taBase_::MoveEl ( taBase* from, taBase* to )

Move item (from) to position of (to)

Show Source Code

bool taPtrList_impl::MoveIdx ( int from, int to )

Move element from index (from) to position (to) in list

Show Source Code

taBase* taPtrList_taBase_::Pop ( )

pop the last element off the stack

Show Source Code

void taPtrList_impl::PopAll ( )

pop all elements off the stack

Show Source Code

void taPtrList_taBase_::Push ( taBase* item )

push item on stack (for temporary use, not 'owned')

Show Source Code

void taPtrList_impl::ReBuildHashTable ( )

re-build existing hash table for all items on the list

Show Source Code

void taPtrList_impl::RemoveAll ( )

Remove all elements on the list

Show Source Code

bool taPtrList_taBase_::RemoveEl ( taBase* item )

Remove given item from list

Show Source Code

void taPtrList_impl::RemoveHashTable ( )

remove any existing hash table

Show Source Code

bool taPtrList_impl::RemoveIdx ( int idx )

remove (and delete) element from list at index

Show Source Code

bool taPtrList_impl::RemoveLast ( )

remove the last element on the list

Show Source Code

bool taPtrList_impl::RemoveName ( taString& item_nm )

remove (and delete) named element from list

Show Source Code

bool taPtrList_taBase_::ReplaceEl ( taBase* old_it, taBase* new_it )

Replace old element with new element

Show Source Code

bool taPtrList_taBase_::ReplaceIdx ( int old_idx, taBase* new_it )

replace element at index with the new one

Show Source Code

bool taPtrList_taBase_::ReplaceLinkEl ( taBase* old_it, taBase* new_it )

replace given element (if on list) with the new one

Show Source Code

bool taPtrList_taBase_::ReplaceLinkIdx ( int old_idx, taBase* new_it )

replace element with a link to the new one

Show Source Code

bool taPtrList_taBase_::ReplaceLinkName ( taString& old_nm, taBase* new_it )

replace given named element (if on list) with the new one

Show Source Code

bool taPtrList_taBase_::ReplaceName ( taString& old_nm, taBase* new_it )

replace element with given name with the new one

Show Source Code

void taPtrList_impl::Reset ( )

reset the list (remove all elements)

Show Source Code

bool taPtrList_impl::SwapIdx ( int pos1, int pos2 )

Swap the elements in the two given positions on the list

Show Source Code

taBase* taPtrList_taBase_::TakeItem ( int idx )

remove the element from list, NULL if idx out of range -- ONLY FOR NON-OWNED ITEMS

Show Source Code

bool taPtrList_taBase_::Transfer ( taBase* item )

Transfer item to this list

Show Source Code

Method Category: Order

void taPtrList_impl::Permute ( int thr_no = -1 )

permute the items in the list into a random order -- (0 <= thr_no < 100) specifies thread or dmem proc number for parallel safe random sequences (-1 = taMisc::dmem_proc for auto-safe dmem)

Show Source Code

void taPtrList_impl::Sort ( bool descending = false )

sort the items in the list in alpha order according to name (or El_Compare_)

Show Source Code

Method Category: _NoCategory

taBase* taPtrList_taBase_::SafeEl ( int i )

Show Source Code

Static Member and Method Documentation

Static Members

Static Methods


Static Method Documentation


Expert Member and Method Documentation

Expert Members

Expert Member Category: taList

Expert Methods

Expert Method Category: Access

Expert Method Category: Modify


Expert Member Documentation

Expert Member Category: taList

taPtrList_impl::alloc_size : int

allocation size

taPtrList_impl::hash_table : taHashTable*

a hash table (NULL if not used)

taPtrList_impl::is_transfer : bool

set to true at start of transfer, false when done - allows list to differentiate delete from transfer to another list


Expert Method Documentation

Expert Method Category: Access

void* taPtrList_impl::FirstEl ( int& itr )

get the first item on the list, initialize iterator

Show Source Code

bool taPtrList_impl::InRange ( int idx )

is the specified index within range of 0 >= idx < size

Show Source Code

int taPtrList_impl::Index ( int idx )

get actual index from index value that can also be negative, meaning access from end of list

Show Source Code

void* taPtrList_impl::NextEl ( int& itr )

get the next item on the list according to iterator

Show Source Code

Expert Method Category: Modify

bool taPtrList_taBase_::AddUniqNameNew ( taBase* item )

add so that name is unique, true if unique, new replaces existing

Show Source Code

bool taPtrList_impl::Alloc ( int sz )

allocate a list big enough for given number of elements (or current size) -- uses optimized memory allocation policies and generally allocates more than currently needed

Show Source Code

bool taPtrList_impl::AllocExact ( int sz )

allocate exact number specified

Show Source Code

bool taPtrList_taBase_::LinkUniqNameNew ( taBase* item )

link so that name is unique, true if unique, new replaces existing

Show Source Code


Copyright © 2017Regents of the University of Colorado, Carnegie Mellon University, Princeton University.
emergent 8.2.2