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

#include <GA_ATITopology.h>

+ Inheritance diagram for GA_ATITopology:

Public Types

typedef GA_PageArray< void,
1, true, false > 
DataType
 
- Public Types inherited from GA_Attribute
enum  WriteConcurrence { WRITE_CONCURRENCE_NONE, WRITE_CONCURRENCE_PAGE, WRITE_CONCURRENCE_ELEMENT }
 

Public Member Functions

 GA_ATITopology (const GA_AttributeType &type, const GA_IndexMap &index_map, GA_AttributeScope scope, const UT_StringHolder &name, GA_AttributeOwner linkowner)
 
virtual ~GA_ATITopology ()
 
int64 getMemoryUsage (bool inclusive) const
 Report memory used. More...
 
virtual void countMemory (UT_MemoryCounter &counter, bool inclusive) const
 
virtual WriteConcurrence getSupportedWriteConcurrence () const
 Data is paged, so concurrent writes to separate pages supported. More...
 
virtual const GA_AIFMergegetAIFMerge () const
 Merge interface. More...
 
bool mergeAppendData (const GA_MergeMap &map, const GA_ATITopology &sattrib)
 
virtual const GA_AIFCopyDatagetAIFCopyData () const
 Return the attribute's copy interface or NULL. More...
 
SYS_FORCE_INLINE GA_Offset getLink (GA_Offset ai) const
 
SYS_FORCE_INLINE void setLink (GA_Offset ai, GA_Offset v)
 
SYS_FORCE_INLINE bool isPageConstant (GA_PageNum pageno) const
 
void setLinksConstant (GA_Offset start, GA_Offset end, GA_Offset value)
 Sets all links for offsets >= start and < end to value. More...
 
void clear ()
 Set all values to the default. More...
 
GA_Storage getStorage () const
 
bool setStorage (GA_Storage storage)
 
virtual bool matchesStorage (const GA_Attribute *that) const
 
virtual void replace (const GA_Attribute &src)
 
GA_AttributeOwner getLinkOwner () const
 
bool jsonSave (UT_JSONWriter &w, const GA_SaveMap &map) const
 
bool jsonLoad (UT_JSONParser &p, const GA_LoadMap &map)
 
virtual bool setArraySize (GA_Offset new_size)
 Grow or shrink the array size. More...
 
virtual void tryCompressAllPages (GA_Offset start_offset=GA_Offset(0), GA_Offset end_offset=GA_INVALID_OFFSET)
 Try to compress data pages. More...
 
virtual void hardenAllPages (GA_Offset start_offset=GA_Offset(0), GA_Offset end_offset=GA_INVALID_OFFSET)
 Harden data pages. More...
 
bool getUnresolvedMergeFlag () const
 
void setUnresolvedMergeFlag (bool f)
 
const DataTypegetData () const
 
DataTypegetData ()
 
- Public Member Functions inherited from GA_Attribute
 GA_Attribute (const GA_AttributeType &type, const GA_IndexMap &index_map, GA_AttributeScope scope, const UT_StringHolder &name)
 
virtual ~GA_Attribute ()
 
const GA_AttributeTypegetType () const
 
const GA_IndexMapgetIndexMap () const
 
const GA_DetailgetDetail () const
 
GA_DetailgetDetail ()
 
GA_AttributeOwner getOwner () const
 
GA_AttributeScope getScope () const
 
SYS_FORCE_INLINE GA_TypeInfo getTypeInfo () const
 
SYS_FORCE_INLINE void setTypeInfo (GA_TypeInfo type)
 
bool shouldInterpretAsTexCoord (bool allow_float2=false) const
 
GA_StorageClass getStorageClass () const
 Returns the approximate type of the attribute. More...
 
int getTupleSize () const
 Size of the AIFTuple, if it exists. If it doesn't, 1. More...
 
const UT_StringHoldergetName () const
 
const UT_StringHoldergetFullName () const
 
SYS_FORCE_INLINE int64 getDataId () const
 
SYS_FORCE_INLINE void assignNewDataId ()
 
SYS_FORCE_INLINE void bumpDataId ()
 
SYS_FORCE_INLINE void clearDataId ()
 
SYS_FORCE_INLINE void cloneDataId (const GA_Attribute &src, bool allow_clear=false)
 
SYS_FORCE_INLINE void cloneOrBumpDataId (const GA_Attribute &src, bool allow_clear=false)
 NOTE: Just call cloneDataId(src). More...
 
virtual const GA_AIFDeltagetAIFDelta () const
 Return the attribute's delta interface or NULL. More...
 
virtual const GA_AIFTuplegetAIFTuple () const
 Return the attribute's tuple interface or NULL. More...
 
virtual const GA_AIFMathgetAIFMath () const
 Return the attribute's math interface or NULL. More...
 
virtual const GA_AIFInterp * getAIFInterp () const
 Return the attribute's interpolation interface or NULL. More...
 
virtual const GA_AIFBlobgetAIFBlob () const
 Return the attribute's blob interface or NULL. More...
 
virtual const GA_AIFBlobArraygetAIFBlobArray () const
 Return the attribute's blob array interface or NULL. More...
 
virtual const GA_AIFStringTuplegetAIFStringTuple () const
 Return the attribute's string tuple interface or NULL. More...
 
virtual const
GA_AIFSharedStringTuple
getAIFSharedStringTuple () const
 Return the attribute's shared string tuple interface or NULL. More...
 
virtual const
GA_AIFSharedStringArray
getAIFSharedStringArray () const
 Return the attribute's shared string array interface or NULL. More...
 
virtual const GA_AIFIndexPairgetAIFIndexPair () const
 Return the attribute's index pair interface or NULL. More...
 
virtual const GA_AIFBlindDatagetAIFBlindData () const
 Return the attribute's blind data interface or NULL. More...
 
virtual const GA_AIFEditgetAIFEdit () const
 Return the attribute's edit interface or NULL. More...
 
virtual const GA_AIFComparegetAIFCompare () const
 Return the attribute's comparison interface or NULL. More...
 
virtual const GA_AIFNumericArraygetAIFNumericArray () const
 Return the attribute's arraydata interface or NULL. More...
 
virtual const GA_AIFStatgetAIFStat () const
 
template<typename T >
const TgetAIF () const
 Generic method for getting an AIF by type. More...
 
const GA_AttributeOptionsgetOptions () const
 
GA_AttributeOptionsgetOptions ()
 
void setNonTransforming (bool val)
 
bool needsTransform (bool include_P=true) const
 
bool isDetached () const
 
void mergeOptions (const GA_AttributeOptions &src)
 Merge the options passed in with the options in the attribute. More...
 
bool importOption (const char *name, int &v) const
 
bool importOption (const char *name, bool &v) const
 
bool importOption (const char *name, fpreal32 &v) const
 
bool importOption (const char *name, fpreal64 &v) const
 
bool importOption (const char *name, UT_String &v) const
 
virtual bool needDestruction () const
 Methods which can be overridden from GA_Attribute. More...
 
virtual void destructElement (GA_Offset offset)
 Callback invoked if needsDestruction() returns true. More...
 
void setTailInitialization (bool onoff)
 
bool isTailInitialization () const
 Check whether the attribute is set to tail initialization. More...
 
void reconstructElement (GA_Offset offset)
 
virtual void reconstructElementBlock (GA_Offset offset, GA_Offset nelements)
 
virtual void compactStorage ()
 
virtual void batchDeletion ()
 
GA_Attributeclone (const GA_IndexMap &index_map, const UT_StringHolder &name, bool clone_options) const
 
bool jsonSaveDefinition (UT_JSONWriter &w) const
 Save the GA_Attribute-Definition section. More...
 
virtual const GA_AIFJSONgetAIFJSON () const
 Return the AIF to handle saving/loading of the private data section. More...
 
virtual int getSaveVersion () const
 
virtual bool debugValidateArrayCapacity (GA_Offset sz) const
 Debug validation of allocated array size. More...
 
virtual void copyNonStorageMetadata (const GA_Attribute *that)
 
GA_AttributeProxyHandle getProxy ()
 
GA_ConstAttributeProxyHandle getProxy () const
 
void setExportName (const char *external_name)
 
bool hasExportName () const
 
std::string getExportName () const
 
GA_CEAttributegetCEAttribute (GA_StorageClass storage, int &tuplesize, bool isarray, bool read, bool write)
 
void flushCEWriteCaches (bool clearwriteback=true)
 
bool hasPendingCEWriteBack () const
 
void flushCECaches ()
 Remove all CE Caches, copying back any marked as written to. More...
 
virtual bool copy (GA_Offset desti, GA_Offset srci)
 
virtual bool copy (GA_Offset desti, const GA_Attribute &src, GA_Offset srci)
 
virtual bool copy (const GA_Range &destrange, const GA_Range &srcrange)
 
virtual bool copy (const GA_Range &destrange, const GA_Attribute &src, const GA_Range &srcrange)
 
virtual bool fill (const GA_Range &destrange, GA_Offset srci)
 
virtual bool fill (const GA_Range &destrange, const GA_Attribute &src, GA_Offset srci)
 

Static Public Member Functions

static void registerType ()
 
static GA_ATITopologycreate (const GA_IndexMap &index_map, GA_AttributeScope scope, const UT_StringHolder &name, GA_AttributeOwner linkowner)
 
static SYS_FORCE_INLINE const
GA_AttributeType
getType ()
 
static SYS_FORCE_INLINE const
UT_StringHolder
getTypeName ()
 
static SYS_FORCE_INLINE bool isType (const GA_Attribute *attrib)
 
static SYS_FORCE_INLINE
GA_ATITopology
cast (GA_Attribute *attrib)
 
static SYS_FORCE_INLINE const
GA_ATITopology
cast (const GA_Attribute *attrib)
 
- Static Public Member Functions inherited from GA_Attribute
static bool jsonLoadDefinition (UT_JSONParser &p, GA_AttributeScope &scope, UT_WorkBuffer &type, UT_WorkBuffer &name, int64 &version, GA_AttributeOptions &options)
 Load the GA_Attribute-Definition section. More...
 
static int64 nextDataId ()
 

Friends

class GA_Topology
 
class ga_TopologyCopy
 

Additional Inherited Members

- Protected Member Functions inherited from GA_Attribute
int64 getBaseMemoryUsage () const
 
void setDetached (bool detached)
 Only called by GA_AttributeSet and GA_ElementGroup. More...
 

Detailed Description

Examples:
tetprim/GEO_PrimTetra.C.

Definition at line 47 of file GA_ATITopology.h.

Member Typedef Documentation

typedef GA_PageArray<void, 1, true, false> GA_ATITopology::DataType

Definition at line 242 of file GA_ATITopology.h.

Constructor & Destructor Documentation

GA_ATITopology::GA_ATITopology ( const GA_AttributeType type,
const GA_IndexMap index_map,
GA_AttributeScope  scope,
const UT_StringHolder name,
GA_AttributeOwner  linkowner 
)
virtual GA_ATITopology::~GA_ATITopology ( )
virtual

Member Function Documentation

static SYS_FORCE_INLINE GA_ATITopology* GA_ATITopology::cast ( GA_Attribute attrib)
inlinestatic

Definition at line 68 of file GA_ATITopology.h.

static SYS_FORCE_INLINE const GA_ATITopology* GA_ATITopology::cast ( const GA_Attribute attrib)
inlinestatic

Definition at line 75 of file GA_ATITopology.h.

void GA_ATITopology::clear ( )

Set all values to the default.

virtual void GA_ATITopology::countMemory ( UT_MemoryCounter counter,
bool  inclusive 
) const
virtual

Count memory usage using a UT_MemoryCounter in order to count shared memory correctly. If inclusive is true, the size of this object is counted, else only memory owned by this object is counted. If this is pointed to by the calling object, inclusive should be true. If this is contained in the calling object, inclusive should be false. (Its memory was already counted in the size of the calling object.)

NOTE: If you're implementing this in a direct subclass of GA_Attribute, call getBaseMemoryUsage() to get the amount of memory in the base class. If in a more distant descendant class, call Base::countMemory(counter, false) to count the memory in Base and above, excluding sizeof(Base).

Implements GA_Attribute.

static GA_ATITopology* GA_ATITopology::create ( const GA_IndexMap index_map,
GA_AttributeScope  scope,
const UT_StringHolder name,
GA_AttributeOwner  linkowner 
)
static
virtual const GA_AIFCopyData* GA_ATITopology::getAIFCopyData ( ) const
inlinevirtual

Return the attribute's copy interface or NULL.

Reimplemented from GA_Attribute.

Definition at line 111 of file GA_ATITopology.h.

virtual const GA_AIFMerge* GA_ATITopology::getAIFMerge ( ) const
inlinevirtual

Merge interface.

Reimplemented from GA_Attribute.

Definition at line 106 of file GA_ATITopology.h.

const DataType& GA_ATITopology::getData ( ) const
inline

Provide access to data

Definition at line 246 of file GA_ATITopology.h.

DataType& GA_ATITopology::getData ( )
inline

Provide access to data

Definition at line 247 of file GA_ATITopology.h.

SYS_FORCE_INLINE GA_Offset GA_ATITopology::getLink ( GA_Offset  ai) const
inline

Definition at line 123 of file GA_ATITopology.h.

GA_AttributeOwner GA_ATITopology::getLinkOwner ( ) const
inline

Query the owner type of the link stored in this attribute. For example, the vertex PointRef attribute would have: getOwner() == GA_ATTRIB_VERTEX getLinkOwner() == GA_ATTRIB_POINT

Definition at line 215 of file GA_ATITopology.h.

int64 GA_ATITopology::getMemoryUsage ( bool  inclusive) const
virtual

Report memory used.

Implements GA_Attribute.

GA_Storage GA_ATITopology::getStorage ( ) const
inline

Definition at line 176 of file GA_ATITopology.h.

virtual WriteConcurrence GA_ATITopology::getSupportedWriteConcurrence ( ) const
inlinevirtual

Data is paged, so concurrent writes to separate pages supported.

We do not need to implement the reconstructElement() method as the GA_Topology owner explicitly initializes each value as the element is added. TODO: Ideally we'd do so in reconstructElement() to avoid useless work when elements are first constructed.

Implements GA_Attribute.

Definition at line 102 of file GA_ATITopology.h.

static SYS_FORCE_INLINE const GA_AttributeType& GA_ATITopology::getType ( void  )
inlinestatic

Definition at line 57 of file GA_ATITopology.h.

static SYS_FORCE_INLINE const UT_StringHolder& GA_ATITopology::getTypeName ( )
inlinestatic

Definition at line 59 of file GA_ATITopology.h.

bool GA_ATITopology::getUnresolvedMergeFlag ( ) const
inline

Vertex references are managed via multiple coupled attributes, so AIF_Merge cannot resolve non-trivial vertex merges. Instead, the AIF will set this flag and let GA_Topology::mergeRebuild() handle updating the vertex reference attributes.

Definition at line 118 of file GA_ATITopology.h.

virtual void GA_ATITopology::hardenAllPages ( GA_Offset  start_offset = GA_Offset(0),
GA_Offset  end_offset = GA_INVALID_OFFSET 
)
virtual

Harden data pages.

Implements GA_Attribute.

SYS_FORCE_INLINE bool GA_ATITopology::isPageConstant ( GA_PageNum  pageno) const
inline

Definition at line 165 of file GA_ATITopology.h.

static SYS_FORCE_INLINE bool GA_ATITopology::isType ( const GA_Attribute attrib)
inlinestatic

Definition at line 63 of file GA_ATITopology.h.

bool GA_ATITopology::jsonLoad ( UT_JSONParser p,
const GA_LoadMap map 
)

Load from a JSON stream.

Note
There is no GA_AIFJSON interface for topology.
bool GA_ATITopology::jsonSave ( UT_JSONWriter w,
const GA_SaveMap map 
) const

Save to a JSON stream.

JSON Schema: GA_ATITopology

{
"name" : "GA_ATITopology",
"description" : "An tuple array of indexed strings",
"type" : "orderedmap",
"properties": {
"data": {
"type" : "indices",
"items" : "integer",
"description" : "Integer reference indices.",
},
},
}
See Also
JSON_FileFormat
Note
There is no GA_AIFJSON interface for topology.
virtual bool GA_ATITopology::matchesStorage ( const GA_Attribute that) const
inlinevirtual

Returns true iff that is an attribute whose content can be copied from this without any type conversions. This is important to avoid reallocation of an attribute if its storage type, including tuple size, matches the source attribute exactly.

Reimplemented from GA_Attribute.

Definition at line 190 of file GA_ATITopology.h.

bool GA_ATITopology::mergeAppendData ( const GA_MergeMap map,
const GA_ATITopology sattrib 
)
static void GA_ATITopology::registerType ( )
static
virtual void GA_ATITopology::replace ( const GA_Attribute src)
virtual

This replaces the entirety of this attribute's content and non- storage metadata (except the name) with that of the src attribute. matchesStorage(src) should already return true. This is primarily for use by GA_AttributeSet::replace(). NOTE: The internal content sizes may not match exactly if the attribute type may overallocate, but the sizes should be such that any real data will fit in the destination, so be careful and deal with the myTailInitialize flag appropriately if any extra elements aren't equal to the default.

Implements GA_Attribute.

virtual bool GA_ATITopology::setArraySize ( GA_Offset  new_size)
virtual

Grow or shrink the array size.

Implements GA_Attribute.

SYS_FORCE_INLINE void GA_ATITopology::setLink ( GA_Offset  ai,
GA_Offset  v 
)
inline
Examples:
tetprim/GEO_PrimTetra.C.

Definition at line 139 of file GA_ATITopology.h.

void GA_ATITopology::setLinksConstant ( GA_Offset  start,
GA_Offset  end,
GA_Offset  value 
)

Sets all links for offsets >= start and < end to value.

bool GA_ATITopology::setStorage ( GA_Storage  storage)
void GA_ATITopology::setUnresolvedMergeFlag ( bool  f)
inline

Vertex references are managed via multiple coupled attributes, so AIF_Merge cannot resolve non-trivial vertex merges. Instead, the AIF will set this flag and let GA_Topology::mergeRebuild() handle updating the vertex reference attributes.

Definition at line 119 of file GA_ATITopology.h.

virtual void GA_ATITopology::tryCompressAllPages ( GA_Offset  start_offset = GA_Offset(0),
GA_Offset  end_offset = GA_INVALID_OFFSET 
)
virtual

Try to compress data pages.

Implements GA_Attribute.

Friends And Related Function Documentation

friend class GA_Topology
friend

Definition at line 271 of file GA_ATITopology.h.

friend class ga_TopologyCopy
friend

Definition at line 318 of file GA_ATITopology.h.


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