HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GA_ElementGroupTable Class Referenceabstract

#include <GA_ElementGroupTable.h>

+ Inheritance diagram for GA_ElementGroupTable:

Classes

class  ElementType
 
class  ElementType< GA_ATTRIB_POINT, DUMMY >
 
class  ElementType< GA_ATTRIB_PRIMITIVE, DUMMY >
 
class  ElementType< GA_ATTRIB_VERTEX, DUMMY >
 

Public Types

typedef
GA_GroupTable::iterator
< GA_ElementGroup
iterator
 
- Public Types inherited from GA_GroupTable
typedef UT_ArrayStringMap
< GA_Group * > 
MapType
 
typedef UT_OrderedIterator
< GA_Group
*, GA_GroupTable::iterator
< GA_Group > > 
ordered_iterator
 

Public Member Functions

 ~GA_ElementGroupTable () override
 
void getList (UT_Array< const GA_ElementGroup * > &list) const
 
void getList (UT_Array< GA_ElementGroup * > &list) const
 
bool loadGroupsH9 (UT_IStream &is, GA_AttributeOwner owner, int count)
 
bool saveGroupsH9 (std::ostream &os, int binary) const
 
void unionElementForAllGroups (GA_Offset dest, GA_Offset src) const
 Add dest to the same groups that src belongs to. More...
 
void intersectElementForAllGroups (GA_Offset dest, GA_Offset src) const
 Remove dest from the groups that src does not belong to. More...
 
GA_Size destroyEmptyGroups ()
 
void invalidateGroupEntries ()
 
SYS_FORCE_INLINE GA_ElementGroupfind (const UT_StringRef &name) const
 
GA_GroupTable::iterator
< GA_ElementGroup
beginTraverse () const
 
GA_GroupTable::iterator
< GA_ElementGroup
endTraverse () const
 
void addElementToAllGroups (GA_Offset dest) const
 
void toggleElementInAllGroups (GA_Offset dest) const
 
void removeElementFromAllGroups (GA_Offset dest) const
 
- Public Member Functions inherited from GA_GroupTable
 GA_GroupTable (GA_Detail &detail)
 
virtual ~GA_GroupTable ()
 
virtual int64 getMemoryUsage (bool inclusive) const
 Report memory usage (includes all shared memory) More...
 
virtual void countMemory (UT_MemoryCounter &counter, bool inclusive) const
 
bool isEmpty () const
 
exint getPersistentCount () const
 
exint entries () const
 
GA_Groupfind (const UT_StringRef &name) const
 
GA_GroupnewGroup (const UT_StringHolder &name)
 
GA_GroupnewInternalGroup ()
 
GA_GroupnewGroup (const UT_StringHolder &name, bool internal)
 TODO: Deprecate internal groups with user-specified names. More...
 
bool destroy (GA_Group *group)
 
bool destroy (const UT_StringRef &name)
 
GA_Size destroyGroups (const Filter &filter)
 
void clear ()
 
bool renameGroup (const UT_StringRef &fromname, const UT_StringHolder &toname)
 
UT_StringHolder renameGroupUnspecified (const UT_StringRef &from_name)
 
bool jsonSave (UT_JSONWriter &w, const GA_SaveMap &map, const char *type) const
 
bool jsonLoad (UT_JSONParser &p, const GA_LoadMap &map, const char *type_default, GA_AttributeOwner owner)
 Load the groups from the JSON stream. More...
 
bool jsonShouldSave (const GA_SaveMap &map) const
 Returns true if there are any groups to be saved out. More...
 
GA_GroupTable::iterator< GA_GroupbeginTraverse () const
 
GA_GroupTable::iterator< GA_GroupendTraverse () const
 
GA_GroupUPtr createDetachedGroup () const
 
GA_GroupnewDetachedGroup () const
 
void stat (UT_StringArray &info, uint level)
 
void stat (GA_Stat &stat, uint level) const
 
ordered_iterator obegin () const
 
ordered_iterator oend () const
 

Protected Member Functions

 GA_ElementGroupTable (GA_Detail &detail, GA_AttributeOwner owner)
 
void baseMergeTable (const GA_ElementGroupTable &src, GA_MergeMap &map, GA_AttributeOwner owner)
 
GA_GroupjsonCreateGroup (UT_JSONParser &p, const char *type, const char *name, bool internal, GA_AttributeOwner owner) override
 
virtual GA_AttributeOwner getOwner () const =0
 
- Protected Member Functions inherited from GA_GroupTable
template<typename T >
iterator< Tbegin () const
 
template<typename T >
iterator< Tend () const
 
template<typename GROUP_TYPE >
void getListT (UT_Array< GROUP_TYPE * > &list) const
 
GA_DetailgetDetail ()
 
const GA_DetailgetDetail () const
 
virtual GA_GroupvirtualCreateGroup (GA_Detail &detail, const UT_StringHolder &name, bool internal) const =0
 
virtual GA_GroupvirtualCreateDetachedGroup (const GA_Detail &detail) const =0
 
GA_GroupnewGroupWithNoConflict (const UT_StringHolder &name, bool internal)
 
void reserveNewSymbolTableSpace (exint n)
 
const MapTypegetMap () const
 Used only by GA_AttributeDict. More...
 
typedef UT_OrderedIterator
< GA_ElementGroup
*, GA_GroupTable::iterator
< GA_ElementGroup > > 
ordered_iterator
 
ordered_iterator obegin () const
 
ordered_iterator oend () const
 
static int compareAlpha (GA_ElementGroup *const *a, GA_ElementGroup *const *b)
 
void removeElementsFromGroupOrders (const GA_Range &range) const
 
void removeElementsFromGroupOrders (const GA_Range &range, const GA_RangeMemberQuery *&range_query) const
 
void removeMixElementsFromGroups (GA_Offset element, const GA_SecondaryLookupInfo *sec_prefix, const GA_Range &sec_range) const
 
void removeMixElementsFromGroups (GA_Offset element, const GA_SecondaryLookupInfo *sec_prefix, const GA_Range &sec_range, const GA_RangeMemberQuery *&sec_range_query) const
 

Additional Inherited Members

- Static Public Member Functions inherited from GA_GroupTable
static bool jsonStat (UT_JSONParser &p, GA_Stat &sbuf, GA_GroupType owner)
 Stat the group from the JSON stream. More...
 
static int compareAlpha (GA_Group *const *a, GA_Group *const *b)
 
- Static Protected Member Functions inherited from GA_GroupTable
static int compareGroupName (const GA_Group &a, const GA_Group &b)
 

Detailed Description

Definition at line 43 of file GA_ElementGroupTable.h.

Member Typedef Documentation

Traverse the group table in alpabetic order.

Definition at line 69 of file GA_ElementGroupTable.h.

Constructor & Destructor Documentation

GA_ElementGroupTable::GA_ElementGroupTable ( GA_Detail detail,
GA_AttributeOwner  owner 
)
protected
GA_ElementGroupTable::~GA_ElementGroupTable ( )
override

Member Function Documentation

void GA_ElementGroupTable::addElementToAllGroups ( GA_Offset  dest) const

Apply an operation to all element groups

void GA_ElementGroupTable::baseMergeTable ( const GA_ElementGroupTable src,
GA_MergeMap map,
GA_AttributeOwner  owner 
)
protected
GA_GroupTable::iterator<GA_ElementGroup> GA_ElementGroupTable::beginTraverse ( ) const
inline

Traverse the group table in creation order.

Warning
It is NOT safe to add or remove groups during traversal.

Definition at line 60 of file GA_ElementGroupTable.h.

static int GA_ElementGroupTable::compareAlpha ( GA_ElementGroup *const *  a,
GA_ElementGroup *const *  b 
)
inlinestatic

Traverse the group table in alpabetic order.

Definition at line 70 of file GA_ElementGroupTable.h.

GA_Size GA_ElementGroupTable::destroyEmptyGroups ( )
GA_GroupTable::iterator<GA_ElementGroup> GA_ElementGroupTable::endTraverse ( ) const
inline

Traverse the group table in creation order.

Warning
It is NOT safe to add or remove groups during traversal.

Definition at line 62 of file GA_ElementGroupTable.h.

SYS_FORCE_INLINE GA_ElementGroup* GA_ElementGroupTable::find ( const UT_StringRef name) const
inline

Definition at line 143 of file GA_ElementGroupTable.h.

void GA_ElementGroupTable::getList ( UT_Array< const GA_ElementGroup * > &  list) const
void GA_ElementGroupTable::getList ( UT_Array< GA_ElementGroup * > &  list) const
void GA_ElementGroupTable::intersectElementForAllGroups ( GA_Offset  dest,
GA_Offset  src 
) const

Remove dest from the groups that src does not belong to.

void GA_ElementGroupTable::invalidateGroupEntries ( )

If you have changed group membership in a multithreaded algorithm, call this method to invalidate cached group entries for all groups in this table.

GA_Group* GA_ElementGroupTable::jsonCreateGroup ( UT_JSONParser p,
const char *  type,
const char *  name,
bool  internal,
GA_AttributeOwner  owner 
)
overrideprotectedvirtual

Method called to create a group during loading. The sub-class should verify that the owner matches the type information.

Implements GA_GroupTable.

bool GA_ElementGroupTable::loadGroupsH9 ( UT_IStream is,
GA_AttributeOwner  owner,
int  count 
)
ordered_iterator GA_ElementGroupTable::obegin ( ) const
inline

Traverse the group table in alpabetic order.

Definition at line 72 of file GA_ElementGroupTable.h.

ordered_iterator GA_ElementGroupTable::oend ( ) const
inline

Traverse the group table in alpabetic order.

Definition at line 74 of file GA_ElementGroupTable.h.

void GA_ElementGroupTable::removeElementFromAllGroups ( GA_Offset  dest) const

Apply an operation to all element groups

void GA_ElementGroupTable::removeElementsFromGroupOrders ( const GA_Range range) const

Remove elements from each group's ordered list, if any, in preparation for deleting those elements. This must occur in advance of the actual deletion and consequent removal from the group as a GA_RangeMemberQuery object may be using an element group internally. The GA_Range version may allocate a GA_RangeMemberQuery object if not provided one, in which case the caller is responsible for deleting it.

Note
This will temporarily leave ordered groups in an invalid state until the element removal is processed.
void GA_ElementGroupTable::removeElementsFromGroupOrders ( const GA_Range range,
const GA_RangeMemberQuery *&  range_query 
) const

Remove elements from each group's ordered list, if any, in preparation for deleting those elements. This must occur in advance of the actual deletion and consequent removal from the group as a GA_RangeMemberQuery object may be using an element group internally. The GA_Range version may allocate a GA_RangeMemberQuery object if not provided one, in which case the caller is responsible for deleting it.

Note
This will temporarily leave ordered groups in an invalid state until the element removal is processed.
void GA_ElementGroupTable::removeMixElementsFromGroups ( GA_Offset  element,
const GA_SecondaryLookupInfo sec_prefix,
const GA_Range sec_range 
) const

Remove secondary elements from mixed groups, if any, in preparation for deleting those elements. The GA_Range version may allocate a GA_RangeMemberQuery object if not provided one, in which case the caller is responsible for deleting it. The final offset in the GA_SecondaryLookupInfo argument in the GA_Range versions is a place holder for the offsets in the provided GA_Range and is ignored.

void GA_ElementGroupTable::removeMixElementsFromGroups ( GA_Offset  element,
const GA_SecondaryLookupInfo sec_prefix,
const GA_Range sec_range,
const GA_RangeMemberQuery *&  sec_range_query 
) const

Remove secondary elements from mixed groups, if any, in preparation for deleting those elements. The GA_Range version may allocate a GA_RangeMemberQuery object if not provided one, in which case the caller is responsible for deleting it. The final offset in the GA_SecondaryLookupInfo argument in the GA_Range versions is a place holder for the offsets in the provided GA_Range and is ignored.

bool GA_ElementGroupTable::saveGroupsH9 ( std::ostream &  os,
int  binary 
) const
void GA_ElementGroupTable::toggleElementInAllGroups ( GA_Offset  dest) const

Apply an operation to all element groups

void GA_ElementGroupTable::unionElementForAllGroups ( GA_Offset  dest,
GA_Offset  src 
) const

Add dest to the same groups that src belongs to.


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