OP_BundleReferences Class Reference

#include <OP_BundleReferences.h>

List of all members.

Public Member Functions

 OP_BundleReferences (OP_Node &owner)
 ~OP_BundleReferences ()
OP_BundlegetParmBundle (const char *parm_name, int vector_index, UT_String &pattern, OP_Network *creator, const char *filter)
void markAllUnused ()
void cleanUnused ()
void cleanAll ()
 Deletes all references.
const UT_PtrArray
< OP_BundleRef * > * 
getListOfRefs (const char *bundle_name) const
int64 getMemUsage (UT_Bool onlythis) const
 Estimates memory usage of the this object.


Detailed Description

Implementation of a manager that overlooks all the references to the bundles by a all parameters of an operator.

Definition at line 69 of file OP_BundleReferences.h.


Constructor & Destructor Documentation

OP_BundleReferences::OP_BundleReferences ( OP_Node owner  ) 

OP_BundleReferences::~OP_BundleReferences (  ) 


Member Function Documentation

void OP_BundleReferences::cleanAll (  ) 

Deletes all references.

void OP_BundleReferences::cleanUnused (  ) 

Deletes all references whose used flag is false. Usually preceeded by markAllUnused, and a series of getParmBundle to identify and delete obsolete references.

const UT_PtrArray<OP_BundleRef *>* OP_BundleReferences::getListOfRefs ( const char *  bundle_name  )  const

Obtains a list of bundle references. Given a bundle name, this method returns all parameters that reference that bundle.

int64 OP_BundleReferences::getMemUsage ( UT_Bool  onlythis  )  const

Estimates memory usage of the this object.

OP_Bundle* OP_BundleReferences::getParmBundle ( const char *  parm_name,
int  vector_index,
UT_String pattern,
OP_Network creator,
const char *  filter 
)

Obtains a bundle defined by an operator pattern and filter using the creator and myOwner as relative_to nodes (much like OP_BundleList), and then associates this bundle with a parameter defined by a name and index.

The bundle references by this parameter are updated (ie, bundle previously referenced by this parm is dereferenced, and a reference count of the new bundle (which is returned) is bumped up.

The also and interest is registered with the bundle for myOwner node (much like OP_BundleList::getPattern() does.

The bundle reference used flag is set to true for that parm/index pair.

void OP_BundleReferences::markAllUnused (  ) 

Marks all the references as unused. Usually followed by cleanUnused() to delete the references that no longer exist.


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

Generated on Fri May 25 00:10:32 2012 for HDK by  doxygen 1.5.9